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

```asm
<hd>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  lea    D28(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  movq   $0x0,-0x10(%rbp)
  jmp    L89
L56:
  mov    -0x10(%rbp),%rax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  lea    D14(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  movq   $0x0,-0x8(%rbp)
  jmp    L80
L11:
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x40(%rbp)
  jbe    L128
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x11(%rbp)
  movsbl -0x11(%rbp),%eax
  and    $0xf,%eax
  mov    %eax,%ecx
  movsbl -0x11(%rbp),%eax
  sar    $0x4,%eax
  and    $0xf,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  lea    D8(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x20,%edi
  call   <fputc@plt>
  jmp    L79
L128:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
L79:
  mov    -0x8(%rbp),%rax
  and    $0x7,%eax
  cmp    $0x7,%rax
  jne    L119
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x20,%edi
  call   <fputc@plt>
L119:
  addq   $0x1,-0x8(%rbp)
L80:
  cmpq   $0xf,-0x8(%rbp)
  jbe    L11
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x7c,%edi
  call   <fputc@plt>
  movq   $0x0,-0x8(%rbp)
  jmp    L115
L105:
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x40(%rbp)
  jbe    L51
  mov    -0x10(%rbp),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x11(%rbp)
  cmpb   $0x1f,-0x11(%rbp)
  jle    L3
  cmpb   $0x7f,-0x11(%rbp)
  je     L3
  movsbl -0x11(%rbp),%eax
  jmp    L83
L3:
  mov    $0x2e,%eax
L83:
  mov    -0x28(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <fputc@plt>
L51:
  addq   $0x1,-0x8(%rbp)
L115:
  cmpq   $0xf,-0x8(%rbp)
  jbe    L105
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x7c,%edi
  call   <fputc@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  addq   $0x10,-0x10(%rbp)
L89:
  mov    -0x10(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jb     L56
  nop
  nop
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D28
type_guessed: string
name: retrieve_data
arguments: label: D14
type_guessed: string
name: retrieve_data
arguments: label: D8
type_guessed: string
name: retrieve_data
arguments: label: D5
type_guessed: string

tool: D28: %s


tool: D14: %08X  

tool: D8: %X%X

tool: D5:    

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