// File: /workspace/github_c_makefile_star2_O2/hiperiondev[P]hpsdrsim/src/hpsdr_sim.c
// Function: process_ep2
void process_ep2(uint8_t *frame) {
    uint16_t data;
    int rc;
    int mod;

    chk_data(frame[0] & 1, ptt, "PTT", ep2_ptt);
    switch (frame[0]) {
    case 0:
    case 1:
        chk_data((frame[1] & 0x03) >> 0, rate, "SampleRate", ep2_samplerate);
        chk_data((frame[1] & 0x0C) >> 3, ref10, "Ref10MHz", ep2_ref10mhz);
        chk_data((frame[1] & 0x10) >> 4, src122, "Source122MHz", ep2_src122mhz);
        chk_data((frame[1] & 0x60) >> 5, PMconfig, "Penelope/Mercury config", ep2_pm_config);
        chk_data((frame[1] & 0x80) >> 7, MicSrc, "MicSource", ep2_micsrc);

        chk_data(frame[2] & 1, TX_class_E, "TX CLASS-E", ep2_txclasse);
        chk_data((frame[2] & 0xfe) >> 1, OpenCollectorOutputs, "OpenCollector", ep2_opencollector);

        chk_data(((frame[4] >> 3) & 7) + 1, receivers, "RECEIVERS", ep2_receivers);
        chk_data(((frame[4] >> 6) & 1), MicTS, "TimeStampMic", ep2_timestampmic);
        chk_data(((frame[4] >> 7) & 1), CommonMercuryFreq, "Common Mercury Freq", ep2_commonmercuryfreq);

        mod = 0;
        rc = frame[3] & 0x03;
        if (rc != AlexAtt) {
            mod = 1;
            AlexAtt = rc;
        }
        rc = (frame[3] & 0x04) >> 2;
        if (rc != preamp) {
            mod = 1;
            preamp = rc;
        }
        rc = (frame[3] & 0x08) >> 3;
        if (rc != LTdither) {
            mod = 1;
            LTdither = rc;
        }
        rc = (frame[3] & 0x10) >> 4;
        if (rc != LTrandom) {
            mod = 1;
            LTrandom = rc;
        }
        if (mod)
            dbg_printf(1, "AlexAtt=%d Preamp=%d Dither=%d Random=%d\n", AlexAtt, preamp, LTdither, LTrandom);

        mod = 0;
        rc = (frame[3] & 0x60) >> 5;
        if (rc != alexRXant) {
            mod = 1;
            alexRXant = rc;
        }
        rc = (frame[3] & 0x80) >> 7;
        if (rc != alexRXout) {
            mod = 1;
            alexRXout = rc;
        }
        rc = (frame[4] >> 0) & 3;
        if (rc != AlexTXrel) {
            mod = 1;
            AlexTXrel = rc;
        }
        rc = (frame[4] >> 2) & 1;
        if (rc != duplex) {
            mod = 1;
            duplex = rc;
        }
        if (mod)
            dbg_printf(1, "RXout=%d RXant=%d TXrel=%d Duplex=%d\n", alexRXout, alexRXant, AlexTXrel, duplex);

        if (OLDDEVICE == DEVICE_C25) {
            // Charly25: has two 18-dB preamps that are switched with "preamp" and "dither"
            //           and two attenuators encoded in Alex-ATT
            //           Both only applies to RX1!
            rxatt_dbl[0] = pow(10.0, -0.05 * (12 * AlexAtt - 18 * LTdither - 18 * preamp));
            rxatt_dbl[1] = 1.0;
        } else {
            // Assume that it has ALEX attenuators in addition to the Step Attenuators
            rxatt_dbl[0] = pow(10.0, -0.05 * (10 * AlexAtt + rx_att[0]));
            rxatt_dbl[1] = 1.0;
        }
        break;

    case 2:
    case 3:
        chk_data(frame[4] | (frame[3] << 8) | (frame[2] << 16) | (frame[1] << 24), tx_freq, "TX FREQ", ep2_txfreq);
        break;

    case 4:
    case 5:
        chk_data(frame[4] | (frame[3] << 8) | (frame[2] << 16) | (frame[1] << 24), rx_freq[0], "RX FREQ1", ep2_rxfreq1);
        break;

    case 6:
    case 7:
        chk_data(frame[4] | (frame[3] << 8) | (frame[2] << 16) | (frame[1] << 24), rx_freq[1], "RX FREQ2", ep2_rxfreq2);
        break;

    case 8:
    case 9:
        chk_data(frame[4] | (frame[3] << 8) | (frame[2] << 16) | (frame[1] << 24), rx_freq[2], "RX FREQ3", ep2_rxfreq3);
        break;

    case 10:
    case 11:
        chk_data(frame[4] | (frame[3] << 8) | (frame[2] << 16) | (frame[1] << 24), rx_freq[3], "RX FREQ4", ep2_rxfreq4);
        break;

    case 12:
    case 13:
        chk_data(frame[4] | (frame[3] << 8) | (frame[2] << 16) | (frame[1] << 24), rx_freq[4], "RX FREQ5", ep2_rxfreq5);
        break;

    case 14:
    case 15:
        chk_data(frame[4] | (frame[3] << 8) | (frame[2] << 16) | (frame[1] << 24), rx_freq[5], "RX FREQ6", ep2_rxfreq6);
        break;

    case 16:
    case 17:
        chk_data(frame[4] | (frame[3] << 8) | (frame[2] << 16) | (frame[1] << 24), rx_freq[6], "RX FREQ7", ep2_rxfreq7);
        break;

    case 18:
    case 19:
        chk_data(frame[1], txdrive, "TX DRIVE", ep2_txdrive);
        chk_data(frame[2] & 0x3F, hermes_config, "HERMES CONFIG", ep2_hermesconfig);
        chk_data((frame[2] >> 6) & 0x01, alex_manual, "ALEX manual HPF/LPF", ep2_alexmanhpflpf);
        chk_data((frame[2] >> 7) & 0x01, vna, "VNA mode", ep2_vnamode);
        chk_data(frame[3] & 0x1F, alex_hpf, "ALEX HPF", ep2_alexhpf);
        chk_data((frame[3] >> 5) & 0x01, alex_bypass, "ALEX Bypass HPFs", ep2_alexbyphpfs);
        chk_data((frame[3] >> 6) & 0x01, lna6m, "ALEX 6m LNA", ep2_alex6mlna);
        chk_data((frame[3] >> 7) & 0x01, alexTRdisable, "ALEX T/R disable", ep2_alextrdis);
        chk_data(frame[4], alex_lpf, "ALEX LPF", ep2_alexlpf);
        // reset TX level. Leve a little head-room for noise
        txdrv_dbl = (double) txdrive * 0.00390625;  // div. by. 256
        break;

    case 20:
    case 21:
        chk_data((frame[1] & 0x01) >> 0, rx_preamp[0], "ADC1 preamp", ep2_adc1preamp);
        chk_data((frame[1] & 0x02) >> 1, rx_preamp[1], "ADC2 preamp", ep2_adc2preamp);
        chk_data((frame[1] & 0x04) >> 2, rx_preamp[2], "ADC3 preamp", ep2_adc3preamp);
        chk_data((frame[1] & 0x08) >> 3, rx_preamp[3], "ADC4 preamp", ep2_adc4preamp);
        chk_data((frame[1] & 0x10) >> 4, tip_ring, "TIP/Ring", ep2_tipring);
        chk_data((frame[1] & 0x20) >> 5, MicBias, "MicBias", ep2_micbias);
        chk_data((frame[1] & 0x40) >> 6, MicPTT, "MicPTT", ep2_micptt);

        chk_data((frame[2] & 0x1F) >> 0, LineGain, "LineGain", ep2_linegain);
        chk_data((frame[2] & 0x20) >> 5, MerTxATT0, "Mercury Att on TX/0", ep2_mercuryattontx0);
        chk_data((frame[2] & 0x40) >> 6, PureSignal, "PureSignal", ep2_puresignal);
        chk_data((frame[2] & 0x80) >> 7, PeneSel, "PenelopeSelect", ep2_penelopeselect);

        chk_data((frame[3] & 0x0F) >> 0, MetisDB9, "MetisDB9", ep2_metisdb9);
        chk_data((frame[3] & 0x10) >> 4, MerTxATT1, "Mercury Att on TX/1", ep2_mercuryattontx1);

        if (frame[4] & 0x40) {
            // Some firmware/emulators use bit6 to indicate a 6-bit format
            // for a combined attenuator/preamplifier with the AD9866 chip.
            // The value is between 0 and 60 and formally correspondes to
            // to an RX gain of -12 to +48 dB. However, we set here that
            // a value of +16 (that is, 28 on the 0-60 scale) corresponds to
            // "zero attenuation"
            chk_data(37 - (frame[4] & 0x3F), rx_att[0], "RX1 HL ATT/GAIN", ep2_rx1hlattgain);
        } else {
            chk_data((frame[4] & 0x1F) >> 0, rx_att[0], "RX1 ATT", ep2_rx1att);
            chk_data((frame[4] & 0x20) >> 5, rx1_attE, "RX1 ATT enable", ep2_rx1attenable);
            //
            // Some hardware emulates "switching off ATT and preamp" by setting ATT
            // to 20 dB, because the preamp cannot be switched.
            // if (!rx1_attE) rx_att[0]=20;
        }
        if (OLDDEVICE != DEVICE_C25) {
            // Set RX amplification factors. No switchable preamps available normally.
            rxatt_dbl[0] = pow(10.0, -0.05 * (10 * AlexAtt + rx_att[0]));
            rxatt_dbl[1] = pow(10.0, -0.05 * (rx_att[1]));
            rxatt_dbl[2] = 1.0;
            rxatt_dbl[3] = 1.0;
        }
        break;

    case 22:
    case 23:
        chk_data(frame[1] & 0x1f, rx_att[1], "RX2 ATT", ep2_rx2att);
        chk_data((frame[2] >> 6) & 1, cw_reversed, "CW REV", ep2_cwrev);
        chk_data(frame[3] & 63, cw_speed, "CW SPEED", ep2_cwspeed);
        chk_data((frame[3] >> 6) & 3, cw_mode, "CW MODE", ep2_cw_mode);
        chk_data(frame[4] & 127, cw_weight, "CW WEIGHT", ep2_cwweight);
        chk_data((frame[4] >> 7) & 1, cw_spacing, "CW SPACING", ep2_cwspacing);

        // Set RX amplification factors.
        rxatt_dbl[1] = pow(10.0, -0.05 * (rx_att[1]));
        break;

    case 24:
    case 25:
        data = frame[1];
        data |= frame[2] << 8;
        chk_data((frame[2] << 8) | frame[1], c25_ext_board_i2c_data, "C25 EXT BOARD DATA", ep2_c25extboarddata);
        break;

    case 28:
    case 29:
        chk_data((frame[1] & 0x03) >> 0, rx_adc[0], "RX1 ADC", ep2_rx1adc);
        chk_data((frame[1] & 0x0C) >> 2, rx_adc[1], "RX2 ADC", ep2_rx2adc);
        chk_data((frame[1] & 0x30) >> 4, rx_adc[2], "RX3 ADC", ep2_rx3adc);
        chk_data((frame[1] & 0xC0) >> 6, rx_adc[3], "RX4 ADC", ep2_rx4adc);
        chk_data((frame[2] & 0x03) >> 0, rx_adc[4], "RX5 ADC", ep2_rx5adc);
        chk_data((frame[2] & 0x0C) >> 2, rx_adc[5], "RX6 ADC", ep2_rx6adc);
        chk_data((frame[2] & 0x30) >> 4, rx_adc[6], "RX7 ADC", ep2_rx7adc);
        chk_data((frame[3] & 0x1f), txatt, "TX ATT", ep2_txatt);
        txatt_dbl = pow(10.0, -0.05 * (double) txatt);
        if (OLDDEVICE == DEVICE_C25) {
            // RedPitaya: Hard-wired ADC settings.
            rx_adc[0] = 0;
            rx_adc[1] = 1;
            rx_adc[2] = 1;
        }
        break;

    case 30:
    case 31:
        chk_data(frame[1] & 1, cw_internal, "CW INT", ep2_cwint);
        chk_data(frame[2], sidetone_volume, "SIDE TONE VOLUME", ep2_sidetonevolume);
        chk_data(frame[3], cw_delay, "CW DELAY", ep2_cwdelay);
        cw_delay = frame[3];
        break;

    case 32:
    case 33:
        chk_data((frame[1] << 2) | (frame[2] & 3), cw_hang, "CW HANG", ep2_cwhang);
        chk_data((frame[3] << 4) | (frame[4] & 255), freq, "SIDE TONE FREQ", ep2_sidetonefreq);
        break;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %eax
movl %eax, %edx
andl $0x1, %edx
cmpl %edx, 0x18cef1b(%rip)   # 0x18d4a88
je 0x5b87
leaq 0x18cef12(%rip), %rsi   # 0x18d4a88
leaq 0x3e89(%rip), %rcx      # 0x9a06
movq %rbx, %rdi
callq 0x191a
movb (%rbx), %al
cmpb $0x21, %al
ja 0x6831
movzbl %al, %eax
leaq 0x3503(%rip), %rcx      # 0x909c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl 0x1(%rbx), %eax
movl %eax, %edx
andl $0x3, %edx
cmpl %edx, 0x75ab(%rip)      # 0xd15c
je 0x5bcc
leaq 0x75a2(%rip), %rsi      # 0xd15c
leaq 0x3c6f(%rip), %rcx      # 0x9830
movq %rbx, %rdi
callq 0x1b89
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x3, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x758b(%rip)      # 0xd168
je 0x5bf8
leaq 0x7582(%rip), %rsi      # 0xd168
leaq 0x3c4e(%rip), %rcx      # 0x983b
movq %rbx, %rdi
callq 0x196e
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x4, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x7563(%rip)      # 0xd16c
je 0x5c24
leaq 0x755a(%rip), %rsi      # 0xd16c
leaq 0x3c2b(%rip), %rcx      # 0x9844
movq %rbx, %rdi
callq 0x1bdd
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x5, %cl
andb $0x3, %cl
movzbl %cl, %edx
cmpl %edx, 0x753b(%rip)      # 0xd170
je 0x5c50
leaq 0x7532(%rip), %rsi      # 0xd170
leaq 0x3c0c(%rip), %rcx      # 0x9851
movq %rbx, %rdi
callq 0x18fe
movb 0x1(%rbx), %al
shrb $0x7, %al
movzbl %al, %edx
cmpl %edx, 0x7518(%rip)      # 0xd174
je 0x5c74
leaq 0x750f(%rip), %rsi      # 0xd174
leaq 0x3bfd(%rip), %rcx      # 0x9869
movq %rbx, %rdi
callq 0x18aa
movzbl 0x2(%rbx), %eax
movl %eax, %edx
andl $0x1, %edx
cmpl %edx, 0x74f5(%rip)      # 0xd178
je 0x5c9e
leaq 0x74ec(%rip), %rsi      # 0xd178
leaq 0x3be0(%rip), %rcx      # 0x9873
movq %rbx, %rdi
callq 0x1c4d
movb 0x2(%rbx), %al
shrb %al
movzbl %al, %edx
cmpl %edx, 0x74d3(%rip)      # 0xd17c
je 0x5cc1
leaq 0x74ca(%rip), %rsi      # 0xd17c
leaq 0x3bc5(%rip), %rcx      # 0x987e
movq %rbx, %rdi
callq 0x18c6
movzbl 0x4(%rbx), %eax
movl %eax, %edx
shrl $0x3, %edx
andl $0x7, %edx
incl %edx
cmpl %edx, 0x74ab(%rip)      # 0xd180
je 0x5cf0
leaq 0x74a2(%rip), %rsi      # 0xd180
leaq 0x3ba7(%rip), %rcx      # 0x988c
movq %rbx, %rdi
callq 0x1952
movb 0x4(%rbx), %al
movl %eax, %ecx
shrb $0x6, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x7483(%rip)      # 0xd184
je 0x5d1c
leaq 0x747a(%rip), %rsi      # 0xd184
leaq 0x3b85(%rip), %rcx      # 0x9896
movq %rbx, %rdi
callq 0x1bf9
movb 0x4(%rbx), %al
shrb $0x7, %al
movzbl %al, %edx
cmpl %edx, 0x7460(%rip)      # 0xd188
je 0x5d40
leaq 0x7457(%rip), %rsi      # 0xd188
leaq 0x3b6b(%rip), %rcx      # 0x98a3
movq %rbx, %rdi
callq 0x16ea
movb 0x3(%rbx), %al
movzbl %al, %r9d
movl %r9d, %edx
andl $0x3, %edx
xorl %esi, %esi
cmpl %edx, 0x7437(%rip)      # 0xd18c
je 0x5d60
pushq $0x1
popq %rsi
movl %edx, 0x742c(%rip)      # 0xd18c
movl %r9d, %ecx
shrl $0x2, %ecx
andl $0x1, %ecx
cmpl %ecx, 0x7421(%rip)      # 0xd190
je 0x5d7a
movl %ecx, 0x7419(%rip)      # 0xd190
pushq $0x1
popq %rsi
movl %r9d, %r8d
shrl $0x3, %r8d
andl $0x1, %r8d
cmpl %r8d, 0x7408(%rip)      # 0xd194
je 0x5d98
movl %r8d, 0x73ff(%rip)      # 0xd194
pushq $0x1
popq %rsi
shrl $0x4, %r9d
andl $0x1, %r9d
cmpl %r9d, 0x73f1(%rip)      # 0xd198
jne 0x66a6
testl %esi, %esi
jne 0x66ad
jmp 0x66c1
movzwl 0x1(%rbx), %edx
cmpl 0x74c8(%rip), %edx      # 0xd28c
je 0x6831
leaq 0x74bb(%rip), %rsi      # 0xd28c
leaq 0x3ce2(%rip), %rcx      # 0x9aba
movq %rbx, %rdi
popq %rbx
jmp 0x16ce
movzbl 0x1(%rbx), %edx
andl $0x1f, %edx
cmpl %edx, 0x73de(%rip)      # 0xd1cc
je 0x5e06
leaq 0x73d5(%rip), %rsi      # 0xd1cc
leaq 0x3c87(%rip), %rcx      # 0x9a85
movq %rbx, %rdi
callq 0x1a16
movzbl 0x2(%rbx), %edx
shrl $0x6, %edx
andl $0x1, %edx
cmpl %edx, 0x7462(%rip)      # 0xd278
je 0x5e2e
leaq 0x7459(%rip), %rsi      # 0xd278
leaq 0x3c67(%rip), %rcx      # 0x9a8d
movq %rbx, %rdi
callq 0x1776
movzbl 0x3(%rbx), %eax
movl %eax, %edx
andl $0x3f, %edx
cmpl %edx, 0x743f(%rip)      # 0xd27c
je 0x5e58
leaq 0x7436(%rip), %rsi      # 0xd27c
leaq 0x3c47(%rip), %rcx      # 0x9a94
movq %rbx, %rdi
callq 0x17ae
movb 0x3(%rbx), %al
shrb $0x6, %al
movzbl %al, %edx
cmpl %edx, 0x741c(%rip)      # 0xd280
je 0x5e7c
leaq 0x7413(%rip), %rsi      # 0xd280
leaq 0x3c29(%rip), %rcx      # 0x9a9d
movq %rbx, %rdi
callq 0x175a
movzbl 0x4(%rbx), %eax
movl %eax, %edx
andl $0x7f, %edx
cmpl %edx, 0x73f9(%rip)      # 0xd284
je 0x5ea6
leaq 0x73f0(%rip), %rsi      # 0xd284
leaq 0x3c0a(%rip), %rcx      # 0x9aa5
movq %rbx, %rdi
callq 0x17ca
movb 0x4(%rbx), %al
shrb $0x7, %al
movzbl %al, %edx
cmpl %edx, 0x73d6(%rip)      # 0xd288
je 0x680c
leaq 0x73c9(%rip), %rsi      # 0xd288
leaq 0x3be9(%rip), %rcx      # 0x9aaf
movq %rbx, %rdi
callq 0x1792
jmp 0x680c
movzbl 0x1(%rbx), %eax
movzbl 0x2(%rbx), %ecx
andl $0x3, %ecx
leal (%rcx,%rax,4), %edx
cmpl 0x73dd(%rip), %edx      # 0xd2c4
je 0x5eff
leaq 0x73d4(%rip), %rsi      # 0xd2c4
leaq 0x3c36(%rip), %rcx      # 0x9b2d
movq %rbx, %rdi
callq 0x1722
movzbl 0x3(%rbx), %eax
shll $0x4, %eax
movzbl 0x4(%rbx), %edx
orl %eax, %edx
cmpl 0x73b6(%rip), %edx      # 0xd2c8
je 0x6831
leaq 0x73a9(%rip), %rsi      # 0xd2c8
leaq 0x3c0f(%rip), %rcx      # 0x9b35
movq %rbx, %rdi
popq %rbx
jmp 0x1ba5
movzbl 0x1(%rbx), %edx
andl $0x1, %edx
cmpl %edx, 0x737c(%rip)      # 0xd2b8
je 0x5f54
leaq 0x7373(%rip), %rsi      # 0xd2b8
leaq 0x3bc0(%rip), %rcx      # 0x9b0c
movq %rbx, %rdi
callq 0x173e
movzbl 0x2(%rbx), %edx
cmpl %edx, 0x735e(%rip)      # 0xd2bc
je 0x5f76
leaq 0x7355(%rip), %rsi      # 0xd2bc
leaq 0x3ba5(%rip), %rcx      # 0x9b13
movq %rbx, %rdi
callq 0x1bc1
movzbl 0x3(%rbx), %edx
cmpl %edx, 0x7340(%rip)      # 0xd2c0
je 0x5f9c
leaq 0x7337(%rip), %rsi      # 0xd2c0
leaq 0x3b94(%rip), %rcx      # 0x9b24
movq %rbx, %rdi
callq 0x1706
movzbl 0x3(%rbx), %edx
movl %edx, 0x731e(%rip)      # 0xd2c0
jmp 0x6831
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x7242(%rip)      # 0xd1f8
je 0x6831
leaq 0x7235(%rip), %rsi      # 0xd1f8
leaq 0x3960(%rip), %rcx      # 0x992a
movq %rbx, %rdi
popq %rbx
jmp 0x1b15
movzbl 0x1(%rbx), %eax
movl %eax, %edx
andl $0x3, %edx
cmpl %edx, 0x72ae(%rip)      # 0xd290
je 0x5ffd
leaq 0x72a5(%rip), %rsi      # 0xd290
leaq 0x3adb(%rip), %rcx      # 0x9acd
movq %rbx, %rdi
callq 0x198a
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x2, %cl
andb $0x3, %cl
movzbl %cl, %edx
cmpl %edx, 0x7286(%rip)      # 0xd294
je 0x6029
leaq 0x727d(%rip), %rsi      # 0xd294
leaq 0x3ab7(%rip), %rcx      # 0x9ad5
movq %rbx, %rdi
callq 0x19fa
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x4, %cl
andb $0x3, %cl
movzbl %cl, %edx
cmpl %edx, 0x725e(%rip)      # 0xd298
je 0x6055
leaq 0x7255(%rip), %rsi      # 0xd298
leaq 0x3a93(%rip), %rcx      # 0x9add
movq %rbx, %rdi
callq 0x1a32
movb 0x1(%rbx), %al
shrb $0x6, %al
movzbl %al, %edx
cmpl %edx, 0x723b(%rip)      # 0xd29c
je 0x6079
leaq 0x7232(%rip), %rsi      # 0xd29c
leaq 0x3a74(%rip), %rcx      # 0x9ae5
movq %rbx, %rdi
callq 0x1a4e
movzbl 0x2(%rbx), %eax
movl %eax, %edx
andl $0x3, %edx
cmpl %edx, 0x7218(%rip)      # 0xd2a0
je 0x60a3
leaq 0x720f(%rip), %rsi      # 0xd2a0
leaq 0x3a55(%rip), %rcx      # 0x9aed
movq %rbx, %rdi
callq 0x1a6a
movb 0x2(%rbx), %al
movl %eax, %ecx
shrb $0x2, %cl
andb $0x3, %cl
movzbl %cl, %edx
cmpl %edx, 0x71f0(%rip)      # 0xd2a4
je 0x60cf
leaq 0x71e7(%rip), %rsi      # 0xd2a4
leaq 0x3a31(%rip), %rcx      # 0x9af5
movq %rbx, %rdi
callq 0x1a86
movb 0x2(%rbx), %al
shrb $0x4, %al
andb $0x3, %al
movzbl %al, %edx
cmpl %edx, 0x71cb(%rip)      # 0xd2a8
je 0x60f5
leaq 0x71c2(%rip), %rsi      # 0xd2a8
leaq 0x3a10(%rip), %rcx      # 0x9afd
movq %rbx, %rdi
callq 0x1aa2
movzbl 0x3(%rbx), %edx
andl $0x1f, %edx
cmpl %edx, 0x18ce98e(%rip)   # 0x18d4a90
je 0x6120
leaq 0x18ce985(%rip), %rsi   # 0x18d4a90
leaq 0x39f3(%rip), %rcx      # 0x9b05
movq %rbx, %rdi
callq 0x1c31
movl 0x18ce970(%rip), %edx   # 0x18d4a90
cvtsi2sd %edx, %xmm1
mulsd 0x1f54(%rip), %xmm1     # 0x8080
movsd 0x1f54(%rip), %xmm0     # 0x8088
callq 0x10a0
movsd %xmm0, 0x716f(%rip)     # 0xd2b0
cmpl $0x64, 0x74cc(%rip)     # 0xd614
jne 0x6831
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x7131(%rip)      # 0xd290
movl $0x1, 0x712f(%rip)      # 0xd298
jmp 0x6831
movzbl 0x1(%rbx), %edx
cmpl %edx, 0x18ce914(%rip)   # 0x18d4a8c
je 0x6190
leaq 0x18ce90b(%rip), %rsi   # 0x18d4a8c
leaq 0x37c6(%rip), %rcx      # 0x994e
movq %rbx, %rdi
callq 0x1c69
movzbl 0x2(%rbx), %eax
movl %eax, %edx
andl $0x3f, %edx
cmpl %edx, 0x7079(%rip)      # 0xd218
je 0x61ba
leaq 0x7070(%rip), %rsi      # 0xd218
leaq 0x37a8(%rip), %rcx      # 0x9957
movq %rbx, %rdi
callq 0x17e6
movb 0x2(%rbx), %al
movl %eax, %ecx
shrb $0x6, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x7051(%rip)      # 0xd21c
je 0x61e6
leaq 0x7048(%rip), %rsi      # 0xd21c
leaq 0x378a(%rip), %rcx      # 0x9965
movq %rbx, %rdi
callq 0x1696
movb 0x2(%rbx), %al
shrb $0x7, %al
movzbl %al, %edx
cmpl %edx, 0x702e(%rip)      # 0xd220
je 0x620a
leaq 0x7025(%rip), %rsi      # 0xd220
leaq 0x3777(%rip), %rcx      # 0x9979
movq %rbx, %rdi
callq 0x1ca2
movzbl 0x3(%rbx), %eax
movl %eax, %edx
andl $0x1f, %edx
cmpl %edx, 0x700b(%rip)      # 0xd224
je 0x6234
leaq 0x7002(%rip), %rsi      # 0xd224
leaq 0x3759(%rip), %rcx      # 0x9982
movq %rbx, %rdi
callq 0x165e
movb 0x3(%rbx), %al
movl %eax, %ecx
shrb $0x5, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x6fe3(%rip)      # 0xd228
je 0x6260
leaq 0x6fda(%rip), %rsi      # 0xd228
leaq 0x3736(%rip), %rcx      # 0x998b
movq %rbx, %rdi
callq 0x1642
movb 0x3(%rbx), %al
movl %eax, %ecx
shrb $0x6, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x6fbb(%rip)      # 0xd22c
je 0x628c
leaq 0x6fb2(%rip), %rsi      # 0xd22c
leaq 0x371b(%rip), %rcx      # 0x999c
movq %rbx, %rdi
callq 0x1626
movb 0x3(%rbx), %al
shrb $0x7, %al
movzbl %al, %edx
cmpl %edx, 0x6f98(%rip)      # 0xd230
je 0x62b0
leaq 0x6f8f(%rip), %rsi      # 0xd230
leaq 0x3700(%rip), %rcx      # 0x99a8
movq %rbx, %rdi
callq 0x16b2
movzbl 0x4(%rbx), %edx
cmpl %edx, 0x6f7a(%rip)      # 0xd234
je 0x62d2
leaq 0x6f71(%rip), %rsi      # 0xd234
leaq 0x36ef(%rip), %rcx      # 0x99b9
movq %rbx, %rdi
callq 0x167a
cvtsi2sdl 0x18ce7b2(%rip), %xmm0 # 0x18d4a8c
mulsd 0x2d16(%rip), %xmm0     # 0x8ff8
movsd %xmm0, 0x6e76(%rip)     # 0xd160
jmp 0x6831
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x6ed2(%rip)      # 0xd1d0
je 0x6831
leaq 0x6ec5(%rip), %rsi      # 0xd1d0
leaq 0x35f5(%rip), %rcx      # 0x9907
movq %rbx, %rdi
popq %rbx
jmp 0x1c85
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x6ebe(%rip)      # 0xd1e8
je 0x6831
leaq 0x6eb1(%rip), %rsi      # 0xd1e8
leaq 0x35da(%rip), %rcx      # 0x9918
movq %rbx, %rdi
popq %rbx
jmp 0x1adb
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x6eaa(%rip)      # 0xd200
je 0x6831
leaq 0x6e9d(%rip), %rsi      # 0xd200
leaq 0x35c9(%rip), %rcx      # 0x9933
movq %rbx, %rdi
popq %rbx
jmp 0x1b32
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x6e5e(%rip)      # 0xd1e0
je 0x6831
leaq 0x6e51(%rip), %rsi      # 0xd1e0
leaq 0x3579(%rip), %rcx      # 0x990f
movq %rbx, %rdi
popq %rbx
jmp 0x1abe
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x6e42(%rip)      # 0xd1f0
je 0x6831
leaq 0x6e35(%rip), %rsi      # 0xd1f0
leaq 0x355f(%rip), %rcx      # 0x9921
movq %rbx, %rdi
popq %rbx
jmp 0x1af8
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x6e2e(%rip)      # 0xd208
je 0x6831
leaq 0x6e21(%rip), %rsi      # 0xd208
leaq 0x354e(%rip), %rcx      # 0x993c
movq %rbx, %rdi
popq %rbx
jmp 0x1b4f
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x6e0a(%rip)      # 0xd210
je 0x6831
leaq 0x6dfd(%rip), %rsi      # 0xd210
leaq 0x352b(%rip), %rcx      # 0x9945
movq %rbx, %rdi
popq %rbx
jmp 0x1b6c
movzbl 0x1(%rbx), %eax
movl %eax, %edx
andl $0x1, %edx
cmpl %edx, 0x6e0e(%rip)      # 0xd240
je 0x644d
leaq 0x6e05(%rip), %rsi      # 0xd240
leaq 0x3580(%rip), %rcx      # 0x99c2
movq %rbx, %rdi
callq 0x15b6
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x6de7(%rip)      # 0xd244
je 0x6478
leaq 0x6dde(%rip), %rsi      # 0xd244
leaq 0x3561(%rip), %rcx      # 0x99ce
movq %rbx, %rdi
callq 0x15d2
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x2, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x6dbf(%rip)      # 0xd248
je 0x64a4
leaq 0x6db6(%rip), %rsi      # 0xd248
leaq 0x3541(%rip), %rcx      # 0x99da
movq %rbx, %rdi
callq 0x15ee
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x3, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x6d97(%rip)      # 0xd24c
je 0x64d0
leaq 0x6d8e(%rip), %rsi      # 0xd24c
leaq 0x3521(%rip), %rcx      # 0x99e6
movq %rbx, %rdi
callq 0x160a
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x4, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x6d6f(%rip)      # 0xd250
je 0x64fc
leaq 0x6d66(%rip), %rsi      # 0xd250
leaq 0x3501(%rip), %rcx      # 0x99f2
movq %rbx, %rdi
callq 0x1c15
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x5, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x6d47(%rip)      # 0xd254
je 0x6528
leaq 0x6d3e(%rip), %rsi      # 0xd254
leaq 0x34de(%rip), %rcx      # 0x99fb
movq %rbx, %rdi
callq 0x1872
movb 0x1(%rbx), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %edx
cmpl %edx, 0x6d22(%rip)      # 0xd258
je 0x654e
leaq 0x6d19(%rip), %rsi      # 0xd258
leaq 0x34bd(%rip), %rcx      # 0x9a03
movq %rbx, %rdi
callq 0x188e
movzbl 0x2(%rbx), %eax
movl %eax, %edx
andl $0x1f, %edx
cmpl %edx, 0x6cff(%rip)      # 0xd25c
je 0x6578
leaq 0x6cf6(%rip), %rsi      # 0xd25c
leaq 0x349d(%rip), %rcx      # 0x9a0a
movq %rbx, %rdi
callq 0x1802
movb 0x2(%rbx), %al
movl %eax, %ecx
shrb $0x5, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x6cd7(%rip)      # 0xd260
je 0x65a4
leaq 0x6cce(%rip), %rsi      # 0xd260
leaq 0x347a(%rip), %rcx      # 0x9a13
movq %rbx, %rdi
callq 0x181e
movb 0x2(%rbx), %al
movl %eax, %ecx
shrb $0x6, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x6caf(%rip)      # 0xd264
je 0x65d0
leaq 0x6ca6(%rip), %rsi      # 0xd264
leaq 0x3462(%rip), %rcx      # 0x9a27
movq %rbx, %rdi
callq 0x1936
movb 0x2(%rbx), %al
shrb $0x7, %al
movzbl %al, %edx
cmpl %edx, 0x6c8c(%rip)      # 0xd268
je 0x65f4
leaq 0x6c83(%rip), %rsi      # 0xd268
leaq 0x3446(%rip), %rcx      # 0x9a32
movq %rbx, %rdi
callq 0x18e2
movzbl 0x3(%rbx), %eax
movl %eax, %edx
andl $0xf, %edx
cmpl %edx, 0x6c69(%rip)      # 0xd26c
je 0x661e
leaq 0x6c60(%rip), %rsi      # 0xd26c
leaq 0x342e(%rip), %rcx      # 0x9a41
movq %rbx, %rdi
callq 0x1856
movb 0x3(%rbx), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %edx
cmpl %edx, 0x6c44(%rip)      # 0xd270
je 0x6644
leaq 0x6c3b(%rip), %rsi      # 0xd270
leaq 0x340e(%rip), %rcx      # 0x9a4a
movq %rbx, %rdi
callq 0x183a
movb 0x4(%rbx), %al
movzbl %al, %edx
testb $0x40, %dl
jne 0x67ad
andl $0x1f, %edx
cmpl 0x6b6c(%rip), %edx      # 0xd1c8
je 0x6677
leaq 0x6b63(%rip), %rsi      # 0xd1c8
leaq 0x3402(%rip), %rcx      # 0x9a6e
movq %rbx, %rdi
callq 0x19c2
movb 0x4(%rbx), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %edx
cmpl %edx, 0x6bef(%rip)      # 0xd274
je 0x67d5
leaq 0x6be2(%rip), %rsi      # 0xd274
leaq 0x33dd(%rip), %rcx      # 0x9a76
movq %rbx, %rdi
callq 0x19a6
jmp 0x67d5
movl %r9d, 0x6aeb(%rip)      # 0xd198
leaq 0x3203(%rip), %rsi      # 0x98b7
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x131a
movb 0x3(%rbx), %al
movl %eax, %ecx
shrb $0x5, %cl
andb $0x3, %cl
movzbl %cl, %ecx
xorl %esi, %esi
cmpl %ecx, 0x6ac8(%rip)      # 0xd19c
je 0x66df
movl %ecx, 0x6ac0(%rip)      # 0xd19c
pushq $0x1
popq %rsi
shrb $0x7, %al
movzbl %al, %edx
cmpl %edx, 0x6ab5(%rip)      # 0xd1a0
je 0x66f6
movl %edx, 0x6aad(%rip)      # 0xd1a0
pushq $0x1
popq %rsi
movzbl 0x4(%rbx), %r9d
movl %r9d, %r8d
andl $0x3, %r8d
cmpl %r8d, 0x6a9b(%rip)      # 0xd1a4
je 0x6715
movl %r8d, 0x6a92(%rip)      # 0xd1a4
pushq $0x1
popq %rsi
shrl $0x2, %r9d
andl $0x1, %r9d
cmpl %r9d, 0x6a84(%rip)      # 0xd1a8
jne 0x672c
testl %esi, %esi
jne 0x6733
jmp 0x6744
movl %r9d, 0x6a75(%rip)      # 0xd1a8
leaq 0x31a7(%rip), %rsi      # 0x98e1
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x131a
cmpl $0x64, 0x6ec9(%rip)     # 0xd614
movl 0x6a3b(%rip), %eax      # 0xd18c
jne 0x676d
imull $0xc, %eax, %eax
movl 0x6a34(%rip), %ecx      # 0xd190
addl 0x6a32(%rip), %ecx      # 0xd194
imull $-0x12, %ecx, %ecx
addl %eax, %ecx
cvtsi2sd %ecx, %xmm1
jmp 0x677a
imull $0xa, %eax, %eax
addl 0x6a52(%rip), %eax      # 0xd1c8
cvtsi2sd %eax, %xmm1
mulsd 0x18fe(%rip), %xmm1     # 0x8080
movsd 0x18fe(%rip), %xmm0     # 0x8088
callq 0x10a0
movsd %xmm0, 0x6a19(%rip)     # 0xd1b0
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x6a18(%rip)      # 0xd1c0
jmp 0x6831
andl $0x3f, %edx
pushq $0x25
popq %rax
subl %edx, %eax
cmpl 0x6a0d(%rip), %eax      # 0xd1c8
je 0x67d5
leaq 0x6a04(%rip), %rsi      # 0xd1c8
leaq 0x3293(%rip), %rcx      # 0x9a5e
movq %rbx, %rdi
movl %eax, %edx
callq 0x19de
cmpl $0x64, 0x6e38(%rip)     # 0xd614
je 0x6831
imull $0xa, 0x69a7(%rip), %eax # 0xd18c
addl 0x69dd(%rip), %eax      # 0xd1c8
cvtsi2sd %eax, %xmm1
mulsd 0x1889(%rip), %xmm1     # 0x8080
movsd 0x1889(%rip), %xmm0     # 0x8088
callq 0x10a0
movsd %xmm0, 0x69a4(%rip)     # 0xd1b0
cvtsi2sdl 0x69b8(%rip), %xmm1 # 0xd1cc
mulsd 0x1864(%rip), %xmm1     # 0x8080
movsd 0x1864(%rip), %xmm0     # 0x8088
callq 0x10a0
movsd %xmm0, 0x698f(%rip)     # 0xd1c0
popq %rbx
retq