// File: /workspace/github_cpp_makefile_star2_O3/jimmiebergmann[P]fbx-file/miniz.c
// Function: tdefl_init
tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags)
{
    d->m_pPut_buf_func = pPut_buf_func;
    d->m_pPut_buf_user = pPut_buf_user;
    d->m_flags = (mz_uint)(flags);
    d->m_max_probes[0] = 1 + ((flags & 0xFFF) + 2) / 3;
    d->m_greedy_parsing = (flags & TDEFL_GREEDY_PARSING_FLAG) != 0;
    d->m_max_probes[1] = 1 + (((flags & 0xFFF) >> 2) + 2) / 3;
    if (!(flags & TDEFL_NONDETERMINISTIC_PARSING_FLAG))
        MZ_CLEAR_OBJ(d->m_hash);
    d->m_lookahead_pos = d->m_lookahead_size = d->m_dict_size = d->m_total_lz_bytes = d->m_lz_code_buf_dict_pos = d->m_bits_in = 0;
    d->m_output_flush_ofs = d->m_output_flush_remaining = d->m_finished = d->m_block_index = d->m_bit_buffer = d->m_wants_to_finish = 0;
    d->m_pLZ_code_buf = d->m_lz_code_buf + 1;
    d->m_pLZ_flags = d->m_lz_code_buf;
    d->m_num_flags_left = 8;
    d->m_pOutput_buf = d->m_output_buf;
    d->m_pOutput_buf_end = d->m_output_buf;
    d->m_prev_return_status = TDEFL_STATUS_OKAY;
    d->m_saved_match_dist = d->m_saved_match_len = d->m_saved_lit = 0;
    d->m_adler32 = 1;
    d->m_pIn_buf = NULL;
    d->m_pOut_buf = NULL;
    d->m_pIn_buf_size = NULL;
    d->m_pOut_buf_size = NULL;
    d->m_flush = TDEFL_NO_FLUSH;
    d->m_pSrc = NULL;
    d->m_src_buf_left = 0;
    d->m_out_buf_ofs = 0;
    if (!(flags & TDEFL_NONDETERMINISTIC_PARSING_FLAG))
        MZ_CLEAR_OBJ(d->m_dict);
    memset(&d->m_huff_count[0][0], 0, sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0);
    memset(&d->m_huff_count[1][0], 0, sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1);
    return TDEFL_STATUS_OKAY;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %ecx, %r14d
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movl %ecx, 0x10(%rdi)
movl %ecx, %eax
andl $0xfff, %eax            # imm = 0xFFF
imull $0x5556, %eax, %ecx     # imm = 0x5556
movl $0xaaac, %edx           # imm = 0xAAAC
addl %edx, %ecx
shrl $0x10, %ecx
incl %ecx
movl %ecx, 0x14(%rdi)
movl %r14d, %ecx
shrl $0xe, %ecx
andl $0x1, %ecx
movl %ecx, 0x1c(%rdi)
shrl $0x2, %eax
imull $0x5556, %eax, %eax     # imm = 0x5556
addl %edx, %eax
shrl $0x10, %eax
incl %eax
movl %eax, 0x18(%rdi)
testw %r14w, %r14w
js 0x39ed
leaq 0x292aa(%rbx), %rdi
movl $0x10000, %edx          # imm = 0x10000
xorl %esi, %esi
callq 0x3160
leaq 0x92aa(%rbx), %rax
leaq 0x92ab(%rbx), %rcx
leaq 0x392aa(%rbx), %rdx
xorl %esi, %esi
movq %rsi, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x54(%rbx)
movups %xmm0, 0x70(%rbx)
movq %rsi, 0x80(%rbx)
movq %rcx, 0x30(%rbx)
movq %rax, 0x38(%rbx)
movl $0x8, 0x50(%rbx)
movq %rdx, 0x40(%rbx)
movq %rdx, 0x48(%rbx)
movl %esi, 0x6c(%rbx)
movq %rsi, 0x64(%rbx)
movq $0x1, 0x20(%rbx)
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x98(%rbx)
movl %esi, 0xa8(%rbx)
movups %xmm0, 0xb0(%rbx)
movq %rsi, 0xc0(%rbx)
testw %r14w, %r14w
js 0x3a7b
leaq 0xc8(%rbx), %rdi
movl $0x8101, %edx           # imm = 0x8101
xorl %esi, %esi
callq 0x3160
addq $0x81ca, %rbx           # imm = 0x81CA
movl $0x280, %edx            # imm = 0x280
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3160
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq