user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<hd>:
  endbr64
  push   %r15
  xor    %eax,%eax
  mov    %rdx,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  mov    %rdx,0x8(%rsp)
  mov    %rsi,%rdx
  lea    D38(%rip),%rsi
  call   <fprintf@plt>
  test   %rbp,%rbp
  je     L75
  mov    %r15,(%rsp)
  mov    $0x10,%r13d
  xor    %r12d,%r12d
  lea    D10(%rip),%r15
  xchg   %ax,%ax
L86:
  mov    %r12d,%edx
  lea    D27(%rip),%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  xor    %r14d,%r14d
  jmp    L8
  nopl   0x0(%rax)
L70:
  mov    (%rsp),%rax
  lea    D16(%rip),%rsi
  mov    %rbx,%rdi
  movzbl (%rax,%r14,1),%edx
  xor    %eax,%eax
  mov    %edx,%ecx
  shr    $0x4,%edx
  and    $0xf,%ecx
  and    $0xf,%edx
  call   <fprintf@plt>
  mov    %rbx,%rsi
  mov    $0x20,%edi
  call   <fputc@plt>
  mov    %r14,%rax
  and    $0x7,%eax
  cmp    $0x7,%rax
  je     L13
L29:
  add    $0x1,%r14
  cmp    $0x10,%r14
  je     L26
L8:
  lea    (%r12,%r14,1),%rax
  cmp    %rbp,%rax
  jb     L70
  mov    %rbx,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  mov    %r15,%rdi
  call   <fwrite@plt>
  mov    %r14,%rax
  and    $0x7,%eax
  cmp    $0x7,%rax
  jne    L29
L13:
  mov    %rbx,%rsi
  mov    $0x20,%edi
  add    $0x1,%r14
  call   <fputc@plt>
  cmp    $0x10,%r14
  jne    L8
L26:
  mov    %rbx,%rsi
  mov    $0x7c,%edi
  mov    %r12,%r14
  call   <fputc@plt>
  nopl   0x0(%rax)
L64:
  cmp    %r14,%rbp
  jbe    L67
  mov    0x8(%rsp),%rax
  mov    %rbx,%rsi
  movsbl (%rax,%r14,1),%edi
  lea    -0x20(%rdi),%eax
  cmp    $0x5f,%al
  mov    $0x2e,%eax
  cmovae %eax,%edi
  call   <fputc@plt>
L67:
  add    $0x1,%r14
  cmp    %r14,%r13
  jne    L64
  mov    %rbx,%rsi
  mov    $0x7c,%edi
  add    $0x10,%r12
  add    $0x10,%r13
  call   <fputc@plt>
  mov    %rbx,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  addq   $0x10,(%rsp)
  cmp    %r12,%rbp
  ja     L86
L75:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D38
datatype: string
name: extract_symbolic_data
arguments: data_label: D10
datatype: string
name: extract_symbolic_data
arguments: data_label: D27
datatype: string
name: extract_symbolic_data
arguments: data_label: D16
datatype: string

tool: D38: %s


tool: D10:    

tool: D27: %08X  

tool: D16: %X%X

assistant: ```c
void hd(FILE *file, const char *label, void *data, size_t bytes) {
  size_t goffset, loffset;
  char c;
  fprintf(file, "%s\n", label);
  for (goffset = 0; goffset < bytes; goffset += 16) {
    fprintf(file, "%08X  ", (unsigned int)goffset);
    for (loffset = 0; loffset < 16; ++loffset) {
      if (goffset + loffset < bytes) {
        c = *(char *)((unsigned char *)data + goffset + loffset);
        fprintf(file, "%X%X", (c & 0xF0) >> 4, (c & 0x0F) >> 0);
        fputc(' ', file);
      } else {
        fprintf(file, "   ");
      }
      if (loffset % 8 == 7)
        fputc(' ', file);
    }
    fputc('|', file);
    for (loffset = 0; loffset < 16; ++loffset) {
      if (goffset + loffset < bytes) {
        c = *(char *)((unsigned char *)data + goffset + loffset);
        fputc((c < ' ' || c > '~') ? '.' : c, file);
      }
    }
    fputc('|', file);
    fputc('\n', file);
  }
}
```