user: Translate the below assembly code into C programming language:

```asm
<stbi_zlib_compress>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x20000(%rsp),%r11
L677:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L677
  sub    $0x88,%rsp
  mov    %rdi,%r15
  mov    %esi,0x24(%rsp)
  mov    %rdx,0x48(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x20078(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x60(%rsp)
  movl   $0x0,0x64(%rsp)
  movq   $0x0,0x68(%rsp)
  mov    $0x5,%eax
  cmp    %eax,%ecx
  cmovge %ecx,%eax
  mov    %eax,0x38(%rsp)
  lea    0x68(%rsp),%rdi
  mov    $0x1,%edx
  mov    $0x1,%esi
  call   <stbiw__sbgrowf@plt>
  mov    0x68(%rsp),%rdx
  mov    -0x4(%rdx),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x4(%rdx)
  cltq
  movb   $0x78,(%rdx,%rax,1)
  mov    0x68(%rsp),%rax
  test   %rax,%rax
  je     L386
  mov    -0x4(%rax),%esi
  lea    0x1(%rsi),%edx
  cmp    -0x8(%rax),%edx
  jl     L104
L386:
  lea    0x68(%rsp),%rdi
  mov    $0x1,%edx
  mov    $0x1,%esi
  call   <stbiw__sbgrowf@plt>
L104:
  mov    0x68(%rsp),%rdx
  mov    -0x4(%rdx),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x4(%rdx)
  cltq
  movb   $0x5e,(%rdx,%rax,1)
  mov    0x64(%rsp),%ecx
  mov    $0x1,%ebx
  mov    %ebx,%eax
  shl    %cl,%eax
  or     %eax,0x60(%rsp)
  add    $0x1,%ecx
  mov    %ecx,0x64(%rsp)
  lea    0x64(%rsp),%r12
  lea    0x60(%rsp),%rbp
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    0x68(%rsp),%rdi
  call   <stbiw__zlib_flushf@plt>
  mov    %rax,%rdi
  mov    %rax,0x68(%rsp)
  mov    0x64(%rsp),%ecx
  shl    %cl,%ebx
  or     %ebx,0x60(%rsp)
  add    $0x2,%ecx
  mov    %ecx,0x64(%rsp)
  mov    %r12,%rdx
  mov    %rbp,%rsi
  call   <stbiw__zlib_flushf@plt>
  mov    %rax,0x68(%rsp)
  lea    0x70(%rsp),%r12
  lea    0x20070(%rsp),%r14
  mov    %r12,%rax
L673:
  movq   $0x0,(%rax)
  add    $0x8,%rax
  cmp    %r14,%rax
  jne    L673
  mov    0x24(%rsp),%eax
  sub    $0x3,%eax
  mov    %eax,0x30(%rsp)
  test   %eax,%eax
  jle    L414
  mov    0x38(%rsp),%ecx
  lea    (%rcx,%rcx,1),%esi
  mov    %esi,0x34(%rsp)
  movslq %ecx,%rax
  lea    0x0(,%rcx,8),%esi
  mov    %esi,0x3c(%rsp)
  shl    $0x3,%rax
  mov    %rax,0x40(%rsp)
  movl   $0x0,0x14(%rsp)
  mov    %r12,0x50(%rsp)
  mov    %r14,0x58(%rsp)
  mov    %r15,0x8(%rsp)
  jmp    L434
L177:
  add    $0x8,%rbx
  cmp    %r13,%rbx
  je     L194
L502:
  mov    (%rbx),%rdi
  mov    %rdi,%rax
  sub    0x8(%rsp),%rax
  cmp    %rbp,%rax
  jle    L177
  mov    0x24(%rsp),%edx
  sub    0x14(%rsp),%edx
  mov    0x18(%rsp),%rsi
  call   <stbiw__zlib_countm@plt>
  cmp    0x20(%rsp),%eax
  jl     L177
  mov    (%rbx),%r14
  mov    %eax,0x20(%rsp)
  jmp    L177
L194:
  movslq %r15d,%rax
  mov    0x70(%rsp,%rax,8),%rdi
  test   %rdi,%rdi
  je     L477
L281:
  mov    0x34(%rsp),%eax
  cmp    %eax,-0x4(%rdi)
  je     L363
  movslq %r15d,%rax
  mov    0x70(%rsp,%rax,8),%rdx
L127:
  mov    -0x4(%rdx),%eax
  add    $0x1,%eax
  cmp    -0x8(%rdx),%eax
  jl     L101
L477:
  movslq %r15d,%rax
  lea    0x70(%rsp,%rax,8),%rdi
  mov    $0x8,%edx
  mov    $0x1,%esi
  call   <stbiw__sbgrowf@plt>
L101:
  movslq %r15d,%r15
  mov    0x70(%rsp,%r15,8),%rdx
  mov    -0x4(%rdx),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x4(%rdx)
  cltq
  mov    0x18(%rsp),%rsi
  mov    %rsi,(%rdx,%rax,8)
  test   %r14,%r14
  jne    L77
L199:
  mov    0x18(%rsp),%rax
  movzbl (%rax),%eax
  cmp    $0x8f,%al
  jbe    L323
  movzbl %al,%eax
  lea    0x100(%rax),%edi
  mov    $0x9,%esi
  call   <stbiw__zlib_bitrev@plt>
  mov    0x64(%rsp),%ecx
  shl    %cl,%eax
  or     %eax,0x60(%rsp)
  add    $0x9,%ecx
  mov    %ecx,0x64(%rsp)
  lea    0x64(%rsp),%rdx
  lea    0x60(%rsp),%rsi
  mov    0x68(%rsp),%rdi
  call   <stbiw__zlib_flushf@plt>
  jmp    L156
L672:
  mov    %r14,%rdi
  mov    $0x0,%r14d
  movl   $0x3,0x20(%rsp)
  jmp    L281
L363:
  mov    0x40(%rsp),%rax
  lea    (%rdi,%rax,1),%rsi
  mov    0x3c(%rsp),%edx
  call   <memcpy@plt>
  movslq %r15d,%rax
  mov    0x70(%rsp,%rax,8),%rdx
  mov    0x38(%rsp),%ecx
  mov    %ecx,-0x4(%rdx)
  mov    0x70(%rsp,%rax,8),%rdx
  test   %rdx,%rdx
  jne    L127
  jmp    L477
L12:
  movl   $0x3,0x20(%rsp)
  jmp    L477
L77:
  mov    0x8(%rsp),%rax
  mov    0x28(%rsp),%rsi
  lea    0x1(%rax,%rsi,1),%r15
  mov    %r15,%rdi
  call   <stbiw__zhash@plt>
  and    $0x3fff,%eax
  mov    0x70(%rsp,%rax,8),%rax
  test   %rax,%rax
  je     L591
  mov    -0x4(%rax),%edx
  test   %edx,%edx
  jle    L591
  mov    %rax,%rbx
  lea    -0x1(%rdx),%edx
  lea    0x8(%rax,%rdx,8),%r12
  mov    0x14(%rsp),%eax
  lea    -0x7fff(%rax),%ebp
  movslq %ebp,%rbp
  mov    0x24(%rsp),%r13d
  sub    %eax,%r13d
  sub    $0x1,%r13d
  mov    %r14,0x28(%rsp)
  mov    0x20(%rsp),%r14d
  jmp    L59
L505:
  add    $0x8,%rbx
  cmp    %r12,%rbx
  je     L547
L59:
  mov    (%rbx),%rdi
  mov    %rdi,%rax
  sub    0x8(%rsp),%rax
  cmp    %rbp,%rax
  jle    L505
  mov    %r13d,%edx
  mov    %r15,%rsi
  call   <stbiw__zlib_countm@plt>
  cmp    %eax,%r14d
  jge    L505
  jmp    L199
L547:
  mov    0x28(%rsp),%r14
L591:
  mov    0x18(%rsp),%r12
  sub    %r14,%r12
  mov    %r12d,%ebp
  cmp    $0x7fff,%r12d
  setle  %al
  mov    0x20(%rsp),%ebx
  cmp    $0x102,%ebx
  setle  %dil
  movzbl %dil,%edi
  and    %eax,%edi
  call   <assert@plt>
  lea    D19(%rip),%rax
  mov    $0x0,%edi
  mov    %ebx,%ecx
L552:
  mov    %edi,%ebx
  add    $0x1,%edi
  movzwl (%rax),%edx
  add    $0x2,%rax
  cmp    %ecx,%edx
  jle    L552
  cmp    $0xffffff8f,%ebx
  jl     L192
  cmp    $0xffffffff,%ebx
  jl     L567
  cmp    $0x16,%ebx
  jg     L587
  mov    $0x7,%esi
  call   <stbiw__zlib_bitrev@plt>
  mov    0x64(%rsp),%ecx
  shl    %cl,%eax
  or     %eax,0x60(%rsp)
  add    $0x7,%ecx
  mov    %ecx,0x64(%rsp)
  lea    0x64(%rsp),%rdx
  lea    0x60(%rsp),%rsi
  mov    0x68(%rsp),%rdi
  call   <stbiw__zlib_flushf@plt>
  mov    %rax,%rdi
  jmp    L249
L192:
  lea    0x131(%rbx),%edi
  mov    $0x8,%esi
  call   <stbiw__zlib_bitrev@plt>
  mov    0x64(%rsp),%ecx
  shl    %cl,%eax
  or     %eax,0x60(%rsp)
  add    $0x8,%ecx
  mov    %ecx,0x64(%rsp)
  lea    0x64(%rsp),%rdx
  lea    0x60(%rsp),%rsi
  mov    0x68(%rsp),%rdi
  call   <stbiw__zlib_flushf@plt>
  mov    %rax,%rdi
L249:
  mov    %rdi,0x68(%rsp)
  movslq %ebx,%rax
  lea    D16(%rip),%rsi
  movzbl (%rsi,%rax,1),%eax
  test   %al,%al
  jne    L636
L489:
  mov    $0x0,%eax
L668:
  mov    %eax,%ebx
  lea    D45(%rip),%rsi
  movzwl (%rsi,%rax,2),%edx
  add    $0x1,%rax
  cmp    %ebp,%edx
  jle    L668
  mov    $0x5,%esi
  mov    %ebx,%edi
  call   <stbiw__zlib_bitrev@plt>
  mov    0x64(%rsp),%ecx
  shl    %cl,%eax
  or     %eax,0x60(%rsp)
  add    $0x5,%ecx
  mov    %ecx,0x64(%rsp)
  lea    0x64(%rsp),%rdx
  lea    0x60(%rsp),%rsi
  mov    0x68(%rsp),%rdi
  call   <stbiw__zlib_flushf@plt>
  mov    %rax,%rdi
  mov    %rax,0x68(%rsp)
  movslq %ebx,%rax
  lea    D20(%rip),%rsi
  movzbl (%rsi,%rax,1),%eax
  test   %al,%al
  jne    L146
L645:
  mov    0x20(%rsp),%esi
  add    %esi,0x14(%rsp)
  jmp    L351
L567:
  lea    0x201(%rbx),%edi
  mov    $0x9,%esi
  call   <stbiw__zlib_bitrev@plt>
  mov    0x64(%rsp),%ecx
  shl    %cl,%eax
  or     %eax,0x60(%rsp)
  add    $0x9,%ecx
  mov    %ecx,0x64(%rsp)
  lea    0x64(%rsp),%rdx
  lea    0x60(%rsp),%rsi
  mov    0x68(%rsp),%rdi
  call   <stbiw__zlib_flushf@plt>
  mov    %rax,%rdi
  jmp    L249
L587:
  lea    0xa9(%rbx),%edi
  mov    $0x8,%esi
  call   <stbiw__zlib_bitrev@plt>
  mov    0x64(%rsp),%ecx
  shl    %cl,%eax
  or     %eax,0x60(%rsp)
  add    $0x8,%ecx
  mov    %ecx,0x64(%rsp)
  lea    0x64(%rsp),%rdx
  lea    0x60(%rsp),%rsi
  mov    0x68(%rsp),%rdi
  call   <stbiw__zlib_flushf@plt>
  mov    %rax,%rdi
  jmp    L249
L636:
  mov    0x64(%rsp),%ecx
  movslq %ebx,%rbx
  lea    D58(%rip),%rdx
  movzwl (%rdx,%rbx,2),%esi
  mov    0x20(%rsp),%edx
  sub    %esi,%edx
  shl    %cl,%edx
  or     %edx,0x60(%rsp)
  movzbl %al,%eax
  add    %ecx,%eax
  mov    %eax,0x64(%rsp)
  lea    0x64(%rsp),%rdx
  lea    0x60(%rsp),%rsi
  call   <stbiw__zlib_flushf@plt>
  mov    %rax,0x68(%rsp)
  jmp    L489
L146:
  mov    0x64(%rsp),%ecx
  movslq %ebx,%rbx
  lea    D44(%rip),%rsi
  movzwl (%rsi,%rbx,2),%esi
  mov    %r12d,%edx
  sub    %esi,%edx
  shl    %cl,%edx
  or     %edx,0x60(%rsp)
  movzbl %al,%eax
  add    %ecx,%eax
  mov    %eax,0x64(%rsp)
  lea    0x64(%rsp),%rdx
  lea    0x60(%rsp),%rsi
  call   <stbiw__zlib_flushf@plt>
  mov    %rax,0x68(%rsp)
  jmp    L645
L323:
  movzbl %al,%eax
  lea    0x30(%rax),%edi
  mov    $0x8,%esi
  call   <stbiw__zlib_bitrev@plt>
  mov    0x64(%rsp),%ecx
  shl    %cl,%eax
  or     %eax,0x60(%rsp)
  add    $0x8,%ecx
  mov    %ecx,0x64(%rsp)
  lea    0x64(%rsp),%rdx
  lea    0x60(%rsp),%rsi
  mov    0x68(%rsp),%rdi
  call   <stbiw__zlib_flushf@plt>
L156:
  mov    %rax,0x68(%rsp)
  addl   $0x1,0x14(%rsp)
L351:
  mov    0x30(%rsp),%ecx
  cmp    %ecx,0x14(%rsp)
  jge    L289
L434:
  mov    0x14(%rsp),%ebp
  movslq %ebp,%rax
  mov    %rax,%rsi
  mov    %rax,0x28(%rsp)
  mov    0x8(%rsp),%rax
  add    %rsi,%rax
  mov    %rax,0x18(%rsp)
  mov    %rax,%rdi
  call   <stbiw__zhash@plt>
  mov    %eax,%r15d
  and    $0x3fff,%r15d
  and    $0x3fff,%eax
  mov    0x70(%rsp,%rax,8),%r14
  test   %r14,%r14
  je     L12
  mov    -0x4(%r14),%eax
  test   %eax,%eax
  jle    L672
  mov    %r14,%rbx
  lea    -0x1(%rax),%eax
  lea    0x8(%r14,%rax,8),%r13
  mov    $0x0,%r14d
  movl   $0x3,0x20(%rsp)
  sub    $0x8000,%ebp
  movslq %ebp,%rbp
  jmp    L502
L289:
  mov    0x50(%rsp),%r12
  mov    0x58(%rsp),%r14
  mov    0x8(%rsp),%r15
L135:
  mov    0x24(%rsp),%ecx
  mov    0x14(%rsp),%esi
  cmp    %esi,%ecx
  jle    L299
  movslq %esi,%rax
  lea    (%r15,%rax,1),%rbx
  lea    0x1(%r15,%rax,1),%rbp
  lea    -0x1(%rcx),%eax
  sub    %esi,%eax
  add    %rax,%rbp
  lea    0x64(%rsp),%r13
  jmp    L453
L414:
  movl   $0x0,0x14(%rsp)
  jmp    L135
L499:
  movzbl %al,%eax
  lea    0x100(%rax),%edi
  mov    $0x9,%esi
  call   <stbiw__zlib_bitrev@plt>
  mov    0x64(%rsp),%ecx
  shl    %cl,%eax
  or     %eax,0x60(%rsp)
  add    $0x9,%ecx
  mov    %ecx,0x64(%rsp)
  lea    0x60(%rsp),%rsi
  mov    %r13,%rdx
  mov    0x68(%rsp),%rdi
  call   <stbiw__zlib_flushf@plt>
L148:
  mov    %rax,0x68(%rsp)
  add    $0x1,%rbx
  cmp    %rbp,%rbx
  je     L299
L453:
  movzbl (%rbx),%eax
  cmp    $0x8f,%al
  ja     L499
  movzbl %al,%eax
  lea    0x30(%rax),%edi
  mov    $0x8,%esi
  call   <stbiw__zlib_bitrev@plt>
  mov    0x64(%rsp),%ecx
  shl    %cl,%eax
  or     %eax,0x60(%rsp)
  add    $0x8,%ecx
  mov    %ecx,0x64(%rsp)
  lea    0x60(%rsp),%rsi
  mov    %r13,%rdx
  mov    0x68(%rsp),%rdi
  call   <stbiw__zlib_flushf@plt>
  jmp    L148
L299:
  mov    $0x7,%esi
  mov    $0x0,%edi
  call   <stbiw__zlib_bitrev@plt>
  mov    0x64(%rsp),%ecx
  shl    %cl,%eax
  or     %eax,0x60(%rsp)
  add    $0x7,%ecx
  mov    %ecx,0x64(%rsp)
  lea    0x64(%rsp),%rdx
  lea    0x60(%rsp),%rsi
  mov    0x68(%rsp),%rdi
  call   <stbiw__zlib_flushf@plt>
  mov    %rax,0x68(%rsp)
  mov    0x64(%rsp),%eax
  test   %eax,%eax
  je     L1
  lea    0x64(%rsp),%rbx
L571:
  add    $0x1,%eax
  mov    %eax,0x64(%rsp)
  lea    0x60(%rsp),%rsi
  mov    %rbx,%rdx
  mov    0x68(%rsp),%rdi
  call   <stbiw__zlib_flushf@plt>
  mov    %rax,0x68(%rsp)
  mov    0x64(%rsp),%eax
  test   %eax,%eax
  jne    L571
  jmp    L1
L105:
  sub    $0x8,%rdi
  call   <free@plt>
L320:
  add    $0x8,%r12
  cmp    %r14,%r12
  je     L187
L1:
  mov    (%r12),%rdi
  test   %rdi,%rdi
  jne    L105
  jmp    L320
L187:
  mov    0x24(%rsp),%ecx
  movslq %ecx,%rsi
  imul   $0x5e6ea9af,%rsi,%rsi
  sar    $0x2b,%rsi
  mov    %ecx,%eax
  sar    $0x1f,%eax
  sub    %eax,%esi
  imul   $0x15b0,%esi,%eax
  mov    %ecx,%esi
  sub    %eax,%esi
  mov    $0x0,%edi
  mov    $0x0,%ebp
  mov    $0x1,%ebx
  mov    $0x80078071,%r8d
  mov    $0x15b0,%r9d
  mov    0x24(%rsp),%r10d
  test   %ecx,%ecx
  jg     L270
L657:
  mov    0x68(%rsp),%rax
  test   %rax,%rax
  je     L306
  mov    -0x4(%rax),%ecx
  lea    0x1(%rcx),%edx
  cmp    -0x8(%rax),%edx
  jl     L569
L306:
  lea    0x68(%rsp),%rdi
  mov    $0x1,%edx
  mov    $0x1,%esi
  call   <stbiw__sbgrowf@plt>
L569:
  mov    0x68(%rsp),%rdx
  mov    -0x4(%rdx),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x4(%rdx)
  cltq
  mov    %ebp,%ecx
  movzbl %ch,%ecx
  mov    %cl,(%rdx,%rax,1)
  mov    0x68(%rsp),%rax
  test   %rax,%rax
  je     L484
  mov    -0x4(%rax),%esi
  lea    0x1(%rsi),%edx
  cmp    -0x8(%rax),%edx
  jl     L635
L484:
  lea    0x68(%rsp),%rdi
  mov    $0x1,%edx
  mov    $0x1,%esi
  call   <stbiw__sbgrowf@plt>
L635:
  mov    0x68(%rsp),%rdx
  mov    -0x4(%rdx),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x4(%rdx)
  cltq
  mov    %bpl,(%rdx,%rax,1)
  mov    0x68(%rsp),%rax
  test   %rax,%rax
  je     L530
  mov    -0x4(%rax),%ecx
  lea    0x1(%rcx),%edx
  cmp    -0x8(%rax),%edx
  jl     L562
L530:
  lea    0x68(%rsp),%rdi
  mov    $0x1,%edx
  mov    $0x1,%esi
  call   <stbiw__sbgrowf@plt>
L562:
  mov    0x68(%rsp),%rdx
  mov    -0x4(%rdx),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x4(%rdx)
  cltq
  movzbl %bh,%ecx
  mov    %cl,(%rdx,%rax,1)
  mov    0x68(%rsp),%rax
  test   %rax,%rax
  je     L431
  mov    -0x4(%rax),%esi
  lea    0x1(%rsi),%edx
  cmp    -0x8(%rax),%edx
  jl     L110
L431:
  lea    0x68(%rsp),%rdi
  mov    $0x1,%edx
  mov    $0x1,%esi
  call   <stbiw__sbgrowf@plt>
L110:
  mov    0x68(%rsp),%rdx
  mov    -0x4(%rdx),%eax
  lea    0x1(%rax),%ecx
  mov    %ecx,-0x4(%rdx)
  cltq
  mov    %bl,(%rdx,%rax,1)
  mov    0x68(%rsp),%rsi
  mov    -0x4(%rsi),%edx
  mov    0x48(%rsp),%rax
  mov    %edx,(%rax)
  lea    -0x8(%rsi),%rdi
  call   <memmove@plt>
  mov    0x68(%rsp),%rax
  sub    $0x8,%rax
  mov    0x20078(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L184
  add    $0x20088,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L375:
  mov    %eax,%edx
  movzbl (%r15,%rdx,1),%edx
  add    %edx,%ebx
  add    %ebx,%ebp
  add    $0x1,%eax
  cmp    %ecx,%eax
  jne    L375
L643:
  mov    %ebx,%eax
  imul   %r8,%rax
  shr    $0x2f,%rax
  imul   $0xfff1,%eax,%eax
  sub    %eax,%ebx
  mov    %ebp,%eax
  imul   %r8,%rax
  shr    $0x2f,%rax
  imul   $0xfff1,%eax,%eax
  sub    %eax,%ebp
  lea    (%rdi,%rsi,1),%eax
  mov    %eax,%edi
  mov    %r9d,%esi
  cmp    %eax,%r10d
  jle    L657
L270:
  mov    %edi,%eax
  lea    (%rdi,%rsi,1),%ecx
  test   %esi,%esi
  jne    L375
  jmp    L643
L184:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D19
type: string
name: parse_data
arguments: label: D16
type: string
name: parse_data
arguments: label: D45
type: string
name: parse_data
arguments: label: D20
type: string
name: parse_data
arguments: label: D58
type: string
name: parse_data
arguments: label: D44
type: string

tool: D19: 

tool: 

tool: D45: 

tool: 

tool: D58: 

tool: D44: 

assistant: ```c
unsigned char *stbi_zlib_compress(unsigned char *data, int data_len, int *out_len, int quality) {
  static unsigned short lengthc[] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 259};
  static unsigned char lengtheb[] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0};
  static unsigned short distc[] = {1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 32768};
  static unsigned char disteb[] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13};
  unsigned int bitbuf = 0;
  int i, j, bitcount = 0;
  unsigned char *out = NULL;
  unsigned char **hash_table[16384];
  if (quality < 5)
    quality = 5;
  ((((out) == 0 || ((int *)(out)-2)[1] + (1) >= ((int *)(out)-2)[0]) ? stbiw__sbgrowf((void **)&(out), (1), sizeof(*(out))) : 0), (out)[((int *)(out)-2)[1]++] = (0x78));
  ((((out) == 0 || ((int *)(out)-2)[1] + (1) >= ((int *)(out)-2)[0]) ? stbiw__sbgrowf((void **)&(out), (1), sizeof(*(out))) : 0), (out)[((int *)(out)-2)[1]++] = (0x5e));
  (bitbuf |= (1) << bitcount, bitcount += (1), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount)));
  (bitbuf |= (1) << bitcount, bitcount += (2), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount)));
  for (i = 0; i < 16384; ++i)
    hash_table[i] = NULL;
  i = 0;
  while (i < data_len - 3) {
    int h = stbiw__zhash(data + i) & (16384 - 1), best = 3;
    unsigned char *bestloc = 0;
    unsigned char **hlist = hash_table[h];
    int n = ((hlist) ? ((int *)(hlist)-2)[1] : 0);
    for (j = 0; j < n; ++j) {
      if (hlist[j] - data > i - 32768) {
        int d = stbiw__zlib_countm(hlist[j], data + i, data_len - i);
        if (d >= best)
          best = d, bestloc = hlist[j];
      }
    }
    if (hash_table[h] && ((int *)(hash_table[h]) - 2)[1] == 2 * quality) {
      memcpy(hash_table[h], hash_table[h] + quality, sizeof(hash_table[h][0]) * quality);
      ((int *)(hash_table[h]) - 2)[1] = quality;
    }
    ((((hash_table[h]) == 0 || ((int *)(hash_table[h]) - 2)[1] + (1) >= ((int *)(hash_table[h]) - 2)[0]) ? stbiw__sbgrowf((void **)&(hash_table[h]), (1), sizeof(*(hash_table[h]))) : 0), (hash_table[h])[((int *)(hash_table[h]) - 2)[1]++] = (data + i));
    if (bestloc) {
      h = stbiw__zhash(data + i + 1) & (16384 - 1);
      hlist = hash_table[h];
      n = ((hlist) ? ((int *)(hlist)-2)[1] : 0);
      for (j = 0; j < n; ++j) {
        if (hlist[j] - data > i - 32767) {
          int e = stbiw__zlib_countm(hlist[j], data + i + 1, data_len - i - 1);
          if (e > best) {
            bestloc = NULL;
            break;
          }
        }
      }
    }
    if (bestloc) {
      int d = (int)(data + i - bestloc);
      assert(d <= 32767 && best <= 258);
      for (j = 0; best > lengthc[j + 1] - 1; ++j)
        ;
      ((j + 257) <= 143 ? (bitbuf |= (stbiw__zlib_bitrev(0x30 + (j + 257), 8)) << bitcount, bitcount += (8), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))) : (j + 257) <= 255 ? (bitbuf |= (stbiw__zlib_bitrev(0x190 + (j + 257) - 144, 9)) << bitcount, bitcount += (9), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))) : (j + 257) <= 279 ? (bitbuf |= (stbiw__zlib_bitrev(0 + (j + 257) - 256, 7)) << bitcount, bitcount += (7), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))) : (bitbuf |= (stbiw__zlib_bitrev(0xc0 + (j + 257) - 280, 8)) << bitcount, bitcount += (8), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))));
      if (lengtheb[j])
        (bitbuf |= (best - lengthc[j]) << bitcount, bitcount += (lengtheb[j]), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount)));
      for (j = 0; d > distc[j + 1] - 1; ++j)
        ;
      (bitbuf |= (stbiw__zlib_bitrev(j, 5)) << bitcount, bitcount += (5), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount)));
      if (disteb[j])
        (bitbuf |= (d - distc[j]) << bitcount, bitcount += (disteb[j]), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount)));
      i += best;
    } else {
      ((data[i]) <= 143 ? (bitbuf |= (stbiw__zlib_bitrev(0x30 + (data[i]), 8)) << bitcount, bitcount += (8), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))) : (bitbuf |= (stbiw__zlib_bitrev(0x190 + (data[i]) - 144, 9)) << bitcount, bitcount += (9), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))));
      ++i;
    }
  }
  for (; i < data_len; ++i)
    ((data[i]) <= 143 ? (bitbuf |= (stbiw__zlib_bitrev(0x30 + (data[i]), 8)) << bitcount, bitcount += (8), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))) : (bitbuf |= (stbiw__zlib_bitrev(0x190 + (data[i]) - 144, 9)) << bitcount, bitcount += (9), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))));
  ((256) <= 143 ? (bitbuf |= (stbiw__zlib_bitrev(0x30 + (256), 8)) << bitcount, bitcount += (8), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))) : (256) <= 255 ? (bitbuf |= (stbiw__zlib_bitrev(0x190 + (256) - 144, 9)) << bitcount, bitcount += (9), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))) : (256) <= 279 ? (bitbuf |= (stbiw__zlib_bitrev(0 + (256) - 256, 7)) << bitcount, bitcount += (7), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))) : (bitbuf |= (stbiw__zlib_bitrev(0xc0 + (256) - 280, 8)) << bitcount, bitcount += (8), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount))));
  while (bitcount)
    (bitbuf |= (0) << bitcount, bitcount += (1), (out = stbiw__zlib_flushf(out, &bitbuf, &bitcount)));
  for (i = 0; i < 16384; ++i)
    (void)((hash_table[i]) ? free(((int *)(hash_table[i]) - 2)), 0 : 0);
  {
    unsigned int i = 0, s1 = 1, s2 = 0, blocklen = data_len % 5552;
    int j = 0;
    while (j < data_len) {
      for (i = 0; i < blocklen; ++i)
        s1 += data[j + i], s2 += s1;
      s1 %= 65521, s2 %= 65521;
      j += blocklen;
      blocklen = 5552;
    }
    ((((out) == 0 || ((int *)(out)-2)[1] + (1) >= ((int *)(out)-2)[0]) ? stbiw__sbgrowf((void **)&(out), (1), sizeof(*(out))) : 0), (out)[((int *)(out)-2)[1]++] = ((unsigned char)(s2 >> 8)));
    ((((out) == 0 || ((int *)(out)-2)[1] + (1) >= ((int *)(out)-2)[0]) ? stbiw__sbgrowf((void **)&(out), (1), sizeof(*(out))) : 0), (out)[((int *)(out)-2)[1]++] = ((unsigned char)s2));
    ((((out) == 0 || ((int *)(out)-2)[1] + (1) >= ((int *)(out)-2)[0]) ? stbiw__sbgrowf((void **)&(out), (1), sizeof(*(out))) : 0), (out)[((int *)(out)-2)[1]++] = ((unsigned char)(s1 >> 8)));
    ((((out) == 0 || ((int *)(out)-2)[1] + (1) >= ((int *)(out)-2)[0]) ? stbiw__sbgrowf((void **)&(out), (1), sizeof(*(out))) : 0), (out)[((int *)(out)-2)[1]++] = ((unsigned char)s1));
  }
  *out_len = ((int *)(out)-2)[1];
  memmove(((int *)(out)-2), out, *out_len);
  return (unsigned char *)((int *)(out)-2);
}
```