user: Converte this assembly snippet into its equivalent C code:

```asm
<outxwords>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  shr    $0x3,%rsi
  je     L88
  mov    %rdi,%r13
  mov    %rsi,%rbp
  lea    -0x8(%rdi,%rsi,8),%rdx
  jmp    L23
  nopw   0x0(%rax,%rax,1)
L70:
  add    $0x1,%rax
  sub    $0x8,%rdx
  cmp    %rax,%rsi
  je     L88
L23:
  cmpq   $0x0,(%rdx)
  je     L70
  cmp    $0xfe,%rax
  jle    L172
  lea    0x0(,%rax,4),%rdx
  cmp    %rsi,%rdx
  jl     L172
  and    $0xfffffffffffffffc,%rax
  sub    %rax,%rsi
  mov    %rax,%r12
  mov    %rsi,%rbp
  test   %rsi,%rsi
  jg     L117
  mov    $0x1,%edi
  lea    D72(%rip),%r14
  call   <beginblock@plt>
L82:
  mov    %rsp,%rbp
  mov    %r14,%rdx
  lea    D31(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  mov    %r12,%rdx
  xor    %esi,%esi
  call   <strf@plt>
  mov    %eax,%edi
  call   <outcomment@plt>
  jmp    L133
  nopw   0x0(%rax,%rax,1)
L172:
  xor    %r12d,%r12d
L117:
  xor    %eax,%eax
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L97:
  mov    0x0(%r13,%rax,8),%rcx
  cmp    %rcx,%rdx
  cmovb  %rcx,%rdx
  add    $0x1,%rax
  cmp    %rbp,%rax
  jl     L97
  mov    %rdx,%rax
  shr    $0x20,%rax
  je     L167
  lea    D60(%rip),%r14
L28:
  mov    $0x1,%edi
  call   <beginblock@plt>
L10:
  xor    %ebx,%ebx
  nopl   0x0(%rax)
L0:
  mov    0x0(%r13,%rbx,8),%rsi
  mov    %r14,%rdi
  add    $0x1,%rbx
  call   <outf@plt>
  cmp    %rbp,%rbx
  jl     L0
  test   %r12,%r12
  jne    L82
L133:
  xor    %eax,%eax
  call   <endblock@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L174
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nop
L167:
  cmp    $0xffff,%rdx
  ja     L98
  cmp    $0xff,%rdx
  ja     L61
  lea    D13(%rip),%r14
  cmp    $0x63,%rdx
  ja     L28
  mov    $0x1,%edi
  lea    D72(%rip),%r14
  call   <beginblock@plt>
  jmp    L10
  nopl   (%rax)
L98:
  lea    D59(%rip),%r14
  jmp    L28
  nopl   0x0(%rax)
L88:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L174
  add    $0x20,%rsp
  lea    D22(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1130 <out@plt>
L61:
  lea    D73(%rip),%r14
  jmp    L28
L174:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D72
datatype: string
name: extract_symbolic_data
arguments: tag: D31
datatype: string
name: extract_symbolic_data
arguments: tag: D60
datatype: string
name: extract_symbolic_data
arguments: tag: D13
datatype: string
name: extract_symbolic_data
arguments: tag: D59
datatype: string
name: extract_symbolic_data
arguments: tag: D22
datatype: string
name: extract_symbolic_data
arguments: tag: D73
datatype: string

tool: D72: %lu

tool: D31: %s x %%ld

tool: D60: 0x%016lX

tool: D13: 0x%02lX

tool: D59: 0x%08lX

tool: D22: { 0 }

tool: D73: 0x%04lX

assistant: ```c
void outxwords(void const *ptr, long size, int ndx) {
  Elf64_Xword const *xwords = ptr;
  long count = size / sizeof *xwords;
  char fmtbuf[16];
  char const *fmt = NULL;
  unsigned long max;
  long zeroes, i;
  (void)ndx;
  for (zeroes = 0; zeroes < count; ++zeroes)
    if (xwords[count - zeroes - 1])
      break;
  if (zeroes == count) {
    out("{ 0 }");
    return;
  }
  if (zeroes < 255 || zeroes * 4 < count)
    zeroes = 0;
  zeroes &= ~3;
  count -= zeroes;
  max = 0;
  for (i = 0; i < count; ++i) {
    if (max < xwords[i])
      max = xwords[i];
  }
  fmt = max > 0xFFFFFFFF ? "0x%016lX" : max > 0x0000FFFF ? "0x%08lX" : max > 0x000000FF ? "0x%04lX" : max > 99 ? "0x%02lX" : "%lu";
  beginblock(1);
  for (i = 0; i < count; ++i)
    outf(fmt, xwords[i]);
  if (zeroes) {
    sprintf(fmtbuf, "%s x %%ld", fmt);
    outcomment(strf(fmtbuf, 0, zeroes));
  }
  endblock();
}
```