// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/zlib-1.3.0.1/deflate.c
// Function: deflate_huff
local block_state deflate_huff(deflate_state *s, int flush) {
    int bflush;             /* set if current block must be flushed */

    for (;;) {
        /* Make sure that we have a literal to write. */
        if (s->lookahead == 0) {
            fill_window(s);
            if (s->lookahead == 0) {
                if (flush == Z_NO_FLUSH)
                    return need_more;
                break;      /* flush the current block */
            }
        }

        /* Output a literal byte */
        s->match_length = 0;
        Tracevv((stderr,"%c", s->window[s->strstart]));
        _tr_tally_lit(s, s->window[s->strstart], bflush);
        s->lookahead--;
        s->strstart++;
        if (bflush) FLUSH_BLOCK(s, 0);
    }
    s->insert = 0;
    if (flush == Z_FINISH) {
        FLUSH_BLOCK(s, 1);
        return finish_done;
    }
    if (s->sym_next)
        FLUSH_BLOCK(s, 0);
    return block_done;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movl %esi, 0x44(%rsp)
movq 0x48(%rsp), %rax
cmpl $0x0, 0xb4(%rax)
jne 0xd3a6e
movq 0x48(%rsp), %rdi
callq 0xd09f0
movq 0x48(%rsp), %rax
cmpl $0x0, 0xb4(%rax)
jne 0xd3a6c
cmpl $0x0, 0x44(%rsp)
jne 0xd3a67
movl $0x0, 0x54(%rsp)
jmp 0xd3dda
jmp 0xd3c3b
jmp 0xd3a6e
movq 0x48(%rsp), %rax
movl $0x0, 0xa0(%rax)
movq 0x48(%rsp), %rax
movq 0x60(%rax), %rax
movq 0x48(%rsp), %rcx
movl 0xac(%rcx), %ecx
movb (%rax,%rcx), %al
movb %al, 0x3f(%rsp)
movq 0x48(%rsp), %rax
movq 0x1700(%rax), %rax
movq 0x48(%rsp), %rdx
movl 0x170c(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x170c(%rdx)
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
movq 0x48(%rsp), %rax
movq 0x1700(%rax), %rax
movq 0x48(%rsp), %rdx
movl 0x170c(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x170c(%rdx)
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
movb 0x3f(%rsp), %dl
movq 0x48(%rsp), %rax
movq 0x1700(%rax), %rax
movq 0x48(%rsp), %rsi
movl 0x170c(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x170c(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq 0x48(%rsp), %rax
movzbl 0x3f(%rsp), %ecx
movw 0xd4(%rax,%rcx,4), %dx
addw $0x1, %dx
movw %dx, 0xd4(%rax,%rcx,4)
movq 0x48(%rsp), %rax
movl 0x170c(%rax), %eax
movq 0x48(%rsp), %rcx
cmpl 0x1710(%rcx), %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x40(%rsp)
movq 0x48(%rsp), %rax
movl 0xb4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xb4(%rax)
movq 0x48(%rsp), %rax
movl 0xac(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xac(%rax)
cmpl $0x0, 0x40(%rsp)
je 0xd3c36
movq 0x48(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rax
cmpq $0x0, 0x98(%rax)
jl 0xd3bc0
movq 0x48(%rsp), %rax
movq 0x60(%rax), %rax
movq 0x48(%rsp), %rcx
movq 0x98(%rcx), %rcx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x28(%rsp)
jmp 0xd3bc9
xorl %eax, %eax
movq %rax, 0x28(%rsp)
jmp 0xd3bc9
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x48(%rsp), %rax
movl 0xac(%rax), %eax
movl %eax, %edx
movq 0x48(%rsp), %rax
subq 0x98(%rax), %rdx
xorl %ecx, %ecx
callq 0xd6b40
movq 0x48(%rsp), %rax
movl 0xac(%rax), %eax
movl %eax, %ecx
movq 0x48(%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x48(%rsp), %rax
movq (%rax), %rdi
callq 0xd2f00
movq 0x48(%rsp), %rax
movq (%rax), %rax
cmpl $0x0, 0x20(%rax)
jne 0xd3c34
movl $0x0, 0x54(%rsp)
jmp 0xd3dda
jmp 0xd3c36
jmp 0xd3a2d
movq 0x48(%rsp), %rax
movl $0x0, 0x172c(%rax)
cmpl $0x4, 0x44(%rsp)
jne 0xd3d13
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rax
cmpq $0x0, 0x98(%rax)
jl 0xd3c8f
movq 0x48(%rsp), %rax
movq 0x60(%rax), %rax
movq 0x48(%rsp), %rcx
movq 0x98(%rcx), %rcx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
jmp 0xd3c98
xorl %eax, %eax
movq %rax, 0x18(%rsp)
jmp 0xd3c98
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x48(%rsp), %rax
movl 0xac(%rax), %eax
movl %eax, %edx
movq 0x48(%rsp), %rax
subq 0x98(%rax), %rdx
movl $0x1, %ecx
callq 0xd6b40
movq 0x48(%rsp), %rax
movl 0xac(%rax), %eax
movl %eax, %ecx
movq 0x48(%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x48(%rsp), %rax
movq (%rax), %rdi
callq 0xd2f00
movq 0x48(%rsp), %rax
movq (%rax), %rax
cmpl $0x0, 0x20(%rax)
jne 0xd3d06
movl $0x2, 0x54(%rsp)
jmp 0xd3dda
movl $0x3, 0x54(%rsp)
jmp 0xd3dda
movq 0x48(%rsp), %rax
cmpl $0x0, 0x170c(%rax)
je 0xd3dd2
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
cmpq $0x0, 0x98(%rax)
jl 0xd3d5f
movq 0x48(%rsp), %rax
movq 0x60(%rax), %rax
movq 0x48(%rsp), %rcx
movq 0x98(%rcx), %rcx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
jmp 0xd3d68
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0xd3d68
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x48(%rsp), %rax
movl 0xac(%rax), %eax
movl %eax, %edx
movq 0x48(%rsp), %rax
subq 0x98(%rax), %rdx
xorl %ecx, %ecx
callq 0xd6b40
movq 0x48(%rsp), %rax
movl 0xac(%rax), %eax
movl %eax, %ecx
movq 0x48(%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x48(%rsp), %rax
movq (%rax), %rdi
callq 0xd2f00
movq 0x48(%rsp), %rax
movq (%rax), %rax
cmpl $0x0, 0x20(%rax)
jne 0xd3dd0
movl $0x0, 0x54(%rsp)
jmp 0xd3dda
jmp 0xd3dd2
movl $0x1, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)