user: What is the c source code of the assembly code below:

```asm
<outhalves>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %edx,-0x64(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x60(%rbp),%rax
  shr    $0x2,%rax
  mov    %rax,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x48(%rbp)
  jmp    L49
L34:
  mov    -0x30(%rbp),%rax
  sub    -0x48(%rbp),%rax
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L101
  addq   $0x1,-0x48(%rbp)
L49:
  mov    -0x48(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jl     L34
  jmp    L187
L101:
  nop
L187:
  mov    -0x48(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jne    L51
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <out@plt>
  jmp    L181
L51:
  cmpq   $0xfe,-0x48(%rbp)
  jle    L148
  mov    -0x48(%rbp),%rax
  shl    $0x2,%rax
  cmp    %rax,-0x30(%rbp)
  jle    L124
L148:
  movq   $0x0,-0x48(%rbp)
L124:
  andq   $0xfffffffffffffffc,-0x48(%rbp)
  mov    -0x48(%rbp),%rax
  sub    %rax,-0x30(%rbp)
  movl   $0x0,-0x4c(%rbp)
  movq   $0x0,-0x40(%rbp)
  jmp    L146
L84:
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x4c(%rbp)
  jae    L166
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4c(%rbp)
L166:
  addq   $0x1,-0x40(%rbp)
L146:
  mov    -0x40(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jl     L84
  cmpl   $0xff,-0x4c(%rbp)
  ja     L82
  cmpl   $0x63,-0x4c(%rbp)
  jbe    L125
  lea    D42(%rip),%rax
  jmp    L156
L125:
  lea    D11(%rip),%rax
  jmp    L156
L82:
  lea    D4(%rip),%rax
L156:
  mov    %rax,-0x28(%rbp)
  mov    $0x1,%edi
  call   <beginblock@plt>
  movq   $0x0,-0x40(%rbp)
  jmp    L167
L74:
  mov    -0x40(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <outf@plt>
  addq   $0x1,-0x40(%rbp)
L167:
  mov    -0x40(%rbp),%rax
  cmp    -0x30(%rbp),%rax
  jl     L74
  cmpq   $0x0,-0x48(%rbp)
  je     L120
  mov    -0x28(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  lea    D20(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  mov    -0x48(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <strf@plt>
  mov    %eax,%edi
  call   <outcomment@plt>
L120:
  mov    $0x0,%eax
  call   <endblock@plt>
L181:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L94
  call   <__stack_chk_fail@plt>
L94:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D37
datatype: string
name: extract_symbolic_data
arguments: data_tag: D42
datatype: string
name: extract_symbolic_data
arguments: data_tag: D11
datatype: string
name: extract_symbolic_data
arguments: data_tag: D4
datatype: string
name: extract_symbolic_data
arguments: data_tag: D20
datatype: string

tool: D37: { 0 }

tool: D42: 0x%02X

tool: D11: %u

tool: D4: 0x%04X

tool: D20: %s x %%ld

assistant: ```c
void outhalves(void const *ptr, long size, int ndx) {
  Elf64_Half const *halves = ptr;
  long count = size / sizeof *halves;
  char fmtbuf[16];
  char const *fmt = NULL;
  unsigned int max;
  long zeroes, i;
  (void)ndx;
  for (zeroes = 0; zeroes < count; ++zeroes)
    if (halves[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 < halves[i])
      max = halves[i];
  }
  fmt = max > 0xFF ? "0x%04X" : max > 99 ? "0x%02X" : "%u";
  beginblock(1);
  for (i = 0; i < count; ++i)
    outf(fmt, halves[i]);
  if (zeroes) {
    sprintf(fmtbuf, "%s x %%ld", fmt);
    outcomment(strf(fmtbuf, 0, zeroes));
  }
  endblock();
}
```