// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/../foreign/miniz-c.h
// Function: tinfl_decompress_mem_to_callback
int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
{
    int result = 0;
    tinfl_decompressor decomp;
    mz_uint8 *pDict = (mz_uint8 *)MZ_MALLOC(TINFL_LZ_DICT_SIZE);
    size_t in_buf_ofs = 0, dict_ofs = 0;
    if (!pDict)
        return TINFL_STATUS_FAILED;
    memset(pDict,0,TINFL_LZ_DICT_SIZE);
    tinfl_init(&decomp);
    for (;;)
    {
        size_t in_buf_size = *pIn_buf_size - in_buf_ofs, dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs;
        tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8 *)pIn_buf + in_buf_ofs, &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size,
                                               (flags & ~(TINFL_FLAG_HAS_MORE_INPUT | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)));
        in_buf_ofs += in_buf_size;
        if ((dst_buf_size) && (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user)))
            break;
        if (status != TINFL_STATUS_HAS_MORE_OUTPUT)
        {
            result = (status == TINFL_STATUS_DONE);
            break;
        }
        dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1);
    }
    MZ_FREE(pDict);
    *pIn_buf_size = in_buf_ofs;
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2120, %rsp           # imm = 0x2120
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x8000, %edi           # imm = 0x8000
callq 0x19200
movq %rax, -0x20f0(%rbp)
movq $0x0, -0x20f8(%rbp)
movq $0x0, -0x2100(%rbp)
cmpq $0x0, -0x20f0(%rbp)
jne 0x197ac3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x197bf7
movq -0x20f0(%rbp), %rdi
xorl %esi, %esi
movl $0x8000, %edx           # imm = 0x8000
callq 0x19140
movl $0x0, -0x20e8(%rbp)
jmp 0x197ae2
movq -0x18(%rbp), %rax
movq (%rax), %rax
subq -0x20f8(%rbp), %rax
movq %rax, -0x2108(%rbp)
movl $0x8000, %eax           # imm = 0x8000
subq -0x2100(%rbp), %rax
movq %rax, -0x2110(%rbp)
movq -0x10(%rbp), %rsi
addq -0x20f8(%rbp), %rsi
movq -0x20f0(%rbp), %rcx
movq -0x20f0(%rbp), %r8
addq -0x2100(%rbp), %r8
movl -0x2c(%rbp), %eax
andl $-0x7, %eax
leaq -0x20e8(%rbp), %rdi
leaq -0x2108(%rbp), %rdx
leaq -0x2110(%rbp), %r9
movl %eax, (%rsp)
callq 0x191aa0
movl %eax, -0x2114(%rbp)
movq -0x2108(%rbp), %rax
addq -0x20f8(%rbp), %rax
movq %rax, -0x20f8(%rbp)
cmpq $0x0, -0x2110(%rbp)
je 0x197b9a
movq -0x20(%rbp), %rax
movq -0x20f0(%rbp), %rdi
addq -0x2100(%rbp), %rdi
movq -0x2110(%rbp), %rcx
movl %ecx, %esi
movq -0x28(%rbp), %rdx
callq *%rax
cmpl $0x0, %eax
jne 0x197b9a
jmp 0x197bd7
cmpl $0x2, -0x2114(%rbp)
je 0x197bb7
cmpl $0x0, -0x2114(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x30(%rbp)
jmp 0x197bd7
movq -0x2100(%rbp), %rax
addq -0x2110(%rbp), %rax
andq $0x7fff, %rax           # imm = 0x7FFF
movq %rax, -0x2100(%rbp)
jmp 0x197ae2
movq -0x20f0(%rbp), %rdi
callq 0x19030
movq -0x20f8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x2120, %rsp           # imm = 0x2120
popq %rbp
retq
nopw %cs:(%rax,%rax)