// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_writer_finalize_archive
mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip)
{
    mz_zip_internal_state *pState;
    mz_uint64 central_dir_ofs, central_dir_size;
    mz_uint8 hdr[256];

    if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING))
        return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);

    pState = pZip->m_pState;

    if (pState->m_zip64)
    {
        if ((pZip->m_total_files > MZ_UINT32_MAX) || (pState->m_central_dir.m_size >= MZ_UINT32_MAX))
            return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES);
    }
    else
    {
        if ((pZip->m_total_files > MZ_UINT16_MAX) || ((pZip->m_archive_size + pState->m_central_dir.m_size + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) > MZ_UINT32_MAX))
            return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES);
    }

    central_dir_ofs = 0;
    central_dir_size = 0;
    if (pZip->m_total_files)
    {
        /* Write central directory */
        central_dir_ofs = pZip->m_archive_size;
        central_dir_size = pState->m_central_dir.m_size;
        pZip->m_central_directory_file_ofs = central_dir_ofs;
        if (pZip->m_pWrite(pZip->m_pIO_opaque, central_dir_ofs, pState->m_central_dir.m_p, (size_t)central_dir_size) != central_dir_size)
            return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED);

        pZip->m_archive_size += central_dir_size;
    }

    if (pState->m_zip64)
    {
        /* Write zip64 end of central directory header */
        mz_uint64 rel_ofs_to_zip64_ecdr = pZip->m_archive_size;

        MZ_CLEAR_OBJ(hdr);
        MZ_WRITE_LE32(hdr + MZ_ZIP64_ECDH_SIG_OFS, MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIG);
        MZ_WRITE_LE64(hdr + MZ_ZIP64_ECDH_SIZE_OF_RECORD_OFS, MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE - sizeof(mz_uint32) - sizeof(mz_uint64));
        MZ_WRITE_LE16(hdr + MZ_ZIP64_ECDH_VERSION_MADE_BY_OFS, 0x031E); /* TODO: always Unix */
        MZ_WRITE_LE16(hdr + MZ_ZIP64_ECDH_VERSION_NEEDED_OFS, 0x002D);
        MZ_WRITE_LE64(hdr + MZ_ZIP64_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS, pZip->m_total_files);
        MZ_WRITE_LE64(hdr + MZ_ZIP64_ECDH_CDIR_TOTAL_ENTRIES_OFS, pZip->m_total_files);
        MZ_WRITE_LE64(hdr + MZ_ZIP64_ECDH_CDIR_SIZE_OFS, central_dir_size);
        MZ_WRITE_LE64(hdr + MZ_ZIP64_ECDH_CDIR_OFS_OFS, central_dir_ofs);
        if (pZip->m_pWrite(pZip->m_pIO_opaque, pZip->m_archive_size, hdr, MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE) != MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE)
            return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED);

        pZip->m_archive_size += MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE;

        /* Write zip64 end of central directory locator */
        MZ_CLEAR_OBJ(hdr);
        MZ_WRITE_LE32(hdr + MZ_ZIP64_ECDL_SIG_OFS, MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIG);
        MZ_WRITE_LE64(hdr + MZ_ZIP64_ECDL_REL_OFS_TO_ZIP64_ECDR_OFS, rel_ofs_to_zip64_ecdr);
        MZ_WRITE_LE32(hdr + MZ_ZIP64_ECDL_TOTAL_NUMBER_OF_DISKS_OFS, 1);
        if (pZip->m_pWrite(pZip->m_pIO_opaque, pZip->m_archive_size, hdr, MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE) != MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE)
            return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED);

        pZip->m_archive_size += MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE;
    }

    /* Write end of central directory record */
    MZ_CLEAR_OBJ(hdr);
    MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_SIG_OFS, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG);
    MZ_WRITE_LE16(hdr + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS, MZ_MIN(MZ_UINT16_MAX, pZip->m_total_files));
    MZ_WRITE_LE16(hdr + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS, MZ_MIN(MZ_UINT16_MAX, pZip->m_total_files));
    MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_CDIR_SIZE_OFS, MZ_MIN(MZ_UINT32_MAX, central_dir_size));
    MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_CDIR_OFS_OFS, MZ_MIN(MZ_UINT32_MAX, central_dir_ofs));

    if (pZip->m_pWrite(pZip->m_pIO_opaque, pZip->m_archive_size, hdr, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) != MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE)
        return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED);

