// File: /workspace/github_c_makefile_star2_O0/hiperiondev[P]hpsdrsim/src/hpsdr_newprotocol.c
// Function: new_protocol_general_packet
void new_protocol_general_packet(unsigned char *buffer) {
    dbg_printf(1, "-- new protocol packet received\n");
    static unsigned long seqnum = 0;
    unsigned long seqold;
    int rc;

    seqold = seqnum;
    seqnum = (buffer[0] >> 24) + (buffer[1] << 16) + (buffer[2] << 8) + buffer[3];
    if (seqnum != 0 && seqnum != seqold + 1) {
        dbg_printf(1, "GP: SEQ ERROR, old=%lu new=%lu\n", seqold, seqnum);
    }

    rc = (buffer[5] << 8) + buffer[6];
    if (rc == 0)
        rc = 1025;
    if (rc != ddc_port || !run) {
        ddc_port = rc;
        dbg_printf(1, "GP: RX specific rcv        port is  %4d\n", rc);
    }
    rc = (buffer[7] << 8) + buffer[8];
    if (rc == 0)
        rc = 1026;
    if (rc != duc_port || !run) {
        duc_port = rc;
        dbg_printf(1, "GP: TX specific rcv        port is  %4d\n", rc);
    }
    rc = (buffer[9] << 8) + buffer[10];
    if (rc == 0)
        rc = 1027;
    if (rc != hp_port || !run) {
        hp_port = rc;
        dbg_printf(1, "GP: HighPrio Port rcv      port is  %4d\n", rc);
    }
    rc = (buffer[11] << 8) + buffer[12];
    if (rc == 0)
        rc = 1025;
    if (rc != shp_port || !run) {
        shp_port = rc;
        dbg_printf(1, "GP: HighPrio Port snd      port is  %4d\n", rc);
    }
    rc = (buffer[13] << 8) + buffer[14];
    if (rc == 0)
        rc = 1028;
    if (rc != audio_port || !run) {
        audio_port = rc;
        dbg_printf(1, "GP: Audio rcv              port is  %4d\n", rc);
    }
    rc = (buffer[15] << 8) + buffer[16];
    if (rc == 0)
        rc = 1029;
    if (rc != duc0_port || !run) {
        duc0_port = rc;
        dbg_printf(1, "GP: TX data rcv base       port is  %4d\n", rc);
    }
    rc = (buffer[17] << 8) + buffer[18];
    if (rc == 0)
        rc = 1035;
    if (rc != ddc0_port || !run) {
        ddc0_port = rc;
        dbg_printf(1, "GP: RX data snd base       port is  %4d\n", rc);
    }
    rc = (buffer[19] << 8) + buffer[20];
    if (rc == 0)
        rc = 1026;
    if (rc != mic_port || !run) {
        mic_port = rc;
        dbg_printf(1, "GP: Microphone data snd    port is  %4d\n", rc);
    }
    rc = (buffer[21] << 8) + buffer[22];
    if (rc == 0)
        rc = 1027;
    if (rc != wide_port || !run) {
        wide_port = rc;
        dbg_printf(1, "GP: Wideband data snd      port is  %4d\n", rc);
    }
    rc = buffer[23];
    if (rc != wide_enable || !run) {
        wide_enable = rc;
        dbg_printf(1, "GP: Wideband Enable Flag is %d\n", rc);
    }
    rc = (buffer[24] << 8) + buffer[25];
    if (rc == 0)
        rc = 512;
    if (rc != wide_len || !run) {
        wide_len = rc;
        dbg_printf(1, "GP: WideBand Length is %d\n", rc);
    }
    rc = buffer[26];
    if (rc == 0)
        rc = 16;
    if (rc != wide_size || !run) {
        wide_size = rc;
        dbg_printf(1, "GP: Wideband sample size is %d\n", rc);
    }
    rc = buffer[27];
    if (rc != wide_rate || !run) {
        wide_rate = rc;
        dbg_printf(1, "GP: Wideband sample rate is %d\n", rc);
    }
    rc = buffer[28];
    if (rc != wide_ppf || !run) {
        wide_ppf = rc;
        dbg_printf(1, "GP: Wideband PPF is %d\n", rc);
    }
    rc = (buffer[29] << 8) + buffer[30];
    if (rc != port_mm || !run) {
        port_mm = rc;
        dbg_printf(1, "MemMapped Registers rcv port is %d\n", rc);
    }
    rc = (buffer[31] << 8) + buffer[32];
    if (rc != port_smm || !run) {
        port_smm = rc;
        dbg_printf(1, "MemMapped Registers snd port is %d\n", rc);
    }
    rc = (buffer[33] << 8) + buffer[34];
    if (rc != pwm_min || !run) {
        pwm_min = rc;
        dbg_printf(1, "GP: PWM Min value is %d\n", rc);
    }
    rc = (buffer[35] << 8) + buffer[36];
    if (rc != pwm_max || !run) {
        pwm_max = rc;
        dbg_printf(1, "GP: PWM Max value is %d\n", rc);
    }
    rc = buffer[37];
    if (rc != bits || !run) {
        bits = rc;
        dbg_printf(1, "GP: ModeBits=x%02x\n", rc);
    }
    rc = buffer[38];
    if (rc != hwtim || !run) {
        hwtim = rc;
        dbg_printf(1, "GP: Hardware Watchdog enabled=%d\n", rc);
    }

    iqform = buffer[39];
    if (iqform == 0)
        iqform = 3;
    if (iqform != 3)
        dbg_printf(1, "GP: Wrong IQ Format requested: %d\n", iqform);

    rc = (buffer[58] & 0x01);
    if (rc != pa_enable || !run) {
        pa_enable = rc;
        dbg_printf(1, "GP: PA enabled=%d\n", rc);
    }

    rc = buffer[59] & 0x01;
    if (rc != alex0_enable || !run) {
        alex0_enable = rc;
        dbg_printf(1, "GP: ALEX0 register enable=%d\n", rc);
    }
    rc = (buffer[59] & 0x02) >> 1;
    if (rc != alex1_enable || !run) {
        alex1_enable = rc;
        dbg_printf(1, "GP: ALEX1 register enable=%d\n", rc);
    }

    // Start HighPrio thread if we arrive here for the first time
    // The HighPrio thread keeps running all the time.
    if (!highprio_thread_id) {
        if (pthread_create(&highprio_thread_id, NULL, highprio_thread, NULL) < 0) {
            dbg_printf(1, "***** ERROR: Create HighPrio thread");
        }
        pthread_detach(highprio_thread_id);

        // init state arrays to zero for the first time
        memset(adcdither, -1, 8 * sizeof(int));
        memset(adcrandom, -1, 8 * sizeof(int));
        memset(ddcenable, -1, NUMRECEIVERS * sizeof(int));
        memset(adcmap, -1, NUMRECEIVERS * sizeof(int));
        memset(syncddc, -1, NUMRECEIVERS * sizeof(int));

        memset(rxfreq, -1, NUMRECEIVERS * sizeof(unsigned long));
        memset(alex0, 0, 32 * sizeof(int));
        memset(alex1, 0, 32 * sizeof(int));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, %edi
leaq 0x93e8(%rip), %rsi      # 0xc0f0
movb $0x0, %al
callq 0x1370
movq 0xd5e2(%rip), %rax      # 0x102f8
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
sarl $0x18, %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
addl %ecx, %eax
cltq
movq %rax, 0xd5a7(%rip)      # 0x102f8
cmpq $0x0, 0xd59f(%rip)      # 0x102f8
je 0x2d8d
movq 0xd596(%rip), %rax      # 0x102f8
movq -0x10(%rbp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
je 0x2d8d
movq -0x10(%rbp), %rdx
movq 0xd57e(%rip), %rcx      # 0x102f8
movl $0x1, %edi
leaq 0x938b(%rip), %rsi      # 0xc111
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x5(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x6(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x2db2
movl $0x401, -0x14(%rbp)     # imm = 0x401
movl -0x14(%rbp), %eax
cmpl 0xd545(%rip), %eax      # 0x10300
jne 0x2dc6
cmpl $0x0, 0xd52c(%rip)      # 0x102f0
jne 0x2de5
movl -0x14(%rbp), %eax
movl %eax, 0xd531(%rip)      # 0x10300
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x9353(%rip), %rsi      # 0xc131
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x7(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x8(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x2e0a
movl $0x402, -0x14(%rbp)     # imm = 0x402
movl -0x14(%rbp), %eax
cmpl 0xd4f1(%rip), %eax      # 0x10304
jne 0x2e1e
cmpl $0x0, 0xd4d4(%rip)      # 0x102f0
jne 0x2e3d
movl -0x14(%rbp), %eax
movl %eax, 0xd4dd(%rip)      # 0x10304
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x9324(%rip), %rsi      # 0xc15a
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x9(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0xa(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x2e62
movl $0x403, -0x14(%rbp)     # imm = 0x403
movl -0x14(%rbp), %eax
cmpl 0xd49d(%rip), %eax      # 0x10308
jne 0x2e76
cmpl $0x0, 0xd47c(%rip)      # 0x102f0
jne 0x2e95
movl -0x14(%rbp), %eax
movl %eax, 0xd489(%rip)      # 0x10308
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x92f5(%rip), %rsi      # 0xc183
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0xb(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0xc(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x2eba
movl $0x401, -0x14(%rbp)     # imm = 0x401
movl -0x14(%rbp), %eax
cmpl 0xd449(%rip), %eax      # 0x1030c
jne 0x2ece
cmpl $0x0, 0xd424(%rip)      # 0x102f0
jne 0x2eed
movl -0x14(%rbp), %eax
movl %eax, 0xd435(%rip)      # 0x1030c
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x92c6(%rip), %rsi      # 0xc1ac
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0xd(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0xe(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x2f12
movl $0x404, -0x14(%rbp)     # imm = 0x404
movl -0x14(%rbp), %eax
cmpl 0xd3f5(%rip), %eax      # 0x10310
jne 0x2f26
cmpl $0x0, 0xd3cc(%rip)      # 0x102f0
jne 0x2f45
movl -0x14(%rbp), %eax
movl %eax, 0xd3e1(%rip)      # 0x10310
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x9297(%rip), %rsi      # 0xc1d5
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0xf(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x10(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x2f6a
movl $0x405, -0x14(%rbp)     # imm = 0x405
movl -0x14(%rbp), %eax
cmpl 0xd3a1(%rip), %eax      # 0x10314
jne 0x2f7e
cmpl $0x0, 0xd374(%rip)      # 0x102f0
jne 0x2f9d
movl -0x14(%rbp), %eax
movl %eax, 0xd38d(%rip)      # 0x10314
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x9268(%rip), %rsi      # 0xc1fe
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x11(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x12(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x2fc2
movl $0x40b, -0x14(%rbp)     # imm = 0x40B
movl -0x14(%rbp), %eax
cmpl 0xd34d(%rip), %eax      # 0x10318
jne 0x2fd6
cmpl $0x0, 0xd31c(%rip)      # 0x102f0
jne 0x2ff5
movl -0x14(%rbp), %eax
movl %eax, 0xd339(%rip)      # 0x10318
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x9239(%rip), %rsi      # 0xc227
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x13(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x14(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x301a
movl $0x402, -0x14(%rbp)     # imm = 0x402
movl -0x14(%rbp), %eax
cmpl 0xd2f9(%rip), %eax      # 0x1031c
jne 0x302e
cmpl $0x0, 0xd2c4(%rip)      # 0x102f0
jne 0x304d
movl -0x14(%rbp), %eax
movl %eax, 0xd2e5(%rip)      # 0x1031c
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x920a(%rip), %rsi      # 0xc250
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x15(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x16(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x3072
movl $0x403, -0x14(%rbp)     # imm = 0x403
movl -0x14(%rbp), %eax
cmpl 0xd2a5(%rip), %eax      # 0x10320
jne 0x3086
cmpl $0x0, 0xd26c(%rip)      # 0x102f0
jne 0x30a5
movl -0x14(%rbp), %eax
movl %eax, 0xd291(%rip)      # 0x10320
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x91db(%rip), %rsi      # 0xc279
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x17(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xd26b(%rip), %eax      # 0x10324
jne 0x30c4
cmpl $0x0, 0xd22e(%rip)      # 0x102f0
jne 0x30e3
movl -0x14(%rbp), %eax
movl %eax, 0xd257(%rip)      # 0x10324
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x91c6(%rip), %rsi      # 0xc2a2
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x18(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x19(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x3108
movl $0x200, -0x14(%rbp)     # imm = 0x200
movl -0x14(%rbp), %eax
cmpl 0xd217(%rip), %eax      # 0x10328
jne 0x311c
cmpl $0x0, 0xd1d6(%rip)      # 0x102f0
jne 0x313b
movl -0x14(%rbp), %eax
movl %eax, 0xd203(%rip)      # 0x10328
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x918e(%rip), %rsi      # 0xc2c2
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x1a(%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x3153
movl $0x10, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xd1d0(%rip), %eax      # 0x1032c
jne 0x3167
cmpl $0x0, 0xd18b(%rip)      # 0x102f0
jne 0x3186
movl -0x14(%rbp), %eax
movl %eax, 0xd1bc(%rip)      # 0x1032c
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x915e(%rip), %rsi      # 0xc2dd
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x1b(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xd196(%rip), %eax      # 0x10330
jne 0x31a5
cmpl $0x0, 0xd14d(%rip)      # 0x102f0
jne 0x31c4
movl -0x14(%rbp), %eax
movl %eax, 0xd182(%rip)      # 0x10330
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x9140(%rip), %rsi      # 0xc2fd
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x1c(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xd15c(%rip), %eax      # 0x10334
jne 0x31e3
cmpl $0x0, 0xd10f(%rip)      # 0x102f0
jne 0x3202
movl -0x14(%rbp), %eax
movl %eax, 0xd148(%rip)      # 0x10334
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x9122(%rip), %rsi      # 0xc31d
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x1d(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x1e(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xd115(%rip), %eax      # 0x10338
jne 0x322e
cmpl $0x0, 0xd0c4(%rip)      # 0x102f0
jne 0x324d
movl -0x14(%rbp), %eax
movl %eax, 0xd101(%rip)      # 0x10338
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x90ef(%rip), %rsi      # 0xc335
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x1f(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x20(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xd0ce(%rip), %eax      # 0x1033c
jne 0x3279
cmpl $0x0, 0xd079(%rip)      # 0x102f0
jne 0x3298
movl -0x14(%rbp), %eax
movl %eax, 0xd0ba(%rip)      # 0x1033c
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x90c8(%rip), %rsi      # 0xc359
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x21(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x22(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xd087(%rip), %eax      # 0x10340
jne 0x32c4
cmpl $0x0, 0xd02e(%rip)      # 0x102f0
jne 0x32e3
movl -0x14(%rbp), %eax
movl %eax, 0xd073(%rip)      # 0x10340
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x90a1(%rip), %rsi      # 0xc37d
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x23(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x24(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xd040(%rip), %eax      # 0x10344
jne 0x330f
cmpl $0x0, 0xcfe3(%rip)      # 0x102f0
jne 0x332e
movl -0x14(%rbp), %eax
movl %eax, 0xd02c(%rip)      # 0x10344
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x906f(%rip), %rsi      # 0xc396
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x25(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xd006(%rip), %eax      # 0x10348
jne 0x334d
cmpl $0x0, 0xcfa5(%rip)      # 0x102f0
jne 0x336c
movl -0x14(%rbp), %eax
movl %eax, 0xcff2(%rip)      # 0x10348
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x904a(%rip), %rsi      # 0xc3af
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x26(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xcfcc(%rip), %eax      # 0x1034c
jne 0x338b
cmpl $0x0, 0xcf67(%rip)      # 0x102f0
jne 0x33aa
movl -0x14(%rbp), %eax
movl %eax, 0xcfb8(%rip)      # 0x1034c
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x9020(%rip), %rsi      # 0xc3c3
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x27(%rax), %eax
movl %eax, 0xcf98(%rip)      # 0x10350
cmpl $0x0, 0xcf91(%rip)      # 0x10350
jne 0x33cb
movl $0x3, 0xcf85(%rip)      # 0x10350
cmpl $0x3, 0xcf7e(%rip)      # 0x10350
je 0x33ed
movl 0xcf76(%rip), %edx      # 0x10350
movl $0x1, %edi
leaq 0x8fff(%rip), %rsi      # 0xc3e5
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x3a(%rax), %eax
andl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xcf50(%rip), %eax      # 0x10354
jne 0x340f
cmpl $0x0, 0xcee3(%rip)      # 0x102f0
jne 0x342e
movl -0x14(%rbp), %eax
movl %eax, 0xcf3c(%rip)      # 0x10354
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x8fe1(%rip), %rsi      # 0xc408
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x3b(%rax), %eax
andl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xcf13(%rip), %eax      # 0x10358
jne 0x3450
cmpl $0x0, 0xcea2(%rip)      # 0x102f0
jne 0x346f
movl -0x14(%rbp), %eax
movl %eax, 0xceff(%rip)      # 0x10358
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x8fb3(%rip), %rsi      # 0xc41b
movb $0x0, %al
callq 0x1370
movq -0x8(%rbp), %rax
movzbl 0x3b(%rax), %eax
andl $0x2, %eax
sarl %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xced4(%rip), %eax      # 0x1035c
jne 0x3493
cmpl $0x0, 0xce5f(%rip)      # 0x102f0
jne 0x34b2
movl -0x14(%rbp), %eax
movl %eax, 0xcec0(%rip)      # 0x1035c
movl -0x14(%rbp), %edx
movl $0x1, %edi
leaq 0x8f8e(%rip), %rsi      # 0xc439
movb $0x0, %al
callq 0x1370
cmpq $0x0, 0xcea6(%rip)      # 0x10360
jne 0x35a8
leaq 0xce99(%rip), %rdi      # 0x10360
xorl %eax, %eax
movl %eax, %ecx
leaq 0xde(%rip), %rdx        # 0x35b0
movq %rcx, %rsi
callq 0x1190
cmpl $0x0, %eax
jge 0x34f2
movl $0x1, %edi
leaq 0x8f6c(%rip), %rsi      # 0xc457
movb $0x0, %al
callq 0x1370
movq 0xce67(%rip), %rdi      # 0x10360
callq 0x1150
leaq 0xce6b(%rip), %rdi      # 0x10370
movl $0xff, %esi
movl $0x20, %edx
callq 0x10f0
leaq 0xce75(%rip), %rdi      # 0x10390
movl $0xff, %esi
movl $0x20, %edx
callq 0x10f0
leaq 0xce7f(%rip), %rdi      # 0x103b0
movl $0xff, %esi
movl $0x10, %edx
callq 0x10f0
leaq 0xce79(%rip), %rdi      # 0x103c0
movl $0xff, %esi
movl $0x10, %edx
callq 0x10f0
leaq 0xce73(%rip), %rdi      # 0x103d0
movl $0xff, %esi
movl $0x10, %edx
callq 0x10f0
leaq 0xce6d(%rip), %rdi      # 0x103e0
movl $0xff, %esi
movl $0x20, %edx
callq 0x10f0
leaq 0xce77(%rip), %rdi      # 0x10400
xorl %esi, %esi
movl $0x80, %edx
callq 0x10f0
leaq 0xcee4(%rip), %rdi      # 0x10480
xorl %esi, %esi
movl $0x80, %edx
callq 0x10f0
addq $0x20, %rsp
popq %rbp
retq
nop