user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<shift_down>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    %ecx,-0x34(%rbp)
  mov    %r8,-0x40(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  add    %eax,%eax
  add    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  add    %eax,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x10(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jg     L31
  mov    -0x14(%rbp),%eax
  imul   -0x34(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x10(%rbp),%eax
  imul   -0x34(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x40(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rdx,%rdi
  call   *%rax
  test   %eax,%eax
  jle    L22
  mov    -0x10(%rbp),%eax
  imul   -0x34(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x14(%rbp),%eax
  imul   -0x34(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <swap_data@plt>
  mov    -0x40(%rbp),%rdi
  mov    -0x34(%rbp),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x10(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <shift_down>
L22:
  mov    -0xc(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jg     L40
  mov    -0x14(%rbp),%eax
  imul   -0x34(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0xc(%rbp),%eax
  imul   -0x34(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x40(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rdx,%rdi
  call   *%rax
  test   %eax,%eax
  jle    L5
  mov    -0xc(%rbp),%eax
  imul   -0x34(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x14(%rbp),%eax
  imul   -0x34(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    %rcx,%rdi
  mov    $0x0,%eax
  call   <swap_data@plt>
  mov    -0x40(%rbp),%rdi
  mov    -0x34(%rbp),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0xc(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <shift_down>
  jmp    L60
L31:
  nop
  jmp    L60
L40:
  nop
  jmp    L60
L5:
  nop
L60:
  leave
  ret
```

assistant: ```c
void shift_down(void *array, int start, int end, int esize, int compare(void *key1, void *key2)) {
  char *data = array;
  int i = start;
  int iLeftChild = (2 * i) + 1;
  int iRightChild = (2 * i) + 2;
  if (iLeftChild > end) {
    return;
  } else if (compare(&data[(iLeftChild)*esize], &data[(i)*esize]) > 0) {
    swap_data(&data[(i)*esize], &data[(iLeftChild)*esize], esize);
    shift_down(array, iLeftChild, end, esize, compare);
  }
  if (iRightChild > end) {
    return;
  } else if (compare(&data[(iRightChild)*esize], &data[(i)*esize]) > 0) {
    swap_data(&data[(i)*esize], &data[(iRightChild)*esize], esize);
    shift_down(array, iRightChild, end, esize, compare);
    return;
  }
  return;
}
```