LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, -0x30(%rbp)
movups %xmm0, -0x40(%rbp)
movups %xmm0, -0x50(%rbp)
movups %xmm0, -0x60(%rbp)
movups %xmm0, -0x70(%rbp)
movups %xmm0, -0x80(%rbp)
andq $0x0, -0x20(%rbp)
movq (%rsi), %rsi
movq %rsi, %rax
orq %rcx, %rax
shrq $0x20, %rax
movl $0xffffd8f0, %r14d      # imm = 0xFFFFD8F0
jne 0x6c43
leaq -0x88(%rbp), %rax
movq %rdx, (%rax)
movl %ecx, 0x8(%rax)
movq %rdi, 0x18(%rax)
movl %esi, 0x20(%rax)
movq %rax, %rdi
callq 0x5069
movl %eax, %r14d
testl %eax, %eax
jne 0x6c43
leaq -0x88(%rbp), %rdi
pushq $0x4
popq %rsi
callq 0x5078
cmpl $0x1, %eax
jne 0x6c1f
movq -0x60(%rbp), %rax
movq %rax, (%rbx)
movq -0x50(%rbp), %rsi
xorl %r14d, %r14d
testq %rsi, %rsi
je 0x6c43
movq -0x38(%rbp), %rdi
callq *-0x40(%rbp)
jmp 0x6c43
movl %eax, %r15d
movq -0x50(%rbp), %rsi
testq %rsi, %rsi
je 0x6c32
movq -0x38(%rbp), %rdi
callq *-0x40(%rbp)
movl %r15d, %eax
xorl $-0x5, %eax
orl -0x80(%rbp), %eax
pushq $-0x3
popq %r14
cmovnel %r15d, %r14d
movl %r14d, %eax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
testq %rsi, %rsi
setne %al
testq %rdi, %rdi
sete %dl
andb %al, %dl
testq %r15, %r15
sete %al
xorl %r12d, %r12d
orb %dl, %al
jne 0x73c9
movq %rsi, %rbx
movq %rdi, %r14
movq %rcx, -0x38(%rbp)
movl %r8d, -0x2c(%rbp)
movl $0x4df78, %edi          # imm = 0x4DF78
callq 0x3330
testq %rax, %rax
je 0x73c9
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movq -0x38(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x3932
pushq $0x4
popq %rcx
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x72f1
xorl %r12d, %r12d
cmpl $0x1, %eax
sete %r12b
movq %r13, %rdi
callq 0x32d0
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rbx
subq $0x28, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, -0x20(%rbp)
movaps %xmm0, -0x30(%rbp)
testq %rdx, %rdx
je 0x7426
movl %ecx, %r8d
movq %rdx, %rbx
andq $0x0, (%rdx)
leaq -0x30(%rbp), %rcx
movl $0x1, 0x18(%rcx)
leaq 0x1f(%rip), %rdx        # 0x742f
callq 0x7345
testl %eax, %eax
je 0x7426
movq -0x30(%rbp), %rax
movq %rax, (%rbx)
movq -0x20(%rbp), %rax
jmp 0x7428
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %rcx
movq (%rdx), %rdi
movq 0x8(%rdx), %r12
movslq %esi, %r15
leaq (%rdi,%r15), %r14
cmpq %r12, %r14
jbe 0x749d
xorl %r13d, %r13d
cmpl $0x0, 0x18(%rbx)
je 0x74b6
movq %rcx, -0x30(%rbp)
movl $0x80, %eax
addq %r12, %r12
cmpq $0x81, %r12
cmovbq %rax, %r12
cmpq %r12, %r14
ja 0x7468
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x3400
testq %rax, %rax
je 0x74b6
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rdi
movq -0x30(%rbp), %rcx
jmp 0x74a1
movq 0x10(%rbx), %rax
addq %rax, %rdi
movq %rcx, %rsi
movq %r15, %rdx
callq 0x31f0
movq %r14, (%rbx)
pushq $0x1
popq %r13
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x20, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, -0x10(%rbp)
movaps %xmm0, -0x20(%rbp)
testq %rdi, %rdi
je 0x750e
leaq -0x20(%rbp), %rax
movq %rdi, 0x10(%rax)
movq %rsi, 0x8(%rax)
leaq -0xc4(%rip), %r9        # 0x742f
movq %rdx, %rdi
movq %rcx, %rsi
movq %r9, %rdx
movq %rax, %rcx
callq 0x7345
testl %eax, %eax
je 0x750e
movq -0x20(%rbp), %rax
jmp 0x7510
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jimmiebergmann[P]fbx-file/miniz.c
// Function: tinfl_decompress_mem_to_heap
void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags)
{
    tinfl_decompressor decomp;
    void *pBuf = NULL, *pNew_buf;
    size_t src_buf_ofs = 0, out_buf_capacity = 0;
    *pOut_len = 0;
    tinfl_init(&decomp);
    for (;;)
    {
        size_t src_buf_size = src_buf_len - src_buf_ofs, dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity;
        tinfl_status status = tinfl_decompress(&decomp, (const mz_uint8 *)pSrc_buf + src_buf_ofs, &src_buf_size, (mz_uint8 *)pBuf, pBuf ? (mz_uint8 *)pBuf + *pOut_len : NULL, &dst_buf_size,
                                               (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF);
        if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT))
        {
            MZ_FREE(pBuf);
            *pOut_len = 0;
            return NULL;
        }
        src_buf_ofs += src_buf_size;
        *pOut_len += dst_buf_size;
        if (status == TINFL_STATUS_DONE)
            break;
        new_out_buf_capacity = out_buf_capacity * 2;
        if (new_out_buf_capacity < 128)
            new_out_buf_capacity = 128;
        pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity);
        if (!pNew_buf)
        {
            MZ_FREE(pBuf);
            *pOut_len = 0;
            return NULL;
        }
        pBuf = pNew_buf;
        out_buf_capacity = new_out_buf_capacity;
    }
    return pBuf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b28, %rsp           # imm = 0x2B28
