// File: /workspace/github_c_makefile_star2_O0/wkoszek[P]mini_gzip/miniz.c
// Function: tdefl_record_match
static __forceinline void tdefl_record_match(tdefl_compressor *d, mz_uint match_len, mz_uint match_dist)
{
  mz_uint32 s0, s1;

  MZ_ASSERT((match_len >= TDEFL_MIN_MATCH_LEN) && (match_dist >= 1) && (match_dist <= TDEFL_LZ_DICT_SIZE));

  d->m_total_lz_bytes += match_len;

  d->m_pLZ_code_buf[0] = (mz_uint8)(match_len - TDEFL_MIN_MATCH_LEN);

  match_dist -= 1;
  d->m_pLZ_code_buf[1] = (mz_uint8)(match_dist & 0xFF);
  d->m_pLZ_code_buf[2] = (mz_uint8)(match_dist >> 8); d->m_pLZ_code_buf += 3;

  *d->m_pLZ_flags = (mz_uint8)((*d->m_pLZ_flags >> 1) | 0x80); if (--d->m_num_flags_left == 0) { d->m_num_flags_left = 8; d->m_pLZ_flags = d->m_pLZ_code_buf++; }

  s0 = s_tdefl_small_dist_sym[match_dist & 511]; s1 = s_tdefl_large_dist_sym[match_dist >> 8];
  d->m_huff_count[1][(match_dist < 512) ? s0 : s1]++;

  d->m_huff_count[0][s_tdefl_len_sym[match_len - TDEFL_MIN_MATCH_LEN]]++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
cmpl $0x3, -0xc(%rbp)
jb 0x9619
cmpl $0x1, -0x10(%rbp)
jb 0x9619
cmpl $0x8000, -0x10(%rbp)    # imm = 0x8000
ja 0x9619
jmp 0x9638
leaq 0x3a1b(%rip), %rdi      # 0xd03b
leaq 0x3823(%rip), %rsi      # 0xce4a
movl $0x856, %edx            # imm = 0x856
leaq 0x3a66(%rip), %rcx      # 0xd099
callq 0x1080
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x5c(%rax), %ecx
movl %ecx, 0x5c(%rax)
movl -0xc(%rbp), %eax
subl $0x3, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movb %cl, (%rax)
movl -0x10(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movb %cl, 0x1(%rax)
movl -0x10(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rcx
addq $0x3, %rcx
movq %rcx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movzbl (%rax), %eax
sarl %eax
orl $0x80, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rcx
movl 0x58(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x58(%rcx)
cmpl $0x0, %eax
jne 0x96ee
movq -0x8(%rbp), %rax
movl $0x8, 0x58(%rax)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movl -0x10(%rbp), %eax
andl $0x1ff, %eax            # imm = 0x1FF
movl %eax, %eax
movl %eax, %ecx
leaq 0x2e5f(%rip), %rax      # 0xc560
movzbl (%rax,%rcx), %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
shrl $0x8, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x3047(%rip), %rax      # 0xc760
movzbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq $0x81d2, %rax           # imm = 0x81D2
addq $0x240, %rax            # imm = 0x240
movq %rax, -0x20(%rbp)
cmpl $0x200, -0x10(%rbp)     # imm = 0x200
jae 0x9745
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x974b
movl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
movl %ecx, %ecx
movw (%rax,%rcx,2), %dx
addw $0x1, %dx
movw %dx, (%rax,%rcx,2)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x3, %ecx
movl %ecx, %ecx
movl %ecx, %edx
leaq 0x306b(%rip), %rcx      # 0xc7e0
movzwl (%rcx,%rdx,2), %ecx
movw 0x81d2(%rax,%rcx,2), %dx
addw $0x1, %dx
movw %dx, 0x81d2(%rax,%rcx,2)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)