// File: /workspace/github_cpp_makefile_star2_O3/jimmiebergmann[P]fbx-file/miniz.c
// Function: mz_zip_writer_add_mem_ex_v2
mz_bool mz_zip_writer_add_mem_ex_v2(mz_zip_archive *pZip, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size,
                                    mz_uint level_and_flags, mz_uint64 uncomp_size, mz_uint32 uncomp_crc32, MZ_TIME_T *last_modified,
                                    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 method = 0, dos_time = 0, dos_date = 0;
    mz_uint level, ext_attributes = 0, num_alignment_padding_bytes;
    mz_uint64 local_dir_header_ofs = pZip->m_archive_size, cur_archive_file_ofs = pZip->m_archive_size, comp_size = 0;
    size_t archive_name_size;
    mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE];
    tdefl_compressor *pComp = NULL;
    mz_bool store_data_uncompressed;
    mz_zip_internal_state *pState;
    mz_uint8 *pExtra_data = NULL;
    mz_uint32 extra_size = 0;
    mz_uint8 extra_data[MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE];
    mz_uint16 bit_flags = 0;

    if ((int)level_and_flags < 0)
        level_and_flags = MZ_DEFAULT_LEVEL;

    if (uncomp_size || (buf_size && !(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)))
        bit_flags |= MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR;

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

    level = level_and_flags & 0xF;
    store_data_uncompressed = ((!level) || (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA));

    if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || ((buf_size) && (!pBuf)) || (!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)
    {
        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); */
        }
        if ((buf_size > 0xFFFFFFFF) || (uncomp_size > 0xFFFFFFFF))
        {
            pState->m_zip64 = MZ_TRUE;
            /*return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); */
        }
    }

    if ((!(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (uncomp_size))
        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);

#ifndef MINIZ_NO_TIME
    if (last_modified != NULL)
    {
        mz_zip_time_t_to_dos_time(*last_modified, &dos_time, &dos_date);
    }
    else
    {
        MZ_TIME_T cur_time;
        time(&cur_time);
        mz_zip_time_t_to_dos_time(cur_time, &dos_time, &dos_date);
    }
#endif /* #ifndef MINIZ_NO_TIME */

    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 + user_extra_data_central_len
			+ MZ_ZIP_DATA_DESCRIPTER_SIZE32) > 0xFFFFFFFF)
        {
            pState->m_zip64 = MZ_TRUE;
            /*return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); */
        }
    }

    if ((archive_name_size) && (pArchive_name[archive_name_size - 1] == '/'))
    {
        /* Set DOS Subdirectory attribute bit. */
        ext_attributes |= MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG;

        /* Subdirectories cannot contain data. */
        if ((buf_size) || (uncomp_size))
            return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
    }

    /* Try to do any allocations before writing to the archive, so if an allocation fails the file remains unmodified. (A good idea if we're doing an in-place modification.) */
    if ((!mz_zip_array_ensure_room(pZip, &pState->m_central_dir, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + archive_name_size + comment_size + (pState->m_zip64 ? MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE : 0))) || (!mz_zip_array_ensure_room(pZip, &pState->m_central_dir_offsets, 1)))
        return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);

    if ((!store_data_uncompressed) && (buf_size))
    {
        if (NULL == (pComp = (tdefl_compressor *)pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, sizeof(tdefl_compressor))))
            return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
    }

    if (!mz_zip_writer_write_zeros(pZip, cur_archive_file_ofs, num_alignment_padding_bytes))
    {
        pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
        return MZ_FALSE;
    }

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

    MZ_CLEAR_OBJ(local_dir_header);

    if (!store_data_uncompressed || (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA))
    {
        method = MZ_DEFLATED;
    }

    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, bit_flags, dos_time, dos_date))
            return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR);

        if (pZip->m_pWrite(pZip->m_pIO_opaque, local_dir_header_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)
        {
            pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
            return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED);
        }
        cur_archive_file_ofs += archive_name_size;

        if (pExtra_data != NULL)
        {
            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, bit_flags, dos_time, dos_date))
            return mz_zip_set_error(pZip, MZ_ZIP_INTERNAL_ERROR);

        if (pZip->m_pWrite(pZip->m_pIO_opaque, local_dir_header_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)
        {
            pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
            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 (!(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA))
    {
        uncomp_crc32 = (mz_uint32)mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, buf_size);
        uncomp_size = buf_size;
        if (uncomp_size <= 3)
        {
            level = 0;
            store_data_uncompressed = MZ_TRUE;
        }
    }

    if (store_data_uncompressed)
    {
        if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pBuf, buf_size) != buf_size)
        {
            pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
            return mz_zip_set_error(pZip, MZ_ZIP_FILE_WRITE_FAILED);
        }

        cur_archive_file_ofs += buf_size;
        comp_size = buf_size;
    }
    else if (buf_size)
    {
        mz_zip_writer_add_state state;

        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) ||
            (tdefl_compress_buffer(pComp, pBuf, buf_size, TDEFL_FINISH) != TDEFL_STATUS_DONE))
        {
            pZip->m_pFree(pZip->m_pAlloc_opaque, pComp);
            return mz_zip_set_error(pZip, MZ_ZIP_COMPRESSION_FAILED);
        }

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

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

    if (uncomp_size)
    {
        mz_uint8 local_dir_footer[MZ_ZIP_DATA_DESCRIPTER_SIZE64];
        mz_uint32 local_dir_footer_size = MZ_ZIP_DATA_DESCRIPTER_SIZE32;

        MZ_ASSERT(bit_flags & MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR);

        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, bit_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 $0x118, %rsp            # imm = 0x118
movl %r9d, -0xc0(%rbp)
movq %rdx, -0xc8(%rbp)
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %r10d
xorl %edx, %edx
movw %dx, -0x44(%rbp)
movw %dx, -0x42(%rbp)
movq (%rdi), %r9
movq %r9, -0x98(%rbp)
movq $0x0, -0x58(%rbp)
testl %r10d, %r10d
movl $0x6, %r13d
cmovnsl %r10d, %r13d
testq %rax, %rax
je 0xb603
movl %r13d, %r12d
andl $0x400, %r12d           # imm = 0x400
movw $0x8, %dx
jmp 0xb620
testq %rcx, %rcx
setne %r10b
movl %r13d, %r12d
andl $0x400, %r12d           # imm = 0x400
sete %dl
andb %r10b, %dl
movzbl %dl, %edx
shll $0x3, %edx
movzwl %dx, %r10d
leal 0x800(%r10), %edx
btl $0x10, %r13d
cmovael %edx, %r10d
andl $0xf, %r13d
sete %bl
testl %r12d, %r12d
setne %r11b
movq 0x68(%rdi), %r15
testq %r15, %r15
je 0xb68e
cmpl $0x2, 0x14(%rdi)
jne 0xb68e
testq %rcx, %rcx
sete %dl
cmpq $0x0, -0xc8(%rbp)
setne %r14b
testq %rsi, %rsi
je 0xb68e
orb %dl, %r14b
je 0xb68e
cmpw $0x0, -0xc0(%rbp)
sete %dl
testq %r8, %r8
setne %r14b
orb %dl, %r14b
cmpl $0xb, %r13d
setb %dl
testb %dl, %r14b
jne 0xb6ad
movl $0x18, 0x1c(%rdi)
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x64(%r15)
movq %rdi, -0x30(%rbp)
movl 0x10(%rdi), %edx
je 0xb6cd
cmpl $-0x1, %edx
jne 0xb6f1
movq -0x30(%rbp), %rax
movl $0x2, 0x1c(%rax)
jmp 0xb695
cmpl $0xffff, %edx           # imm = 0xFFFF
setne %dl
movq %rax, %rdi
orq %rcx, %rdi
shrq $0x20, %rdi
sete %dil
testb %dl, %dil
jne 0xb6f1
movl $0x1, 0x64(%r15)
testl %r12d, %r12d
setne %dl
testq %rax, %rax
sete %al
orb %dl, %al
jne 0xb70e
movq -0x30(%rbp), %rax
movl $0x18, 0x1c(%rax)
jmp 0xb695
movb (%rsi), %dl
cmpb $0x2f, %dl
je 0xb777
movq 0x28(%rbp), %rax
movl 0x20(%rbp), %edi
movq %rdi, -0xf8(%rbp)
leaq -0x81(%rbp), %rdi
movq %rdi, -0x110(%rbp)
leaq -0x82(%rbp), %rdi
movq %rdi, -0x108(%rbp)
leaq -0x83(%rbp), %rdi
movq %rdi, -0x100(%rbp)
orb %r11b, %bl
leaq 0x1(%rsi), %rdi
testb %dl, %dl
je 0xb787
movzbl %dl, %edx
cmpl $0x3a, %edx
je 0xb76c
cmpl $0x5c, %edx
je 0xb76c
movb (%rdi), %dl
incq %rdi
jmp 0xb754
cmpq $0x0, -0x30(%rbp)
je 0xb695
movq -0x30(%rbp), %rax
movl $0x19, 0x1c(%rax)
jmp 0xb695
movb %bl, -0x31(%rbp)
movq %rcx, -0x70(%rbp)
movq %r10, -0xb8(%rbp)
movq %r9, -0x40(%rbp)
movq %rsi, -0x78(%rbp)
movq %r8, -0x120(%rbp)
testq %rax, %rax
je 0xb7ae
movq (%rax), %rdi
jmp 0xb7c0
leaq -0xf0(%rbp), %rbx
movq %rbx, %rdi
callq 0x3210
movq (%rbx), %rdi
leaq -0x44(%rbp), %rsi
leaq -0x42(%rbp), %rdx
callq 0xc0e3
movq -0x78(%rbp), %rdi
callq 0x3110
cmpq $0x10000, %rax          # imm = 0x10000
jb 0xb7fa
xorl %r14d, %r14d
movq -0x30(%rbp), %rax
testq %rax, %rax
je 0xb698
movl $0x19, 0x1c(%rax)
jmp 0xb698
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %rbx
testq %rbx, %rbx
je 0xb814
leal -0x1(%rbx), %edx
movl (%rcx), %ecx
andl %edx, %ecx
subl %ecx, %ebx
andl %edx, %ebx
jmp 0xb816
xorl %ebx, %ebx
movq -0x78(%rbp), %r11
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq 0x8(%r15), %rdi
movzwl -0xc0(%rbp), %r10d
movq %rax, -0x50(%rbp)
leaq (%r10,%rax), %rcx
leaq (%rdi,%rcx), %rdx
addq $0x4a, %rdx
cmpq %rsi, %rdx
jbe 0xb850
movq -0x30(%rbp), %rax
movl $0xf, 0x1c(%rax)
jmp 0xb695
movl $0x1c, %edx
cmpl $0x0, 0x64(%r15)
jne 0xb8bc
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movl %ebx, %r14d
movl 0x38(%rbp), %eax
movl %eax, %r8d
movl 0x48(%rbp), %r9d
movl %r9d, %r9d
addq %r8, %r9
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %r10, %r8
addq %rax, %r10
addq %r10, %r9
movq -0x50(%rbp), %rax
leaq (%r9,%rax,2), %r9
addq %r14, %r9
addq %rdi, %r9
addq %r9, %rsi
addq $0x72, %rsi
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
cmpq %rax, %rsi
jae 0xb8b7
movl $0x1, 0x64(%r15)
jmp 0xb8b9
xorl %edx, %edx
movq %r8, %r10
xorl %r14d, %r14d
movq -0x50(%rbp), %rax
testq %rax, %rax
je 0xb8e4
cmpb $0x2f, -0x1(%r11,%rax)
jne 0xb8e4
movl $0x10, %r14d
movq 0x18(%rbp), %rsi
orq -0x70(%rbp), %rsi
jne 0xb701
movq %r10, -0xc0(%rbp)
addq %rdi, %rcx
addq %rcx, %rdx
addq $0x2e, %rdx
cmpq %rdx, 0x10(%r15)
jae 0xb910
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movl $0x1, %ecx
callq 0xfd63
testl %eax, %eax
je 0xb956
movq 0x28(%r15), %rdx
incq %rdx
cmpq %rdx, 0x30(%r15)
jae 0xb933
leaq 0x20(%r15), %rsi
movq -0x30(%rbp), %rdi
movl $0x1, %ecx
callq 0xfd63
testl %eax, %eax
je 0xb956
movq %r14, -0x118(%rbp)
movq %rbx, %r14
cmpq $0x0, -0x70(%rbp)
sete %al
orb -0x31(%rbp), %al
je 0xb966
xorl %eax, %eax
movq -0x40(%rbp), %rsi
movq -0x30(%rbp), %rbx
jmp 0xb988
movq -0x30(%rbp), %rax
movl $0x10, 0x1c(%rax)
jmp 0xb695
movq -0x30(%rbp), %rbx
movq 0x40(%rbx), %rdi
movl $0x1, %esi
movl $0x4df78, %edx          # imm = 0x4DF78
callq *0x28(%rbx)
testq %rax, %rax
movq -0x40(%rbp), %rsi
je 0xbb3a
movq %rax, -0x68(%rbp)
movq %rbx, %rdi
movl %r14d, %edx
callq 0xc13f
testl %eax, %eax
je 0xba28
movl %r14d, %eax
movq -0x98(%rbp), %rsi
addq %rax, %rsi
movq %rsi, -0x98(%rbp)
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0xb9c8
decq %rcx
testq %rsi, %rcx
jne 0xc0a5
movq -0x40(%rbp), %rcx
addq %rax, %rcx
xorps %xmm0, %xmm0
movups %xmm0, -0xe2(%rbp)
movaps %xmm0, -0xf0(%rbp)
xorl %r8d, %r8d
movl %r12d, %eax
orl %r13d, %eax
setne %r8b
movl %r8d, %ebx
shll $0x3, %ebx
cmpl $0x0, 0x64(%r15)
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
je 0xba38
movq %rcx, -0x40(%rbp)
movq 0x18(%rbp), %rax
cmpq %rdi, %rax
ja 0xbb46
cmpq %rdi, %rsi
ja 0xbb46
movq $0x0, -0x60(%rbp)
xorl %ecx, %ecx
jmp 0xbb87
movq 0x40(%rbx), %rdi
movq -0x68(%rbp), %rsi
callq *0x30(%rbx)
jmp 0xb695
cmpl $0x0, -0x54(%rbp)
jne 0xbf15
movq %rcx, %rax
shrq $0x20, %rax
jne 0xbf15
movq %rcx, %r15
movzwl -0x44(%rbp), %edi
leaq -0xf0(%rbp), %rdx
movl $0x4034b50, (%rdx)      # imm = 0x4034B50
xorl %r14d, %r14d
testb %r8b, %r8b
movl $0x14, %eax
cmovel %r14d, %eax
movb %al, 0x4(%rdx)
movq -0xb8(%rbp), %rcx
movzwl %cx, %eax
movb %cl, 0x6(%rdx)
movb %ah, -0xe9(%rbp)
movzwl -0x42(%rbp), %eax
movl %ebx, -0xa4(%rbp)
movb %bl, 0x8(%rdx)
movl %edi, %ecx
movb %cl, 0xa(%rdx)
movl %edi, -0xa0(%rbp)
movb %ch, -0xe5(%rbp)
movb %al, 0xc(%rdx)
movl %eax, -0x9c(%rbp)
movb %ah, -0xe3(%rbp)
movl %r14d, 0x16(%rdx)
movq $0x0, 0xe(%rdx)
movq -0x50(%rbp), %rax
movb %al, 0x1a(%rdx)
movb %ah, -0xd5(%rbp)
movl 0x38(%rbp), %eax
movb %al, 0x1c(%rdx)
movb %ah, -0xd3(%rbp)
movq -0x30(%rbp), %rbx
movq 0x60(%rbx), %rdi
movl $0x1e, %ecx
callq *0x50(%rbx)
cmpq $0x1e, %rax
jne 0xbca3
movq %r15, %rsi
addq $0x1e, %rsi
movq 0x60(%rbx), %rdi
movq %rsi, -0x40(%rbp)
movq -0x78(%rbp), %rdx
movq -0x50(%rbp), %r15
movq %r15, %rcx
callq *0x50(%rbx)
cmpq %r15, %rax
jne 0xbc94
movq -0x50(%rbp), %rax
addq %rax, -0x40(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0xb0(%rbp)
jmp 0xbcb7
movl $0x10, 0x1c(%rbx)
jmp 0xb695
xorl %ecx, %ecx
cmpq %rdi, %rax
leaq 0x18(%rbp), %rax
cmovbeq %rcx, %rax
leaq -0x58(%rbp), %rdx
cmovbeq %rcx, %rdx
cmpq %rdi, %rsi
leaq -0x98(%rbp), %r14
cmovaq %r14, %rcx
leaq -0x140(%rbp), %rdi
movq %rdi, -0x60(%rbp)
movq %rax, %rsi
movl %r8d, %r15d
callq 0xc1da
movl %r15d, %r8d
movl %eax, %ecx
movq (%r14), %rsi
movl 0x38(%rbp), %eax
movq %rcx, -0xb0(%rbp)
leal (%rcx,%rax), %edi
movzwl -0x44(%rbp), %eax
leaq -0xf0(%rbp), %rdx
xorl %r14d, %r14d
testb %r8b, %r8b
movl $0x14, %ecx
cmovel %r14d, %ecx
movl $0x4034b50, (%rdx)      # imm = 0x4034B50
movb %cl, 0x4(%rdx)
movb %r14b, 0x5(%rdx)
movzwl -0xb8(%rbp), %ecx
movb %cl, 0x6(%rdx)
movb %ch, -0xe9(%rbp)
movzwl -0x42(%rbp), %ecx
movl %ebx, -0xa4(%rbp)
movb %bl, 0x8(%rdx)
movb %r14b, 0x9(%rdx)
movb %al, 0xa(%rdx)
movl %eax, -0xa0(%rbp)
movb %ah, -0xe5(%rbp)
movb %cl, 0xc(%rdx)
movl %ecx, -0x9c(%rbp)
movb %ch, -0xe3(%rbp)
movl %r14d, 0x16(%rdx)
movq $0x0, 0xe(%rdx)
movq -0x50(%rbp), %rax
movb %al, 0x1a(%rdx)
movb %ah, -0xd5(%rbp)
movl %edi, %eax
movb %al, 0x1c(%rdx)
movb %ah, -0xd3(%rbp)
movq -0x30(%rbp), %rbx
movq 0x60(%rbx), %rdi
movl $0x1e, %ecx
callq *0x50(%rbx)
cmpq $0x1e, %rax
jne 0xbca3
movq -0x40(%rbp), %r15
addq $0x1e, %r15
movq 0x60(%rbx), %rdi
movq %r15, %rsi
movq -0x78(%rbp), %rdx
movq -0x50(%rbp), %rcx
callq *0x50(%rbx)
movq -0x50(%rbp), %rcx
cmpq %rcx, %rax
jne 0xbc94
addq %rcx, %r15
movq %r15, -0x40(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0xbcaf
movq -0x30(%rbp), %rax
movq 0x60(%rax), %rdi
movl -0xb0(%rbp), %r14d
leaq -0x140(%rbp), %rdx
movq -0x40(%rbp), %rsi
movq %r14, %rcx
callq *0x50(%rax)
cmpq %r14, %rax
jne 0xbe5b
addq %r14, -0x40(%rbp)
jmp 0xbcb7
movq -0x30(%rbp), %rbx
movq 0x40(%rbx), %rdi
movq -0x68(%rbp), %rsi
callq *0x30(%rbx)
movl $0x13, 0x1c(%rbx)
jmp 0xb698
movq $0x0, -0x60(%rbp)
movl 0x38(%rbp), %eax
testl %eax, %eax
je 0xbce7
movq -0x30(%rbp), %rax
movq 0x60(%rax), %rdi
movl 0x38(%rbp), %ecx
movl %ecx, %r14d
movq -0x40(%rbp), %rsi
movq 0x30(%rbp), %rdx
movq %r14, %rcx
callq *0x50(%rax)
cmpq %r14, %rax
jne 0xbe5b
addq %r14, -0x40(%rbp)
testl %r12d, %r12d
jne 0xbd21
xorl %edi, %edi
movq -0xc8(%rbp), %rsi
movq -0x70(%rbp), %r14
movq %r14, %rdx
callq 0x3715
movq %rax, -0xf8(%rbp)
movq %r14, 0x18(%rbp)
cmpq $0x4, %r14
setae %al
movb -0x31(%rbp), %cl
xorb $0x1, %cl
testb %cl, %al
jne 0xbe86
movq -0x30(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x40(%rbp), %rsi
movq -0xc8(%rbp), %rdx
movq -0x70(%rbp), %r14
movq %r14, %rcx
callq *0x50(%rax)
cmpq %r14, %rax
jne 0xbe6b
movq -0x70(%rbp), %rax
addq %rax, -0x40(%rbp)
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x68(%rbp), %rsi
callq *0x30(%rax)
movq 0x18(%rbp), %rax
testq %rax, %rax
je 0xbf01
movzwl -0xb8(%rbp), %ecx
testb $0x8, %cl
je 0xc0c4
movl $0x8074b50, -0x90(%rbp) # imm = 0x8074B50
movq -0xf8(%rbp), %rdx
movb %dl, -0x8c(%rbp)
movb %dh, -0x8b(%rbp)
movl %edx, %ecx
shrl $0x10, %ecx
movb %cl, -0x8a(%rbp)
movl %edx, %ecx
shrl $0x18, %ecx
movb %cl, -0x89(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0xbf08
movq -0x58(%rbp), %rcx
leaq -0x7c(%rbp), %rdi
movb %cl, -0xc(%rdi)
movb %ch, -0x87(%rbp)
movl %ecx, %edx
shrl $0x10, %edx
movb %dl, -0xa(%rdi)
movl %ecx, %edx
shrl $0x18, %edx
movb %dl, -0x9(%rdi)
movq %rcx, %rdx
shrq $0x20, %rdx
movb %dl, -0x8(%rdi)
movq %rcx, %rdx
shrq $0x28, %rdx
movb %dl, -0x7(%rdi)
movq %rcx, %rdx
shrq $0x30, %rdx
movb %dl, -0x6(%rdi)
shrq $0x38, %rcx
movb %cl, -0x5(%rdi)
movb %al, -0x4(%rdi)
movb %ah, -0x7f(%rbp)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, -0x2(%rdi)
movl %eax, %ecx
shrl $0x18, %ecx
movb %cl, -0x1(%rdi)
movq %rax, %r8
shrq $0x20, %r8
movl $0x18, %r14d
movl $0x38, %esi
movl $0x30, %edx
movl $0x28, %ecx
leaq -0x7b(%rbp), %r9
movq %r9, -0x100(%rbp)
leaq -0x7a(%rbp), %r9
movq %r9, -0x108(%rbp)
leaq -0x79(%rbp), %r9
movq %r9, -0x110(%rbp)
jmp 0xbf62
movq -0x30(%rbp), %rax
movl $0x13, 0x1c(%rax)
jmp 0xb695
movq -0x30(%rbp), %rbx
movq 0x40(%rbx), %rdi
movq -0x68(%rbp), %rsi
callq *0x30(%rbx)
movl $0x13, 0x1c(%rbx)
jmp 0xb695
leaq -0x90(%rbp), %rdx
movq -0x30(%rbp), %rax
movq %rax, (%rdx)
movq -0x40(%rbp), %rax
movq %rax, 0x8(%rdx)
movq $0x0, 0x10(%rdx)
movl %r13d, %eax
leaq 0xa652(%rip), %rsi      # 0x16500
xorl %ecx, %ecx
cmpl $0x4, %r13d
setb %cl
shll $0xe, %ecx
orl (%rsi,%rax,4), %ecx
leaq 0x36d(%rip), %rsi       # 0xc231
movq -0x68(%rbp), %rbx
movq %rbx, %rdi
callq 0x3982
movq %rbx, %rdi
movq -0xc8(%rbp), %rsi
movq -0x70(%rbp), %rdx
movl $0x4, %ecx
callq 0x75de
cmpl $0x1, %eax
jne 0xbf25
movq -0x88(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x80(%rbp), %rax
jmp 0xbd4f
xorl %eax, %eax
jmp 0xbfbf
movq -0x58(%rbp), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
je 0xbf40
movq -0x30(%rbp), %rax
movl $0x1d, 0x1c(%rax)
jmp 0xb695
movq -0x30(%rbp), %rbx
movq 0x40(%rbx), %rdi
movq -0x68(%rbp), %rsi
callq *0x30(%rbx)
movl $0xc, 0x1c(%rbx)
jmp 0xb695
leaq -0x84(%rbp), %rdi
movl %ecx, -0x4(%rdi)
movl $0x18, %esi
movl $0x10, %edx
movl $0x8, %ecx
movq %rax, %r8
movl $0x10, %r14d
movb %r8b, (%rdi)
movq %rax, %rdi
shrq %cl, %rdi
movq %rax, %r8
movl %edx, %ecx
shrq %cl, %r8
movl %esi, %ecx
shrq %cl, %rax
movq -0x100(%rbp), %rcx
movb %dil, (%rcx)
movq -0x108(%rbp), %rcx
movb %r8b, (%rcx)
movq -0x110(%rbp), %rcx
movb %al, (%rcx)
movq -0x30(%rbp), %rax
movq 0x60(%rax), %rdi
leaq -0x90(%rbp), %rdx
movq -0x40(%rbp), %rsi
movq %r14, %rcx
callq *0x50(%rax)
cmpq %r14, %rax
jne 0xb695
addq %r14, -0x40(%rbp)
movq 0x18(%rbp), %rax
cmpq $0x0, -0x60(%rbp)
je 0xc009
xorl %ecx, %ecx
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
cmpq %rdi, %rax
leaq 0x18(%rbp), %r14
movl $0x0, %esi
cmovaq %r14, %rsi
leaq -0x58(%rbp), %rdx
cmovbeq %rcx, %rdx
leaq -0x98(%rbp), %rax
cmpq %rdi, (%rax)
cmovaq %rax, %rcx
leaq -0x140(%rbp), %rdi
callq 0xc1da
movq %rax, -0xb0(%rbp)
movq (%r14), %rax
movzwl -0x9c(%rbp), %r10d
movzwl -0xa0(%rbp), %r11d
movzwl -0xb8(%rbp), %r14d
movzwl -0xa4(%rbp), %r12d
movl $0xffff, %edx           # imm = 0xFFFF
movq -0xb0(%rbp), %r8
andl %edx, %r8d
andl -0x50(%rbp), %edx
movq -0x30(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x60(%rbp), %rcx
movq -0x120(%rbp), %r9
movl 0x48(%rbp), %r13d
pushq %r13
pushq 0x40(%rbp)
pushq -0x118(%rbp)
pushq -0x98(%rbp)
pushq %r10
pushq %r11
pushq %r14
pushq %r12
pushq -0xf8(%rbp)
pushq -0x58(%rbp)
pushq %rax
pushq -0xc0(%rbp)
callq 0xc272
addq $0x60, %rsp
testl %eax, %eax
je 0xb695
movq -0x30(%rbp), %rcx
incl 0x10(%rcx)
movq -0x40(%rbp), %rax
movq %rax, (%rcx)
movl $0x1, %r14d
jmp 0xb698
leaq 0xb19b(%rip), %rdi      # 0x17247
leaq 0xb08b(%rip), %rsi      # 0x1713e
leaq 0xb1cf(%rip), %rcx      # 0x17289
movl $0x17fb, %edx           # imm = 0x17FB
callq 0x3170
leaq 0xb288(%rip), %rdi      # 0x17353
leaq 0xb06c(%rip), %rsi      # 0x1713e
leaq 0xb1b0(%rip), %rcx      # 0x17289
movl $0x1873, %edx           # imm = 0x1873
callq 0x3170