// File: jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_writer_add_cfile
mz_bool mz_zip_writer_add_cfile(mz_zip_archive *pZip, const char *pArchive_name, MZ_FILE *pSrc_file, mz_uint64 size_to_add, const MZ_TIME_T *pFile_time, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags,
                                const char *user_extra_data, mz_uint user_extra_data_len, const char *user_extra_data_central, mz_uint user_extra_data_central_len)
{
    mz_uint16 gen_flags = MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR;
    mz_uint uncomp_crc32 = MZ_CRC32_INIT, level, num_alignment_padding_bytes;
    mz_uint16 method = 0, dos_time = 0, dos_date = 0, ext_attributes = 0;
    mz_uint64 local_dir_header_ofs, cur_archive_file_ofs = pZip->m_archive_size, uncomp_size = size_to_add, comp_size = 0;
    size_t archive_name_size;
    mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE];
    mz_uint8 *pExtra_data = NULL;
    mz_uint32 extra_size = 0;
    mz_uint8 extra_data[MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE];
    mz_zip_internal_state *pState;

    if (!(level_and_flags & MZ_ZIP_FLAG_ASCII_FILENAME))
        gen_flags |= MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8;

    if ((int)level_and_flags < 0)
        level_and_flags = MZ_DEFAULT_LEVEL;
    level = level_and_flags & 0xF;

    /* Sanity checks */
    if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || (!pArchive_name) || ((comment_size) && (!pComment)) || (level > MZ_UBER_COMPRESSION))
        return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);

    pState = pZip->m_pState;

    if ((!pState->m_zip64) && (uncomp_size > MZ_UINT32_MAX))
    {
        /* Source file is too large for non-zip64 */
        /*return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); */
        pState->m_zip64 = MZ_TRUE;
    }

    /* We could support this, but why? */
    if (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)
        return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);

    if (!mz_zip_writer_validate_archive_name(pArchive_name))
        return mz_zip_set_error(pZip, MZ_ZIP_INVALID_FILENAME);

    if (pState->m_zip64)
    {
        if (pZip->m_total_files == MZ_UINT32_MAX)
            return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES);
    }
    else
    {
        if (pZip->m_total_files == MZ_UINT16_MAX)
        {
            pState->m_zip64 = MZ_TRUE;
            /*return mz_zip_set_error(pZip, MZ_ZIP_TOO_MANY_FILES); */
        }
    }

    archive_name_size = strlen(pArchive_name);
    if (archive_name_size > MZ_UINT16_MAX)
        return mz_zip_set_error(pZip, MZ_ZIP_INVALID_FILENAME);

    num_alignment_padding_bytes = mz_zip_writer_compute_padding_needed_for_file_alignment(pZip);

    /* miniz doesn't support central dirs >= MZ_UINT32_MAX bytes yet */
    if (((mz_uint64)pState->m_central_dir.m_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + archive_name_size + MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE + comment_size) >= MZ_UINT32_MAX)
        return mz_zip_set_error(pZip, MZ_ZIP_UNSUPPORTED_CDIR_SIZE);

    if (!pState->m_zip64)
    {
        /* Bail early if the archive would obviously become too large */
        if ((pZip->m_archive_size + num_alignment_padding_bytes + MZ_ZIP_LOCAL_DIR_HEADER_SIZE + archive_name_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE 
			+ archive_name_size + comment_size + user_extra_data_len + pState->m_central_dir.m_size + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE + 1024
			+ MZ_ZIP_DATA_DESCRIPTER_SIZE32 + user_extra_data_central_len) > 0xFFFFFFFF)
        {
            pState->m_zip64 = MZ_TRUE;
            /*return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); */
        }
    }

#ifndef MINIZ_NO_TIME
    if (pFile_time)
    {
        mz_zip_time_t_to_dos_time(*pFile_time, &dos_time, &dos_date);
    }
