user: Demonstrate the C code that generates the assembly output below:

```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     L121
  lea    -0x1(%rdx),%eax
  mov    %rdi,%r13
  mov    %rsi,%rbx
  xor    %ebp,%ebp
  lea    0x4(%rsi,%rax,4),%rax
  mov    %rax,0x8(%rsp)
  jmp    L111
  nopl   0x0(%rax)
L20:
  cmp    $0x8,%ebp
  je     L36
  mov    %ebp,0x4(%rsp)
  add    $0x1,%ebp
L54:
  mov    (%rbx),%r12d
  movsbl %r12b,%r14d
  mov    %r12d,%r15d
  mov    %r14d,%edi
  call   <isprint@plt>
  test   %rax,%rax
  je     L128
  cmp    $0x20,%r12b
  je     L49
  mov    %r14d,%edi
  call   <isspace@plt>
  test   %eax,%eax
  je     L49
  nopl   0x0(%rax)
L128:
  mov    $0x2e,%r15d
L49:
  mov    0x4(%rsp),%r12d
  mov    (%rbx),%edx
  lea    D49(%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     L0
L111:
  cmp    $0x11,%ebp
  jne    L20
  lea    0x10(%rsp),%rdx
  mov    %r13,%rdi
  xor    %eax,%eax
  movb   $0x0,0x21(%rsp)
  lea    D22(%rip),%rsi
  mov    $0x1,%ebp
  call   <fprintf@plt>
  movl   $0x0,0x4(%rsp)
  jmp    L54
  nopl   0x0(%rax,%rax,1)
L36:
  mov    %r13,%rsi
  mov    $0x20,%edi
  movb   $0x20,0x18(%rsp)
  mov    $0xa,%ebp
  call   <fputc@plt>
  movl   $0x9,0x4(%rsp)
  jmp    L54
  nopl   0x0(%rax)
L0:
  test   %ebp,%ebp
  je     L121
  cmp    $0x10,%ebp
  ja     L97
  lea    D11(%rip),%rbx
  lea    D45(%rip),%r12
L147:
  cmp    $0x8,%ebp
  jne    L10
  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
  movb   $0x0,0x19(%rsp)
  call   <fwrite@plt>
  mov    %r13,%rcx
  mov    $0x3,%edx
  mov    %rbx,%rdi
  mov    $0x1,%esi
  movb   $0x0,0x1a(%rsp)
  call   <fwrite@plt>
  movb   $0x0,0x1b(%rsp)
L10:
  mov    %r13,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  mov    %rbx,%rdi
  call   <fwrite@plt>
  mov    %ebp,%eax
  add    $0x1,%ebp
  movb   $0x0,0x10(%rsp,%rax,1)
  cmp    $0x11,%ebp
  jne    L147
L97:
  lea    0x10(%rsp),%rdx
  mov    %r13,%rdi
  xor    %eax,%eax
  movb   $0x0,0x10(%rsp,%rbp,1)
  lea    D22(%rip),%rsi
  call   <fprintf@plt>
L121:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D49
type_guessed: string
name: read_data
arguments: data_tag: D22
type_guessed: string
name: read_data
arguments: data_tag: D11
type_guessed: string
name: read_data
arguments: data_tag: D45
type_guessed: string

tool: D49: %02X 

tool: D22:   %s


tool: D11:    

tool: D45:     

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) {
    for (; pos < 17; pos++) {
      if (pos == 8) {
        str[pos] = ' ';
        pos++;
        fprintf(fp, "%s", "    ");
      } else {
        fprintf(fp, "%s", "   ");
      }
      str[pos] = 0;
    }
    str[pos] = 0;
    fprintf(fp, "  %s\n", str);
  }
}
```