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

```asm
<mmini_lzl_compress>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  lea    (%rdx,%rcx,1),%r12
  push   %rbp
  lea    (%rdi,%rsi,1),%rbp
  push   %rbx
  cmp    %rbp,%rdi
  je     L64
  mov    %rdx,%r14
  mov    %rdx,%r10
  mov    %rdi,%rbx
  mov    %rdi,%rsi
  mov    %rdi,%rdx
  mov    $0x3,%r8d
  xor    %r9d,%r9d
  xor    %r11d,%r11d
  mov    $0x7ff,%r13d
L167:
  mov    %rbp,%r15
  mov    $0x7f,%eax
  movzbl (%rsi),%edi
  sub    %rsi,%r15
  cmp    %rax,%r15
  cmova  %rax,%r15
  cmp    %rsi,%rdx
  je     L176
  movzbl (%rdx),%ecx
  nopl   0x0(%rax)
L47:
  xor    %eax,%eax
  cmp    %dil,%cl
  je     L62
  jmp    L92
  nopl   0x0(%rax)
L115:
  cmp    %rax,%r15
  je     L134
L62:
  add    $0x1,%rax
  movzbl (%rsi,%rax,1),%ecx
  cmp    %cl,(%rdx,%rax,1)
  je     L115
  cmp    %r8,%rax
  jbe    L92
  mov    %rdx,%r9
  cmp    %rax,%r15
  je     L65
  mov    %rax,%r8
  nopw   0x0(%rax,%rax,1)
L92:
  movzbl 0x1(%rdx),%ecx
  add    $0x1,%rdx
  cmp    %dil,%cl
  jne    L92
  cmp    %rsi,%rdx
  jne    L47
  cmp    $0x3,%r8
  jbe    L176
L207:
  mov    %rsi,%rcx
  lea    0x3(%r10),%rdx
  sub    %r9,%rcx
  cmp    %rdx,%r12
  jb     L64
  mov    %r8d,%eax
  mov    %rcx,%rdi
  add    %r8,%rsi
  mov    %cl,0x2(%r10)
  and    $0x3,%eax
  shr    $0x8,%rdi
  xor    %r11d,%r11d
  mov    %al,(%r10)
  lea    (%r8,%r8,1),%eax
  mov    $0x3,%r8d
  and    $0xfffffff8,%eax
  or     %edi,%eax
  mov    %al,0x1(%r10)
  mov    %rdx,%r10
  cmp    %rsi,%rbp
  je     L103
L8:
  mov    %r11d,%ecx
  mov    %r13d,%eax
  mov    %rsi,%rdx
  shr    $0x4,%ecx
  sar    %cl,%eax
  mov    %rsi,%rcx
  cltq
  sub    %rbx,%rcx
  sub    %rax,%rdx
  cmp    %rax,%rcx
  cmovbe %rbx,%rdx
  jmp    L167
  nopl   0x0(%rax)
L134:
  cmp    %r8,%r15
  jbe    L92
  mov    %rdx,%r9
L65:
  mov    %r15,%r8
  cmp    $0x3,%r8
  ja     L207
L176:
  cmp    $0x3,%dil
  ja     L119
  cmp    %r10,%r12
  je     L64
  lea    0x1(%r10),%rax
  mov    %dil,(%r10)
  cmp    %r12,%rax
  je     L64
L82:
  movzbl (%rsi),%edx
  add    $0x1,%rsi
  cmp    $0x7f,%r11d
  lea    0x1(%rax),%r10
  adc    $0x0,%r11d
  mov    %dl,(%rax)
  cmp    %rsi,%rbp
  jne    L8
L103:
  mov    %r10,%rax
  pop    %rbx
  pop    %rbp
  sub    %r14,%rax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L119:
  mov    %r10,%rax
  cmp    %r12,%rax
  jne    L82
L64:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
unsigned long mmini_lzl_compress(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long outlen) {
  unsigned long best_match_l = 3, match_l, match_max, offset, tmp;
  const unsigned char *scan_i, *best_scan_match_i = (const unsigned char *)0, *i = in, *ieof = (in + inlen);
  unsigned char *o = out, *oeof = (out + outlen);
  unsigned int slack = 0;
  while (i != ieof) {
    tmp = 0x7ff >> (slack >> 4);
    scan_i = (((unsigned long)(i - in)) > tmp) ? (i - tmp) : in;
    tmp = (unsigned long)(ieof - i);
    match_max = (tmp > 0x7f) ? 0x7f : tmp;
    while (scan_i != i) {
      match_l = 0;
      while ((scan_i[match_l] == i[match_l]) && (match_l != match_max))
        ++match_l;
      if (match_l > best_match_l) {
        best_scan_match_i = scan_i;
        best_match_l = match_l;
        if (match_l == match_max)
          break;
      }
      while (*(++scan_i) != *i) {
      }
    }
    if (best_match_l >= 4) {
      offset = (unsigned long)(i - best_scan_match_i);
      if ((o + 3) > oeof)
        return 0;
      *(o++) = (unsigned char)(best_match_l & 0x03);
      *(o++) = (unsigned char)(((best_match_l & 0x7c) << 1) | (offset >> 8));
      *(o++) = (unsigned char)(offset & 0xff);
      i += best_match_l;
      best_match_l = 3;
      slack = 0;
    } else {
      if (*i <= 0x03) {
        if (o == oeof)
          return 0;
        *(o++) = *i;
      }
      if (o == oeof)
        return 0;
      *(o++) = *(i++);
      if (slack < 0x7f)
        ++slack;
    }
  }
  return (unsigned long)(o - out);
}
```