user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<piece_hexdump>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edx,0x18(%rsp)
  mov    %rcx,0x10(%rsp)
  mov    %ecx,0xc(%rsp)
  test   %ecx,%ecx
  jle    L95
  movl   $0x0,0x8(%rsp)
  lea    0x40(%rsi),%r15
  xor    %r11d,%r11d
  xor    %ebx,%ebx
  nopl   0x0(%rax,%rax,1)
L15:
  lea    -0x40(%r15),%r14
  mov    $0x1,%r12d
  xor    %edx,%edx
  mov    %r14,%rax
  nop
L13:
  mov    (%rax),%ecx
  test   %ecx,%ecx
  cmovne %edx,%r12d
  add    $0x4,%rax
  cmp    %r15,%rax
  jne    L13
  mov    %r12d,%eax
  xor    $0x1,%eax
  test   %r11d,%r11d
  je     L39
  test   $0x1,%al
  je     L76
L98:
  mov    0x18(%rsp),%eax
  xor    %r13d,%r13d
  lea    D25(%rip),%rsi
  mov    %rbp,%rdi
  lea    (%rax,%rbx,1),%edx
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %r12d,0x1c(%rsp)
  mov    %r13,%r12
  mov    0xc(%rsp),%r13d
  jmp    L5
  nopw   0x0(%rax,%rax,1)
L175:
  mov    (%r14,%r12,4),%edx
  lea    D8(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  add    $0x1,%r12
  call   <fprintf@plt>
  cmp    $0x10,%r12
  je     L114
L5:
  lea    (%rbx,%r12,1),%eax
  cmp    %r13d,%eax
  jg     L114
  test   $0x7,%r12b
  jne    L175
  mov    %rbp,%rsi
  mov    $0x20,%edi
  call   <fputc@plt>
  jmp    L175
  nopl   (%rax)
L76:
  test   %r11d,%r11d
  jne    L134
  nopl   (%rax)
L39:
  or     0x8(%rsp),%eax
  jne    L98
L115:
  xor    %r11d,%r11d
L134:
  add    $0x10,%ebx
  add    $0x40,%r15
  cmp    0xc(%rsp),%ebx
  jge    L95
  mov    %r12d,0x8(%rsp)
  jmp    L15
L95:
  testb  $0xf,0x10(%rsp)
  jne    L47
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L114:
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  mov    0x1c(%rsp),%r12d
  lea    D37(%rip),%rdi
  call   <fwrite@plt>
  jmp    L174
  nopw   0x0(%rax,%rax,1)
L43:
  mov    (%r14),%edi
  add    $0x4,%r14
  call   <fputc@plt>
  cmp    %r15,%r14
  je     L191
L174:
  mov    (%r14),%edi
  call   <isprint@plt>
  mov    %rbp,%rsi
  test   %rax,%rax
  jne    L43
  mov    $0x2e,%edi
  add    $0x4,%r14
  call   <fputc@plt>
  cmp    %r15,%r14
  jne    L174
L191:
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D19(%rip),%rdi
  call   <fwrite@plt>
  and    %r12d,0x8(%rsp)
  je     L115
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D27(%rip),%rdi
  call   <fwrite@plt>
  mov    0x8(%rsp),%r11d
  jmp    L134
L47:
  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: D25
type_guessed: string
name: retrieve_data
arguments: label: D8
type_guessed: string
name: retrieve_data
arguments: label: D37
type_guessed: string
name: retrieve_data
arguments: label: D19
type_guessed: string
name: retrieve_data
arguments: label: D27
type_guessed: string

tool: D25: 0x%08jx

tool: D8: %02x 

tool: D37:  |

tool: D19: |


tool: D27: *


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");
  }
}
```