// File: /workspace/github_cpp_makefile_star2_O3/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 $0x78, %rsp
movq %rdi, %rbx
movq 0xb0(%rdi), %r14
movq 0xb8(%rdi), %r13
movl 0xa8(%rdi), %eax
movl %eax, -0x4c(%rbp)
leaq 0xc8(%rdi), %r12
leaq 0x92aa(%rdi), %rax
movq %rax, -0x98(%rbp)
leaq 0x192a2(%rdi), %rax
movq %rax, -0xa0(%rbp)
leaq 0xd0(%rdi), %rax
movq %rax, -0x80(%rbp)
testq %r13, %r13
je 0x660e
movl 0x28(%rbx), %edi
movl 0x2c(%rbx), %ecx
movq %rcx, -0x38(%rbp)
leal (%rcx,%rdi), %eax
cmpl $0x1, %eax
ja 0x6636
jmp 0x670a
cmpl $0x0, -0x4c(%rbp)
je 0x6f4f
movl 0x28(%rbx), %edi
testl %edi, %edi
je 0x6f4f
movl 0x2c(%rbx), %ecx
movq %rcx, -0x38(%rbp)
leal (%rcx,%rdi), %eax
cmpl $0x1, %eax
jbe 0x6701
movl 0x24(%rbx), %esi
movq %rdi, %rdx
addl %esi, %edi
addl $-0x2, %edi
movl %edi, %eax
movl $0x7fff, %ecx           # imm = 0x7FFF
andl %ecx, %eax
movzbl 0xc8(%rbx,%rax), %r8d
leal (%rsi,%rdx), %eax
decl %eax
andl %ecx, %eax
movzbl 0xc8(%rbx,%rax), %r10d
movl $0x102, %eax            # imm = 0x102
subl %edx, %eax
cmpq %rax, %r13
movl %r13d, %r9d
cmovael %eax, %r9d
subq %r9, %r13
leal (%r9,%rdx), %ecx
movq %rcx, %rax
movl %ecx, 0x28(%rbx)
testl %r9d, %r9d
je 0x66f9
addl %edx, %esi
leaq (%r14,%r9), %rdx
shll $0x5, %r8d
xorl %r10d, %r8d
andl $0x7fff, %esi           # imm = 0x7FFF
movb (%r14), %r10b
movb %r10b, (%r12,%rsi)
cmpl $0x100, %esi            # imm = 0x100
ja 0x66b3
movl %esi, %r11d
movb %r10b, 0x8000(%r12,%r11)
incq %r14
movzbl %r10b, %r10d
shll $0x5, %r8d
andl $0x7fe0, %r8d           # imm = 0x7FE0
xorl %r10d, %r8d
movzwl 0x292aa(%rbx,%r8,2), %r10d
movl %edi, %r11d
andl $0x7fff, %r11d          # imm = 0x7FFF
movw %r10w, 0x192aa(%rbx,%r11,2)
movw %di, 0x292aa(%rbx,%r8,2)
incl %esi
incl %edi
decq %r9
jne 0x6693
movq %rdx, %r14
movq %rax, %r8
jmp 0x6827
testq %r13, %r13
je 0x685f
cmpl $0x103, %edi            # imm = 0x103
movl $0x102, %esi            # imm = 0x102
cmovael %edi, %esi
movq %rsi, -0x48(%rbp)
movl %esi, %ecx
subl %edi, %ecx
movl %edi, %r8d
leal -0x2(%rdi), %eax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
leal (%rdi,%rax), %esi
incl %esi
xorl %edi, %edi
movq %r14, -0x68(%rbp)
cmpl %edi, %ecx
je 0x6853
movb (%r14,%rdi), %r11b
movl 0x24(%rbx), %r10d
leal (%r8,%rdi), %r15d
addl %r10d, %r15d
andl $0x7fff, %r15d          # imm = 0x7FFF
movb %r11b, 0xc8(%rbx,%r15)
cmpl $0x100, %r15d           # imm = 0x100
ja 0x6773
movl %r15d, %r15d
movb %r11b, 0x8000(%r12,%r15)
leal (%r8,%rdi), %r15d
incl %r15d
movl %r15d, 0x28(%rbx)
leal (%rsi,%rdi), %r15d
cmpl $0x3, %r15d
jb 0x6812
movzbl %r11b, %r11d
movq -0x58(%rbp), %rax
leal (%rax,%rdi), %r15d
addl %r10d, %r15d
movl $0x7fff, %eax           # imm = 0x7FFF
andl %eax, %r15d
movq %r13, %rdx
movzbl 0xc8(%rbx,%r15), %r13d
movq %rcx, %r14
leal (%r8,%rdi), %ecx
movq %r8, %r9
movq %r12, %r8
leal (%r10,%rcx), %r12d
decl %r12d
andl %eax, %r12d
movzbl 0xc8(%rbx,%r12), %r12d
shll $0x5, %r12d
andl $0x1f, %r13d
shll $0xa, %r13d
xorl %r12d, %r11d
xorl %r13d, %r11d
movq %rdx, %r13
movzwl 0x292aa(%rbx,%r11,2), %r12d
movw %r12w, 0x192aa(%rbx,%r15,2)
movq %r8, %r12
movq %r9, %r8
addl %r10d, %ecx
addl $-0x2, %ecx
movw %cx, 0x292aa(%rbx,%r11,2)
movq %r14, %rcx
movq -0x68(%rbp), %r14
incq %rdi
cmpq %rdi, %r13
jne 0x6739
addl %edi, %r8d
addq %rdi, %r14
xorl %r13d, %r13d
movl $0x8000, %r9d           # imm = 0x8000
subl %r8d, %r9d
movq -0x38(%rbp), %rax
cmpl %eax, %r9d
cmovael %eax, %r9d
movl %r9d, 0x2c(%rbx)
cmpl $0x0, -0x4c(%rbp)
jne 0x687d
cmpl $0x102, %r8d            # imm = 0x102
jae 0x687d
jmp 0x6f52
addq %rdi, %r14
subq %rdi, %r13
movq -0x48(%rbp), %rdi
jmp 0x6862
xorl %r13d, %r13d
movl $0x8000, %r9d           # imm = 0x8000
subl %edi, %r9d
movq -0x38(%rbp), %rax
cmpl %eax, %r9d
cmovael %eax, %r9d
movl %r9d, 0x2c(%rbx)
movl %edi, %r8d
movl 0x68(%rbx), %eax
testl %eax, %eax
movl %eax, -0x58(%rbp)
movl %eax, %edi
movl $0x2, %eax
cmovel %eax, %edi
movl 0x10(%rbx), %ecx
movl 0x24(%rbx), %r11d
movl %r11d, %r10d
andl $0x7fff, %r10d          # imm = 0x7FFF
testl $0x90000, %ecx          # imm = 0x90000
movq %r10, -0x68(%rbp)
je 0x68fa
testl %r9d, %r9d
sete %dl
movl %ecx, %esi
shrl $0x13, %esi
andl $0x1, %esi
orb %dl, %sil
jne 0x6b4f
testl %r8d, %r8d
je 0x6b5f
movl %r8d, %edi
decl %r11d
andl $0x7fff, %r11d          # imm = 0x7FFF
movb (%r12,%r11), %al
xorl %edx, %edx
leal (%r10,%rdx), %esi
cmpb %al, (%r12,%rsi)
jne 0x6b63
incq %rdx
cmpq %rdx, %rdi
jne 0x68df
jmp 0x6b65
cmpl $0x103, %r8d            # imm = 0x103
jae 0x6fb9
cmpl %r8d, %edi
jae 0x6b4f
movq %r8, -0x70(%rbp)
leaq (%r12,%r10), %rax
movq %rax, -0x90(%rbp)
movzwl (%r12,%r10), %eax
movw %ax, -0x3c(%rbp)
xorl %edx, %edx
cmpl $0x20, %edi
setae %dl
movq %r10, %rsi
movl 0x14(%rbx,%rdx,4), %r10d
leal -0x1(%rsi), %eax
leaq (%rbx,%rsi), %rdx
movq %rdx, -0x60(%rbp)
movl $0x0, -0x2c(%rbp)
movl %esi, %edx
movl %edi, %r15d
movq %rax, -0x88(%rbp)
leal (%rax,%r15), %esi
movzwl (%r12,%rsi), %eax
movw %ax, -0x3a(%rbp)
movq %r15, -0x48(%rbp)
leal -0x1(%r15), %eax
movq %rax, -0x38(%rbp)
movl %r10d, %eax
decl %eax
movl %eax, %edi
movq -0x48(%rbp), %r10
movzwl -0x3a(%rbp), %r15d
subl $0x1, %edi
jb 0x6b54
movl %edx, %edx
movzwl 0x192aa(%rbx,%rdx,2), %edx
testl %edx, %edx
je 0x6b54
movl %r11d, %esi
subl %edx, %esi
movzwl %si, %r8d
cmpl %r8d, %r9d
jb 0x6b54
andl $0x7fff, %edx           # imm = 0x7FFF
movq -0x38(%rbp), %rsi
addl %edx, %esi
cmpw %r15w, (%r12,%rsi)
je 0x6a29
movzwl 0x192aa(%rbx,%rdx,2), %edx
testl %edx, %edx
je 0x6b54
movl %r11d, %esi
subl %edx, %esi
movzwl %si, %r8d
cmpl %r8d, %r9d
jb 0x6b54
andl $0x7fff, %edx           # imm = 0x7FFF
movq -0x38(%rbp), %rsi
addl %edx, %esi
cmpw %r15w, (%r12,%rsi)
je 0x6a29
movzwl 0x192aa(%rbx,%rdx,2), %edx
testl %edx, %edx
je 0x6b54
movl %r11d, %esi
subl %edx, %esi
movzwl %si, %r8d
cmpl %r8d, %r9d
jb 0x6b54
andl $0x7fff, %edx           # imm = 0x7FFF
movq -0x38(%rbp), %rsi
addl %edx, %esi
cmpw %r15w, (%r12,%rsi)
jne 0x6a51
testl %r8d, %r8d
je 0x6b54
movl %eax, %r10d
movl %ecx, %eax
movq %r13, %rcx
movl %edx, %r13d
movzwl -0x3c(%rbp), %esi
cmpw %si, (%r12,%r13)
je 0x6a58
movq %rcx, %r13
movl %eax, %ecx
movq -0x48(%rbp), %r10
movl %edi, %eax
jmp 0x697f
movq %r11, -0x78(%rbp)
addq -0x80(%rbp), %r13
xorl %edi, %edi
movq -0x60(%rbp), %r11
movzwl 0xca(%r11,%rdi), %r15d
movzwl -0x6(%r13,%rdi), %esi
cmpw %si, %r15w
jne 0x6acf
movzwl 0xcc(%r11,%rdi), %r15d
movzwl -0x4(%r13,%rdi), %esi
cmpw %si, %r15w
jne 0x6adc
movzwl 0xce(%r11,%rdi), %r15d
movzwl -0x2(%r13,%rdi), %esi
cmpw %si, %r15w
jne 0x6ae9
movzwl 0xd0(%r11,%rdi), %r15d
movzwl (%r13,%rdi), %esi
cmpw %si, %r15w
jne 0x6af6
addq $0x8, %rdi
cmpl $0x100, %edi            # imm = 0x100
movq -0x60(%rbp), %r11
jne 0x6a66
jmp 0x6f41
leaq (%r11,%rdi), %r13
addq $0xca, %r13
jmp 0x6b05
leaq (%r11,%rdi), %r13
addq $0xcc, %r13
jmp 0x6b05
leaq (%r11,%rdi), %r13
addq $0xce, %r13
jmp 0x6b05
movq -0x60(%rbp), %r11
leaq (%r11,%rdi), %r13
addq $0xd0, %r13
subl -0x90(%rbp), %r13d
andl $-0x2, %r13d
xorl %edi, %edi
cmpb %sil, %r15b
sete %dil
orl %r13d, %edi
cmpl -0x48(%rbp), %edi
movq %rcx, %r13
movl %eax, %ecx
movq -0x78(%rbp), %r11
jbe 0x696f
movl %r8d, -0x2c(%rbp)
movq -0x70(%rbp), %rcx
cmpl %ecx, %edi
cmovael %ecx, %edi
movl %eax, %ecx
movl %edi, %r15d
movq -0x88(%rbp), %rax
jb 0x6956
jmp 0x6b77
xorl %r8d, %r8d
jmp 0x6b77
movl -0x2c(%rbp), %eax
movl %eax, %r8d
movl %r10d, %edi
jmp 0x6b77
xorl %edi, %edi
jmp 0x6b65
movl %edx, %edi
xorl %r8d, %r8d
cmpl $0x3, %edi
setae %r8b
movl $0x0, %eax
cmovbl %eax, %edi
cmpl $0x3, %edi
sete %al
cmpl $0x2000, %r8d           # imm = 0x2000
setae %dl
testb %dl, %al
movq -0x68(%rbp), %rsi
jne 0x6ba7
cmpl %r8d, %esi
je 0x6ba7
btl $0x11, %ecx
jae 0x6c79
cmpl $0x6, %edi
jae 0x6c79
movl -0x58(%rbp), %r9d
testl %r9d, %r9d
je 0x6e51
cmpl $0x3, %r9d
jb 0x6f9a
movl 0x64(%rbx), %eax
decl %eax
cmpl $0x8000, %eax           # imm = 0x8000
jae 0x6f9a
addl %r9d, 0x54(%rbx)
addl $-0x3, %r9d
movq 0x30(%rbx), %rdx
movb %r9b, (%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 0x6c22
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 0xfb5f(%rip), %rcx      # 0x16790
addq %rcx, %rsi
leaq 0xfd55(%rip), %rcx      # 0x16990
addq %rcx, %rdx
cmpl $0x200, %eax            # imm = 0x200
cmovbq %rsi, %rdx
movzbl (%rdx), %eax
incw 0x840a(%rbx,%rax,2)
movl %r9d, %eax
leaq 0xfdb4(%rip), %rcx      # 0x16a10
movzwl (%rcx,%rax,2), %eax
incw 0x81ca(%rbx,%rax,2)
movl 0x68(%rbx), %edi
decl %edi
movl $0x0, 0x68(%rbx)
jmp 0x6e99
movl -0x58(%rbp), %r9d
testl %r9d, %r9d
je 0x6d8c
cmpl %r9d, %edi
jbe 0x6bb4
movl 0x6c(%rbx), %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 0x6cc5
movl $0x8, 0x50(%rbx)
movq 0x30(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x30(%rbx)
movq %rcx, 0x38(%rbx)
movzbl %al, %eax
incw 0x81ca(%rbx,%rax,2)
cmpl $0x80, %edi
jb 0x6f2a
decl %r8d
cmpl $0x8000, %r8d           # imm = 0x8000
jae 0x6f9a
addl %edi, 0x54(%rbx)
leal -0x3(%rdi), %eax
movq 0x30(%rbx), %rcx
movb %al, (%rcx)
movq 0x30(%rbx), %rcx
movb %r8b, 0x1(%rcx)
movl %r8d, %ecx
shrl $0x8, %ecx
movq 0x30(%rbx), %rdx
movb %cl, 0x2(%rdx)
addq $0x3, 0x30(%rbx)
movq 0x38(%rbx), %rdx
movb (%rdx), %sil
shrb %sil
orb $-0x80, %sil
movb %sil, (%rdx)
decl 0x50(%rbx)
jne 0x6d3f
movl $0x8, 0x50(%rbx)
movq 0x30(%rbx), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x30(%rbx)
movq %rdx, 0x38(%rbx)
movl %r8d, %edx
andl $0x1ff, %edx            # imm = 0x1FF
leaq 0xfa41(%rip), %rsi      # 0x16790
addq %rsi, %rdx
leaq 0xfc37(%rip), %rsi      # 0x16990
addq %rsi, %rcx
cmpl $0x200, %r8d            # imm = 0x200
cmovbq %rdx, %rcx
movzbl (%rcx), %ecx
incw 0x840a(%rbx,%rcx,2)
movl %eax, %eax
leaq 0xfc95(%rip), %rcx      # 0x16a10
movzwl (%rcx,%rax,2), %eax
incw 0x81ca(%rbx,%rax,2)
jmp 0x6c6d
testl %r8d, %r8d
je 0x6e51
cmpl $0x0, 0x1c(%rbx)
je 0x6f14
cmpl $0x8000, %r8d           # imm = 0x8000
ja 0x6f9a
cmpl $0x2, %edi
jbe 0x6f9a
leal -0x1(%r8), %ecx
addl %edi, 0x54(%rbx)
leal -0x3(%rdi), %eax
movq 0x30(%rbx), %rdx
movb %al, (%rdx)
movq 0x30(%rbx), %rdx
movb %cl, 0x1(%rdx)
movl %ecx, %edx
shrl $0x8, %edx
movq 0x30(%rbx), %rsi
movb %dl, 0x2(%rsi)
addq $0x3, 0x30(%rbx)
movq 0x38(%rbx), %rsi
movb (%rsi), %r9b
shrb %r9b
orb $-0x80, %r9b
movb %r9b, (%rsi)
decl 0x50(%rbx)
jne 0x6e0a
movl $0x8, 0x50(%rbx)
movq 0x30(%rbx), %rsi
leaq 0x1(%rsi), %r9
movq %r9, 0x30(%rbx)
movq %rsi, 0x38(%rbx)
andl $0x1ff, %ecx            # imm = 0x1FF
leaq 0xf979(%rip), %rsi      # 0x16790
addq %rsi, %rcx
leaq 0xfb6f(%rip), %rsi      # 0x16990
addq %rsi, %rdx
cmpl $0x201, %r8d            # imm = 0x201
cmovbq %rcx, %rdx
movzbl (%rdx), %ecx
incw 0x840a(%rbx,%rcx,2)
movl %eax, %eax
leaq 0xfbcd(%rip), %rcx      # 0x16a10
movzwl (%rcx,%rax,2), %eax
incw 0x81ca(%rbx,%rax,2)
jmp 0x6e99
movzbl 0xc8(%rbx,%rsi), %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 0x6e8c
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)
movl $0x1, %edi
addl %edi, 0x24(%rbx)
movl 0x28(%rbx), %eax
subl %edi, %eax
jb 0x6f7b
movl %eax, 0x28(%rbx)
addl 0x2c(%rbx), %edi
movl $0x8000, %eax           # imm = 0x8000
cmpl %eax, %edi
cmovael %eax, %edi
movl %edi, 0x2c(%rbx)
movq 0x30(%rbx), %rax
cmpq -0xa0(%rbp), %rax
jbe 0x6ee9
movq %r14, 0xb0(%rbx)
movq %r13, 0xb8(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6fd8
testl %eax, %eax
je 0x65f2
jmp 0x6f67
movl 0x54(%rbx), %ecx
cmpl $0x7c01, %ecx           # imm = 0x7C01
jb 0x65f2
subl -0x98(%rbp), %eax
imull $0x73, %eax, %eax
shrl $0x7, %eax
cmpl %ecx, %eax
jae 0x6ec7
testb $0x8, 0x12(%rbx)
je 0x65f2
jmp 0x6ec7
btl $0x10, %ecx
jb 0x6d9f
cmpl $0x80, %edi
jae 0x6d9f
movzbl 0xc8(%rbx,%rsi), %eax
movl %eax, 0x6c(%rbx)
movl %r8d, 0x64(%rbx)
movl %edi, 0x68(%rbx)
jmp 0x6e94
movq -0x70(%rbp), %rdi
movq %rcx, %r13
movl %eax, %ecx
jmp 0x6b77
xorl %r13d, %r13d
movq %r14, 0xb0(%rbx)
movq %r13, 0xb8(%rbx)
movl $0x1, %eax
jmp 0x6f6c
notl %eax
shrl $0x1f, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x108b0(%rip), %rdi     # 0x17832
leaq 0x101b5(%rip), %rsi     # 0x1713e
leaq 0x108c5(%rip), %rcx     # 0x17855
movl $0x704, %edx            # imm = 0x704
callq 0x3170
leaq 0x10966(%rip), %rdi     # 0x17907
leaq 0x10196(%rip), %rsi     # 0x1713e
leaq 0x109b6(%rip), %rcx     # 0x17965
movl $0x66d, %edx            # imm = 0x66D
callq 0x3170
leaq 0x108c7(%rip), %rdi     # 0x17887
leaq 0x10177(%rip), %rsi     # 0x1713e
leaq 0x108de(%rip), %rcx     # 0x178ac
movl $0x555, %edx            # imm = 0x555
callq 0x3170