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

```asm
<dump_mem>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpq   $0x0,-0x58(%rbp)
  jne    L96
  mov    -0x68(%rbp),%rax
  mov    %eax,%esi
  lea    D75(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ssh_log@plt>
  jmp    L54
L96:
  mov    -0x68(%rbp),%rax
  mov    %eax,%edx
  mov    -0x58(%rbp),%rax
  mov    %rax,%rsi
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ssh_log@plt>
L54:
  movq   $0x0,-0x48(%rbp)
  jmp    L20
L55:
  mov    -0x48(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x30(%rbp)
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ssh_log@plt>
  mov    -0x68(%rbp),%rax
  sub    -0x48(%rbp),%rax
  mov    $0x10,%edx
  cmp    %rdx,%rax
  cmova  %rdx,%rax
  mov    %rax,-0x28(%rbp)
  movq   $0x0,-0x40(%rbp)
  mov    -0x40(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  jmp    L90
L17:
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%esi
  lea    D60(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ssh_log@plt>
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x1f,%eax
  jle    L73
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x7e,%eax
  jg     L73
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%ecx
  jmp    L29
L73:
  mov    $0x2e,%ecx
L29:
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  mov    %cl,-0x20(%rbp,%rax,1)
  cmpq   $0x7,-0x40(%rbp)
  jne    L47
  lea    D73(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ssh_log@plt>
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movb   $0x20,-0x20(%rbp,%rax,1)
L47:
  addq   $0x1,-0x40(%rbp)
L90:
  mov    -0x40(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jb     L17
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movb   $0x0,-0x20(%rbp,%rax,1)
  mov    -0x28(%rbp),%rax
  add    %rax,-0x48(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x40(%rbp)
  jmp    L36
L59:
  lea    D71(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ssh_log@plt>
  cmpq   $0x7,-0x40(%rbp)
  jne    L134
  lea    D73(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ssh_log@plt>
L134:
  addq   $0x1,-0x40(%rbp)
L36:
  cmpq   $0xf,-0x40(%rbp)
  jbe    L59
  lea    -0x20(%rbp),%rax
  mov    %rax,%rsi
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ssh_log@plt>
L20:
  mov    -0x48(%rbp),%rax
  cmp    -0x68(%rbp),%rax
  jb     L55
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L137
  call   <__stack_chk_fail@plt>
L137:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D75
datatype: string
name: parse_data
arguments: label: D11
datatype: string
name: parse_data
arguments: label: D0
datatype: string
name: parse_data
arguments: label: D60
datatype: string
name: parse_data
arguments: label: D73
datatype: string
name: parse_data
arguments: label: D71
datatype: string
name: parse_data
arguments: label: D46
datatype: string

tool: D75: * dumping %u bytes


tool: D11: %s (%u bytes)


tool: D0: | 

tool: D60: %02x 

tool: D73:  

tool: D71:    

tool: D46: | %-17s |


assistant: ```c
void dump_mem(const char *label, const void *data, size_t len) {
  char str[18];
  size_t cur, str_len;
  if (label == NULL)
    ssh_log("* dumping %u bytes\n", (unsigned int)len);
  else
    ssh_log("%s (%u bytes)\n", label, (unsigned int)len);
  cur = 0;
  while (cur < len) {
    const uint8_t *line = (const uint8_t *)data + cur;
    size_t i, si;
    ssh_log("| ");
    str_len = (len - cur > 16) ? 16 : len - cur;
    for (si = i = 0; i < str_len; i++) {
      ssh_log("%02x ", line[i]);
      str[si++] = (line[i] >= 32 && line[i] < 127) ? line[i] : '.';
      if (i == 7) {
        ssh_log(" ");
        str[si++] = ' ';
      }
    }
    str[si++] = '\0';
    cur += str_len;
    for (i = str_len; i < 16; i++) {
      ssh_log("   ");
      if (i == 7)
        ssh_log(" ");
    }
    ssh_log("| %-17s |\n", str);
  }
}
```