user: Converte this assembly snippet into its equivalent C code:

```asm
<pretty_format>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r12
  mov    %rsi,%rbp
  mov    %rdx,%rbx
  mov    %rsi,%rcx
  mov    %rdi,%rdx
  mov    $0x2,%esi
  lea    D86(%rip),%rdi
  call   <safe_known_str@plt>
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L65
  mov    $0x0,%r14d
  lea    D46(%rip),%r13
  jmp    L129
L187:
  cmp    $0x7d,%dil
  jne    L294
  test   %r14d,%r14d
  jle    L23
  lea    -0x1(%r14),%eax
  mov    %eax,%r15d
  mov    %eax,0xc(%rsp)
  mov    %rbp,%rcx
  mov    %r12,%rdx
  mov    $0x2,%esi
  lea    D86(%rip),%rdi
  call   <safe_known_str@plt>
  test   %r15d,%r15d
  jle    L200
  mov    %r15d,0x8(%rsp)
  mov    $0x0,%r14d
L287:
  mov    $0x1fff,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <safe_copy_str@plt>
  mov    %r14d,%r15d
  add    $0x1,%r14d
  cmp    0x8(%rsp),%r14d
  jne    L287
  movsbl (%rbx),%edi
  mov    $0x1fff,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  call   <safe_copy_chr@plt>
  mov    %rbp,%rcx
  mov    %r12,%rdx
  mov    $0x2,%esi
  lea    D86(%rip),%rdi
  call   <safe_known_str@plt>
  mov    $0x0,%r14d
L102:
  mov    $0x1fff,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <safe_copy_str@plt>
  mov    %r14d,%eax
  add    $0x1,%r14d
  cmp    %eax,%r15d
  jne    L102
  mov    0xc(%rsp),%r14d
L333:
  cmpb   $0x20,0x1(%rbx)
  jne    L160
L266:
  add    $0x1,%rbx
  cmpb   $0x20,0x1(%rbx)
  je     L266
  mov    %rbx,%r15
  jmp    L321
L235:
  mov    %rbp,%rcx
  mov    %r12,%rdx
  mov    $0x2,%esi
  lea    D86(%rip),%rdi
  call   <safe_known_str@plt>
  test   %r14d,%r14d
  jle    L233
  mov    $0x0,%r15d
L195:
  mov    $0x1fff,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <safe_copy_str@plt>
  add    $0x1,%r15d
  cmp    %r14d,%r15d
  jne    L195
  movsbl (%rbx),%edi
  mov    $0x1fff,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  call   <safe_copy_chr@plt>
  mov    %rbp,%rcx
  mov    %r12,%rdx
  mov    $0x2,%esi
  lea    D86(%rip),%rdi
  call   <safe_known_str@plt>
  lea    0x1(%r14),%eax
  mov    %eax,0x8(%rsp)
  mov    $0x0,%r15d
L31:
  mov    $0x1fff,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <safe_copy_str@plt>
  mov    %r15d,%eax
  add    $0x1,%r15d
  cmp    %eax,%r14d
  jg     L31
  mov    0x8(%rsp),%r14d
L366:
  cmpb   $0x20,0x1(%rbx)
  jne    L26
L161:
  add    $0x1,%rbx
  cmpb   $0x20,0x1(%rbx)
  je     L161
  mov    %rbx,%r15
  jmp    L321
L233:
  movsbl (%rbx),%edi
  mov    $0x1fff,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  call   <safe_copy_chr@plt>
  mov    %rbp,%rcx
  mov    %r12,%rdx
  mov    $0x2,%esi
  lea    D86(%rip),%rdi
  call   <safe_known_str@plt>
  add    $0x1,%r14d
  test   %r14d,%r14d
  jle    L366
  mov    $0x1fff,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <safe_copy_str@plt>
  jmp    L366
L261:
  mov    $0x1fff,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    $0x3b,%edi
  call   <safe_copy_chr@plt>
  mov    %rbp,%rcx
  mov    %r12,%rdx
  mov    $0x2,%esi
  lea    D86(%rip),%rdi
  call   <safe_known_str@plt>
  test   %r14d,%r14d
  jle    L289
  mov    $0x0,%r15d
L101:
  mov    $0x1fff,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <safe_copy_str@plt>
  add    $0x1,%r15d
  cmp    %r14d,%r15d
  jne    L101
L289:
  cmpb   $0x20,0x1(%rbx)
  jne    L199
L272:
  add    $0x1,%rbx
  cmpb   $0x20,0x1(%rbx)
  je     L272
  mov    %rbx,%r15
  jmp    L321
L294:
  movsbl %dil,%edi
  mov    $0x1fff,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  call   <safe_copy_chr@plt>
  mov    %rbx,%r15
L321:
  lea    0x1(%r15),%rbx
  movzbl 0x1(%r15),%edi
  test   %dil,%dil
  je     L65
L129:
  cmp    $0x7b,%dil
  je     L235
  jg     L187
  cmp    $0x3b,%dil
  je     L261
  cmp    $0x5c,%dil
  jne    L294
  mov    $0x1fff,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  mov    $0x5c,%edi
  call   <safe_copy_chr@plt>
  lea    0x1(%rbx),%r15
  movsbl 0x1(%rbx),%edi
  mov    $0x1fff,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  call   <safe_copy_chr@plt>
  cmpb   $0x0,0x1(%rbx)
  jne    L321
  jmp    L363
L26:
  mov    %rbx,%r15
  jmp    L321
L160:
  mov    %rbx,%r15
  jmp    L321
L199:
  mov    %rbx,%r15
  jmp    L321
L65:
  mov    0x0(%rbp),%rax
  cmpb   $0xa,-0x1(%rax)
  jne    L137
L363:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L137:
  mov    %rbp,%rcx
  mov    %r12,%rdx
  mov    $0x2,%esi
  lea    D86(%rip),%rdi
  call   <safe_known_str@plt>
  jmp    L363
L200:
  mov    0xc(%rsp),%r14d
  jmp    L234
L23:
  mov    %rbp,%rcx
  mov    %r12,%rdx
  mov    $0x2,%esi
  lea    D86(%rip),%rdi
  call   <safe_known_str@plt>
L234:
  movsbl (%rbx),%edi
  mov    $0x1fff,%ecx
  mov    %rbp,%rdx
  mov    %r12,%rsi
  call   <safe_copy_chr@plt>
  mov    %rbp,%rcx
  mov    %r12,%rdx
  mov    $0x2,%esi
  lea    D86(%rip),%rdi
  call   <safe_known_str@plt>
  jmp    L333
```

tool_calls: name: parse_data
arguments: data_label: D86
data_type: string
name: parse_data
arguments: data_label: D46
data_type: string

tool: D86: 


tool: D46:   

assistant: ```c
void pretty_format(char *dest, char **cp, char *p) {
  int indent_lev, i;
  indent_lev = 0;
  safe_known_str("\r\n", 2, (dest), (cp));
  while (*p) {
    switch (*p) {
    case '\\':
      safe_copy_chr((*p), (dest), (cp), (8192 - 1));
      p++;
      safe_copy_chr((*p), (dest), (cp), (8192 - 1));
      if (!*p) {
        return;
      }
      break;
    case '{':
      safe_known_str("\r\n", 2, (dest), (cp));
      for (i = 0; i < indent_lev; i++) {
        safe_copy_str(((char *)"  "), (dest), (cp), (8192 - 1));
      }
      safe_copy_chr((*p), (dest), (cp), (8192 - 1));
      safe_known_str("\r\n", 2, (dest), (cp));
      indent_lev++;
      for (i = 0; i < indent_lev; i++) {
        safe_copy_str(((char *)"  "), (dest), (cp), (8192 - 1));
      }
      while (p[1] == ' ') {
        p++;
      }
      break;
    case '}':
      if (indent_lev > 0) {
        indent_lev--;
      }
      safe_known_str("\r\n", 2, (dest), (cp));
      for (i = 0; i < indent_lev; i++) {
        safe_copy_str(((char *)"  "), (dest), (cp), (8192 - 1));
      }
      safe_copy_chr((*p), (dest), (cp), (8192 - 1));
      safe_known_str("\r\n", 2, (dest), (cp));
      for (i = 0; i < indent_lev; i++) {
        safe_copy_str(((char *)"  "), (dest), (cp), (8192 - 1));
      }
      while (p[1] == ' ') {
        p++;
      }
      break;
    case ';':
      safe_copy_chr((*p), (dest), (cp), (8192 - 1));
      safe_known_str("\r\n", 2, (dest), (cp));
      for (i = 0; i < indent_lev; i++) {
        safe_copy_str(((char *)"  "), (dest), (cp), (8192 - 1));
      }
      while (p[1] == ' ') {
        p++;
      }
      break;
    default:
      safe_copy_chr((*p), (dest), (cp), (8192 - 1));
      break;
    }
    p++;
  }
  if (*(*cp - 1) != '\n') {
    safe_known_str("\r\n", 2, (dest), (cp));
  }
}
```