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

```asm
<escape>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r12
  movzbl (%rdi),%eax
  test   %al,%al
  je     L276
  mov    %rdi,%rbp
  mov    %rdi,%rsi
  lea    D9(%rip),%r15
  lea    D4(%rip),%r13
  lea    D1(%rip),%r14
  jmp    L120
  movb   $0x7,0x0(%rbp)
L174:
  lea    0x1(%rbx),%rsi
  add    $0x1,%rbp
  movzbl 0x1(%rbx),%eax
  mov    %al,0x0(%rbp)
  test   %al,%al
  je     L173
L120:
  mov    %rsi,%rbx
  cmp    $0x5c,%al
  jne    L174
  lea    0x1(%rsi),%rbx
  movzbl 0x1(%rsi),%edx
  lea    -0x30(%rdx),%eax
  cmp    $0x48,%al
  ja     L153
  movzbl %al,%eax
  movslq 0x0(%r13,%rax,4),%rax
  add    %r13,%rax
  notrack jmp *%rax
  movb   $0x8,0x0(%rbp)
  jmp    L174
  movzbl 0x2(%rsi),%eax
  test   %al,%al
  jne    L230
  movb   $0x0,0x0(%rbp)
  jmp    L174
L230:
  lea    0x2(%rsi),%rbx
  and    $0x1f,%eax
  mov    %al,0x0(%rbp)
  jmp    L174
  movb   $0x1b,0x0(%rbp)
  jmp    L174
  movb   $0xc,0x0(%rbp)
  jmp    L174
  movb   $0xa,0x0(%rbp)
  jmp    L174
  movb   $0xd,0x0(%rbp)
  jmp    L174
  movb   $0x20,0x0(%rbp)
  jmp    L174
  movb   $0x9,0x0(%rbp)
  jmp    L174
  movb   $0xb,0x0(%rbp)
  jmp    L174
  add    $0x2,%rsi
  mov    $0x0,%edx
  mov    $0x0,%r8d
  jmp    L3
  shl    $0x4,%edx
  lea    -0x57(%rdi,%rdx,1),%edx
L213:
  mov    %rcx,%rbx
L3:
  lea    0x1(%rbx),%rcx
  movzbl 0x1(%rbx),%eax
  movsbl %al,%edi
  sub    $0x30,%eax
  cmp    $0x4d,%al
  ja     L168
  movzbl %al,%eax
  movslq (%r14,%rax,4),%rax
  add    %r14,%rax
  notrack jmp *%rax
  shl    $0x4,%edx
  lea    -0x37(%rdi,%rdx,1),%edx
  jmp    L213
  shl    $0x4,%edx
  lea    -0x30(%rdi,%rdx,1),%edx
  jmp    L213
  cmp    %rcx,%rsi
  jne    L168
  mov    %r8,%rsi
  jmp    L213
  test   %rsi,%rsi
  cmove  %rcx,%rbx
L168:
  mov    %dl,0x0(%rbp)
  jmp    L174
  movsbl %dl,%edx
  lea    -0x30(%rdx),%ecx
  add    $0x3,%rsi
L177:
  mov    %rbx,%rdi
L31:
  cmp    %rsi,%rbx
  jae    L37
  movzbl 0x1(%rbx),%edx
  movsbl %dl,%eax
  sub    $0x30,%eax
  cmp    $0x7,%eax
  jbe    L188
  mov    %rdi,%rsi
  jmp    L31
L188:
  add    $0x1,%rbx
  movsbl %dl,%edx
  lea    -0x30(%rdx,%rcx,8),%ecx
  jmp    L177
L37:
  mov    %cl,0x0(%rbp)
  jmp    L174
L153:
  movb   $0x0,0x2(%rsi)
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    %r15,%rdi
  call   <bad@plt>
  jmp    L174
L276:
  mov    %rdi,%rbp
L173:
  mov    %ebp,%eax
  sub    %r12d,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D9
type_infered: string

tool: D9: invalid C \ escape


assistant: ```c
int escape(char *s) {
  char *b;
  char *t;
  char *q;
  char *e;
  int c;
  for (b = t = s; *t = *s; s++, t++)
    if (*s == '\\')
      switch (*++s) {
      case '\\':
        break;
      case 'a':
        *t = '\a';
        break;
      case 'b':
        *t = '\b';
        break;
      case 'c':
        if (*t = *++s)
          *t &= 037;
        else
          s--;
        break;
      case 'e':
      case 'E':
        *t = 033;
        break;
      case 'f':
        *t = '\f';
        break;
      case 'n':
        *t = '\n';
        break;
      case 'r':
        *t = '\r';
        break;
      case 's':
        *t = ' ';
        break;
      case 't':
        *t = '\t';
        break;
      case 'v':
        *t = '\v';
        break;
      case 'u':
      case 'x':
        c = 0;
        q = c == 'u' ? (s + 5) : (char *)0;
        e = s + 1;
        while (!e || !q || s < q) {
          switch (*++s) {
          case 'a':
          case 'b':
          case 'c':
          case 'd':
          case 'e':
          case 'f':
            c = (c << 4) + *s - 'a' + 10;
            continue;
          case 'A':
          case 'B':
          case 'C':
          case 'D':
          case 'E':
          case 'F':
            c = (c << 4) + *s - 'A' + 10;
            continue;
          case '0':
          case '1':
          case '2':
          case '3':
          case '4':
          case '5':
          case '6':
          case '7':
          case '8':
          case '9':
            c = (c << 4) + *s - '0';
            continue;
          case '{':
          case '[':
            if (s != e) {
              s--;
              break;
            }
            e = 0;
            continue;
          case '}':
          case ']':
            if (e)
              s--;
            break;
          default:
            s--;
            break;
          }
          break;
        }
        *t = c;
        break;
      case '0':
      case '1':
      case '2':
      case '3':
      case '4':
      case '5':
      case '6':
      case '7':
        c = *s - '0';
        q = s + 2;
        while (s < q) {
          switch (*++s) {
          case '0':
          case '1':
          case '2':
          case '3':
          case '4':
          case '5':
          case '6':
          case '7':
            c = (c << 3) + *s - '0';
            break;
          default:
            q = --s;
            break;
          }
        }
        *t = c;
        break;
      default:
        *(s + 1) = 0;
        bad("invalid C \\ escape\n", s - 1, 0, 0, 0);
      }
  return t - b;
}
```