user: 请将以下的汇编代码转换成C语言代码：

```asm
<outphdr64>:
  endbr64
  movabs $0xcccccccccccccccd,%rdx
  mov    %rsi,%rax
  push   %r15
  mul    %rdx
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  shr    $0x5,%rdx
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    $0x1,%edi
  sub    $0x18,%rsp
  mov    %rdx,(%rsp)
  call   <beginblock@plt>
  cmp    $0x27,%rbp
  jbe    L52
  xor    %ebp,%ebp
  lea    D21(%rip),%r14
  lea    D23(%rip),%r13
  lea    D5(%rip),%r15
  jmp    L41
  nopl   (%rax)
L59:
  mov    %r15,%rdi
  call   <out@plt>
  mov    0x8(%rbx),%rdi
  call   <strhex@plt>
  mov    %rax,%rdi
  call   <out@plt>
L55:
  mov    0x10(%rbx),%edi
  mov    %r12d,%esi
  add    $0x1,%rbp
  add    $0x28,%rbx
  call   <getentsizestr@plt>
  mov    %rax,%rdi
  call   <out@plt>
  xor    %eax,%eax
  call   <endblock@plt>
  cmp    %rbp,(%rsp)
  je     L52
L41:
  xor    %edi,%edi
  call   <beginblock@plt>
  mov    0x24(%rbx),%edi
  mov    %r14,%rsi
  call   <strdefint@plt>
  mov    %rax,%rdi
  call   <out@plt>
  mov    0x20(%rbx),%edi
  mov    %r13,%rsi
  call   <strdefflags@plt>
  mov    %rax,%rdi
  call   <out@plt>
  mov    0x1c(%rbx),%edi
  call   <getindexfromoffset@plt>
  mov    0x1c(%rbx),%edi
  mov    %eax,%esi
  mov    %eax,%r12d
  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
  je     L59
  mov    %r12d,%esi
  call   <getsizestr@plt>
  mov    %rax,%rdi
  mov    %rax,0x8(%rsp)
  call   <out@plt>
  mov    0x8(%rbx),%rdi
  mov    (%rbx),%rax
  mov    0x8(%rsp),%rsi
  cmp    %rax,%rdi
  je     L49
  jge    L74
  call   <strhex@plt>
  mov    %rax,%rdi
  call   <out@plt>
  jmp    L55
  nopl   (%rax)
L74:
  mov    %rdi,%rdx
  lea    D13(%rip),%rdi
  sub    %rax,%rdx
  call   <outf@plt>
  jmp    L55
  nop
L52:
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1150 <endblock@plt>
  nopl   (%rax)
L49:
  mov    %rsi,%rdi
  call   <out@plt>
  jmp    L55
```

tool_calls: name: read_data
arguments: label: D21
datatype: string
name: read_data
arguments: label: D23
datatype: string
name: read_data
arguments: label: D5
datatype: string
name: read_data
arguments: label: D13
datatype: string

tool: D21: PT_

tool: D23: PF_

tool: D5: 0

tool: D13: %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();
}
```