user: Please show me the C implementation that matches the assembly code listed below:

```asm
<dumpHex>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L26
  cmpl   $0x1,-0x24(%rbp)
  jle    L149
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xc0,%al
  jne    L149
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x23,%al
  jne    L149
  mov    -0x18(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x32,%edx
  mov    $0x1,%esi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  jmp    L68
L149:
  movl   $0x0,-0x4(%rbp)
  jmp    L178
L152:
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L130
L163:
  mov    -0x8(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jge    L150
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  lea    D1(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  jmp    L30
L150:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
L30:
  addl   $0x1,-0x8(%rbp)
L130:
  mov    -0x4(%rbp),%eax
  add    $0xf,%eax
  cmp    %eax,-0x8(%rbp)
  jle    L163
  mov    -0x18(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x4(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L104
L108:
  mov    -0x8(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jge    L15
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isprint@plt>
  test   %rax,%rax
  je     L170
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <fputc@plt>
  jmp    L134
L170:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x2e,%edi
  call   <fputc@plt>
L134:
  addl   $0x1,-0x8(%rbp)
L104:
  mov    -0x4(%rbp),%eax
  add    $0xf,%eax
  cmp    %eax,-0x8(%rbp)
  jle    L108
  jmp    L36
L15:
  nop
L36:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  addl   $0x10,-0x4(%rbp)
L178:
  mov    -0x4(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L152
  jmp    L68
L26:
  nop
L68:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D10
type_infered: string
name: retrieve_data
arguments: data_label: D1
type_infered: string
name: retrieve_data
arguments: data_label: D20
type_infered: string
name: retrieve_data
arguments: data_label: D38
type_infered: string

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


tool: D1: %02x 

tool: D20:    

tool: D38:   

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