movq %rdx, %rbx
movq %rsi, -0x50(%rbp)
movq %rdi, -0x48(%rbp)
andq $0x0, (%rdx)
leaq -0x2b48(%rbp), %rax
andl $0x0, (%rax)
andl $-0x7, %ecx
orl $0x4, %ecx
movl %ecx, -0x2c(%rbp)
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %r14d, %r14d
xorl %r15d, %r15d
movq -0x50(%rbp), %rax
subq %r14, %rax
movq %rax, -0x40(%rbp)
movq %r15, %rax
subq %r12, %rax
movq %rax, -0x38(%rbp)
movq -0x48(%rbp), %rax
leaq (%rax,%r14), %rsi
addq %r13, %r12
testq %r13, %r13
cmoveq %r13, %r12
movl -0x2c(%rbp), %eax
movl %eax, (%rsp)
leaq -0x2b48(%rbp), %rdi
leaq -0x40(%rbp), %rdx
movq %r13, %rcx
movq %r12, %r8
leaq -0x38(%rbp), %r9
callq 0x53b1
testl %eax, %eax
js 0x78e8
cmpl $0x1, %eax
je 0x78e8
addq -0x40(%rbp), %r14
movq (%rbx), %r12
addq -0x38(%rbp), %r12
movq %r12, (%rbx)
testl %eax, %eax
je 0x78f7
addq %r15, %r15
cmpq $0x81, %r15
movl $0x80, %eax
cmovbq %rax, %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x3400
testq %rax, %rax
je 0x78e8
movq %rax, %r13
jmp 0x785b
movq %r13, %rdi
callq 0x32d0
andq $0x0, (%rbx)
xorl %r13d, %r13d
movq %r13, %rax
addq $0x2b28, %rsp           # imm = 0x2B28
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b48, %rsp           # imm = 0x2B48
movl %r8d, %ebx
movq %rcx, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdi, -0x68(%rbp)
movl $0x8000, %edi           # imm = 0x8000
callq 0x3330
movq %rax, -0x38(%rbp)
testq %rax, %rax
je 0x7a44
leaq -0x2b60(%rbp), %rax
andl $0x0, (%rax)
andl $-0x7, %ebx
xorl %r15d, %r15d
xorl %r14d, %r14d
movl %ebx, -0x2c(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
subq %r15, %rax
movq %rax, -0x50(%rbp)
movl $0x8000, %eax           # imm = 0x8000
subq %r14, %rax
movq %rax, -0x48(%rbp)
movq -0x68(%rbp), %rax
leaq (%rax,%r15), %rsi
movq -0x38(%rbp), %rcx
leaq (%rcx,%r14), %r12
movl %ebx, (%rsp)
leaq -0x2b60(%rbp), %rdi
leaq -0x50(%rbp), %rdx
movq %r12, %r8
leaq -0x48(%rbp), %r9
callq 0x53b1
movl %eax, %ebx
addq -0x50(%rbp), %r15
movq -0x48(%rbp), %r13
testq %r13, %r13
je 0x7a22
movq %r12, %rdi
movl %r13d, %esi
movq -0x60(%rbp), %rdx
callq *-0x58(%rbp)
testl %eax, %eax
je 0x7a4a
cmpl $0x2, %ebx
jne 0x7a39
addl %r14d, %r13d
andl $0x7fff, %r13d          # imm = 0x7FFF
movq %r13, %r14
movl -0x2c(%rbp), %ebx
jmp 0x79be
xorl %r12d, %r12d
testl %ebx, %ebx
sete %r12b
jmp 0x7a4d
pushq $-0x1
popq %r12
jmp 0x7a5d
xorl %r12d, %r12d
movq -0x38(%rbp), %rdi
callq 0x32d0
movq -0x40(%rbp), %rax
movq %r15, (%rax)
movl %r12d, %eax
addq $0x2b48, %rsp           # imm = 0x2B48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movl $0x2af8, %edi           # imm = 0x2AF8
callq 0x3330
testq %rax, %rax
je 0x7a88
andl $0x0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_end_internal(mz_zip_archive*, int)
static mz_bool mz_zip_reader_end_internal(mz_zip_archive *pZip, mz_bool set_last_error)
{
    mz_bool status = MZ_TRUE;

    if (!pZip)
        return MZ_FALSE;

    if ((!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING))
    {
        if (set_last_error)
            pZip->m_last_error = MZ_ZIP_INVALID_PARAMETER;

        return MZ_FALSE;
    }

    if (pZip->m_pState)
    {
        mz_zip_internal_state *pState = pZip->m_pState;
        pZip->m_pState = NULL;

        mz_zip_array_clear(pZip, &pState->m_central_dir);
        mz_zip_array_clear(pZip, &pState->m_central_dir_offsets);
        mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets);

#ifndef MINIZ_NO_STDIO
        if (pState->m_pFile)
        {
            if (pZip->m_zip_type == MZ_ZIP_TYPE_FILE)
            {
                if (MZ_FCLOSE(pState->m_pFile) == EOF)
                {
                    if (set_last_error)
                        pZip->m_last_error = MZ_ZIP_FILE_CLOSE_FAILED;
                    status = MZ_FALSE;
                }
            }
            pState->m_pFile = NULL;
        }
#endif /* #ifndef MINIZ_NO_STDIO */

        pZip->m_pFree(pZip->m_pAlloc_opaque, pState);
    }
    pZip->m_zip_mode = MZ_ZIP_MODE_INVALID;

    return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %r15d, %r15d
testq %rdi, %rdi
je 0x7bac
movl %esi, %r12d
movq %rdi, %rbx
movq 0x68(%rdi), %r14
testq %r14, %r14
je 0x7ba0
cmpq $0x0, 0x28(%rbx)
je 0x7ba0
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x7ba0
cmpl $0x1, 0x14(%rbx)
jne 0x7ba0
andq $0x0, 0x68(%rbx)
movq 0x40(%rbx), %rdi
movq (%r14), %rsi
callq *%rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
movq 0x40(%rbx), %rdi
movq 0x20(%r14), %rsi
callq *0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x20(%r14)
movq 0x40(%rbx), %rdi
movq 0x40(%r14), %rsi
callq *0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%r14)
movups %xmm0, 0x40(%r14)
movq 0x70(%r14), %rdi
pushq $0x1
popq %r15
testq %rdi, %rdi
je 0x7b90
cmpl $0x4, 0x18(%rbx)
jne 0x7b8b
callq 0x3260
cmpl $-0x1, %eax
jne 0x7b8b
xorl %r15d, %r15d
testl %r12d, %r12d
je 0x7b8b
movl $0x15, 0x1c(%rbx)
andq $0x0, 0x70(%r14)
movq 0x40(%rbx), %rdi
movq %r14, %rsi
callq *0x30(%rbx)
andl $0x0, 0x14(%rbx)
jmp 0x7bac
testl %r12d, %r12d
je 0x7bac
movl $0x18, 0x1c(%rbx)
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x7c1d
movq %rdi, %r14
cmpq $0x0, 0x48(%rdi)
je 0x7c07
movl %edx, %r15d
movq %rsi, %r12
movq %r14, %rdi
movl %edx, %esi
callq 0x7c28
testl %eax, %eax
je 0x7c1d
movl $0x1, 0x18(%r14)
movq %r12, (%r14)
movq %r14, %rdi
movl %r15d, %esi
callq 0x7d03
testl %eax, %eax
je 0x7c11
pushq $0x1
popq %rbx
jmp 0x7c1d
movl $0x18, 0x1c(%r14)
jmp 0x7c1d
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x7ac9
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_init_internal(mz_zip_archive*, unsigned int)
static mz_bool mz_zip_reader_init_internal(mz_zip_archive *pZip, mz_uint flags)
{
    (void)flags;
    if ((!pZip) || (pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID))
        return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);

    if (!pZip->m_pAlloc)
        pZip->m_pAlloc = miniz_def_alloc_func;
    if (!pZip->m_pFree)
        pZip->m_pFree = miniz_def_free_func;
    if (!pZip->m_pRealloc)
        pZip->m_pRealloc = miniz_def_realloc_func;

    pZip->m_archive_size = 0;
    pZip->m_central_directory_file_ofs = 0;
    pZip->m_total_files = 0;
    pZip->m_last_error = MZ_ZIP_NO_ERROR;

    if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state))))
        return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);

    memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state));
    MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, sizeof(mz_uint8));
    MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, sizeof(mz_uint32));
    MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, sizeof(mz_uint32));
    pZip->m_pState->m_init_flags = flags;
    pZip->m_pState->m_zip64 = MZ_FALSE;
    pZip->m_pState->m_zip64_has_extended_info_fields = MZ_FALSE;

    pZip->m_zip_mode = MZ_ZIP_MODE_READING;

    return MZ_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x7c52
