user: 下面的汇编指令对应的C源代码是什么:

```asm
<filesort_heapsort>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x8(%rsp)
  mov    %rdx,%r15
  lea    -0x8(%rdi),%rbx
  movq   $0x0,(%rsp)
  cmp    $0x1,%rsi
  ja     L42
L130:
  mov    0x8(%rsp),%rax
  cmp    $0x1,%eax
  jle    L179
  sub    $0x1,%eax
  cltq
  mov    %rax,0x10(%rsp)
  jmp    L2
L121:
  mov    (%rsp),%rax
  lea    0x1(%rax),%rdx
  add    $0x3,%rax
  cmp    %rax,0x8(%rsp)
  jb     L130
  mov    %rdx,(%rsp)
L42:
  mov    (%rsp),%eax
  lea    0x2(%rax),%ebp
  cmp    $0x1,%ebp
  jle    L121
L101:
  mov    %ebp,%r14d
  mov    %ebp,%eax
  shr    $0x1f,%eax
  add    %ebp,%eax
  sar    %eax
  mov    %eax,%ebp
  cltq
  lea    (%rbx,%rax,8),%r12
  movslq %r14d,%rax
  lea    (%rbx,%rax,8),%r13
  mov    (%r12),%rsi
  mov    0x0(%r13),%rdi
  call   *%r15
  test   %eax,%eax
  jle    L121
  mov    0x0(%r13),%rax
  mov    (%r12),%rdx
  mov    %rdx,0x0(%r13)
  mov    %rax,(%r12)
  cmp    $0x3,%r14d
  jg     L101
  jmp    L121
L171:
  mov    %ebp,(%rsp)
L57:
  movslq %r12d,%rax
  add    $0x1,%rax
  mov    (%rbx,%rax,8),%rsi
  mov    -0x8(%rbx,%rax,8),%rdi
  call   *%r15
  test   %eax,%eax
  setle  %bpl
  movzbl %bpl,%ebp
  add    %r12d,%ebp
  movslq %ebp,%rax
  lea    (%rbx,%rax,8),%r14
  movslq (%rsp),%rax
  lea    (%rbx,%rax,8),%r13
  mov    (%r14),%rsi
  mov    0x0(%r13),%rdi
  call   *%r15
  test   %eax,%eax
  jns    L119
  mov    (%r14),%rax
  mov    0x0(%r13),%rdx
  mov    %rdx,(%r14)
  mov    %rax,0x0(%r13)
  lea    0x0(%rbp,%rbp,1),%r12d
  cmp    0x8(%rsp),%r12d
  jl     L171
  cmp    0x8(%rsp),%r12d
  jne    L75
  movslq 0x8(%rsp),%rax
  lea    (%rbx,%rax,8),%r12
  movslq %ebp,%rbp
  lea    (%rbx,%rbp,8),%rbp
  mov    (%r12),%rsi
  mov    0x0(%rbp),%rdi
  call   *%r15
  test   %eax,%eax
  jns    L75
  jmp    L34
L106:
  movl   $0x1,(%rsp)
  mov    $0x2,%r12d
L119:
  cmp    %r12d,0x8(%rsp)
  je     L89
L183:
  cmpl   $0x1,0x8(%rsp)
  jle    L179
L75:
  subq   $0x1,0x10(%rsp)
L2:
  mov    0x18(%rsp),%rcx
  mov    (%rcx),%rax
  mov    0x10(%rsp),%rsi
  mov    (%rcx,%rsi,8),%rdx
  mov    %rdx,(%rcx)
  mov    %rax,(%rcx,%rsi,8)
  mov    %esi,0x8(%rsp)
  cmp    $0x2,%esi
  jle    L106
  movl   $0x1,(%rsp)
  mov    $0x2,%r12d
  jmp    L57
L89:
  movslq %r12d,%r12
  lea    (%rbx,%r12,8),%r12
  movslq (%rsp),%rax
  lea    (%rbx,%rax,8),%rbp
  mov    (%r12),%rsi
  mov    0x0(%rbp),%rdi
  call   *%r15
  test   %eax,%eax
  jns    L183
L34:
  mov    (%r12),%rax
  mov    0x0(%rbp),%rdx
  mov    %rdx,(%r12)
  mov    %rax,0x0(%rbp)
  jmp    L183
L179:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void filesort_heapsort(void **datap, size_t nitems, int (*compare)(const void *, const void *)) {
  void **datap1 = &datap[-1];
  int i;
  for (i = 2; i <= nitems; i++) {
    int index = i;
    while (index > 1) {
      int newindex;
      void *temp;
      newindex = index / 2;
      if (compare(datap1[index], datap1[newindex]) <= 0)
        break;
      temp = datap1[index];
      datap1[index] = datap1[newindex];
      datap1[newindex] = temp;
      index = newindex;
    }
  }
  for (i = nitems; i > 1; i--) {
    int index = 1;
    void *temp;
    temp = datap1[index];
    datap1[index] = datap1[i];
    datap1[i] = temp;
    while ((2 * index) < (i - 1)) {
      int newindex;
      void *temp;
      newindex = 2 * index;
      if (compare(datap1[newindex], datap1[newindex + 1]) <= 0)
        newindex = newindex + 1;
      if (compare(datap1[index], datap1[newindex]) >= 0)
        break;
      temp = datap1[newindex];
      datap1[newindex] = datap1[index];
      datap1[index] = temp;
      index = newindex;
    }
    if ((2 * index) == (i - 1)) {
      int newindex;
      void *temp;
      newindex = 2 * index;
      if (compare(datap1[index], datap1[newindex]) >= 0)
        ;
      else {
        temp = datap1[newindex];
        datap1[newindex] = datap1[index];
        datap1[index] = temp;
      }
    }
  }
}
```