// File: /workspace/github_c_makefile_star2_O1/videolan[P]bitstream/examples/dvb_ecmg.c
// Function: main
int main(int i_argc, char **ppsz_argv)
{
    if (i_argc > 1) {
        fprintf(stderr, "usage: %s < <input stream> > <output stream>\n",
                ppsz_argv[0]);
        return EXIT_FAILURE;
    }

    for ( ; ; ) {
        uint8_t *p_tlv_h = malloc(TLVH_HEADER_SIZE + TLV_HEADER_SIZE);
        uint8_t *p_tlv = tlvh_get_tlv(p_tlv_h);
        uint16_t i_type;
        fd_set rset;
        struct timeval timeout;
        int i_ret;

        FD_ZERO(&rset);
        FD_SET(STDIN_FILENO, &rset);
        timeout.tv_sec = SELECT_TIMEOUT;
        timeout.tv_usec = 0;

        if ((i_ret = select(STDIN_FILENO + 1, &rset, NULL, NULL, &timeout)) < 0)
            return EXIT_FAILURE;
        if (!i_ret) {
            if (b_init) return EXIT_FAILURE;
            /* timeout - send a packet so that the communication is reset
             * if it is really dead */
            send_channel_test();
            continue;
        }

        if (read_wrapper(p_tlv_h, TLVH_HEADER_SIZE + TLV_HEADER_SIZE) <= 0)
            return EXIT_FAILURE;

        p_tlv_h = realloc(p_tlv_h, TLVH_HEADER_SIZE + TLV_HEADER_SIZE
                                    + tlv_get_length(p_tlv));
        p_tlv = tlvh_get_tlv(p_tlv_h);
        if (read_wrapper(p_tlv + TLV_HEADER_SIZE, tlv_get_length(p_tlv)) <= 0)
            return EXIT_FAILURE;

        if ((b_init && tlvh_get_version(p_tlv_h) > 3) ||
            (!b_init && tlvh_get_version(p_tlv_h) != i_version)) {
            send_channel_error(i_channelid, 0x2);
            free(p_tlv_h);
            continue;
        }

        i_type = tlv_get_type(p_tlv);

        if (!tlv_validate(p_tlv)) {
            send_channel_error(i_channelid, 0x1);
            free(p_tlv_h);
            continue;
        }

        if (!ecmg_validate(p_tlv)) {
            send_channel_error(i_channelid, 0xf);
            free(p_tlv_h);
            continue;
        }

        if (b_init && i_type != ECMG_TYPE_CHANNEL_SETUP) {
            send_channel_error(i_channelid, 0x6);
            free(p_tlv_h);
            continue;
        }

        switch (i_type) {
            case ECMG_TYPE_CHANNEL_SETUP:
                if (b_init)
                    i_version = tlvh_get_version(p_tlv_h);
                handle_channel_setup(p_tlv);
                break;

            case ECMG_TYPE_CHANNEL_TEST:
                handle_channel_test(p_tlv);
                break;

            case ECMG_TYPE_CHANNEL_CLOSE:
                handle_channel_close(p_tlv);
                break;

            case ECMG_TYPE_CHANNEL_ERROR:
                handle_channel_error(p_tlv);
                break;

            case ECMG_TYPE_STREAM_SETUP:
                handle_stream_setup(p_tlv);
                break;

            case ECMG_TYPE_STREAM_TEST:
                handle_stream_test(p_tlv);
                break;

            case ECMG_TYPE_STREAM_CLOSEREQ:
                handle_stream_close(p_tlv);
                break;

            case ECMG_TYPE_STREAM_ERROR:
                handle_stream_error(p_tlv);
                break;

            case ECMG_TYPE_CHANNEL_STATUS:
            case ECMG_TYPE_STREAM_STATUS:
                break;

            case ECMG_TYPE_CW:
                handle_cw(p_tlv);
                break;

            default:
                send_channel_error(i_channelid, 0x3);
                break;
        }

        free(p_tlv_h);
    }

    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4b8, %rsp            # imm = 0x4B8
cmpl $0x1, %edi
jg 0x3132
xorl %r14d, %r14d
xorl %ebp, %ebp
movl $0x5, %edi
callq 0x10a0
movq %rax, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0xa0(%rsp)
movq $0x1, 0x30(%rsp)
movq $0xa, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movl $0x1, %edi
leaq 0x30(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
leaq 0x20(%rsp), %r8
callq 0x1090
movb $0x1, %bl
testl %eax, %eax
js 0x1dc7
je 0x1dd1
movl $0x5, %esi
movq %r15, %rdi
callq 0x1b8c
testq %rax, %rax
jle 0x1dc7
movl %ebp, 0xc(%rsp)
movzwl 0x3(%r15), %eax
rolw $0x8, %ax
movzwl %ax, %esi
addq $0x5, %rsi
movq %r15, %rdi
callq 0x10b0
movq %rax, %rbp
leaq 0x5(%rax), %r13
movzwl 0x3(%rax), %eax
rolw $0x8, %ax
movzwl %ax, %esi
movq %r13, %rdi
callq 0x1b8c
movq %rax, %rcx
movl $0x1, %eax
testq %rcx, %rcx
jle 0x2d36
movq %rbp, %rsi
movb 0x52ff(%rip), %dl       # 0x7088
testb %dl, %dl
jne 0x1d9a
cmpb $0x3, (%rsi)
ja 0x1f9e
testb %dl, %dl
je 0x1da8
movb (%rsi), %al
cmpb 0x52d6(%rip), %al       # 0x7078
jne 0x1f9e
incq %rbp
movzwl 0x3(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
cmpw $0x4, %ax
jae 0x1ea0
xorl %ecx, %ecx
jmp 0x1ef1
movl $0x1, %eax
jmp 0x2d36
cmpb $0x1, 0x52b0(%rip)      # 0x7088
movl $0x1, %eax
jne 0x2d36
movq 0x520e(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movzwl 0x5296(%rip), %edx      # 0x708a
xorl %ebx, %ebx
leaq 0x34ab(%rip), %rsi      # 0x52a8
xorl %eax, %eax
callq 0x1070
movb 0x526e(%rip), %al       # 0x7078
movb %al, 0xb0(%rsp)
movw $0x0, 0xb5(%rsp)
movl $0xf7030200, 0xb1(%rsp) # imm = 0xF7030200
movzwl 0x525d(%rip), %eax      # 0x708a
leaq 0xb1(%rsp), %r8
leaq 0xb5(%rsp), %r9
movq %r9, %rdx
testb %bl, %bl
je 0x1e70
movzbl %bl, %ecx
movq %r9, %rdx
movq %rdx, %rsi
subq %r8, %rsi
cmpq $0x3f7, %rsi            # imm = 0x3F7
jg 0x1e87
movzwl 0x2(%rdx), %esi
rolw $0x8, %si
movzwl %si, %esi
addq %rsi, %rdx
addq $0x4, %rdx
decw %cx
jne 0x1e4a
movq %rdx, %rcx
subq %r8, %rcx
addq $-0x4, %rcx
cmpq $0x3f7, %rcx            # imm = 0x3F7
cmovgeq %r14, %rdx
jmp 0x1e89
xorl %edx, %edx
testq %rdx, %rdx
je 0x26f7
incb %bl
movb 0x1(%rdx), %cl
orb (%rdx), %cl
jne 0x1e3d
jmp 0x26f9
movq %rsi, %r9
movzwl 0x7(%rsi), %ecx
rolw $0x8, %cx
movzwl %cx, %edi
leaq (%rdi,%r13), %rcx
subq %rbp, %rcx
movq %r13, %rsi
cmpq %rax, %rcx
jle 0x1ec1
xorl %ecx, %ecx
jmp 0x1eee
addq %rdi, %rsi
addq $0x4, %rsi
movq %rsi, %rcx
subq %rbp, %rcx
cmpq %rax, %rcx
jg 0x1eea
movzwl 0x2(%rsi), %edi
rolw $0x8, %di
movzwl %di, %edi
leaq (%rsi,%rdi), %r8
subq %rbp, %r8
cmpq %rax, %r8
jle 0x1ec1
addq $-0x4, %rcx
movq %r9, %rsi
cmpq %rax, %rcx
jne 0x248f
movq %rsi, 0x10(%rsp)
movzwl 0x1(%rsi), %esi
rolw $0x8, %si
movzwl %si, %ecx
movw $0x0, 0xb4(%rsp)
movl $0x0, 0xb0(%rsp)
cmpl $0x100, %ecx            # imm = 0x100
jle 0x1f4e
leal -0x101(%rcx), %edi
cmpl $0x5, %edi
ja 0x1f7d
leaq 0x30fb(%rip), %r8       # 0x5034
movslq (%r8,%rdi,4), %rdi
addq %r8, %rdi
jmpq *%rdi
leaq 0x3227(%rip), %rdi      # 0x5170
jmp 0x1fef
leal -0x1(%rcx), %r8d
leaq 0xb0(%rsp), %rdi
cmpl $0x4, %r8d
ja 0x1fef
leaq 0x30b5(%rip), %r9       # 0x5020
movslq (%r9,%r8,4), %rdi
addq %r9, %rdi
jmpq *%rdi
leaq 0x317f(%rip), %rdi      # 0x50fa
jmp 0x1fef
cmpl $0x201, %ecx            # imm = 0x201
je 0x1fcd
leaq 0xb0(%rsp), %rdi
cmpl $0x202, %ecx            # imm = 0x202
jne 0x1fef
leaq 0x3244(%rip), %rdi      # 0x51e0
jmp 0x1fef
movzwl 0x50e5(%rip), %edi      # 0x708a
movq %rsi, %rbx
movl $0x2, %esi
jmp 0x249e
leaq 0x3157(%rip), %rdi      # 0x5110
jmp 0x1fef
leaq 0x316e(%rip), %rdi      # 0x5130
jmp 0x1fef
leaq 0x30b5(%rip), %rdi      # 0x5080
jmp 0x1fef
leaq 0x31dc(%rip), %rdi      # 0x51b0
jmp 0x1fef
leaq 0x30c3(%rip), %rdi      # 0x50a0
jmp 0x1fef
leaq 0x31aa(%rip), %rdi      # 0x5190
jmp 0x1fef
leaq 0x3161(%rip), %rdi      # 0x5150
movzwl (%rdi), %r8d
testw %r8w, %r8w
je 0x209c
xorl %r10d, %r10d
xorl %r9d, %r9d
xorl %r11d, %r11d
movq %r13, %r15
testw %r11w, %r11w
je 0x2039
movl %r10d, %r12d
movq %r13, %r15
movq %r15, %rbx
subq %rbp, %rbx
cmpq %rax, %rbx
jg 0x204c
movzwl 0x2(%r15), %ebx
rolw $0x8, %bx
movzwl %bx, %ebx
addq %rbx, %r15
addq $0x4, %r15
incw %r12w
jne 0x2015
movq %r15, %rbx
subq %rbp, %rbx
addq $-0x4, %rbx
cmpq %rax, %rbx
cmovgeq %r14, %r15
jmp 0x204f
xorl %r15d, %r15d
testq %r15, %r15
je 0x2072
incl %r11d
movzwl (%r15), %ebx
rolw $0x8, %bx
xorl %r15d, %r15d
cmpw %r8w, %bx
sete %r15b
addl %r15d, %r9d
decl %r10d
jmp 0x2006
cmpw 0x2(%rdi), %r9w
jb 0x208b
leaq 0x6(%rdi), %r8
cmpw 0x4(%rdi), %r9w
movq %r8, %rdi
jbe 0x1fef
movzwl 0x4ff8(%rip), %edi      # 0x708a
movl $0xf, %esi
jmp 0x2d21
xorl %edi, %edi
xorl %r8d, %r8d
movq %r13, %r9
testw %r8w, %r8w
je 0x20d6
movl %edi, %r10d
movq %r13, %r9
movq %r9, %r11
subq %rbp, %r11
cmpq %rax, %r11
jg 0x20e9
movzwl 0x2(%r9), %r11d
rolw $0x8, %r11w
movzwl %r11w, %r11d
addq %r11, %r9
addq $0x4, %r9
incw %r10w
jne 0x20b0
movq %r9, %r10
subq %rbp, %r10
addq $-0x4, %r10
cmpq %rax, %r10
cmovgeq %r14, %r9
jmp 0x20ec
xorl %r9d, %r9d
testq %r9, %r9
je 0x2140
movzwl (%r9), %r10d
movzwl 0x2(%r9), %r9d
rolw $0x8, %r10w
movzwl %r10w, %r10d
rolw $0x8, %r9w
cmpw $0x19, %r10w
ja 0x2122
leaq 0x30ea(%rip), %r11      # 0x5200
cmpw (%r11,%r10,2), %r9w
jae 0x2136
jmp 0x208b
cmpl $0x7000, %r10d          # imm = 0x7000
jne 0x2136
cmpw $0x2, %r9w
jb 0x208b
incl %r8d
decl %edi
jmp 0x20a1
cmpw $0x1, %si
sete %sil
orb %dl, %sil
je 0x27d1
leal -0x1(%rcx), %esi
cmpl $0x4, %esi
jbe 0x21df
leal -0x101(%rcx), %edx
cmpl $0x5, %edx
ja 0x2266
leaq 0x2eed(%rip), %rsi      # 0x5060
movslq (%rsi,%rdx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
xorl %ecx, %ecx
movq %r13, %rsi
testb %cl, %cl
je 0x21ad
movzbl %cl, %edx
movq %r13, %rsi
movq %rsi, %rdi
subq %rbp, %rdi
cmpq %rax, %rdi
jg 0x21c0
movzwl 0x2(%rsi), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rsi
addq $0x4, %rsi
decw %dx
jne 0x218b
movq %rsi, %rdx
subq %rbp, %rdx
addq $-0x4, %rdx
cmpq %rax, %rdx
cmovgeq %r14, %rsi
jmp 0x21c2
xorl %esi, %esi
testq %rsi, %rsi
je 0x2338
incb %cl
movzwl (%rsi), %edx
rolw $0x8, %dx
cmpw $0xe, %dx
jne 0x217e
jmp 0x233a
leaq 0x2e66(%rip), %rdi      # 0x504c
movslq (%rdi,%rsi,4), %rcx
addq %rdi, %rcx
jmpq *%rcx
testb %dl, %dl
jne 0x2200
movq 0x10(%rsp), %rcx
movb (%rcx), %cl
movb %cl, 0x4e78(%rip)       # 0x7078
xorl %ecx, %ecx
movq %r13, %rsi
testb %cl, %cl
je 0x2234
movzbl %cl, %edi
movq %r13, %rsi
movq %rsi, %r8
subq %rbp, %r8
cmpq %rax, %r8
jg 0x2247
movzwl 0x2(%rsi), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
addq %r8, %rsi
addq $0x4, %rsi
decw %di
jne 0x220f
movq %rsi, %rdi
subq %rbp, %rdi
addq $-0x4, %rdi
cmpq %rax, %rdi
cmovgeq %r14, %rsi
jmp 0x2249
xorl %esi, %esi
testq %rsi, %rsi
je 0x2452
incb %cl
movzwl (%rsi), %edi
rolw $0x8, %di
cmpw $0xe, %di
jne 0x2202
jmp 0x2454
cmpl $0x201, %ecx            # imm = 0x201
jne 0x290f
xorl %ecx, %ecx
movq %r13, %rdx
testb %cl, %cl
je 0x22a3
movzbl %cl, %esi
movq %r13, %rdx
movq %rdx, %rdi
subq %rbp, %rdi
cmpq %rax, %rdi
jg 0x22b6
movzwl 0x2(%rdx), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rdx
addq $0x4, %rdx
decw %si
jne 0x2281
movq %rdx, %rsi
subq %rbp, %rsi
addq $-0x4, %rsi
cmpq %rax, %rsi
cmovgeq %r14, %rdx
jmp 0x22b8
xorl %edx, %edx
testq %rdx, %rdx
je 0x24ab
incb %cl
movzwl (%rdx), %esi
rolw $0x8, %si
cmpw $0xe, %si
jne 0x2274
jmp 0x24ad
xorl %ecx, %ecx
movq %r13, %rdx
testb %cl, %cl
je 0x2306
movzbl %cl, %esi
movq %r13, %rdx
movq %rdx, %rdi
subq %rbp, %rdi
cmpq %rax, %rdi
jg 0x2319
movzwl 0x2(%rdx), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rdx
addq $0x4, %rdx
decw %si
jne 0x22e4
movq %rdx, %rsi
subq %rbp, %rsi
addq $-0x4, %rsi
cmpq %rax, %rsi
cmovgeq %r14, %rdx
jmp 0x231b
xorl %edx, %edx
testq %rdx, %rdx
je 0x241e
incb %cl
movzwl (%rdx), %esi
rolw $0x8, %si
cmpw $0xe, %si
jne 0x22d7
jmp 0x2420
xorl %esi, %esi
addq $0x4, %rsi
movl $0x8, %ecx
xorl %edx, %edx
movzbl (%rsi), %edi
shll %cl, %edi
orl %edi, %edx
incq %rsi
addq $-0x8, %rcx
je 0x2345
xorl %ecx, %ecx
movq %r13, %rsi
testb %cl, %cl
je 0x2389
movzbl %cl, %edi
movq %r13, %rsi
movq %rsi, %r8
subq %rbp, %r8
cmpq %rax, %r8
jg 0x239c
movzwl 0x2(%rsi), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
addq %r8, %rsi
addq $0x4, %rsi
decw %di
jne 0x2364
movq %rsi, %rdi
subq %rbp, %rdi
addq $-0x4, %rdi
cmpq %rax, %rdi
cmovgeq %r14, %rsi
jmp 0x239e
xorl %esi, %esi
testq %rsi, %rsi
je 0x23b4
incb %cl
movzwl (%rsi), %edi
rolw $0x8, %di
cmpw $0xf, %di
jne 0x2357
jmp 0x23b6
xorl %esi, %esi
addq $0x4, %rsi
movl $0x8, %ecx
xorl %eax, %eax
movzbl (%rsi), %edi
shll %cl, %edi
orl %edi, %eax
incq %rsi
addq $-0x8, %rcx
je 0x23c1
cmpw 0x4cb2(%rip), %dx       # 0x708a
jne 0x2ce4
movslq 0x4ca7(%rip), %rcx      # 0x708c
testq %rcx, %rcx
jle 0x2409
movq 0x4c9f(%rip), %rdx      # 0x7090
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
testq %rdi, %rdi
je 0x2401
cmpw %ax, (%rdi)
je 0x240b
incq %rsi
cmpq %rsi, %rcx
jne 0x23f3
xorl %edi, %edi
testq %rdi, %rdi
je 0x2cd5
callq 0x399a
jmp 0x2d26
xorl %edx, %edx
addq $0x4, %rdx
movl $0x8, %ecx
xorl %eax, %eax
movzbl (%rdx), %esi
shll %cl, %esi
orl %esi, %eax
incq %rdx
addq $-0x8, %rcx
je 0x242b
cmpw 0x4c48(%rip), %ax       # 0x708a
jne 0x2d19
callq 0x31d7
jmp 0x2d26
xorl %esi, %esi
addq $0x4, %rsi
movl $0x8, %ecx
xorl %edi, %edi
movzbl (%rsi), %r8d
shll %cl, %r8d
orl %r8d, %edi
incq %rsi
addq $-0x8, %rcx
je 0x245f
testb %dl, %dl
je 0x2a6f
cmpw 0x4c09(%rip), %di       # 0x708a
je 0x2d26
movzwl %di, %edi
jmp 0x2d1c
movzwl 0x4bf4(%rip), %edi      # 0x708a
movq %rsi, %rbx
movl $0x1, %esi
callq 0x10e0
movq %rbx, %rdi
jmp 0x2d2b
xorl %edx, %edx
addq $0x4, %rdx
movl $0x8, %ecx
xorl %esi, %esi
movzbl (%rdx), %edi
shll %cl, %edi
orl %edi, %esi
incq %rdx
addq $-0x8, %rcx
je 0x24b8
xorl %ecx, %ecx
movq %r13, %rdi
testb %cl, %cl
je 0x24fc
movzbl %cl, %edx
movq %r13, %rdi
movq %rdi, %r8
subq %rbp, %r8
cmpq %rax, %r8
jg 0x250f
movzwl 0x2(%rdi), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
addq %r8, %rdi
addq $0x4, %rdi
decw %dx
jne 0x24d7
movq %rdi, %rdx
subq %rbp, %rdx
addq $-0x4, %rdx
cmpq %rax, %rdx
cmovgeq %r14, %rdi
jmp 0x2511
xorl %edi, %edi
testq %rdi, %rdi
je 0x2527
incb %cl
movzwl (%rdi), %edx
rolw $0x8, %dx
cmpw $0xf, %dx
jne 0x24ca
jmp 0x2529
xorl %edi, %edi
addq $0x4, %rdi
movl $0x8, %ecx
xorl %edx, %edx
movzbl (%rdi), %r8d
shll %cl, %r8d
orl %r8d, %edx
incq %rdi
addq $-0x8, %rcx
je 0x2534
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
cmpw 0x4b31(%rip), %si       # 0x708a
jne 0x2a82
movslq 0x4b26(%rip), %rcx      # 0x708c
testq %rcx, %rcx
jle 0x258c
movq 0x4b1e(%rip), %rsi      # 0x7090
xorl %edi, %edi
movq (%rsi,%rdi,8), %r12
testq %r12, %r12
je 0x2584
cmpw %dx, (%r12)
je 0x258f
incq %rdi
cmpq %rdi, %rcx
jne 0x2574
xorl %r12d, %r12d
testq %r12, %r12
je 0x2a8a
xorl %ecx, %ecx
xorl %esi, %esi
xorl %edi, %edi
movq %r13, %r8
testw %di, %di
je 0x25d2
movl %ecx, %r9d
movq %r13, %r8
movq %r8, %r10
subq %rbp, %r10
cmpq %rax, %r10
jg 0x25e5
movzwl 0x2(%r8), %r10d
rolw $0x8, %r10w
movzwl %r10w, %r10d
addq %r10, %r8
addq $0x4, %r8
incw %r9w
jne 0x25ac
movq %r8, %r9
subq %rbp, %r9
addq $-0x4, %r9
cmpq %rax, %r9
cmovgeq %r14, %r8
jmp 0x25e8
xorl %r8d, %r8d
testq %r8, %r8
je 0x260b
incl %edi
movzwl (%r8), %r8d
rolw $0x8, %r8w
xorl %r9d, %r9d
cmpw $0x18, %r8w
sete %r9b
addl %r9d, %esi
decl %ecx
jmp 0x259e
testw %si, %si
jne 0x2a92
xorl %ecx, %ecx
xorl %esi, %esi
xorl %edi, %edi
movq %r13, %r8
testw %di, %di
je 0x264e
movl %ecx, %r9d
movq %r13, %r8
movq %r8, %r10
subq %rbp, %r10
cmpq %rax, %r10
jg 0x2661
movzwl 0x2(%r8), %r10d
rolw $0x8, %r10w
movzwl %r10w, %r10d
addq %r10, %r8
addq $0x4, %r8
incw %r9w
jne 0x2628
movq %r8, %r9
subq %rbp, %r9
addq $-0x4, %r9
cmpq %rax, %r9
cmovgeq %r14, %r8
jmp 0x2664
xorl %r8d, %r8d
testq %r8, %r8
je 0x2687
incl %edi
movzwl (%r8), %r8d
rolw $0x8, %r8w
xorl %r9d, %r9d
cmpw $0x14, %r8w
sete %r9b
addl %r9d, %esi
decl %ecx
jmp 0x261a
cmpw $0x2, %si
jne 0x28f5
xorl %ecx, %ecx
movq %r13, %rsi
testb %cl, %cl
je 0x26c5
movzbl %cl, %edi
movq %r13, %rsi
movq %rsi, %r8
subq %rbp, %r8
cmpq %rax, %r8
jg 0x26d8
movzwl 0x2(%rsi), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
addq %r8, %rsi
addq $0x4, %rsi
decw %di
jne 0x26a0
movq %rsi, %rdi
subq %rbp, %rdi
addq $-0x4, %rdi
cmpq %rax, %rdi
cmovgeq %r14, %rsi
jmp 0x26da
xorl %esi, %esi
testq %rsi, %rsi
je 0x27dd
incb %cl
movzwl (%rsi), %edi
rolw $0x8, %di
cmpw $0x12, %di
jne 0x2693
jmp 0x27df
xorl %edx, %edx
movq %rdx, %rcx
subq %r8, %rcx
addq $0x4, %rcx
cmpq $0x3f7, %rcx            # imm = 0x3F7
jg 0x273d
movl $0x2000e00, (%rdx)      # imm = 0x2000E00
leaq 0x4(%rdx), %rsi
movl $0x8, %ecx
movl %eax, %edi
shrl %cl, %edi
movb %dil, (%rsi)
incq %rsi
addq $-0x8, %rcx
je 0x271b
movzwl 0x2(%rdx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movw $0x0, 0x4(%rdx,%rax)
movzwl 0xb3(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %eax
xorl %ecx, %ecx
movq %r9, %rsi
testb %cl, %cl
je 0x277d
movzbl %cl, %edx
movq %r9, %rsi
movq %rsi, %rdi
subq %r8, %rdi
cmpq %rax, %rdi
jg 0x2790
movzwl 0x2(%rsi), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rsi
addq $0x4, %rsi
decw %dx
jne 0x275b
movq %rsi, %rdx
subq %r8, %rdx
addq $-0x4, %rdx
cmpq %rax, %rdx
cmovgeq %r14, %rsi
jmp 0x2792
xorl %esi, %esi
testq %rsi, %rsi
je 0x27a2
incb %cl
movb 0x1(%rsi), %dl
orb (%rsi), %dl
jne 0x274e
jmp 0x27a4
xorl %esi, %esi
movl %esi, %eax
subl %r8d, %eax
addl $-0x4, %eax
rolw $0x8, %ax
movw %ax, 0xb3(%rsp)
leaq 0xb0(%rsp), %rdi
subq %rdi, %rsi
callq 0x1c0d
xorl %ebx, %ebx
movl %ebp, %eax
jmp 0x2d36
movzwl 0x48b2(%rip), %edi      # 0x708a
jmp 0x2d1c
xorl %esi, %esi
addq $0x4, %rsi
movl $0x8, %ecx
xorl %ebx, %ebx
movzbl (%rsi), %eax
shll %cl, %eax
orl %eax, %ebx
incq %rsi
addq $-0x8, %rcx
je 0x27ea
xorl %ecx, %ecx
movq %r13, %rax
testb %cl, %cl
je 0x2820
movzbl %cl, %esi
movq %r13, %rax
movzwl 0x2(%rax), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rax
addq $0x4, %rax
decw %si
jne 0x2809
incb %cl
movzwl (%rax), %esi
rolw $0x8, %si
cmpw $0x14, %si
jne 0x27fc
movzwl 0x2(%rax), %ecx
rolw $0x8, %cx
cmpw $0xa, %cx
jne 0x2902
movzbl 0x5(%rax), %ecx
addq $0x6, %rax
andl $0x1, %ecx
movq %rax, 0xb0(%rsp,%rcx,8)
xorl %eax, %eax
xorl %esi, %esi
movq %r13, %rcx
testb %sil, %sil
je 0x2881
movzbl %sil, %edi
movq %r13, %rcx
movzwl 0x2(%rcx), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
addq %r8, %rcx
addq $0x4, %rcx
decw %di
jne 0x2867
incb %sil
movzwl (%rcx), %edi
rolw $0x8, %di
cmpw $0x14, %di
jne 0x2858
testb $0x1, %al
movb $0x1, %al
je 0x2858
movzwl 0x2(%rcx), %eax
rolw $0x8, %ax
cmpw $0xa, %ax
jne 0x2902
movzbl 0x5(%rcx), %eax
addq $0x6, %rcx
andl $0x1, %eax
movq %rcx, 0xb0(%rsp,%rax,8)
cmpq $0x0, 0xb0(%rsp)
je 0x28f5
cmpq $0x0, 0xb8(%rsp)
je 0x28f5
movq %rbp, %rdi
movl $0xd, %esi
xorl %edx, %edx
callq 0x3151
movzwl %bx, %esi
movq %r12, %rdi
leaq 0xb0(%rsp), %rdx
callq 0x3d1e
jmp 0x2d26
movzwl %dx, %edi
movl $0xb, %esi
jmp 0x2cdd
movzwl %dx, %edi
movl $0xf, %esi
jmp 0x2cdd
movzwl 0x4774(%rip), %edi      # 0x708a
movl $0x3, %esi
jmp 0x2d21
xorl %ecx, %ecx
movq %r13, %rsi
testb %cl, %cl
je 0x2951
movzbl %cl, %edx
movq %r13, %rsi
movq %rsi, %rdi
subq %rbp, %rdi
cmpq %rax, %rdi
jg 0x2964
movzwl 0x2(%rsi), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rsi
addq $0x4, %rsi
decw %dx
jne 0x292f
movq %rsi, %rdx
subq %rbp, %rdx
addq $-0x4, %rdx
cmpq %rax, %rdx
cmovgeq %r14, %rsi
jmp 0x2966
xorl %esi, %esi
testq %rsi, %rsi
je 0x2a9f
incb %cl
movzwl (%rsi), %edx
rolw $0x8, %dx
cmpw $0xe, %dx
jne 0x2922
jmp 0x2aa1
movq %r13, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x1652
jmp 0x2d26
xorl %ecx, %ecx
movq %r13, %rsi
testb %cl, %cl
je 0x29c7
movzbl %cl, %edx
movq %r13, %rsi
movq %rsi, %rdi
subq %rbp, %rdi
cmpq %rax, %rdi
jg 0x29da
movzwl 0x2(%rsi), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rsi
addq $0x4, %rsi
decw %dx
jne 0x29a5
movq %rsi, %rdx
subq %rbp, %rdx
addq $-0x4, %rdx
cmpq %rax, %rdx
cmovgeq %r14, %rsi
jmp 0x29dc
xorl %esi, %esi
testq %rsi, %rsi
je 0x2bff
incb %cl
movzwl (%rsi), %edx
rolw $0x8, %dx
cmpw $0xe, %dx
jne 0x2998
jmp 0x2c01
xorl %ecx, %ecx
movq %r13, %rdx
testb %cl, %cl
je 0x2a2a
movzbl %cl, %esi
movq %r13, %rdx
movq %rdx, %rdi
subq %rbp, %rdi
cmpq %rax, %rdi
jg 0x2a3d
movzwl 0x2(%rdx), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rdx
addq $0x4, %rdx
decw %si
jne 0x2a08
movq %rdx, %rsi
subq %rbp, %rsi
addq $-0x4, %rsi
cmpq %rax, %rsi
cmovgeq %r14, %rdx
jmp 0x2a3f
xorl %edx, %edx
testq %rdx, %rdx
je 0x2ce9
incb %cl
movzwl (%rdx), %esi
rolw $0x8, %si
cmpw $0xe, %si
jne 0x29fb
jmp 0x2ceb
movq %r13, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x1816
jmp 0x2d26
movq %r13, %rsi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x19b8
jmp 0x2d26
movzwl %si, %edi
jmp 0x2d1c
movzwl %dx, %edi
jmp 0x2cd8
movzwl %dx, %edi
movl $0xe, %esi
jmp 0x2cdd
xorl %esi, %esi
addq $0x4, %rsi
movl $0x8, %ecx
xorl %edx, %edx
movzbl (%rsi), %edi
shll %cl, %edi
orl %edi, %edx
incq %rsi
addq $-0x8, %rcx
je 0x2aac
xorl %ecx, %ecx
movq %r13, %rsi
testb %cl, %cl
je 0x2af0
movzbl %cl, %edi
movq %r13, %rsi
movq %rsi, %r8
subq %rbp, %r8
cmpq %rax, %r8
jg 0x2b03
movzwl 0x2(%rsi), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
addq %r8, %rsi
addq $0x4, %rsi
decw %di
jne 0x2acb
movq %rsi, %rdi
subq %rbp, %rdi
addq $-0x4, %rdi
cmpq %rax, %rdi
cmovgeq %r14, %rsi
jmp 0x2b05
xorl %esi, %esi
testq %rsi, %rsi
je 0x2b1b
incb %cl
movzwl (%rsi), %edi
rolw $0x8, %di
cmpw $0xf, %di
jne 0x2abe
jmp 0x2b1d
xorl %esi, %esi
addq $0x4, %rsi
movl $0x8, %ecx
xorl %r12d, %r12d
movzbl (%rsi), %edi
shll %cl, %edi
orl %edi, %r12d
incq %rsi
addq $-0x8, %rcx
je 0x2b29
cmpw 0x4549(%rip), %dx       # 0x708a
jne 0x2ce4
movl 0x453e(%rip), %r10d     # 0x708c
testl %r10d, %r10d
jle 0x2b77
movq 0x4536(%rip), %rcx      # 0x7090
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
testq %rsi, %rsi
je 0x2b6f
cmpw %r12w, (%rsi)
je 0x2ffc
incq %rdx
cmpq %rdx, %r10
jne 0x2b5c
movb 0x44fa(%rip), %r11b     # 0x7078
movzwl %r12w, %r15d
cmpb $0x2, %r11b
jb 0x2e01
xorl %ecx, %ecx
xorl %edx, %edx
xorl %esi, %esi
movq %r13, %rdi
testw %si, %si
je 0x2bc6
movl %ecx, %r8d
movq %r13, %rdi
movq %rdi, %r9
subq %rbp, %r9
cmpq %rax, %r9
jg 0x2bd9
movzwl 0x2(%rdi), %r9d
rolw $0x8, %r9w
movzwl %r9w, %r9d
addq %r9, %rdi
addq $0x4, %rdi
incw %r8w
jne 0x2ba0
movq %rdi, %r8
subq %rbp, %r8
addq $-0x4, %r8
cmpq %rax, %r8
cmovgeq %r14, %rdi
jmp 0x2bdb
xorl %edi, %edi
testq %rdi, %rdi
je 0x2df7
incl %esi
movzwl (%rdi), %edi
rolw $0x8, %di
xorl %r8d, %r8d
cmpw $0x19, %di
sete %r8b
addl %r8d, %edx
decl %ecx
jmp 0x2b92
xorl %esi, %esi
addq $0x4, %rsi
movl $0x8, %ecx
xorl %edx, %edx
movzbl (%rsi), %edi
shll %cl, %edi
orl %edi, %edx
incq %rsi
addq $-0x8, %rcx
je 0x2c0c
xorl %ecx, %ecx
movq %r13, %rsi
testb %cl, %cl
je 0x2c50
movzbl %cl, %edi
movq %r13, %rsi
movq %rsi, %r8
subq %rbp, %r8
cmpq %rax, %r8
jg 0x2c63
movzwl 0x2(%rsi), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
addq %r8, %rsi
addq $0x4, %rsi
decw %di
jne 0x2c2b
movq %rsi, %rdi
subq %rbp, %rdi
addq $-0x4, %rdi
cmpq %rax, %rdi
cmovgeq %r14, %rsi
jmp 0x2c65
xorl %esi, %esi
testq %rsi, %rsi
je 0x2c7b
incb %cl
movzwl (%rsi), %edi
rolw $0x8, %di
cmpw $0xf, %di
jne 0x2c1e
jmp 0x2c7d
xorl %esi, %esi
addq $0x4, %rsi
movl $0x8, %ecx
xorl %eax, %eax
movzbl (%rsi), %edi
shll %cl, %edi
orl %edi, %eax
incq %rsi
addq $-0x8, %rcx
je 0x2c88
cmpw 0x43eb(%rip), %dx       # 0x708a
jne 0x2ce4
movslq 0x43e4(%rip), %rcx      # 0x708c
testq %rcx, %rcx
jle 0x2ccd
movq 0x43dc(%rip), %rdx      # 0x7090
xorl %esi, %esi
movq (%rdx,%rsi,8), %r15
testq %r15, %r15
je 0x2cc5
cmpw %ax, (%r15)
je 0x2cd0
incq %rsi
cmpq %rsi, %rcx
jne 0x2cb6
xorl %r15d, %r15d
testq %r15, %r15
jne 0x2d45
movzwl %ax, %edi
movl $0x7, %esi
callq 0x1317
jmp 0x2d26
movzwl %dx, %edi
jmp 0x2d1c
xorl %edx, %edx
addq $0x4, %rdx
movl $0x8, %ecx
xorl %eax, %eax
movzbl (%rdx), %esi
shll %cl, %esi
orl %esi, %eax
incq %rdx
addq $-0x8, %rcx
je 0x2cf6
movzwl 0x437d(%rip), %edi      # 0x708a
cmpw %di, %ax
jne 0x2d19
callq 0x1949
jmp 0x2d26
movzwl %ax, %edi
movl $0x6, %esi
callq 0x10e0
movq 0x10(%rsp), %rdi
callq 0x1030
xorl %ebx, %ebx
movl 0xc(%rsp), %eax
movl %eax, %ebp
testb %bl, %bl
je 0x1c9f
jmp 0x313f
movq 0x42ac(%rip), %rcx      # 0x6ff8
movq (%rcx), %rdi
movzwl %ax, %edx
xorl %ebx, %ebx
leaq 0x268a(%rip), %rsi      # 0x53e5
xorl %eax, %eax
callq 0x1070
movb 0x4310(%rip), %al       # 0x7078
movb %al, 0xb0(%rsp)
movw $0x0, 0xb5(%rsp)
movl $0xf7030501, 0xb1(%rsp) # imm = 0xF7030501
movzwl 0x42ff(%rip), %eax      # 0x708a
leaq 0xb1(%rsp), %r9
leaq 0xb5(%rsp), %r10
movq %r10, %rdx
testb %bl, %bl
je 0x2dce
movzbl %bl, %ecx
movq %r10, %rdx
movq %rdx, %rsi
subq %r9, %rsi
cmpq $0x3f7, %rsi            # imm = 0x3F7
jg 0x2de5
movzwl 0x2(%rdx), %esi
rolw $0x8, %si
movzwl %si, %esi
addq %rsi, %rdx
addq $0x4, %rdx
decw %cx
jne 0x2da8
movq %rdx, %rcx
subq %r9, %rcx
addq $-0x4, %rcx
cmpq $0x3f7, %rcx            # imm = 0x3F7
cmovgeq %r14, %rdx
jmp 0x2de7
xorl %edx, %edx
testq %rdx, %rdx
je 0x2e46
incb %bl
movb 0x1(%rdx), %cl
orb (%rdx), %cl
jne 0x2d9b
jmp 0x2e48
cmpw $0x1, %dx
jne 0x2fef
movb %r11b, 0xb(%rsp)
movl $0x6, %edi
movq %r10, %rbx
callq 0x10a0
movq %rbx, %rdx
movq %rax, %rbx
xorl %eax, %eax
testl %edx, %edx
jle 0x3023
movq 0x4266(%rip), %rcx      # 0x7090
xorl %eax, %eax
cmpq $0x0, (%rcx,%rax,8)
je 0x301f
incq %rax
cmpq %rax, %rdx
jne 0x2e2c
movl %edx, %eax
jmp 0x3023
xorl %edx, %edx
movq %rdx, %rcx
subq %r9, %rcx
addq $0x4, %rcx
cmpq $0x3f7, %rcx            # imm = 0x3F7
jg 0x2e8c
movl $0x2000e00, (%rdx)      # imm = 0x2000E00
leaq 0x4(%rdx), %rsi
movl $0x8, %ecx
movl %eax, %edi
shrl %cl, %edi
movb %dil, (%rsi)
incq %rsi
addq $-0x8, %rcx
je 0x2e6a
movzwl 0x2(%rdx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movw $0x0, 0x4(%rdx,%rax)
movzwl (%r15), %eax
movzwl 0xb3(%rsp), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
xorl %esi, %esi
movq %r10, %rdx
testb %sil, %sil
je 0x2ed5
movzbl %sil, %edi
movq %r10, %rdx
movq %rdx, %r8
subq %r9, %r8
cmpq %rcx, %r8
jg 0x2ee8
movzwl 0x2(%rdx), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
addq %r8, %rdx
addq $0x4, %rdx
decw %di
jne 0x2eb0
movq %rdx, %rdi
subq %r9, %rdi
addq $-0x4, %rdi
cmpq %rcx, %rdi
cmovgeq %r14, %rdx
jmp 0x2eea
xorl %edx, %edx
testq %rdx, %rdx
je 0x2efd
incb %sil
movb 0x1(%rdx), %dil
orb (%rdx), %dil
jne 0x2ea1
jmp 0x2eff
xorl %edx, %edx
movq %rdx, %rsi
subq %r9, %rsi
addq $0x4, %rsi
cmpq %rcx, %rsi
jg 0x2f3f
movl $0x2000f00, (%rdx)      # imm = 0x2000F00
leaq 0x4(%rdx), %rsi
movl $0x8, %ecx
movl %eax, %edi
shrl %cl, %edi
movb %dil, (%rsi)
incq %rsi
addq $-0x8, %rcx
je 0x2f1d
movzwl 0x2(%rdx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movw $0x0, 0x4(%rdx,%rax)
movzwl 0xb3(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %eax
xorl %ecx, %ecx
movq %r10, %rsi
testb %cl, %cl
je 0x2f7f
movzbl %cl, %edx
movq %r10, %rsi
movq %rsi, %rdi
subq %r9, %rdi
cmpq %rax, %rdi
jg 0x2f92
movzwl 0x2(%rsi), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rsi
addq $0x4, %rsi
decw %dx
jne 0x2f5d
movq %rsi, %rdx
subq %r9, %rdx
addq $-0x4, %rdx
cmpq %rax, %rdx
cmovgeq %r14, %rsi
jmp 0x2f94
xorl %esi, %esi
testq %rsi, %rsi
je 0x2fa4
incb %cl
movb 0x1(%rsi), %dl
orb (%rsi), %dl
jne 0x2f50
jmp 0x2fa6
xorl %esi, %esi
movl %esi, %eax
subl %r9d, %eax
addl $-0x4, %eax
rolw $0x8, %ax
movw %ax, 0xb3(%rsp)
leaq 0xb0(%rsp), %rdi
subq %rdi, %rsi
callq 0x1c0d
movslq 0x40bb(%rip), %rax      # 0x708c
testq %rax, %rax
jle 0x3012
movq 0x40b3(%rip), %rcx      # 0x7090
xorl %edx, %edx
cmpq %r15, (%rcx,%rdx,8)
je 0x300a
incq %rdx
cmpq %rdx, %rax
jne 0x2fdf
jmp 0x3012
movl %r15d, %edi
movl $0x10, %esi
jmp 0x2cdd
movzwl %r12w, %edi
movl $0x14, %esi
jmp 0x2cdd
movq $0x0, (%rcx,%rdx,8)
movq %r15, %rdi
callq 0x1030
jmp 0x2d26
movq %rbx, (%rcx,%rax,8)
cmpl %edx, %eax
jne 0x305c
movq 0x4062(%rip), %rdi      # 0x7090
leal 0x1(%rdx), %eax
movl %eax, 0x4055(%rip)      # 0x708c
movl %r15d, 0x1c(%rsp)
movslq %edx, %r15
leaq 0x8(,%r15,8), %rsi
callq 0x10b0
movq %rax, 0x403d(%rip)      # 0x7090
movq %rbx, (%rax,%r15,8)
movl 0x1c(%rsp), %r15d
movw %r12w, (%rbx)
cmpb $0x2, 0xb(%rsp)
jb 0x3071
movq %rbp, %rdi
callq 0x3904
jmp 0x3073
xorl %eax, %eax
movq 0x10(%rsp), %rcx
movw %ax, 0x2(%rbx)
movzwl 0x3(%rcx), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
xorl %edx, %edx
movq %r13, %rax
testb %dl, %dl
je 0x30b8
movzbl %dl, %esi
movq %r13, %rax
movq %rax, %rdi
subq %rbp, %rdi
cmpq %rcx, %rdi
jg 0x30cb
movzwl 0x2(%rax), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rax
addq $0x4, %rax
decw %si
jne 0x3096
movq %rax, %rsi
subq %rbp, %rsi
addq $-0x4, %rsi
cmpq %rcx, %rsi
cmovgeq %r14, %rax
jmp 0x30cd
xorl %eax, %eax
testq %rax, %rax
je 0x30e3
incb %dl
movzwl (%rax), %esi
rolw $0x8, %si
cmpw $0x10, %si
jne 0x3089
jmp 0x30e5
xorl %eax, %eax
addq $0x4, %rax
movl $0x8, %ecx
xorl %edx, %edx
movzbl (%rax), %esi
shll %cl, %esi
orl %esi, %edx
incq %rax
addq $-0x8, %rcx
je 0x30f0
movw %dx, 0x4(%rbx)
movq 0x3eed(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movzwl 0x2(%rbx), %ecx
movzwl %dx, %eax
imull $0x64, %eax, %r8d
leaq 0x225b(%rip), %rsi      # 0x537b
movl %r15d, %edx
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
jmp 0x2414
movq %rsi, %rdi
callq 0x1a7d
movl $0x1, %eax
addq $0x4b8, %rsp            # imm = 0x4B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq