// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/deflate.c
// Function: deflate
int ZEXPORT deflate (strm, flush)
    z_streamp strm;
    int flush;
{
    int old_flush; /* value of flush param for previous deflate call */
    deflate_state *s;

    if (strm == Z_NULL || strm->state == Z_NULL ||
        flush > Z_BLOCK || flush < 0) {
        return Z_STREAM_ERROR;
    }
    s = strm->state;

    if (strm->next_out == Z_NULL ||
        (strm->next_in == Z_NULL && strm->avail_in != 0) ||
        (s->status == FINISH_STATE && flush != Z_FINISH)) {
        ERR_RETURN(strm, Z_STREAM_ERROR);
    }
    if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);

    s->strm = strm; /* just in case */
    old_flush = s->last_flush;
    s->last_flush = flush;

    /* Write the header */
    if (s->status == INIT_STATE) {
#ifdef GZIP
        if (s->wrap == 2) {
            strm->adler = crc32(0L, Z_NULL, 0);
            put_byte(s, 31);
            put_byte(s, 139);
            put_byte(s, 8);
            if (s->gzhead == Z_NULL) {
                put_byte(s, 0);
                put_byte(s, 0);
                put_byte(s, 0);
                put_byte(s, 0);
                put_byte(s, 0);
                put_byte(s, s->level == 9 ? 2 :
                            (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
                             4 : 0));
                put_byte(s, OS_CODE);
                s->status = BUSY_STATE;
            }
            else {
                put_byte(s, (s->gzhead->text ? 1 : 0) +
                            (s->gzhead->hcrc ? 2 : 0) +
                            (s->gzhead->extra == Z_NULL ? 0 : 4) +
                            (s->gzhead->name == Z_NULL ? 0 : 8) +
                            (s->gzhead->comment == Z_NULL ? 0 : 16)
                        );
                put_byte(s, (Byte)(s->gzhead->time & 0xff));
                put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
                put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
                put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
                put_byte(s, s->level == 9 ? 2 :
                            (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
                             4 : 0));
                put_byte(s, s->gzhead->os & 0xff);
                if (s->gzhead->extra != Z_NULL) {
                    put_byte(s, s->gzhead->extra_len & 0xff);
                    put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
                }
                if (s->gzhead->hcrc)
                    strm->adler = crc32(strm->adler, s->pending_buf,
                                        s->pending);
                s->gzindex = 0;
                s->status = EXTRA_STATE;
            }
        }
        else
#endif
        {
            uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
            uInt level_flags;

            if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
                level_flags = 0;
            else if (s->level < 6)
                level_flags = 1;
            else if (s->level == 6)
                level_flags = 2;
            else
                level_flags = 3;
            header |= (level_flags << 6);
            if (s->strstart != 0) header |= PRESET_DICT;
            header += 31 - (header % 31);

            s->status = BUSY_STATE;
            putShortMSB(s, header);

            /* Save the adler32 of the preset dictionary: */
            if (s->strstart != 0) {
                putShortMSB(s, (uInt)(strm->adler >> 16));
                putShortMSB(s, (uInt)(strm->adler & 0xffff));
            }
            strm->adler = adler32(0L, Z_NULL, 0);
        }
    }
#ifdef GZIP
    if (s->status == EXTRA_STATE) {
        if (s->gzhead->extra != Z_NULL) {
            uInt beg = s->pending;  /* start of bytes to update crc */

            while (s->gzindex < (s->gzhead->extra_len & 0xffff)) {
                if (s->pending == s->pending_buf_size) {
                    if (s->gzhead->hcrc && s->pending > beg)
                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
                                            s->pending - beg);
                    flush_pending(strm);
                    beg = s->pending;
                    if (s->pending == s->pending_buf_size)
                        break;
                }
                put_byte(s, s->gzhead->extra[s->gzindex]);
                s->gzindex++;
            }
            if (s->gzhead->hcrc && s->pending > beg)
                strm->adler = crc32(strm->adler, s->pending_buf + beg,
                                    s->pending - beg);
            if (s->gzindex == s->gzhead->extra_len) {
                s->gzindex = 0;
                s->status = NAME_STATE;
            }
        }
        else
            s->status = NAME_STATE;
    }
    if (s->status == NAME_STATE) {
        if (s->gzhead->name != Z_NULL) {
            uInt beg = s->pending;  /* start of bytes to update crc */
            int val;

            do {
                if (s->pending == s->pending_buf_size) {
                    if (s->gzhead->hcrc && s->pending > beg)
                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
                                            s->pending - beg);
                    flush_pending(strm);
                    beg = s->pending;
                    if (s->pending == s->pending_buf_size) {
                        val = 1;
                        break;
                    }
                }
                val = s->gzhead->name[s->gzindex++];
                put_byte(s, val);
            } while (val != 0);
            if (s->gzhead->hcrc && s->pending > beg)
                strm->adler = crc32(strm->adler, s->pending_buf + beg,
                                    s->pending - beg);
            if (val == 0) {
                s->gzindex = 0;
                s->status = COMMENT_STATE;
            }
        }
        else
            s->status = COMMENT_STATE;
    }
    if (s->status == COMMENT_STATE) {
        if (s->gzhead->comment != Z_NULL) {
            uInt beg = s->pending;  /* start of bytes to update crc */
            int val;

            do {
                if (s->pending == s->pending_buf_size) {
                    if (s->gzhead->hcrc && s->pending > beg)
                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
                                            s->pending - beg);
                    flush_pending(strm);
                    beg = s->pending;
                    if (s->pending == s->pending_buf_size) {
                        val = 1;
                        break;
                    }
                }
                val = s->gzhead->comment[s->gzindex++];
                put_byte(s, val);
            } while (val != 0);
            if (s->gzhead->hcrc && s->pending > beg)
                strm->adler = crc32(strm->adler, s->pending_buf + beg,
                                    s->pending - beg);
            if (val == 0)
                s->status = HCRC_STATE;
        }
        else
            s->status = HCRC_STATE;
    }
    if (s->status == HCRC_STATE) {
        if (s->gzhead->hcrc) {
            if (s->pending + 2 > s->pending_buf_size)
                flush_pending(strm);
            if (s->pending + 2 <= s->pending_buf_size) {
                put_byte(s, (Byte)(strm->adler & 0xff));
                put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
                strm->adler = crc32(0L, Z_NULL, 0);
                s->status = BUSY_STATE;
            }
        }
        else
            s->status = BUSY_STATE;
    }
#endif

    /* Flush as much pending output as possible */
    if (s->pending != 0) {
        flush_pending(strm);
        if (strm->avail_out == 0) {
            /* Since avail_out is 0, deflate will be called again with
             * more output space, but possibly with both pending and
             * avail_in equal to zero. There won't be anything to do,
             * but this is not an error situation so make sure we
             * return OK instead of BUF_ERROR at next call of deflate:
             */
            s->last_flush = -1;
            return Z_OK;
        }

    /* Make sure there is something to do and avoid duplicate consecutive
     * flushes. For repeated and useless calls with Z_FINISH, we keep
     * returning Z_STREAM_END instead of Z_BUF_ERROR.
     */
    } else if (strm->avail_in == 0 && flush <= old_flush &&
               flush != Z_FINISH) {
        ERR_RETURN(strm, Z_BUF_ERROR);
    }

    /* User must not provide more input after the first FINISH: */
    if (s->status == FINISH_STATE && strm->avail_in != 0) {
        ERR_RETURN(strm, Z_BUF_ERROR);
    }

    /* Start a new block or continue the current one.
     */
    if (strm->avail_in != 0 || s->lookahead != 0 ||
        (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
        block_state bstate;

        bstate = s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :
                    (s->strategy == Z_RLE ? deflate_rle(s, flush) :
                        (*(configuration_table[s->level].func))(s, flush));

        if (bstate == finish_started || bstate == finish_done) {
            s->status = FINISH_STATE;
        }
        if (bstate == need_more || bstate == finish_started) {
            if (strm->avail_out == 0) {
                s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
            }
            return Z_OK;
            /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
             * of deflate should use the same flush parameter to make sure
             * that the flush is complete. So we don't have to output an
             * empty block here, this will be done at next call. This also
             * ensures that for a very small output buffer, we emit at most
             * one empty block.
             */
        }
        if (bstate == block_done) {
            if (flush == Z_PARTIAL_FLUSH) {
                _tr_align(s);
            } else if (flush != Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */
                _tr_stored_block(s, (char*)0, 0L, 0);
                /* For a full flush, this empty block will be recognized
                 * as a special marker by inflate_sync().
                 */
                if (flush == Z_FULL_FLUSH) {
                    CLEAR_HASH(s);             /* forget history */
                    if (s->lookahead == 0) {
                        s->strstart = 0;
                        s->block_start = 0L;
                    }
                }
            }
            flush_pending(strm);
            if (strm->avail_out == 0) {
              s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
              return Z_OK;
            }
        }
    }
    Assert(strm->avail_out > 0, "bug2");

    if (flush != Z_FINISH) return Z_OK;
    if (s->wrap <= 0) return Z_STREAM_END;

    /* Write the trailer */
#ifdef GZIP
    if (s->wrap == 2) {
        put_byte(s, (Byte)(strm->adler & 0xff));
        put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
        put_byte(s, (Byte)((strm->adler >> 16) & 0xff));
        put_byte(s, (Byte)((strm->adler >> 24) & 0xff));
        put_byte(s, (Byte)(strm->total_in & 0xff));
        put_byte(s, (Byte)((strm->total_in >> 8) & 0xff));
        put_byte(s, (Byte)((strm->total_in >> 16) & 0xff));
        put_byte(s, (Byte)((strm->total_in >> 24) & 0xff));
    }
    else
#endif
    {
        putShortMSB(s, (uInt)(strm->adler >> 16));
        putShortMSB(s, (uInt)(strm->adler & 0xffff));
    }
    flush_pending(strm);
    /* If avail_out is zero, the application will call deflate again
     * to flush the rest.
     */
    if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */
    return s->pending != 0 ? Z_OK : Z_STREAM_END;
}

// Assembly:
pushq $-0x2
popq %rax
testq %rdi, %rdi
je 0x85947
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %r12d
movq %rdi, %r14
movq 0x38(%rdi), %rbx
testq %rbx, %rbx
sete %cl
cmpl $0x6, %esi
setae %dl
orb %cl, %dl
jne 0x85939
cmpq $0x0, 0x18(%r14)
je 0x8592a
cmpq $0x0, (%r14)
je 0x8591f
movl 0x8(%rbx), %ecx
cmpl $0x29a, %ecx            # imm = 0x29A
setne %dl
cmpl $0x4, %r12d
sete %sil
orb %dl, %sil
je 0x8592a
cmpl $0x0, 0x20(%r14)
je 0x85d85
movq %r14, (%rbx)
movl 0x40(%rbx), %r15d
movl %r12d, 0x40(%rbx)
cmpl $0x2a, %ecx
jne 0x85a8b
cmpl $0x2, 0x2c(%rbx)
jne 0x85948
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84c30
movq %rax, 0x60(%r14)
movq 0x10(%rbx), %rax
movl 0x28(%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x28(%rbx)
movb $0x1f, (%rax,%rcx)
movq 0x10(%rbx), %rax
movl 0x28(%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x28(%rbx)
movb $-0x75, (%rax,%rcx)
movq 0x10(%rbx), %rax
movl 0x28(%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x28(%rbx)
movb $0x8, (%rax,%rcx)
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x85982
cmpl $0x0, (%rax)
setne %cl
cmpl $0x0, 0x44(%rax)
setne %dl
addb %dl, %dl
orb %cl, %dl
cmpq $0x0, 0x18(%rax)
setne %cl
shlb $0x2, %cl
orb %dl, %cl
cmpq $0x0, 0x28(%rax)
setne %dl
shlb $0x3, %dl
orb %cl, %dl
cmpq $0x0, 0x38(%rax)
setne %al
shlb $0x4, %al
orb %dl, %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movq 0x30(%rbx), %rax
movb 0x8(%rax), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movq 0x30(%rbx), %rax
movb 0x9(%rax), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movq 0x30(%rbx), %rax
movb 0xa(%rax), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movq 0x30(%rbx), %rax
movb 0xb(%rax), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movl 0xb4(%rbx), %ecx
movb $0x2, %al
cmpl $0x9, %ecx
je 0x85895
cmpl $0x2, 0xb8(%rbx)
setge %dl
cmpl $0x2, %ecx
setl %al
orb %dl, %al
shlb $0x2, %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movq 0x30(%rbx), %rax
movb 0x14(%rax), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movq 0x30(%rbx), %rax
cmpq $0x0, 0x18(%rax)
je 0x858f5
movb 0x20(%rax), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movq 0x30(%rbx), %rax
movb 0x21(%rax), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movq 0x30(%rbx), %rax
cmpl $0x0, 0x44(%rax)
je 0x8590f
movq 0x60(%r14), %rdi
movq 0x10(%rbx), %rsi
movl 0x28(%rbx), %edx
callq 0x84c30
movq %rax, 0x60(%r14)
andl $0x0, 0x38(%rbx)
movl $0x45, 0x8(%rbx)
jmp 0x85a94
cmpl $0x0, 0x8(%r14)
je 0x8573a
leaq 0x543af(%rip), %rcx     # 0xd9ce0
movq 0x20(%rcx), %rcx
movq %rcx, 0x30(%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x48(%rbx), %eax
shll $0xc, %eax
addl $0xffff8800, %eax       # imm = 0xFFFF8800
xorl %ecx, %ecx
cmpl $0x1, 0xb8(%rbx)
jg 0x85a28
movl 0xb4(%rbx), %edx
cmpl $0x2, %edx
jl 0x85a28
cmpl $0x6, %edx
jae 0x85a1c
pushq $0x40
popq %rcx
jmp 0x85a28
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %eax
movl %eax, 0x28(%rbx)
xorl %eax, %eax
movb %al, (%rcx,%rdx)
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movl 0xb4(%rbx), %ecx
movb $0x2, %al
cmpl $0x9, %ecx
je 0x859f6
cmpl $0x2, 0xb8(%rbx)
setge %dl
cmpl $0x2, %ecx
setl %al
orb %dl, %al
shlb $0x2, %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movq 0x10(%rbx), %rax
movl 0x28(%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x28(%rbx)
movb $0x3, (%rax,%rcx)
jmp 0x85d3f
setne %cl
movzbl %cl, %ecx
orl $0x2, %ecx
shll $0x6, %ecx
movl %ecx, %edx
orl %eax, %edx
cmpl $0x0, 0x9c(%rbx)
leal 0x20(%rcx,%rax), %esi
cmovel %edx, %esi
pushq $0x1f
popq %rcx
movl %esi, %eax
xorl %edx, %edx
divl %ecx
orl %edx, %esi
xorl $0x1f, %esi
movl $0x71, 0x8(%rbx)
movq %rbx, %rdi
callq 0x8653e
cmpl $0x0, 0x9c(%rbx)
je 0x85a79
movl 0x62(%r14), %esi
movq %rbx, %rdi
callq 0x8653e
movzwl 0x60(%r14), %esi
movq %rbx, %rdi
callq 0x8653e
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x922c0
movq %rax, 0x60(%r14)
movl 0x8(%rbx), %ecx
cmpl $0x45, %ecx
jne 0x85b54
movq 0x30(%rbx), %rax
cmpq $0x0, 0x18(%rax)
je 0x85b48
movl 0x28(%rbx), %ecx
movl 0x38(%rbx), %esi
movzwl 0x20(%rax), %edx
cmpl %edx, %esi
jae 0x85b18
movl 0x28(%rbx), %edx
cmpq %rdx, 0x18(%rbx)
jne 0x85af1
cmpl $0x0, 0x44(%rax)
je 0x85ad7
subl %ecx, %edx
jbe 0x85ad7
movq 0x60(%r14), %rdi
movl %ecx, %esi
addq 0x10(%rbx), %rsi
callq 0x84c30
movq %rax, 0x60(%r14)
movq %r14, %rdi
callq 0x86561
movl 0x28(%rbx), %edx
movq 0x30(%rbx), %rax
cmpq %rdx, 0x18(%rbx)
je 0x85b16
movl 0x38(%rbx), %esi
movl %edx, %ecx
movq 0x18(%rax), %rax
movl %esi, %esi
movb (%rax,%rsi), %al
movq 0x10(%rbx), %rsi
movl %edx, %edi
incl %edi
movl %edi, 0x28(%rbx)
movb %al, (%rsi,%rdx)
movl 0x38(%rbx), %esi
incl %esi
movl %esi, 0x38(%rbx)
movq 0x30(%rbx), %rax
jmp 0x85aa9
movl %edx, %ecx
cmpl $0x0, 0x44(%rax)
je 0x85b3c
movl 0x28(%rbx), %edx
subl %ecx, %edx
jbe 0x85b3c
movq 0x60(%r14), %rdi
movl %ecx, %esi
addq 0x10(%rbx), %rsi
callq 0x84c30
movq %rax, 0x60(%r14)
movq 0x30(%rbx), %rax
movl 0x38(%rbx), %ecx
cmpl 0x20(%rax), %ecx
jne 0x85b51
andl $0x0, 0x38(%rbx)
movl $0x49, 0x8(%rbx)
jmp 0x85b61
movl 0x8(%rbx), %ecx
cmpl $0x49, %ecx
jne 0x85c16
movq 0x30(%rbx), %rax
cmpq $0x0, 0x28(%rax)
je 0x85c0a
movl 0x28(%rbx), %eax
movl 0x28(%rbx), %edx
movq 0x30(%rbx), %rcx
cmpq %rdx, 0x18(%rbx)
jne 0x85bb0
cmpl $0x0, 0x44(%rcx)
je 0x85b99
subl %eax, %edx
jbe 0x85b99
movq 0x60(%r14), %rdi
movl %eax, %esi
addq 0x10(%rbx), %rsi
callq 0x84c30
movq %rax, 0x60(%r14)
movq %r14, %rdi
callq 0x86561
movl 0x28(%rbx), %edx
cmpq %rdx, 0x18(%rbx)
je 0x85bd9
movq 0x30(%rbx), %rcx
movl %edx, %eax
movq 0x28(%rcx), %rcx
movl 0x38(%rbx), %esi
leal 0x1(%rsi), %edi
movl %edi, 0x38(%rbx)
movb (%rcx,%rsi), %cl
movq 0x10(%rbx), %rsi
movl %edx, %edi
incl %edi
movl %edi, 0x28(%rbx)
movb %cl, (%rsi,%rdx)
testb %cl, %cl
jne 0x85b6f
movb $0x1, %bpl
movl %eax, %edx
jmp 0x85bdb
xorl %ebp, %ebp
movq 0x30(%rbx), %rax
cmpl $0x0, 0x44(%rax)
je 0x85c01
movl 0x28(%rbx), %eax
subl %edx, %eax
jbe 0x85c01
movq 0x60(%r14), %rdi
movl %edx, %esi
addq 0x10(%rbx), %rsi
movl %eax, %edx
callq 0x84c30
movq %rax, 0x60(%r14)
testb %bpl, %bpl
je 0x85c13
andl $0x0, 0x38(%rbx)
movl $0x5b, 0x8(%rbx)
jmp 0x85c1f
movl 0x8(%rbx), %ecx
cmpl $0x5b, %ecx
jne 0x85cd4
movq 0x30(%rbx), %rax
cmpq $0x0, 0x38(%rax)
je 0x85cc8
movl 0x28(%rbx), %eax
movl 0x28(%rbx), %edx
movq 0x30(%rbx), %rcx
cmpq %rdx, 0x18(%rbx)
jne 0x85c72
cmpl $0x0, 0x44(%rcx)
je 0x85c5b
subl %eax, %edx
jbe 0x85c5b
movq 0x60(%r14), %rdi
movl %eax, %esi
addq 0x10(%rbx), %rsi
callq 0x84c30
movq %rax, 0x60(%r14)
movq %r14, %rdi
callq 0x86561
movl 0x28(%rbx), %edx
cmpq %rdx, 0x18(%rbx)
je 0x85c9b
movq 0x30(%rbx), %rcx
movl %edx, %eax
movq 0x38(%rcx), %rcx
movl 0x38(%rbx), %esi
leal 0x1(%rsi), %edi
movl %edi, 0x38(%rbx)
movb (%rcx,%rsi), %cl
movq 0x10(%rbx), %rsi
movl %edx, %edi
incl %edi
movl %edi, 0x28(%rbx)
movb %cl, (%rsi,%rdx)
testb %cl, %cl
jne 0x85c31
movb $0x1, %bpl
movl %eax, %edx
jmp 0x85c9d
xorl %ebp, %ebp
movq 0x30(%rbx), %rax
cmpl $0x0, 0x44(%rax)
je 0x85cc3
movl 0x28(%rbx), %eax
subl %edx, %eax
jbe 0x85cc3
movq 0x60(%r14), %rdi
movl %edx, %esi
addq 0x10(%rbx), %rsi
movl %eax, %edx
callq 0x84c30
movq %rax, 0x60(%r14)
testb %bpl, %bpl
je 0x85cd1
movl $0x67, 0x8(%rbx)
jmp 0x85cd9
movl 0x8(%rbx), %ecx
cmpl $0x67, %ecx
jne 0x85d46
movq 0x30(%rbx), %rax
cmpl $0x0, 0x44(%rax)
je 0x85d3f
movl 0x28(%rbx), %eax
leal 0x2(%rax), %ecx
movq 0x18(%rbx), %rdx
cmpq %rcx, %rdx
jae 0x85d04
movq %r14, %rdi
callq 0x86561
movl 0x28(%rbx), %eax
movq 0x18(%rbx), %rdx
leal 0x2(%rax), %ecx
cmpq %rcx, %rdx
jb 0x85d46
movb 0x60(%r14), %cl
movq 0x10(%rbx), %rdx
leal 0x1(%rax), %esi
movl %esi, 0x28(%rbx)
movl %eax, %eax
movb %cl, (%rdx,%rax)
movb 0x61(%r14), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84c30
movq %rax, 0x60(%r14)
movl $0x71, 0x8(%rbx)
cmpl $0x0, 0x28(%rbx)
je 0x85d73
movq %r14, %rdi
callq 0x86561
cmpl $0x0, 0x20(%r14)
je 0x863c9
movl 0x8(%rbx), %eax
movl 0x8(%r14), %ecx
cmpl $0x29a, %eax            # imm = 0x29A
jne 0x85d9c
testl %ecx, %ecx
jne 0x85d85
jmp 0x85da0
cmpl $0x0, 0x8(%r14)
jne 0x85d5f
cmpl $0x4, %r12d
je 0x85d5f
cmpl %r12d, %r15d
jl 0x85d5f
leaq 0x53f54(%rip), %rax     # 0xd9ce0
movq 0x38(%rax), %rax
movq %rax, 0x30(%r14)
pushq $-0x5
popq %rax
jmp 0x85939
testl %ecx, %ecx
jne 0x85dad
cmpl $0x0, 0xa4(%rbx)
je 0x861da
movl 0xb8(%rbx), %eax
cmpl $0x3, %eax
je 0x85e9b
cmpl $0x2, %eax
jne 0x861b9
cmpl $0x0, 0xa4(%rbx)
jne 0x85de3
movq %rbx, %rdi
callq 0x87176
cmpl $0x0, 0xa4(%rbx)
je 0x861f3
andl $0x0, 0x90(%rbx)
movq 0x50(%rbx), %rax
movl 0x9c(%rbx), %ecx
movzbl (%rax,%rcx), %eax
movq 0x1700(%rbx), %rcx
movl 0x16fc(%rbx), %edx
andw $0x0, (%rcx,%rdx,2)
movq 0x16f0(%rbx), %rcx
leal 0x1(%rdx), %esi
movl %esi, 0x16fc(%rbx)
movb %al, (%rcx,%rdx)
incw 0xc4(%rbx,%rax,4)
movl 0x16fc(%rbx), %ecx
movl 0x16f8(%rbx), %edx
decl %edx
decl 0xa4(%rbx)
movl 0x9c(%rbx), %eax
incl %eax
movl %eax, 0x9c(%rbx)
cmpl %edx, %ecx
jne 0x85dc5
movq 0x88(%rbx), %rcx
testq %rcx, %rcx
js 0x85e63
movl %ecx, %esi
addq 0x50(%rbx), %rsi
jmp 0x85e65
xorl %esi, %esi
movl %eax, %edx
subq %rcx, %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x8a0ca
movl 0x9c(%rbx), %eax
movq %rax, 0x88(%rbx)
movq (%rbx), %rdi
callq 0x86561
movq (%rbx), %rax
cmpl $0x0, 0x20(%rax)
jne 0x85dc5
jmp 0x8629e
movl %r12d, 0xc(%rsp)
movl 0xa4(%rbx), %ecx
cmpl $0x102, %ecx            # imm = 0x102
jae 0x85ef8
testl %r12d, %r12d
sete %bpl
movq %rbx, %rdi
callq 0x87176
movl 0xa4(%rbx), %ecx
cmpl $0x102, %ecx            # imm = 0x102
setb %al
testb %al, %bpl
jne 0x8629e
testl %ecx, %ecx
je 0x861fc
andl $0x0, 0x90(%rbx)
movl 0x9c(%rbx), %esi
cmpl $0x2, %ecx
ja 0x85f05
movq 0x50(%rbx), %rax
jmp 0x8602f
andl $0x0, 0x90(%rbx)
movl 0x9c(%rbx), %esi
movq 0x50(%rbx), %rax
testl %esi, %esi
je 0x8602d
movl %esi, %edx
movb -0x1(%rax,%rdx), %r8b
cmpb (%rax,%rdx), %r8b
jne 0x8602f
leaq (%rax,%rdx), %rdi
cmpb 0x1(%rdi), %r8b
jne 0x8602f
cmpb 0x2(%rdi), %r8b
jne 0x8602f
addq $0x102, %rdi            # imm = 0x102
movq %rdi, 0x10(%rsp)
leaq 0x2(%rdx), %r9
leaq 0x3(%rdx), %rdi
leaq 0x4(%rdx), %rsi
leaq 0x5(%rdx), %r10
leaq 0x6(%rdx), %r11
leaq 0x7(%rdx), %r12
leaq 0x8(%rdx), %r13
leaq 0x9(%rdx), %r15
pushq $0x2
popq %rbp
cmpb (%rax,%rdi), %r8b
jne 0x860d9
cmpb 0x1(%rax,%rdi), %r8b
jne 0x860e1
cmpb 0x2(%rax,%rdi), %r8b
jne 0x860e9
cmpb 0x3(%rax,%rdi), %r8b
jne 0x860f1
cmpb 0x4(%rax,%rdi), %r8b
jne 0x860f9
cmpb 0x5(%rax,%rdi), %r8b
jne 0x86101
cmpb 0x6(%rax,%rdi), %r8b
jne 0x86109
addq $0x8, %r9
cmpq $0xf9, %rbp
ja 0x86025
addq $0x8, %rbp
movq %r9, 0x18(%rsp)
movq %r15, %r9
movq %r13, %r15
movq %r12, %r13
movq %r11, %r12
movq %r10, %r11
movq %rsi, %r10
leaq 0x8(%rdi), %rsi
movq %rsi, 0x20(%rsp)
movq %r10, %rsi
movq %r11, %r10
movq %r12, %r11
movq %r13, %r12
movq %r15, %r13
movq %r9, %r15
movq 0x18(%rsp), %r9
addq $0x8, %rsi
addq $0x8, %r10
addq $0x8, %r11
addq $0x8, %r12
addq $0x8, %r13
addq $0x8, %r15
cmpb 0x7(%rax,%rdi), %r8b
movq 0x20(%rsp), %rdi
je 0x85f69
addq %rax, %r9
jmp 0x8610f
xorl %esi, %esi
movl 0x16fc(%rbx), %ecx
movl %esi, %edx
movzbl (%rax,%rdx), %eax
movq 0x1700(%rbx), %rdx
movl %ecx, %esi
andw $0x0, (%rdx,%rsi,2)
movq 0x16f0(%rbx), %rdx
incl %ecx
movl %ecx, 0x16fc(%rbx)
movb %al, (%rdx,%rsi)
incw 0xc4(%rbx,%rax,4)
movl 0x16fc(%rbx), %ecx
movl 0x16f8(%rbx), %edx
decl %edx
decl 0xa4(%rbx)
movl 0x9c(%rbx), %eax
incl %eax
movl %eax, 0x9c(%rbx)
cmpl %edx, %ecx
jne 0x85ea0
movq 0x88(%rbx), %rcx
testq %rcx, %rcx
js 0x860a1
movl %ecx, %esi
addq 0x50(%rbx), %rsi
jmp 0x860a3
xorl %esi, %esi
movl %eax, %edx
subq %rcx, %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x8a0ca
movl 0x9c(%rbx), %eax
movq %rax, 0x88(%rbx)
movq (%rbx), %rdi
callq 0x86561
movq (%rbx), %rax
cmpl $0x0, 0x20(%rax)
jne 0x85ea0
jmp 0x8629e
addq %rax, %rdi
movq %rdi, %r9
jmp 0x8610f
addq %rax, %rsi
movq %rsi, %r9
jmp 0x8610f
addq %rax, %r10
movq %r10, %r9
jmp 0x8610f
addq %rax, %r11
movq %r11, %r9
jmp 0x8610f
addq %rax, %r12
movq %r12, %r9
jmp 0x8610f
addq %rax, %r13
movq %r13, %r9
jmp 0x8610f
addq %rax, %r15
movq %r15, %r9
subl 0x10(%rsp), %r9d
addl $0x102, %r9d            # imm = 0x102
cmpl %ecx, %r9d
cmovael %ecx, %r9d
movl %r9d, 0x90(%rbx)
movl 0x16fc(%rbx), %ecx
cmpl $0x3, %r9d
movl 0xc(%rsp), %r12d
jb 0x86037
addb $-0x3, %r9b
movq 0x1700(%rbx), %rax
movw $0x1, (%rax,%rcx,2)
movq 0x16f0(%rbx), %rax
movl %ecx, %edx
incl %edx
movl %edx, 0x16fc(%rbx)
movb %r9b, (%rax,%rcx)
movzbl %r9b, %eax
leaq 0x1ca11(%rip), %rcx     # 0xa2b80
movzbl (%rcx,%rax), %eax
incw 0x4c8(%rbx,%rax,4)
leaq 0x1c7fe(%rip), %rax     # 0xa2980
movzbl (%rax), %eax
incw 0x9b8(%rbx,%rax,4)
movl 0x16fc(%rbx), %ecx
movl 0x16f8(%rbx), %edx
movl 0x90(%rbx), %eax
subl %eax, 0xa4(%rbx)
addl 0x9c(%rbx), %eax
andl $0x0, 0x90(%rbx)
decl %edx
jmp 0x8607f
movslq 0xb4(%rbx), %rax
shlq $0x4, %rax
leaq 0x53a75(%rip), %rcx     # 0xd9c40
movq %rbx, %rdi
movl %r12d, %esi
callq *0x8(%rax,%rcx)
jmp 0x86267
testl %r12d, %r12d
je 0x863cd
cmpl $0x29a, %eax            # imm = 0x29A
jne 0x85dad
jmp 0x86308
testl %r12d, %r12d
je 0x8629e
movq 0x88(%rbx), %rax
testq %rax, %rax
js 0x86210
movl %eax, %esi
addq 0x50(%rbx), %rsi
jmp 0x86212
xorl %esi, %esi
movl 0x9c(%rbx), %edx
subq %rax, %rdx
xorl %ecx, %ecx
cmpl $0x4, %r12d
sete %cl
movq %rbx, %rdi
callq 0x8a0ca
movl 0x9c(%rbx), %eax
movq %rax, 0x88(%rbx)
movq (%rbx), %rdi
callq 0x86561
movq (%rbx), %rax
cmpl $0x0, 0x20(%rax)
je 0x8625c
xorl %eax, %eax
cmpl $0x4, %r12d
sete %al
leal 0x1(,%rax,2), %eax
jmp 0x86267
xorl %eax, %eax
cmpl $0x4, %r12d
sete %al
addl %eax, %eax
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x2, %ecx
jne 0x86278
movl $0x29a, 0x8(%rbx)       # imm = 0x29A
testl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
je 0x8629e
cmpl $0x1, %eax
jne 0x86308
cmpl $0x5, %r12d
je 0x862f5
movq %rbx, %rdi
cmpl $0x1, %r12d
jne 0x862b4
callq 0x89eb2
jmp 0x862f5
xorl %eax, %eax
cmpl $0x0, 0x20(%r14)
jne 0x85939
orl $-0x1, 0x40(%rbx)
jmp 0x85939
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x89da6
cmpl $0x3, %r12d
jne 0x862f5
movq 0x68(%rbx), %rdi
movl 0x74(%rbx), %edx
decl %edx
andw $0x0, (%rdi,%rdx,2)
addq %rdx, %rdx
xorl %esi, %esi
callq 0xe270
cmpl $0x0, 0xa4(%rbx)
jne 0x862f5
andl $0x0, 0x9c(%rbx)
andq $0x0, 0x88(%rbx)
movq %r14, %rdi
callq 0x86561
cmpl $0x0, 0x20(%r14)
je 0x863c9
cmpl $0x4, %r12d
jne 0x863cd
movl 0x2c(%rbx), %eax
testl %eax, %eax
jle 0x863d4
movq 0x60(%r14), %rsi
cmpl $0x2, %eax
jne 0x863db
movq 0x10(%rbx), %rax
movl 0x28(%rbx), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x28(%rbx)
movb %sil, (%rax,%rcx)
movb 0x61(%r14), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movb 0x62(%r14), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movb 0x63(%r14), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movb 0x10(%r14), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movb 0x11(%r14), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movb 0x12(%r14), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movb 0x13(%r14), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
jmp 0x863f4
orl $-0x1, 0x40(%rbx)
xorl %eax, %eax
jmp 0x85939
pushq $0x1
jmp 0x85d96
shrq $0x10, %rsi
movq %rbx, %rdi
callq 0x8653e
movzwl 0x60(%r14), %esi
movq %rbx, %rdi
callq 0x8653e
movq %r14, %rdi
callq 0x86561
movl 0x2c(%rbx), %eax
testl %eax, %eax
jle 0x86408
negl %eax
movl %eax, 0x2c(%rbx)
xorl %eax, %eax
cmpl $0x0, 0x28(%rbx)
sete %al
jmp 0x85939