// File: /workspace/github_cpp_makefile_star2_O1/jimmiebergmann[P]fbx-file/miniz.c
// Function: tdefl_compress_normal(tdefl_compressor*)
static mz_bool tdefl_compress_normal(tdefl_compressor *d)
{
    const mz_uint8 *pSrc = d->m_pSrc;
    size_t src_buf_left = d->m_src_buf_left;
    tdefl_flush flush = d->m_flush;

    while ((src_buf_left) || ((flush) && (d->m_lookahead_size)))
    {
        mz_uint len_to_move, cur_match_dist, cur_match_len, cur_pos;
        /* Update dictionary and hash chains. Keeps the lookahead size equal to TDEFL_MAX_MATCH_LEN. */
        if ((d->m_lookahead_size + d->m_dict_size) >= (TDEFL_MIN_MATCH_LEN - 1))
        {
            mz_uint dst_pos = (d->m_lookahead_pos + d->m_lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK, ins_pos = d->m_lookahead_pos + d->m_lookahead_size - 2;
            mz_uint hash = (d->m_dict[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] << TDEFL_LZ_HASH_SHIFT) ^ d->m_dict[(ins_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK];
            mz_uint num_bytes_to_process = (mz_uint)MZ_MIN(src_buf_left, TDEFL_MAX_MATCH_LEN - d->m_lookahead_size);
            const mz_uint8 *pSrc_end = pSrc + num_bytes_to_process;
            src_buf_left -= num_bytes_to_process;
            d->m_lookahead_size += num_bytes_to_process;
            while (pSrc != pSrc_end)
            {
                mz_uint8 c = *pSrc++;
                d->m_dict[dst_pos] = c;
                if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1))
                    d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c;
                hash = ((hash << TDEFL_LZ_HASH_SHIFT) ^ c) & (TDEFL_LZ_HASH_SIZE - 1);
                d->m_next[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] = d->m_hash[hash];
                d->m_hash[hash] = (mz_uint16)(ins_pos);
                dst_pos = (dst_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK;
                ins_pos++;
            }
        }
        else
        {
            while ((src_buf_left) && (d->m_lookahead_size < TDEFL_MAX_MATCH_LEN))
            {
                mz_uint8 c = *pSrc++;
                mz_uint dst_pos = (d->m_lookahead_pos + d->m_lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK;
                src_buf_left--;
                d->m_dict[dst_pos] = c;
                if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1))
                    d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c;
                if ((++d->m_lookahead_size + d->m_dict_size) >= TDEFL_MIN_MATCH_LEN)
                {
                    mz_uint ins_pos = d->m_lookahead_pos + (d->m_lookahead_size - 1) - 2;
                    mz_uint hash = ((d->m_dict[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] << (TDEFL_LZ_HASH_SHIFT * 2)) ^ (d->m_dict[(ins_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK] << TDEFL_LZ_HASH_SHIFT) ^ c) & (TDEFL_LZ_HASH_SIZE - 1);
                    d->m_next[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] = d->m_hash[hash];
                    d->m_hash[hash] = (mz_uint16)(ins_pos);
                }
            }
        }
        d->m_dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - d->m_lookahead_size, d->m_dict_size);
        if ((!flush) && (d->m_lookahead_size < TDEFL_MAX_MATCH_LEN))
            break;

        /* Simple lazy/greedy parsing state machine. */
        len_to_move = 1;
        cur_match_dist = 0;
        cur_match_len = d->m_saved_match_len ? d->m_saved_match_len : (TDEFL_MIN_MATCH_LEN - 1);
        cur_pos = d->m_lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK;
        if (d->m_flags & (TDEFL_RLE_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS))
        {
            if ((d->m_dict_size) && (!(d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS)))
            {
                mz_uint8 c = d->m_dict[(cur_pos - 1) & TDEFL_LZ_DICT_SIZE_MASK];
                cur_match_len = 0;
                while (cur_match_len < d->m_lookahead_size)
                {
                    if (d->m_dict[cur_pos + cur_match_len] != c)
                        break;
                    cur_match_len++;
                }
                if (cur_match_len < TDEFL_MIN_MATCH_LEN)
                    cur_match_len = 0;
                else
                    cur_match_dist = 1;
            }
        }
        else
        {
            tdefl_find_match(d, d->m_lookahead_pos, d->m_dict_size, d->m_lookahead_size, &cur_match_dist, &cur_match_len);
        }
        if (((cur_match_len == TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 8U * 1024U)) || (cur_pos == cur_match_dist) || ((d->m_flags & TDEFL_FILTER_MATCHES) && (cur_match_len <= 5)))
        {
            cur_match_dist = cur_match_len = 0;
        }
        if (d->m_saved_match_len)
        {
            if (cur_match_len > d->m_saved_match_len)
            {
                tdefl_record_literal(d, (mz_uint8)d->m_saved_lit);
                if (cur_match_len >= 128)
                {
                    tdefl_record_match(d, cur_match_len, cur_match_dist);
                    d->m_saved_match_len = 0;
                    len_to_move = cur_match_len;
                }
                else
                {
                    d->m_saved_lit = d->m_dict[cur_pos];
                    d->m_saved_match_dist = cur_match_dist;
                    d->m_saved_match_len = cur_match_len;
                }
            }
            else
            {
                tdefl_record_match(d, d->m_saved_match_len, d->m_saved_match_dist);
                len_to_move = d->m_saved_match_len - 1;
                d->m_saved_match_len = 0;
            }
        }
        else if (!cur_match_dist)
            tdefl_record_literal(d, d->m_dict[MZ_MIN(cur_pos, sizeof(d->m_dict) - 1)]);
        else if ((d->m_greedy_parsing) || (d->m_flags & TDEFL_RLE_MATCHES) || (cur_match_len >= 128))
        {
            tdefl_record_match(d, cur_match_len, cur_match_dist);
            len_to_move = cur_match_len;
        }
        else
        {
            d->m_saved_lit = d->m_dict[MZ_MIN(cur_pos, sizeof(d->m_dict) - 1)];
            d->m_saved_match_dist = cur_match_dist;
            d->m_saved_match_len = cur_match_len;
        }
        /* Move the lookahead forward by len_to_move bytes. */
        d->m_lookahead_pos += len_to_move;
        MZ_ASSERT(d->m_lookahead_size >= len_to_move);
        d->m_lookahead_size -= len_to_move;
        d->m_dict_size = MZ_MIN(d->m_dict_size + len_to_move, (mz_uint)TDEFL_LZ_DICT_SIZE);
        /* Check if it's time to flush the current LZ codes to the internal output buffer. */
        if ((d->m_pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8]) ||
            ((d->m_total_lz_bytes > 31 * 1024) && (((((mz_uint)(d->m_pLZ_code_buf - d->m_lz_code_buf) * 115) >> 7) >= d->m_total_lz_bytes) || (d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS))))
        {
            int n;
            d->m_pSrc = pSrc;
            d->m_src_buf_left = src_buf_left;
            if ((n = tdefl_flush_block(d, 0)) != 0)
                return (n < 0) ? MZ_FALSE : MZ_TRUE;
        }
    }

    d->m_pSrc = pSrc;
    d->m_src_buf_left = src_buf_left;
    return MZ_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
