user: Translate the below assembly code into C programming language:

```asm
<c_escape>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  movsbl (%rdi),%edi
  test   %dil,%dil
  je     L162
  mov    %rbx,%r14
  mov    $0x1,%r13d
  jmp    L198
  nopw   0x0(%rax,%rax,1)
L43:
  add    $0x4,%r13
L6:
  movsbl 0x1(%r14),%edi
  add    $0x1,%r14
  test   %dil,%dil
  je     L23
L198:
  call   <iscntrl@plt>
  test   %rax,%rax
  jne    L43
  movsbl (%r14),%edi
  call   <isascii@plt>
  test   %eax,%eax
  je     L43
  movzbl (%r14),%eax
  cmp    $0x22,%al
  je     L199
  cmp    $0x5c,%al
  je     L199
  movsbl 0x1(%r14),%edi
  add    $0x1,%r14
  add    $0x1,%r13
  test   %dil,%dil
  jne    L198
  nopw   0x0(%rax,%rax,1)
L23:
  cmp    %rbp,%r13
  ja     L38
  movsbl (%rbx),%edi
  test   %dil,%dil
  je     L195
  lea    D14(%rip),%r14
  jmp    L130
  xchg   %ax,%ax
L81:
  movsbl (%rbx),%edi
  call   <isascii@plt>
  test   %eax,%eax
  je     L122
  movsbl (%rbx),%ecx
  cmp    $0x22,%cl
  je     L152
  cmp    $0x5c,%cl
  je     L152
  mov    %cl,(%r12)
  mov    $0x1,%r15d
  nopl   0x0(%rax,%rax,1)
L194:
  xor    %edi,%edi
  cmp    %rbp,%r15
  setb   %dil
  add    $0x1,%rbx
  add    %r15,%r12
  sub    %r15,%rbp
  call   <assert@plt>
  movsbl (%rbx),%edi
  test   %dil,%dil
  je     L195
L130:
  call   <iscntrl@plt>
  test   %rax,%rax
  je     L81
L122:
  movsbl (%rbx),%ecx
  mov    %r12,%rdi
  mov    %r14,%rdx
  mov    %rbp,%rsi
  call   <snprintf@plt>
  xor    %edi,%edi
  cmp    $0x4,%rax
  mov    %rax,%r15
  sete   %dil
  call   <assert@plt>
  jmp    L194
  nop
L162:
  mov    $0x1,%r13d
  test   %rdx,%rdx
  je     L38
  nopl   0x0(%rax,%rax,1)
L195:
  xor    %edi,%edi
  test   %rbp,%rbp
  setne  %dil
  call   <assert@plt>
  movb   $0x0,(%r12)
L38:
  add    $0x8,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L199:
  add    $0x2,%r13
  jmp    L6
  nopl   0x0(%rax)
L152:
  mov    %r12,%rdi
  lea    D6(%rip),%rdx
  mov    %rbp,%rsi
  call   <snprintf@plt>
  xor    %edi,%edi
  cmp    $0x2,%rax
  mov    %rax,%r15
  sete   %dil
  call   <assert@plt>
  jmp    L194
```

tool_calls: name: extract_symbolic_data
arguments: tag: D14
type_infered: string
name: extract_symbolic_data
arguments: tag: D6
type_infered: string

tool: D14: \x%02hhx

tool: D6: \%c

assistant: ```c
size_t c_escape(const char *in, char *out, size_t len) {
  size_t r = 1, s;
  const char *c;
  for (c = in; *c != '\0'; c++) {
    if (iscntrl(*c) || !isascii(*c))
      r += 4;
    else {
      if (*c == '\"' || *c == '\\')
        r += 2;
      else
        r++;
    }
  }
  if (r > len)
    return r;
  for (c = in; *c != '\0'; c++) {
    if (iscntrl(*c) || !isascii(*c)) {
      s = snprintf(out, len, "\\x%02hhx", *c);
      assert(s == 4);
    } else {
      if (*c == '\"' || *c == '\\') {
        s = snprintf(out, len, "\\%c", *c);
        assert(s == 2);
      } else {
        *out = *c;
        s = 1;
      }
    }
    assert(s < len);
    out += s;
    len -= s;
  }
  assert(len > 0);
  *out = '\0';
  return r;
}
```