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

```asm
<outphdr64>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x30(%rbp),%rax
  movabs $0xcccccccccccccccd,%rdx
  mul    %rdx
  mov    %rdx,%rax
  shr    $0x5,%rax
  mov    %rax,-0x10(%rbp)
  mov    $0x1,%edi
  call   <beginblock@plt>
  movq   $0x0,-0x20(%rbp)
  jmp    L47
L63:
  mov    $0x0,%edi
  call   <beginblock@plt>
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    0x24(%rax),%eax
  lea    D6(%rip),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <strdefint@plt>
  mov    %rax,%rdi
  call   <out@plt>
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    0x20(%rax),%eax
  lea    D4(%rip),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <strdefflags@plt>
  mov    %rax,%rdi
  call   <out@plt>
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    0x1c(%rax),%eax
  mov    %eax,%edi
  call   <getindexfromoffset@plt>
  mov    %eax,-0x34(%rbp)
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    0x1c(%rax),%eax
  mov    -0x34(%rbp),%edx
  mov    %edx,%esi
  mov    %eax,%edi
  call   <getoffsetstr@plt>
  mov    %rax,%rdi
  call   <out@plt>
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    0x18(%rax),%eax
  mov    %eax,%edi
  call   <straddress@plt>
  mov    %rax,%rdi
  call   <out@plt>
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    0x14(%rax),%eax
  mov    %eax,%edi
  call   <straddress@plt>
  mov    %rax,%rdi
  call   <out@plt>
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L14
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <out@plt>
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    0x8(%rax),%rax
  mov    %rax,%rdi
  call   <strhex@plt>
  mov    %rax,%rdi
  call   <out@plt>
  jmp    L52
L14:
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x34(%rbp),%edx
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <getsizestr@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <out@plt>
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    0x8(%rax),%rcx
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  cmp    %rax,%rcx
  jne    L2
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <out@plt>
  jmp    L52
L2:
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    0x8(%rax),%rcx
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  cmp    %rax,%rcx
  jge    L29
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    0x8(%rax),%rax
  mov    %rax,%rdi
  call   <strhex@plt>
  mov    %rax,%rdi
  call   <out@plt>
  jmp    L52
L29:
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    0x8(%rax),%rcx
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  sub    %rax,%rcx
  mov    %rcx,%rdx
  mov    -0x8(%rbp),%rax
  mov    %rax,%rsi
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  call   <outf@plt>
L52:
  mov    -0x20(%rbp),%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    0x10(%rax),%eax
  mov    -0x34(%rbp),%edx
  mov    %edx,%esi
  mov    %eax,%edi
  call   <getentsizestr@plt>
  mov    %rax,%rdi
  call   <out@plt>
  mov    $0x0,%eax
  call   <endblock@plt>
  addq   $0x1,-0x20(%rbp)
L47:
  mov    -0x20(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jl     L63
  mov    $0x0,%eax
  call   <endblock@plt>
  nop
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D6
data_type: string
name: retrieve_data
arguments: label: D4
data_type: string
name: retrieve_data
arguments: label: D2
data_type: string
name: retrieve_data
arguments: label: D25
data_type: string

tool: D6: PT_

tool: D4: PF_

tool: D2: 0

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