user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %r13
  lea    D43(%rip),%rdi
  push   %r12
  lea    D86(%rip),%r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x10(%rsp)
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  lea    0x0(,%rax,4),%edi
  call   <malloc@plt>
  lea    D97(%rip),%rdi
  mov    %rax,%r13
  call   <printf@plt>
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L13
  mov    %r13,%rbp
  xor    %ebx,%ebx
  nopl   0x0(%rax,%rax,1)
L24:
  mov    %rbp,%rsi
  mov    %r12,%rdi
  add    $0x1,%ebx
  add    $0x4,%rbp
  call   <scanf@plt>
  cmp    %ebx,0xc(%rsp)
  jg     L24
L13:
  lea    D1(%rip),%rdi
  lea    0x10(%rsp),%rbp
  call   <printf@plt>
  mov    0xc(%rsp),%esi
  mov    %r13,%rdi
  call   <printIntArray@plt>
  mov    0xc(%rsp),%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <cloneIntArray@plt>
  lea    D83(%rip),%rdi
  call   <printf@plt>
  mov    0xc(%rsp),%esi
  mov    0x10(%rsp),%rdi
  call   <printIntArray@plt>
  mov    0xc(%rsp),%esi
  mov    0x10(%rsp),%rdi
  call   <IntArraySelSort@plt>
  lea    D95(%rip),%rdi
  call   <printf@plt>
  mov    0xc(%rsp),%esi
  mov    0x10(%rsp),%rdi
  call   <printIntArray@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    0xc(%rsp),%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <cloneIntArray@plt>
  mov    0xc(%rsp),%esi
  mov    0x10(%rsp),%rdi
  call   <IntArrayInsSort@plt>
  lea    D89(%rip),%rdi
  call   <printf@plt>
  mov    0xc(%rsp),%esi
  mov    0x10(%rsp),%rdi
  call   <printIntArray@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    0xc(%rsp),%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <cloneIntArray@plt>
  mov    0xc(%rsp),%eax
  mov    0x10(%rsp),%rdi
  xor    %esi,%esi
  lea    -0x1(%rax),%edx
  call   <intArrayMergeSort@plt>
  lea    D46(%rip),%rdi
  call   <printf@plt>
  mov    0xc(%rsp),%esi
  mov    0x10(%rsp),%rdi
  call   <printIntArray@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    0xc(%rsp),%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <cloneIntArray@plt>
  xor    %edi,%edi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  mov    0xc(%rsp),%eax
  mov    0x10(%rsp),%rdi
  xor    %esi,%esi
  lea    -0x1(%rax),%edx
  call   <intArrayQuickSort@plt>
  lea    D74(%rip),%rdi
  call   <printf@plt>
  mov    0xc(%rsp),%esi
  mov    0x10(%rsp),%rdi
  call   <printIntArray@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    0xc(%rsp),%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <cloneIntArray@plt>
  mov    0xc(%rsp),%esi
  mov    %rbp,%rdi
  call   <intArrayHeapSort@plt>
  lea    D91(%rip),%rdi
  call   <printf@plt>
  mov    0x10(%rsp),%rdi
  mov    0xc(%rsp),%esi
  call   <printIntArrayReverse@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D43
data_type: string
name: parse_data
arguments: data_label: D86
data_type: string
name: parse_data
arguments: data_label: D97
data_type: string
name: parse_data
arguments: data_label: D1
data_type: string
name: parse_data
arguments: data_label: D83
data_type: string
name: parse_data
arguments: data_label: D95
data_type: string
name: parse_data
arguments: data_label: D89
data_type: string
name: parse_data
arguments: data_label: D46
data_type: string
name: parse_data
arguments: data_label: D74
data_type: string
name: parse_data
arguments: data_label: D91
data_type: string

tool: D43: How many elements do you want store in the array? 

tool: D86: %d

tool: D97: Insert elements:


tool: D1: This is your array:


tool: D83: This is the temporary array that we're going to order:


tool: D95: This is the array ordered with selection sort:


tool: D89: This is the array ordered with insertion sort:


tool: D46: This is the array ordered with mergesort:


tool: D74: This is the array ordered with quicksort:


tool: D91: This is the array ordered with heapsort:


assistant: ```c
int main() {
  int *a = NULL, *temp = NULL, n, i;
  printf("How many elements do you want store in the array? ");
  scanf("%d", &n);
  a = (int *)malloc(sizeof(int) * n);
  printf("Insert elements:\n");
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  printf("This is your array:\n");
  printIntArray(a, n);
  cloneIntArray(&temp, a, n);
  printf("This is the temporary array that we're going to order:\n");
  printIntArray(temp, n);
  IntArraySelSort(temp, n);
  printf("This is the array ordered with selection sort:\n");
  printIntArray(temp, n);
  free(temp);
  cloneIntArray(&temp, a, n);
  IntArrayInsSort(temp, n);
  printf("This is the array ordered with insertion sort:\n");
  printIntArray(temp, n);
  free(temp);
  cloneIntArray(&temp, a, n);
  intArrayMergeSort(temp, 0, n - 1);
  printf("This is the array ordered with mergesort:\n");
  printIntArray(temp, n);
  free(temp);
  cloneIntArray(&temp, a, n);
  srand(time(NULL));
  intArrayQuickSort(temp, 0, n - 1);
  printf("This is the array ordered with quicksort:\n");
  printIntArray(temp, n);
  free(temp);
  cloneIntArray(&temp, a, n);
  intArrayHeapSort(&temp, n);
  printf("This is the array ordered with heapsort:\n");
  printIntArrayReverse(temp, n);
  free(temp);
  return 0;
}
```