// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tdefl_compress
tdefl_status tdefl_compress(tdefl_compressor *d, const void *pIn_buf, size_t *pIn_buf_size, void *pOut_buf, size_t *pOut_buf_size, tdefl_flush flush)
{
    if (!d)
    {
        if (pIn_buf_size)
            *pIn_buf_size = 0;
        if (pOut_buf_size)
            *pOut_buf_size = 0;
        return TDEFL_STATUS_BAD_PARAM;
    }

    d->m_pIn_buf = pIn_buf;
    d->m_pIn_buf_size = pIn_buf_size;
    d->m_pOut_buf = pOut_buf;
    d->m_pOut_buf_size = pOut_buf_size;
    d->m_pSrc = (const mz_uint8 *)(pIn_buf);
    d->m_src_buf_left = pIn_buf_size ? *pIn_buf_size : 0;
    d->m_out_buf_ofs = 0;
    d->m_flush = flush;

    if (((d->m_pPut_buf_func != NULL) == ((pOut_buf != NULL) || (pOut_buf_size != NULL))) || (d->m_prev_return_status != TDEFL_STATUS_OKAY) ||
        (d->m_wants_to_finish && (flush != TDEFL_FINISH)) || (pIn_buf_size && *pIn_buf_size && !pIn_buf) || (pOut_buf_size && *pOut_buf_size && !pOut_buf))
    {
        if (pIn_buf_size)
            *pIn_buf_size = 0;
        if (pOut_buf_size)
            *pOut_buf_size = 0;
        return (d->m_prev_return_status = TDEFL_STATUS_BAD_PARAM);
    }
    d->m_wants_to_finish |= (flush == TDEFL_FINISH);

    if ((d->m_output_flush_remaining) || (d->m_finished))
        return (d->m_prev_return_status = tdefl_flush_output_buffer(d));

#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
    if (((d->m_flags & TDEFL_MAX_PROBES_MASK) == 1) &&
        ((d->m_flags & TDEFL_GREEDY_PARSING_FLAG) != 0) &&
        ((d->m_flags & (TDEFL_FILTER_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS | TDEFL_RLE_MATCHES)) == 0))
    {
        if (!tdefl_compress_fast(d))
            return d->m_prev_return_status;
    }
    else
#endif /* #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN */
    {
        if (!tdefl_compress_normal(d))
            return d->m_prev_return_status;
    }

    if ((d->m_flags & (TDEFL_WRITE_ZLIB_HEADER | TDEFL_COMPUTE_ADLER32)) && (pIn_buf))
        d->m_adler32 = (mz_uint32)mz_adler32(d->m_adler32, (const mz_uint8 *)pIn_buf, d->m_pSrc - (const mz_uint8 *)pIn_buf);

    if ((flush) && (!d->m_lookahead_size) && (!d->m_src_buf_left) && (!d->m_output_flush_remaining))
    {
        if (tdefl_flush_block(d, flush) < 0)
            return d->m_prev_return_status;
        d->m_finished = (flush == TDEFL_FINISH);
        if (flush == TDEFL_FULL_FLUSH)
        {
            MZ_CLEAR_ARR(d->m_hash);
            MZ_CLEAR_ARR(d->m_next);
            d->m_dict_size = 0;
        }
    }

    return (d->m_prev_return_status = tdefl_flush_output_buffer(d));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x190d67
cmpq $0x0, -0x20(%rbp)
je 0x190d49
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x190d5b
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x19102b
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb0(%rax)
cmpq $0x0, -0x20(%rbp)
je 0x190dc6
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x190dce
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0x190dce
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xc0(%rax)
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xa8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x48(%rbp)
movb $0x1, %al
cmpq $0x0, -0x28(%rbp)
movb %al, -0x41(%rbp)
jne 0x190e23
cmpq $0x0, -0x30(%rbp)
setne %al
movb %al, -0x41(%rbp)
movl -0x48(%rbp), %eax
movb -0x41(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x190e83
movq -0x10(%rbp), %rax
cmpl $0x0, 0x84(%rax)
jne 0x190e83
movq -0x10(%rbp), %rax
cmpl $0x0, 0x80(%rax)
je 0x190e53
cmpl $0x4, -0x34(%rbp)
jne 0x190e83
cmpq $0x0, -0x20(%rbp)
je 0x190e6b
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x190e6b
cmpq $0x0, -0x18(%rbp)
je 0x190e83
cmpq $0x0, -0x30(%rbp)
je 0x190ec1
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x190ec1
cmpq $0x0, -0x28(%rbp)
jne 0x190ec1
cmpq $0x0, -0x20(%rbp)
je 0x190e95
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x190ea7
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movl $0xfffffffe, 0x84(%rax) # imm = 0xFFFFFFFE
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x19102b
cmpl $0x4, -0x34(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
orl 0x80(%rax), %ecx
movl %ecx, 0x80(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x74(%rax)
jne 0x190ef1
movq -0x10(%rbp), %rax
cmpl $0x0, 0x78(%rax)
je 0x190f0c
movq -0x10(%rbp), %rdi
callq 0x194a70
movq -0x10(%rbp), %rcx
movl %eax, 0x84(%rcx)
movl %eax, -0x4(%rbp)
jmp 0x19102b
movq -0x10(%rbp), %rdi
callq 0x194be0
cmpl $0x0, %eax
jne 0x190f2c
movq -0x10(%rbp), %rax
movl 0x84(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x19102b
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x3000, %eax           # imm = 0x3000
cmpl $0x0, %eax
je 0x190f71
cmpq $0x0, -0x18(%rbp)
je 0x190f71
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, %edi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
callq 0x190240
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
cmpl $0x0, -0x34(%rbp)
je 0x191015
movq -0x10(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x191015
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb8(%rax)
jne 0x191015
movq -0x10(%rbp), %rax
cmpl $0x0, 0x74(%rax)
jne 0x191015
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x196160
cmpl $0x0, %eax
jge 0x190fc1
movq -0x10(%rbp), %rax
movl 0x84(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x19102b
cmpl $0x4, -0x34(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x78(%rax)
cmpl $0x3, -0x34(%rbp)
jne 0x191013
movq -0x10(%rbp), %rdi
addq $0x292aa, %rdi          # imm = 0x292AA
xorl %esi, %esi
movl $0x10000, %edx          # imm = 0x10000
callq 0x19140
movq -0x10(%rbp), %rdi
addq $0x192aa, %rdi          # imm = 0x192AA
xorl %esi, %esi
movl $0x10000, %edx          # imm = 0x10000
callq 0x19140
movq -0x10(%rbp), %rax
movl $0x0, 0x2c(%rax)
jmp 0x191015
movq -0x10(%rbp), %rdi
callq 0x194a70
movq -0x10(%rbp), %rcx
movl %eax, 0x84(%rcx)
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)