user: Demonstrate the C code that generates the assembly output below:

```asm
<lz_compress>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,%rbx
  mov    %edx,%r12d
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  mov    $0x1d4ec,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  lea    0x1d4ec(%rax),%rdx
L71:
  movl   $0xffffffff,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L71
  lea    0x0(,%r12,4),%edi
  call   <malloc@plt>
  mov    %rax,%r14
  test   %r12d,%r12d
  jle    L102
  mov    %r12d,%edx
  lea    (%rax,%rdx,4),%rdx
L156:
  movl   $0xffffffff,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L156
  mov    $0x0,%eax
  cmp    $0x2,%r12d
  jle    L189
L12:
  lea    -0x3(%r12),%esi
  mov    $0x0,%ecx
L63:
  mov    (%rbx,%rcx,4),%eax
  shl    $0x10,%eax
  mov    0x4(%rbx,%rcx,4),%edx
  shl    $0x8,%edx
  or     %edx,%eax
  or     0x8(%rbx,%rcx,4),%eax
  movslq %eax,%rdx
  imul   $0xffffffff8bc24683,%rdx,%rdx
  shr    $0x20,%rdx
  add    %eax,%edx
  sar    $0xe,%edx
  mov    %eax,%edi
  sar    $0x1f,%edi
  sub    %edi,%edx
  imul   $0x753b,%edx,%edx
  sub    %edx,%eax
  cltq
  lea    0x0(%rbp,%rax,4),%rax
  mov    (%rax),%edx
  mov    %edx,(%r14,%rcx,4)
  mov    %ecx,(%rax)
  mov    %rcx,%rax
  add    $0x1,%rcx
  cmp    %rax,%rsi
  jne    L63
  lea    -0x2(%r12),%eax
  cmp    $0x80000002,%r12d
  jl     L49
L189:
  cltq
L191:
  movl   $0xffffffff,(%r14,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L191
L49:
  mov    %rbp,%rdi
  call   <free@plt>
  lea    0x4(%r12),%edi
  call   <malloc@plt>
  mov    %rax,%rsi
  mov    %rax,0x10(%rsp)
  mov    %r12d,%eax
  sar    $0x18,%eax
  mov    %eax,(%rsi)
  mov    %r12d,%eax
  sar    $0x10,%eax
  mov    %eax,0x4(%rsi)
  mov    %r12d,%eax
  sar    $0x8,%eax
  mov    %eax,0x8(%rsi)
  lea    0x10(%rsi),%r13
  mov    %r12d,0xc(%rsi)
  test   %r12d,%r12d
  jle    L188
  mov    $0x0,%ebp
  lea    0x20(%rsp),%rax
  mov    %rax,0x8(%rsp)
  jmp    L48
L111:
  mov    (%r15),%eax
  mov    %eax,0x0(%r13)
  add    $0x1,%ebp
  lea    0x4(%r13),%r13
L200:
  cmp    %ebp,%r12d
  jle    L188
L48:
  movslq %ebp,%rax
  lea    (%rbx,%rax,4),%r15
  cmpl   $0x7f,(%r15)
  jg     L22
  mov    %ebp,%r8d
  mov    %r14,%rcx
  mov    %r12d,%edx
  mov    %rbx,%rsi
  mov    0x8(%rsp),%rdi
  call   <find_longest_match@plt>
  mov    %eax,0x4(%rsp)
  cmp    $0x2,%eax
  jle    L111
  lea    0x24(%rsp),%rdi
  lea    0x1(%rbp),%r8d
  mov    %r14,%rcx
  mov    %r12d,%edx
  mov    %rbx,%rsi
  call   <find_longest_match@plt>
  cmp    %eax,0x4(%rsp)
  jl     L111
  cmpl   $0x12,0x4(%rsp)
  jle    L99
L144:
  mov    0x4(%rsp),%esi
  lea    -0x4(%rsi),%eax
  cmp    $0x3f,%eax
  ja     L111
  mov    0x20(%rsp),%edx
  cmp    $0xffff,%edx
  jg     L111
  shl    $0x10,%eax
  or     %edx,%eax
  or     $0xc00000,%eax
  movslq %eax,%rdx
  mov    %rdx,%rcx
  shr    $0x10,%rcx
  mov    %ecx,0x0(%r13)
  shr    $0x8,%rdx
  mov    %edx,0x4(%r13)
  mov    %eax,0x8(%r13)
  add    %esi,%ebp
  lea    0xc(%r13),%r13
  jmp    L200
L99:
  mov    0x20(%rsp),%edx
  cmp    $0x3ff,%edx
  jg     L144
  mov    0x4(%rsp),%edi
  lea    -0x3(%rdi),%eax
  shl    $0xa,%eax
  or     %edx,%eax
  or     $0x80,%ah
  movslq %eax,%rdx
  shr    $0x8,%rdx
  mov    %edx,0x0(%r13)
  mov    %eax,0x4(%r13)
  add    %edi,%ebp
  lea    0x8(%r13),%r13
  jmp    L200
L188:
  mov    %r14,%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rax
  mov    0x10(%rsp),%rbx
  mov    %rbx,(%rax)
  mov    %r13,%rax
  sub    %rbx,%rax
  sar    $0x2,%rax
L186:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L5
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L22:
  mov    $0xffffffff,%eax
  jmp    L186
L102:
  cmp    $0x2,%r12d
  jg     L12
  jmp    L49
L5:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int lz_compress(uint8_t **pdst, const uint8_t *src, int src_len) {
  int *hash_table, *hash_next;
  uint32_t h, v;
  int i, dist, len, len1, dist1;
  uint8_t *dst, *q;
  hash_table = malloc(sizeof(hash_table[0]) * 30011);
  for (i = 0; i < 30011; i++)
    hash_table[i] = -1;
  hash_next = malloc(sizeof(hash_next[0]) * src_len);
  for (i = 0; i < src_len; i++)
    hash_next[i] = -1;
  for (i = 0; i < src_len - 3 + 1; i++) {
    h = ((src[i] << 16) | (src[i + 1] << 8) | src[i + 2]) % 30011;
    hash_next[i] = hash_table[h];
    hash_table[h] = i;
  }
  for (; i < src_len; i++) {
    hash_next[i] = -1;
  }
  free(hash_table);
  dst = malloc(src_len + 4);
  q = dst;
  *q++ = src_len >> 24;
  *q++ = src_len >> 16;
  *q++ = src_len >> 8;
  *q++ = src_len >> 0;
  i = 0;
  while (i < src_len) {
    if (src[i] >= 128)
      return -1;
    len = find_longest_match(&dist, src, src_len, hash_next, i);
    if (len >= 3) {
      len1 = find_longest_match(&dist1, src, src_len, hash_next, i + 1);
      if (len1 > len)
        goto no_match;
    }
    if (len < 3) {
    no_match:
      *q++ = src[i];
      i++;
    } else if (len <= (3 + 15) && dist < (1 << 10)) {
      v = 0x8000 | ((len - 3) << 10) | dist;
      *q++ = v >> 8;
      *q++ = v;
      i += len;
    } else if (len >= 4 && len <= (4 + 63) && dist < (1 << 16)) {
      v = 0xc00000 | ((len - 4) << 16) | dist;
      *q++ = v >> 16;
      *q++ = v >> 8;
      *q++ = v;
      i += len;
    } else {
      goto no_match;
    }
  }
  free(hash_next);
  *pdst = dst;
  return q - dst;
}
```