// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_reader_read_central_dir(mz_zip_archive*, unsigned int)
static mz_bool mz_zip_reader_read_central_dir(mz_zip_archive *pZip, mz_uint flags)
{
    mz_uint cdir_size = 0, cdir_entries_on_this_disk = 0, num_this_disk = 0, cdir_disk_index = 0;
    mz_uint64 cdir_ofs = 0;
    mz_int64 cur_file_ofs = 0;
    const mz_uint8 *p;

    mz_uint32 buf_u32[4096 / sizeof(mz_uint32)];
    mz_uint8 *pBuf = (mz_uint8 *)buf_u32;
    mz_bool sort_central_dir = ((flags & MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY) == 0);
    mz_uint32 zip64_end_of_central_dir_locator_u32[(MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)];
    mz_uint8 *pZip64_locator = (mz_uint8 *)zip64_end_of_central_dir_locator_u32;

    mz_uint32 zip64_end_of_central_dir_header_u32[(MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / sizeof(mz_uint32)];
    mz_uint8 *pZip64_end_of_central_dir = (mz_uint8 *)zip64_end_of_central_dir_header_u32;

    mz_uint64 zip64_end_of_central_dir_ofs = 0;

    /* Basic sanity checks - reject files which are too small, and check the first 4 bytes of the file to make sure a local header is there. */
    if (pZip->m_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_locate_header_sig(pZip, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG, MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE, &cur_file_ofs))
        return mz_zip_set_error(pZip, MZ_ZIP_FAILED_FINDING_CENTRAL_DIR);

    /* Read and verify the end of central directory record. */
    if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, 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_READ_FAILED);

    if (MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_SIG_OFS) != MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG)
        return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);

    if (cur_file_ofs >= (MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE + MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE))
    {
        if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs - MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE, pZip64_locator, MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE) == MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIZE)
        {
            if (MZ_READ_LE32(pZip64_locator + MZ_ZIP64_ECDL_SIG_OFS) == MZ_ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIG)
            {
                zip64_end_of_central_dir_ofs = MZ_READ_LE64(pZip64_locator + MZ_ZIP64_ECDL_REL_OFS_TO_ZIP64_ECDR_OFS);
                if (zip64_end_of_central_dir_ofs > (pZip->m_archive_size - MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE))
                    return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE);

                if (pZip->m_pRead(pZip->m_pIO_opaque, zip64_end_of_central_dir_ofs, pZip64_end_of_central_dir, MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE) == MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE)
                {
                    if (MZ_READ_LE32(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_SIG_OFS) == MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIG)
                    {
                        pZip->m_pState->m_zip64 = MZ_TRUE;
                    }
                }
            }
        }
    }

    pZip->m_total_files = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS);
    cdir_entries_on_this_disk = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS);
    num_this_disk = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_THIS_DISK_OFS);
    cdir_disk_index = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS);
    cdir_size = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_SIZE_OFS);
    cdir_ofs = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_OFS_OFS);

    if (pZip->m_pState->m_zip64)
    {
        mz_uint32 zip64_total_num_of_disks = MZ_READ_LE32(pZip64_locator + MZ_ZIP64_ECDL_TOTAL_NUMBER_OF_DISKS_OFS);
        mz_uint64 zip64_cdir_total_entries = MZ_READ_LE64(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_TOTAL_ENTRIES_OFS);
        mz_uint64 zip64_cdir_total_entries_on_this_disk = MZ_READ_LE64(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS);
        mz_uint64 zip64_size_of_end_of_central_dir_record = MZ_READ_LE64(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_SIZE_OF_RECORD_OFS);
        mz_uint64 zip64_size_of_central_directory = MZ_READ_LE64(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_SIZE_OFS);

        if (zip64_size_of_end_of_central_dir_record < (MZ_ZIP64_END_OF_CENTRAL_DIR_HEADER_SIZE - 12))
            return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);

        if (zip64_total_num_of_disks != 1U)
            return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK);

        /* Check for miniz's practical limits */
        if (zip64_cdir_total_entries > MZ_UINT32_MAX)
            return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES);

        pZip->m_total_files = (mz_uint32)zip64_cdir_total_entries;

        if (zip64_cdir_total_entries_on_this_disk > MZ_UINT32_MAX)
            return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES);

        cdir_entries_on_this_disk = (mz_uint32)zip64_cdir_total_entries_on_this_disk;

        /* Check for miniz's current practical limits (sorry, this should be enough for millions of files) */
        if (zip64_size_of_central_directory > MZ_UINT32_MAX)
            return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_CDIR_SIZE);

        cdir_size = (mz_uint32)zip64_size_of_central_directory;

        num_this_disk = MZ_READ_LE32(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_NUM_THIS_DISK_OFS);

        cdir_disk_index = MZ_READ_LE32(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_NUM_DISK_CDIR_OFS);

        cdir_ofs = MZ_READ_LE64(pZip64_end_of_central_dir + MZ_ZIP64_ECDH_CDIR_OFS_OFS);
    }

    if (pZip->m_total_files != cdir_entries_on_this_disk)
        return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK);

    if (((num_this_disk | cdir_disk_index) != 0) && ((num_this_disk != 1) || (cdir_disk_index != 1)))
        return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK);

    if (cdir_size < pZip->m_total_files * MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)
        return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);

    if ((cdir_ofs + (mz_uint64)cdir_size) > pZip->m_archive_size)
        return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);

    pZip->m_central_directory_file_ofs = cdir_ofs;

    if (pZip->m_total_files)
    {
        mz_uint i, n;
        /* Read the entire central directory into a heap block, and allocate another heap block to hold the unsorted central dir file record offsets, and possibly another to hold the sorted indices. */
        if ((!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir, cdir_size, MZ_FALSE)) ||
            (!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir_offsets, pZip->m_total_files, MZ_FALSE)))
            return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);

        if (sort_central_dir)
        {
            if (!mz_zip_array_resize(pZip, &pZip->m_pState->m_sorted_central_dir_offsets, pZip->m_total_files, MZ_FALSE))
                return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
        }

        if (pZip->m_pRead(pZip->m_pIO_opaque, cdir_ofs, pZip->m_pState->m_central_dir.m_p, cdir_size) != cdir_size)
            return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED);

        /* Now create an index into the central directory file records, do some basic sanity checking on each record */
        p = (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p;
        for (n = cdir_size, i = 0; i < pZip->m_total_files; ++i)
        {
            mz_uint total_header_size, disk_index, bit_flags, filename_size, ext_data_size;
            mz_uint64 comp_size, decomp_size, local_header_ofs;

            if ((n < MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) || (MZ_READ_LE32(p) != MZ_ZIP_CENTRAL_DIR_HEADER_SIG))
                return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);

            MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, i) = (mz_uint32)(p - (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p);

            if (sort_central_dir)
                MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_sorted_central_dir_offsets, mz_uint32, i) = i;

            comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS);
            decomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS);
            local_header_ofs = MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS);
            filename_size = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS);
            ext_data_size = MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS);

            if ((!pZip->m_pState->m_zip64_has_extended_info_fields) &&
                (ext_data_size) &&
                (MZ_MAX(MZ_MAX(comp_size, decomp_size), local_header_ofs) == MZ_UINT32_MAX))
            {
                /* Attempt to find zip64 extended information field in the entry's extra data */
                mz_uint32 extra_size_remaining = ext_data_size;

                if (extra_size_remaining)
                {
                    const mz_uint8 *pExtra_data = p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size;

                    do
                    {
                        mz_uint32 field_id;
                        mz_uint32 field_data_size;

                        if (extra_size_remaining < (sizeof(mz_uint16) * 2))
                            return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);

                        field_id = MZ_READ_LE16(pExtra_data);
                        field_data_size = MZ_READ_LE16(pExtra_data + sizeof(mz_uint16));

                        if ((field_data_size + sizeof(mz_uint16) * 2) > extra_size_remaining)
                            return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);

                        if (field_id == MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID)
                        {
                            /* Ok, the archive didn't have any zip64 headers but it uses a zip64 extended information field so mark it as zip64 anyway (this can occur with infozip's zip util when it reads compresses files from stdin). */
                            pZip->m_pState->m_zip64 = MZ_TRUE;
                            pZip->m_pState->m_zip64_has_extended_info_fields = MZ_TRUE;
                            break;
                        }

                        pExtra_data += sizeof(mz_uint16) * 2 + field_data_size;
                        extra_size_remaining = extra_size_remaining - sizeof(mz_uint16) * 2 - field_data_size;
                    } while (extra_size_remaining);
                }
            }

            /* I've seen archives that aren't marked as zip64 that uses zip64 ext data, argh */
            if ((comp_size != MZ_UINT32_MAX) && (decomp_size != MZ_UINT32_MAX))
            {
                if (((!MZ_READ_LE32(p + MZ_ZIP_CDH_METHOD_OFS)) && (decomp_size != comp_size)) || (decomp_size && !comp_size))
                    return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
            }

            disk_index = MZ_READ_LE16(p + MZ_ZIP_CDH_DISK_START_OFS);
            if ((disk_index == MZ_UINT16_MAX) || ((disk_index != num_this_disk) && (disk_index != 1)))
                return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_MULTIDISK);

            if (comp_size != MZ_UINT32_MAX)
            {
                if (((mz_uint64)MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS) + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + comp_size) > pZip->m_archive_size)
                    return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
            }

            bit_flags = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS);
            if (bit_flags & MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_LOCAL_DIR_IS_MASKED)
                return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_ENCRYPTION);

            if ((total_header_size = MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS)) > n)
                return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);

            n -= total_header_size;
            p += total_header_size;
        }
    }

    if (sort_central_dir)
        mz_zip_reader_sort_central_dir_offsets_by_filename(pZip);

    return MZ_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1330, %rsp           # imm = 0x1330