#ifndef MINIZ_NO_STDIO
    if ((pState->m_pFile) && (MZ_FFLUSH(pState->m_pFile) == EOF))
        return mz_zip_set_error(pZip, MZ_ZIP_FILE_CLOSE_FAILED);
#endif /* #ifndef MINIZ_NO_STDIO */

    pZip->m_archive_size += MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE;

    pZip->m_zip_mode = MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED;
    return MZ_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3b0, %rsp            # imm = 0x3B0
movq %rdi, -0x248(%rbp)
cmpq $0x0, -0x248(%rbp)
je 0x1b607
movq -0x248(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x1b607
movq -0x248(%rbp), %rax
cmpl $0x2, 0x14(%rax)
je 0x1b648
movq -0x248(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movl $0x18, -0x1cc(%rbp)
cmpq $0x0, -0x1c8(%rbp)
je 0x1b639
movl -0x1cc(%rbp), %ecx
movq -0x1c8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x240(%rbp)
jmp 0x1c450
movq -0x248(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x250(%rbp)
movq -0x250(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x1b6c9
movq -0x248(%rbp), %rax
cmpl $-0x1, 0x10(%rax)
ja 0x1b686
movq -0x250(%rbp), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, 0x8(%rax)
jb 0x1b6c7
movq -0x248(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movl $0x2, -0x1dc(%rbp)
cmpq $0x0, -0x1d8(%rbp)
je 0x1b6b8
movl -0x1dc(%rbp), %ecx
movq -0x1d8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x240(%rbp)
jmp 0x1c450
jmp 0x1b73f
movq -0x248(%rbp), %rax
cmpl $0xffff, 0x10(%rax)     # imm = 0xFFFF
ja 0x1b6fc
movq -0x248(%rbp), %rax
movq (%rax), %rax
movq -0x250(%rbp), %rcx
addq 0x8(%rcx), %rax
addq $0x16, %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jbe 0x1b73d
movq -0x248(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movl $0x2, -0x1ec(%rbp)
cmpq $0x0, -0x1e8(%rbp)
je 0x1b72e
movl -0x1ec(%rbp), %ecx
movq -0x1e8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x240(%rbp)
jmp 0x1c450
jmp 0x1b73f
movq $0x0, -0x258(%rbp)
movq $0x0, -0x260(%rbp)
movq -0x248(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x1b829
movq -0x248(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x258(%rbp)
movq -0x250(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x260(%rbp)
movq -0x258(%rbp), %rcx
movq -0x248(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x248(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x248(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x258(%rbp), %rsi
movq -0x250(%rbp), %rcx
movq (%rcx), %rdx
movq -0x260(%rbp), %rcx
callq *%rax
cmpq -0x260(%rbp), %rax
je 0x1b815
movq -0x248(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movl $0x13, -0x1fc(%rbp)
cmpq $0x0, -0x1f8(%rbp)
je 0x1b806
movl -0x1fc(%rbp), %ecx
movq -0x1f8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x240(%rbp)
jmp 0x1c450
movq -0x260(%rbp), %rcx
movq -0x248(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x250(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x1c0a6
movq -0x248(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x368(%rbp)
leaq -0x360(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3190
leaq -0x360(%rbp), %rax
movq %rax, -0x168(%rbp)
movl $0x6064b50, -0x16c(%rbp) # imm = 0x6064B50
movl -0x16c(%rbp), %eax
movb %al, %cl
movq -0x168(%rbp), %rax
movb %cl, (%rax)
movl -0x16c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x168(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x16c(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x168(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x16c(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x168(%rbp), %rax
movb %cl, 0x3(%rax)
leaq -0x360(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x68(%rbp)
movq $0x2c, -0x70(%rbp)
movq -0x68(%rbp), %rcx
movq -0x70(%rbp), %rax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, (%rax)
movl -0x4c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x4c(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x4c(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x48(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x68(%rbp), %rcx
addq $0x4, %rcx
movq -0x70(%rbp), %rax
shrq $0x20, %rax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movb %al, %cl
movq -0x58(%rbp), %rax
movb %cl, (%rax)
movl -0x5c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x58(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x5c(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x58(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x5c(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x58(%rbp), %rax
movb %cl, 0x3(%rax)
leaq -0x360(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x8(%rbp)
movw $0x31e, -0xa(%rbp)      # imm = 0x31E
movw -0xa(%rbp), %ax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movzwl -0xa(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
leaq -0x360(%rbp), %rax
addq $0xe, %rax
movq %rax, -0x18(%rbp)
movw $0x2d, -0x1a(%rbp)
movw -0x1a(%rbp), %ax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movzwl -0x1a(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x1(%rax)
leaq -0x360(%rbp), %rcx
addq $0x18, %rcx
movq -0x248(%rbp), %rax
movl 0x10(%rax), %eax
movq %rcx, -0x98(%rbp)
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rcx
movq -0xa0(%rbp), %rax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movl -0x7c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x7c(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x7c(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x98(%rbp), %rcx
addq $0x4, %rcx
movq -0xa0(%rbp), %rax
shrq $0x20, %rax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
movb %al, %cl
movq -0x88(%rbp), %rax
movb %cl, (%rax)
movl -0x8c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x88(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x8c(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x88(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x8c(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x88(%rbp), %rax
movb %cl, 0x3(%rax)
leaq -0x360(%rbp), %rcx
addq $0x20, %rcx
movq -0x248(%rbp), %rax
movl 0x10(%rax), %eax
movq %rcx, -0xc8(%rbp)
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rcx
movq -0xd0(%rbp), %rax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
movb %al, %cl
movq -0xa8(%rbp), %rax
movb %cl, (%rax)
movl -0xac(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0xa8(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0xac(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0xa8(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0xac(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0xa8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0xc8(%rbp), %rcx
addq $0x4, %rcx
movq -0xd0(%rbp), %rax
shrq $0x20, %rax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
movb %al, %cl
movq -0xb8(%rbp), %rax
movb %cl, (%rax)
movl -0xbc(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0xb8(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0xbc(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0xb8(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0xbc(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0xb8(%rbp), %rax
movb %cl, 0x3(%rax)
leaq -0x360(%rbp), %rcx
addq $0x28, %rcx
movq -0x260(%rbp), %rax
movq %rcx, -0xf8(%rbp)
movq %rax, -0x100(%rbp)
movq -0xf8(%rbp), %rcx
movq -0x100(%rbp), %rax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
movb %al, %cl
movq -0xd8(%rbp), %rax
movb %cl, (%rax)
movl -0xdc(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0xd8(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0xdc(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0xd8(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0xdc(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0xd8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0xf8(%rbp), %rcx
addq $0x4, %rcx
movq -0x100(%rbp), %rax
shrq $0x20, %rax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
movl -0xec(%rbp), %eax
movb %al, %cl
movq -0xe8(%rbp), %rax
movb %cl, (%rax)
movl -0xec(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0xe8(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0xec(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0xe8(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0xec(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0xe8(%rbp), %rax
movb %cl, 0x3(%rax)
leaq -0x360(%rbp), %rcx
addq $0x30, %rcx
movq -0x258(%rbp), %rax
movq %rcx, -0x128(%rbp)
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rcx
movq -0x130(%rbp), %rax
movq %rcx, -0x108(%rbp)
movl %eax, -0x10c(%rbp)
movl -0x10c(%rbp), %eax
movb %al, %cl
movq -0x108(%rbp), %rax
movb %cl, (%rax)
movl -0x10c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x108(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x10c(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x108(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x10c(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x108(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x128(%rbp), %rcx
addq $0x4, %rcx
movq -0x130(%rbp), %rax
shrq $0x20, %rax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
movl -0x11c(%rbp), %eax
movb %al, %cl
movq -0x118(%rbp), %rax
movb %cl, (%rax)
movl -0x11c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x118(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x11c(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x118(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x11c(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x118(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x248(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x248(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x248(%rbp), %rcx
movq (%rcx), %rsi
leaq -0x360(%rbp), %rdx
movl $0x38, %ecx
callq *%rax
cmpq $0x38, %rax
je 0x1be2a
movq -0x248(%rbp), %rax
movq %rax, -0x208(%rbp)
movl $0x13, -0x20c(%rbp)
cmpq $0x0, -0x208(%rbp)
je 0x1be1b
movl -0x20c(%rbp), %ecx
movq -0x208(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x240(%rbp)
jmp 0x1c450
movq -0x248(%rbp), %rax
movq (%rax), %rcx
addq $0x38, %rcx
movq %rcx, (%rax)
leaq -0x360(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3190
leaq -0x360(%rbp), %rax
movq %rax, -0x178(%rbp)
movl $0x7064b50, -0x17c(%rbp) # imm = 0x7064B50
movl -0x17c(%rbp), %eax
movb %al, %cl
movq -0x178(%rbp), %rax
movb %cl, (%rax)
movl -0x17c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x178(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x17c(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x178(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x17c(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x178(%rbp), %rax
movb %cl, 0x3(%rax)
leaq -0x360(%rbp), %rcx
addq $0x8, %rcx
movq -0x368(%rbp), %rax
movq %rcx, -0x158(%rbp)
movq %rax, -0x160(%rbp)
movq -0x158(%rbp), %rcx
movq -0x160(%rbp), %rax
movq %rcx, -0x138(%rbp)
movl %eax, -0x13c(%rbp)
movl -0x13c(%rbp), %eax
movb %al, %cl
movq -0x138(%rbp), %rax
movb %cl, (%rax)
movl -0x13c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x138(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x13c(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x138(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x13c(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x138(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x158(%rbp), %rcx
addq $0x4, %rcx
movq -0x160(%rbp), %rax
shrq $0x20, %rax
movq %rcx, -0x148(%rbp)
movl %eax, -0x14c(%rbp)
movl -0x14c(%rbp), %eax
movb %al, %cl
movq -0x148(%rbp), %rax
movb %cl, (%rax)
movl -0x14c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x148(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x14c(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x148(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x14c(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x148(%rbp), %rax
movb %cl, 0x3(%rax)
leaq -0x360(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x188(%rbp)
movl $0x1, -0x18c(%rbp)
movl -0x18c(%rbp), %eax
movb %al, %cl
movq -0x188(%rbp), %rax
movb %cl, (%rax)
movl -0x18c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x188(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x18c(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x188(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x18c(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x188(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x248(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x248(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x248(%rbp), %rcx
movq (%rcx), %rsi
leaq -0x360(%rbp), %rdx
movl $0x14, %ecx
callq *%rax
cmpq $0x14, %rax
je 0x1c095
movq -0x248(%rbp), %rax
movq %rax, -0x218(%rbp)
movl $0x13, -0x21c(%rbp)
cmpq $0x0, -0x218(%rbp)
je 0x1c086
movl -0x21c(%rbp), %ecx
movq -0x218(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x240(%rbp)
jmp 0x1c450
movq -0x248(%rbp), %rax
movq (%rax), %rcx
addq $0x14, %rcx
movq %rcx, (%rax)
leaq -0x360(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3190
leaq -0x360(%rbp), %rax
movq %rax, -0x198(%rbp)
movl $0x6054b50, -0x19c(%rbp) # imm = 0x6054B50
movl -0x19c(%rbp), %eax
movb %al, %cl
movq -0x198(%rbp), %rax
movb %cl, (%rax)
movl -0x19c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x198(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x19c(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x198(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x19c(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x198(%rbp), %rax
movb %cl, 0x3(%rax)
leaq -0x360(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x370(%rbp)
movq -0x248(%rbp), %rcx
movl $0xffff, %eax           # imm = 0xFFFF
cmpl 0x10(%rcx), %eax
jae 0x1c151
movl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0x374(%rbp)
jmp 0x1c161
movq -0x248(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x374(%rbp)
movq -0x370(%rbp), %rcx
movl -0x374(%rbp), %eax
movq %rcx, -0x28(%rbp)
movw %ax, -0x2a(%rbp)
movw -0x2a(%rbp), %ax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movzwl -0x2a(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, 0x1(%rax)
leaq -0x360(%rbp), %rax
addq $0xa, %rax
movq %rax, -0x380(%rbp)
movq -0x248(%rbp), %rcx
movl $0xffff, %eax           # imm = 0xFFFF
cmpl 0x10(%rcx), %eax
jae 0x1c1c2
movl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0x384(%rbp)
jmp 0x1c1d2
movq -0x248(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x384(%rbp)
movq -0x380(%rbp), %rcx
movl -0x384(%rbp), %eax
movq %rcx, -0x38(%rbp)
movw %ax, -0x3a(%rbp)
movw -0x3a(%rbp), %ax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, (%rax)
movzwl -0x3a(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, 0x1(%rax)
leaq -0x360(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x390(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq -0x260(%rbp), %rax
jae 0x1c231
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x398(%rbp)
jmp 0x1c23f
movq -0x260(%rbp), %rax
movq %rax, -0x398(%rbp)
movq -0x390(%rbp), %rcx
movq -0x398(%rbp), %rax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
movl -0x1ac(%rbp), %eax
movb %al, %cl
movq -0x1a8(%rbp), %rax
movb %cl, (%rax)
movl -0x1ac(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x1a8(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x1ac(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x1a8(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x1ac(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x1a8(%rbp), %rax
movb %cl, 0x3(%rax)
leaq -0x360(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x3a0(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq -0x258(%rbp), %rax
jae 0x1c2d8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x3a8(%rbp)
jmp 0x1c2e6
movq -0x258(%rbp), %rax
movq %rax, -0x3a8(%rbp)
movq -0x3a0(%rbp), %rcx
movq -0x3a8(%rbp), %rax
movq %rcx, -0x1b8(%rbp)
movl %eax, -0x1bc(%rbp)
movl -0x1bc(%rbp), %eax
movb %al, %cl
movq -0x1b8(%rbp), %rax
movb %cl, (%rax)
movl -0x1bc(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x1b8(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x1bc(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x1b8(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x1bc(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x1b8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x248(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x248(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x248(%rbp), %rcx
movq (%rcx), %rsi
leaq -0x360(%rbp), %rdx
movl $0x16, %ecx
callq *%rax
cmpq $0x16, %rax
je 0x1c3c6
movq -0x248(%rbp), %rax
movq %rax, -0x228(%rbp)
movl $0x13, -0x22c(%rbp)
cmpq $0x0, -0x228(%rbp)
je 0x1c3b7
movl -0x22c(%rbp), %ecx
movq -0x228(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x240(%rbp)
jmp 0x1c450
movq -0x250(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x1c427
movq -0x250(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x3380
cmpl $-0x1, %eax
jne 0x1c427
movq -0x248(%rbp), %rax
movq %rax, -0x238(%rbp)
movl $0x15, -0x23c(%rbp)
cmpq $0x0, -0x238(%rbp)
je 0x1c41b
movl -0x23c(%rbp), %ecx
movq -0x238(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x240(%rbp)
jmp 0x1c450
movq -0x248(%rbp), %rax
movq (%rax), %rcx
addq $0x16, %rcx
movq %rcx, (%rax)
movq -0x248(%rbp), %rax
movl $0x3, 0x14(%rax)
movl $0x1, -0x240(%rbp)
movl -0x240(%rbp), %eax
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbp
retq
nop