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

```asm
<convert_elf_phdrs>:
  endbr64
  mov    %rdi,%rax
  test   %esi,%esi
  jle    L0
  movslq %esi,%rsi
  shl    $0x5,%rsi
  lea    (%rdi,%rsi,1),%rcx
  nopw   0x0(%rax,%rax,1)
L16:
  mov    (%rax),%edx
  mov    %edx,%esi
  mov    %edx,%edi
  sar    $0x18,%edi
  shl    $0x18,%esi
  or     %edi,%esi
  mov    %edx,%edi
  sar    $0x8,%edx
  shl    $0x8,%edi
  and    $0xff00,%edx
  and    $0xff0000,%edi
  or     %edi,%esi
  or     %esi,%edx
  mov    %edx,(%rax)
  mov    0x4(%rax),%edx
  mov    %edx,%esi
  mov    %edx,%edi
  sar    $0x18,%edi
  shl    $0x18,%esi
  or     %edi,%esi
  mov    %edx,%edi
  sar    $0x8,%edx
  shl    $0x8,%edi
  and    $0xff00,%edx
  and    $0xff0000,%edi
  or     %edi,%esi
  or     %esi,%edx
  mov    %edx,0x4(%rax)
  mov    0x8(%rax),%edx
  mov    %edx,%esi
  mov    %edx,%edi
  sar    $0x18,%edi
  shl    $0x18,%esi
  or     %edi,%esi
  mov    %edx,%edi
  sar    $0x8,%edx
  shl    $0x8,%edi
  and    $0xff00,%edx
  and    $0xff0000,%edi
  or     %edi,%esi
  or     %esi,%edx
  mov    %edx,0x8(%rax)
  mov    0xc(%rax),%edx
  mov    %edx,%esi
  mov    %edx,%edi
  sar    $0x18,%edi
  shl    $0x18,%esi
  or     %edi,%esi
  mov    %edx,%edi
  shl    $0x8,%edi
  and    $0xff0000,%edi
  or     %edi,%esi
  sar    $0x8,%edx
  and    $0xff00,%edx
  or     %esi,%edx
  mov    %edx,0xc(%rax)
  mov    0x10(%rax),%edx
  mov    %edx,%esi
  mov    %edx,%edi
  sar    $0x18,%edi
  shl    $0x18,%esi
  or     %edi,%esi
  mov    %edx,%edi
  sar    $0x8,%edx
  shl    $0x8,%edi
  and    $0xff00,%edx
  and    $0xff0000,%edi
  or     %edi,%esi
  or     %esi,%edx
  mov    %edx,0x10(%rax)
  mov    0x14(%rax),%edx
  mov    %edx,%esi
  mov    %edx,%edi
  sar    $0x18,%edi
  shl    $0x18,%esi
  or     %edi,%esi
  mov    %edx,%edi
  sar    $0x8,%edx
  shl    $0x8,%edi
  and    $0xff00,%edx
  and    $0xff0000,%edi
  or     %edi,%esi
  or     %esi,%edx
  mov    %edx,0x14(%rax)
  mov    0x18(%rax),%edx
  mov    %edx,%esi
  mov    %edx,%edi
  sar    $0x18,%edi
  shl    $0x18,%esi
  or     %edi,%esi
  mov    %edx,%edi
  sar    $0x8,%edx
  shl    $0x8,%edi
  and    $0xff00,%edx
  and    $0xff0000,%edi
  or     %edi,%esi
  or     %esi,%edx
  mov    %edx,0x18(%rax)
  mov    0x1c(%rax),%edx
  mov    %edx,%esi
  mov    %edx,%edi
  shl    $0x18,%esi
  sar    $0x18,%edi
  add    $0x20,%rax
  or     %edi,%esi
  mov    %edx,%edi
  sar    $0x8,%edx
  shl    $0x8,%edi
  and    $0xff00,%edx
  and    $0xff0000,%edi
  or     %edi,%esi
  or     %esi,%edx
  mov    %edx,-0x4(%rax)
  cmp    %rcx,%rax
  jne    L16
L0:
  ret
```