movq %rdi, %r14
cmpq $0x0, 0x68(%rdi)
jne 0x7c4a
cmpl $0x0, 0x14(%r14)
je 0x7c5f
movl $0x18, 0x1c(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %r15d
movq 0x28(%r14), %rax
testq %rax, %rax
jne 0x7c76
leaq -0x4507(%rip), %rax     # 0x376b
movq %rax, 0x28(%r14)
cmpq $0x0, 0x30(%r14)
jne 0x7c88
leaq -0x4508(%rip), %rcx     # 0x377c
movq %rcx, 0x30(%r14)
cmpq $0x0, 0x38(%r14)
jne 0x7c9a
leaq -0x450d(%rip), %rcx     # 0x3789
movq %rcx, 0x38(%r14)
andl $0x0, 0x1c(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
andl $0x0, 0x10(%r14)
movq 0x40(%r14), %rdi
pushq $0x1
popq %rsi
movl $0x98, %edx
callq *%rax
movq %rax, 0x68(%r14)
testq %rax, %rax
je 0x7cf6
movl $0x98, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0x3180
movq 0x68(%r14), %rax
pushq $0x1
popq %rbx
movl %ebx, 0x18(%rax)
pushq $0x4
popq %rcx
movl %ecx, 0x38(%rax)
movl %ecx, 0x58(%rax)
movl %r15d, 0x60(%rax)
andq $0x0, 0x64(%rax)
movl %ebx, 0x14(%r14)
jmp 0x7c52
movl $0x10, 0x1c(%r14)
jmp 0x7c52
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x8611
movq %rdx, %r15
cmpq $0x15, %rdx
ja 0x8622
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x868d
movl $0x8, 0x1c(%rbx)
jmp 0x868d
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x868d
movl $0x18, 0x1c(%rbx)
jmp 0x868d
movl %ecx, %r14d
movq %rsi, %r12
movq %rbx, %rdi
movl %ecx, %esi
callq 0x7c28
testl %eax, %eax
je 0x867b
movl $0x2, 0x18(%rbx)
movq %r15, (%rbx)
leaq 0x52(%rip), %rax        # 0x8699
movq %rax, 0x48(%rbx)
movq %rbx, 0x60(%rbx)
andq $0x0, 0x58(%rbx)
movq 0x68(%rbx), %rax
movq %r12, 0x80(%rax)
movq %r15, 0x88(%rax)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x7d03
testl %eax, %eax
je 0x8680
pushq $0x1
popq %r14
jmp 0x868d
xorl %r14d, %r14d
jmp 0x868d
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7ac9
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_init_file_v2
mz_bool mz_zip_reader_init_file_v2(mz_zip_archive *pZip, const char *pFilename, mz_uint flags, mz_uint64 file_start_ofs, mz_uint64 archive_size)
{
    mz_uint64 file_size;
    MZ_FILE *pFile;

    if ((!pZip) || (!pFilename) || ((archive_size) && (archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)))
        return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);

    pFile = MZ_FOPEN(pFilename, "rb");
    if (!pFile)
        return mz_zip_set_error(pZip, MZ_ZIP_FILE_OPEN_FAILED);

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

        file_size = MZ_FTELL64(pFile);
    }

    /* TODO: Better sanity check archive_size and the # of actual remaining bytes */

    if (file_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
    {
	MZ_FCLOSE(pFile);
        return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);
    }

    if (!mz_zip_reader_init_internal(pZip, flags))
    {
        MZ_FCLOSE(pFile);
        return MZ_FALSE;
    }

    pZip->m_zip_type = MZ_ZIP_TYPE_FILE;
    pZip->m_pRead = mz_zip_file_read_func;
    pZip->m_pIO_opaque = pZip;
    pZip->m_pState->m_pFile = pFile;
    pZip->m_archive_size = file_size;
    pZip->m_pState->m_file_archive_start_ofs = file_start_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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdi, %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x8787
movq %r8, %r13
leaq -0x1(%r8), %rax
cmpq $0x15, %rax
jb 0x878c
movl %edx, %r14d
leaq 0xdaf7(%rip), %rax      # 0x16219
movq %rsi, %rdi
movq %rax, %rsi
callq 0x3290
testq %rax, %rax
je 0x87a8
testq %r13, %r13
je 0x87b1
movq %rax, %r12
movq %rbx, %rdi
movl %r14d, %esi
callq 0x7c28
testl %eax, %eax
je 0x87d9
movl $0x4, 0x18(%rbx)
leaq 0xc6(%rip), %rax        # 0x8821
movq %rax, 0x48(%rbx)
movq %rbx, 0x60(%rbx)
movq 0x68(%rbx), %rax
movq %r12, 0x70(%rax)
movq %r13, (%rbx)
movq %r15, 0x78(%rax)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x7d03
testl %eax, %eax
je 0x87e3
pushq $0x1
popq %r12
jmp 0x8796
testq %rbx, %rbx
je 0x8793
movl $0x18, 0x1c(%rbx)
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x11, 0x1c(%rbx)
jmp 0x8793
xorl %r12d, %r12d
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
movq %rax, %r13
callq 0x3410
testl %eax, %eax
je 0x87f2
movq %r13, %rdi
callq 0x3260
movl $0x16, 0x1c(%rbx)
jmp 0x8796
movq %r12, %rdi
callq 0x3260
jmp 0x8793
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7ac9
jmp 0x8796
movq %r13, %rdi
callq 0x3390
movq %r13, %rcx
movq %rax, %r13
cmpq $0x15, %rax
movq %rcx, %rax
ja 0x8737
movq %rax, %rdi
callq 0x3260
movl $0x8, 0x1c(%rbx)
jmp 0x8796
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x68(%rdi), %rax
movq 0x70(%rax), %rdi
callq 0x3390
movq 0x68(%r15), %rcx
addq 0x78(%rcx), %r12
js 0x8866
cmpq %r12, %rax
je 0x8875
movq 0x70(%rcx), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x3410
testl %eax, %eax
je 0x8871
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x68(%r15), %rcx
movq 0x70(%rcx), %rcx
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3380
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdi, %rbx
testq %rdi, %rdi
setne %al
testq %rsi, %rsi
setne %cl
testb %cl, %al
je 0x8917
movq %rdx, %r13
movq %rsi, %r15
movq %rsi, %rdi
callq 0x3390
movq %rax, -0x30(%rbp)
testq %r13, %r13
je 0x8928
movq %rbx, %rdi
movl %r14d, %esi
callq 0x7c28
testl %eax, %eax
je 0x8945
movl $0x5, 0x18(%rbx)
leaq -0xc6(%rip), %rax       # 0x8821
movq %rax, 0x48(%rbx)
movq %rbx, 0x60(%rbx)
movq 0x68(%rbx), %rax
movq %r15, 0x70(%rax)
movq %r13, (%rbx)
movq -0x30(%rbp), %rcx
movq %rcx, 0x78(%rax)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x7d03
testl %eax, %eax
je 0x894a
pushq $0x1
popq %r12
jmp 0x8979
xorl %r12d, %r12d
testq %rbx, %rbx
je 0x8979
movl $0x11, 0x1c(%rbx)
jmp 0x8979
xorl %r12d, %r12d
pushq $0x2
popq %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x3410
testl %eax, %eax
je 0x8959
movl $0x16, 0x1c(%rbx)
jmp 0x8979
xorl %r12d, %r12d
jmp 0x8979
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7ac9
jmp 0x8979
movq %r15, %rdi
callq 0x3390
movq %rax, %r13
subq -0x30(%rbp), %r13
cmpq $0x15, %r13
ja 0x88ca
movl $0x8, 0x1c(%rbx)
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
xorl %eax, %eax
testq %rdi, %rdi
je 0x89c9
pushq %rbp
movq %rsp, %rbp
movq 0x68(%rdi), %rcx
testq %rcx, %rcx
je 0x89c1
cmpl %esi, 0x10(%rdi)
jbe 0x89c1
movq (%rcx), %rdx
testq %rdx, %rdx
je 0x89c1
movq 0x20(%rcx), %rax
movl %esi, %ecx
movl (%rax,%rcx,4), %ecx
xorl %eax, %eax
testb $0x41, 0x8(%rdx,%rcx)
setne %al
jmp 0x89c8
movl $0x18, 0x1c(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
xorl %eax, %eax
testq %rdi, %rdi
je 0x8a32
pushq %rbp
movq %rsp, %rbp
movq 0x68(%rdi), %r8
movl $0x18, %ecx
testq %r8, %r8
je 0x8a2e
cmpl %esi, 0x10(%rdi)
jbe 0x8a2e
movq (%r8), %rdx
testq %rdx, %rdx
je 0x8a2e
movq 0x20(%r8), %rcx
movl %esi, %esi
movl (%rcx,%rsi,4), %ecx
movzwl 0xa(%rdx,%rcx), %esi
testw $0xfff7, %si            # imm = 0xFFF7
je 0x8a0c
movl $0x4, %ecx
jmp 0x8a2e
movzwl 0x8(%rdx,%rcx), %ecx
testb $0x41, %cl
je 0x8a1d
movl $0x5, %ecx
jmp 0x8a2e
testb $0x20, %cl
jne 0x8a29
movl $0x1, %eax
jmp 0x8a31
movl $0x6, %ecx
movl %ecx, 0x1c(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
xorl %eax, %eax
testq %rdi, %rdi
je 0x8a7f
pushq %rbp
movq %rsp, %rbp
movq 0x68(%rdi), %rdx
testq %rdx, %rdx
je 0x8a77
cmpl %esi, 0x10(%rdi)
jbe 0x8a77
movq (%rdx), %rcx
testq %rcx, %rcx
je 0x8a77
movq 0x20(%rdx), %rax
movl %esi, %edx
movl (%rax,%rdx,4), %eax
addq %rax, %rcx
movzwl 0x1c(%rcx), %eax
testq %rax, %rax
je 0x8a80
cmpb $0x2f, 0x2d(%rcx,%rax)
jne 0x8a80
movl $0x1, %eax
jmp 0x8a7e
movl $0x18, 0x1c(%rdi)
popq %rbp
retq
movl 0x26(%rcx), %eax
shrl $0x4, %eax
andl $0x1, %eax
jmp 0x8a7e
// File: /workspace/github_cpp_makefile_star2_O2/jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_extract_to_heap
void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, mz_uint file_index, size_t *pSize, mz_uint flags)
{
    mz_uint64 comp_size, uncomp_size, alloc_size;
    const mz_uint8 *p = mz_zip_get_cdh(pZip, file_index);
    void *pBuf;

    if (pSize)
        *pSize = 0;

    if (!p)
    {
        mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
        return NULL;
    }

    comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
    uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);

    alloc_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? comp_size : uncomp_size;
    if (((sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF))
    {
        mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR);
        return NULL;
    }

    if (NULL == (pBuf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)alloc_size)))
    {
        mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
        return NULL;
    }

    if (!mz_zip_reader_extract_to_mem(pZip, file_index, pBuf, (size_t)alloc_size, flags))
    {
        pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf);
        return NULL;
    }

    if (pSize)
        *pSize = (size_t)alloc_size;
    return pBuf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