#endif

    if (uncomp_size <= 3)
        level = 0;

    if (!mz_zip_writer_write_zeros(pZip, cur_archive_file_ofs, num_alignment_padding_bytes))
    {
        return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED);
    }

    cur_archive_file_ofs += num_alignment_padding_bytes;
    local_dir_header_ofs = cur_archive_file_ofs;

    if (pZip->m_file_offset_alignment)
    {
        MZ_ASSERT((cur_archive_file_ofs & (pZip->m_file_offset_alignment - 1)) == 0);
    }

    if (uncomp_size && level)
    {
        method = MZ_DEFLATED;
    }

    MZ_CLEAR_OBJ(local_dir_header);
    if (pState->m_zip64)
    {
        if (uncomp_size >= MZ_UINT32_MAX || local_dir_header_ofs >= MZ_UINT32_MAX)
        {
            pExtra_data = extra_data;
            extra_size = mz_zip_writer_create_zip64_extra_data(extra_data, (uncomp_size >= MZ_UINT32_MAX) ? &uncomp_size : NULL,
                                                               (uncomp_size >= MZ_UINT32_MAX) ? &comp_size : NULL, (local_dir_header_ofs >= MZ_UINT32_MAX) ? &local_dir_header_ofs : NULL);
        }

        if (!mz_zip_writer_create_local_dir_header(pZip, local_dir_header, (mz_uint16)archive_name_size, extra_size + user_extra_data_len, 0, 0, 0, method, gen_flags, dos_time, dos_date))
            return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR);

        if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, local_dir_header, sizeof(local_dir_header)) != sizeof(local_dir_header))
            return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED);

        cur_archive_file_ofs += sizeof(local_dir_header);

        if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, archive_name_size) != archive_name_size)
        {
            return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED);
        }

        cur_archive_file_ofs += archive_name_size;

        if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, extra_data, extra_size) != extra_size)
            return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED);

        cur_archive_file_ofs += extra_size;
    }
    else
    {
        if ((comp_size > MZ_UINT32_MAX) || (cur_archive_file_ofs > MZ_UINT32_MAX))
            return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE);
        if (!mz_zip_writer_create_local_dir_header(pZip, local_dir_header, (mz_uint16)archive_name_size, user_extra_data_len, 0, 0, 0, method, gen_flags, dos_time, dos_date))
            return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR);

        if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, local_dir_header, sizeof(local_dir_header)) != sizeof(local_dir_header))
            return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED);

        cur_archive_file_ofs += sizeof(local_dir_header);

        if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, archive_name_size) != archive_name_size)
        {
            return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED);
        }

        cur_archive_file_ofs += archive_name_size;
    }

    if (user_extra_data_len > 0)
    {
        if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, user_extra_data, user_extra_data_len) != user_extra_data_len)
            return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED);

        cur_archive_file_ofs += user_extra_data_len;
    }

    if (uncomp_size)
    {
        mz_uint64 uncomp_remaining = uncomp_size;
        void *pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, MZ_ZIP_MAX_IO_BUF_SIZE);
        if (!pRead_buf)
        {
            return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
        }

        if (!level)
        {
            while (uncomp_remaining)
            {
                mz_uint n = (mz_uint)MZ_MIN((mz_uint64)MZ_ZIP_MAX_IO_BUF_SIZE, uncomp_remaining);
                if ((MZ_FREAD(pRead_buf, 1, n, pSrc_file) != n) || (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pRead_buf, n) != n))
                {
                    pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
                    return mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED);
                }
                uncomp_crc32 = (mz_uint32)mz_crc32(uncomp_crc32, (const mz_uint8 *)pRead_buf, n);
                uncomp_remaining -= n;
                cur_archive_file_ofs += n;
            }
            comp_size = uncomp_size;
        }
        else
        {
            mz_bool result = MZ_FALSE;
            mz_zip_writer_add_state state;
            tdefl_compressor *pComp = (tdefl_compressor *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(tdefl_compressor));
            if (!pComp)
            {
                pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
                return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
            }

            state.m_pZip = pZip;
            state.m_cur_archive_file_ofs = cur_archive_file_ofs;
            state.m_comp_size = 0;

            if (tdefl_init(pComp, mz_zip_writer_add_put_buf_callback, &state, tdefl_create_comp_flags_from_zip_params(level, -15, MZ_DEFAULT_STRATEGY)) != TDEFL_STATUS_OKAY)
            {
                pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
                pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
                return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR);
            }

            for (;;)
            {
                size_t in_buf_size = (mz_uint32)MZ_MIN(uncomp_remaining, (mz_uint64)MZ_ZIP_MAX_IO_BUF_SIZE);
                tdefl_status status;
                tdefl_flush flush = TDEFL_NO_FLUSH;

                if (MZ_FREAD(pRead_buf, 1, in_buf_size, pSrc_file) != in_buf_size)
                {
                    mz_zip_set_error(pZip, MZ_ZIP_FILE_READ_FAILED);
                    break;
                }

                uncomp_crc32 = (mz_uint32)mz_crc32(uncomp_crc32, (const mz_uint8 *)pRead_buf, in_buf_size);
                uncomp_remaining -= in_buf_size;

                if (pZip->m_pNeeds_keepalive != NULL && pZip->m_pNeeds_keepalive(pZip->m_pIO_opaque))
                    flush = TDEFL_FULL_FLUSH;

                status = tdefl_compress_buffer(pComp, pRead_buf, in_buf_size, uncomp_remaining ? flush : TDEFL_FINISH);
                if (status == TDEFL_STATUS_DONE)
                {
                    result = MZ_TRUE;
                    break;
                }
                else if (status != TDEFL_STATUS_OKAY)
                {
                    mz_zip_set_error(pZip, MZ_ZIP_COMPRESSION_FAILED);
                    break;
                }
            }

            pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);

            if (!result)
            {
                pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
                return MZ_FALSE;
            }

            comp_size = state.m_comp_size;
            cur_archive_file_ofs = state.m_cur_archive_file_ofs;
        }

        pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf);
    }

    {
        mz_uint8 local_dir_footer[MZ_ZIP_DATA_DESCRIPTER_SIZE64];
        mz_uint32 local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE32;

        MZ_WRITE_LE32(local_dir_footer + 0, MZ_ZIP_DATA_DESCRIPTOR_ID);
        MZ_WRITE_LE32(local_dir_footer + 4, uncomp_crc32);
        if (pExtra_data == NULL)
        {
            if (comp_size > MZ_UINT32_MAX)
                return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE);

            MZ_WRITE_LE32(local_dir_footer + 8, comp_size);
            MZ_WRITE_LE32(local_dir_footer + 12, uncomp_size);
        }
        else
        {
            MZ_WRITE_LE64(local_dir_footer + 8, comp_size);
            MZ_WRITE_LE64(local_dir_footer + 16, uncomp_size);
            local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE64;
        }

        if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, local_dir_footer, local_dir_footer_size) != local_dir_footer_size)
            return MZ_FALSE;

        cur_archive_file_ofs += local_dir_footer_size;
    }

    if (pExtra_data != NULL)
    {
        extra_size = mz_zip_writer_create_zip64_extra_data(extra_data, (uncomp_size >= MZ_UINT32_MAX) ? &uncomp_size : NULL,
                                                           (uncomp_size >= MZ_UINT32_MAX) ? &comp_size : NULL, (local_dir_header_ofs >= MZ_UINT32_MAX) ? &local_dir_header_ofs : NULL);
    }

    if (!mz_zip_writer_add_to_central_dir(pZip, pArchive_name, (mz_uint16)archive_name_size, pExtra_data, extra_size, pComment, comment_size,
                                          uncomp_size, comp_size, uncomp_crc32, method, gen_flags, dos_time, dos_date, local_dir_header_ofs, ext_attributes,
                                          user_extra_data_central, user_extra_data_central_len))
        return MZ_FALSE;

    pZip->m_total_files++;
    pZip->m_archive_size = cur_archive_file_ofs;

    return MZ_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x468, %rsp            # imm = 0x468
