user: 请将以下的汇编代码转换成C语言代码:

```asm
<make_hex_dump>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  mov    %rsi,%rdi
  shr    $0x4,%rdi
  push   %rbx
  mov    %rsi,%rbx
  add    $0x1,%edi
  imul   $0x42,%edi,%edi
  sub    $0x38,%rsp
  mov    %rsi,0x28(%rsp)
  add    $0x2,%edi
  call   <malloc@plt>
  mov    %rax,%r13
  test   %rbx,%rbx
  je     L33
  movq   $0x0,0x20(%rsp)
  xor    %ebx,%ebx
  lea    D2(%rip),%r15
L101:
  mov    0x28(%rsp),%rcx
  lea    0x10(%rbx),%rax
  mov    %rbx,%rsi
  mov    %rbx,0x18(%rsp)
  mov    %rax,0x8(%rsp)
  cmp    %rax,%rcx
  cmovbe %rcx,%rax
  mov    %rax,%rbx
  cmp    %rsi,%rax
  jbe    L69
  mov    0x20(%rsp),%rax
  lea    0x0(%rbp,%rsi,1),%r12
  lea    0x0(%r13,%rax,1),%r14
  lea    0x0(%rbp,%rbx,1),%rax
  mov    %rax,0x10(%rsp)
  nopw   0x0(%rax,%rax,1)
L107:
  movzbl (%r12),%edx
  mov    %r14,%rdi
  mov    %r15,%rsi
  xor    %eax,%eax
  add    $0x1,%r12
  add    $0x3,%r14
  call   <sprintf@plt>
  cmp    %r12,0x10(%rsp)
  jne    L107
  mov    0x20(%rsp),%rcx
  mov    %rbx,%rax
  sub    0x18(%rsp),%rax
  lea    (%rax,%rax,2),%rax
  lea    (%rcx,%rax,1),%rsi
  lea    0x1(%rcx),%rdx
  mov    %rbx,%rcx
  cmp    %rbx,0x8(%rsp)
  jbe    L89
L99:
  lea    0x0(%r13,%rsi,1),%rdx
  mov    %rcx,%rax
  nopl   0x0(%rax,%rax,1)
L130:
  movl   $0x202020,(%rdx)
  add    $0x1,%rax
  add    $0x3,%rdx
  cmp    %rax,0x8(%rsp)
  ja     L130
  mov    0x18(%rsp),%rdi
  xor    %edx,%edx
  mov    %rdi,%rax
  sub    %rcx,%rax
  add    $0x1,%rcx
  cmp    %rcx,0x8(%rsp)
  lea    0x2d(%rax,%rax,2),%rax
  cmovb  %rdx,%rax
  lea    0x4(%rsi,%rax,1),%rcx
  add    %r13,%rax
  mov    %rcx,0x8(%rsp)
  movb   $0x20,0x3(%rsi,%rax,1)
  cmp    %rdi,%rbx
  jbe    L55
L5:
  mov    0x18(%rsp),%rax
  mov    0x8(%rsp),%r12
  mov    %rax,%r14
  sub    %rax,%r12
  nopl   0x0(%rax,%rax,1)
L93:
  movsbl 0x0(%rbp,%r14,1),%edi
  call   <isprint@plt>
  test   %rax,%rax
  je     L35
  movzbl 0x0(%rbp,%r14,1),%ecx
  lea    0x0(%r13,%r12,1),%rax
  mov    %cl,(%rax,%r14,1)
  add    $0x1,%r14
  cmp    %r14,%rbx
  ja     L93
L113:
  mov    0x18(%rsp),%rcx
  mov    %rbx,%rax
  xor    %edx,%edx
  mov    0x8(%rsp),%rsi
  sub    %rcx,%rax
  add    $0x1,%rcx
  sub    $0x1,%rax
  cmp    %rcx,%rbx
  cmovb  %rdx,%rax
  lea    0x1(%rsi,%rax,1),%rax
  mov    %rax,0x8(%rsp)
L55:
  mov    0x8(%rsp),%rax
  lea    0x1(%rax),%rsi
  movb   $0xa,0x0(%r13,%rax,1)
  mov    %rsi,0x20(%rsp)
  cmp    %rbx,0x28(%rsp)
  ja     L101
  mov    %rsi,%rax
  add    %r13,%rax
L33:
  movb   $0x0,(%rax)
  add    $0x38,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L35:
  lea    0x0(%r13,%r12,1),%rax
  movb   $0x2e,(%rax,%r14,1)
  add    $0x1,%r14
  cmp    %r14,%rbx
  ja     L93
  jmp    L113
  nopl   0x0(%rax)
L69:
  mov    %rsi,%rax
  mov    0x20(%rsp),%rsi
  mov    %rax,%rcx
  cmp    %rax,0x8(%rsp)
  ja     L99
  mov    %rsi,%rax
  lea    0x1(%rsi),%rsi
  mov    %rsi,0x8(%rsp)
  movb   $0x20,0x0(%r13,%rax,1)
  jmp    L55
  nopl   (%rax)
L89:
  add    %rdx,%rax
  movb   $0x20,0x0(%r13,%rsi,1)
  mov    %rax,0x8(%rsp)
  jmp    L5
```

tool_calls: name: disassemble_data
arguments: label: D2
type_infered: string

tool: D2: %02x 

assistant: ```c
char *make_hex_dump(const char *data, size_t len) {
  int lines = (len / 16) + 1;
  char *buf = malloc(lines * (16 * 3 + 16 + 2) + 2);
  size_t i, j, k, ch, nl;
  int cc;
  ch = 0;
  for (i = 0; i < len;) {
    nl = j = i + 16;
    if (j > len) {
      j = len;
    }
    for (k = i; k < j; k++) {
      sprintf(buf + ch, "%02x ", (unsigned char)data[k]);
      ch += 3;
    }
    for (; k < nl; k++) {
      sprintf(buf + ch, "   ");
      ch += 3;
    }
    buf[ch++] = ' ';
    for (k = i; k < j; k++) {
      cc = data[k];
      if (isprint(cc)) {
        buf[ch++] = data[k];
      } else {
        buf[ch++] = '.';
      }
    }
    i = j;
    buf[ch++] = '\n';
  }
  buf[ch] = '\0';
  return buf;
}
```