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

```asm
<outphdr64>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbx
  movabs $0xcccccccccccccccd,%rdx
  mov    %rsi,%rax
  mul    %rdx
  shr    $0x5,%rdx
  mov    %rdx,%r14
  mov    $0x1,%edi
  call   <beginblock@plt>
  test   %r14,%r14
  jle    L48
  mov    $0x0,%r12d
  lea    D37(%rip),%r15
  jmp    L14
L30:
  mov    %ebp,%esi
  call   <getsizestr@plt>
  mov    %rax,0x8(%rsp)
  mov    %rax,%rdi
  call   <out@plt>
  mov    0x8(%rbx),%rdi
  mov    (%rbx),%rax
  cmp    %rax,%rdi
  je     L86
  jge    L62
  call   <strhex@plt>
  mov    %rax,%rdi
  call   <out@plt>
L36:
  mov    0x10(%r13),%edi
  mov    %ebp,%esi
  call   <getentsizestr@plt>
  mov    %rax,%rdi
  call   <out@plt>
  mov    $0x0,%eax
  call   <endblock@plt>
  add    $0x1,%r12
  add    $0x28,%rbx
  cmp    %r12,%r14
  je     L48
L14:
  mov    $0x0,%edi
  call   <beginblock@plt>
  mov    %rbx,%r13
  mov    0x24(%rbx),%edi
  mov    %r15,%rsi
  call   <strdefint@plt>
  mov    %rax,%rdi
  call   <out@plt>
  mov    0x20(%rbx),%edi
  lea    D1(%rip),%rsi
  call   <strdefflags@plt>
  mov    %rax,%rdi
  call   <out@plt>
  mov    0x1c(%rbx),%edi
  call   <getindexfromoffset@plt>
  mov    %eax,%ebp
  mov    0x1c(%rbx),%edi
  mov    %eax,%esi
  call   <getoffsetstr@plt>
  mov    %rax,%rdi
  call   <out@plt>
  mov    0x18(%rbx),%edi
  call   <straddress@plt>
  mov    %rax,%rdi
  call   <out@plt>
  mov    0x14(%rbx),%edi
  call   <straddress@plt>
  mov    %rax,%rdi
  call   <out@plt>
  mov    (%rbx),%rdi
  test   %rdi,%rdi
  jne    L30
  lea    D35(%rip),%rdi
  call   <out@plt>
  mov    0x8(%rbx),%rdi
  call   <strhex@plt>
  mov    %rax,%rdi
  call   <out@plt>
  jmp    L36
L86:
  mov    0x8(%rsp),%rdi
  call   <out@plt>
  jmp    L36
L62:
  mov    %rdi,%rdx
  sub    %rax,%rdx
  mov    0x8(%rsp),%rsi
  lea    D12(%rip),%rdi
  call   <outf@plt>
  jmp    L36
L48:
  mov    $0x0,%eax
  call   <endblock@plt>
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: tag: D37
data_type: string
name: unpack_data
arguments: tag: D1
data_type: string
name: unpack_data
arguments: tag: D35
data_type: string
name: unpack_data
arguments: tag: D12
data_type: string

tool: D37: PT_

tool: D1: PF_

tool: D35: 0

tool: D12: %s + %ld

assistant: ```c
void outphdr64(void const *ptr, long size, int ndx) {
  Elf64_Phdr const *phdrs = ptr;
  long count = size / sizeof *phdrs;
  char const *filesz;
  long i;
  beginblock(1);
  for (i = 0; i < count; ++i) {
    beginblock(0);
    (out(strdefint(phdrs[i].p_type, "PT_")));
    (out(strdefflags(phdrs[i].p_flags, "PF_")));
    ndx = getindexfromoffset(phdrs[i].p_offset);
    out(getoffsetstr(phdrs[i].p_offset, ndx));
    (out(straddress(phdrs[i].p_vaddr)));
    (out(straddress(phdrs[i].p_paddr)));
    if (phdrs[i].p_filesz == 0) {
      out("0");
      (out(strhex(phdrs[i].p_memsz)));
    } else {
      filesz = getsizestr(phdrs[i].p_filesz, ndx);
      out(filesz);
      if (phdrs[i].p_memsz == phdrs[i].p_filesz)
        out(filesz);
      else if (phdrs[i].p_memsz < phdrs[i].p_filesz)
        (out(strhex(phdrs[i].p_memsz)));
      else
        outf("%s + %ld", filesz, phdrs[i].p_memsz - phdrs[i].p_filesz);
    }
    out(getentsizestr(phdrs[i].p_align, ndx));
    endblock();
  }
  endblock();
}
```