user: What would the C source look like for the assembly code provided here:

```asm
<BS2PP_EmitCharString>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rax
  mov    %rdi,0x8(%rsp)
  mov    %rsi,(%rsp)
  movzbl -0x1(%rdi),%edx
  cmp    $0x22,%dl
  je     L159
  cmp    $0x27,%dl
  je     L159
L64:
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x27,(%rax)
  mov    (%rsp),%rax
  cmpb   $0x0,(%rax)
  je     L167
  mov    %rsp,%rbx
  lea    0x8(%rsp),%rbp
  lea    D3(%rip),%r13
  lea    D6(%rip),%r12
  jmp    L112
L159:
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x20,(%rax)
  jmp    L64
L57:
  mov    %esi,%edx
  mov    %r12,%rsi
  mov    0x8(%rsp),%rdi
  call   <sprintf@plt>
  addq   $0x6,0x8(%rsp)
  jmp    L208
L172:
  cmp    $0x1b,%esi
  jne    L232
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x5c,(%rax)
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x65,(%rax)
  jmp    L208
L118:
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x5c,(%rax)
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x72,(%rax)
  jmp    L208
L212:
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x5c,(%rax)
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x74,(%rax)
  jmp    L208
L232:
  mov    %esi,%edx
  mov    %r13,%rsi
  mov    0x8(%rsp),%rdi
  call   <sprintf@plt>
  addq   $0x4,0x8(%rsp)
  jmp    L208
L140:
  cmp    $0x22,%esi
  je     L83
  cmp    $0x27,%esi
  jne    L32
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x5c,(%rax)
  jmp    L12
L83:
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x5c,(%rax)
L12:
  mov    %rbp,%rdi
  call   <BS2PP_EmitChar@plt>
L208:
  mov    (%rsp),%rax
  cmpb   $0x0,(%rax)
  je     L167
L112:
  mov    %rbx,%rdi
  call   <BS2PP_ParseChar@plt>
  mov    %eax,%esi
  lea    -0x20(%rax),%eax
  cmp    $0x5d,%eax
  jbe    L140
  cmp    $0xff,%esi
  jg     L57
  cmp    $0xd,%esi
  je     L118
  jg     L172
  cmp    $0x9,%esi
  je     L212
  cmp    $0xa,%esi
  jne    L232
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x5c,(%rax)
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x6e,(%rax)
  jmp    L208
L32:
  cmp    $0x5c,%esi
  jne    L12
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x5c,(%rax)
  jmp    L12
L167:
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x27,(%rax)
  mov    0x8(%rsp),%rax
  movb   $0x0,(%rax)
  mov    0x8(%rsp),%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D3
type: string
name: extract_symbolic_data
arguments: data_label: D6
type: string

tool: D3: \x%02X

tool: D6: \u%04X

assistant: ```c
char *BS2PP_EmitCharString(char *t, char *s) {
  int i;
  if ((*(t - 1) == '\"') || (*(t - 1) == '\''))
    *t++ = ' ';
  *t++ = '\'';
  while (*s) {
    i = BS2PP_ParseChar(&s);
    if ((i < ' ') || (i >= '~')) {
      if (i > 0xFF) {
        sprintf(t, "\\u%04X", i);
        t += 6;
        continue;
      }
      switch (i) {
      case '\r':
        *t++ = '\\';
        *t++ = 'r';
        break;
      case '\n':
        *t++ = '\\';
        *t++ = 'n';
        break;
      case '\t':
        *t++ = '\\';
        *t++ = 't';
        break;
      case '\x1B':
        *t++ = '\\';
        *t++ = 'e';
        break;
      default:
        sprintf(t, "\\x%02X", i);
        t += 4;
        break;
      }
      continue;
    }
    if (i == '\"')
      *t++ = '\\';
    if (i == '\'')
      *t++ = '\\';
    if (i == '\\')
      *t++ = '\\';
    BS2PP_EmitChar(&t, i);
  }
  *t++ = '\'';
  *t = 0;
  return (t);
}
```