user: 请从给定的汇编指令推导出C源代码:

```asm
<dump_hex>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movb   $0x0,0x30(%rsp)
  test   %esi,%esi
  jle    L115
  cmp    $0xf,%esi
  jle    L103
  mov    %esi,%eax
  mov    %rdi,0x8(%rsp)
  xor    %r14d,%r14d
  lea    0x20(%rsp),%rbp
  sub    $0x10,%eax
  mov    %esi,0x18(%rsp)
  lea    0x2f(%rsp),%r12
  lea    D0(%rip),%rbx
  and    $0xfffffff0,%eax
  mov    $0x2,%r13d
  add    $0x10,%eax
  mov    %eax,0x1c(%rsp)
  lea    D20(%rip),%rax
  mov    %rax,(%rsp)
  nopw   0x0(%rax,%rax,1)
L135:
  mov    0x8(%rsp),%rsi
  mov    $0x10,%edx
  mov    %rbp,%rdi
  mov    %rbp,%r15
  call   <memcpy@plt>
  mov    (%rsp),%rdi
  mov    %r14d,%esi
  xor    %eax,%eax
  add    $0x10,%r14d
  call   <printf@plt>
  movzbl 0x20(%rsp),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L189
  nopl   0x0(%rax,%rax,1)
L85:
  movzbl 0x1(%r15),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x0(%r13,%r15,1),%eax
  test   $0x3,%al
  jne    L116
  mov    $0x20,%edi
  call   <putchar@plt>
L116:
  add    $0x1,%r15
L189:
  movzbl (%r15),%eax
  lea    0x7f(%rax),%ecx
  cmp    $0xfd,%cl
  ja     L188
  cmp    $0x1f,%al
  ja     L91
L188:
  movb   $0x2e,(%r15)
L91:
  cmp    %r12,%r15
  jne    L85
  mov    %rbp,%rdi
  call   <puts@plt>
  mov    0x18(%rsp),%esi
  addq   $0x10,0x8(%rsp)
  sub    %r14d,%esi
  cmp    0x1c(%rsp),%r14d
  jne    L135
  test   %esi,%esi
  jle    L115
L15:
  lea    (%rsi,%r14,1),%eax
  mov    %esi,%r12d
  lea    0x1f(%rsp),%r13
  mov    %eax,0x8(%rsp)
  lea    D19(%rip),%r14
  xchg   %ax,%ax
L29:
  mov    0x8(%rsp),%r15d
  mov    %r12d,%edx
  mov    %rbp,%rdi
  sub    %r12d,%r15d
  mov    %r15d,%esi
  add    0x10(%rsp),%rsi
  call   <memcpy@plt>
  mov    (%rsp),%rdi
  mov    %r15d,%esi
  xor    %eax,%eax
  mov    $0x1,%r15d
  call   <printf@plt>
  movzbl 0x20(%rsp),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L102
L56:
  movzbl 0x0(%rbp,%r15,1),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x1(%r15),%eax
  test   $0x3,%al
  jne    L46
  mov    $0x20,%edi
  call   <putchar@plt>
L46:
  add    $0x1,%r15
L102:
  movzbl 0x0(%r13,%r15,1),%eax
  lea    0x7f(%rax),%ecx
  cmp    $0xfd,%cl
  ja     L114
  cmp    $0x1f,%al
  ja     L129
L114:
  movb   $0x2e,0x0(%r13,%r15,1)
L129:
  cmp    %r15d,%r12d
  ja     L56
  mov    %r12d,%r15d
  jmp    L172
  nopl   0x0(%rax,%rax,1)
L75:
  cmp    $0x10,%r15d
  je     L66
L172:
  mov    %r14,%rdi
  xor    %eax,%eax
  add    $0x1,%r15d
  call   <printf@plt>
  test   $0x3,%r15b
  jne    L75
  mov    $0x20,%edi
  call   <putchar@plt>
  cmp    $0x10,%r15d
  jne    L172
L66:
  mov    %r12d,%eax
  mov    %rbp,%rdi
  sub    $0x10,%r12d
  movb   $0x0,0x20(%rsp,%rax,1)
  call   <puts@plt>
  test   %r12d,%r12d
  jg     L29
L115:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L179
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L103:
  lea    D20(%rip),%rax
  xor    %r14d,%r14d
  lea    0x20(%rsp),%rbp
  mov    %rax,(%rsp)
  lea    D0(%rip),%rbx
  jmp    L15
L179:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D0
data_type: string
name: parse_data
arguments: data_label: D20
data_type: string
name: parse_data
arguments: data_label: D19
data_type: string

tool: D0: %02X

tool: D20: %08X	

tool: D19:    

assistant: ```c
void dump_hex(char *str, int len) {
  char d[17];
  d[16] = 0;
  unsigned int i, bytes, index = 0;
  int left_len = len;
  while (left_len > 0) {
    if (left_len / 16 >= 1) {
      memcpy(d, str + index, 16);
      bytes = 16;
    } else {
      memcpy(d, str + index, left_len);
      bytes = left_len;
    }
    printf("%08X\t", index);
    index += 16;
    for (i = 0; i < bytes; i++) {
      printf("%02X", (unsigned char)(d[i]));
      if ((i + 1) % 4 == 0)
        printf(" ");
      if (d[i] == 127 || d[i] < -127 || (d[i] >= 0 && d[i] <= 31))
        d[i] = '.';
    }
    if (bytes < 16) {
      for (i = bytes; i < 16; i++) {
        printf("   ");
        if ((i + 1) % 4 == 0)
          printf(" ");
      }
      d[bytes] = '\0';
    }
    printf("%s\n", d);
    left_len -= 16;
  }
}
```