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

```asm
<json_str>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r12
  mov    %rdx,%r15
  mov    %rdx,(%rsp)
  call   <strlen@plt>
  movb   $0x22,(%r12)
  test   %rax,%rax
  je     L159
  mov    %rax,%r14
  mov    $0x1,%ebp
  mov    $0x0,%ebx
  lea    -0x2(%r15),%rax
  mov    %rax,0x8(%rsp)
  movabs $0x400000020000021,%r15
  jmp    L121
L130:
  mov    %al,(%r12,%rbp,1)
  lea    0x1(%rbp),%rbp
L90:
  add    $0x1,%rbx
  cmp    %rbx,%r14
  je     L182
L121:
  movzbl 0x0(%r13,%rbx,1),%eax
  test   %al,%al
  je     L130
  lea    -0x22(%rax),%edx
  cmp    $0x3a,%dl
  ja     L141
  bt     %rdx,%r15
  jb     L130
L46:
  cmp    %rbp,0x8(%rsp)
  jb     L114
  mov    %al,(%r12,%rbp,1)
  lea    0x1(%rbp),%rbp
  jmp    L90
L141:
  lea    -0x20(%rax),%edx
  cmp    $0x5e,%dl
  jbe    L46
  mov    (%rsp),%rax
  sub    $0x3,%rax
  cmp    %rbp,%rax
  jb     L83
  lea    0x1(%rbp),%rdx
  movb   $0x5c,(%r12,%rbp,1)
  movzbl 0x0(%r13,%rbx,1),%eax
  sub    $0x8,%eax
  cmp    $0x5,%al
  ja     L33
  movzbl %al,%eax
  lea    D6(%rip),%rcx
  movslq (%rcx,%rax,4),%rax
  add    %rcx,%rax
  notrack jmp *%rax
  add    $0x2,%rbp
  movb   $0x62,(%r12,%rdx,1)
  jmp    L90
  add    $0x2,%rbp
  movb   $0x66,(%r12,%rdx,1)
  jmp    L90
  add    $0x2,%rbp
  movb   $0x6e,(%r12,%rdx,1)
  jmp    L90
  add    $0x2,%rbp
  movb   $0x72,(%r12,%rdx,1)
  jmp    L90
  add    $0x2,%rbp
  movb   $0x74,(%r12,%rdx,1)
  jmp    L90
L33:
  mov    (%rsp),%rax
  sub    $0x4,%rax
  cmp    %rdx,%rax
  jb     L133
  add    $0x2,%rbp
  movsbl (%r12,%rdx,1),%edx
  lea    (%r12,%rbx,1),%rdi
  lea    D3(%rip),%rsi
  call   <sprintf@plt>
  jmp    L90
L159:
  mov    $0x1,%ebp
L182:
  movb   $0x22,(%r12,%rbp,1)
  movb   $0x0,0x1(%r12,%rbp,1)
  mov    %r12,%rax
L35:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L83:
  mov    $0x0,%eax
  jmp    L35
L133:
  mov    $0x0,%eax
  jmp    L35
L114:
  mov    $0x0,%eax
  jmp    L35
```

tool_calls: name: parse_data
arguments: data_label: D3
type: string

tool: D3: u%04x

assistant: ```c
const char *json_str(const char *str, char *buf, size_t len) {
  size_t ix, bufix = 0;
  size_t sl;
  sl = strlen(str);
  buf[bufix++] = '"';
  for (ix = 0; ix < sl; ++ix) {
    switch (str[ix]) {
    case '\\':
    case '\0':
    case '\?':
    case '\"':
    case '\'':
      buf[bufix++] = str[ix];
      break;
    default:
      if (str[ix] < ' ' || str[ix] > '\x7e') {
        if (bufix > len - 3)
          return NULL;
        buf[bufix++] = '\\';
        switch (str[ix]) {
        case '\b':
          buf[bufix++] = 'b';
          break;
        case '\f':
          buf[bufix++] = 'f';
          break;
        case '\n':
          buf[bufix++] = 'n';
          break;
        case '\r':
          buf[bufix++] = 'r';
          break;
        case '\t':
          buf[bufix++] = 't';
          break;
        default:
          if (bufix > len - 4)
            return NULL;
          sprintf(buf + ix, "u%04x", (unsigned int)buf[bufix++]);
        }
      } else {
        if (bufix > len - 2)
          return NULL;
        buf[bufix++] = str[ix];
      }
    }
  }
  buf[bufix++] = '\"';
  buf[bufix] = '\0';
  return buf;
}
```