testq %rdi, %rdi
je 0x93b1
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x93b1
cmpl %esi, 0x10(%rbx)
jbe 0x93b1
movq 0x20(%rdi), %rax
movl %esi, %edx
movl (%rax,%rdx,4), %eax
addq (%rdi), %rax
jmp 0x93b3
xorl %eax, %eax
testq %r14, %r14
je 0x93bc
andq $0x0, (%r14)
testq %rax, %rax
je 0x940c
movl %esi, -0x2c(%rbp)
xorl %edx, %edx
btl $0xa, %ecx
setae %dl
movl 0x14(%rax,%rdx,4), %r15d
movq 0x40(%rbx), %rdi
pushq $0x1
popq %rsi
movq %r15, %rdx
movl %ecx, %r12d
callq *0x28(%rbx)
testq %rax, %rax
je 0x941a
movq %rax, %r13
movq %rbx, %rdi
movl -0x2c(%rbp), %esi
movq %rax, %rdx
movq %r15, %rcx
movl %r12d, %r8d
callq 0x9346
testl %eax, %eax
je 0x9423
testq %r14, %r14
je 0x9430
movq %r15, (%r14)
jmp 0x9430
testq %rbx, %rbx
je 0x942d
movl $0x18, 0x1c(%rbx)
jmp 0x942d
movl $0x10, 0x1c(%rbx)
jmp 0x942d
movq 0x40(%rbx), %rdi
movq %r13, %rsi
callq *0x30(%rbx)
xorl %r13d, %r13d
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %rbx
movq %rdi, %r15
leaq -0x1c(%rbp), %r8
xorl %edx, %edx
callq 0x8aaf
testl %eax, %eax
je 0x9477
movl -0x1c(%rbp), %esi
movq %r15, %rdi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0x937c
jmp 0x9482
testq %rbx, %rbx
je 0x9480
andq $0x0, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_extract_iter_free
mz_bool mz_zip_reader_extract_iter_free(mz_zip_reader_extract_iter_state* pState)
{
    int status;

    /* Argument sanity check */
    if ((!pState) || (!pState->pZip) || (!pState->pZip->m_pState))
        return MZ_FALSE;

    /* Was decompression completed and requested? */
    if ((pState->status == TINFL_STATUS_DONE) && (!(pState->flags & MZ_ZIP_FLAG_COMPRESSED_DATA)))
    {
        /* Make sure the entire file was decompressed, and check its CRC. */
        if (pState->out_buf_ofs != pState->file_stat.m_uncomp_size)
        {
            mz_zip_set_error(pState->pZip, MZ_ZIP_UNEXPECTED_DECOMPRESSED_SIZE);
            pState->status = TINFL_STATUS_FAILED;
        }
#ifndef MINIZ_DISABLE_ZIP_READER_CRC32_CHECKS
        else if (pState->file_crc32 != pState->file_stat.m_crc32)
        {
            mz_zip_set_error(pState->pZip, MZ_ZIP_DECOMPRESSION_FAILED);
            pState->status = TINFL_STATUS_FAILED;
        }
#endif
    }

    /* Free buffers */
    if (!pState->pZip->m_pState->m_pMem)
        pState->pZip->m_pFree(pState->pZip->m_pAlloc_opaque, pState->pRead_buf);
    if (pState->pWrite_buf)
        pState->pZip->m_pFree(pState->pZip->m_pAlloc_opaque, pState->pWrite_buf);

    /* Save status */
    status = pState->status;

    /* Free context */
    pState->pZip->m_pFree(pState->pZip->m_pAlloc_opaque, pState);

    return status == TINFL_STATUS_DONE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
xorl %r14d, %r14d
testq %rdi, %rdi
je 0x9f8e
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x9f8e
movq 0x68(%rax), %rcx
testq %rcx, %rcx
je 0x9f8e
cmpl $0x0, 0xc(%rbx)
jne 0x9f48
testb $0x4, 0x9(%rbx)
jne 0x9f48
movq 0x38(%rbx), %rdx
cmpq 0x78(%rbx), %rdx
jne 0x9f3e
movl 0x10(%rbx), %edx
cmpl 0x68(%rbx), %edx
je 0x9f48
pushq $0xb
jmp 0x9f40
pushq $0xd
popq %rdx
movl %edx, 0x1c(%rax)
orl $-0x1, 0xc(%rbx)
cmpq $0x0, 0x80(%rcx)
jne 0x9f63
movq 0x40(%rax), %rdi
movq 0x4a0(%rbx), %rsi
callq *0x30(%rax)
movq (%rbx), %rax
movq 0x4a8(%rbx), %rsi
testq %rsi, %rsi
je 0x9f79
movq 0x40(%rax), %rdi
callq *0x30(%rax)
movq (%rbx), %rax
movq 0x40(%rax), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0xc(%rbx)
sete %r14b
movq %rbx, %rsi
callq *0x30(%rax)
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x478, %rsp            # imm = 0x478
movl %ecx, %r12d
movq %rdx, %r15
movl %esi, %r13d
movq %rdi, %r14
leaq -0x498(%rbp), %rdx
callq 0x92a9
xorl %ebx, %ebx
testl %eax, %eax
je 0xa07c
cmpl $0x0, -0x44c(%rbp)
jne 0xa046
cmpl $0x0, -0x444(%rbp)
je 0xa046
leaq 0xc237(%rip), %rsi      # 0x1621c
movq %r15, -0x30(%rbp)
movq %r15, %rdi
callq 0x3290
testq %rax, %rax
je 0xa055
movq %rax, %r15
leaq 0x90(%rip), %rdx        # 0xa090
movq %r14, %rdi
movl %r13d, %esi
movq %rax, %rcx
movl %r12d, %r8d
callq 0x948d
movl %eax, %r12d
movq %r15, %rdi
callq 0x3260
cmpl $-0x1, %eax
je 0xa064
testl %r12d, %r12d
je 0xa07c
movq -0x480(%rbp), %rax
leaq -0x40(%rbp), %rsi
movq %rax, (%rsi)
movq %rax, 0x8(%rsi)
movq -0x30(%rbp), %rdi
callq 0x3160
pushq $0x1
popq %rbx
jmp 0xa07c
testq %r14, %r14
je 0xa07c
movl $0x6, 0x1c(%r14)
jmp 0xa07c
testq %r14, %r14
je 0xa07c
movl $0x11, 0x1c(%r14)
jmp 0xa07c
testl %r12d, %r12d
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0xa07c
movl $0x15, 0x1c(%r14)
movl %ebx, %eax
addq $0x478, %rsp            # imm = 0x478
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x460, %rsp            # imm = 0x460
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %r12d
movq %rdi, %r15
leaq -0x478(%rbp), %rdx
callq 0x92a9
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0xa166
cmpl $0x0, -0x42c(%rbp)
jne 0xa159
cmpl $0x0, -0x424(%rbp)
je 0xa159
leaq -0xb6(%rip), %rdx       # 0xa090
movq %r15, %rdi
movl %r12d, %esi
movq %r14, %rcx
movl %ebx, %r8d
callq 0x948d
jmp 0xa166
testq %r15, %r15
je 0xa166
movl $0x6, 0x1c(%r15)
addq $0x460, %rsp            # imm = 0x460
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_validate_archive
mz_bool mz_zip_validate_archive(mz_zip_archive *pZip, mz_uint flags)
{
    mz_zip_internal_state *pState;
    uint32_t i;

    if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || (!pZip->m_pRead))
        return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);

    pState = pZip->m_pState;

    /* Basic sanity checks */
    if (!pState->m_zip64)
    {
        if (pZip->m_total_files > MZ_UINT16_MAX)
            return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE);

        if (pZip->m_archive_size > MZ_UINT32_MAX)
            return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE);
    }
    else
    {
        if (pZip->m_total_files >= MZ_UINT32_MAX)
            return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE);

        if (pState->m_central_dir.m_size >= MZ_UINT32_MAX)
            return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE);
    }

    for (i = 0; i < pZip->m_total_files; i++)
    {
        if (MZ_ZIP_FLAG_VALIDATE_LOCATE_FILE_FLAG & flags)
        {
            mz_uint32 found_index;
            mz_zip_archive_file_stat stat;

            if (!mz_zip_reader_file_stat(pZip, i, &stat))
                return MZ_FALSE;

            if (!mz_zip_reader_locate_file_v2(pZip, stat.m_filename, NULL, 0, &found_index))
                return MZ_FALSE;

            /* This check can fail if there are duplicate filenames in the archive (which we don't check for when writing - that's up to the user) */
            if (found_index != i)
                return mz_zip_set_error(pZip, MZ_ZIP_VALIDATION_FAILED);
        }

        if (!mz_zip_validate_file(pZip, i, flags))
            return MZ_FALSE;
    }

    return MZ_TRUE;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0xa9f9
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x468, %rsp            # imm = 0x468
movq %rdi, %rbx
movq 0x68(%rdi), %rcx
testq %rcx, %rcx
je 0xa9e1
cmpq $0x0, 0x28(%rbx)
je 0xa9e1
cmpq $0x0, 0x30(%rbx)
je 0xa9e1
cmpq $0x0, 0x48(%rbx)
je 0xa9e1
movl %esi, %r14d
cmpl $0x0, 0x64(%rcx)
movl 0x10(%rbx), %edx
je 0xa9fa
cmpl $-0x1, %edx
je 0xaa08
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpq %rdx, 0x8(%rcx)
jae 0xaa08
jmp 0xaa11
movl $0x18, 0x1c(%rbx)
addq $0x468, %rsp            # imm = 0x468
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x10000, %edx          # imm = 0x10000
jae 0xaa08
cmpl $0x0, 0x4(%rbx)
je 0xaa11
movl $0x1d, 0x1c(%rbx)
jmp 0xa9e8
xorl %r15d, %r15d
leaq -0x488(%rbp), %r13
leaq -0x2c(%rbp), %r12
cmpl 0x10(%rbx), %r15d
jae 0xaa7c
btl $0xc, %r14d
jae 0xaa5e
movq %rbx, %rdi
movl %r15d, %esi
movq %r13, %rdx
callq 0x92a9
testl %eax, %eax
je 0xaa8b
movq %rbx, %rdi
leaq -0x430(%rbp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r12, %r8
callq 0x8aaf
testl %eax, %eax
je 0xaa8b
cmpl -0x2c(%rbp), %r15d
jne 0xaa84
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0xa1c2
movl %eax, %ecx
incl %r15d
xorl %eax, %eax
testl %ecx, %ecx
jne 0xaa1f
jmp 0xa9e8
pushq $0x1
popq %rax
jmp 0xa9e8
movl $0x1e, 0x1c(%rbx)
xorl %eax, %eax
jmp 0xa9e8
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %rbx
movl %edx, %r14d
movq %rsi, %rdx
testq %rdi, %rdi
setne %al
testq %rsi, %rsi
setne %cl
testb %cl, %al
je 0xab39
movq %rdi, %rsi
xorps %xmm0, %xmm0
leaq -0xa0(%rbp), %rdi
movaps %xmm0, 0x60(%rdi)
movaps %xmm0, 0x50(%rdi)
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movl %r14d, %ecx
callq 0x85e0
testl %eax, %eax
je 0xab47
leaq -0xa0(%rbp), %r12
movq %r12, %rdi
movl %r14d, %esi
callq 0xa987
movl %eax, %r15d
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
movl 0x1c(%r12), %r13d
movq %r12, %rdi
movl %r14d, %esi
callq 0x7ac9
testl %eax, %eax
cmovel %eax, %r14d
testq %rbx, %rbx
je 0xab59
xorl %ecx, %ecx
testl %r15d, %r15d
cmovnel %ecx, %r13d
orl %r13d, %eax
je 0xab4f
jmp 0xab56
xorl %r14d, %r14d
testq %rbx, %rbx
je 0xab59
pushq $0x18
popq %r13
jmp 0xab56
xorl %r14d, %r14d
testq %rbx, %rbx
je 0xab59
movl -0x84(%rbp), %r13d
movl %r13d, (%rbx)
movl %r14d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq