user: Translate the below assembly code into C programming language:

```asm
<pretty_format>:
  endbr64
  push   %r15
  mov    %rsi,%rcx
  mov    %rsi,%r15
  mov    $0x2,%esi
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  lea    D46(%rip),%r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  mov    %rdx,%rbx
  mov    %rdi,%rdx
  lea    D95(%rip),%rdi
  sub    $0x18,%rsp
  call   <safe_known_str@plt>
  movsbl (%rbx),%edi
  test   %dil,%dil
  jne    L168
  jmp    L299
  nopl   0x0(%rax,%rax,1)
L189:
  cmp    $0x5c,%dil
  jne    L211
  mov    $0x1fff,%ecx
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    $0x5c,%edi
  call   <safe_copy_chr@plt>
  movsbl 0x1(%rbx),%edi
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    $0x1fff,%ecx
  call   <safe_copy_chr@plt>
  cmpb   $0x0,0x1(%rbx)
  je     L109
  movsbl 0x2(%rbx),%edi
  add    $0x1,%rbx
L149:
  add    $0x1,%rbx
  test   %dil,%dil
  je     L299
L168:
  cmp    $0x7b,%dil
  je     L244
  jg     L134
  cmp    $0x3b,%dil
  jne    L189
  mov    $0x1fff,%ecx
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    $0x3b,%edi
  call   <safe_copy_chr@plt>
  mov    %r15,%rcx
  mov    %r13,%rdx
  mov    $0x2,%esi
  lea    D95(%rip),%rdi
  xor    %r14d,%r14d
  call   <safe_known_str@plt>
  test   %ebp,%ebp
  je     L78
  nopl   0x0(%rax,%rax,1)
L90:
  mov    $0x1fff,%ecx
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <safe_copy_str@plt>
  add    $0x1,%r14d
  cmp    %ebp,%r14d
  jne    L90
  movsbl 0x1(%rbx),%edi
  cmp    $0x20,%dil
  jne    L149
  nopw   0x0(%rax,%rax,1)
L107:
  add    $0x1,%rbx
L78:
  movsbl 0x1(%rbx),%edi
  cmp    $0x20,%dil
  je     L107
  add    $0x1,%rbx
  test   %dil,%dil
  jne    L168
  nopl   0x0(%rax,%rax,1)
L299:
  mov    (%r15),%rax
  cmpb   $0xa,-0x1(%rax)
  jne    L178
L109:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L134:
  cmp    $0x7d,%dil
  jne    L211
  test   %ebp,%ebp
  je     L92
  lea    -0x1(%rbp),%r14d
  mov    %r15,%rcx
  mov    %r13,%rdx
  mov    $0x2,%esi
  lea    D95(%rip),%rdi
  call   <safe_known_str@plt>
  test   %r14d,%r14d
  je     L6
  xor    %ebp,%ebp
  nopl   0x0(%rax,%rax,1)
L95:
  mov    $0x1fff,%ecx
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <safe_copy_str@plt>
  add    $0x1,%ebp
  cmp    %ebp,%r14d
  jne    L95
  movsbl (%rbx),%edi
  mov    $0x1fff,%ecx
  mov    %r15,%rdx
  mov    %r13,%rsi
  xor    %ebp,%ebp
  call   <safe_copy_chr@plt>
  mov    %r15,%rcx
  mov    %r13,%rdx
  mov    $0x2,%esi
  lea    D95(%rip),%rdi
  call   <safe_known_str@plt>
  nopw   0x0(%rax,%rax,1)
L145:
  mov    $0x1fff,%ecx
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <safe_copy_str@plt>
  add    $0x1,%ebp
  cmp    %ebp,%r14d
  jne    L145
L161:
  movsbl 0x1(%rbx),%edi
  cmp    $0x20,%dil
  jne    L149
  nopl   0x0(%rax)
L173:
  movsbl 0x2(%rbx),%edi
  add    $0x1,%rbx
  cmp    $0x20,%dil
  je     L173
  jmp    L149
  nopl   0x0(%rax,%rax,1)
L244:
  mov    %r15,%rcx
  mov    %r13,%rdx
  mov    $0x2,%esi
  xor    %r14d,%r14d
  lea    D95(%rip),%rdi
  call   <safe_known_str@plt>
  test   %ebp,%ebp
  je     L12
  cs nopw 0x0(%rax,%rax,1)
L226:
  mov    $0x1fff,%ecx
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <safe_copy_str@plt>
  add    $0x1,%r14d
  cmp    %ebp,%r14d
  jne    L226
L12:
  movsbl (%rbx),%edi
  mov    $0x1fff,%ecx
  mov    %r15,%rdx
  mov    %r13,%rsi
  xor    %r14d,%r14d
  call   <safe_copy_chr@plt>
  mov    %r15,%rcx
  mov    %r13,%rdx
  mov    $0x2,%esi
  lea    D95(%rip),%rdi
  call   <safe_known_str@plt>
  lea    0x1(%rbp),%eax
  mov    %eax,0xc(%rsp)
L71:
  mov    $0x1fff,%ecx
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <safe_copy_str@plt>
  mov    %r14d,%eax
  add    $0x1,%r14d
  cmp    %eax,%ebp
  jne    L71
  movsbl 0x1(%rbx),%edi
  cmp    $0x20,%dil
  jne    L254
  nopl   0x0(%rax,%rax,1)
L79:
  movsbl 0x2(%rbx),%edi
  add    $0x1,%rbx
  cmp    $0x20,%dil
  je     L79
L254:
  mov    0xc(%rsp),%ebp
  jmp    L149
  nopw   0x0(%rax,%rax,1)
L211:
  mov    $0x1fff,%ecx
  mov    %r15,%rdx
  mov    %r13,%rsi
  call   <safe_copy_chr@plt>
  movsbl 0x1(%rbx),%edi
  jmp    L149
  nopl   0x0(%rax)
L92:
  mov    %r15,%rcx
  mov    %r13,%rdx
  mov    $0x2,%esi
  lea    D95(%rip),%rdi
  call   <safe_known_str@plt>
L6:
  movsbl (%rbx),%edi
  mov    $0x1fff,%ecx
  mov    %r15,%rdx
  mov    %r13,%rsi
  xor    %ebp,%ebp
  call   <safe_copy_chr@plt>
  mov    %r15,%rcx
  mov    %r13,%rdx
  mov    $0x2,%esi
  lea    D95(%rip),%rdi
  call   <safe_known_str@plt>
  jmp    L161
  nopl   0x0(%rax,%rax,1)
L178:
  add    $0x18,%rsp
  mov    %r15,%rcx
  mov    %r13,%rdx
  mov    $0x2,%esi
  pop    %rbx
  lea    D95(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <safe_known_str@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D46
type_infered: string
name: disassemble_data
arguments: data_tag: D95
type_infered: string

tool: D46:   

tool: D95: 


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));
  }
}
```