user: 这段汇编代码用C语言表示是什么样的？

```asm
<shift_sh_offsets>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  cmpq   $0x0,-0x28(%rbp)
  je     L68
  cmpq   $0x0,-0x30(%rbp)
  jne    L57
L68:
  mov    $0x0,%eax
  jmp    L104
L57:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x30(%rbp),%rax
  mov    0x8(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <shdr_index@plt>
  mov    %eax,-0x18(%rbp)
  cmpl   $0xffffffff,-0x18(%rbp)
  jne    L55
  mov    $0x0,%eax
  jmp    L104
L55:
  mov    -0x40(%rbp),%rdx
  mov    -0x30(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <get_align_bias@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L94
L76:
  mov    -0x30(%rbp),%rax
  mov    0x10(%rax),%edx
  mov    -0x14(%rbp),%eax
  add    %eax,%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,0x10(%rax)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L73
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  add    %rax,%rdx
  mov    -0x30(%rbp),%rax
  mov    %rdx,(%rax)
L73:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%rax
  mov    0x8(%rax),%rax
  add    %rdx,%rax
  cmp    %rax,-0x10(%rbp)
  jae    L94
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%rax
  mov    0x8(%rax),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
L94:
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  mov    -0x28(%rbp),%rdx
  mov    %eax,%esi
  mov    %rdx,%rdi
  call   <get_s_header@plt>
  mov    %rax,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  jne    L76
  cmpq   $0x0,-0x38(%rbp)
  je     L11
  cmpq   $0x0,-0x8(%rbp)
  je     L11
  mov    -0x38(%rbp),%rax
  mov    0x10(%rax),%eax
  sub    -0x14(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,0x10(%rax)
  mov    -0x10(%rbp),%rcx
  mov    -0x8(%rbp),%rdx
  mov    -0x14(%rbp),%edi
  mov    -0x38(%rbp),%rsi
  mov    -0x28(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <rearrange_dynamic@plt>
  mov    -0x38(%rbp),%rax
  mov    0x10(%rax),%edx
  mov    -0x14(%rbp),%eax
  add    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,0x10(%rax)
L11:
  mov    -0x14(%rbp),%eax
L104:
  leave
  ret
```

assistant: ```c
int shift_sh_offsets(char *elf, Elf64_Shdr *shdr, Elf64_Shdr *dyn_shdr, size_t n) {
  if (!elf || !shdr)
    return 0;
  unsigned long long base = shdr->sh_addr;
  unsigned long long top = base + shdr->sh_size;
  int i;
  i = shdr_index(elf, shdr);
  if (i == -1)
    return 0;
  int bias;
  bias = get_align_bias(elf, shdr, n);
  while ((shdr = get_s_header(elf, i++))) {
    shdr->sh_offset += bias;
    if (shdr->sh_addr)
      shdr->sh_addr += bias;
    if (top < shdr->sh_addr + shdr->sh_size)
      top = shdr->sh_addr + shdr->sh_size;
  }
  if (dyn_shdr && base > 0) {
    dyn_shdr->sh_offset -= bias;
    rearrange_dynamic(elf, dyn_shdr, (void *)base, (void *)top, bias);
    dyn_shdr->sh_offset += bias;
  }
  return bias;
}
```