user: Please show me the C implementation that matches the assembly code listed below:

```asm
<mergeSort>:
  endbr64
  push   %r15
  xor    %eax,%eax
  mov    %ecx,%r15d
  push   %r14
  push   %r13
  push   %r12
  mov    %r15d,%r12d
  push   %rbp
  mov    %rdi,%rbp
  lea    D3(%rip),%rdi
  push   %rbx
  sub    $0x18,%rsp
  mov    %edx,0x8(%rsp)
  mov    %esi,(%rsp)
  call   <printf@plt>
  mov    0x8(%rsp),%r8d
  mov    (%rsp),%r9d
  xor    %eax,%eax
  lea    D18(%rip),%rdi
  mov    %r8d,%ebx
  sub    %r8d,%r12d
  mov    %r9d,0x8(%rsp)
  sub    %r9d,%ebx
  mov    %r12d,%edx
  mov    %r8d,(%rsp)
  mov    %ebx,%esi
  call   <printf@plt>
  lea    0x0(,%rbx,4),%edi
  call   <malloc@plt>
  lea    0x0(,%r12,4),%edi
  mov    %rax,%r14
  call   <malloc@plt>
  test   %ebx,%ebx
  mov    (%rsp),%r8d
  mov    0x8(%rsp),%r9d
  mov    %rax,%r13
  jle    L339
  movslq %r9d,%rax
  lea    0x4(,%rax,4),%rcx
  mov    %r14,%rax
  lea    0x0(%rbp,%rcx,1),%rdx
  sub    %rdx,%rax
  cmp    $0x8,%rax
  jbe    L57
  lea    -0x1(%rbx),%eax
  cmp    $0x2,%eax
  jbe    L57
  mov    %ebx,%edx
  mov    %rbp,%rsi
  mov    %r14,%rax
  shr    $0x2,%edx
  sub    %r14,%rsi
  shl    $0x4,%rdx
  lea    -0x4(%rsi,%rcx,1),%rcx
  add    %r14,%rdx
  nopl   0x0(%rax)
L27:
  movdqu (%rax,%rcx,1),%xmm0
  add    $0x10,%rax
  movups %xmm0,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L27
  mov    %ebx,%eax
  and    $0xfffffffc,%eax
  lea    (%r9,%rax,1),%edx
  cmp    %eax,%ebx
  je     L339
  lea    0x1(%rdx),%ecx
  movslq %edx,%rdx
  mov    %eax,%edi
  mov    0x0(%rbp,%rdx,4),%edx
  lea    0x0(,%rdi,4),%rsi
  mov    %edx,(%r14,%rdi,4)
  lea    0x1(%rax),%edx
  cmp    %edx,%ebx
  jle    L339
  movslq %ecx,%rdx
  add    $0x2,%eax
  lea    0x0(,%rdx,4),%rcx
  mov    0x0(%rbp,%rdx,4),%edx
  mov    %edx,0x4(%r14,%rsi,1)
  cmp    %eax,%ebx
  jle    L339
  mov    0x4(%rbp,%rcx,1),%eax
  mov    %eax,0x8(%r14,%rsi,1)
L339:
  sub    %r9d,%r15d
  test   %r12d,%r12d
  jle    L65
  movslq %r8d,%rax
  lea    0x4(,%rax,4),%rcx
  mov    %r13,%rax
  lea    0x0(%rbp,%rcx,1),%rdx
  sub    %rdx,%rax
  cmp    $0x8,%rax
  jbe    L86
  lea    -0x1(%r12),%eax
  cmp    $0x2,%eax
  jbe    L86
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %r13,%rax
  shr    $0x2,%edx
  sub    %r13,%rsi
  shl    $0x4,%rdx
  lea    -0x4(%rsi,%rcx,1),%rcx
  add    %r13,%rdx
  nop
L359:
  movdqu (%rax,%rcx,1),%xmm1
  add    $0x10,%rax
  movups %xmm1,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L359
  mov    %r12d,%eax
  and    $0xfffffffc,%eax
  test   $0x3,%r12b
  je     L124
  lea    (%r8,%rax,1),%edx
  mov    %eax,%esi
  movslq %edx,%rdx
  lea    0x0(,%rsi,4),%rcx
  mov    0x0(%rbp,%rdx,4),%edx
  mov    %edx,0x0(%r13,%rsi,4)
  lea    0x1(%rax),%edx
  cmp    %r12d,%edx
  jge    L124
  add    %r8d,%edx
  add    $0x2,%eax
  movslq %edx,%rdx
  mov    0x0(%rbp,%rdx,4),%edx
  mov    %edx,0x4(%r13,%rcx,1)
  cmp    %r12d,%eax
  jge    L124
  add    %r8d,%eax
  cltq
  mov    0x0(%rbp,%rax,4),%eax
  mov    %eax,0x8(%r13,%rcx,1)
L124:
  mov    %ebx,%esi
  mov    %r14,%rdi
  call   <printArray@plt>
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <printArray@plt>
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <printArray@plt>
  test   %ebx,%ebx
  jle    L48
  mov    $0x1,%eax
  xor    %edx,%edx
  xor    %ecx,%ecx
  xor    %r10d,%r10d
  xor    %r9d,%r9d
  nopl   0x0(%rax)
L410:
  mov    (%r14,%r10,4),%r8d
  mov    0x0(%r13,%r9,4),%edi
  mov    %eax,%esi
  cmp    %r8d,%edi
  jle    L174
L251:
  mov    %r8d,-0x4(%rbp,%rax,4)
  add    $0x1,%ecx
  add    $0x1,%rax
  cmp    %edx,%r12d
  jle    L60
  cmp    %ecx,%ebx
  jle    L16
  movslq %ecx,%r10
  mov    0x0(%r13,%r9,4),%edi
  mov    %eax,%esi
  mov    (%r14,%r10,4),%r8d
  cmp    %r8d,%edi
  jg     L251
L174:
  mov    %edi,-0x4(%rbp,%rax,4)
  add    $0x1,%edx
  add    $0x1,%rax
  cmp    %ecx,%ebx
  jle    L16
  cmp    %edx,%r12d
  jle    L60
  movslq %edx,%r9
  jmp    L410
  nopl   0x0(%rax)
L65:
  mov    %ebx,%esi
  mov    %r14,%rdi
  call   <printArray@plt>
  mov    %r12d,%esi
  mov    %r13,%rdi
  call   <printArray@plt>
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <printArray@plt>
  xor    %edx,%edx
  xor    %ecx,%ecx
  xor    %esi,%esi
  cs nopw 0x0(%rax,%rax,1)
L60:
  cmp    %ecx,%ebx
  jle    L16
  movslq %esi,%rax
  mov    %ebx,%r9d
  shl    $0x2,%rax
  sub    %ecx,%r9d
  lea    0x0(%rbp,%rax,1),%r8
  mov    %rax,(%rsp)
  movslq %ecx,%rax
  lea    0x0(,%rax,4),%r10
  mov    %rax,0x8(%rsp)
  mov    %r8,%r11
  lea    (%r10,%r14,1),%rax
  lea    0x4(%rax),%rdi
  sub    %rdi,%r11
  cmp    $0x8,%r11
  jbe    L335
  lea    -0x1(%r9),%r11d
  cmp    $0x2,%r11d
  jbe    L335
  mov    %r9d,%edi
  sub    %rax,%r8
  shr    $0x2,%edi
  sub    $0x1,%edi
  shl    $0x4,%rdi
  lea    0x10(%rax,%rdi,1),%rdi
  nopl   0x0(%rax)
L242:
  movdqu (%rax),%xmm2
  movups %xmm2,(%r8,%rax,1)
  add    $0x10,%rax
  cmp    %rdi,%rax
  jne    L242
  mov    %r9d,%eax
  and    $0xfffffffc,%eax
  lea    (%rsi,%rax,1),%edi
  add    %eax,%ecx
  cmp    %eax,%r9d
  je     L49
  movslq %ecx,%r10
  lea    0x1(%rdi),%r8d
  lea    0x1(%rcx),%eax
  movslq %edi,%rdi
  mov    (%r14,%r10,4),%r10d
  mov    %r10d,0x0(%rbp,%rdi,4)
  cmp    %ebx,%eax
  jge    L49
  cltq
  movslq %r8d,%rdi
  add    $0x2,%ecx
  lea    0x0(,%rax,4),%r10
  mov    (%r14,%rax,4),%eax
  lea    0x0(,%rdi,4),%r8
  mov    %eax,0x0(%rbp,%rdi,4)
  cmp    %ecx,%ebx
  jle    L49
  mov    0x4(%r14,%r10,1),%eax
  mov    %eax,0x4(%rbp,%r8,1)
L49:
  add    %r9d,%esi
L16:
  cmp    %edx,%r12d
  jle    L227
L43:
  movslq %esi,%r8
  movslq %edx,%r11
  mov    %r12d,%r9d
  shl    $0x2,%r8
  lea    0x0(,%r11,4),%r10
  sub    %edx,%r9d
  lea    0x0(%rbp,%r8,1),%rdi
  lea    0x0(%r13,%r10,1),%rax
  lea    0x4(%rax),%rcx
  mov    %rdi,%rbx
  sub    %rcx,%rbx
  cmp    $0x8,%rbx
  jbe    L33
  lea    -0x1(%r9),%ebx
  cmp    $0x2,%ebx
  jbe    L33
  mov    %r9d,%ecx
  sub    %rax,%rdi
  shr    $0x2,%ecx
  sub    $0x1,%ecx
  shl    $0x4,%rcx
  lea    0x10(%rax,%rcx,1),%r8
  mov    %rdi,%rcx
  nopl   0x0(%rax)
L434:
  movdqu (%rax),%xmm3
  movups %xmm3,(%rcx,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%r8
  jne    L434
  mov    %r9d,%eax
  and    $0xfffffffc,%eax
  add    %eax,%esi
  add    %eax,%edx
  cmp    %r9d,%eax
  je     L227
  movslq %edx,%rdi
  lea    0x1(%rsi),%ecx
  lea    0x1(%rdx),%eax
  movslq %esi,%rsi
  mov    0x0(%r13,%rdi,4),%edi
  mov    %edi,0x0(%rbp,%rsi,4)
  cmp    %r12d,%eax
  jge    L227
  cltq
  movslq %ecx,%rcx
  add    $0x2,%edx
  lea    0x0(,%rax,4),%rdi
  mov    0x0(%r13,%rax,4),%eax
  lea    0x0(,%rcx,4),%rsi
  mov    %eax,0x0(%rbp,%rcx,4)
  cmp    %r12d,%edx
  jge    L227
  mov    0x4(%r13,%rdi,1),%eax
  mov    %eax,0x4(%rbp,%rsi,1)
L227:
  mov    %r15d,%esi
  mov    %rbp,%rdi
  call   <printArray@plt>
  mov    %r14,%rdi
  call   <free@plt>
  add    $0x18,%rsp
  mov    %r13,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <free@plt>
  nopw   0x0(%rax,%rax,1)
L335:
  sub    $0x1,%ebx
  sub    %ecx,%ebx
  mov    0x8(%rsp),%rcx
  add    %rbx,%rcx
  lea    0x4(%r14,%rcx,4),%r8
  mov    (%rsp),%rcx
  sub    %r10,%rcx
  sub    %r14,%rcx
  add    %rbp,%rcx
  jmp    L137
  nopl   0x0(%rax)
L76:
  add    $0x4,%rdi
L137:
  mov    (%rax),%r10d
  mov    %r10d,(%rcx,%rax,1)
  mov    %rdi,%rax
  cmp    %r8,%rdi
  jne    L76
  add    %r9d,%esi
  jmp    L16
  nopl   0x0(%rax,%rax,1)
L86:
  mov    %r12d,%edx
  mov    %r13,%rax
  lea    0x0(%r13,%rdx,4),%rsi
  mov    %rbp,%rdx
  sub    %r13,%rdx
  lea    -0x4(%rdx,%rcx,1),%rcx
  xchg   %ax,%ax
L192:
  mov    (%rcx,%rax,1),%edx
  add    $0x4,%rax
  mov    %edx,-0x4(%rax)
  cmp    %rsi,%rax
  jne    L192
  jmp    L124
  nopl   0x0(%rax)
L57:
  mov    %ebx,%edx
  mov    %r14,%rax
  lea    (%r14,%rdx,4),%rsi
  mov    %rbp,%rdx
  sub    %r14,%rdx
  lea    -0x4(%rdx,%rcx,1),%rcx
  nopl   0x0(%rax)
L351:
  mov    (%rcx,%rax,1),%edx
  add    $0x4,%rax
  mov    %edx,-0x4(%rax)
  cmp    %rsi,%rax
  jne    L351
  jmp    L339
  nopl   0x0(%rax)
L33:
  sub    $0x1,%r12d
  sub    %r10,%r8
  sub    %edx,%r12d
  sub    %r13,%r8
  lea    (%r12,%r11,1),%rdx
  lea    0x4(%r13,%rdx,4),%rdi
  lea    0x0(%rbp,%r8,1),%rdx
  jmp    L237
  nopl   (%rax)
L423:
  add    $0x4,%rcx
L237:
  mov    (%rax),%esi
  mov    %esi,(%rdx,%rax,1)
  mov    %rcx,%rax
  cmp    %rcx,%rdi
  jne    L423
  jmp    L227
L48:
  xor    %edx,%edx
  xor    %esi,%esi
  jmp    L43
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D3
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D18
type_infered: string

tool: D3: low = %d mid=%d high=%d 


tool: D18: n1 = %d n2=%d


assistant: ```c
int mergeSort(int *arr, int low, int mid, int high) {
  printf("low = %d mid=%d high=%d \n", low, mid, high);
  int n1 = mid - low;
  int n2 = high - mid;
  printf("n1 = %d n2=%d\n", n1, n2);
  int *a = (int *)malloc(n1 * sizeof(int));
  int *b = (int *)malloc(n2 * sizeof(int));
  int i, j, k, temp;
  j = low;
  for (i = 0; i < n1; i++) {
    a[i] = arr[j++];
  }
  j = mid;
  for (i = 0; i < n2; i++) {
    b[i] = arr[mid + i];
  }
  printArray(a, n1);
  printArray(b, n2);
  printArray(arr, n1 + n2);
  i = 0, j = 0, k = 0;
  while (j < n1 && k < n2) {
    if (a[j] < b[k]) {
      arr[i++] = a[j++];
    } else {
      arr[i++] = b[k++];
    }
  }
  while (j < n1) {
    arr[i++] = a[j++];
  }
  while (k < n2) {
    arr[i++] = b[k++];
  }
  printArray(arr, n1 + n2);
  free(a);
  free(b);
}
```