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

```asm
<escape_json_attr>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x14(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L126
L62:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x15(%rbp)
  movzbl -0x15(%rbp),%eax
  cmp    $0x5c,%eax
  je     L58
  cmp    $0x5c,%eax
  jg     L99
  cmp    $0x22,%eax
  je     L150
  cmp    $0x22,%eax
  jg     L99
  cmp    $0x9,%eax
  je     L155
  cmp    $0xa,%eax
  je     L121
  jmp    L99
L150:
  mov    -0x10(%rbp),%rax
  mov    $0x2,%edx
  lea    D46(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  addq   $0x2,-0x10(%rbp)
  jmp    L33
L58:
  mov    -0x10(%rbp),%rax
  mov    $0x2,%edx
  lea    D33(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  addq   $0x2,-0x10(%rbp)
  jmp    L33
L155:
  mov    -0x10(%rbp),%rax
  mov    $0x2,%edx
  lea    D43(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  addq   $0x2,-0x10(%rbp)
  jmp    L33
L121:
  mov    -0x10(%rbp),%rax
  mov    $0x2,%edx
  lea    D37(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  addq   $0x2,-0x10(%rbp)
  jmp    L33
L99:
  cmpb   $0x1f,-0x15(%rbp)
  jbe    L46
  cmpb   $0x7f,-0x15(%rbp)
  jne    L103
L46:
  movzbl -0x15(%rbp),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%ecx
  lea    D11(%rip),%rdx
  mov    $0x7,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  addq   $0x6,-0x10(%rbp)
  jmp    L88
L103:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl -0x15(%rbp),%edx
  mov    %dl,(%rax)
L88:
  nop
L33:
  addl   $0x1,-0x14(%rbp)
  addq   $0x1,-0x8(%rbp)
L126:
  mov    -0x14(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L62
  mov    -0x10(%rbp),%rax
  movb   $0x0,(%rax)
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D46
type: string
name: unpack_data
arguments: tag: D33
type: string
name: unpack_data
arguments: tag: D43
type: string
name: unpack_data
arguments: tag: D37
type: string
name: unpack_data
arguments: tag: D11
type: string

tool: D46: \"

tool: D33: \\

tool: D43: \t

tool: D37: \n

tool: D11: \u%04x

assistant: ```c
void escape_json_attr(const char *buf, int src_len, char *out) {
  char *o = out;
  const char *b;
  int i;
  for (i = 0, b = buf; i < src_len; ++i, ++b) {
    unsigned char c = *b;
    switch (c) {
    case '"':
      memcpy(o, "\\\"", ((sizeof("\\\"") / sizeof("\\\""[0])) - 1));
      o += ((sizeof("\\\"") / sizeof("\\\""[0])) - 1);
      break;
    case '\\':
      memcpy(o, "\\\\", ((sizeof("\\\\") / sizeof("\\\\"[0])) - 1));
      o += ((sizeof("\\\\") / sizeof("\\\\"[0])) - 1);
      break;
    case '\t':
      memcpy(o, "\\t", ((sizeof("\\t") / sizeof("\\t"[0])) - 1));
      o += ((sizeof("\\t") / sizeof("\\t"[0])) - 1);
      break;
    case '\n':
      memcpy(o, "\\n", ((sizeof("\\n") / sizeof("\\n"[0])) - 1));
      o += ((sizeof("\\n") / sizeof("\\n"[0])) - 1);
      break;
    default:
      if ((c < 0x20) || (c == 0x7f)) {
        snprintf(o, 7, "\\u%04x", c);
        o += 6;
      } else {
        *o++ = c;
      }
      break;
    }
  }
  *o = '\0';
}
```