user: 请将以下的汇编代码转换成C语言代码:

```asm
<ll2escaped>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,0x8(%rsp)
  test   %r8d,%r8d
  jle    L97
  mov    %edx,%r13d
  lea    -0x1(%rdx),%eax
  test   %edx,%edx
  je     L180
  mov    %rcx,%r15
  mov    %rsi,%rbx
  mov    %r8d,%r14d
  mov    %rsi,%rcx
  nopw   0x0(%rax,%rax,1)
L88:
  movslq (%rcx),%r12
  lea    0x4(%rcx),%rbp
  test   %r12d,%r12d
  jne    L196
  test   %r14d,%r14d
  je     L56
  mov    %rbp,%r9
  movb   $0x0,(%r15)
  sub    %rbx,%r9
  sar    $0x2,%r9
L116:
  add    $0x18,%rsp
  mov    %r9d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L196:
  mov    %r12d,%edx
  and    $0xc0,%edx
  cmp    $0xc0,%edx
  je     L171
  test   %edx,%edx
  jne    L75
  mov    %eax,%r13d
  sub    %r12d,%r13d
  js     L143
  mov    %r14d,%ecx
  mov    %r15,%rdx
  mov    %r12d,%esi
  mov    %rbp,%rdi
  call   <l2escaped@plt>
  mov    %eax,%r9d
  test   %eax,%eax
  js     L116
  mov    %r14d,%edx
  cltq
  lea    0x0(%rbp,%r12,4),%rcx
  add    %r15,%rax
  sub    %r9d,%edx
  lea    -0x1(%rdx),%r14d
  je     L101
  movb   $0x2e,(%rax)
  lea    0x1(%rax),%r15
  lea    -0x1(%r13),%eax
  test   %r13d,%r13d
  jne    L88
L180:
  lea    D12(%rip),%rdi
  xor    %eax,%eax
  call   <L_DEBUG@plt>
  mov    $0xfffffffe,%r9d
  jmp    L116
  nopl   0x0(%rax)
L101:
  mov    $0x2e,%esi
  lea    D19(%rip),%rdi
  xor    %eax,%eax
  call   <L_DEBUG@plt>
  mov    $0xffffffff,%r9d
  jmp    L116
L171:
  mov    0x8(%rsp),%rdi
  test   %rdi,%rdi
  je     L153
  lea    -0x2(%r13),%edx
  test   %eax,%eax
  je     L180
  mov    %r12d,%esi
  lea    0x8(%rcx),%r13
  movslq 0x4(%rcx),%rcx
  movslq %edx,%rdx
  sar    $0x1f,%esi
  lea    0x0(%r13,%rdx,4),%rdx
  mov    %r14d,%r8d
  sub    %rbx,%r13
  shr    $0x1a,%esi
  sar    $0x2,%r13
  lea    (%r12,%rsi,1),%eax
  and    $0x3f,%eax
  sub    %esi,%eax
  shl    $0x8,%eax
  cltq
  add    %rcx,%rax
  mov    %r15,%rcx
  lea    (%rdi,%rax,4),%rsi
  sub    %rsi,%rdx
  sar    $0x2,%rdx
  call   <ll2escaped>
  mov    %eax,%r9d
  test   %eax,%eax
  cmovns %r13d,%r9d
  jmp    L116
L75:
  lea    D39(%rip),%rdi
  xor    %eax,%eax
  call   <L_DEBUG@plt>
  mov    $0xfffffffe,%r9d
  jmp    L116
L143:
  mov    %r12d,%esi
  mov    %r12d,%edx
  lea    D50(%rip),%rdi
  sub    %eax,%esi
  xor    %eax,%eax
  call   <L_DEBUG@plt>
  mov    $0xfffffffe,%r9d
  jmp    L116
L56:
  xor    %esi,%esi
  lea    D19(%rip),%rdi
  xor    %eax,%eax
  call   <L_DEBUG@plt>
  mov    $0xffffffff,%r9d
  jmp    L116
L97:
  lea    D33(%rip),%rdi
  xor    %eax,%eax
  call   <L_DEBUG@plt>
  mov    $0xffffffff,%r9d
  jmp    L116
L153:
  mov    $0xfffffffd,%r9d
  jmp    L116
```

tool_calls: name: extract_symbolic_data
arguments: label: D12
data_type: string
name: extract_symbolic_data
arguments: label: D19
data_type: string
name: extract_symbolic_data
arguments: label: D39
data_type: string
name: extract_symbolic_data
arguments: label: D50
data_type: string
name: extract_symbolic_data
arguments: label: D33
data_type: string

tool: D12: out of input string (before last null label)

tool: D19: out of space in escaped pushing %d

tool: D39: high-order bits set in length

tool: D50: %d/%d bytes of label body missing

tool: D33: no output string available

assistant: ```c
int ll2escaped(const uint8_t *base, const uint8_t *ll, int ll_left, char *escaped, int escaped_left) {
  const uint8_t *oll = ll;
  int r;
  if (escaped_left <= 0) {
    L_DEBUG("no output string available");
    return -1;
  }
  while (1) {
    if (!ll_left--) {
      L_DEBUG("out of input string (before last null label)");
      return -2;
    }
    uint8_t c = *(ll++);
    if (c) {
      if ((c & (64 | 128)) == (64 | 128)) {
        if (!base)
          return -3;
        if (!ll_left--) {
          L_DEBUG("out of input string (before last null label)");
          return -2;
        }
        uint8_t c2 = *(ll++);
        const uint8_t *nofs = base + ((c % 64) << 8) + c2;
        r = ll2escaped(base, nofs, ll + ll_left - nofs, escaped, escaped_left);
        if (r < 0)
          return r;
        return ll - oll;
      }
      if (c & (64 | 128)) {
        L_DEBUG("high-order bits set in length");
        return -2;
      }
      ll_left -= c;
      if (ll_left < 0) {
        L_DEBUG("%d/%d bytes of label body missing", -ll_left, c);
        return -2;
      }
      r = l2escaped(ll, c, escaped, escaped_left);
      if (r < 0)
        return r;
      ll += c;
      escaped += r;
      escaped_left -= r;
    }
    if (!c)
      break;
    do {
      if (!escaped_left--) {
        L_DEBUG("out of space in escaped pushing %d", '.');
        return -1;
      }
      *(escaped++) = '.';
    } while (0);
  }
  do {
    if (!escaped_left--) {
      L_DEBUG("out of space in escaped pushing %d", 0);
      return -1;
    }
    *(escaped++) = 0;
  } while (0);
  return ll - oll;
}
```