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

```asm
<DumpHex>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  test   %edx,%edx
  je     L71
  lea    -0x1(%rdx),%eax
  mov    %rdi,%r13
  mov    %rsi,%rbx
  xor    %ebp,%ebp
  lea    0x4(%rsi,%rax,4),%rax
  mov    %rax,0x8(%rsp)
  jmp    L147
  nopl   0x0(%rax)
L81:
  cmp    $0x8,%ebp
  je     L129
  mov    %ebp,0x4(%rsp)
  add    $0x1,%ebp
L31:
  mov    (%rbx),%r12d
  movsbl %r12b,%r14d
  mov    %r12d,%r15d
  mov    %r14d,%edi
  call   <isprint@plt>
  test   %rax,%rax
  je     L46
  cmp    $0x20,%r12b
  je     L107
  mov    %r14d,%edi
  call   <isspace@plt>
  test   %eax,%eax
  je     L107
  nopl   0x0(%rax)
L46:
  mov    $0x2e,%r15d
L107:
  mov    0x4(%rsp),%r12d
  mov    (%rbx),%edx
  lea    D13(%rip),%rsi
  xor    %eax,%eax
  mov    %r13,%rdi
  add    $0x4,%rbx
  mov    %r15b,0x10(%rsp,%r12,1)
  call   <fprintf@plt>
  cmp    0x8(%rsp),%rbx
  je     L82
L147:
  cmp    $0x11,%ebp
  jne    L81
  lea    0x10(%rsp),%rdx
  mov    %r13,%rdi
  xor    %eax,%eax
  movb   $0x0,0x21(%rsp)
  lea    D47(%rip),%rsi
  mov    $0x1,%ebp
  call   <fprintf@plt>
  movl   $0x0,0x4(%rsp)
  jmp    L31
  nopl   0x0(%rax,%rax,1)
L129:
  mov    %r13,%rsi
  mov    $0x20,%edi
  movb   $0x20,0x18(%rsp)
  mov    $0xa,%ebp
  call   <fputc@plt>
  movl   $0x9,0x4(%rsp)
  jmp    L31
  nopl   0x0(%rax)
L82:
  test   %ebp,%ebp
  je     L71
  mov    %ebp,%eax
  movb   $0x0,0x10(%rsp,%rax,1)
  cmp    $0x10,%ebp
  ja     L41
  lea    D4(%rip),%rbx
  lea    D49(%rip),%r12
L63:
  cmp    $0x8,%ebp
  jne    L55
  mov    %r13,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  mov    %r12,%rdi
  movb   $0x20,0x18(%rsp)
  mov    $0xc,%ebp
  call   <fwrite@plt>
  mov    %r13,%rcx
  mov    $0x3,%edx
  mov    %rbx,%rdi
  mov    $0x1,%esi
  call   <fwrite@plt>
  mov    %r13,%rcx
  mov    $0x3,%edx
  mov    %rbx,%rdi
  mov    $0x1,%esi
  call   <fwrite@plt>
L55:
  mov    %r13,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  mov    %rbx,%rdi
  call   <fwrite@plt>
  add    $0x1,%ebp
  cmp    $0x11,%ebp
  jne    L63
L41:
  lea    0x10(%rsp),%rdx
  lea    D47(%rip),%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
L71:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L85
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L85:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D13
data_type: string
name: parse_data
arguments: tag: D47
data_type: string
name: parse_data
arguments: tag: D4
data_type: string
name: parse_data
arguments: tag: D49
data_type: string

tool: D13: %02X 

tool: D47:   %s


tool: D4:    

tool: D49:     

assistant: ```c
void DumpHex(FILE *fp, const uint8_t *data, unsigned len) {
  char str[18];
  unsigned i;
  unsigned pos;
  char c;
  for (i = 0, pos = 0; i < len; i++, pos++) {
    if (pos == 17) {
      str[pos] = 0;
      fprintf(fp, "  %s\n", str);
      pos = 0;
    } else if (pos == 8) {
      str[pos] = ' ';
      pos++;
      fprintf(fp, "%s", " ");
    }
    c = (char)data[i];
    if (isprint(c) && (c == ' ' || !isspace(c)))
      str[pos] = c;
    else
      str[pos] = '.';
    fprintf(fp, "%02X ", data[i]);
  }
  if (pos) {
    str[pos] = 0;
    for (; pos < 17; pos++) {
      if (pos == 8) {
        str[pos] = ' ';
        pos++;
        fprintf(fp, "%s", "    ");
      } else {
        fprintf(fp, "%s", "   ");
      }
    }
    fprintf(fp, "  %s\n", str);
  }
}
```