// File: /workspace/github_cpp_makefile_star2_O2/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)
andl $0xfff, %ecx            # imm = 0xFFF
leal 0x2(%rcx), %eax
movw $0x3, %si
xorl %edx, %edx
divw %si
incl %eax
movl $0xffff, %edi           # imm = 0xFFFF
andl %edi, %eax
movl %eax, 0x14(%rbx)
movl %r14d, %eax
shrl $0xe, %eax
andl $0x1, %eax
movl %eax, 0x1c(%rbx)
shrl $0x2, %ecx
addl $0x2, %ecx
movl %ecx, %eax
xorl %edx, %edx
divw %si
incl %eax
andl %edi, %eax
movl %eax, 0x18(%rbx)
testw %r14w, %r14w
js 0x39a0
leaq 0x292aa(%rbx), %rdi
movl $0x10000, %edx          # imm = 0x10000
xorl %esi, %esi
callq 0x3180
andq $0x0, 0x28(%rbx)
andq $0x0, 0x80(%rbx)
leaq 0x92aa(%rbx), %rax
andl $0x0, 0x6c(%rbx)
leaq 0x92ab(%rbx), %rcx
andq $0x0, 0x64(%rbx)
leaq 0x392aa(%rbx), %rdx
andl $0x0, 0xa8(%rbx)
andq $0x0, 0xc0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x54(%rbx)
movups %xmm0, 0x70(%rbx)
movq %rcx, 0x30(%rbx)
movq %rax, 0x38(%rbx)
movl $0x8, 0x50(%rbx)
movq %rdx, 0x40(%rbx)
movq %rdx, 0x48(%rbx)
movq $0x1, 0x20(%rbx)
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x98(%rbx)
movups %xmm0, 0xb0(%rbx)
testw %r14w, %r14w
js 0x3a32
leaq 0xc8(%rbx), %rdi
movl $0x8101, %edx           # imm = 0x8101
xorl %esi, %esi
callq 0x3180
addq $0x81ca, %rbx           # imm = 0x81CA
movl $0x280, %edx            # imm = 0x280
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3180
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq