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

```asm
<ut_hexDumpBuf>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %esi,0x14(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movslq %esi,%rax
  lea    (%rdi,%rax,1),%rbp
  mov    %rax,0x18(%rsp)
  cmp    %rbp,%rdi
  jae    L174
  lea    0x20(%rsp),%r14
  mov    %rdi,%rbx
  mov    %rdi,%r12
  mov    %r14,(%rsp)
  lea    D11(%rip),%r13
  jmp    L203
  cs nopw 0x0(%rax,%rax,1)
L167:
  cmp    $0xf,%rax
  je     L104
  mov    %rsi,%r14
  mov    %r9,%r15
L95:
  add    $0x1,%r12
  cmp    %r12,%rbp
  je     L78
L203:
  movzbl (%r12),%edx
  mov    %r13,%rsi
  xor    %eax,%eax
  mov    %r15,%rdi
  call   <sprintf@plt>
  movzbl (%r12),%eax
  lea    0x3(%r15),%r9
  lea    0x1(%r14),%rsi
  lea    -0x20(%rax),%edx
  cmp    $0x5f,%dl
  mov    $0x2e,%edx
  cmovae %edx,%eax
  mov    %al,(%r14)
  mov    %r12,%rax
  sub    %rbx,%rax
  cqto
  shr    $0x3c,%rdx
  add    %rdx,%rax
  and    $0xf,%eax
  sub    %rdx,%rax
  cmp    $0x7,%rax
  jne    L167
  add    $0x1,%r12
  movb   $0x20,0x3(%r15)
  add    $0x2,%r14
  add    $0x4,%r15
  movb   $0x20,-0x1(%r14)
  cmp    %r12,%rbp
  jne    L203
L78:
  testb  $0xf,0x14(%rsp)
  je     L174
  mov    0x18(%rsp),%rcx
  mov    %rcx,%rax
  sar    $0x3f,%rax
  shr    $0x3c,%rax
  add    %rax,%rcx
  mov    %rcx,%r12
  and    $0xf,%r12d
  sub    %rax,%r12
  mov    %r12d,%ecx
  cmp    $0x7,%r12
  jg     L183
  movb   $0x20,(%r15)
  add    $0x1,%r15
L183:
  mov    $0xf,%eax
  sub    %r12d,%eax
  cmp    $0xe,%eax
  jbe    L140
  movdqa D16(%rip),%xmm0
  lea    0x30(%r15),%rax
  lea    0x10(%r12),%ecx
  movups %xmm0,(%r15)
  movups %xmm0,0x10(%r15)
  movups %xmm0,0x20(%r15)
  test   %r12d,%r12d
  je     L58
  mov    $0x10,%edx
L150:
  lea    (%rdx,%r12,1),%r10d
  mov    $0xf,%esi
  mov    $0x10,%r9d
  sub    %r10d,%esi
  sub    %r10d,%r9d
  cmp    $0x6,%esi
  jbe    L130
  mov    D16(%rip),%rsi
  lea    (%rdx,%rdx,2),%rdx
  add    %r15,%rdx
  mov    %rsi,(%rdx)
  mov    %rsi,0x8(%rdx)
  mov    %rsi,0x10(%rdx)
  mov    %r9d,%edx
  and    $0xfffffff8,%edx
  mov    %edx,%esi
  add    %edx,%ecx
  lea    (%rsi,%rsi,2),%rsi
  add    %rsi,%rax
  cmp    %edx,%r9d
  je     L58
L130:
  mov    $0x2020,%r11d
  movb   $0x20,0x2(%rax)
  mov    %r11w,(%rax)
  cmp    $0xf,%ecx
  je     L58
  mov    $0x2020,%r10d
  movb   $0x20,0x5(%rax)
  mov    %r10w,0x3(%rax)
  cmp    $0xe,%ecx
  je     L58
  mov    $0x2020,%r9d
  movb   $0x20,0x8(%rax)
  mov    %r9w,0x6(%rax)
  cmp    $0xd,%ecx
  je     L58
  mov    $0x2020,%r8d
  movb   $0x20,0xb(%rax)
  mov    %r8w,0x9(%rax)
  cmp    $0xc,%ecx
  je     L58
  mov    $0x2020,%edi
  movb   $0x20,0xe(%rax)
  mov    %di,0xc(%rax)
  cmp    $0xb,%ecx
  je     L58
  mov    $0x2020,%esi
  movb   $0x20,0x11(%rax)
  mov    %si,0xf(%rax)
  cmp    $0xa,%ecx
  je     L58
  mov    $0x2020,%edx
  movb   $0x20,0x14(%rax)
  mov    %dx,0x12(%rax)
L58:
  mov    $0x10,%eax
  movb   $0x0,(%r14)
  mov    (%rsp),%rdx
  lea    D43(%rip),%rsi
  sub    %r12d,%eax
  lea    (%rax,%rax,2),%rbx
  xor    %eax,%eax
  add    %rbx,%r15
  mov    %r15,%rdi
  call   <sprintf@plt>
  movslq %eax,%rdi
  add    %rdi,%r15
L174:
  movb   $0x0,(%r15)
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L76
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L104:
  movb   $0x0,0x1(%r14)
  mov    (%rsp),%r14
  mov    %r9,%rdi
  lea    D43(%rip),%rsi
  xor    %eax,%eax
  mov    %r9,0x8(%rsp)
  mov    %r14,%rdx
  call   <sprintf@plt>
  mov    0x8(%rsp),%r9
  movslq %eax,%rdi
  lea    (%r9,%rdi,1),%r15
  jmp    L95
L140:
  mov    %r15,%rax
  xor    %edx,%edx
  jmp    L150
L76:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D11
type_guessed: string
name: unpack_data
arguments: tag: D16
type_guessed: byte[16]
name: unpack_data
arguments: tag: D43
type_guessed: string

tool: D11: %02X 

tool: {"D16": [0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20]}

tool: D43:   %s


assistant: ```c
void ut_hexDumpBuf(const unsigned char *data, int len, char *out) {
  const unsigned char *b = data;
  const unsigned char *end = data + len;
  char buf[20];
  char *s = buf;
  int i;
  for (; b < end; b++) {
    out += sprintf(out, "%02X ", *b);
    if (' ' <= *b && *b < 127) {
      *s++ = (char)*b;
    } else {
      *s++ = '.';
    }
    i = (b - data) % 16;
    if (7 == i) {
      *out++ = ' ';
      *s++ = ' ';
    } else if (15 == i) {
      *s = '\0';
      out += sprintf(out, "  %s\n", buf);
      s = buf;
    }
  }
  i = (b - data) % 16;
  if (0 != i) {
    if (i < 8) {
      *out++ = ' ';
    }
    for (; i < 16; i++) {
      *out++ = ' ';
      *out++ = ' ';
      *out++ = ' ';
    }
    *s = '\0';
    out += sprintf(out, "  %s\n", buf);
  }
  *out = '\0';
}
```