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

```asm
<filesort_heapsort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    -0x48(%rbp),%rax
  sub    $0x8,%rax
  mov    %rax,-0x28(%rbp)
  movl   $0x2,-0x40(%rbp)
  jmp    L142
L20:
  mov    -0x40(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L101
L46:
  mov    -0x3c(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    -0x58(%rbp),%rcx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   *%rcx
  test   %eax,%eax
  jle    L140
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
L101:
  cmpl   $0x1,-0x3c(%rbp)
  jg     L46
  jmp    L108
L140:
  nop
L108:
  addl   $0x1,-0x40(%rbp)
L142:
  mov    -0x40(%rbp),%eax
  cltq
  cmp    %rax,-0x50(%rbp)
  jae    L20
  mov    -0x50(%rbp),%rax
  mov    %eax,-0x40(%rbp)
  jmp    L77
L95:
  movl   $0x1,-0x38(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x38(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%rax
  mov    %rax,(%rdx)
  jmp    L134
L24:
  mov    -0x38(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    -0x58(%rbp),%rcx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   *%rcx
  test   %eax,%eax
  jg     L56
  addl   $0x1,-0x34(%rbp)
L56:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    -0x58(%rbp),%rcx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   *%rcx
  test   %eax,%eax
  jns    L11
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x34(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x38(%rbp)
L134:
  mov    -0x38(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x40(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,%edx
  jl     L24
  jmp    L3
L11:
  nop
L3:
  mov    -0x38(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x40(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,%edx
  jne    L44
  mov    -0x38(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    -0x58(%rbp),%rcx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   *%rcx
  test   %eax,%eax
  jns    L44
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x30(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%rax
  mov    %rax,(%rdx)
L44:
  subl   $0x1,-0x40(%rbp)
L77:
  cmpl   $0x1,-0x40(%rbp)
  jg     L95
  nop
  nop
  leave
  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;
      }
    }
  }
}
```