user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<uncompressline>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x18(%rbp),%rcx
  mov    -0x20(%rbp),%rax
  mov    $0x6,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x18(%rbp),%rax
  add    $0x6,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x7,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  lea    0x6(%rax),%rdx
  mov    -0x8(%rbp),%eax
  mov    %eax,%esi
  mov    %rdx,%rdi
  call   <convint@plt>
  movl   $0x0,-0xc(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L3
L39:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  shr    $0x6,%al
  movzbl %al,%eax
  and    $0x3,%eax
  cmp    $0x2,%eax
  je     L20
  cmp    $0x3,%eax
  jne    L16
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x9(%rax),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  sub    $0xc000,%eax
  mov    %eax,-0x8(%rbp)
  shll   $0x2,-0x8(%rbp)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  mov    %eax,%esi
  mov    %rdx,%rdi
  call   <convint@plt>
  addl   $0x2,-0xc(%rbp)
  jmp    L67
L20:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x9(%rax),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  sub    $0x8000,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x1fff,-0x4(%rbp)
  jle    L51
  subl   $0x4000,-0x4(%rbp)
L51:
  mov    -0x4(%rbp),%eax
  add    %eax,-0x8(%rbp)
  cmpl   $0xffff,-0x8(%rbp)
  jle    L68
  subl   $0x10000,-0x8(%rbp)
L68:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  mov    %eax,%esi
  mov    %rdx,%rdi
  call   <convint@plt>
  addl   $0x2,-0xc(%rbp)
  jmp    L67
L16:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x3f,-0x4(%rbp)
  jle    L72
  addl   $0xffffff80,-0x4(%rbp)
L72:
  mov    -0x4(%rbp),%eax
  add    %eax,-0x8(%rbp)
  cmpl   $0xffff,-0x8(%rbp)
  jle    L94
  subl   $0x10000,-0x8(%rbp)
L94:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  mov    %eax,%esi
  mov    %rdx,%rdi
  call   <convint@plt>
  addl   $0x1,-0xc(%rbp)
  nop
L67:
  addl   $0x2,-0x10(%rbp)
L3:
  cmpl   $0x1f3,-0x10(%rbp)
  jle    L39
  nop
  nop
  leave
  ret
```

assistant: ```c
void uncompressline(unsigned char *raw, unsigned char *buf) {
  int n, m;
  int base, delta;
  memcpy(buf, raw, 6);
  base = raw[6] * 0x0100 + raw[7];
  convint(&buf[6], base);
  m = 0;
  for (n = 0; n < 500; n += 2) {
    switch ((raw[m + 8] >> 6) & 3) {
    case 3:
      base = (raw[m + 8] * 0x0100 + raw[m + 9]) - 0xc000;
      base *= 4;
      convint(&buf[n + 8], base);
      m += 2;
      break;
    case 2:
      delta = (raw[m + 8] * 0x0100 + raw[m + 9]) - 0x8000;
      if (delta > 8191)
        delta -= 16384;
      base += delta;
      if (base > 65535)
        base -= 65536;
      convint(&buf[n + 8], base);
      m += 2;
      break;
    default:
      delta = raw[m + 8];
      if (delta > 63)
        delta -= 128;
      base += delta;
      if (base > 65535)
        base -= 65536;
      convint(&buf[n + 8], base);
      m += 1;
      break;
    }
  }
}
```