user: Demonstrate the C code that generates the assembly output below:

```asm
<BTSHASP_EmitString>:
  endbr64
  push   %r13
  mov    %rdi,%rax
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,(%rsp)
  movzbl -0x1(%rdi),%edx
  cmp    $0x22,%dl
  je     L170
  cmp    $0x27,%dl
  je     L170
L8:
  lea    0x1(%rax),%rdx
  mov    %rsp,%rbx
  lea    0x8(%rsp),%rbp
  mov    %rdx,0x8(%rsp)
  lea    D17(%rip),%r13
  lea    D12(%rip),%r12
  movb   $0x22,(%rax)
  nopw   0x0(%rax,%rax,1)
L175:
  mov    (%rsp),%rax
  cmpb   $0x0,(%rax)
  je     L148
L92:
  mov    %rbx,%rdi
  call   <BTSHASP_ParseChar@plt>
  mov    %eax,%esi
  lea    -0x20(%rax),%eax
  cmp    $0x5d,%eax
  jbe    L11
  mov    0x8(%rsp),%rdi
  cmp    $0xff,%esi
  jg     L100
  cmp    $0xd,%esi
  je     L193
  jg     L192
  cmp    $0x9,%esi
  je     L67
  cmp    $0xa,%esi
  jne    L88
  lea    0x1(%rdi),%rax
  mov    %rax,0x8(%rsp)
  movb   $0x5c,(%rdi)
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x6e,(%rax)
  mov    (%rsp),%rax
  cmpb   $0x0,(%rax)
  jne    L92
L148:
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x22,(%rax)
  mov    0x8(%rsp),%rax
  movb   $0x0,(%rax)
  mov    0x8(%rsp),%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L11:
  cmp    $0x22,%esi
  je     L150
  cmp    $0x27,%esi
  je     L150
  cmp    $0x5c,%esi
  jne    L3
L150:
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x5c,(%rax)
L3:
  mov    %rbp,%rdi
  call   <BTSHASP_EmitChar@plt>
  jmp    L175
  nopl   (%rax)
L192:
  cmp    $0x1b,%esi
  jne    L88
  lea    0x1(%rdi),%rax
  mov    %rax,0x8(%rsp)
  movb   $0x5c,(%rdi)
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x65,(%rax)
  jmp    L175
  nopw   0x0(%rax,%rax,1)
L100:
  mov    %esi,%edx
  mov    %r12,%rsi
  call   <sprintf@plt>
  addq   $0x6,0x8(%rsp)
  jmp    L175
  nopl   (%rax)
L193:
  lea    0x1(%rdi),%rax
  mov    %rax,0x8(%rsp)
  movb   $0x5c,(%rdi)
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x72,(%rax)
  jmp    L175
  nopw   0x0(%rax,%rax,1)
L88:
  mov    %esi,%edx
  mov    %r13,%rsi
  call   <sprintf@plt>
  addq   $0x4,0x8(%rsp)
  jmp    L175
  nopl   (%rax)
L67:
  lea    0x1(%rdi),%rax
  mov    %rax,0x8(%rsp)
  movb   $0x5c,(%rdi)
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x74,(%rax)
  jmp    L175
  nopw   0x0(%rax,%rax,1)
L170:
  lea    0x1(%rax),%rdx
  mov    %rdx,0x8(%rsp)
  movb   $0x20,(%rax)
  mov    0x8(%rsp),%rax
  jmp    L8
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D17
type: string
name: extract_symbolic_data
arguments: data_tag: D12
type: string

tool: D17: \x%02X

tool: D12: \u%04X

assistant: ```c
char *BTSHASP_EmitString(char *t, char *s) {
  int i;
  if ((*(t - 1) == '\"') || (*(t - 1) == '\''))
    *t++ = ' ';
  *t++ = '\"';
  while (*s) {
    i = BTSHASP_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++ = '\\';
    BTSHASP_EmitChar(&t, i);
  }
  *t++ = '\"';
  *t = 0;
  return (t);
}
```