assistant: ```c
void convert_elf_phdrs(Elf32_Phdr *p, int num) {
  int i;
  for (i = 0; i < num; i++, p++) {
    p->p_type = ((unsigned int)((((uint32_t)(p->p_type) & (uint32_t)0x000000ffUL) << 24) | (((uint32_t)(p->p_type) & (uint32_t)0x0000ff00UL) << 8) | (((uint32_t)(p->p_type) & (uint32_t)0x00ff0000UL) >> 8) | (((uint32_t)(p->p_type) & (uint32_t)0xff000000UL) >> 24)));
    p->p_offset = ((unsigned int)((((uint32_t)(p->p_offset) & (uint32_t)0x000000ffUL) << 24) | (((uint32_t)(p->p_offset) & (uint32_t)0x0000ff00UL) << 8) | (((uint32_t)(p->p_offset) & (uint32_t)0x00ff0000UL) >> 8) | (((uint32_t)(p->p_offset) & (uint32_t)0xff000000UL) >> 24)));
    p->p_vaddr = ((unsigned int)((((uint32_t)(p->p_vaddr) & (uint32_t)0x000000ffUL) << 24) | (((uint32_t)(p->p_vaddr) & (uint32_t)0x0000ff00UL) << 8) | (((uint32_t)(p->p_vaddr) & (uint32_t)0x00ff0000UL) >> 8) | (((uint32_t)(p->p_vaddr) & (uint32_t)0xff000000UL) >> 24)));
    p->p_paddr = ((unsigned int)((((uint32_t)(p->p_paddr) & (uint32_t)0x000000ffUL) << 24) | (((uint32_t)(p->p_paddr) & (uint32_t)0x0000ff00UL) << 8) | (((uint32_t)(p->p_paddr) & (uint32_t)0x00ff0000UL) >> 8) | (((uint32_t)(p->p_paddr) & (uint32_t)0xff000000UL) >> 24)));
    p->p_filesz = ((unsigned int)((((uint32_t)(p->p_filesz) & (uint32_t)0x000000ffUL) << 24) | (((uint32_t)(p->p_filesz) & (uint32_t)0x0000ff00UL) << 8) | (((uint32_t)(p->p_filesz) & (uint32_t)0x00ff0000UL) >> 8) | (((uint32_t)(p->p_filesz) & (uint32_t)0xff000000UL) >> 24)));
    p->p_memsz = ((unsigned int)((((uint32_t)(p->p_memsz) & (uint32_t)0x000000ffUL) << 24) | (((uint32_t)(p->p_memsz) & (uint32_t)0x0000ff00UL) << 8) | (((uint32_t)(p->p_memsz) & (uint32_t)0x00ff0000UL) >> 8) | (((uint32_t)(p->p_memsz) & (uint32_t)0xff000000UL) >> 24)));
    p->p_flags = ((unsigned int)((((uint32_t)(p->p_flags) & (uint32_t)0x000000ffUL) << 24) | (((uint32_t)(p->p_flags) & (uint32_t)0x0000ff00UL) << 8) | (((uint32_t)(p->p_flags) & (uint32_t)0x00ff0000UL) >> 8) | (((uint32_t)(p->p_flags) & (uint32_t)0xff000000UL) >> 24)));
    p->p_align = ((unsigned int)((((uint32_t)(p->p_align) & (uint32_t)0x000000ffUL) << 24) | (((uint32_t)(p->p_align) & (uint32_t)0x0000ff00UL) << 8) | (((uint32_t)(p->p_align) & (uint32_t)0x00ff0000UL) >> 8) | (((uint32_t)(p->p_align) & (uint32_t)0xff000000UL) >> 24)));
  }
}
```