// File: /workspace/github_c_makefile_star2_O0/wkoszek[P]mini_gzip/miniz.c
// Function: tdefl_compress
tdefl_status tdefl_compress(tdefl_compressor *d, const void *pIn_buf, size_t *pIn_buf_size, void *pOut_buf, size_t *pOut_buf_size, tdefl_flush flush)
{
  if (!d)
  {
    if (pIn_buf_size) *pIn_buf_size = 0;
    if (pOut_buf_size) *pOut_buf_size = 0;
    return TDEFL_STATUS_BAD_PARAM;
  }

  d->m_pIn_buf = pIn_buf; d->m_pIn_buf_size = pIn_buf_size;
  d->m_pOut_buf = pOut_buf; d->m_pOut_buf_size = pOut_buf_size;
  d->m_pSrc = (const mz_uint8 *)(pIn_buf); d->m_src_buf_left = pIn_buf_size ? *pIn_buf_size : 0;
  d->m_out_buf_ofs = 0;
  d->m_flush = flush;

  if ( ((d->m_pPut_buf_func != NULL) == ((pOut_buf != NULL) || (pOut_buf_size != NULL))) || (d->m_prev_return_status != TDEFL_STATUS_OKAY) ||
        (d->m_wants_to_finish && (flush != TDEFL_FINISH)) || (pIn_buf_size && *pIn_buf_size && !pIn_buf) || (pOut_buf_size && *pOut_buf_size && !pOut_buf) )
  {
    if (pIn_buf_size) *pIn_buf_size = 0;
    if (pOut_buf_size) *pOut_buf_size = 0;
    return (d->m_prev_return_status = TDEFL_STATUS_BAD_PARAM);
  }
  d->m_wants_to_finish |= (flush == TDEFL_FINISH);

  if ((d->m_output_flush_remaining) || (d->m_finished))
    return (d->m_prev_return_status = tdefl_flush_output_buffer(d));

#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
  if (((d->m_flags & TDEFL_MAX_PROBES_MASK) == 1) &&
      ((d->m_flags & TDEFL_GREEDY_PARSING_FLAG) != 0) &&
      ((d->m_flags & (TDEFL_FILTER_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS | TDEFL_RLE_MATCHES)) == 0))
  {
    if (!tdefl_compress_fast(d))
      return d->m_prev_return_status;
  }
  else
#endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN
  {
    if (!tdefl_compress_normal(d))
      return d->m_prev_return_status;
  }

  if ((d->m_flags & (TDEFL_WRITE_ZLIB_HEADER | TDEFL_COMPUTE_ADLER32)) && (pIn_buf))
    d->m_adler32 = (mz_uint32)mz_adler32(d->m_adler32, (const mz_uint8 *)pIn_buf, d->m_pSrc - (const mz_uint8 *)pIn_buf);
  
  if (d->m_flags & TDEFL_COMPUTE_CRC32)
    d->m_crc32 = (mz_uint32)mz_crc32(d->m_crc32, (const mz_uint8 *)pIn_buf, d->m_pSrc - (const mz_uint8 *)pIn_buf);

  if ((flush) && (!d->m_lookahead_size) && (!d->m_src_buf_left) && (!d->m_output_flush_remaining))
  {
    if (tdefl_flush_block(d, flush) < 0)
      return d->m_prev_return_status;
    d->m_finished = (flush == TDEFL_FINISH);
    if (flush == TDEFL_FULL_FLUSH) { MZ_CLEAR_OBJ(d->m_hash); MZ_CLEAR_OBJ(d->m_next); d->m_dict_size = 0; }
  }

  return (d->m_prev_return_status = tdefl_flush_output_buffer(d));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x25f7
cmpq $0x0, -0x20(%rbp)
je 0x25d9
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x25eb
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x295a
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x90(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb8(%rax)
cmpq $0x0, -0x20(%rbp)
je 0x2656
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x265e
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0x265e
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc0(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xc8(%rax)
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xb0(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x48(%rbp)
movb $0x1, %al
cmpq $0x0, -0x28(%rbp)
movb %al, -0x41(%rbp)
jne 0x26b3
cmpq $0x0, -0x30(%rbp)
setne %al
movb %al, -0x41(%rbp)
movl -0x48(%rbp), %eax
movb -0x41(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x2713
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8c(%rax)
jne 0x2713
movq -0x10(%rbp), %rax
cmpl $0x0, 0x88(%rax)
je 0x26e3
cmpl $0x4, -0x34(%rbp)
jne 0x2713
cmpq $0x0, -0x20(%rbp)
je 0x26fb
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x26fb
cmpq $0x0, -0x18(%rbp)
je 0x2713
cmpq $0x0, -0x30(%rbp)
je 0x2751
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2751
cmpq $0x0, -0x28(%rbp)
jne 0x2751
cmpq $0x0, -0x20(%rbp)
je 0x2725
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x2737
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movl $0xfffffffe, 0x8c(%rax) # imm = 0xFFFFFFFE
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x295a
cmpl $0x4, -0x34(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
orl 0x88(%rax), %ecx
movl %ecx, 0x88(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x7c(%rax)
jne 0x2784
movq -0x10(%rbp), %rax
cmpl $0x0, 0x80(%rax)
je 0x279f
movq -0x10(%rbp), %rdi
callq 0x6610
movq -0x10(%rbp), %rcx
movl %eax, 0x8c(%rcx)
movl %eax, -0x4(%rbp)
jmp 0x295a
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
andl $0xfff, %eax            # imm = 0xFFF
cmpl $0x1, %eax
jne 0x27f4
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x27f4
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x160000, %eax         # imm = 0x160000
cmpl $0x0, %eax
jne 0x27f4
movq -0x10(%rbp), %rdi
callq 0x6780
cmpl $0x0, %eax
jne 0x27f2
movq -0x10(%rbp), %rax
movl 0x8c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x295a
jmp 0x2816
movq -0x10(%rbp), %rdi
callq 0x71c0
cmpl $0x0, %eax
jne 0x2814
movq -0x10(%rbp), %rax
movl 0x8c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x295a
jmp 0x2816
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x3000, %eax           # imm = 0x3000
cmpl $0x0, %eax
je 0x285b
cmpq $0x0, -0x18(%rbp)
je 0x285b
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, %edi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
callq 0x1a50
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0x2899
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, %edi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
callq 0x1c20
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
cmpl $0x0, -0x34(%rbp)
je 0x2944
movq -0x10(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x2944
movq -0x10(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
jne 0x2944
movq -0x10(%rbp), %rax
cmpl $0x0, 0x7c(%rax)
jne 0x2944
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x7980
cmpl $0x0, %eax
jge 0x28ed
movq -0x10(%rbp), %rax
movl 0x8c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x295a
cmpl $0x4, -0x34(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x80(%rax)
cmpl $0x3, -0x34(%rbp)
jne 0x2942
movq -0x10(%rbp), %rdi
addq $0x292b2, %rdi          # imm = 0x292B2
xorl %esi, %esi
movl $0x10000, %edx          # imm = 0x10000
callq 0x1090
movq -0x10(%rbp), %rdi
addq $0x192b2, %rdi          # imm = 0x192B2
xorl %esi, %esi
movl $0x10000, %edx          # imm = 0x10000
callq 0x1090
movq -0x10(%rbp), %rax
movl $0x0, 0x30(%rax)
jmp 0x2944
movq -0x10(%rbp), %rdi
callq 0x6610
movq -0x10(%rbp), %rcx
movl %eax, 0x8c(%rcx)
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)