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

```asm
<decompress>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x20(%rbp)
  mov    -0x28(%rbp),%rax
  cmp    -0x60(%rbp),%rax
  jb     L249
  lea    D107(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
L249:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    -0x58(%rbp),%rdx
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x33(%rbp)
  cmpb   $0x54,-0x33(%rbp)
  je     L57
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
L57:
  mov    -0x28(%rbp),%rax
  cmp    -0x60(%rbp),%rax
  jb     L216
  lea    D107(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
L216:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    -0x58(%rbp),%rdx
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x33(%rbp)
  cmpb   $0x49,-0x33(%rbp)
  je     L257
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
L257:
  mov    -0x28(%rbp),%rax
  cmp    -0x60(%rbp),%rax
  jb     L220
  lea    D107(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
L220:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    -0x58(%rbp),%rdx
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x33(%rbp)
  cmpb   $0x4e,-0x33(%rbp)
  je     L194
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
L194:
  mov    -0x28(%rbp),%rax
  cmp    -0x60(%rbp),%rax
  jb     L94
  lea    D107(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
L94:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    -0x58(%rbp),%rdx
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x33(%rbp)
  cmpb   $0x59,-0x33(%rbp)
  je     L29
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
L29:
  mov    -0x28(%rbp),%rax
  cmp    -0x60(%rbp),%rax
  jb     L131
  lea    D107(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
L131:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    -0x58(%rbp),%rdx
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x33(%rbp)
  cmpb   $0xff,-0x33(%rbp)
  je     L177
  mov    -0x20(%rbp),%rax
  cmp    -0x50(%rbp),%rax
  jb     L95
  lea    D78(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
L95:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    -0x48(%rbp),%rdx
  add    %rax,%rdx
  movzbl -0x33(%rbp),%eax
  mov    %al,(%rdx)
  jmp    L29
L177:
  movq   $0x0,-0x18(%rbp)
  movl   $0x0,-0x30(%rbp)
L49:
  mov    -0x28(%rbp),%rax
  cmp    -0x60(%rbp),%rax
  jb     L121
  lea    D107(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
L121:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    -0x58(%rbp),%rdx
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x32(%rbp)
  movzbl -0x32(%rbp),%eax
  and    $0x7f,%eax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%rdx
  mov    %rdx,%rax
  or     %rax,-0x18(%rbp)
  addl   $0x7,-0x30(%rbp)
  movzbl -0x32(%rbp),%eax
  test   %al,%al
  jns    L76
  jmp    L49
L76:
  nop
  movq   $0x0,-0x10(%rbp)
  movl   $0x0,-0x2c(%rbp)
L123:
  mov    -0x28(%rbp),%rax
  cmp    -0x60(%rbp),%rax
  jb     L219
  lea    D107(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
L219:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    -0x58(%rbp),%rdx
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x31(%rbp)
  movzbl -0x31(%rbp),%eax
  and    $0x7f,%eax
  mov    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%rdx
  mov    %rdx,%rax
  or     %rax,-0x10(%rbp)
  addl   $0x7,-0x2c(%rbp)
  movzbl -0x31(%rbp),%eax
  test   %al,%al
  jns    L80
  jmp    L123
L80:
  nop
  cmpq   $0x0,-0x18(%rbp)
  je     L3
  movq   $0x0,-0x8(%rbp)
  jmp    L232
L175:
  mov    -0x20(%rbp),%rax
  sub    -0x18(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    -0x48(%rbp),%rcx
  mov    -0x20(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  addq   $0x1,-0x20(%rbp)
  addq   $0x1,-0x8(%rbp)
L232:
  mov    -0x8(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jb     L175
  jmp    L29
L3:
  cmpq   $0x0,-0x10(%rbp)
  je     L21
  cmpq   $0x1,-0x10(%rbp)
  jne    L207
  mov    -0x20(%rbp),%rax
  cmp    -0x50(%rbp),%rax
  jb     L184
  lea    D78(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
L184:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    -0x48(%rbp),%rdx
  add    %rdx,%rax
  movb   $0xff,(%rax)
  jmp    L29
L207:
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <error@plt>
  jmp    L29
L21:
  nop
  mov    -0x20(%rbp),%rax
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D107
type_guessed: string
name: extract_symbolic_data
arguments: tag: D66
type_guessed: string
name: extract_symbolic_data
arguments: tag: D78
type_guessed: string
name: extract_symbolic_data
arguments: tag: D20
type_guessed: string

tool: D107: input underflow

tool: D66: bad magic

tool: D78: destination overflow

tool: D20: invalid special command

assistant: ```c
size_t decompress(char *dst, size_t dst_sz, char *src, size_t src_sz) {
  size_t src_pos = 0;
  size_t dst_pos = 0;
  unsigned char c;
  do {
    if (src_pos >= src_sz)
      error("input underflow");
    c = src[src_pos++];
  } while (0);
  if (c != 'T')
    error("bad magic");
  do {
    if (src_pos >= src_sz)
      error("input underflow");
    c = src[src_pos++];
  } while (0);
  if (c != 'I')
    error("bad magic");
  do {
    if (src_pos >= src_sz)
      error("input underflow");
    c = src[src_pos++];
  } while (0);
  if (c != 'N')
    error("bad magic");
  do {
    if (src_pos >= src_sz)
      error("input underflow");
    c = src[src_pos++];
  } while (0);
  if (c != 'Y')
    error("bad magic");
  while (1) {
    do {
      if (src_pos >= src_sz)
        error("input underflow");
      c = src[src_pos++];
    } while (0);
    if (c != 0xff) {
      do {
        if (dst_pos >= dst_sz) {
          error("destination overflow");
        }
        dst[dst_pos++] = (c);
      } while (0);
    } else {
      size_t delta, length;
      do {
        delta = 0;
        int shift = 0;
        while (1) {
          unsigned char cc;
          do {
            if (src_pos >= src_sz)
              error("input underflow");
            cc = src[src_pos++];
          } while (0);
          delta |= ((size_t)(cc & 0x7fu)) << shift;
          shift += 7;
          if (!(cc & 128)) {
            break;
          }
        }
      } while (0);
      do {
        length = 0;
        int shift = 0;
        while (1) {
          unsigned char cc;
          do {
            if (src_pos >= src_sz)
              error("input underflow");
            cc = src[src_pos++];
          } while (0);
          length |= ((size_t)(cc & 0x7fu)) << shift;
          shift += 7;
          if (!(cc & 128)) {
            break;
          }
        }
      } while (0);
      if (delta != 0) {
        for (size_t i = 0; i < length; i++) {
          dst[dst_pos] = dst[dst_pos - delta];
          dst_pos++;
        }
      } else {
        if (length == 0) {
          break;
        } else if (length == 1) {
          do {
            if (dst_pos >= dst_sz) {
              error("destination overflow");
            }
            dst[dst_pos++] = (0xff);
          } while (0);
        } else {
          error("invalid special command");
        }
      }
    }
  }
  return dst_pos;
}
```