user: What is the c source code of the assembly code below?

```asm
<json_print_string>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x8(%rbp)
  movq   $0x0,-0x18(%rbp)
  cmpq   $0x0,-0x40(%rbp)
  jne    L186
  mov    $0x0,%eax
  jmp    L198
L186:
  cmpq   $0x0,-0x38(%rbp)
  jne    L209
  cmpq   $0x0,-0x10(%rbp)
  jne    L48
  mov    $0x0,%eax
  jmp    L198
L48:
  mov    -0x10(%rbp),%rax
  lea    D41(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    $0x1,%eax
  jmp    L198
L209:
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  jmp    L230
L137:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%esi
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L240
  addq   $0x1,-0x18(%rbp)
  jmp    L142
L240:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x1f,%al
  ja     L142
  addq   $0x5,-0x18(%rbp)
L142:
  addq   $0x1,-0x28(%rbp)
L230:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L137
  mov    -0x28(%rbp),%rax
  sub    -0x38(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L59
  mov    -0x10(%rbp),%rax
  movb   $0x22,(%rax)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    -0x8(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x22,(%rax)
  mov    -0x8(%rbp),%rax
  lea    0x2(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    $0x1,%eax
  jmp    L198
L59:
  mov    -0x10(%rbp),%rax
  movb   $0x22,(%rax)
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  jmp    L44
L26:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x1f,%al
  jbe    L287
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x22,%al
  je     L287
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  je     L287
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L268
L287:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movb   $0x5c,(%rax)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  cmp    $0x22,%eax
  jg     L257
  cmp    $0x8,%eax
  jl     L29
  sub    $0x8,%eax
  cmp    $0x1a,%eax
  ja     L29
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D17(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D17(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
L257:
  cmp    $0x5c,%eax
  jne    L29
  mov    -0x20(%rbp),%rax
  movb   $0x5c,(%rax)
  jmp    L268
  mov    -0x20(%rbp),%rax
  movb   $0x22,(%rax)
  jmp    L268
  mov    -0x20(%rbp),%rax
  movb   $0x62,(%rax)
  jmp    L268
  mov    -0x20(%rbp),%rax
  movb   $0x66,(%rax)
  jmp    L268
  mov    -0x20(%rbp),%rax
  movb   $0x6e,(%rax)
  jmp    L268
  mov    -0x20(%rbp),%rax
  movb   $0x72,(%rax)
  jmp    L268
  mov    -0x20(%rbp),%rax
  movb   $0x74,(%rax)
  jmp    L268
L29:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x20(%rbp),%rax
  lea    D9(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  addq   $0x4,-0x20(%rbp)
  nop
L268:
  addq   $0x1,-0x28(%rbp)
  addq   $0x1,-0x20(%rbp)
L44:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L26
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x22,(%rax)
  mov    -0x8(%rbp),%rax
  lea    0x2(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    $0x1,%eax
L198:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D41
data_type: string
name: extract_symbolic_data
arguments: tag: D37
data_type: string
name: extract_symbolic_data
arguments: tag: D9
data_type: string

tool: D41: ""

tool: D37: "\
	

tool: D9: u%04x

assistant: ```c
bool json_print_string(const unsigned char *input, unsigned char *output_buffer) {
  const unsigned char *input_pointer = NULL;
  unsigned char *output = NULL;
  unsigned char *output_pointer = NULL;
  size_t output_length = 0;
  size_t escape_characters = 0;
  if (output_buffer == NULL) {
    return false;
  }
  if (input == NULL) {
    if (output == NULL) {
      return false;
    }
    strcpy((char *)output, "\"\"");
    return true;
  }
  for (input_pointer = input; *input_pointer; input_pointer++) {
    if (strchr("\"\\\b\f\n\r\t", *input_pointer)) {
      escape_characters++;
    } else if (*input_pointer < 32) {
      escape_characters += 5;
    }
  }
  output_length = (size_t)(input_pointer - input) + escape_characters;
  output = output_buffer;
  if (escape_characters == 0) {
    output[0] = '\"';
    memcpy(output + 1, input, output_length);
    output[output_length + 1] = '\"';
    output[output_length + 2] = '\0';
    return true;
  }
  output[0] = '\"';
  output_pointer = output + 1;
  for (input_pointer = input; *input_pointer != '\0'; (void)input_pointer++, output_pointer++) {
    if ((*input_pointer > 31) && (*input_pointer != '\"') && (*input_pointer != '\\')) {
      *output_pointer = *input_pointer;
    } else {
      *output_pointer++ = '\\';
      switch (*input_pointer) {
      case '\\':
        *output_pointer = '\\';
        break;
      case '\"':
        *output_pointer = '\"';
        break;
      case '\b':
        *output_pointer = 'b';
        break;
      case '\f':
        *output_pointer = 'f';
        break;
      case '\n':
        *output_pointer = 'n';
        break;
      case '\r':
        *output_pointer = 'r';
        break;
      case '\t':
        *output_pointer = 't';
        break;
      default:
        sprintf((char *)output_pointer, "u%04x", *input_pointer);
        output_pointer += 4;
        break;
      }
    }
  }
  output[output_length + 1] = '\"';
  output[output_length + 2] = '\0';
  return true;
}
```