movq 0xb0(%rdi), %r15
movq 0xb8(%rdi), %r12
movl 0xa8(%rdi), %eax
movl %eax, -0x60(%rbp)
leaq 0xc8(%rdi), %rax
leaq 0x92aa(%rdi), %rcx
movq %rcx, -0xb0(%rbp)
leaq 0x192a2(%rdi), %rcx
movq %rcx, -0xb8(%rbp)
leaq 0x1c8(%rdi), %rcx
movq %rcx, -0x90(%rbp)
movq %rax, -0x50(%rbp)
testq %r12, %r12
jne 0x6602
cmpl $0x0, -0x60(%rbp)
je 0x6f77
cmpl $0x0, 0x28(%rbx)
je 0x6f77
movl 0x28(%rbx), %r8d
movl 0x2c(%rbx), %esi
leal (%rsi,%r8), %ecx
cmpl $0x1, %ecx
movq %rsi, -0x70(%rbp)
jbe 0x66de
movl 0x24(%rbx), %ecx
leal (%rcx,%r8), %edx
addl $-0x2, %edx
movl %edx, %esi
movl $0x7fff, %eax           # imm = 0x7FFF
andl %eax, %esi
movzbl 0xc8(%rbx,%rsi), %esi
leal (%rcx,%r8), %edi
decl %edi
andl %eax, %edi
movzbl 0xc8(%rbx,%rdi), %r9d
movl $0x102, %r10d           # imm = 0x102
subl %r8d, %r10d
cmpq %r10, %r12
movl %r12d, %edi
cmovael %r10d, %edi
subq %rdi, %r12
leal (%rdi,%r8), %r10d
movl %r10d, 0x28(%rbx)
testl %edi, %edi
je 0x67f9
addl %r8d, %ecx
shll $0x5, %esi
xorl %r9d, %esi
andl $0x7fff, %ecx           # imm = 0x7FFF
movb (%r15), %r8b
movb %r8b, 0xc8(%rbx,%rcx)
cmpl $0x100, %ecx            # imm = 0x100
ja 0x6699
movl %ecx, %r9d
movb %r8b, 0x80c8(%rbx,%r9)
incq %r15
movzbl %r8b, %r8d
shll $0x5, %esi
andl $0x7fe0, %esi           # imm = 0x7FE0
xorl %r8d, %esi
movzwl 0x292aa(%rbx,%rsi,2), %r8d
movl %edx, %r9d
andl $0x7fff, %r9d           # imm = 0x7FFF
movw %r8w, 0x192aa(%rbx,%r9,2)
movw %dx, 0x292aa(%rbx,%rsi,2)
incl %ecx
incl %edx
decq %rdi
jne 0x6675
jmp 0x67f9
testq %r12, %r12
je 0x67ee
movl 0x28(%rbx), %ecx
movl $0x102, %edx            # imm = 0x102
subl %ecx, %edx
movl $0x0, %eax
cmovbl %eax, %edx
leal -0x2(%rcx), %eax
movq %rax, -0x38(%rbp)
leal (%rsi,%rcx), %eax
incl %eax
xorl %r8d, %r8d
movq %r12, %r9
movq %r15, -0x78(%rbp)
cmpl %r8d, %edx
je 0x67f3
movb (%r15,%r8), %r11b
movl 0x24(%rbx), %r10d
leal (%rcx,%r8), %r14d
addl %r10d, %r14d
andl $0x7fff, %r14d          # imm = 0x7FFF
movb %r11b, 0xc8(%rbx,%r14)
cmpl $0x100, %r14d           # imm = 0x100
ja 0x674a
movl %r14d, %r14d
movb %r11b, 0x80c8(%rbx,%r14)
leal (%rcx,%r8), %r14d
incl %r14d
movl %r14d, 0x28(%rbx)
leal (%rax,%r8), %r14d
cmpl $0x3, %r14d
jb 0x67dc
movzbl %r11b, %r11d
movq %rdx, %r15
movq %rax, %rdx
movq -0x38(%rbp), %rax
leal (%rax,%r8), %r14d
addl %r10d, %r14d
movl $0x7fff, %edi           # imm = 0x7FFF
andl %edi, %r14d
movzbl 0xc8(%rbx,%r14), %r13d
movq %r12, %rsi
leal (%rcx,%r8), %r12d
leal (%r10,%r12), %eax
decl %eax
andl %edi, %eax
movzbl 0xc8(%rbx,%rax), %eax
shll $0x5, %eax
andl $0x1f, %r13d
shll $0xa, %r13d
xorl %eax, %r11d
xorl %r13d, %r11d
movzwl 0x292aa(%rbx,%r11,2), %eax
movw %ax, 0x192aa(%rbx,%r14,2)
leal (%r10,%r12), %eax
addl $-0x2, %eax
movq %rsi, %r12
movw %ax, 0x292aa(%rbx,%r11,2)
movq %rdx, %rax
movq %r15, %rdx
movq -0x78(%rbp), %r15
incq %r8
decq %r9
cmpq %r8, %r12
jne 0x670f
addq %r8, %r15
xorl %r12d, %r12d
jmp 0x67f9
addq %r8, %r15
movq %r9, %r12
cmpl $0x0, -0x60(%rbp)
sete %al
movl 0x28(%rbx), %edx
movl $0x8000, %r9d           # imm = 0x8000
subl %edx, %r9d
movq -0x70(%rbp), %rcx
cmpl %ecx, %r9d
cmovael %ecx, %r9d
movl %r9d, 0x2c(%rbx)
cmpl $0x102, %edx            # imm = 0x102
setb %sil
movl $0x3, %ecx
testb %sil, %al
jne 0x6f40
movl %edx, %ecx
movl 0x68(%rbx), %eax
testl %eax, %eax
movl %eax, -0x38(%rbp)
movl $0x2, %edx
cmovel %edx, %eax
movl 0x10(%rbx), %esi
movl 0x24(%rbx), %r8d
movl %r8d, %r10d
andl $0x7fff, %r10d          # imm = 0x7FFF
testl $0x90000, %esi          # imm = 0x90000
movl %esi, -0x78(%rbp)
je 0x68b3
testl %r9d, %r9d
sete %dl
shrl $0x13, %esi
andl $0x1, %esi
orb %dl, %sil
jne 0x6b6c
testq %rcx, %rcx
je 0x6b7e
decl %r8d
andl $0x7fff, %r8d           # imm = 0x7FFF
movb 0xc8(%rbx,%r8), %dl
xorl %eax, %eax
leal (%r10,%rax), %esi
cmpb %dl, 0xc8(%rbx,%rsi)
jne 0x6b80
incq %rax
cmpq %rax, %rcx
jne 0x6893
movl %ecx, %eax
jmp 0x6b80
cmpl $0x103, %ecx            # imm = 0x103
jae 0x6fdd
cmpl %ecx, %eax
jae 0x6b6c
movq %rcx, -0x88(%rbp)
movq -0x50(%rbp), %rdi
leaq (%rdi,%r10), %rdx
movq %rdx, -0xa8(%rbp)
movzwl (%rdi,%r10), %ecx
movw %cx, -0x42(%rbp)
xorl %edx, %edx
cmpl $0x20, %eax
setae %dl
movl 0x14(%rbx,%rdx,4), %r13d
leal -0x1(%r10), %ecx
movq %rcx, -0x98(%rbp)
leal (%r10,%rax), %r14d
decl %r14d
movq -0x90(%rbp), %rdx
leaq (%rdx,%r10), %rcx
movq %rcx, -0xa0(%rbp)
leaq (%rbx,%r10), %rcx
movq %rcx, -0x68(%rbp)
movl $0x0, -0x2c(%rbp)
movq %r10, -0x40(%rbp)
movl %r10d, %edx
movl %r14d, %esi
movzwl (%rdi,%rsi), %ecx
leal -0x1(%rax), %r11d
decl %r13d
movl %r13d, %esi
subl $0x1, %esi
jb 0x6b70
movl %edx, %edx
movzwl 0x192aa(%rbx,%rdx,2), %edx
testl %edx, %edx
je 0x6b70
movl %r8d, %edi
subl %edx, %edi
movzwl %di, %edi
cmpl %edi, %r9d
jb 0x6b70
movl %r13d, -0x70(%rbp)
andl $0x7fff, %edx           # imm = 0x7FFF
leal (%r11,%rdx), %r14d
movq -0x50(%rbp), %r13
cmpw %cx, (%r13,%r14)
je 0x69f2
movzwl 0x192aa(%rbx,%rdx,2), %edx
testl %edx, %edx
je 0x6b70
movl %r8d, %edi
subl %edx, %edi
movzwl %di, %edi
cmpl %edi, %r9d
jb 0x6b70
andl $0x7fff, %edx           # imm = 0x7FFF
leal (%r11,%rdx), %r14d
movq -0x50(%rbp), %r13
cmpw %cx, (%r13,%r14)
je 0x69f2
movzwl 0x192aa(%rbx,%rdx,2), %edx
testl %edx, %edx
je 0x6b70
movl %r8d, %edi
subl %edx, %edi
movzwl %di, %edi
cmpl %edi, %r9d
jb 0x6b70
andl $0x7fff, %edx           # imm = 0x7FFF
leal (%r11,%rdx), %r14d
movq -0x50(%rbp), %r13
cmpw %cx, (%r13,%r14)
jne 0x6a18
testl %edi, %edi
je 0x6b70
movq %r8, %r10
movl %ecx, %r8d
movl %edx, %r13d
movq -0x50(%rbp), %r14
movzwl -0x42(%rbp), %ecx
cmpw %cx, (%r14,%r13)
je 0x6a20
movl %r8d, %ecx
movq %r10, %r8
movl %esi, %r13d
jmp 0x693e
movq %r12, -0x80(%rbp)
movq -0x90(%rbp), %rsi
leaq (%rsi,%r13), %rcx
movq %rcx, -0x58(%rbp)
leaq (%rbx,%r13), %r14
xorl %esi, %esi
movq -0x68(%rbp), %rcx
movzwl 0xca(%rcx,%rsi), %r12d
cmpw 0xca(%r14,%rsi), %r12w
jne 0x6aad
movzwl 0xcc(%rcx,%rsi), %r12d
cmpw 0xcc(%r14,%rsi), %r12w
jne 0x6ab9
movzwl 0xce(%rcx,%rsi), %r12d
cmpw 0xce(%r14,%rsi), %r12w
jne 0x6ac5
movzwl 0xd0(%rcx,%rsi), %r12d
cmpw 0xd0(%r14,%rsi), %r12w
sete %r12b
jne 0x6ae0
addq $0x8, %rsi
cmpl $0x100, %esi            # imm = 0x100
movq -0x68(%rbp), %rcx
jne 0x6a3d
movl %r12d, %r14d
movq -0xa0(%rbp), %r12
jmp 0x6b00
leaq (%rcx,%rsi), %r12
movl $0xca, %r14d
jmp 0x6acf
leaq (%rcx,%rsi), %r12
movl $0xcc, %r14d
jmp 0x6acf
leaq (%rcx,%rsi), %r12
movl $0xce, %r14d
addq %r14, %r12
addq %rbx, %rsi
addq %r13, %rsi
addq %r14, %rsi
xorl %r14d, %r14d
jmp 0x6afc
movq -0x68(%rbp), %rcx
movl %r12d, %r14d
leaq (%rcx,%rsi), %r12
movl $0xd0, %ecx
addq %rcx, %r12
addq %rbx, %rsi
addq %r13, %rsi
addq %rcx, %rsi
movq %rsi, -0x58(%rbp)
testb %r14b, %r14b
movl -0x70(%rbp), %r13d
jne 0x6f4a
movl %r8d, %ecx
movl %r12d, %r14d
subl -0xa8(%rbp), %r14d
andl $-0x2, %r14d
movb (%r12), %r12b
xorl %esi, %esi
movq -0x58(%rbp), %r8
cmpb (%r8), %r12b
sete %sil
orl %r14d, %esi
cmpl %eax, %esi
movq -0x80(%rbp), %r12
movq %r10, %r8
jbe 0x6938
movq -0x88(%rbp), %rax
cmpl %eax, %esi
cmovael %eax, %esi
jae 0x6f66
movq -0x98(%rbp), %rax
leal (%rax,%rsi), %r14d
movl %edi, -0x2c(%rbp)
movl %esi, %eax
movq -0x50(%rbp), %rdi
jmp 0x692d
xorl %edi, %edi
jmp 0x6b91
movl -0x2c(%rbp), %ecx
movl %ecx, %edi
movl -0x38(%rbp), %ecx
movq -0x40(%rbp), %r10
jmp 0x6b94
xorl %eax, %eax
xorl %edi, %edi
cmpl $0x3, %eax
setae %dil
movl $0x0, %edx
cmovbl %edx, %eax
movl -0x38(%rbp), %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x2000, %edi           # imm = 0x2000
setae %sil
testb %sil, %dl
movl -0x78(%rbp), %edx
jne 0x6bbc
cmpl %edi, %r10d
je 0x6bbc
btl $0x11, %edx
jae 0x6bc0
cmpl $0x5, %eax
ja 0x6bc0
xorl %edi, %edi
xorl %eax, %eax
testl %ecx, %ecx
je 0x6cc7
cmpl %ecx, %eax
jbe 0x6d8f
movl 0x6c(%rbx), %ecx
incl 0x54(%rbx)
movq 0x30(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x30(%rbx)
movb %cl, (%rdx)
movq 0x38(%rbx), %rdx
shrb (%rdx)
decl 0x50(%rbx)
jne 0x6c06
movl $0x8, 0x50(%rbx)
movq 0x30(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x30(%rbx)
movq %rdx, 0x38(%rbx)
movzbl %cl, %ecx
incw 0x81ca(%rbx,%rcx,2)
cmpl $0x80, %eax
jb 0x6ea7
decl %edi
cmpl $0x8000, %edi           # imm = 0x8000
jae 0x6fbe
addl %eax, 0x54(%rbx)
leal -0x3(%rax), %ecx
movq 0x30(%rbx), %rdx
movb %cl, (%rdx)
movq 0x30(%rbx), %rdx
movb %dil, 0x1(%rdx)
movl %edi, %edx
shrl $0x8, %edx
movq 0x30(%rbx), %rsi
movb %dl, 0x2(%rsi)
addq $0x3, 0x30(%rbx)
movq 0x38(%rbx), %rsi
movb (%rsi), %r8b
shrb %r8b
orb $-0x80, %r8b
movb %r8b, (%rsi)
decl 0x50(%rbx)
jne 0x6c7c
movl $0x8, 0x50(%rbx)
movq 0x30(%rbx), %rsi
leaq 0x1(%rsi), %r8
movq %r8, 0x30(%rbx)
movq %rsi, 0x38(%rbx)
movl %edi, %esi
andl $0x1ff, %esi            # imm = 0x1FF
leaq 0xfb05(%rip), %r8       # 0x16790
addq %r8, %rsi
leaq 0xfcfb(%rip), %r8       # 0x16990
addq %r8, %rdx
cmpl $0x200, %edi            # imm = 0x200
cmovbq %rsi, %rdx
movzbl (%rdx), %edx
incw 0x840a(%rbx,%rdx,2)
movl %ecx, %ecx
leaq 0xfd5a(%rip), %rdx      # 0x16a10
movzwl (%rdx,%rcx,2), %ecx
incw 0x81ca(%rbx,%rcx,2)
jmp 0x6e43
testl %edi, %edi
je 0x6e4c
cmpl $0x0, 0x1c(%rbx)
je 0x6e92
cmpl $0x8000, %edi           # imm = 0x8000
ja 0x6fbe
cmpl $0x2, %eax
jbe 0x6fbe
leal -0x1(%rdi), %edx
addl %eax, 0x54(%rbx)
leal -0x3(%rax), %ecx
movq 0x30(%rbx), %rsi
movb %cl, (%rsi)
movq 0x30(%rbx), %rsi
movb %dl, 0x1(%rsi)
movl %edx, %esi
shrl $0x8, %esi
movq 0x30(%rbx), %r8
movb %sil, 0x2(%r8)
addq $0x3, 0x30(%rbx)
movq 0x38(%rbx), %r8
movb (%r8), %r9b
shrb %r9b
orb $-0x80, %r9b
movb %r9b, (%r8)
decl 0x50(%rbx)
jne 0x6d43
movl $0x8, 0x50(%rbx)
movq 0x30(%rbx), %r8
leaq 0x1(%r8), %r9
movq %r9, 0x30(%rbx)
movq %r8, 0x38(%rbx)
andl $0x1ff, %edx            # imm = 0x1FF
leaq 0xfa40(%rip), %r8       # 0x16790
addq %r8, %rdx
andl $0x7f, %esi
leaq 0xfc33(%rip), %r8       # 0x16990
addq %r8, %rsi
cmpl $0x201, %edi            # imm = 0x201
cmovbq %rdx, %rsi
movzbl (%rsi), %edx
incw 0x840a(%rbx,%rdx,2)
movl %ecx, %ecx
leaq 0xfc92(%rip), %rdx      # 0x16a10
movzwl (%rdx,%rcx,2), %ecx
incw 0x81ca(%rbx,%rcx,2)
jmp 0x6ebe
cmpl $0x3, %ecx
jb 0x6fbe
movl 0x64(%rbx), %eax
decl %eax
cmpl $0x8000, %eax           # imm = 0x8000
jae 0x6fbe
addl %ecx, 0x54(%rbx)
addl $-0x3, %ecx
movq 0x30(%rbx), %rdx
movb %cl, (%rdx)
movq 0x30(%rbx), %rdx
movb %al, 0x1(%rdx)
movl %eax, %edx
shrl $0x8, %edx
movq 0x30(%rbx), %rsi
movb %dl, 0x2(%rsi)
addq $0x3, 0x30(%rbx)
movq 0x38(%rbx), %rsi
movb (%rsi), %dil
shrb %dil
orb $-0x80, %dil
movb %dil, (%rsi)
decl 0x50(%rbx)
jne 0x6df9
movl $0x8, 0x50(%rbx)
movq 0x30(%rbx), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x30(%rbx)
movq %rsi, 0x38(%rbx)
movl %eax, %esi
andl $0x1ff, %esi            # imm = 0x1FF
leaq 0xf988(%rip), %rdi      # 0x16790
addq %rdi, %rsi
leaq 0xfb7e(%rip), %rdi      # 0x16990
addq %rdi, %rdx
cmpl $0x200, %eax            # imm = 0x200
cmovbq %rsi, %rdx
movzbl (%rdx), %eax
incw 0x840a(%rbx,%rax,2)
movl %ecx, %eax
leaq 0xfbde(%rip), %rcx      # 0x16a10
movzwl (%rcx,%rax,2), %eax
incw 0x81ca(%rbx,%rax,2)
movl 0x68(%rbx), %eax
decl %eax
movl $0x0, 0x68(%rbx)
jmp 0x6ebe
movzbl 0xc8(%rbx,%r10), %eax
incl 0x54(%rbx)
movq 0x30(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x30(%rbx)
movb %al, (%rcx)
movq 0x38(%rbx), %rcx
shrb (%rcx)
decl 0x50(%rbx)
jne 0x6e88
movl $0x8, 0x50(%rbx)
movq 0x30(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x30(%rbx)
movq %rcx, 0x38(%rbx)
incw 0x81ca(%rbx,%rax,2)
jmp 0x6eb9
btl $0x10, %edx
jb 0x6cd9
cmpl $0x80, %eax
jae 0x6cd9
movzbl 0xc8(%rbx,%r10), %ecx
movl %ecx, 0x6c(%rbx)
movl %edi, 0x64(%rbx)
movl %eax, 0x68(%rbx)
movl $0x1, %eax
addl %eax, 0x24(%rbx)
movl 0x28(%rbx), %ecx
subl %eax, %ecx
jb 0x6f9f
movl %ecx, 0x28(%rbx)
addl 0x2c(%rbx), %eax
movl $0x8000, %ecx           # imm = 0x8000
cmpl %ecx, %eax
cmovael %ecx, %eax
movl %eax, 0x2c(%rbx)
movq 0x30(%rbx), %rax
cmpq -0xb8(%rbp), %rax
jbe 0x6f1d
movq %r15, 0xb0(%rbx)
movq %r12, 0xb8(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6ffc
movl %eax, %edx
notl %edx
shrl $0x1f, %edx
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl -0x5c(%rbp), %eax
cmovnel %edx, %eax
movl %eax, -0x5c(%rbp)
jmp 0x6f40
movl 0x54(%rbx), %edx
xorl %ecx, %ecx
cmpl $0x7c01, %edx           # imm = 0x7C01
jb 0x6f40
subl -0xb0(%rbp), %eax
imull $0x73, %eax, %eax
shrl $0x7, %eax
cmpl %edx, %eax
jae 0x6eec
testb $0x8, 0x12(%rbx)
jne 0x6eec
testl %ecx, %ecx
je 0x65e9
jmp 0x6f6d
movl $0x102, %eax            # imm = 0x102
movq -0x88(%rbp), %rcx
cmpl %eax, %ecx
cmovael %eax, %ecx
movl %ecx, %eax
movq -0x80(%rbp), %r12
jmp 0x6b75
movl %esi, %eax
jmp 0x6b75
cmpl $0x3, %ecx
je 0x6f7a
movl -0x5c(%rbp), %eax
jmp 0x6f8d
xorl %r12d, %r12d
movq %r15, 0xb0(%rbx)
movq %r12, 0xb8(%rbx)
movl $0x1, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1088c(%rip), %rdi     # 0x17832
leaq 0x10191(%rip), %rsi     # 0x1713e
leaq 0x108a1(%rip), %rcx     # 0x17855
movl $0x704, %edx            # imm = 0x704
callq 0x3170
leaq 0x10942(%rip), %rdi     # 0x17907
leaq 0x10172(%rip), %rsi     # 0x1713e
leaq 0x10992(%rip), %rcx     # 0x17965
movl $0x66d, %edx            # imm = 0x66D
callq 0x3170
leaq 0x108a3(%rip), %rdi     # 0x17887
leaq 0x10153(%rip), %rsi     # 0x1713e
leaq 0x108ba(%rip), %rcx     # 0x178ac
movl $0x555, %edx            # imm = 0x555
callq 0x3170