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

```asm
<mergeSort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    -0x61000(%rsp),%r11
L119:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L119
  sub    $0xad0,%rsp
  mov    %rdi,-0x61ac8(%rbp)
  mov    %esi,-0x61acc(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x61a90(%rbp),%rax
  mov    %rax,-0x61aa0(%rbp)
  mov    -0x61acc(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cltq
  lea    0x0(,%rax,4),%rdx
  lea    -0x61a90(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x61a98(%rbp)
  mov    -0x61acc(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x61aa8(%rbp)
  mov    -0x61acc(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  neg    %eax
  mov    %eax,%edx
  mov    -0x61acc(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x61aa4(%rbp)
  cmpl   $0x1,-0x61acc(%rbp)
  jle    L116
  mov    -0x61acc(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x61ac8(%rbp),%rcx
  mov    -0x61aa0(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x61acc(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  neg    %eax
  mov    %eax,%edx
  mov    -0x61acc(%rbp),%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x61acc(%rbp),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  sar    %eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x61ac8(%rbp),%rax
  add    %rax,%rcx
  mov    -0x61a98(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x61acc(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x61aa0(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <mergeSort>
  mov    -0x61acc(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  neg    %eax
  mov    %eax,%edx
  mov    -0x61acc(%rbp),%eax
  add    %eax,%edx
  mov    -0x61a98(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <mergeSort>
  movl   $0x0,-0x61ab4(%rbp)
  movl   $0x0,-0x61ab0(%rbp)
  movl   $0x0,-0x61aac(%rbp)
  jmp    L6
L66:
  mov    -0x61ab0(%rbp),%eax
  cmp    -0x61aa8(%rbp),%eax
  jge    L102
  mov    -0x61aac(%rbp),%eax
  cmp    -0x61aa4(%rbp),%eax
  jge    L114
  mov    -0x61ab0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x61aa0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x61aac(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x61a98(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L18
  mov    -0x61ab0(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x61ab0(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x61aa0(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x61ab4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x61ab4(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x61ac8(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  jmp    L6
L18:
  mov    -0x61aac(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x61aac(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x61a98(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x61ab4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x61ab4(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x61ac8(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  jmp    L6
L114:
  mov    -0x61ab0(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x61ab0(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x61aa0(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x61ab4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x61ab4(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x61ac8(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  jmp    L6
L102:
  mov    -0x61aac(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x61aac(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x61a98(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x61ab4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x61ab4(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x61ac8(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
L6:
  mov    -0x61ab4(%rbp),%eax
  cmp    -0x61acc(%rbp),%eax
  jl     L66
  jmp    L77
L116:
  nop
L77:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L59
  call   <__stack_chk_fail@plt>
L59:
  leave
  ret
```

assistant: ```c
void mergeSort(int arr[], int n) {
  int tmp[100000];
  int *firstHalf = tmp;
  int *secondHalf = tmp + n / 2;
  int firstHalfSize = n / 2;
  int secondHalfSize = (n - n / 2);
  int i, p, q;
  if (n < 2)
    return;
  memcpy(firstHalf, arr, n / 2 * sizeof(int));
  memcpy(secondHalf, arr + n / 2, (n - n / 2) * sizeof(int));
  mergeSort(firstHalf, n / 2);
  mergeSort(secondHalf, n - n / 2);
  i = 0;
  p = 0;
  q = 0;
  while (i < n) {
    if (p < firstHalfSize) {
      if (q < secondHalfSize) {
        if (firstHalf[p] < secondHalf[q]) {
          arr[i++] = firstHalf[p++];
        } else {
          arr[i++] = secondHalf[q++];
        }
      } else {
        arr[i++] = firstHalf[p++];
      }
    } else {
      arr[i++] = secondHalf[q++];
    }
  }
  return;
}
```