movl 0x38(%rbp), %eax
movq 0x30(%rbp), %rax
movl 0x28(%rbp), %eax
movq 0x20(%rbp), %rax
movl 0x18(%rbp), %eax
movw 0x10(%rbp), %ax
movq %rdi, -0x240(%rbp)
movq %rsi, -0x248(%rbp)
movq %rdx, -0x250(%rbp)
movq %rcx, -0x258(%rbp)
movq %r8, -0x260(%rbp)
movq %r9, -0x268(%rbp)
movw $0x8, -0x26a(%rbp)
movl $0x0, -0x270(%rbp)
movw $0x0, -0x27a(%rbp)
movw $0x0, -0x27c(%rbp)
movw $0x0, -0x27e(%rbp)
movw $0x0, -0x280(%rbp)
movq -0x240(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x290(%rbp)
movq -0x258(%rbp), %rax
movq %rax, -0x298(%rbp)
movq $0x0, -0x2a0(%rbp)
movq $0x0, -0x2d8(%rbp)
movl $0x0, -0x2dc(%rbp)
movl 0x18(%rbp), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
jne 0x16909
movzwl -0x26a(%rbp), %eax
orl $0x800, %eax            # imm = 0x800
movw %ax, -0x26a(%rbp)
cmpl $0x0, 0x18(%rbp)
jge 0x16916
movl $0x6, 0x18(%rbp)
movl 0x18(%rbp), %eax
andl $0xf, %eax
movl %eax, -0x274(%rbp)
cmpq $0x0, -0x240(%rbp)
je 0x1696b
movq -0x240(%rbp), %rax
cmpq $0x0, 0x68(%rax)
je 0x1696b
movq -0x240(%rbp), %rax
cmpl $0x2, 0x14(%rax)
jne 0x1696b
cmpq $0x0, -0x248(%rbp)
je 0x1696b
cmpw $0x0, 0x10(%rbp)
je 0x16962
cmpq $0x0, -0x268(%rbp)
je 0x1696b
cmpl $0xa, -0x274(%rbp)
jbe 0x169ac
movq -0x240(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl $0x18, -0xd4(%rbp)
cmpq $0x0, -0xd0(%rbp)
je 0x1699d
movl -0xd4(%rbp), %ecx
movq -0xd0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x240(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x308(%rbp)
movq -0x308(%rbp), %rax
cmpl $0x0, 0x64(%rax)
jne 0x169e7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x298(%rbp)
jbe 0x169e7
movq -0x308(%rbp), %rax
movl $0x1, 0x64(%rax)
movl 0x18(%rbp), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x16a35
movq -0x240(%rbp), %rax
movq %rax, -0xe0(%rbp)
movl $0x18, -0xe4(%rbp)
cmpq $0x0, -0xe0(%rbp)
je 0x16a26
movl -0xe4(%rbp), %ecx
movq -0xe0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x248(%rbp), %rdi
callq 0x15220
cmpl $0x0, %eax
jne 0x16a87
movq -0x240(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl $0x19, -0xf4(%rbp)
cmpq $0x0, -0xf0(%rbp)
je 0x16a78
movl -0xf4(%rbp), %ecx
movq -0xf0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x308(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x16ae4
movq -0x240(%rbp), %rax
cmpl $-0x1, 0x10(%rax)
jne 0x16ae2
movq -0x240(%rbp), %rax
movq %rax, -0x100(%rbp)
movl $0x2, -0x104(%rbp)
cmpq $0x0, -0x100(%rbp)
je 0x16ad3
movl -0x104(%rbp), %ecx
movq -0x100(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
jmp 0x16b04
movq -0x240(%rbp), %rax
cmpl $0xffff, 0x10(%rax)     # imm = 0xFFFF
jne 0x16b02
movq -0x308(%rbp), %rax
movl $0x1, 0x64(%rax)
jmp 0x16b04
movq -0x248(%rbp), %rdi
callq 0x3140
movq %rax, -0x2a8(%rbp)
cmpq $0xffff, -0x2a8(%rbp) # imm = 0xFFFF
jbe 0x16b65
movq -0x240(%rbp), %rax
movq %rax, -0x110(%rbp)
movl $0x19, -0x114(%rbp)
cmpq $0x0, -0x110(%rbp)
je 0x16b56
movl -0x114(%rbp), %ecx
movq -0x110(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x240(%rbp), %rdi
callq 0x15320
movl %eax, -0x278(%rbp)
movq -0x308(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x2e, %rax
addq -0x2a8(%rbp), %rax
addq $0x1c, %rax
movzwl 0x10(%rbp), %ecx
addq %rcx, %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jb 0x16be3
movq -0x240(%rbp), %rax
movq %rax, -0x120(%rbp)
movl $0xf, -0x124(%rbp)
cmpq $0x0, -0x120(%rbp)
je 0x16bd4
movl -0x124(%rbp), %ecx
movq -0x120(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x308(%rbp), %rax
cmpl $0x0, 0x64(%rax)
jne 0x16c5f
movq -0x240(%rbp), %rax
movq (%rax), %rax
movl -0x278(%rbp), %ecx
addq %rcx, %rax
addq $0x1e, %rax
addq -0x2a8(%rbp), %rax
addq $0x2e, %rax
addq -0x2a8(%rbp), %rax
movzwl 0x10(%rbp), %ecx
addq %rcx, %rax
movl 0x28(%rbp), %ecx
addq %rcx, %rax
movq -0x308(%rbp), %rcx
addq 0x8(%rcx), %rax
addq $0x16, %rax
addq $0x400, %rax            # imm = 0x400
addq $0x10, %rax
movl 0x38(%rbp), %ecx
addq %rcx, %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jbe 0x16c5d
movq -0x308(%rbp), %rax
movl $0x1, 0x64(%rax)
jmp 0x16c5f
cmpq $0x0, -0x260(%rbp)
je 0x16c86
movq -0x260(%rbp), %rax
movq (%rax), %rdi
leaq -0x27c(%rbp), %rsi
leaq -0x27e(%rbp), %rdx
callq 0x15290
cmpq $0x3, -0x298(%rbp)
ja 0x16c9a
movl $0x0, -0x274(%rbp)
movq -0x240(%rbp), %rdi
movq -0x290(%rbp), %rsi
movl -0x278(%rbp), %edx
callq 0x15380
cmpl $0x0, %eax
jne 0x16cf9
movq -0x240(%rbp), %rax
movq %rax, -0x130(%rbp)
movl $0x13, -0x134(%rbp)
cmpq $0x0, -0x130(%rbp)
je 0x16cea
movl -0x134(%rbp), %ecx
movq -0x130(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movl -0x278(%rbp), %eax
addq -0x290(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x290(%rbp), %rax
movq %rax, -0x288(%rbp)
movq -0x240(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x16d6b
movq -0x290(%rbp), %rax
movq -0x240(%rbp), %rcx
movq 0x20(%rcx), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x16d4a
jmp 0x16d69
leaq 0x1f60e(%rip), %rdi     # 0x3635f
leaq 0x1f3c6(%rip), %rsi     # 0x3611e
movl $0x18ff, %edx           # imm = 0x18FF
leaq 0x1f63d(%rip), %rcx     # 0x363a1
callq 0x31d0
jmp 0x16d6b
cmpq $0x0, -0x298(%rbp)
je 0x16d87
cmpl $0x0, -0x274(%rbp)
je 0x16d87
movw $0x8, -0x27a(%rbp)
leaq -0x2d0(%rbp), %rdi
xorl %esi, %esi
movl $0x1e, %edx
callq 0x3190
movq -0x308(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x17109
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x298(%rbp)
jae 0x16dcb
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x288(%rbp)
jb 0x16ea5
leaq -0x300(%rbp), %rax
movq %rax, -0x2d8(%rbp)
leaq -0x300(%rbp), %rax
movq %rax, -0x380(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x298(%rbp)
jb 0x16e05
leaq -0x298(%rbp), %rax
movq %rax, -0x388(%rbp)
jmp 0x16e10
xorl %eax, %eax
movq %rax, -0x388(%rbp)
jmp 0x16e10
movq -0x388(%rbp), %rax
movq %rax, -0x390(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x298(%rbp)
jb 0x16e3c
leaq -0x2a0(%rbp), %rax
movq %rax, -0x398(%rbp)
jmp 0x16e47
xorl %eax, %eax
movq %rax, -0x398(%rbp)
jmp 0x16e47
movq -0x398(%rbp), %rax
movq %rax, -0x3a0(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x288(%rbp)
jb 0x16e73
leaq -0x288(%rbp), %rax
movq %rax, -0x3a8(%rbp)
jmp 0x16e7e
xorl %eax, %eax
movq %rax, -0x3a8(%rbp)
jmp 0x16e7e
movq -0x3a0(%rbp), %rdx
movq -0x390(%rbp), %rsi
movq -0x380(%rbp), %rdi
movq -0x3a8(%rbp), %rcx
callq 0x154b0
movl %eax, -0x2dc(%rbp)
movq -0x240(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
movq -0x2a8(%rbp), %rax
movw %ax, %dx
movl -0x2dc(%rbp), %eax
addl 0x28(%rbp), %eax
movw %ax, %cx
movw -0x27a(%rbp), %r11w
movw -0x26a(%rbp), %r10w
movw -0x27c(%rbp), %ax
xorl %r8d, %r8d
movl %r8d, %r9d
xorl %r8d, %r8d
movzwl %dx, %edx
movzwl %cx, %ecx
movq %r9, %r8
movl $0x0, (%rsp)
movzwl %r11w, %r11d
movl %r11d, 0x8(%rsp)
movzwl %r10w, %r10d
movl %r10d, 0x10(%rsp)
movzwl %ax, %eax
movl %eax, 0x18(%rsp)
movzwl -0x27e(%rbp), %eax
movl %eax, 0x20(%rsp)
callq 0x158b0
cmpl $0x0, %eax
jne 0x16f68
movq -0x240(%rbp), %rax
movq %rax, -0x140(%rbp)
movl $0x1b, -0x144(%rbp)
cmpq $0x0, -0x140(%rbp)
je 0x16f59
movl -0x144(%rbp), %ecx
movq -0x140(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x240(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x290(%rbp), %rsi
leaq -0x2d0(%rbp), %rdx
movl $0x1e, %ecx
callq *%rax
cmpq $0x1e, %rax
je 0x16fda
movq -0x240(%rbp), %rax
movq %rax, -0x150(%rbp)
movl $0x13, -0x154(%rbp)
cmpq $0x0, -0x150(%rbp)
je 0x16fcb
movl -0x154(%rbp), %ecx
movq -0x150(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x290(%rbp), %rax
addq $0x1e, %rax
movq %rax, -0x290(%rbp)
movq -0x240(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x290(%rbp), %rsi
movq -0x248(%rbp), %rdx
movq -0x2a8(%rbp), %rcx
callq *%rax
cmpq -0x2a8(%rbp), %rax
je 0x17063
movq -0x240(%rbp), %rax
movq %rax, -0x160(%rbp)
movl $0x13, -0x164(%rbp)
cmpq $0x0, -0x160(%rbp)
je 0x17054
movl -0x164(%rbp), %ecx
movq -0x160(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x2a8(%rbp), %rax
addq -0x290(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x240(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x290(%rbp), %rsi
leaq -0x300(%rbp), %rdx
movl -0x2dc(%rbp), %ecx
callq *%rax
movl -0x2dc(%rbp), %ecx
cmpq %rcx, %rax
je 0x170f0
movq -0x240(%rbp), %rax
movq %rax, -0x170(%rbp)
movl $0x13, -0x174(%rbp)
cmpq $0x0, -0x170(%rbp)
je 0x170e1
movl -0x174(%rbp), %ecx
movq -0x170(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movl -0x2dc(%rbp), %eax
addq -0x290(%rbp), %rax
movq %rax, -0x290(%rbp)
jmp 0x17333
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x2a0(%rbp)
ja 0x17125
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x290(%rbp)
jbe 0x17166
movq -0x240(%rbp), %rax
movq %rax, -0x180(%rbp)
movl $0x1d, -0x184(%rbp)
cmpq $0x0, -0x180(%rbp)
je 0x17157
movl -0x184(%rbp), %ecx
movq -0x180(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x240(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
movq -0x2a8(%rbp), %rax
movw %ax, %dx
movl 0x28(%rbp), %eax
movw %ax, %cx
movw -0x27a(%rbp), %r11w
movw -0x26a(%rbp), %r10w
movw -0x27c(%rbp), %ax
xorl %r8d, %r8d
movl %r8d, %r9d
xorl %r8d, %r8d
movzwl %dx, %edx
movzwl %cx, %ecx
movq %r9, %r8
movl $0x0, (%rsp)
movzwl %r11w, %r11d
movl %r11d, 0x8(%rsp)
movzwl %r10w, %r10d
movl %r10d, 0x10(%rsp)
movzwl %ax, %eax
movl %eax, 0x18(%rsp)
movzwl -0x27e(%rbp), %eax
movl %eax, 0x20(%rsp)
callq 0x158b0
cmpl $0x0, %eax
jne 0x17223
movq -0x240(%rbp), %rax
movq %rax, -0x190(%rbp)
movl $0x1b, -0x194(%rbp)
cmpq $0x0, -0x190(%rbp)
je 0x17214
movl -0x194(%rbp), %ecx
movq -0x190(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x240(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x290(%rbp), %rsi
leaq -0x2d0(%rbp), %rdx
movl $0x1e, %ecx
callq *%rax
cmpq $0x1e, %rax
je 0x17295
movq -0x240(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movl $0x13, -0x1a4(%rbp)
cmpq $0x0, -0x1a0(%rbp)
je 0x17286
movl -0x1a4(%rbp), %ecx
movq -0x1a0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x290(%rbp), %rax
addq $0x1e, %rax
movq %rax, -0x290(%rbp)
movq -0x240(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x290(%rbp), %rsi
movq -0x248(%rbp), %rdx
movq -0x2a8(%rbp), %rcx
callq *%rax
cmpq -0x2a8(%rbp), %rax
je 0x1731e
movq -0x240(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movl $0x13, -0x1b4(%rbp)
cmpq $0x0, -0x1b0(%rbp)
je 0x1730f
movl -0x1b4(%rbp), %ecx
movq -0x1b0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x2a8(%rbp), %rax
addq -0x290(%rbp), %rax
movq %rax, -0x290(%rbp)
cmpl $0x0, 0x28(%rbp)
jbe 0x173bd
movq -0x240(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x290(%rbp), %rsi
movq 0x20(%rbp), %rdx
movl 0x28(%rbp), %ecx
callq *%rax
movl 0x28(%rbp), %ecx
cmpq %rcx, %rax
je 0x173ac
movq -0x240(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movl $0x13, -0x1c4(%rbp)
cmpq $0x0, -0x1c0(%rbp)
je 0x1739d
movl -0x1c4(%rbp), %ecx
movq -0x1c0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movl 0x28(%rbp), %eax
addq -0x290(%rbp), %rax
movq %rax, -0x290(%rbp)
cmpq $0x0, -0x298(%rbp)
je 0x179c1
movq -0x298(%rbp), %rax
movq %rax, -0x310(%rbp)
movq -0x240(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x40(%rcx), %rdi
movl $0x1, %esi
movl $0x10000, %edx          # imm = 0x10000
callq *%rax
movq %rax, -0x318(%rbp)
cmpq $0x0, -0x318(%rbp)
jne 0x1744d
movq -0x240(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movl $0x10, -0x1d4(%rbp)
cmpq $0x0, -0x1d0(%rbp)
je 0x1743e
movl -0x1d4(%rbp), %ecx
movq -0x1d0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
cmpl $0x0, -0x274(%rbp)
jne 0x175ca
jmp 0x1745c
cmpq $0x0, -0x310(%rbp)
je 0x175b7
movl $0x10000, %eax          # imm = 0x10000
cmpq -0x310(%rbp), %rax
jae 0x17486
movl $0x10000, %eax          # imm = 0x10000
movq %rax, -0x3b0(%rbp)
jmp 0x17494
movq -0x310(%rbp), %rax
movq %rax, -0x3b0(%rbp)
movq -0x3b0(%rbp), %rax
movl %eax, -0x31c(%rbp)
movq -0x318(%rbp), %rdi
movl -0x31c(%rbp), %eax
movl %eax, %edx
movq -0x250(%rbp), %rcx
movl $0x1, %esi
callq 0x3460
movl -0x31c(%rbp), %ecx
cmpq %rcx, %rax
jne 0x17503
movq -0x240(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x290(%rbp), %rsi
movq -0x318(%rbp), %rdx
movl -0x31c(%rbp), %ecx
callq *%rax
movl -0x31c(%rbp), %ecx
cmpq %rcx, %rax
je 0x17563
movq -0x240(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x40(%rcx), %rdi
movq -0x318(%rbp), %rsi
callq *%rax
movq -0x240(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movl $0x14, -0x1e4(%rbp)
cmpq $0x0, -0x1e0(%rbp)
je 0x17554
movl -0x1e4(%rbp), %ecx
movq -0x1e0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movl -0x270(%rbp), %eax
movl %eax, %edi
movq -0x318(%rbp), %rsi
movl -0x31c(%rbp), %eax
movl %eax, %edx
callq 0x3910
movl %eax, -0x270(%rbp)
movl -0x31c(%rbp), %eax
movl %eax, %ecx
movq -0x310(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x310(%rbp)
movl -0x31c(%rbp), %eax
addq -0x290(%rbp), %rax
movq %rax, -0x290(%rbp)
jmp 0x1745c
movq -0x298(%rbp), %rax
movq %rax, -0x2a0(%rbp)
jmp 0x179a2
movl $0x0, -0x320(%rbp)
movq -0x240(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x40(%rcx), %rdi
movl $0x1, %esi
movl $0x4df78, %edx          # imm = 0x4DF78
callq *%rax
movq %rax, -0x340(%rbp)
cmpq $0x0, -0x340(%rbp)
jne 0x17667
movq -0x240(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x40(%rcx), %rdi
movq -0x318(%rbp), %rsi
callq *%rax
movq -0x240(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movl $0x10, -0x1f4(%rbp)
cmpq $0x0, -0x1f0(%rbp)
je 0x17658
movl -0x1f4(%rbp), %ecx
movq -0x1f0(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x240(%rbp), %rax
movq %rax, -0x338(%rbp)
movq -0x290(%rbp), %rax
movq %rax, -0x330(%rbp)
movq $0x0, -0x328(%rbp)
movq -0x340(%rbp), %rax
movq %rax, -0x3b8(%rbp)
movl -0x274(%rbp), %edi
movl $0xfffffff1, %esi       # imm = 0xFFFFFFF1
xorl %edx, %edx
callq 0x3cc0
movq -0x3b8(%rbp), %rdi
movl %eax, %ecx
leaq -0x1a1e(%rip), %rsi     # 0x15ca0
leaq -0x338(%rbp), %rdx
callq 0x3da0
cmpl $0x0, %eax
je 0x1774e
movq -0x240(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x40(%rcx), %rdi
movq -0x340(%rbp), %rsi
callq *%rax
movq -0x240(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x40(%rcx), %rdi
movq -0x318(%rbp), %rsi
callq *%rax
movq -0x240(%rbp), %rax
movq %rax, -0x200(%rbp)
movl $0x1b, -0x204(%rbp)
cmpq $0x0, -0x200(%rbp)
je 0x1773f
movl -0x204(%rbp), %ecx
movq -0x200(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
jmp 0x17750
cmpq $0x10000, -0x310(%rbp) # imm = 0x10000
jae 0x1776d
movq -0x310(%rbp), %rax
movq %rax, -0x3c0(%rbp)
jmp 0x1777b
movl $0x10000, %eax          # imm = 0x10000
movq %rax, -0x3c0(%rbp)
jmp 0x1777b
movq -0x3c0(%rbp), %rax
movl %eax, %eax
movq %rax, -0x348(%rbp)
movl $0x0, -0x350(%rbp)
movq -0x318(%rbp), %rdi
movq -0x348(%rbp), %rdx
movq -0x250(%rbp), %rcx
movl $0x1, %esi
callq 0x3460
cmpq -0x348(%rbp), %rax
je 0x177f4
movq -0x240(%rbp), %rax
movq %rax, -0x210(%rbp)
movl $0x14, -0x214(%rbp)
cmpq $0x0, -0x210(%rbp)
je 0x177ef
movl -0x214(%rbp), %ecx
movq -0x210(%rbp), %rax
movl %ecx, 0x1c(%rax)
jmp 0x17930
movl -0x270(%rbp), %eax
movl %eax, %edi
movq -0x318(%rbp), %rsi
movq -0x348(%rbp), %rdx
callq 0x3910
movl %eax, -0x270(%rbp)
movq -0x348(%rbp), %rcx
movq -0x310(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x310(%rbp)
movq -0x240(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x17862
movq -0x240(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x60(%rcx), %rdi
callq *%rax
cmpl $0x0, %eax
je 0x17862
movl $0x3, -0x350(%rbp)
movq -0x340(%rbp), %rax
movq %rax, -0x3d8(%rbp)
movq -0x318(%rbp), %rax
movq %rax, -0x3d0(%rbp)
movq -0x348(%rbp), %rax
movq %rax, -0x3c8(%rbp)
cmpq $0x0, -0x310(%rbp)
je 0x178a4
movl -0x350(%rbp), %eax
movl %eax, -0x3dc(%rbp)
jmp 0x178b1
movl $0x4, %eax
movl %eax, -0x3dc(%rbp)
jmp 0x178b1
movq -0x3c8(%rbp), %rdx
movq -0x3d0(%rbp), %rsi
movq -0x3d8(%rbp), %rdi
movl -0x3dc(%rbp), %ecx
callq 0xaed0
movl %eax, -0x34c(%rbp)
cmpl $0x1, -0x34c(%rbp)
jne 0x178ec
movl $0x1, -0x320(%rbp)
jmp 0x17930
cmpl $0x0, -0x34c(%rbp)
je 0x17929
movq -0x240(%rbp), %rax
movq %rax, -0x220(%rbp)
movl $0xc, -0x224(%rbp)
cmpq $0x0, -0x220(%rbp)
je 0x17927
movl -0x224(%rbp), %ecx
movq -0x220(%rbp), %rax
movl %ecx, 0x1c(%rax)
jmp 0x17930
jmp 0x1792b
jmp 0x17750
movq -0x240(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x40(%rcx), %rdi
movq -0x340(%rbp), %rsi
callq *%rax
cmpl $0x0, -0x320(%rbp)
jne 0x17986
movq -0x240(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x40(%rcx), %rdi
movq -0x318(%rbp), %rsi
callq *%rax
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x328(%rbp), %rax
movq %rax, -0x2a0(%rbp)
movq -0x330(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x240(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x40(%rcx), %rdi
movq -0x318(%rbp), %rsi
callq *%rax
movl $0x10, -0x374(%rbp)
leaq -0x370(%rbp), %rax
movq %rax, -0x90(%rbp)
movl $0x8074b50, -0x94(%rbp) # imm = 0x8074B50
movl -0x94(%rbp), %eax
movb %al, %cl
movq -0x90(%rbp), %rax
movb %cl, (%rax)
movl -0x94(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x90(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x94(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x90(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x94(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x90(%rbp), %rax
movb %cl, 0x3(%rax)
leaq -0x370(%rbp), %rcx
addq $0x4, %rcx
movl -0x270(%rbp), %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movb %al, %cl
movq -0xa0(%rbp), %rax
movb %cl, (%rax)
movl -0xa4(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0xa0(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0xa4(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0xa0(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0xa4(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0xa0(%rbp), %rax
movb %cl, 0x3(%rax)
cmpq $0x0, -0x2d8(%rbp)
jne 0x17be1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x2a0(%rbp)
jbe 0x17afe
movq -0x240(%rbp), %rax
movq %rax, -0x230(%rbp)
movl $0x1d, -0x234(%rbp)
cmpq $0x0, -0x230(%rbp)
je 0x17aef
movl -0x234(%rbp), %ecx
movq -0x230(%rbp), %rax
movl %ecx, 0x1c(%rax)
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
leaq -0x370(%rbp), %rcx
addq $0x8, %rcx
movq -0x2a0(%rbp), %rax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
movb %al, %cl
movq -0xb0(%rbp), %rax
movb %cl, (%rax)
movl -0xb4(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0xb0(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0xb4(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0xb0(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0xb4(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0xb0(%rbp), %rax
movb %cl, 0x3(%rax)
leaq -0x370(%rbp), %rcx
addq $0xc, %rcx
movq -0x298(%rbp), %rax
movq %rcx, -0xc0(%rbp)
movl %eax, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
movb %al, %cl
movq -0xc0(%rbp), %rax
movb %cl, (%rax)
movl -0xc4(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0xc0(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0xc4(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0xc0(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0xc4(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0xc0(%rbp), %rax
movb %cl, 0x3(%rax)
jmp 0x17d54
leaq -0x370(%rbp), %rcx
addq $0x8, %rcx
movq -0x2a0(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, (%rax)
movl -0x34(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x34(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x34(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x50(%rbp), %rcx
addq $0x4, %rcx
movq -0x58(%rbp), %rax
shrq $0x20, %rax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, (%rax)
movl -0x44(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x44(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x44(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x3(%rax)
leaq -0x370(%rbp), %rcx
addq $0x10, %rcx
movq -0x298(%rbp), %rax
movq %rcx, -0x80(%rbp)
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movb %al, %cl
movq -0x60(%rbp), %rax
movb %cl, (%rax)
movl -0x64(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x60(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x64(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x60(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x64(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x60(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x80(%rbp), %rcx
addq $0x4, %rcx
movq -0x88(%rbp), %rax
shrq $0x20, %rax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movb %al, %cl
movq -0x70(%rbp), %rax
movb %cl, (%rax)
movl -0x74(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x70(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x74(%rbp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x70(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x74(%rbp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x70(%rbp), %rax
movb %cl, 0x3(%rax)
movl $0x18, -0x374(%rbp)
movq -0x240(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x240(%rbp), %rcx
movq 0x60(%rcx), %rdi
movq -0x290(%rbp), %rsi
leaq -0x370(%rbp), %rdx
movl -0x374(%rbp), %ecx
callq *%rax
movl -0x374(%rbp), %ecx
cmpq %rcx, %rax
je 0x17d9a
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movl -0x374(%rbp), %eax
addq -0x290(%rbp), %rax
movq %rax, -0x290(%rbp)
cmpq $0x0, -0x2d8(%rbp)
je 0x17e88
leaq -0x300(%rbp), %rax
movq %rax, -0x3e8(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x298(%rbp)
jb 0x17de8
leaq -0x298(%rbp), %rax
movq %rax, -0x3f0(%rbp)
jmp 0x17df3
xorl %eax, %eax
movq %rax, -0x3f0(%rbp)
jmp 0x17df3
movq -0x3f0(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x298(%rbp)
jb 0x17e1f
leaq -0x2a0(%rbp), %rax
movq %rax, -0x400(%rbp)
jmp 0x17e2a
xorl %eax, %eax
movq %rax, -0x400(%rbp)
jmp 0x17e2a
movq -0x400(%rbp), %rax
movq %rax, -0x408(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x288(%rbp)
jb 0x17e56
leaq -0x288(%rbp), %rax
movq %rax, -0x410(%rbp)
jmp 0x17e61
xorl %eax, %eax
movq %rax, -0x410(%rbp)
jmp 0x17e61
movq -0x408(%rbp), %rdx
movq -0x3f8(%rbp), %rsi
movq -0x3e8(%rbp), %rdi
movq -0x410(%rbp), %rcx
callq 0x154b0
movl %eax, -0x2dc(%rbp)
movq -0x240(%rbp), %rdi
movq -0x248(%rbp), %rsi
movq -0x2a8(%rbp), %rax
movw %ax, %dx
movq -0x2d8(%rbp), %rcx
movl -0x2dc(%rbp), %eax
movw %ax, %r8w
movq -0x268(%rbp), %r9
movw 0x10(%rbp), %ax
movw %ax, -0x42a(%rbp)
movq -0x298(%rbp), %rax
movq %rax, -0x428(%rbp)
movq -0x2a0(%rbp), %rax
movq %rax, -0x420(%rbp)
movl -0x270(%rbp), %eax
movl %eax, -0x418(%rbp)
movw -0x27a(%rbp), %r13w
movw -0x26a(%rbp), %r12w
movw -0x27c(%rbp), %r15w
movw -0x27e(%rbp), %r14w
movq -0x288(%rbp), %rbx
movzwl -0x280(%rbp), %r11d
movq 0x30(%rbp), %r10
movl 0x38(%rbp), %eax
movl %eax, -0x414(%rbp)
movw -0x42a(%rbp), %ax
movzwl %dx, %edx
movzwl %r8w, %r8d
movzwl %ax, %eax
movl %eax, (%rsp)
movq -0x428(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0x420(%rbp), %rax
movq %rax, 0x10(%rsp)
movl -0x418(%rbp), %eax
movl %eax, 0x18(%rsp)
movl -0x414(%rbp), %eax
movzwl %r13w, %r13d
movl %r13d, 0x20(%rsp)
movzwl %r12w, %r12d
movl %r12d, 0x28(%rsp)
movzwl %r15w, %r15d
movl %r15d, 0x30(%rsp)
movzwl %r14w, %r14d
movl %r14d, 0x38(%rsp)
movq %rbx, 0x40(%rsp)
movl %r11d, 0x48(%rsp)
movq %r10, 0x50(%rsp)
movl %eax, 0x58(%rsp)
callq 0x15d30
cmpl $0x0, %eax
jne 0x17fb0
movl $0x0, -0x238(%rbp)
jmp 0x17fdb
movq -0x240(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x290(%rbp), %rcx
movq -0x240(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x238(%rbp)
movl -0x238(%rbp), %eax
addq $0x468, %rsp            # imm = 0x468
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)