user: What is the c source code of the assembly code below?

```asm
<mmini_lzl_decompress>:
  endbr64
  mov    %rsi,%r9
  test   %rsi,%rsi
  je     L349
  mov    %rdx,%rsi
  mov    %rcx,%r11
  xor    %eax,%eax
  xor    %r8d,%r8d
L180:
  movzbl (%rdi,%rax,1),%edx
  cmp    $0x3,%dl
  ja     L220
  lea    0x1(%rax),%r10
  cmp    %r10,%r9
  jbe    L349
  movzbl 0x1(%rdi,%rax,1),%ecx
  cmp    $0x3,%cl
  ja     L77
  cmp    %r8,%r11
  jbe    L349
  mov    %cl,(%rsi,%r8,1)
  mov    %r10,%rax
  add    $0x1,%r8
  jmp    L345
L220:
  cmp    %r8,%r11
  jbe    L349
  mov    %dl,(%rsi,%r8,1)
  add    $0x1,%r8
L345:
  add    $0x1,%rax
  cmp    %rax,%r9
  ja     L180
L352:
  mov    %r8,%rax
  ret
L77:
  add    $0x2,%rax
  cmp    %rax,%r9
  jbe    L349
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  nopl   0x0(%rax)
L102:
  mov    %rcx,%r10
  shr    %rcx
  movzbl (%rdi,%rax,1),%ebx
  shl    $0x8,%r10
  and    $0x7c,%ecx
  and    $0x700,%r10d
  or     %rcx,%rdx
  or     %rbx,%r10
  lea    (%rdx,%r8,1),%r12
  mov    %r8,%rbx
  sub    %r10,%rbx
  cmp    %r11,%r12
  ja     L257
  lea    (%rbx,%rdx,1),%rbp
  cmp    %rbp,%rbx
  jae    L154
  lea    -0x1(%r10),%r13
  lea    -0x1(%rdx),%rcx
  cmp    $0xe,%r13
  jbe    L146
  cmp    $0x6,%rcx
  jbe    L146
  cmp    $0xe,%rcx
  jbe    L301
  mov    %rdx,%r10
  lea    (%rsi,%rbx,1),%r14
  lea    (%rsi,%r8,1),%r13
  xor    %ecx,%ecx
  and    $0xf0,%r10d
L73:
  movdqu (%r14,%rcx,1),%xmm0
  movups %xmm0,0x0(%r13,%rcx,1)
  add    $0x10,%rcx
  cmp    %r10,%rcx
  jne    L73
  mov    %rdx,%r10
  and    $0xfffffffffffffff0,%r10
  lea    (%r8,%r10,1),%r13
  lea    (%rbx,%r10,1),%rcx
  cmp    %r10,%rdx
  je     L332
  sub    %r10,%rdx
  lea    -0x1(%rdx),%rbx
  cmp    $0x6,%rbx
  jbe    L209
L31:
  mov    (%r14,%r10,1),%rbx
  add    %rsi,%r10
  mov    %rbx,(%r10,%r8,1)
  mov    %rdx,%r8
  and    $0xfffffffffffffff8,%r8
  add    %r8,%r13
  add    %r8,%rcx
  cmp    %r8,%rdx
  je     L332
L209:
  movzbl (%rsi,%rcx,1),%edx
  mov    %dl,(%rsi,%r13,1)
  lea    0x1(%rcx),%rdx
  cmp    %rdx,%rbp
  jbe    L332
  movzbl 0x1(%rsi,%rcx,1),%edx
  mov    %dl,0x1(%rsi,%r13,1)
  lea    0x2(%rcx),%rdx
  cmp    %rdx,%rbp
  jbe    L332
  movzbl 0x2(%rsi,%rcx,1),%edx
  mov    %dl,0x2(%rsi,%r13,1)
  lea    0x3(%rcx),%rdx
  cmp    %rdx,%rbp
  jbe    L332
  movzbl 0x3(%rsi,%rcx,1),%edx
  mov    %dl,0x3(%rsi,%r13,1)
  lea    0x4(%rcx),%rdx
  cmp    %rdx,%rbp
  jbe    L332
  movzbl 0x4(%rsi,%rcx,1),%edx
  mov    %dl,0x4(%rsi,%r13,1)
  lea    0x5(%rcx),%rdx
  cmp    %rdx,%rbp
  jbe    L332
  movzbl 0x5(%rsi,%rcx,1),%edx
  mov    %dl,0x5(%rsi,%r13,1)
  lea    0x6(%rcx),%rdx
  cmp    %rdx,%rbp
  jbe    L332
  movzbl 0x6(%rsi,%rcx,1),%edx
  mov    %dl,0x6(%rsi,%r13,1)
L332:
  mov    %r12,%r8
  nopl   0x0(%rax)
L154:
  add    $0x1,%rax
  cmp    %rax,%r9
  jbe    L280
L3:
  movzbl (%rdi,%rax,1),%edx
  cmp    $0x3,%dl
  ja     L367
  lea    0x1(%rax),%r10
  cmp    %r10,%r9
  jbe    L257
  movzbl 0x1(%rdi,%rax,1),%ecx
  cmp    $0x3,%cl
  ja     L261
  cmp    %r8,%r11
  jbe    L257
  mov    %r10,%rax
  mov    %cl,(%rsi,%r8,1)
  add    $0x1,%r8
  add    $0x1,%rax
  cmp    %rax,%r9
  ja     L3
L280:
  pop    %rbx
  mov    %r8,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L367:
  cmp    %r8,%r11
  jbe    L257
  mov    %dl,(%rsi,%r8,1)
  add    $0x1,%r8
  jmp    L154
  nopw   0x0(%rax,%rax,1)
L261:
  add    $0x2,%rax
  cmp    %rax,%r9
  ja     L102
L257:
  xor    %r8d,%r8d
  pop    %rbx
  pop    %rbp
  mov    %r8,%rax
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L146:
  lea    (%rsi,%rbx,1),%rdx
  add    %rsi,%rbp
  sub    %r8,%r10
  nopw   0x0(%rax,%rax,1)
L311:
  movzbl (%rdx),%ebx
  lea    (%r10,%rdx,1),%rcx
  add    $0x1,%rdx
  mov    %bl,(%rcx,%r8,1)
  cmp    %rbp,%rdx
  jne    L311
  jmp    L332
L301:
  mov    %rbx,%rcx
  mov    %r8,%r13
  lea    (%rsi,%rbx,1),%r14
  xor    %r10d,%r10d
  jmp    L31
L349:
  xor    %r8d,%r8d
  jmp    L352
```

assistant: ```c
unsigned long mmini_lzl_decompress(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long outlen) {
  unsigned long outptr, i, start, len, end;
  unsigned char tmp;
  outptr = 0;
  i = 0;
  while (i < inlen) {
    if (in[i] <= 0x03) {
      tmp = in[i];
      if (++i >= inlen)
        return 0;
      if (in[i] <= 0x03) {
        if (outptr >= outlen)
          return 0;
        out[outptr++] = in[i];
      } else {
        len = (unsigned long)in[i];
        if (++i >= inlen)
          return 0;
        start = outptr - (((len & 0x07) << 8) | (unsigned long)in[i]);
        len = ((len >> 1) & 0x7c) | (unsigned long)tmp;
        if ((outptr + len) > outlen)
          return 0;
        for (end = start + len; start < end; ++start)
          out[outptr++] = out[start];
      }
    } else {
      if (outptr >= outlen)
        return 0;
      out[outptr++] = in[i];
    }
    ++i;
  }
  return outptr;
}
```