// File: 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
subq $0x50, %rsp
movq %rdi, -0x40(%rbp)
movl %esi, -0x44(%rbp)
movl $0x1, -0x48(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xbc19
movl $0x0, -0x34(%rbp)
jmp 0xbdaf
movq -0x40(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0xbc44
movq -0x40(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xbc44
movq -0x40(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0xbc44
movq -0x40(%rbp), %rax
cmpl $0x1, 0x14(%rax)
je 0xbc61
cmpl $0x0, -0x44(%rbp)
je 0xbc55
movq -0x40(%rbp), %rax
movl $0x18, 0x1c(%rax)
movl $0x0, -0x34(%rbp)
jmp 0xbdaf
movq -0x40(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0xbd9e
movq -0x40(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x40(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rdi
movq -0x10(%rbp), %rcx
movq (%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x3190
movq -0x40(%rbp), %rcx
movq -0x50(%rbp), %rax
addq $0x20, %rax
movq %rcx, -0x18(%rbp)
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x40(%rcx), %rdi
movq -0x20(%rbp), %rcx
movq (%rcx), %rsi
callq *%rax
movq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x3190
movq -0x40(%rbp), %rcx
movq -0x50(%rbp), %rax
addq $0x40, %rax
movq %rcx, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x40(%rcx), %rdi
movq -0x30(%rbp), %rcx
movq (%rcx), %rsi
callq *%rax
movq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x3190
movq -0x50(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0xbd88
movq -0x40(%rbp), %rax
cmpl $0x4, 0x18(%rax)
jne 0xbd7c
movq -0x50(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x3300
cmpl $-0x1, %eax
jne 0xbd7a
cmpl $0x0, -0x44(%rbp)
je 0xbd73
movq -0x40(%rbp), %rax
movl $0x15, 0x1c(%rax)
movl $0x0, -0x48(%rbp)
jmp 0xbd7c
movq -0x50(%rbp), %rax
movq $0x0, 0x70(%rax)
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x40(%rbp), %rcx
movq 0x40(%rcx), %rdi
movq -0x50(%rbp), %rsi
callq *%rax
movq -0x40(%rbp), %rax
movl $0x0, 0x14(%rax)
movl -0x48(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)