LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_compress2
int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len, int level)
{
    int status;
    mz_stream stream;
    memset(&stream, 0, sizeof(stream));

    /* In case mz_ulong is 64-bits (argh I hate longs). */
    if ((source_len | *pDest_len) > 0xFFFFFFFFU)
        return MZ_PARAM_ERROR;

    stream.next_in = pSource;
    stream.avail_in = (mz_uint32)source_len;
    stream.next_out = pDest;
    stream.avail_out = (mz_uint32)*pDest_len;

    status = mz_deflateInit(&stream, level);
    if (status != MZ_OK)
        return status;

    status = mz_deflate(&stream, MZ_FINISH);
    if (status != MZ_STREAM_END)
    {
        mz_deflateEnd(&stream);
        return (status == MZ_OK) ? MZ_BUF_ERROR : status;
    }

    *pDest_len = stream.total_out;
    return mz_deflateEnd(&stream);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x3190
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
orq (%rcx), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jbe 0x47f3
movl $0xffffd8f0, -0x4(%rbp) # imm = 0xFFFFD8F0
jmp 0x48a4
movq -0x20(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x28(%rbp), %rax
movl %eax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x80(%rbp)
movl -0x2c(%rbp), %esi
leaq -0xa0(%rbp), %rdi
callq 0x3b10
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x483d
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x48a4
leaq -0xa0(%rbp), %rdi
movl $0x4, %esi
callq 0x4140
movl %eax, -0x30(%rbp)
cmpl $0x1, -0x30(%rbp)
je 0x488a
leaq -0xa0(%rbp), %rdi
callq 0x4050
cmpl $0x0, -0x30(%rbp)
jne 0x4876
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
movl %eax, -0xa4(%rbp)
jmp 0x487f
movl -0x30(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x48a4
movq -0x78(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
leaq -0xa0(%rbp), %rdi
callq 0x4050
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_inflateInit2
int mz_inflateInit2(mz_streamp pStream, int window_bits)
{
    inflate_state *pDecomp;
    if (!pStream)
        return MZ_STREAM_ERROR;
    if ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS))
        return MZ_PARAM_ERROR;

    pStream->data_type = 0;
    pStream->adler = 0;
    pStream->msg = NULL;
    pStream->total_in = 0;
    pStream->total_out = 0;
    pStream->reserved = 0;
    if (!pStream->zalloc)
        pStream->zalloc = miniz_def_alloc_func;
    if (!pStream->zfree)
        pStream->zfree = miniz_def_free_func;

    pDecomp = (inflate_state *)pStream->zalloc(pStream->opaque, 1, sizeof(inflate_state));
    if (!pDecomp)
        return MZ_MEM_ERROR;

    pStream->state = (struct mz_internal_state *)pDecomp;

    tinfl_init(&pDecomp->m_decomp);
    pDecomp->m_dict_ofs = 0;
    pDecomp->m_dict_avail = 0;
    pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT;
    pDecomp->m_first_call = 1;
    pDecomp->m_has_flushed = 0;
    pDecomp->m_window_bits = window_bits;

    return MZ_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4932
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x4a69
cmpl $0xf, -0x14(%rbp)
je 0x494e
xorl %eax, %eax
subl -0x14(%rbp), %eax
cmpl $0xf, %eax
je 0x494e
movl $0xffffd8f0, -0x4(%rbp) # imm = 0xFFFFD8F0
jmp 0x4a69
movq -0x10(%rbp), %rax
movl $0x0, 0x58(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x49af
movq -0x10(%rbp), %rax
leaq -0xf2b(%rip), %rcx      # 0x3a80
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x49c9
movq -0x10(%rbp), %rax
leaq -0xf15(%rip), %rcx      # 0x3ab0
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rdi
movl $0x1, %esi
movl $0xab10, %edx           # imm = 0xAB10
callq *%rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x49f9
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x4a69
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x2af8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x2afc(%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0xab0c(%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0x2b00(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x2b04(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x2b08(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_uncompress
int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len)
{
    mz_stream stream;
    int status;
    memset(&stream, 0, sizeof(stream));

    /* In case mz_ulong is 64-bits (argh I hate longs). */
    if ((source_len | *pDest_len) > 0xFFFFFFFFU)
        return MZ_PARAM_ERROR;

    stream.next_in = pSource;
    stream.avail_in = (mz_uint32)source_len;
    stream.next_out = pDest;
    stream.avail_out = (mz_uint32)*pDest_len;

    status = mz_inflateInit(&stream);
    if (status != MZ_OK)
        return status;

    status = mz_inflate(&stream, MZ_FINISH);
    if (status != MZ_STREAM_END)
    {
        mz_inflateEnd(&stream);
        return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR : status;
    }
    *pDest_len = stream.total_out;

    return mz_inflateEnd(&stream);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
leaq -0x98(%rbp), %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x3190
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
orq (%rcx), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jbe 0x7a9f
movl $0xffffd8f0, -0x4(%rbp) # imm = 0xFFFFD8F0
jmp 0x7b68
movq -0x20(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x28(%rbp), %rax
movl %eax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x78(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x4a80
movl %eax, -0x9c(%rbp)
cmpl $0x0, -0x9c(%rbp)
je 0x7aec
movl -0x9c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x7b68
leaq -0x98(%rbp), %rdi
movl $0x4, %esi
callq 0x4aa0
movl %eax, -0x9c(%rbp)
cmpl $0x1, -0x9c(%rbp)
je 0x7b4e
leaq -0x98(%rbp), %rdi
callq 0x79f0
cmpl $-0x5, -0x9c(%rbp)
jne 0x7b37
cmpl $0x0, -0x90(%rbp)
jne 0x7b37
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movl %eax, -0xa0(%rbp)
jmp 0x7b43
movl -0x9c(%rbp), %eax
movl %eax, -0xa0(%rbp)
movl -0xa0(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x7b68
movq -0x70(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
leaq -0x98(%rbp), %rdi
callq 0x79f0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_error
const char *mz_error(int err)
{
    static struct
    {
        int m_err;
        const char *m_pDesc;
    } s_error_descs[] =
        {
          { MZ_OK, "" }, { MZ_STREAM_END, "stream end" }, { MZ_NEED_DICT, "need dictionary" }, { MZ_ERRNO, "file error" }, { MZ_STREAM_ERROR, "stream error" }, { MZ_DATA_ERROR, "data error" }, { MZ_MEM_ERROR, "out of memory" }, { MZ_BUF_ERROR, "buf error" }, { MZ_VERSION_ERROR, "version error" }, { MZ_PARAM_ERROR, "parameter error" }
        };
    mz_uint i;
    for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i)
        if (s_error_descs[i].m_err == err)
            return s_error_descs[i].m_pDesc;
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpq $0xa, %rax
jae 0x7bdb
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x3d76d(%rip), %rax     # 0x45310
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x7bce
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x3d753(%rip), %rax     # 0x45310
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x7be3
jmp 0x7bd0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x7b8e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: tdefl_compress_mem_to_output
mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
{
    tdefl_compressor *pComp;
    mz_bool succeeded;
    if (((buf_len) && (!pBuf)) || (!pPut_buf_func))
        return MZ_FALSE;
    pComp = (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor));
    if (!pComp)
        return MZ_FALSE;
    succeeded = (tdefl_init(pComp, pPut_buf_func, pPut_buf_user, flags) == TDEFL_STATUS_OKAY);
    succeeded = succeeded && (tdefl_compress_buffer(pComp, pBuf, buf_len, TDEFL_FINISH) == TDEFL_STATUS_DONE);
    MZ_FREE(pComp);
    return succeeded;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xaf8a
cmpq $0x0, -0x10(%rbp)
je 0xaf91
cmpq $0x0, -0x20(%rbp)
jne 0xaf9d
movl $0x0, -0x4(%rbp)
jmp 0xb021
movl $0x4df78, %edi          # imm = 0x4DF78
callq 0x3400
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xafbb
movl $0x0, -0x4(%rbp)
jmp 0xb021
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x3da0
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x3c(%rbp)
movb %al, -0x3d(%rbp)
je 0xb007
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x4, %ecx
callq 0xaed0
cmpl $0x1, %eax
sete %al
movb %al, -0x3d(%rbp)
movb -0x3d(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
callq 0x3390
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: tdefl_compress_mem_to_heap
void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
{
    tdefl_output_buffer out_buf;
    MZ_CLEAR_OBJ(out_buf);
    if (!pOut_len)
        return MZ_FALSE;
    else
        *pOut_len = 0;
    out_buf.m_expandable = MZ_TRUE;
    if (!tdefl_compress_mem_to_output(pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags))
        return NULL;
    *pOut_len = out_buf.m_size;
    return out_buf.m_pBuf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x3190
cmpq $0x0, -0x20(%rbp)
jne 0xb068
movq $0x0, -0x8(%rbp)
jmp 0xb0b8
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movl $0x1, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %r8d
leaq 0x43(%rip), %rdx        # 0xb0d0
leaq -0x48(%rbp), %rcx
callq 0xaf60
cmpl $0x0, %eax
jne 0xb0a5
movq $0x0, -0x8(%rbp)
jmp 0xb0b8
movq -0x48(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: tdefl_output_buffer_putter(void const*, int, void*)
static mz_bool tdefl_output_buffer_putter(const void *pBuf, int len, void *pUser)
{
    tdefl_output_buffer *p = (tdefl_output_buffer *)pUser;
    size_t new_size = p->m_size + len;
    if (new_size > p->m_capacity)
    {
        size_t new_capacity = p->m_capacity;
        mz_uint8 *pNew_buf;
        if (!p->m_expandable)
            return MZ_FALSE;
        do
        {
            new_capacity = MZ_MAX(128U, new_capacity << 1U);
        } while (new_size > new_capacity);
        pNew_buf = (mz_uint8 *)MZ_REALLOC(p->m_pBuf, new_capacity);
        if (!pNew_buf)
            return MZ_FALSE;
        p->m_pBuf = pNew_buf;
        p->m_capacity = new_capacity;
    }
    memcpy((mz_uint8 *)p->m_pBuf + p->m_size, pBuf, len);
    p->m_size = new_size;
    return MZ_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0xb1a9
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0xb131
movl $0x0, -0x4(%rbp)
jmp 0xb1d7
jmp 0xb133
movq -0x38(%rbp), %rcx
shlq %rcx
movl $0x80, %eax
cmpq %rcx, %rax
jbe 0xb14f
movl $0x80, %eax
movq %rax, -0x48(%rbp)
jmp 0xb15a
movq -0x38(%rbp), %rax
shlq %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
ja 0xb133
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x3500
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xb191
movl $0x0, -0x4(%rbp)
jmp 0xb1d7
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rax
addq (%rax), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x3280
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: tdefl_compress_mem_to_mem
size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags)
{
    tdefl_output_buffer out_buf;
    MZ_CLEAR_OBJ(out_buf);
    if (!pOut_buf)
        return 0;
    out_buf.m_pBuf = (mz_uint8 *)pOut_buf;
    out_buf.m_capacity = out_buf_len;
    if (!tdefl_compress_mem_to_output(pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags))
        return 0;
    return out_buf.m_size;
}

// 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)
movl %r8d, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x3190
cmpq $0x0, -0x10(%rbp)
jne 0xb21d
movq $0x0, -0x8(%rbp)
jmp 0xb260
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %r8d
leaq -0x170(%rip), %rdx      # 0xb0d0
leaq -0x50(%rbp), %rcx
callq 0xaf60
cmpl $0x0, %eax
jne 0xb258
movq $0x0, -0x8(%rbp)
jmp 0xb260
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: tinfl_decompress_mem_to_mem
size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags)
{
    tinfl_decompressor decomp;
    tinfl_status status;
    tinfl_init(&decomp);
    status = tinfl_decompress(&decomp, (const mz_uint8 *)pSrc_buf, &src_buf_len, (mz_uint8 *)pOut_buf, (mz_uint8 *)pOut_buf, &out_buf_len, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF);
    return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED : out_buf_len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b40, %rsp           # imm = 0x2B40
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl $0x0, -0x2b20(%rbp)
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rcx
movq -0x8(%rbp), %r8
movl -0x24(%rbp), %eax
andl $-0x3, %eax
orl $0x4, %eax
leaq -0x2b20(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq -0x10(%rbp), %r9
movl %eax, (%rsp)
callq 0x5060
movl %eax, -0x2b24(%rbp)
cmpl $0x0, -0x2b24(%rbp)
je 0xb984
movq $-0x1, %rax
movq %rax, -0x2b30(%rbp)
jmp 0xb98f
movq -0x10(%rbp), %rax
movq %rax, -0x2b30(%rbp)
movq -0x2b30(%rbp), %rax
addq $0x2b40, %rsp           # imm = 0x2B40
popq %rbp
retq
nop
// File: jimmiebergmann[P]fbx-file/miniz.c
// 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;
    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 $0x2b60, %rsp           # imm = 0x2B60
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 0x3400
movq %rax, -0x2b30(%rbp)
movq $0x0, -0x2b38(%rbp)
movq $0x0, -0x2b40(%rbp)
cmpq $0x0, -0x2b30(%rbp)
jne 0xba03
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xbb26
jmp 0xba05
movl $0x0, -0x2b28(%rbp)
jmp 0xba11
movq -0x18(%rbp), %rax
movq (%rax), %rax
subq -0x2b38(%rbp), %rax
movq %rax, -0x2b48(%rbp)
movl $0x8000, %eax           # imm = 0x8000
subq -0x2b40(%rbp), %rax
movq %rax, -0x2b50(%rbp)
movq -0x10(%rbp), %rsi
addq -0x2b38(%rbp), %rsi
movq -0x2b30(%rbp), %rcx
movq -0x2b30(%rbp), %r8
addq -0x2b40(%rbp), %r8
movl -0x2c(%rbp), %eax
andl $-0x7, %eax
leaq -0x2b28(%rbp), %rdi
leaq -0x2b48(%rbp), %rdx
leaq -0x2b50(%rbp), %r9
movl %eax, (%rsp)
callq 0x5060
movl %eax, -0x2b54(%rbp)
movq -0x2b48(%rbp), %rax
addq -0x2b38(%rbp), %rax
movq %rax, -0x2b38(%rbp)
cmpq $0x0, -0x2b50(%rbp)
je 0xbac9
movq -0x20(%rbp), %rax
movq -0x2b30(%rbp), %rdi
addq -0x2b40(%rbp), %rdi
movq -0x2b50(%rbp), %rcx
movl %ecx, %esi
movq -0x28(%rbp), %rdx
callq *%rax
cmpl $0x0, %eax
jne 0xbac9
jmp 0xbb06
cmpl $0x2, -0x2b54(%rbp)
je 0xbae6
cmpl $0x0, -0x2b54(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x30(%rbp)
jmp 0xbb06
movq -0x2b40(%rbp), %rax
addq -0x2b50(%rbp), %rax
andq $0x7fff, %rax           # imm = 0x7FFF
movq %rax, -0x2b40(%rbp)
jmp 0xba11
movq -0x2b30(%rbp), %rdi
callq 0x3390
movq -0x2b38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x2b60, %rsp           # imm = 0x2B60
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: tinfl_decompressor_alloc
tinfl_decompressor *tinfl_decompressor_alloc()
{
    tinfl_decompressor *pDecomp = (tinfl_decompressor *)MZ_MALLOC(sizeof(tinfl_decompressor));
    if (pDecomp)
        tinfl_init(pDecomp);
    return pDecomp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x2af8, %edi           # imm = 0x2AF8
callq 0x3400
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xbb6b
jmp 0xbb5f
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
jmp 0xbb6b
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_init
mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, mz_uint flags)
{
    if ((!pZip) || (!pZip->m_pRead))
        return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);

    if (!mz_zip_reader_init_internal(pZip, flags))
        return MZ_FALSE;

    pZip->m_zip_type = MZ_ZIP_TYPE_USER;
    pZip->m_archive_size = size;

    if (!mz_zip_reader_read_central_dir(pZip, flags))
    {
        mz_zip_reader_end_internal(pZip, MZ_FALSE);
        return MZ_FALSE;
    }

    return MZ_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xbde5
movq -0x18(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0xbe0e
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x18, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xbe05
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x10(%rbp)
jmp 0xbe6a
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0xbe80
cmpl $0x0, %eax
jne 0xbe28
movl $0x0, -0x10(%rbp)
jmp 0xbe6a
movq -0x18(%rbp), %rax
movl $0x1, 0x18(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0xc040
cmpl $0x0, %eax
jne 0xbe63
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xbbf0
movl $0x0, -0x10(%rbp)
jmp 0xbe6a
movl $0x1, -0x10(%rbp)
movl -0x10(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_init_mem
mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint flags)
{
    if (!pMem)
        return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);

    if (size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
        return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);

    if (!mz_zip_reader_init_internal(pZip, flags))
        return MZ_FALSE;

    pZip->m_zip_type = MZ_ZIP_TYPE_MEMORY;
    pZip->m_archive_size = size;
    pZip->m_pRead = mz_zip_mem_read_func;
    pZip->m_pIO_opaque = pZip;
    pZip->m_pNeeds_keepalive = NULL;

#ifdef __cplusplus
    pZip->m_pState->m_pMem = const_cast<void *>(pMem);
#else
    pZip->m_pState->m_pMem = (void *)pMem;
#endif

    pZip->m_pState->m_mem_size = size;

    if (!mz_zip_reader_read_central_dir(pZip, flags))
    {
        mz_zip_reader_end_internal(pZip, MZ_FALSE);
        return MZ_FALSE;
    }

    return MZ_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movl %ecx, -0x3c(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0xd10a
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x18, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xd0fe
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x20(%rbp)
jmp 0xd1e9
cmpq $0x16, -0x38(%rbp)
jae 0xd13d
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x8, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xd131
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x20(%rbp)
jmp 0xd1e9
movq -0x28(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0xbe80
cmpl $0x0, %eax
jne 0xd15a
movl $0x0, -0x20(%rbp)
jmp 0xd1e9
movq -0x28(%rbp), %rax
movl $0x2, 0x18(%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
leaq 0x85(%rip), %rcx        # 0xd200
movq %rcx, 0x48(%rax)
movq -0x28(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq 0x68(%rax), %rax
movq %rcx, 0x80(%rax)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq 0x68(%rax), %rax
movq %rcx, 0x88(%rax)
movq -0x28(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0xc040
cmpl $0x0, %eax
jne 0xd1e2
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0xbbf0
movl $0x0, -0x20(%rbp)
jmp 0xd1e9
movl $0x1, -0x20(%rbp)
movl -0x20(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_mem_read_func(void*, unsigned long, void*, unsigned long)
static size_t mz_zip_mem_read_func(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n)
{
    mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
    size_t s = (file_ofs >= pZip->m_archive_size) ? 0 : (size_t)MZ_MIN(pZip->m_archive_size - file_ofs, n);
    memcpy(pBuf, (const mz_uint8 *)pZip->m_pState->m_pMem + file_ofs, s);
    return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jb 0xd235
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0xd267
movq -0x28(%rbp), %rax
movq (%rax), %rax
subq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xd257
movq -0x28(%rbp), %rax
movq (%rax), %rax
subq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xd25f
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x68(%rax), %rax
movq 0x80(%rax), %rsi
addq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x3280
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_file_read_func(void*, unsigned long, void*, unsigned long)
static size_t mz_zip_file_read_func(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n)
{
    mz_zip_archive *pZip = (mz_zip_archive *)pOpaque;
    mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile);

    file_ofs += pZip->m_pState->m_file_archive_start_ofs;

    if (((mz_int64)file_ofs < 0) || (((cur_ofs != (mz_int64)file_ofs)) && (MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET))))
        return 0;

    return MZ_FREAD(pBuf, 1, n, pZip->m_pState->m_pFile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rax
movq 0x70(%rax), %rdi
callq 0x3480
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rax
movq 0x78(%rax), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jl 0xd556
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0xd560
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rax
movq 0x70(%rax), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x3510
cmpl $0x0, %eax
je 0xd560
movq $0x0, -0x8(%rbp)
jmp 0xd582
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rax
movq 0x70(%rax), %rcx
movl $0x1, %esi
callq 0x3460
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_init_cfile
mz_bool mz_zip_reader_init_cfile(mz_zip_archive *pZip, MZ_FILE *pFile, mz_uint64 archive_size, mz_uint flags)
{
    mz_uint64 cur_file_ofs;

    if ((!pZip) || (!pFile))
        return mz_zip_set_error(pZip, MZ_ZIP_FILE_OPEN_FAILED);

    cur_file_ofs = MZ_FTELL64(pFile);

    if (!archive_size)
    {
        if (MZ_FSEEK64(pFile, 0, SEEK_END))
            return mz_zip_set_error(pZip, MZ_ZIP_FILE_SEEK_FAILED);

        archive_size = MZ_FTELL64(pFile) - cur_file_ofs;

        if (archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
            return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);
    }

    if (!mz_zip_reader_init_internal(pZip, flags))
        return MZ_FALSE;

    pZip->m_zip_type = MZ_ZIP_TYPE_CFILE;
    pZip->m_pRead = mz_zip_file_read_func;

    pZip->m_pIO_opaque = pZip;
    pZip->m_pState->m_pFile = pFile;
    pZip->m_archive_size = archive_size;
    pZip->m_pState->m_file_archive_start_ofs = cur_file_ofs;

    if (!mz_zip_reader_read_central_dir(pZip, flags))
    {
        mz_zip_reader_end_internal(pZip, MZ_FALSE);
        return MZ_FALSE;
    }

    return MZ_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdx, -0x48(%rbp)
movl %ecx, -0x4c(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xd5b5
cmpq $0x0, -0x40(%rbp)
jne 0xd5e1
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x11, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xd5d5
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x30(%rbp)
jmp 0xd719
movq -0x40(%rbp), %rdi
callq 0x3480
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0xd682
movq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x3510
cmpl $0x0, %eax
je 0xd63c
movq -0x38(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x16, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xd630
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x30(%rbp)
jmp 0xd719
movq -0x40(%rbp), %rdi
callq 0x3480
subq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x16, -0x48(%rbp)
jae 0xd680
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x8, -0x2c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xd674
movl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x30(%rbp)
jmp 0xd719
jmp 0xd682
movq -0x38(%rbp), %rdi
movl -0x4c(%rbp), %esi
callq 0xbe80
cmpl $0x0, %eax
jne 0xd69c
movl $0x0, -0x30(%rbp)
jmp 0xd719
movq -0x38(%rbp), %rax
movl $0x5, 0x18(%rax)
movq -0x38(%rbp), %rax
leaq -0x1d2(%rip), %rcx      # 0xd4e0
movq %rcx, 0x48(%rax)
movq -0x38(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq 0x68(%rax), %rax
movq %rcx, 0x70(%rax)
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rcx
movq -0x38(%rbp), %rax
movq 0x68(%rax), %rax
movq %rcx, 0x78(%rax)
movq -0x38(%rbp), %rdi
movl -0x4c(%rbp), %esi
callq 0xc040
cmpl $0x0, %eax
jne 0xd712
movq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0xbbf0
movl $0x0, -0x30(%rbp)
jmp 0xd719
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_is_file_encrypted
mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint file_index)
{
    mz_uint m_bit_flag;
    const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index);
    if (!p)
    {
        mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
        return MZ_FALSE;
    }

    m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS);
    return (m_bit_flag & (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED | MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION)) != 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x30(%rbp)
movl %esi, -0x34(%rbp)
movq -0x30(%rbp), %rcx
movl -0x34(%rbp), %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xd767
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0xd767
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jb 0xd771
movq $0x0, -0x8(%rbp)
jmp 0xd795
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x68(%rcx), %rcx
movq 0x20(%rcx), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xd7cd
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x18, -0x24(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xd7c4
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x28(%rbp)
jmp 0xd7ec
movq -0x40(%rbp), %rax
movzwl 0x8(%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
andl $0x41, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_is_file_supported
mz_bool mz_zip_reader_is_file_supported(mz_zip_archive *pZip, mz_uint file_index)
{
    mz_uint bit_flag;
    mz_uint method;

    const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index);
    if (!p)
    {
        mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
        return MZ_FALSE;
    }

    method = MZ_READ_LE16(p + MZ_ZIP_CDH_METHOD_OFS);
    bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS);

    if ((method != 0) && (method != MZ_DEFLATED))
    {
        mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_METHOD);
        return MZ_FALSE;
    }

    if (bit_flag & (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_IS_ENCRYPTED | MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_USES_STRONG_ENCRYPTION))
    {
        mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION);
        return MZ_FALSE;
    }

    if (bit_flag & MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_COMPRESSED_PATCH_FLAG)
    {
        mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_FEATURE);
        return MZ_FALSE;
    }

    return MZ_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x60(%rbp)
movl %esi, -0x64(%rbp)
movq -0x60(%rbp), %rcx
movl -0x64(%rbp), %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xd837
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0xd837
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jb 0xd841
movq $0x0, -0x8(%rbp)
jmp 0xd865
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x68(%rcx), %rcx
movq 0x20(%rcx), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
jne 0xd8a0
movq -0x60(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x18, -0x24(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xd894
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x58(%rbp)
jmp 0xd95a
movq -0x78(%rbp), %rax
movzwl 0xa(%rax), %eax
movl %eax, -0x6c(%rbp)
movq -0x78(%rbp), %rax
movzwl 0x8(%rax), %eax
movl %eax, -0x68(%rbp)
cmpl $0x0, -0x6c(%rbp)
je 0xd8eb
cmpl $0x8, -0x6c(%rbp)
je 0xd8eb
movq -0x60(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x4, -0x34(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xd8e2
movl -0x34(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x58(%rbp)
jmp 0xd95a
movl -0x68(%rbp), %eax
andl $0x41, %eax
cmpl $0x0, %eax
je 0xd91f
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x5, -0x44(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0xd916
movl -0x44(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x58(%rbp)
jmp 0xd95a
movl -0x68(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xd953
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x6, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xd94a
movl -0x54(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x58(%rbp)
jmp 0xd95a
movl $0x1, -0x58(%rbp)
movl -0x58(%rbp), %eax
popq %rbp
retq
nop
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_is_file_a_directory
mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, mz_uint file_index)
{
    mz_uint filename_len, attribute_mapping_id, external_attr;
    const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index);
    if (!p)
    {
        mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
        return MZ_FALSE;
    }

    filename_len = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS);
    if (filename_len)
    {
        if (*(p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_len - 1) == '/')
            return MZ_TRUE;
    }

    /* Bugfix: This code was also checking if the internal attribute was non-zero, which wasn't correct. */
    /* Most/all zip writers (hopefully) set DOS file/directory attributes in the low 16-bits, so check for the DOS directory flag and ignore the source OS ID in the created by field. */
    /* FIXME: Remove this check? Is it necessary - we already check the filename. */
    attribute_mapping_id = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_MADE_BY_OFS) >> 8;
    (void)attribute_mapping_id;

    external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS);
    if ((external_attr & MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG) != 0)
    {
        return MZ_TRUE;
    }

    return MZ_FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x30(%rbp)
movl %esi, -0x34(%rbp)
movq -0x30(%rbp), %rcx
movl -0x34(%rbp), %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xd997
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0xd997
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jb 0xd9a1
movq $0x0, -0x8(%rbp)
jmp 0xd9c5
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x68(%rcx), %rcx
movq 0x20(%rcx), %rcx
movl -0x14(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0xd9fd
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x18, -0x24(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xd9f4
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x28(%rbp)
jmp 0xda5d
movq -0x48(%rbp), %rax
movzwl 0x1c(%rax), %eax
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
je 0xda2a
movq -0x48(%rbp), %rax
movl -0x38(%rbp), %ecx
movzbl 0x2d(%rax,%rcx), %eax
cmpl $0x2f, %eax
jne 0xda28
movl $0x1, -0x28(%rbp)
jmp 0xda5d
jmp 0xda2a
movq -0x48(%rbp), %rax
movzwl 0x4(%rax), %eax
sarl $0x8, %eax
movl %eax, -0x3c(%rbp)
movq -0x48(%rbp), %rax
movl 0x26(%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xda56
movl $0x1, -0x28(%rbp)
jmp 0xda5d
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_extract_file_to_heap
void *mz_zip_reader_extract_file_to_heap(mz_zip_archive *pZip, const char *pFilename, size_t *pSize, mz_uint flags)
{
    mz_uint32 file_index;
    if (!mz_zip_reader_locate_file_v2(pZip, pFilename, NULL, flags, &file_index))
    {
        if (pSize)
            *pSize = 0;
        return MZ_FALSE;
    }
    return mz_zip_reader_extract_to_heap(pZip, file_index, pSize, flags);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %ecx
xorl %eax, %eax
movl %eax, %edx
leaq -0x28(%rbp), %r8
callq 0xdac0
cmpl $0x0, %eax
jne 0xf180
cmpq $0x0, -0x20(%rbp)
je 0xf176
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0xf197
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %esi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
callq 0xef60
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_extract_to_file
mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, mz_uint file_index, const char *pDst_filename, mz_uint flags)
{
    mz_bool status;
    mz_zip_archive_file_stat file_stat;
    MZ_FILE *pFile;

    if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat))
        return MZ_FALSE;

    if ((file_stat.m_is_directory) || (!file_stat.m_is_supported))
        return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_FEATURE);

    pFile = MZ_FOPEN(pDst_filename, "wb");
    if (!pFile)
        return mz_zip_set_error(pZip, MZ_ZIP_FILE_OPEN_FAILED);

    status = mz_zip_reader_extract_to_callback(pZip, file_index, mz_zip_file_write_callback, pFile, flags);

    if (MZ_FCLOSE(pFile) == EOF)
    {
        if (status)
            mz_zip_set_error(pZip, MZ_ZIP_FILE_CLOSE_FAILED);

        status = MZ_FALSE;
    }

#if !defined(MINIZ_NO_TIME) && !defined(MINIZ_NO_STDIO)
    if (status)
        mz_zip_set_file_times(pDst_filename, file_stat.m_time, file_stat.m_time);
#endif

    return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4b0, %rsp            # imm = 0x4B0
movq %rdi, -0x38(%rbp)
movl %esi, -0x3c(%rbp)
movq %rdx, -0x48(%rbp)
movl %ecx, -0x4c(%rbp)
movq -0x38(%rbp), %rdi
movl -0x3c(%rbp), %esi
leaq -0x4a8(%rbp), %rdx
callq 0xeda0
cmpl $0x0, %eax
jne 0x10bdd
movl $0x0, -0x30(%rbp)
jmp 0x10cec
cmpl $0x0, -0x45c(%rbp)
jne 0x10bef
cmpl $0x0, -0x454(%rbp)
jne 0x10c1b
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x6, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x10c0f
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x30(%rbp)
jmp 0x10cec
movq -0x48(%rbp), %rdi
leaq 0x255f6(%rip), %rsi     # 0x3621c
callq 0x3370
movq %rax, -0x4b0(%rbp)
cmpq $0x0, -0x4b0(%rbp)
jne 0x10c68
movq -0x38(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x11, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x10c5c
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x30(%rbp)
jmp 0x10cec
movq -0x38(%rbp), %rdi
movl -0x3c(%rbp), %esi
movq -0x4b0(%rbp), %rcx
movl -0x4c(%rbp), %r8d
leaq 0x7f(%rip), %rdx        # 0x10d00
callq 0xf1b0
movl %eax, -0x50(%rbp)
movq -0x4b0(%rbp), %rdi
callq 0x3300
cmpl $-0x1, %eax
jne 0x10cc9
cmpl $0x0, -0x50(%rbp)
je 0x10cc2
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x15, -0x2c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x10cc0
movl -0x2c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x1c(%rax)
jmp 0x10cc2
movl $0x0, -0x50(%rbp)
cmpl $0x0, -0x50(%rbp)
je 0x10ce6
movq -0x48(%rbp), %rdi
movq -0x490(%rbp), %rsi
movq -0x490(%rbp), %rdx
callq 0x10d40
movl -0x50(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
addq $0x4b0, %rsp            # imm = 0x4B0
popq %rbp
retq
nopl (%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_set_file_times(char const*, long, long)
static mz_bool mz_zip_set_file_times(const char *pFilename, MZ_TIME_T access_time, MZ_TIME_T modified_time)
{
    struct utimbuf t;

    memset(&t, 0, sizeof(t));
    t.actime = access_time;
    t.modtime = modified_time;

    return !utime(pFilename, &t);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x3190
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x3180
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_extract_to_cfile
mz_bool mz_zip_reader_extract_to_cfile(mz_zip_archive *pZip, mz_uint file_index, MZ_FILE *pFile, mz_uint flags)
{
    mz_zip_archive_file_stat file_stat;

    if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat))
        return MZ_FALSE;

    if ((file_stat.m_is_directory) || (!file_stat.m_is_supported))
        return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_FEATURE);

    return mz_zip_reader_extract_to_callback(pZip, file_index, mz_zip_file_write_callback, pFile, flags);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x490, %rsp            # imm = 0x490
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movq %rdx, -0x28(%rbp)
movl %ecx, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
leaq -0x488(%rbp), %rdx
callq 0xeda0
cmpl $0x0, %eax
jne 0x10e3a
movl $0x0, -0x10(%rbp)
jmp 0x10e93
cmpl $0x0, -0x43c(%rbp)
jne 0x10e4c
cmpl $0x0, -0x434(%rbp)
jne 0x10e75
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x6, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x10e6c
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x10(%rbp)
jmp 0x10e93
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
leaq -0x18b(%rip), %rdx      # 0x10d00
callq 0xf1b0
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
addq $0x490, %rsp            # imm = 0x490
popq %rbp
retq
nop
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_validate_mem_archive
mz_bool mz_zip_validate_mem_archive(const void *pMem, size_t size, mz_uint flags, mz_zip_error *pErr)
{
    mz_bool success = MZ_TRUE;
    mz_zip_archive zip;
    mz_zip_error actual_err = MZ_ZIP_NO_ERROR;

    if ((!pMem) || (!size))
    {
        if (pErr)
            *pErr = MZ_ZIP_INVALID_PARAMETER;
        return MZ_FALSE;
    }

    mz_zip_zero_struct(&zip);

    if (!mz_zip_reader_init_mem(&zip, pMem, size, flags))
    {
        if (pErr)
            *pErr = zip.m_last_error;
        return MZ_FALSE;
    }

    if (!mz_zip_validate_archive(&zip, flags))
    {
        actual_err = zip.m_last_error;
        success = MZ_FALSE;
    }

    if (!mz_zip_reader_end_internal(&zip, success))
    {
        if (!actual_err)
            actual_err = zip.m_last_error;
        success = MZ_FALSE;
    }

    if (pErr)
        *pErr = actual_err;

    return success;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x1, -0x2c(%rbp)
movl $0x0, -0xa4(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x12619
cmpq $0x0, -0x18(%rbp)
jne 0x12636
cmpq $0x0, -0x28(%rbp)
je 0x1262a
movq -0x28(%rbp), %rax
movl $0x18, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x126ea
leaq -0xa0(%rbp), %rdi
callq 0xbba0
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
leaq -0xa0(%rbp), %rdi
callq 0xd0c0
cmpl $0x0, %eax
jne 0x1267a
cmpq $0x0, -0x28(%rbp)
je 0x12671
movl -0x84(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x126ea
movl -0x1c(%rbp), %esi
leaq -0xa0(%rbp), %rdi
callq 0x12380
cmpl $0x0, %eax
jne 0x126a1
movl -0x84(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %esi
leaq -0xa0(%rbp), %rdi
callq 0xbbf0
cmpl $0x0, %eax
jne 0x126d1
cmpl $0x0, -0xa4(%rbp)
jne 0x126ca
movl -0x84(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl $0x0, -0x2c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x126e4
movl -0xa4(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_validate_file_archive
mz_bool mz_zip_validate_file_archive(const char *pFilename, mz_uint flags, mz_zip_error *pErr)
{
    mz_bool success = MZ_TRUE;
    mz_zip_archive zip;
    mz_zip_error actual_err = MZ_ZIP_NO_ERROR;

    if (!pFilename)
    {
        if (pErr)
            *pErr = MZ_ZIP_INVALID_PARAMETER;
        return MZ_FALSE;
    }

    mz_zip_zero_struct(&zip);

    if (!mz_zip_reader_init_file_v2(&zip, pFilename, flags, 0, 0))
    {
        if (pErr)
            *pErr = zip.m_last_error;
        return MZ_FALSE;
    }

    if (!mz_zip_validate_archive(&zip, flags))
    {
        actual_err = zip.m_last_error;
        success = MZ_FALSE;
    }

    if (!mz_zip_reader_end_internal(&zip, success))
    {
        if (!actual_err)
            actual_err = zip.m_last_error;
        success = MZ_FALSE;
    }

    if (pErr)
        *pErr = actual_err;

    return success;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x1, -0x24(%rbp)
movl $0x0, -0x9c(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1274b
cmpq $0x0, -0x20(%rbp)
je 0x1273f
movq -0x20(%rbp), %rax
movl $0x18, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x127fa
leaq -0x98(%rbp), %rdi
callq 0xbba0
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x98(%rbp), %rdi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0xd2e0
cmpl $0x0, %eax
jne 0x12790
cmpq $0x0, -0x20(%rbp)
je 0x12787
movl -0x7c(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x127fa
movl -0x14(%rbp), %esi
leaq -0x98(%rbp), %rdi
callq 0x12380
cmpl $0x0, %eax
jne 0x127b4
movl -0x7c(%rbp), %eax
movl %eax, -0x9c(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %esi
leaq -0x98(%rbp), %rdi
callq 0xbbf0
cmpl $0x0, %eax
jne 0x127e1
cmpl $0x0, -0x9c(%rbp)
jne 0x127da
movl -0x7c(%rbp), %eax
movl %eax, -0x9c(%rbp)
movl $0x0, -0x24(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x127f4
movl -0x9c(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)