user: Translate the below assembly code into C programming language:

```asm
<DumpHex>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L52
L25:
  cmpl   $0x11,-0x24(%rbp)
  jne    L101
  mov    -0x24(%rbp),%eax
  movb   $0x0,-0x20(%rbp,%rax,1)
  lea    -0x20(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  lea    D19(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  movl   $0x0,-0x24(%rbp)
  jmp    L125
L101:
  cmpl   $0x8,-0x24(%rbp)
  jne    L125
  mov    -0x24(%rbp),%eax
  movb   $0x20,-0x20(%rbp,%rax,1)
  addl   $0x1,-0x24(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x20,%edi
  call   <fputc@plt>
L125:
  mov    -0x28(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %al,-0x29(%rbp)
  movsbl -0x29(%rbp),%eax
  mov    %eax,%edi
  call   <isprint@plt>
  test   %rax,%rax
  je     L73
  cmpb   $0x20,-0x29(%rbp)
  je     L42
  movsbl -0x29(%rbp),%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %eax,%eax
  jne    L73
L42:
  mov    -0x24(%rbp),%eax
  movzbl -0x29(%rbp),%edx
  mov    %dl,-0x20(%rbp,%rax,1)
  jmp    L93
L73:
  mov    -0x24(%rbp),%eax
  movb   $0x2e,-0x20(%rbp,%rax,1)
L93:
  mov    -0x28(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x38(%rbp),%rax
  lea    D4(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  addl   $0x1,-0x28(%rbp)
  addl   $0x1,-0x24(%rbp)
L52:
  mov    -0x28(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jb     L25
  cmpl   $0x0,-0x24(%rbp)
  je     L41
  mov    -0x24(%rbp),%eax
  movb   $0x0,-0x20(%rbp,%rax,1)
  jmp    L108
L89:
  cmpl   $0x8,-0x24(%rbp)
  jne    L96
  mov    -0x24(%rbp),%eax
  movb   $0x20,-0x20(%rbp,%rax,1)
  addl   $0x1,-0x24(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  jmp    L4
L96:
  mov    -0x38(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
L4:
  addl   $0x1,-0x24(%rbp)
L108:
  cmpl   $0x10,-0x24(%rbp)
  jbe    L89
  lea    -0x20(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  lea    D19(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
L41:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L119
  call   <__stack_chk_fail@plt>
L119:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D19
datatype: string
name: read_data
arguments: data_tag: D4
datatype: string
name: read_data
arguments: data_tag: D36
datatype: string
name: read_data
arguments: data_tag: D0
datatype: string

tool: D19:   %s


tool: D4: %02X 

tool: D36:     

tool: D0:    

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