// File: /workspace/github_c_makefile_star2_O3/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 $0x4a8, %rsp            # imm = 0x4A8
cmpl $0x1, %edi
jg 0x2b02
movl $0x5, %edi
callq 0x10a0
movq %rax, %rbx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movups %xmm0, 0x8(%rsi)
movups %xmm0, 0x18(%rsi)
movups %xmm0, 0x28(%rsi)
movups %xmm0, 0x38(%rsi)
movups %xmm0, 0x48(%rsi)
movups %xmm0, 0x58(%rsi)
movups %xmm0, 0x68(%rsi)
xorl %eax, %eax
movq %rax, 0x78(%rsi)
movq $0x1, (%rsi)
leaq 0x10(%rsp), %r8
movq $0xa, (%r8)
movq %rax, 0x8(%r8)
movl $0x1, %edi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1090
testl %eax, %eax
js 0x2b0a
testl %eax, %eax
je 0x1ac0
movl $0x5, %esi
movq %rbx, %rdi
callq 0x18fc
testq %rax, %rax
jle 0x2b0a
movzwl 0x3(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %esi
addq $0x5, %rsi
movq %rbx, %rdi
callq 0x10b0
movq %rax, %rbp
leaq 0x5(%rax), %rdi
movzwl 0x3(%rax), %eax
rolw $0x8, %ax
movzwl %ax, %esi
movq %rdi, (%rsp)
callq 0x18fc
testq %rax, %rax
jle 0x2b0a
movq %rbp, %rbx
movb 0x45f0(%rip), %al       # 0x6088
movb (%rbp), %dl
testb %al, %al
je 0x1b83
cmpb 0x45cf(%rip), %dl       # 0x6078
je 0x1b8c
movzwl 0x45d4(%rip), %edi      # 0x608a
movl $0x2, %esi
jmp 0x2426
cmpb $0x1, 0x45c1(%rip)      # 0x6088
jne 0x2b0a
movq 0x4524(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
movzwl 0x45ac(%rip), %edx      # 0x608a
xorl %ebx, %ebx
leaq 0x27d1(%rip), %rsi      # 0x42b8
xorl %eax, %eax
callq 0x1070
movb 0x4584(%rip), %al       # 0x6078
movb %al, 0xa0(%rsp)
movw $0x0, 0xa5(%rsp)
movl $0xf7030200, 0xa1(%rsp) # imm = 0xF7030200
movzwl 0x4573(%rip), %eax      # 0x608a
leaq 0xa1(%rsp), %r8
leaq 0xa5(%rsp), %r9
movq %r9, %rcx
testb %bl, %bl
je 0x1b5e
movzbl %bl, %edx
movq %r9, %rcx
movq %rcx, %rsi
subq %r8, %rsi
cmpq $0x3f7, %rsi            # imm = 0x3F7
jg 0x1c53
movzwl 0x2(%rcx), %esi
rolw $0x8, %si
movzwl %si, %esi
addq %rsi, %rcx
addq $0x4, %rcx
decw %dx
jne 0x1b34
movq %rcx, %rdx
subq %r8, %rdx
addq $-0x4, %rdx
cmpq $0x3f6, %rdx            # imm = 0x3F6
jg 0x1c53
incb %bl
movb 0x1(%rcx), %dl
orb (%rcx), %dl
jne 0x1b27
jmp 0x1c55
cmpb $0x3, %dl
ja 0x1aaf
incq %rbp
movzwl 0x3(%rbx), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
cmpw $0x4, %cx
jb 0x1bbc
movzwl 0x7(%rbx), %esi
rolw $0x8, %si
movzwl %si, %r8d
movq (%rsp), %rdi
leaq (%rdi,%r8), %rsi
subq %rbp, %rsi
cmpq %rcx, %rsi
jle 0x1bc0
xorl %esi, %esi
jmp 0x1bf0
addq %r8, %rdi
addq $0x4, %rdi
movq %rdi, %rsi
subq %rbp, %rsi
cmpq %rcx, %rsi
jg 0x1bec
movzwl 0x2(%rdi), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
leaq (%rdi,%r8), %r9
subq %rbp, %r9
cmpq %rcx, %r9
jle 0x1bc0
addq $-0x4, %rsi
cmpq %rcx, %rsi
jne 0x241a
movzwl 0x1(%rbx), %edi
rolw $0x8, %di
movzwl %di, %esi
movw $0x0, 0xa4(%rsp)
movl $0x0, 0xa0(%rsp)
cmpl $0x100, %esi            # imm = 0x100
jle 0x1d04
leal -0x101(%rsi), %r8d
cmpl $0x5, %r8d
ja 0x1d30
leaq 0x2407(%rip), %r9       # 0x4044
movslq (%r9,%r8,4), %r8
addq %r9, %r8
jmpq *%r8
leaq 0x2532(%rip), %r8       # 0x4180
jmp 0x1d8e
xorl %ecx, %ecx
movq %rcx, %rsi
subq %r8, %rsi
addq $0x4, %rsi
movl $0x3f7, %edx            # imm = 0x3F7
cmpq $0x3f7, %rsi            # imm = 0x3F7
jg 0x1c8e
movl $0x2000e00, (%rcx)      # imm = 0x2000E00
movb %ah, 0x4(%rcx)
movb %al, 0x5(%rcx)
movw $0x0, 0x6(%rcx)
movzwl 0xa3(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %edx
xorl %eax, %eax
movq %r9, %rsi
testb %al, %al
je 0x1cbf
movzbl %al, %ecx
movq %r9, %rsi
movq %rsi, %rdi
subq %r8, %rdi
cmpq %rdx, %rdi
jg 0x1cd9
movzwl 0x2(%rsi), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rsi
addq $0x4, %rsi
decw %cx
jne 0x1c9d
movq %rsi, %rcx
subq %r8, %rcx
addq $-0x4, %rcx
cmpq %rdx, %rcx
jge 0x1cd9
incb %al
movb 0x1(%rsi), %cl
orb (%rsi), %cl
jne 0x1c90
jmp 0x1cdb
xorl %esi, %esi
movl %esi, %eax
subl %r8d, %eax
addl $-0x4, %eax
rolw $0x8, %ax
movw %ax, 0xa3(%rsp)
leaq 0xa0(%rsp), %rdi
subq %rdi, %rsi
callq 0x195e
jmp 0x2a88
leal -0x1(%rsi), %r9d
leaq 0xa0(%rsp), %r8
cmpl $0x4, %r9d
ja 0x1d8e
leaq 0x2313(%rip), %r10      # 0x4030
movslq (%r10,%r9,4), %r8
addq %r10, %r8
jmpq *%r8
leaq 0x23dc(%rip), %r8       # 0x410a
jmp 0x1d8e
cmpl $0x201, %esi            # imm = 0x201
je 0x1d6c
leaq 0xa0(%rsp), %r8
cmpl $0x202, %esi            # imm = 0x202
jne 0x1d8e
leaq 0x24a1(%rip), %r8       # 0x41f0
jmp 0x1d8e
leaq 0x23c8(%rip), %r8       # 0x4120
jmp 0x1d8e
leaq 0x23df(%rip), %r8       # 0x4140
jmp 0x1d8e
leaq 0x2326(%rip), %r8       # 0x4090
jmp 0x1d8e
leaq 0x244d(%rip), %r8       # 0x41c0
jmp 0x1d8e
leaq 0x2334(%rip), %r8       # 0x40b0
jmp 0x1d8e
leaq 0x241b(%rip), %r8       # 0x41a0
jmp 0x1d8e
leaq 0x23d2(%rip), %r8       # 0x4160
movq %rbx, 0x8(%rsp)
movzwl (%r8), %r10d
testw %r10w, %r10w
je 0x1e37
leaq 0x6(%r8), %r9
xorl %r14d, %r14d
xorl %r11d, %r11d
xorl %r12d, %r12d
movq (%rsp), %rbx
testw %r12w, %r12w
je 0x1de5
movl %r14d, %r15d
movq (%rsp), %rbx
movq %rbx, %r13
subq %rbp, %r13
cmpq %rcx, %r13
jg 0x1e11
movzwl 0x2(%rbx), %r13d
rolw $0x8, %r13w
movzwl %r13w, %r13d
addq %r13, %rbx
addq $0x4, %rbx
incw %r15w
jne 0x1dbf
movq %rbx, %r15
subq %rbp, %r15
addq $-0x4, %r15
cmpq %rcx, %r15
jge 0x1e11
incl %r12d
movzwl (%rbx), %ebx
rolw $0x8, %bx
xorl %r15d, %r15d
cmpw %r10w, %bx
sete %r15b
addl %r15d, %r11d
decl %r14d
jmp 0x1dae
cmpw 0x2(%r8), %r11w
jb 0x1e26
cmpw 0x4(%r8), %r11w
movq %r9, %r8
jbe 0x1d93
movzwl 0x425d(%rip), %edi      # 0x608a
movl $0xf, %esi
jmp 0x243f
xorl %r8d, %r8d
xorl %r9d, %r9d
movq (%rsp), %r10
testw %r9w, %r9w
je 0x1e72
movl %r8d, %r11d
movq (%rsp), %r10
movq %r10, %rbx
subq %rbp, %rbx
cmpq %rcx, %rbx
jg 0x1ed1
movzwl 0x2(%r10), %ebx
rolw $0x8, %bx
movzwl %bx, %ebx
addq %rbx, %r10
addq $0x4, %r10
incw %r11w
jne 0x1e4e
movq %r10, %r11
subq %rbp, %r11
addq $-0x4, %r11
cmpq %rcx, %r11
jge 0x1ed1
movzwl (%r10), %r11d
movzwl 0x2(%r10), %r10d
rolw $0x8, %r11w
movzwl %r11w, %r11d
rolw $0x8, %r10w
cmpw $0x19, %r11w
ja 0x1eb2
leaq 0x236a(%rip), %rbx      # 0x4210
cmpw (%rbx,%r11,2), %r10w
jae 0x1ec6
jmp 0x1e26
cmpl $0x7000, %r11d          # imm = 0x7000
jne 0x1ec6
cmpw $0x2, %r10w
jb 0x1e26
incl %r9d
decl %r8d
jmp 0x1e3d
cmpw $0x1, %di
sete %dil
orb %al, %dil
je 0x2433
leal -0x1(%rsi), %edi
cmpl $0x4, %edi
jbe 0x1fe6
leal -0x101(%rsi), %eax
cmpl $0x5, %eax
movq 0x8(%rsp), %r9
ja 0x2061
leaq 0x2167(%rip), %rdx      # 0x4070
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
xorl %eax, %eax
movq (%rsp), %rdx
testb %al, %al
je 0x1f3a
movzbl %al, %ecx
movq (%rsp), %rdx
movzwl 0x2(%rdx), %esi
rolw $0x8, %si
movzwl %si, %esi
addq %rsi, %rdx
addq $0x4, %rdx
decw %cx
jne 0x1f23
incb %al
movzwl (%rdx), %ecx
rolw $0x8, %cx
cmpw $0xe, %cx
jne 0x1f14
movzbl 0x4(%rdx), %ecx
movzbl 0x5(%rdx), %eax
xorl %esi, %esi
movq (%rsp), %rdx
testb %sil, %sil
je 0x1f7e
movzbl %sil, %edi
movq (%rsp), %rdx
movzwl 0x2(%rdx), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
addq %r8, %rdx
addq $0x4, %rdx
decw %di
jne 0x1f64
incb %sil
movzwl (%rdx), %edi
rolw $0x8, %di
cmpw $0xf, %di
jne 0x1f53
movzwl %cx, %ecx
shll $0x8, %ecx
movzwl %ax, %eax
orl %ecx, %eax
cmpw 0x40ea(%rip), %ax       # 0x608a
jne 0x26b4
movzwl 0x4(%rdx), %eax
rolw $0x8, %ax
movslq 0x40d7(%rip), %rcx      # 0x608c
testq %rcx, %rcx
jle 0x2144
movq 0x40cb(%rip), %rdx      # 0x6090
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
testq %rdi, %rdi
je 0x1fd9
cmpw %ax, (%rdi)
je 0x2a76
incq %rsi
cmpq %rsi, %rcx
jne 0x1fc7
jmp 0x2144
leaq 0x206f(%rip), %r8       # 0x405c
movslq (%r8,%rdi,4), %rsi
addq %r8, %rsi
movq 0x8(%rsp), %r9
jmpq *%rsi
testb %al, %al
jne 0x2005
movb %dl, 0x4073(%rip)       # 0x6078
xorl %edx, %edx
movq (%rsp), %rsi
testb %dl, %dl
je 0x2030
movzbl %dl, %edi
movq (%rsp), %rsi
movzwl 0x2(%rsi), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
addq %r8, %rsi
addq $0x4, %rsi
decw %di
jne 0x2016
incb %dl
movzwl (%rsi), %edi
rolw $0x8, %di
cmpw $0xe, %di
jne 0x2007
movzwl 0x4(%rsi), %edi
rolw $0x8, %di
testb %al, %al
je 0x272c
cmpw 0x4034(%rip), %di       # 0x608a
je 0x2a80
jmp 0x270e
cmpl $0x201, %esi            # imm = 0x201
jne 0x2468
xorl %eax, %eax
movq (%rsp), %rsi
testb %al, %al
je 0x2095
movzbl %al, %edx
movq (%rsp), %rsi
movzwl 0x2(%rsi), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rsi
addq $0x4, %rsi
decw %dx
jne 0x207e
incb %al
movzwl (%rsi), %edx
rolw $0x8, %dx
cmpw $0xe, %dx
jne 0x206f
movzbl 0x4(%rsi), %edx
movzbl 0x5(%rsi), %eax
xorl %esi, %esi
movq (%rsp), %rdi
testb %sil, %sil
je 0x20da
movzbl %sil, %r8d
movq (%rsp), %rdi
movzwl 0x2(%rdi), %r9d
rolw $0x8, %r9w
movzwl %r9w, %r9d
addq %r9, %rdi
addq $0x4, %rdi
decw %r8w
jne 0x20bf
incb %sil
movzwl (%rdi), %r8d
rolw $0x8, %r8w
cmpw $0xf, %r8w
jne 0x20ae
movzwl %dx, %esi
shll $0x8, %esi
movzwl %ax, %edx
orl %esi, %edx
movzwl 0x4(%rdi), %eax
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
cmpw 0x3f7c(%rip), %dx       # 0x608a
jne 0x273d
rolw $0x8, %ax
movslq 0x3f6d(%rip), %rdx      # 0x608c
testq %rdx, %rdx
jle 0x2144
movq 0x3f65(%rip), %rsi      # 0x6090
xorl %edi, %edi
movq (%rsi,%rdi,8), %r14
testq %r14, %r14
je 0x213c
cmpw %ax, (%r14)
je 0x21a7
incq %rdi
cmpq %rdi, %rdx
jne 0x212d
movzwl %ax, %edi
movl $0x7, %esi
jmp 0x2757
xorl %eax, %eax
movq (%rsp), %rcx
testb %al, %al
je 0x2179
movzbl %al, %edx
movq (%rsp), %rcx
movzwl 0x2(%rcx), %esi
rolw $0x8, %si
movzwl %si, %esi
addq %rsi, %rcx
addq $0x4, %rcx
decw %dx
jne 0x2162
incb %al
movzwl (%rcx), %edx
rolw $0x8, %dx
cmpw $0xe, %dx
jne 0x2153
movzwl 0x4(%rcx), %eax
rolw $0x8, %ax
cmpw 0x3ef3(%rip), %ax       # 0x608a
jne 0x2727
callq 0x2b96
jmp 0x2a7b
xorl %edx, %edx
xorl %esi, %esi
xorl %edi, %edi
movq (%rsp), %r8
testw %di, %di
je 0x21e3
movl %edx, %r9d
movq (%rsp), %r8
movq %r8, %r10
subq %rbp, %r10
cmpq %rcx, %r10
jg 0x2210
movzwl 0x2(%r8), %r10d
rolw $0x8, %r10w
movzwl %r10w, %r10d
addq %r10, %r8
addq $0x4, %r8
incw %r9w
jne 0x21bd
movq %r8, %r9
subq %rbp, %r9
addq $-0x4, %r9
cmpq %rcx, %r9
jge 0x2210
incl %edi
movzwl (%r8), %r8d
rolw $0x8, %r8w
xorl %r9d, %r9d
cmpw $0x18, %r8w
sete %r9b
addl %r9d, %esi
decl %edx
jmp 0x21ad
testw %si, %si
jne 0x274f
xorl %edx, %edx
xorl %esi, %esi
xorl %edi, %edi
movq (%rsp), %r8
testw %di, %di
je 0x2255
movl %edx, %r9d
movq (%rsp), %r8
movq %r8, %r10
subq %rbp, %r10
cmpq %rcx, %r10
jg 0x2282
movzwl 0x2(%r8), %r10d
rolw $0x8, %r10w
movzwl %r10w, %r10d
addq %r10, %r8
addq $0x4, %r8
incw %r9w
jne 0x222f
movq %r8, %r9
subq %rbp, %r9
addq $-0x4, %r9
cmpq %rcx, %r9
jge 0x2282
incl %edi
movzwl (%r8), %r8d
rolw $0x8, %r8w
xorl %r9d, %r9d
cmpw $0x14, %r8w
sete %r9b
addl %r9d, %esi
decl %edx
jmp 0x221f
cmpw $0x2, %si
jne 0x244e
xorl %edx, %edx
movq (%rsp), %rsi
testb %dl, %dl
je 0x22b7
movzbl %dl, %edi
movq (%rsp), %rsi
movzwl 0x2(%rsi), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
addq %r8, %rsi
addq $0x4, %rsi
decw %di
jne 0x229d
incb %dl
movzwl (%rsi), %edi
rolw $0x8, %di
cmpw $0x12, %di
jne 0x228e
movzwl 0x4(%rsi), %ebx
rolw $0x8, %bx
xorl %esi, %esi
movq (%rsp), %rdx
testb %sil, %sil
je 0x2306
movzbl %sil, %edi
movq (%rsp), %rdx
movq %rdx, %r8
subq %rbp, %r8
cmpq %rcx, %r8
jg 0x2327
movzwl 0x2(%rdx), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
addq %r8, %rdx
addq $0x4, %rdx
decw %di
jne 0x22e1
movq %rdx, %rdi
subq %rbp, %rdi
addq $-0x4, %rdi
cmpq %rcx, %rdi
jge 0x2327
incb %sil
movzwl (%rdx), %edi
rolw $0x8, %di
cmpw $0x14, %di
jne 0x22d0
jmp 0x2329
xorl %edx, %edx
movzwl 0x2(%rdx), %esi
rolw $0x8, %si
cmpw $0xa, %si
jne 0x245b
movzbl 0x5(%rdx), %esi
addq $0x6, %rdx
andl $0x1, %esi
movq %rdx, 0xa0(%rsp,%rsi,8)
xorl %esi, %esi
xorl %edi, %edi
movq (%rsp), %rdx
testb %dil, %dil
je 0x2389
movzbl %dil, %r8d
movq (%rsp), %rdx
movq %rdx, %r9
subq %rbp, %r9
cmpq %rcx, %r9
jg 0x23b6
movzwl 0x2(%rdx), %r9d
rolw $0x8, %r9w
movzwl %r9w, %r9d
addq %r9, %rdx
addq $0x4, %rdx
decw %r8w
jne 0x2363
movq %rdx, %r8
subq %rbp, %r8
addq $-0x4, %r8
cmpq %rcx, %r8
jge 0x23b6
incb %dil
movzwl (%rdx), %r8d
rolw $0x8, %r8w
cmpw $0x14, %r8w
jne 0x2352
testb $0x1, %sil
movb $0x1, %sil
je 0x2352
jmp 0x23b8
xorl %edx, %edx
movzwl 0x2(%rdx), %ecx
rolw $0x8, %cx
cmpw $0xa, %cx
jne 0x245b
movzbl 0x5(%rdx), %ecx
addq $0x6, %rdx
andl $0x1, %ecx
movq %rdx, 0xa0(%rsp,%rcx,8)
cmpq $0x0, 0xa0(%rsp)
je 0x244e
cmpq $0x0, 0xa8(%rsp)
je 0x244e
movq %rbp, %rdi
movl $0xd, %esi
xorl %edx, %edx
callq 0x2b21
movzwl %bx, %esi
movq %r14, %rdi
leaq 0xa0(%rsp), %rdx
callq 0x3482
jmp 0x2a7b
movzwl 0x3c69(%rip), %edi      # 0x608a
movl $0x1, %esi
callq 0x10e0
movq %rbx, %rdi
jmp 0x2a83
movzwl 0x3c50(%rip), %edi      # 0x608a
movl $0x6, %esi
callq 0x10e0
movq 0x8(%rsp), %rdi
jmp 0x2a83
movzwl %ax, %edi
movl $0xb, %esi
jmp 0x2757
movzwl %ax, %edi
movl $0xf, %esi
jmp 0x2757
movzwl 0x3c1b(%rip), %edi      # 0x608a
movl $0x3, %esi
jmp 0x2745
xorl %eax, %eax
movq (%rsp), %rsi
testb %al, %al
je 0x24a1
movzbl %al, %edx
movq (%rsp), %rsi
movzwl 0x2(%rsi), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rsi
addq $0x4, %rsi
decw %dx
jne 0x248a
incb %al
movzwl (%rsi), %edx
rolw $0x8, %dx
cmpw $0xe, %dx
jne 0x247b
movzbl 0x4(%rsi), %edx
movzbl 0x5(%rsi), %eax
xorl %edi, %edi
movq (%rsp), %rsi
testb %dil, %dil
je 0x24e6
movzbl %dil, %r8d
movq (%rsp), %rsi
movzwl 0x2(%rsi), %r9d
rolw $0x8, %r9w
movzwl %r9w, %r9d
addq %r9, %rsi
addq $0x4, %rsi
decw %r8w
jne 0x24cb
incb %dil
movzwl (%rsi), %r8d
rolw $0x8, %r8w
cmpw $0xf, %r8w
jne 0x24ba
movzwl %dx, %edx
shll $0x8, %edx
movzwl %ax, %eax
orl %edx, %eax
cmpw 0x3b7f(%rip), %ax       # 0x608a
jne 0x26b4
movzwl 0x4(%rsi), %r15d
rolw $0x8, %r15w
movzwl %r15w, %ebx
movslq 0x3b66(%rip), %r14      # 0x608c
testq %r14, %r14
jle 0x254f
movq 0x3b5e(%rip), %rax      # 0x6090
xorl %edx, %edx
movq (%rax,%rdx,8), %rsi
testq %rsi, %rsi
je 0x2547
cmpw %r15w, (%rsi)
je 0x27a9
incq %rdx
cmpq %rdx, %r14
jne 0x2534
movb 0x3b22(%rip), %r12b     # 0x6078
cmpb $0x2, %r12b
jb 0x2767
xorl %eax, %eax
xorl %edx, %edx
xorl %esi, %esi
movq (%rsp), %rdi
testw %si, %si
je 0x25a0
movl %eax, %r8d
movq (%rsp), %rdi
movq %rdi, %r9
subq %rbp, %r9
cmpq %rcx, %r9
jg 0x2761
movzwl 0x2(%rdi), %r9d
rolw $0x8, %r9w
movzwl %r9w, %r9d
addq %r9, %rdi
addq $0x4, %rdi
incw %r8w
jne 0x2576
movq %rdi, %r8
subq %rbp, %r8
addq $-0x4, %r8
cmpq %rcx, %r8
jge 0x2761
incl %esi
movzwl (%rdi), %edi
rolw $0x8, %di
xorl %r8d, %r8d
cmpw $0x19, %di
sete %r8b
addl %r8d, %edx
decl %eax
jmp 0x2566
movq (%rsp), %rdi
movq %rbp, %rsi
movq %rcx, %rdx
callq 0x1564
jmp 0x2a7b
xorl %eax, %eax
movq (%rsp), %rdx
testb %al, %al
je 0x260a
movzbl %al, %ecx
movq (%rsp), %rdx
movzwl 0x2(%rdx), %esi
rolw $0x8, %si
movzwl %si, %esi
addq %rsi, %rdx
addq $0x4, %rdx
decw %cx
jne 0x25f3
incb %al
movzwl (%rdx), %ecx
rolw $0x8, %cx
cmpw $0xe, %cx
jne 0x25e4
movzbl 0x4(%rdx), %ecx
movzbl 0x5(%rdx), %eax
xorl %esi, %esi
movq (%rsp), %rdx
testb %sil, %sil
je 0x264e
movzbl %sil, %edi
movq (%rsp), %rdx
movzwl 0x2(%rdx), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
addq %r8, %rdx
addq $0x4, %rdx
decw %di
jne 0x2634
incb %sil
movzwl (%rdx), %edi
rolw $0x8, %di
cmpw $0xf, %di
jne 0x2623
movzwl %cx, %ecx
shll $0x8, %ecx
movzwl %ax, %eax
orl %ecx, %eax
cmpw 0x3a1a(%rip), %ax       # 0x608a
jne 0x26b4
movzwl 0x4(%rdx), %eax
rolw $0x8, %ax
movzwl %ax, %edx
movslq 0x3a08(%rip), %rcx      # 0x608c
testq %rcx, %rcx
jle 0x26ad
movq 0x3a00(%rip), %rsi      # 0x6090
xorl %edi, %edi
movq (%rsi,%rdi,8), %r14
testq %r14, %r14
je 0x26a5
cmpw %ax, (%r14)
je 0x27b2
incq %rdi
cmpq %rdi, %rcx
jne 0x2692
movl %edx, %edi
jmp 0x2147
movzwl %ax, %edi
jmp 0x2740
xorl %eax, %eax
movq (%rsp), %rcx
testb %al, %al
je 0x26e4
movzbl %al, %edx
movq (%rsp), %rcx
movzwl 0x2(%rcx), %esi
rolw $0x8, %si
movzwl %si, %esi
addq %rsi, %rcx
addq $0x4, %rcx
decw %dx
jne 0x26cd
incb %al
movzwl (%rcx), %edx
rolw $0x8, %dx
cmpw $0xe, %dx
jne 0x26be
movzwl 0x4(%rcx), %edi
rolw $0x8, %di
cmpw 0x3988(%rip), %di       # 0x608a
jne 0x270e
callq 0x1705
jmp 0x2a7b
movzwl %di, %edi
jmp 0x2740
movq (%rsp), %rdi
movq %rbp, %rsi
movq %rcx, %rdx
callq 0x1659
jmp 0x2a7b
movzwl %ax, %edi
jmp 0x2740
movq (%rsp), %rsi
movq %rbp, %rdx
callq 0x1770
jmp 0x2a7b
movzwl %dx, %edi
movl $0x6, %esi
callq 0x10e0
jmp 0x2a7b
movzwl %ax, %edi
movl $0xe, %esi
callq 0x12b8
jmp 0x2a7b
cmpw $0x1, %dx
jne 0x27a0
movl $0x6, %edi
callq 0x10a0
movq %rax, %r13
xorl %eax, %eax
testl %r14d, %r14d
jle 0x29c1
movq 0x390a(%rip), %rdi      # 0x6090
xorl %eax, %eax
cmpq $0x0, (%rdi,%rax,8)
je 0x29bd
incq %rax
cmpq %rax, %r14
jne 0x2788
jmp 0x29cd
movl %ebx, %edi
movl $0x10, %esi
jmp 0x2757
movl %ebx, %edi
movl $0x14, %esi
jmp 0x2757
movq 0x383f(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
xorl %ebp, %ebp
leaq 0x1c30(%rip), %rsi      # 0x43f5
xorl %eax, %eax
callq 0x1070
movb 0x38a6(%rip), %al       # 0x6078
movb %al, 0xa0(%rsp)
movw $0x0, 0xa5(%rsp)
movl $0xf7030501, 0xa1(%rsp) # imm = 0xF7030501
movzwl 0x3895(%rip), %ecx      # 0x608a
leaq 0xa1(%rsp), %r9
leaq 0xa5(%rsp), %r10
movq %r10, %rdx
testb %bpl, %bpl
je 0x283a
movzbl %bpl, %eax
movq %r10, %rdx
movq %rdx, %rsi
subq %r9, %rsi
cmpq $0x3f7, %rsi            # imm = 0x3F7
jg 0x2858
movzwl 0x2(%rdx), %esi
rolw $0x8, %si
movzwl %si, %esi
addq %rsi, %rdx
addq $0x4, %rdx
decw %ax
jne 0x2814
movq %rdx, %rax
subq %r9, %rax
addq $-0x4, %rax
cmpq $0x3f6, %rax            # imm = 0x3F6
jg 0x2858
incb %bpl
movb 0x1(%rdx), %al
orb (%rdx), %al
jne 0x2805
jmp 0x285a
xorl %edx, %edx
movq %rdx, %rsi
subq %r9, %rsi
addq $0x4, %rsi
movl $0x3f7, %eax            # imm = 0x3F7
cmpq $0x3f7, %rsi            # imm = 0x3F7
jg 0x2893
movl $0x2000e00, (%rdx)      # imm = 0x2000E00
movb %ch, 0x4(%rdx)
movb %cl, 0x5(%rdx)
movw $0x0, 0x6(%rdx)
movzwl 0xa3(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movzwl (%r14), %ecx
xorl %esi, %esi
movq %r10, %rdx
testb %sil, %sil
je 0x28cd
movzbl %sil, %edi
movq %r10, %rdx
movq %rdx, %r8
subq %r9, %r8
cmpq %rax, %r8
jg 0x28ea
movzwl 0x2(%rdx), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
addq %r8, %rdx
addq $0x4, %rdx
decw %di
jne 0x28a8
movq %rdx, %rdi
subq %r9, %rdi
addq $-0x4, %rdi
cmpq %rax, %rdi
jge 0x28ea
incb %sil
movb 0x1(%rdx), %dil
orb (%rdx), %dil
jne 0x2899
jmp 0x28ec
xorl %edx, %edx
movq %rdx, %rsi
subq %r9, %rsi
addq $0x4, %rsi
cmpq %rax, %rsi
jg 0x291c
movl $0x2000f00, (%rdx)      # imm = 0x2000F00
movb %ch, 0x4(%rdx)
movb %cl, 0x5(%rdx)
movw $0x0, 0x6(%rdx)
movzwl 0xa3(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %eax
xorl %ecx, %ecx
movq %r10, %rsi
testb %cl, %cl
je 0x294d
movzbl %cl, %edx
movq %r10, %rsi
movq %rsi, %rdi
subq %r9, %rdi
cmpq %rax, %rdi
jg 0x2967
movzwl 0x2(%rsi), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rsi
addq $0x4, %rsi
decw %dx
jne 0x292b
movq %rsi, %rdx
subq %r9, %rdx
addq $-0x4, %rdx
cmpq %rax, %rdx
jge 0x2967
incb %cl
movb 0x1(%rsi), %dl
orb (%rsi), %dl
jne 0x291e
jmp 0x2969
xorl %esi, %esi
movl %esi, %eax
subl %r9d, %eax
addl $-0x4, %eax
rolw $0x8, %ax
movw %ax, 0xa3(%rsp)
leaq 0xa0(%rsp), %rdi
subq %rdi, %rsi
callq 0x195e
movslq 0x36f8(%rip), %rax      # 0x608c
testq %rax, %rax
jle 0x2af5
movq 0x36ec(%rip), %rcx      # 0x6090
xorl %edx, %edx
cmpq %r14, (%rcx,%rdx,8)
je 0x2aed
incq %rdx
cmpq %rdx, %rax
jne 0x29a6
jmp 0x2af5
movq %r13, (%rdi,%rax,8)
cmpl %r14d, %eax
jne 0x29ef
movq 0x36c3(%rip), %rdi      # 0x6090
leaq 0x1(%r14), %rax
movl %eax, 0x36b5(%rip)      # 0x608c
leaq 0x8(,%r14,8), %rsi
callq 0x10b0
movq %rax, 0x36a5(%rip)      # 0x6090
movq %r13, (%rax,%r14,8)
movw %r15w, (%r13)
cmpb $0x2, %r12b
jb 0x2a04
movq %rbp, %rdi
callq 0x313e
jmp 0x2a06
xorl %eax, %eax
movw %ax, 0x2(%r13)
xorl %ecx, %ecx
movq (%rsp), %rdx
testb %cl, %cl
je 0x2a33
movzbl %cl, %esi
movq (%rsp), %rdx
movzwl 0x2(%rdx), %edi
rolw $0x8, %di
movzwl %di, %edi
addq %rdi, %rdx
addq $0x4, %rdx
decw %si
jne 0x2a1c
incb %cl
movzwl (%rdx), %esi
rolw $0x8, %si
cmpw $0x10, %si
jne 0x2a0d
movzwl 0x4(%rdx), %ecx
rolw $0x8, %cx
movzwl %cx, %edx
movw %dx, 0x4(%r13)
movq 0x359f(%rip), %rcx      # 0x5ff8
movq (%rcx), %rdi
movzwl %ax, %ecx
imull $0x64, %edx, %r8d
leaq 0x1921(%rip), %rsi      # 0x438b
movl %ebx, %edx
xorl %eax, %eax
callq 0x1070
movq %r13, %rdi
callq 0x3180
movq 0x8(%rsp), %r9
movq %r9, %rdi
callq 0x1030
movl $0x5, %edi
callq 0x10a0
movq %rax, %rbx
leaq 0x28(%rsp), %rax
xorl %ecx, %ecx
movq %rcx, 0x70(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x1, 0x20(%rsp)
movq $0xa, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movl $0x1, %edi
leaq 0x20(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
leaq 0x10(%rsp), %r8
jmp 0x1a29
movq $0x0, (%rcx,%rdx,8)
movq %r14, %rdi
callq 0x1030
jmp 0x2a7b
movq %rsi, %rdi
callq 0x17ea
movl $0x1, %eax
addq $0x4a8, %rsp            # imm = 0x4A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq