user: What would the C source look like for the assembly code provided here?

```asm
<piece_hexdump>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edx,0x1c(%rsp)
  mov    %rcx,0x10(%rsp)
  mov    %ecx,0xc(%rsp)
  test   %ecx,%ecx
  jle    L83
  movl   $0x0,0x18(%rsp)
  mov    %rsi,%r15
  xor    %r11d,%r11d
  xor    %ebx,%ebx
  xor    %r14d,%r14d
  nopl   (%rax)
L167:
  mov    (%r15),%eax
  xor    %r13d,%r13d
  or     0x4(%r15),%eax
  mov    0x8(%r15),%eax
  sete   %r13b
  mov    0xc(%r15),%edx
  mov    0x10(%r15),%ecx
  mov    0x14(%r15),%esi
  test   %eax,%eax
  mov    0x18(%r15),%edi
  mov    0x1c(%r15),%r8d
  cmovne %r14d,%r13d
  test   %edx,%edx
  mov    0x20(%r15),%r9d
  mov    0x24(%r15),%r10d
  mov    0x28(%r15),%r12d
  mov    0x2c(%r15),%eax
  cmovne %r14d,%r13d
  test   %ecx,%ecx
  cmovne %r14d,%r13d
  test   %esi,%esi
  cmovne %r14d,%r13d
  test   %edi,%edi
  cmovne %r14d,%r13d
  test   %r8d,%r8d
  cmovne %r14d,%r13d
  test   %r9d,%r9d
  cmovne %r14d,%r13d
  test   %r10d,%r10d
  cmovne %r14d,%r13d
  test   %r12d,%r12d
  cmovne %r14d,%r13d
  test   %eax,%eax
  mov    0x30(%r15),%eax
  cmovne %r14d,%r13d
  test   %eax,%eax
  mov    0x34(%r15),%eax
  cmovne %r14d,%r13d
  test   %eax,%eax
  mov    0x38(%r15),%eax
  cmovne %r14d,%r13d
  test   %eax,%eax
  mov    0x3c(%r15),%eax
  cmovne %r14d,%r13d
  test   %eax,%eax
  jne    L69
  mov    %r13d,%eax
  mov    %r13d,%edx
  xor    $0x1,%eax
  xor    $0x1,%edx
L8:
  test   %r11d,%r11d
  je     L125
  test   %dl,%dl
  je     L125
L9:
  mov    0x1c(%rsp),%eax
  lea    D5(%rip),%rsi
  mov    %rbp,%rdi
  xor    %r12d,%r12d
  lea    (%rax,%rbx,1),%edx
  xor    %eax,%eax
  call   <fprintf@plt>
  jmp    L47
  nopw   0x0(%rax,%rax,1)
L140:
  mov    (%r15,%r12,4),%edx
  lea    D34(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%r12
  call   <fprintf@plt>
  cmp    $0x10,%r12
  je     L157
L47:
  lea    (%rbx,%r12,1),%eax
  cmp    %eax,0xc(%rsp)
  jl     L157
  test   $0x7,%r12b
  jne    L140
  mov    %rbp,%rsi
  mov    $0x20,%edi
  call   <fputc@plt>
  jmp    L140
  nopw   0x0(%rax,%rax,1)
L125:
  lea    0x40(%r15),%r12
  test   %r11d,%r11d
  jne    L76
  or     0x18(%rsp),%eax
  jne    L9
L0:
  xor    %r11d,%r11d
L76:
  add    $0x10,%ebx
  mov    %r12,%r15
  cmp    %ebx,0xc(%rsp)
  jle    L83
  mov    %r13d,0x18(%rsp)
  jmp    L167
  nopl   0x0(%rax,%rax,1)
L69:
  mov    $0x1,%edx
  mov    $0x1,%eax
  xor    %r13d,%r13d
  jmp    L8
L83:
  testb  $0xf,0x10(%rsp)
  jne    L15
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L157:
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D40(%rip),%rdi
  lea    0x40(%r15),%r12
  call   <fwrite@plt>
  jmp    L209
  nopl   0x0(%rax,%rax,1)
L42:
  mov    (%r15),%edi
  add    $0x4,%r15
  call   <fputc@plt>
  cmp    %r15,%r12
  je     L60
L209:
  mov    (%r15),%edi
  call   <isprint@plt>
  mov    %rbp,%rsi
  test   %rax,%rax
  jne    L42
  mov    $0x2e,%edi
  add    $0x4,%r15
  call   <fputc@plt>
  cmp    %r15,%r12
  jne    L209
L60:
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D8(%rip),%rdi
  call   <fwrite@plt>
  and    %r13d,0x18(%rsp)
  je     L0
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D28(%rip),%rdi
  call   <fwrite@plt>
  mov    0x18(%rsp),%r11d
  jmp    L76
L15:
  add    $0x28,%rsp
  mov    %rbp,%rsi
  mov    $0xa,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <fputc@plt>
```

tool_calls: name: retrieve_data
arguments: label: D5
datatype: string
name: retrieve_data
arguments: label: D34
datatype: string
name: retrieve_data
arguments: label: D40
datatype: string
name: retrieve_data
arguments: label: D8
datatype: string
name: retrieve_data
arguments: label: D28
datatype: string

tool: D5: 0x%08jx

tool: D34: %02x 

tool: D40:  |

tool: D8: |


tool: D28: *


assistant: ```c
void piece_hexdump(FILE *stream, void *data, off_t offset, size_t size) {
  uint8_t *src = data;
  off_t i, j;
  bool curr_zeros = false, prev_zeros = false, skip_zeros = false;
  for (i = 0; i < (off_t)size; i += 16) {
    curr_zeros = true;
    for (j = 0; j < 16; j++) {
      if (src[i + j] != 0x00) {
        curr_zeros = false;
      }
    }
    if (!curr_zeros && skip_zeros) {
      skip_zeros = false;
    }
    if (!skip_zeros && !(curr_zeros && !prev_zeros)) {
      fprintf(stream, "0x%08jx", offset + i);
      for (j = 0; j < 16; j++) {
        if (i + j > (off_t)size)
          break;
        if (j % 8 == 0) {
          fprintf(stream, " ");
        }
        fprintf(stream, "%02x ", src[i + j]);
      }
      fprintf(stream, " |");
      for (j = 0; j < 16; j++) {
        if (isprint(src[i + j])) {
          fprintf(stream, "%c", src[i + j]);
        } else {
          fprintf(stream, ".");
        }
      }
      fprintf(stream, "|\n");
    }
    if (curr_zeros && prev_zeros) {
      if (!skip_zeros) {
        fprintf(stream, "*\n");
        skip_zeros = true;
      }
    }
    prev_zeros = curr_zeros;
  }
  if (size % 16) {
    fprintf(stream, "\n");
  }
}
```