// File: /workspace/github_c_makefile_star2_O3/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, 0x18cdafa(%rip)   # 0x18d3a88
je 0x5fa8
leaq 0x18cdaf1(%rip), %rsi   # 0x18d3a88
leaq 0x3a48(%rip), %rcx      # 0x99e6
movq %rbx, %rdi
callq 0x199b
movb (%rbx), %al
cmpb $0x21, %al
ja 0x6c8e
movzbl %al, %eax
leaq 0x30c2(%rip), %rcx      # 0x907c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl 0x1(%rbx), %eax
movl %eax, %edx
andl $0x3, %edx
cmpl %edx, 0x618a(%rip)      # 0xc15c
je 0x5fed
leaq 0x6181(%rip), %rsi      # 0xc15c
leaq 0x382e(%rip), %rcx      # 0x9810
movq %rbx, %rdi
callq 0x1c36
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x3, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x616a(%rip)      # 0xc168
je 0x6019
leaq 0x6161(%rip), %rsi      # 0xc168
leaq 0x380d(%rip), %rcx      # 0x981b
movq %rbx, %rdi
callq 0x19f5
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x4, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x6142(%rip)      # 0xc16c
je 0x6045
leaq 0x6139(%rip), %rsi      # 0xc16c
leaq 0x37ea(%rip), %rcx      # 0x9824
movq %rbx, %rdi
callq 0x1c90
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x5, %cl
andb $0x3, %cl
movzbl %cl, %edx
cmpl %edx, 0x611a(%rip)      # 0xc170
je 0x6071
leaq 0x6111(%rip), %rsi      # 0xc170
leaq 0x37cb(%rip), %rcx      # 0x9831
movq %rbx, %rdi
callq 0x197d
movb 0x1(%rbx), %al
shrb $0x7, %al
movzbl %al, %edx
cmpl %edx, 0x60f7(%rip)      # 0xc174
je 0x6095
leaq 0x60ee(%rip), %rsi      # 0xc174
leaq 0x37bc(%rip), %rcx      # 0x9849
movq %rbx, %rdi
callq 0x1923
movzbl 0x2(%rbx), %eax
movl %eax, %edx
andl $0x1, %edx
cmpl %edx, 0x60d4(%rip)      # 0xc178
je 0x60bf
leaq 0x60cb(%rip), %rsi      # 0xc178
leaq 0x379f(%rip), %rcx      # 0x9853
movq %rbx, %rdi
callq 0x1d08
movb 0x2(%rbx), %al
shrb %al
movzbl %al, %edx
cmpl %edx, 0x60b2(%rip)      # 0xc17c
je 0x60e2
leaq 0x60a9(%rip), %rsi      # 0xc17c
leaq 0x3784(%rip), %rcx      # 0x985e
movq %rbx, %rdi
callq 0x1941
movzbl 0x4(%rbx), %eax
movl %eax, %edx
shrl $0x3, %edx
andl $0x7, %edx
incl %edx
cmpl %edx, 0x608a(%rip)      # 0xc180
je 0x6111
leaq 0x6081(%rip), %rsi      # 0xc180
leaq 0x3766(%rip), %rcx      # 0x986c
movq %rbx, %rdi
callq 0x19d7
movb 0x4(%rbx), %al
movl %eax, %ecx
shrb $0x6, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x6062(%rip)      # 0xc184
je 0x613d
leaq 0x6059(%rip), %rsi      # 0xc184
leaq 0x3744(%rip), %rcx      # 0x9876
movq %rbx, %rdi
callq 0x1cae
movb 0x4(%rbx), %al
shrb $0x7, %al
movzbl %al, %edx
cmpl %edx, 0x603f(%rip)      # 0xc188
je 0x6161
leaq 0x6036(%rip), %rsi      # 0xc188
leaq 0x372a(%rip), %rcx      # 0x9883
movq %rbx, %rdi
callq 0x1743
movb 0x3(%rbx), %al
movzbl %al, %r9d
movl %r9d, %edx
andl $0x3, %edx
xorl %esi, %esi
cmpl %edx, 0x6016(%rip)      # 0xc18c
je 0x6183
movl %edx, 0x600e(%rip)      # 0xc18c
movl $0x1, %esi
movl %r9d, %ecx
shrl $0x2, %ecx
andl $0x1, %ecx
cmpl %ecx, 0x5ffe(%rip)      # 0xc190
je 0x619f
movl %ecx, 0x5ff6(%rip)      # 0xc190
movl $0x1, %esi
movl %r9d, %r8d
shrl $0x3, %r8d
andl $0x1, %r8d
cmpl %r8d, 0x5fe3(%rip)      # 0xc194
jne 0x6ac5
shrl $0x4, %r9d
andl $0x1, %r9d
cmpl %r9d, 0x5fd2(%rip)      # 0xc198
jne 0x6add
testl %esi, %esi
jne 0x6ae4
jmp 0x6afa
movzwl 0x1(%rbx), %edx
cmpl 0x60a9(%rip), %edx      # 0xc28c
je 0x6c8e
leaq 0x609c(%rip), %rsi      # 0xc28c
leaq 0x38a3(%rip), %rcx      # 0x9a9a
movq %rbx, %rdi
popq %rbx
jmp 0x1725
movzbl 0x1(%rbx), %edx
andl $0x1f, %edx
cmpl %edx, 0x5fbf(%rip)      # 0xc1cc
je 0x6225
leaq 0x5fb6(%rip), %rsi      # 0xc1cc
leaq 0x3848(%rip), %rcx      # 0x9a65
movq %rbx, %rdi
callq 0x1aa9
movzbl 0x2(%rbx), %edx
shrl $0x6, %edx
andl $0x1, %edx
cmpl %edx, 0x6043(%rip)      # 0xc278
je 0x624d
leaq 0x603a(%rip), %rsi      # 0xc278
leaq 0x3828(%rip), %rcx      # 0x9a6d
movq %rbx, %rdi
callq 0x17d9
movzbl 0x3(%rbx), %eax
movl %eax, %edx
andl $0x3f, %edx
cmpl %edx, 0x6020(%rip)      # 0xc27c
je 0x6277
leaq 0x6017(%rip), %rsi      # 0xc27c
leaq 0x3808(%rip), %rcx      # 0x9a74
movq %rbx, %rdi
callq 0x1815
movb 0x3(%rbx), %al
shrb $0x6, %al
movzbl %al, %edx
cmpl %edx, 0x5ffd(%rip)      # 0xc280
je 0x629b
leaq 0x5ff4(%rip), %rsi      # 0xc280
leaq 0x37ea(%rip), %rcx      # 0x9a7d
movq %rbx, %rdi
callq 0x17bb
movzbl 0x4(%rbx), %eax
movl %eax, %edx
andl $0x7f, %edx
cmpl %edx, 0x5fda(%rip)      # 0xc284
je 0x62c5
leaq 0x5fd1(%rip), %rsi      # 0xc284
leaq 0x37cb(%rip), %rcx      # 0x9a85
movq %rbx, %rdi
callq 0x1833
movb 0x4(%rbx), %al
shrb $0x7, %al
movzbl %al, %edx
cmpl %edx, 0x5fb7(%rip)      # 0xc288
je 0x6c66
leaq 0x5faa(%rip), %rsi      # 0xc288
leaq 0x37aa(%rip), %rcx      # 0x9a8f
movq %rbx, %rdi
callq 0x17f7
jmp 0x6c66
movzbl 0x1(%rbx), %eax
movzbl 0x2(%rbx), %ecx
andl $0x3, %ecx
leal (%rcx,%rax,4), %edx
cmpl 0x5fbe(%rip), %edx      # 0xc2c4
je 0x631e
leaq 0x5fb5(%rip), %rsi      # 0xc2c4
leaq 0x37f7(%rip), %rcx      # 0x9b0d
movq %rbx, %rdi
callq 0x177f
movzbl 0x3(%rbx), %eax
shll $0x4, %eax
movzbl 0x4(%rbx), %edx
orl %eax, %edx
cmpl 0x5f97(%rip), %edx      # 0xc2c8
je 0x6c8e
leaq 0x5f8a(%rip), %rsi      # 0xc2c8
leaq 0x37d0(%rip), %rcx      # 0x9b15
movq %rbx, %rdi
popq %rbx
jmp 0x1c54
movzbl 0x1(%rbx), %edx
andl $0x1, %edx
cmpl %edx, 0x5f5d(%rip)      # 0xc2b8
je 0x6373
leaq 0x5f54(%rip), %rsi      # 0xc2b8
leaq 0x3781(%rip), %rcx      # 0x9aec
movq %rbx, %rdi
callq 0x179d
movzbl 0x2(%rbx), %edx
cmpl %edx, 0x5f3f(%rip)      # 0xc2bc
je 0x6395
leaq 0x5f36(%rip), %rsi      # 0xc2bc
leaq 0x3766(%rip), %rcx      # 0x9af3
movq %rbx, %rdi
callq 0x1c72
movzbl 0x3(%rbx), %edx
cmpl %edx, 0x5f21(%rip)      # 0xc2c0
je 0x63bb
leaq 0x5f18(%rip), %rsi      # 0xc2c0
leaq 0x3755(%rip), %rcx      # 0x9b04
movq %rbx, %rdi
callq 0x1761
movzbl 0x3(%rbx), %edx
movl %edx, 0x5eff(%rip)      # 0xc2c0
jmp 0x6c8e
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x5e23(%rip)      # 0xc1f8
je 0x6c8e
leaq 0x5e16(%rip), %rsi      # 0xc1f8
leaq 0x3521(%rip), %rcx      # 0x990a
movq %rbx, %rdi
popq %rbx
jmp 0x1bba
movzbl 0x1(%rbx), %eax
movl %eax, %edx
andl $0x3, %edx
cmpl %edx, 0x5e8f(%rip)      # 0xc290
je 0x641c
leaq 0x5e86(%rip), %rsi      # 0xc290
leaq 0x369c(%rip), %rcx      # 0x9aad
movq %rbx, %rdi
callq 0x1a13
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x2, %cl
andb $0x3, %cl
movzbl %cl, %edx
cmpl %edx, 0x5e67(%rip)      # 0xc294
je 0x6448
leaq 0x5e5e(%rip), %rsi      # 0xc294
leaq 0x3678(%rip), %rcx      # 0x9ab5
movq %rbx, %rdi
callq 0x1a8b
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x4, %cl
andb $0x3, %cl
movzbl %cl, %edx
cmpl %edx, 0x5e3f(%rip)      # 0xc298
je 0x6474
leaq 0x5e36(%rip), %rsi      # 0xc298
leaq 0x3654(%rip), %rcx      # 0x9abd
movq %rbx, %rdi
callq 0x1ac7
movb 0x1(%rbx), %al
shrb $0x6, %al
movzbl %al, %edx
cmpl %edx, 0x5e1c(%rip)      # 0xc29c
je 0x6498
leaq 0x5e13(%rip), %rsi      # 0xc29c
leaq 0x3635(%rip), %rcx      # 0x9ac5
movq %rbx, %rdi
callq 0x1ae5
movzbl 0x2(%rbx), %eax
movl %eax, %edx
andl $0x3, %edx
cmpl %edx, 0x5df9(%rip)      # 0xc2a0
je 0x64c2
leaq 0x5df0(%rip), %rsi      # 0xc2a0
leaq 0x3616(%rip), %rcx      # 0x9acd
movq %rbx, %rdi
callq 0x1b03
movb 0x2(%rbx), %al
movl %eax, %ecx
shrb $0x2, %cl
andb $0x3, %cl
movzbl %cl, %edx
cmpl %edx, 0x5dd1(%rip)      # 0xc2a4
je 0x64ee
leaq 0x5dc8(%rip), %rsi      # 0xc2a4
leaq 0x35f2(%rip), %rcx      # 0x9ad5
movq %rbx, %rdi
callq 0x1b21
movb 0x2(%rbx), %al
shrb $0x4, %al
andb $0x3, %al
movzbl %al, %edx
cmpl %edx, 0x5dac(%rip)      # 0xc2a8
je 0x6514
leaq 0x5da3(%rip), %rsi      # 0xc2a8
leaq 0x35d1(%rip), %rcx      # 0x9add
movq %rbx, %rdi
callq 0x1b3f
movzbl 0x3(%rbx), %edx
andl $0x1f, %edx
cmpl %edx, 0x18cd56f(%rip)   # 0x18d3a90
je 0x653f
leaq 0x18cd566(%rip), %rsi   # 0x18d3a90
leaq 0x35b4(%rip), %rcx      # 0x9ae5
movq %rbx, %rdi
callq 0x1cea
movl 0x18cd551(%rip), %edx   # 0x18d3a90
cvtsi2sd %edx, %xmm1
mulsd 0x1b25(%rip), %xmm1     # 0x8070
movsd 0x1b25(%rip), %xmm0     # 0x8078
callq 0x10a0
movsd %xmm0, 0x5d50(%rip)     # 0xc2b0
cmpl $0x64, 0x60ad(%rip)     # 0xc614
jne 0x6c8e
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x5d12(%rip)      # 0xc290
movl $0x1, 0x5d10(%rip)      # 0xc298
jmp 0x6c8e
movzbl 0x1(%rbx), %edx
cmpl %edx, 0x18cd4f5(%rip)   # 0x18d3a8c
je 0x65af
leaq 0x18cd4ec(%rip), %rsi   # 0x18d3a8c
leaq 0x3387(%rip), %rcx      # 0x992e
movq %rbx, %rdi
callq 0x1d26
movzbl 0x2(%rbx), %eax
movl %eax, %edx
andl $0x3f, %edx
cmpl %edx, 0x5c5a(%rip)      # 0xc218
je 0x65d9
leaq 0x5c51(%rip), %rsi      # 0xc218
leaq 0x3369(%rip), %rcx      # 0x9937
movq %rbx, %rdi
callq 0x1851
movb 0x2(%rbx), %al
movl %eax, %ecx
shrb $0x6, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x5c32(%rip)      # 0xc21c
je 0x6605
leaq 0x5c29(%rip), %rsi      # 0xc21c
leaq 0x334b(%rip), %rcx      # 0x9945
movq %rbx, %rdi
callq 0x16e9
movb 0x2(%rbx), %al
shrb $0x7, %al
movzbl %al, %edx
cmpl %edx, 0x5c0f(%rip)      # 0xc220
je 0x6629
leaq 0x5c06(%rip), %rsi      # 0xc220
leaq 0x3338(%rip), %rcx      # 0x9959
movq %rbx, %rdi
callq 0x1d63
movzbl 0x3(%rbx), %eax
movl %eax, %edx
andl $0x1f, %edx
cmpl %edx, 0x5bec(%rip)      # 0xc224
je 0x6653
leaq 0x5be3(%rip), %rsi      # 0xc224
leaq 0x331a(%rip), %rcx      # 0x9962
movq %rbx, %rdi
callq 0x16ad
movb 0x3(%rbx), %al
movl %eax, %ecx
shrb $0x5, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x5bc4(%rip)      # 0xc228
je 0x667f
leaq 0x5bbb(%rip), %rsi      # 0xc228
leaq 0x32f7(%rip), %rcx      # 0x996b
movq %rbx, %rdi
callq 0x168f
movb 0x3(%rbx), %al
movl %eax, %ecx
shrb $0x6, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x5b9c(%rip)      # 0xc22c
je 0x66ab
leaq 0x5b93(%rip), %rsi      # 0xc22c
leaq 0x32dc(%rip), %rcx      # 0x997c
movq %rbx, %rdi
callq 0x1671
movb 0x3(%rbx), %al
shrb $0x7, %al
movzbl %al, %edx
cmpl %edx, 0x5b79(%rip)      # 0xc230
je 0x66cf
leaq 0x5b70(%rip), %rsi      # 0xc230
leaq 0x32c1(%rip), %rcx      # 0x9988
movq %rbx, %rdi
callq 0x1707
movzbl 0x4(%rbx), %edx
cmpl %edx, 0x5b5b(%rip)      # 0xc234
je 0x66f1
leaq 0x5b52(%rip), %rsi      # 0xc234
leaq 0x32b0(%rip), %rcx      # 0x9999
movq %rbx, %rdi
callq 0x16cb
cvtsi2sdl 0x18cd393(%rip), %xmm0 # 0x18d3a8c
mulsd 0x28ef(%rip), %xmm0     # 0x8ff0
movsd %xmm0, 0x5a57(%rip)     # 0xc160
jmp 0x6c8e
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x5ab3(%rip)      # 0xc1d0
je 0x6c8e
leaq 0x5aa6(%rip), %rsi      # 0xc1d0
leaq 0x31b6(%rip), %rcx      # 0x98e7
movq %rbx, %rdi
popq %rbx
jmp 0x1d44
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x5a9f(%rip)      # 0xc1e8
je 0x6c8e
leaq 0x5a92(%rip), %rsi      # 0xc1e8
leaq 0x319b(%rip), %rcx      # 0x98f8
movq %rbx, %rdi
popq %rbx
jmp 0x1b7c
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x5a8b(%rip)      # 0xc200
je 0x6c8e
leaq 0x5a7e(%rip), %rsi      # 0xc200
leaq 0x318a(%rip), %rcx      # 0x9913
movq %rbx, %rdi
popq %rbx
jmp 0x1bd9
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x5a3f(%rip)      # 0xc1e0
je 0x6c8e
leaq 0x5a32(%rip), %rsi      # 0xc1e0
leaq 0x313a(%rip), %rcx      # 0x98ef
movq %rbx, %rdi
popq %rbx
jmp 0x1b5d
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x5a23(%rip)      # 0xc1f0
je 0x6c8e
leaq 0x5a16(%rip), %rsi      # 0xc1f0
leaq 0x3120(%rip), %rcx      # 0x9901
movq %rbx, %rdi
popq %rbx
jmp 0x1b9b
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x5a0f(%rip)      # 0xc208
je 0x6c8e
leaq 0x5a02(%rip), %rsi      # 0xc208
leaq 0x310f(%rip), %rcx      # 0x991c
movq %rbx, %rdi
popq %rbx
jmp 0x1bf8
movl 0x1(%rbx), %edx
bswapl %edx
movslq %edx, %rax
cmpq %rax, 0x59eb(%rip)      # 0xc210
je 0x6c8e
leaq 0x59de(%rip), %rsi      # 0xc210
leaq 0x30ec(%rip), %rcx      # 0x9925
movq %rbx, %rdi
popq %rbx
jmp 0x1c17
movzbl 0x1(%rbx), %eax
movl %eax, %edx
andl $0x1, %edx
cmpl %edx, 0x59ef(%rip)      # 0xc240
je 0x686c
leaq 0x59e6(%rip), %rsi      # 0xc240
leaq 0x3141(%rip), %rcx      # 0x99a2
movq %rbx, %rdi
callq 0x15f9
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x59c8(%rip)      # 0xc244
je 0x6897
leaq 0x59bf(%rip), %rsi      # 0xc244
leaq 0x3122(%rip), %rcx      # 0x99ae
movq %rbx, %rdi
callq 0x1617
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x2, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x59a0(%rip)      # 0xc248
je 0x68c3
leaq 0x5997(%rip), %rsi      # 0xc248
leaq 0x3102(%rip), %rcx      # 0x99ba
movq %rbx, %rdi
callq 0x1635
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x3, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x5978(%rip)      # 0xc24c
je 0x68ef
leaq 0x596f(%rip), %rsi      # 0xc24c
leaq 0x30e2(%rip), %rcx      # 0x99c6
movq %rbx, %rdi
callq 0x1653
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x4, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x5950(%rip)      # 0xc250
je 0x691b
leaq 0x5947(%rip), %rsi      # 0xc250
leaq 0x30c2(%rip), %rcx      # 0x99d2
movq %rbx, %rdi
callq 0x1ccc
movb 0x1(%rbx), %al
movl %eax, %ecx
shrb $0x5, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x5928(%rip)      # 0xc254
je 0x6947
leaq 0x591f(%rip), %rsi      # 0xc254
leaq 0x309f(%rip), %rcx      # 0x99db
movq %rbx, %rdi
callq 0x18e7
movb 0x1(%rbx), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %edx
cmpl %edx, 0x5903(%rip)      # 0xc258
je 0x696d
leaq 0x58fa(%rip), %rsi      # 0xc258
leaq 0x307e(%rip), %rcx      # 0x99e3
movq %rbx, %rdi
callq 0x1905
movzbl 0x2(%rbx), %eax
movl %eax, %edx
andl $0x1f, %edx
cmpl %edx, 0x58e0(%rip)      # 0xc25c
je 0x6997
leaq 0x58d7(%rip), %rsi      # 0xc25c
leaq 0x305e(%rip), %rcx      # 0x99ea
movq %rbx, %rdi
callq 0x186f
movb 0x2(%rbx), %al
movl %eax, %ecx
shrb $0x5, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x58b8(%rip)      # 0xc260
je 0x69c3
leaq 0x58af(%rip), %rsi      # 0xc260
leaq 0x303b(%rip), %rcx      # 0x99f3
movq %rbx, %rdi
callq 0x188d
movb 0x2(%rbx), %al
movl %eax, %ecx
shrb $0x6, %cl
andb $0x1, %cl
movzbl %cl, %edx
cmpl %edx, 0x5890(%rip)      # 0xc264
je 0x69ef
leaq 0x5887(%rip), %rsi      # 0xc264
leaq 0x3023(%rip), %rcx      # 0x9a07
movq %rbx, %rdi
callq 0x19b9
movb 0x2(%rbx), %al
shrb $0x7, %al
movzbl %al, %edx
cmpl %edx, 0x586d(%rip)      # 0xc268
je 0x6a13
leaq 0x5864(%rip), %rsi      # 0xc268
leaq 0x3007(%rip), %rcx      # 0x9a12
movq %rbx, %rdi
callq 0x195f
movzbl 0x3(%rbx), %eax
movl %eax, %edx
andl $0xf, %edx
cmpl %edx, 0x584a(%rip)      # 0xc26c
je 0x6a3d
leaq 0x5841(%rip), %rsi      # 0xc26c
leaq 0x2fef(%rip), %rcx      # 0x9a21
movq %rbx, %rdi
callq 0x18c9
movb 0x3(%rbx), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %edx
cmpl %edx, 0x5825(%rip)      # 0xc270
je 0x6a63
leaq 0x581c(%rip), %rsi      # 0xc270
leaq 0x2fcf(%rip), %rcx      # 0x9a2a
movq %rbx, %rdi
callq 0x18ab
movb 0x4(%rbx), %al
movzbl %al, %edx
testb $0x40, %dl
jne 0x6c01
andl $0x1f, %edx
cmpl 0x574d(%rip), %edx      # 0xc1c8
je 0x6a96
leaq 0x5744(%rip), %rsi      # 0xc1c8
leaq 0x2fc3(%rip), %rcx      # 0x9a4e
movq %rbx, %rdi
callq 0x1a4f
movb 0x4(%rbx), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %edx
cmpl %edx, 0x57d0(%rip)      # 0xc274
je 0x6c2b
leaq 0x57c3(%rip), %rsi      # 0xc274
leaq 0x2f9e(%rip), %rcx      # 0x9a56
movq %rbx, %rdi
callq 0x1a31
jmp 0x6c2b
movl %r8d, 0x56c8(%rip)      # 0xc194
shrl $0x4, %r9d
andl $0x1, %r9d
cmpl %r9d, 0x56bd(%rip)      # 0xc198
je 0x6ae4
movl %r9d, 0x56b4(%rip)      # 0xc198
leaq 0x2dac(%rip), %rsi      # 0x9897
movl $0x1, %edi
xorl %eax, %eax
callq 0x13ba
movb 0x3(%rbx), %al
movl %eax, %ecx
shrb $0x5, %cl
andb $0x3, %cl
movzbl %cl, %ecx
xorl %esi, %esi
cmpl %ecx, 0x568f(%rip)      # 0xc19c
je 0x6b1a
movl %ecx, 0x5687(%rip)      # 0xc19c
movl $0x1, %esi
shrb $0x7, %al
movzbl %al, %edx
cmpl %edx, 0x567a(%rip)      # 0xc1a0
je 0x6b33
movl %edx, 0x5672(%rip)      # 0xc1a0
movl $0x1, %esi
movzbl 0x4(%rbx), %r9d
movl %r9d, %r8d
andl $0x3, %r8d
cmpl %r8d, 0x565e(%rip)      # 0xc1a4
jne 0x6b5f
shrl $0x2, %r9d
andl $0x1, %r9d
cmpl %r9d, 0x5651(%rip)      # 0xc1a8
jne 0x6b7b
testl %esi, %esi
jne 0x6b82
jmp 0x6b95
movl %r8d, 0x563e(%rip)      # 0xc1a4
shrb $0x2, %r9b
andb $0x1, %r9b
movzbl %r9b, %r9d
cmpl %r9d, 0x562f(%rip)      # 0xc1a8
je 0x6b82
movl %r9d, 0x5626(%rip)      # 0xc1a8
leaq 0x2d38(%rip), %rsi      # 0x98c1
movl $0x1, %edi
xorl %eax, %eax
callq 0x13ba
cmpl $0x64, 0x5a78(%rip)     # 0xc614
movl 0x55ea(%rip), %eax      # 0xc18c
jne 0x6bbf
shll $0x2, %eax
movl 0x55e3(%rip), %ecx      # 0xc190
addl 0x55e1(%rip), %ecx      # 0xc194
leal (%rax,%rax,2), %eax
addl %ecx, %ecx
leal (%rcx,%rcx,8), %ecx
subl %ecx, %eax
jmp 0x6bca
leal (%rax,%rax,4), %eax
addl %eax, %eax
addl 0x55fe(%rip), %eax      # 0xc1c8
cvtsi2sd %eax, %xmm1
mulsd 0x149a(%rip), %xmm1     # 0x8070
movsd 0x149a(%rip), %xmm0     # 0x8078
callq 0x10a0
movsd %xmm0, 0x55c5(%rip)     # 0xc1b0
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x55c4(%rip)      # 0xc1c0
jmp 0x6c8e
andl $0x3f, %edx
movl $0x25, %eax
subl %edx, %eax
cmpl 0x55b7(%rip), %eax      # 0xc1c8
je 0x6c2b
leaq 0x55ae(%rip), %rsi      # 0xc1c8
leaq 0x2e1d(%rip), %rcx      # 0x9a3e
movq %rbx, %rdi
movl %eax, %edx
callq 0x1a6d
cmpl $0x64, 0x59e2(%rip)     # 0xc614
je 0x6c8e
movl 0x5552(%rip), %eax      # 0xc18c
leal (%rax,%rax,4), %eax
addl %eax, %eax
addl 0x5583(%rip), %eax      # 0xc1c8
cvtsi2sd %eax, %xmm1
mulsd 0x141f(%rip), %xmm1     # 0x8070
movsd 0x141f(%rip), %xmm0     # 0x8078
callq 0x10a0
movsd %xmm0, 0x554a(%rip)     # 0xc1b0
xorps %xmm1, %xmm1
cvtsi2sdl 0x555b(%rip), %xmm1 # 0xc1cc
mulsd 0x13f7(%rip), %xmm1     # 0x8070
movsd 0x13f7(%rip), %xmm0     # 0x8078
callq 0x10a0
movsd %xmm0, 0x5532(%rip)     # 0xc1c0
popq %rbx
retq