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

```asm
<dumpHex>:
  endbr64
  test   %rdi,%rdi
  je     L3
  push   %r15
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    $0xf,%ebx
  sub    $0x18,%rsp
  movq   $0x0,(%rsp)
  cmp    $0x1,%edx
  jle    L112
  cmpb   $0xc0,(%rsi)
  je     L135
L1:
  lea    D23(%rip),%r15
  nopl   0x0(%rax)
L147:
  mov    (%rsp),%r14
  mov    %r14d,0xc(%rsp)
  jmp    L67
  nopl   0x0(%rax,%rax,1)
L143:
  movzbl 0x0(%r13,%r14,1),%edx
  lea    D4(%rip),%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  add    $0x1,%r14
  call   <fprintf@plt>
  cmp    %r14d,%ebx
  jl     L132
L67:
  cmp    %r14d,%ebp
  jg     L143
  mov    %r12,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  mov    %r15,%rdi
  call   <fwrite@plt>
  add    $0x1,%r14
  cmp    %r14d,%ebx
  jge    L67
L132:
  mov    %r12,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D34(%rip),%rdi
  call   <fwrite@plt>
  cmp    (%rsp),%ebp
  jle    L145
  mov    0xc(%rsp),%eax
  lea    0x1(%rax),%r14d
  jmp    L98
  nopl   0x0(%rax,%rax,1)
L27:
  movzbl -0x1(%r13,%r14,1),%edi
  mov    %r12,%rsi
  call   <fputc@plt>
  mov    %r14d,%eax
  add    $0x1,%r14
  cmp    %ebx,%eax
  jg     L145
L166:
  cmp    %eax,%ebp
  jle    L145
L98:
  movzbl -0x1(%r13,%r14,1),%edi
  call   <isprint@plt>
  test   %rax,%rax
  jne    L27
  mov    %r12,%rsi
  mov    $0x2e,%edi
  call   <fputc@plt>
  mov    %r14d,%eax
  add    $0x1,%r14
  cmp    %ebx,%eax
  jle    L166
L145:
  mov    %r12,%rsi
  mov    $0xa,%edi
  add    $0x10,%ebx
  call   <fputc@plt>
  addq   $0x10,(%rsp)
  mov    (%rsp),%rax
  cmp    %eax,%ebp
  jg     L147
L87:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L112:
  je     L1
  jmp    L87
L3:
  ret
L135:
  cmpb   $0x23,0x1(%rsi)
  jne    L1
  add    $0x18,%rsp
  mov    %rdi,%rcx
  mov    $0x32,%edx
  mov    $0x1,%esi
  pop    %rbx
  lea    D9(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <fwrite@plt>
```

tool_calls: name: read_data
arguments: data_tag: D23
type: string
name: read_data
arguments: data_tag: D4
type: string
name: read_data
arguments: data_tag: D34
type: string
name: read_data
arguments: data_tag: D9
type: string

tool: D23:    

tool: D4: %02x 

tool: D34:   

tool: D9: (PAP Authentication Frame -- Contents not dumped)


assistant: ```c
void dumpHex(FILE *fp, unsigned char const *buf, int len) {
  int i;
  int base;
  if (!fp)
    return;
  if (len >= 2 && buf[0] == 0xC0 && buf[1] == 0x23) {
    fprintf(fp, "(PAP Authentication Frame -- Contents not dumped)\n");
    return;
  }
  for (base = 0; base < len; base += 16) {
    for (i = base; i < base + 16; i++) {
      if (i < len) {
        fprintf(fp, "%02x ", (unsigned)buf[i]);
      } else {
        fprintf(fp, "   ");
      }
    }
    fprintf(fp, "  ");
    for (i = base; i < base + 16; i++) {
      if (i < len) {
        if (isprint(buf[i])) {
          fprintf(fp, "%c", buf[i]);
        } else {
          fprintf(fp, ".");
        }
      } else {
        break;
      }
    }
    fprintf(fp, "\n");
  }
}
```