movq %rdi, -0x200(%rbp)
movl %esi, -0x204(%rbp)
movl $0x0, -0x208(%rbp)
movl $0x0, -0x20c(%rbp)
movl $0x0, -0x210(%rbp)
movl $0x0, -0x214(%rbp)
movq $0x0, -0x220(%rbp)
movq $0x0, -0x228(%rbp)
leaq -0x1230(%rbp), %rax
movq %rax, -0x1238(%rbp)
movl -0x204(%rbp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x123c(%rbp)
leaq -0x1250(%rbp), %rax
movq %rax, -0x1258(%rbp)
leaq -0x1290(%rbp), %rax
movq %rax, -0x1298(%rbp)
movq $0x0, -0x12a0(%rbp)
movq -0x200(%rbp), %rax
cmpq $0x16, (%rax)
jae 0xc126
movq -0x200(%rbp), %rax
movq %rax, -0x70(%rbp)
movl $0x8, -0x74(%rbp)
cmpq $0x0, -0x70(%rbp)
je 0xc117
movl -0x74(%rbp), %ecx
movq -0x70(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movq -0x200(%rbp), %rdi
movl $0x6054b50, %esi        # imm = 0x6054B50
movl $0x16, %edx
leaq -0x228(%rbp), %rcx
callq 0x1f3c0
cmpl $0x0, %eax
jne 0xc180
movq -0x200(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0x7, -0x84(%rbp)
cmpq $0x0, -0x80(%rbp)
je 0xc171
movl -0x84(%rbp), %ecx
movq -0x80(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movq -0x200(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x200(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x228(%rbp), %rsi
movq -0x1238(%rbp), %rdx
movl $0x16, %ecx
callq *%rax
cmpq $0x16, %rax
je 0xc1f2
movq -0x200(%rbp), %rax
movq %rax, -0x90(%rbp)
movl $0x14, -0x94(%rbp)
cmpq $0x0, -0x90(%rbp)
je 0xc1e3
movl -0x94(%rbp), %ecx
movq -0x90(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movq -0x1238(%rbp), %rax
cmpl $0x6054b50, (%rax)      # imm = 0x6054B50
je 0xc242
movq -0x200(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl $0x8, -0xa4(%rbp)
cmpq $0x0, -0xa0(%rbp)
je 0xc233
movl -0xa4(%rbp), %ecx
movq -0xa0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
cmpq $0x4c, -0x228(%rbp)
jl 0xc373
movq -0x200(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x200(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x228(%rbp), %rsi
subq $0x14, %rsi
movq -0x1258(%rbp), %rdx
movl $0x14, %ecx
callq *%rax
cmpq $0x14, %rax
jne 0xc371
movq -0x1258(%rbp), %rax
cmpl $0x7064b50, (%rax)      # imm = 0x7064B50
jne 0xc36f
movq -0x1258(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x1258(%rbp), %rcx
movl 0xc(%rcx), %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x12a0(%rbp)
movq -0x12a0(%rbp), %rax
movq -0x200(%rbp), %rcx
movq (%rcx), %rcx
subq $0x38, %rcx
cmpq %rcx, %rax
jbe 0xc319
movq -0x200(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl $0x8, -0xb4(%rbp)
cmpq $0x0, -0xb0(%rbp)
je 0xc30a
movl -0xb4(%rbp), %ecx
movq -0xb0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movq -0x200(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x200(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x12a0(%rbp), %rsi
movq -0x1298(%rbp), %rdx
movl $0x38, %ecx
callq *%rax
cmpq $0x38, %rax
jne 0xc36d
movq -0x1298(%rbp), %rax
cmpl $0x6064b50, (%rax)      # imm = 0x6064B50
jne 0xc36b
movq -0x200(%rbp), %rax
movq 0x68(%rax), %rax
movl $0x1, 0x64(%rax)
jmp 0xc36d
jmp 0xc36f
jmp 0xc371
jmp 0xc373
movq -0x1238(%rbp), %rax
movzwl 0xa(%rax), %ecx
movq -0x200(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x1238(%rbp), %rax
movzwl 0x8(%rax), %eax
movl %eax, -0x20c(%rbp)
movq -0x1238(%rbp), %rax
movzwl 0x4(%rax), %eax
movl %eax, -0x210(%rbp)
movq -0x1238(%rbp), %rax
movzwl 0x6(%rax), %eax
movl %eax, -0x214(%rbp)
movq -0x1238(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x208(%rbp)
movq -0x1238(%rbp), %rax
movl 0x10(%rax), %eax
movq %rax, -0x220(%rbp)
movq -0x200(%rbp), %rax
movq 0x68(%rax), %rax
cmpl $0x0, 0x64(%rax)
je 0xc67a
movq -0x1258(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x12a4(%rbp)
movq -0x1298(%rbp), %rax
movl 0x20(%rax), %eax
movq -0x1298(%rbp), %rcx
movl 0x24(%rcx), %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x12b0(%rbp)
movq -0x1298(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x1298(%rbp), %rcx
movl 0x1c(%rcx), %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x12b8(%rbp)
movq -0x1298(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x1298(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x12c0(%rbp)
movq -0x1298(%rbp), %rax
movl 0x28(%rax), %eax
movq -0x1298(%rbp), %rcx
movl 0x2c(%rcx), %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x12c8(%rbp)
cmpq $0x2c, -0x12c0(%rbp)
jae 0xc4d4
movq -0x200(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl $0x9, -0xc4(%rbp)
cmpq $0x0, -0xc0(%rbp)
je 0xc4c5
movl -0xc4(%rbp), %ecx
movq -0xc0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
cmpl $0x1, -0x12a4(%rbp)
je 0xc51e
movq -0x200(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl $0xa, -0xd4(%rbp)
cmpq $0x0, -0xd0(%rbp)
je 0xc50f
movl -0xd4(%rbp), %ecx
movq -0xd0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x12b0(%rbp)
jbe 0xc56d
movq -0x200(%rbp), %rax
movq %rax, -0xe0(%rbp)
movl $0x2, -0xe4(%rbp)
cmpq $0x0, -0xe0(%rbp)
je 0xc55e
movl -0xe4(%rbp), %ecx
movq -0xe0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movq -0x12b0(%rbp), %rax
movl %eax, %ecx
movq -0x200(%rbp), %rax
movl %ecx, 0x10(%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x12b8(%rbp)
jbe 0xc5cf
movq -0x200(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl $0x2, -0xf4(%rbp)
cmpq $0x0, -0xf0(%rbp)
je 0xc5c0
movl -0xf4(%rbp), %ecx
movq -0xf0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movq -0x12b8(%rbp), %rax
movl %eax, -0x20c(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x12c8(%rbp)
jbe 0xc62b
movq -0x200(%rbp), %rax
movq %rax, -0x100(%rbp)
movl $0xf, -0x104(%rbp)
cmpq $0x0, -0x100(%rbp)
je 0xc61c
movl -0x104(%rbp), %ecx
movq -0x100(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movq -0x12c8(%rbp), %rax
movl %eax, -0x208(%rbp)
movq -0x1298(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x210(%rbp)
movq -0x1298(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x214(%rbp)
movq -0x1298(%rbp), %rax
movl 0x30(%rax), %eax
movq -0x1298(%rbp), %rcx
movl 0x34(%rcx), %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x220(%rbp)
movq -0x200(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0x20c(%rbp), %eax
je 0xc6cd
movq -0x200(%rbp), %rax
movq %rax, -0x110(%rbp)
movl $0xa, -0x114(%rbp)
cmpq $0x0, -0x110(%rbp)
je 0xc6be
movl -0x114(%rbp), %ecx
movq -0x110(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movl -0x210(%rbp), %eax
orl -0x214(%rbp), %eax
cmpl $0x0, %eax
je 0xc731
cmpl $0x1, -0x210(%rbp)
jne 0xc6f0
cmpl $0x1, -0x214(%rbp)
je 0xc731
movq -0x200(%rbp), %rax
movq %rax, -0x120(%rbp)
movl $0xa, -0x124(%rbp)
cmpq $0x0, -0x120(%rbp)
je 0xc722
movl -0x124(%rbp), %ecx
movq -0x120(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movl -0x208(%rbp), %eax
movq -0x200(%rbp), %rcx
imull $0x2e, 0x10(%rcx), %ecx
cmpl %ecx, %eax
jae 0xc787
movq -0x200(%rbp), %rax
movq %rax, -0x130(%rbp)
movl $0x9, -0x134(%rbp)
cmpq $0x0, -0x130(%rbp)
je 0xc778
movl -0x134(%rbp), %ecx
movq -0x130(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movq -0x220(%rbp), %rax
movl -0x208(%rbp), %ecx
addq %rcx, %rax
movq -0x200(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0xc7e4
movq -0x200(%rbp), %rax
movq %rax, -0x140(%rbp)
movl $0x9, -0x144(%rbp)
cmpq $0x0, -0x140(%rbp)
je 0xc7d5
movl -0x144(%rbp), %ecx
movq -0x140(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movq -0x220(%rbp), %rcx
movq -0x200(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x200(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0xd08f
movq -0x200(%rbp), %rdx
movq -0x200(%rbp), %rax
movq 0x68(%rax), %rcx
movl -0x208(%rbp), %eax
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0xc864
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
callq 0x20220
cmpl $0x0, %eax
jne 0xc862
movl $0x0, -0x4(%rbp)
jmp 0xc877
jmp 0xc864
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x1, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0xc8fb
movq -0x200(%rbp), %rdx
movq -0x200(%rbp), %rax
movq 0x68(%rax), %rcx
addq $0x20, %rcx
movq -0x200(%rbp), %rax
movl 0x10(%rax), %eax
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0xc8e2
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movl -0x44(%rbp), %ecx
callq 0x20220
cmpl $0x0, %eax
jne 0xc8e0
movl $0x0, -0x28(%rbp)
jmp 0xc8f5
jmp 0xc8e2
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x1, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0xc93c
movq -0x200(%rbp), %rax
movq %rax, -0x150(%rbp)
movl $0x10, -0x154(%rbp)
cmpq $0x0, -0x150(%rbp)
je 0xc92d
movl -0x154(%rbp), %ecx
movq -0x150(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
cmpl $0x0, -0x123c(%rbp)
je 0xca0a
movq -0x200(%rbp), %rdx
movq -0x200(%rbp), %rax
movq 0x68(%rax), %rcx
addq $0x40, %rcx
movq -0x200(%rbp), %rax
movl 0x10(%rax), %eax
movq %rdx, -0x50(%rbp)
movq %rcx, -0x58(%rbp)
movq %rax, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0xc9ae
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x60(%rbp), %rdx
movl -0x64(%rbp), %ecx
callq 0x20220
cmpl $0x0, %eax
jne 0xc9ac
movl $0x0, -0x48(%rbp)
jmp 0xc9c1
jmp 0xc9ae
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x1, -0x48(%rbp)
cmpl $0x0, -0x48(%rbp)
jne 0xca08
movq -0x200(%rbp), %rax
movq %rax, -0x160(%rbp)
movl $0x10, -0x164(%rbp)
cmpq $0x0, -0x160(%rbp)
je 0xc9f9
movl -0x164(%rbp), %ecx
movq -0x160(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
jmp 0xca0a
movq -0x200(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x200(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x220(%rbp), %rsi
movq -0x200(%rbp), %rcx
movq 0x68(%rcx), %rcx
movq (%rcx), %rdx
movl -0x208(%rbp), %ecx
callq *%rax
movl -0x208(%rbp), %ecx
cmpq %rcx, %rax
je 0xca89
movq -0x200(%rbp), %rax
movq %rax, -0x170(%rbp)
movl $0x14, -0x174(%rbp)
cmpq $0x0, -0x170(%rbp)
je 0xca7a
movl -0x174(%rbp), %ecx
movq -0x170(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movq -0x200(%rbp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
movq %rax, -0x230(%rbp)
movl -0x208(%rbp), %eax
movl %eax, -0x12d0(%rbp)
movl $0x0, -0x12cc(%rbp)
movl -0x12cc(%rbp), %eax
movq -0x200(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0xd08d
cmpl $0x2e, -0x12d0(%rbp)
jb 0xcae2
movq -0x230(%rbp), %rax
cmpl $0x2014b50, (%rax)      # imm = 0x2014B50
je 0xcb23
movq -0x200(%rbp), %rax
movq %rax, -0x180(%rbp)
movl $0x9, -0x184(%rbp)
cmpq $0x0, -0x180(%rbp)
je 0xcb14
movl -0x184(%rbp), %ecx
movq -0x180(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movq -0x230(%rbp), %rax
movq -0x200(%rbp), %rcx
movq 0x68(%rcx), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movl %eax, %edx
movq -0x200(%rbp), %rax
movq 0x68(%rax), %rax
movq 0x20(%rax), %rax
movl -0x12cc(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
cmpl $0x0, -0x123c(%rbp)
je 0xcb7c
movl -0x12cc(%rbp), %edx
movq -0x200(%rbp), %rax
movq 0x68(%rax), %rax
movq 0x40(%rax), %rax
movl -0x12cc(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movq -0x230(%rbp), %rax
movl 0x14(%rax), %eax
movq %rax, -0x12f0(%rbp)
movq -0x230(%rbp), %rax
movl 0x18(%rax), %eax
movq %rax, -0x12f8(%rbp)
movq -0x230(%rbp), %rax
movl 0x2a(%rax), %eax
movq %rax, -0x1300(%rbp)
movq -0x230(%rbp), %rax
movzwl 0x1c(%rax), %eax
movl %eax, -0x12e0(%rbp)
movq -0x230(%rbp), %rax
movzwl 0x1e(%rax), %eax
movl %eax, -0x12e4(%rbp)
movq -0x200(%rbp), %rax
movq 0x68(%rax), %rax
cmpl $0x0, 0x68(%rax)
jne 0xcdfb
cmpl $0x0, -0x12e4(%rbp)
je 0xcdfb
movq -0x12f0(%rbp), %rax
cmpq -0x12f8(%rbp), %rax
jbe 0xcc13
movq -0x12f0(%rbp), %rax
movq %rax, -0x1320(%rbp)
jmp 0xcc21
movq -0x12f8(%rbp), %rax
movq %rax, -0x1320(%rbp)
movq -0x1320(%rbp), %rax
cmpq -0x1300(%rbp), %rax
jbe 0xcc6f
movq -0x12f0(%rbp), %rax
cmpq -0x12f8(%rbp), %rax
jbe 0xcc51
movq -0x12f0(%rbp), %rax
movq %rax, -0x1328(%rbp)
jmp 0xcc5f
movq -0x12f8(%rbp), %rax
movq %rax, -0x1328(%rbp)
movq -0x1328(%rbp), %rax
movq %rax, -0x1330(%rbp)
jmp 0xcc7d
movq -0x1300(%rbp), %rax
movq %rax, -0x1330(%rbp)
movq -0x1330(%rbp), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0xcdfb
movl -0x12e4(%rbp), %eax
movl %eax, -0x1304(%rbp)
cmpl $0x0, -0x1304(%rbp)
je 0xcdf9
movq -0x230(%rbp), %rax
addq $0x2e, %rax
movl -0x12e0(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x1310(%rbp)
movl -0x1304(%rbp), %eax
cmpq $0x4, %rax
jae 0xcd13
movq -0x200(%rbp), %rax
movq %rax, -0x190(%rbp)
movl $0x9, -0x194(%rbp)
cmpq $0x0, -0x190(%rbp)
je 0xcd04
movl -0x194(%rbp), %ecx
movq -0x190(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movq -0x1310(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x1314(%rbp)
movq -0x1310(%rbp), %rax
movzwl 0x2(%rax), %eax
movl %eax, -0x1318(%rbp)
movl -0x1318(%rbp), %eax
addq $0x4, %rax
movl -0x1304(%rbp), %ecx
cmpq %rcx, %rax
jbe 0xcd8a
movq -0x200(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movl $0x9, -0x1a4(%rbp)
cmpq $0x0, -0x1a0(%rbp)
je 0xcd7b
movl -0x1a4(%rbp), %ecx
movq -0x1a0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
cmpl $0x1, -0x1314(%rbp)
jne 0xcdb9
movq -0x200(%rbp), %rax
movq 0x68(%rax), %rax
movl $0x1, 0x64(%rax)
movq -0x200(%rbp), %rax
movq 0x68(%rax), %rax
movl $0x1, 0x68(%rax)
jmp 0xcdf7
movl -0x1318(%rbp), %eax
addq $0x4, %rax
addq -0x1310(%rbp), %rax
movq %rax, -0x1310(%rbp)
movl -0x1304(%rbp), %eax
subq $0x4, %rax
movl -0x1318(%rbp), %ecx
subq %rcx, %rax
movl %eax, -0x1304(%rbp)
cmpl $0x0, -0x1304(%rbp)
jne 0xccc6
jmp 0xcdf9
jmp 0xcdfb
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x12f0(%rbp)
je 0xce8f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x12f8(%rbp)
je 0xce8f
movq -0x230(%rbp), %rax
cmpl $0x0, 0xa(%rax)
jne 0xce38
movq -0x12f8(%rbp), %rax
cmpq -0x12f0(%rbp), %rax
jne 0xce4c
cmpq $0x0, -0x12f8(%rbp)
je 0xce8d
cmpq $0x0, -0x12f0(%rbp)
jne 0xce8d
movq -0x200(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movl $0x9, -0x1b4(%rbp)
cmpq $0x0, -0x1b0(%rbp)
je 0xce7e
movl -0x1b4(%rbp), %ecx
movq -0x1b0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
jmp 0xce8f
movq -0x230(%rbp), %rax
movzwl 0x22(%rax), %eax
movl %eax, -0x12d8(%rbp)
cmpl $0xffff, -0x12d8(%rbp)  # imm = 0xFFFF
je 0xcec3
movl -0x12d8(%rbp), %eax
cmpl -0x210(%rbp), %eax
je 0xcf04
cmpl $0x1, -0x12d8(%rbp)
je 0xcf04
movq -0x200(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movl $0xa, -0x1c4(%rbp)
cmpq $0x0, -0x1c0(%rbp)
je 0xcef5
movl -0x1c4(%rbp), %ecx
movq -0x1c0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x12f0(%rbp)
je 0xcf76
movq -0x230(%rbp), %rax
movl 0x2a(%rax), %eax
addq $0x1e, %rax
addq -0x12f0(%rbp), %rax
movq -0x200(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0xcf74
movq -0x200(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movl $0x9, -0x1d4(%rbp)
cmpq $0x0, -0x1d0(%rbp)
je 0xcf65
movl -0x1d4(%rbp), %ecx
movq -0x1d0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
jmp 0xcf76
movq -0x230(%rbp), %rax
movzwl 0x8(%rax), %eax
movl %eax, -0x12dc(%rbp)
movl -0x12dc(%rbp), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0xcfd8
movq -0x200(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movl $0x5, -0x1e4(%rbp)
cmpq $0x0, -0x1e0(%rbp)
je 0xcfc9
movl -0x1e4(%rbp), %ecx
movq -0x1e0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movq -0x230(%rbp), %rax
movzwl 0x1c(%rax), %eax
addl $0x2e, %eax
movq -0x230(%rbp), %rcx
movzwl 0x1e(%rcx), %ecx
addl %ecx, %eax
movq -0x230(%rbp), %rcx
movzwl 0x20(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x12d4(%rbp)
cmpl -0x12d0(%rbp), %eax
jbe 0xd04c
movq -0x200(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movl $0x9, -0x1f4(%rbp)
cmpq $0x0, -0x1f0(%rbp)
je 0xd040
movl -0x1f4(%rbp), %ecx
movq -0x1f0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x1f8(%rbp)
jmp 0xd0ae
movl -0x12d4(%rbp), %ecx
movl -0x12d0(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x12d0(%rbp)
movl -0x12d4(%rbp), %ecx
movq -0x230(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x230(%rbp)
movl -0x12cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x12cc(%rbp)
jmp 0xcab4
jmp 0xd08f
cmpl $0x0, -0x123c(%rbp)
je 0xd0a4
movq -0x200(%rbp), %rdi
callq 0x1f5d0
movl $0x1, -0x1f8(%rbp)
movl -0x1f8(%rbp), %eax
addq $0x1330, %rsp           # imm = 0x1330
popq %rbp
retq
nopl (%rax)