user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<heapSort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %esi,-0x5c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    $0x2,%esi
  mov    $0x3b,%edi
  call   <__CrestCall@plt>
  lea    -0x5c(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x3a,%edi
  call   <__CrestStore@plt>
  lea    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <__CrestInt@plt>
  lea    -0x5c(%rbp),%rax
  mov    %rax,%rdi
  call   <__CrestInt@plt>
  mov    -0x5c(%rbp),%eax
  movslq %eax,%rdx
  lea    -0x5c(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x3c,%edi
  call   <__CrestLoad@plt>
  mov    -0x5c(%rbp),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <heapify@plt>
  mov    $0x3d,%edi
  call   <__CrestClearStack@plt>
  mov    -0x5c(%rbp),%eax
  movslq %eax,%rdx
  lea    -0x5c(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x40,%edi
  call   <__CrestLoad@plt>
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    $0x3f,%edi
  call   <__CrestLoad@plt>
  mov    -0x5c(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    %rax,%rdx
  mov    $0x1,%esi
  mov    $0x3e,%edi
  call   <__CrestApply2@plt>
  lea    -0x50(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x41,%edi
  call   <__CrestStore@plt>
  mov    -0x5c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x50(%rbp)
  mov    -0x50(%rbp),%eax
  movslq %eax,%rdx
  lea    -0x50(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x44,%edi
  call   <__CrestLoad@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x43,%edi
  call   <__CrestLoad@plt>
  mov    -0x50(%rbp),%eax
  test   %eax,%eax
  setg   %al
  movzbl %al,%eax
  mov    %rax,%rdx
  mov    $0xe,%esi
  mov    $0x42,%edi
  call   <__CrestApply2@plt>
  mov    -0x50(%rbp),%eax
  test   %eax,%eax
  jle    L39
  mov    $0x1,%edx
  mov    $0x17,%esi
  mov    $0x45,%edi
  call   <__CrestBranch@plt>
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x47,%edi
  call   <__CrestLoad@plt>
  lea    -0x4c(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x48,%edi
  call   <__CrestStore@plt>
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x58(%rbp),%rdx
  mov    -0x50(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x49,%edi
  call   <__CrestLoad@plt>
  mov    -0x40(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x4a,%edi
  call   <__CrestStore@plt>
  mov    -0x38(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x58(%rbp),%rdx
  mov    -0x50(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  lea    -0x4c(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x4b,%edi
  call   <__CrestLoad@plt>
  mov    -0x30(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x4c,%edi
  call   <__CrestStore@plt>
  mov    -0x4c(%rbp),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x50(%rbp),%eax
  movslq %eax,%rdx
  lea    -0x50(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x4d,%edi
  call   <__CrestLoad@plt>
  mov    -0x50(%rbp),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <adjust@plt>
  mov    $0x4e,%edi
  call   <__CrestClearStack@plt>
  mov    -0x50(%rbp),%eax
  movslq %eax,%rdx
  lea    -0x50(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x51,%edi
  call   <__CrestLoad@plt>
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    $0x50,%edi
  call   <__CrestLoad@plt>
  mov    -0x50(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    %rax,%rdx
  mov    $0x1,%esi
  mov    $0x4f,%edi
  call   <__CrestApply2@plt>
  lea    -0x50(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x52,%edi
  call   <__CrestStore@plt>
  mov    -0x50(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x50(%rbp)
  jmp    L26
L39:
  mov    $0x0,%edx
  mov    $0x18,%esi
  mov    $0x46,%edi
  call   <__CrestBranch@plt>
L26:
  mov    -0x50(%rbp),%eax
  movslq %eax,%rdx
  lea    -0x50(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x55,%edi
  call   <__CrestLoad@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x54,%edi
  call   <__CrestLoad@plt>
  mov    -0x50(%rbp),%eax
  test   %eax,%eax
  setg   %al
  movzbl %al,%eax
  mov    %rax,%rdx
  mov    $0xe,%esi
  mov    $0x53,%edi
  call   <__CrestApply2@plt>
  mov    -0x50(%rbp),%eax
  test   %eax,%eax
  jle    L20
  mov    $0x1,%edx
  mov    $0x1a,%esi
  mov    $0x56,%edi
  call   <__CrestBranch@plt>
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x58,%edi
  call   <__CrestLoad@plt>
  lea    -0x4c(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x59,%edi
  call   <__CrestStore@plt>
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x58(%rbp),%rdx
  mov    -0x50(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x5a,%edi
  call   <__CrestLoad@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x5b,%edi
  call   <__CrestStore@plt>
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x58(%rbp),%rdx
  mov    -0x50(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  lea    -0x4c(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x5c,%edi
  call   <__CrestLoad@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x5d,%edi
  call   <__CrestStore@plt>
  mov    -0x4c(%rbp),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x50(%rbp),%eax
  movslq %eax,%rdx
  lea    -0x50(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x5e,%edi
  call   <__CrestLoad@plt>
  mov    -0x50(%rbp),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <adjust@plt>
  mov    $0x5f,%edi
  call   <__CrestClearStack@plt>
  mov    -0x50(%rbp),%eax
  movslq %eax,%rdx
  lea    -0x50(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x62,%edi
  call   <__CrestLoad@plt>
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    $0x61,%edi
  call   <__CrestLoad@plt>
  mov    -0x50(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    %rax,%rdx
  mov    $0x1,%esi
  mov    $0x60,%edi
  call   <__CrestApply2@plt>
  lea    -0x50(%rbp),%rax
  mov    %rax,%rsi
  mov    $0x63,%edi
  call   <__CrestStore@plt>
  mov    -0x50(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x50(%rbp)
  jmp    L27
L20:
  mov    $0x0,%edx
  mov    $0x1b,%esi
  mov    $0x57,%edi
  call   <__CrestBranch@plt>
L27:
  mov    $0x64,%edi
  call   <__CrestReturn@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L48
  call   <__stack_chk_fail@plt>
L48:
  leave
  ret
```

assistant: ```c
void heapSort(int *a, int n) {
  int i;
  int t;
  int *mem_5;
  int *mem_6;
  int *mem_7;
  int *mem_8;
  int *mem_9;
  int *mem_10;
  int *mem_11;
  int *mem_12;
  {
    __CrestCall(59, 2);
    __CrestStore(58, (unsigned long)(&n));
    __CrestInt((int *)(&a));
    __CrestInt(&n);
    __CrestLoad(60, (unsigned long)(&n), (long long)n);
    heapify(a, n);
    __CrestClearStack(61);
    __CrestLoad(64, (unsigned long)(&n), (long long)n);
    __CrestLoad(63, (unsigned long)0, (long long)1);
    __CrestApply2(62, 1, (long long)(n - 1));
    __CrestStore(65, (unsigned long)(&i));
    i = n - 1;
    {{__CrestLoad(68, (unsigned long)(&i), (long long)i);
    __CrestLoad(67, (unsigned long)0, (long long)0);
    __CrestApply2(66, 14, (long long)(i > 0));
    if (i > 0) {
      __CrestBranch(69, 23, 1);
      mem_5 = a + 0;
      __CrestLoad(71, (unsigned long)mem_5, (long long)*mem_5);
      __CrestStore(72, (unsigned long)(&t));
      t = *mem_5;
      mem_6 = a + 0;
      mem_7 = a + i;
      __CrestLoad(73, (unsigned long)mem_7, (long long)*mem_7);
      __CrestStore(74, (unsigned long)mem_6);
      *mem_6 = *mem_7;
      mem_8 = a + i;
      __CrestLoad(75, (unsigned long)(&t), (long long)t);
      __CrestStore(76, (unsigned long)mem_8);
      *mem_8 = t;
      __CrestLoad(77, (unsigned long)(&i), (long long)i);
      adjust(a, i);
      __CrestClearStack(78);
      __CrestLoad(81, (unsigned long)(&i), (long long)i);
      __CrestLoad(80, (unsigned long)0, (long long)1);
      __CrestApply2(79, 1, (long long)(i - 1));
      __CrestStore(82, (unsigned long)(&i));
      i--;
    } else {
      __CrestBranch(70, 24, 0);
    }
  }
  {
    __CrestLoad(85, (unsigned long)(&i), (long long)i);
    __CrestLoad(84, (unsigned long)0, (long long)0);
    __CrestApply2(83, 14, (long long)(i > 0));
    if (i > 0) {
      __CrestBranch(86, 26, 1);
      mem_9 = a + 0;
      __CrestLoad(88, (unsigned long)mem_9, (long long)*mem_9);
      __CrestStore(89, (unsigned long)(&t));
      t = *mem_9;
      mem_10 = a + 0;
      mem_11 = a + i;
      __CrestLoad(90, (unsigned long)mem_11, (long long)*mem_11);
      __CrestStore(91, (unsigned long)mem_10);
      *mem_10 = *mem_11;
      mem_12 = a + i;
      __CrestLoad(92, (unsigned long)(&t), (long long)t);
      __CrestStore(93, (unsigned long)mem_12);
      *mem_12 = t;
      __CrestLoad(94, (unsigned long)(&i), (long long)i);
      adjust(a, i);
      __CrestClearStack(95);
      __CrestLoad(98, (unsigned long)(&i), (long long)i);
      __CrestLoad(97, (unsigned long)0, (long long)1);
      __CrestApply2(96, 1, (long long)(i - 1));
      __CrestStore(99, (unsigned long)(&i));
      i--;
    } else {
      __CrestBranch(87, 27, 0);
    }
  }
}
{
  __CrestReturn(100);
  return;
}
}
}
```