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

```asm
<mergeSort>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,0x28(%rsp)
  mov    %rcx,0x20(%rsp)
  mov    %rsi,%rbx
  cmp    $0x1,%rsi
  jbe    L26
  mov    %rdi,%r14
  mov    %rdx,%r12
  mov    %rcx,%rbp
  mov    %rsi,%r15
  shr    %r15
  mov    %r15,%rsi
  call   <mergeSort>
  mov    %rbx,%rsi
  sub    %r15,%rsi
  mov    %rsi,0x18(%rsp)
  mov    %r15,%rdi
  imul   %r12,%rdi
  add    %r14,%rdi
  mov    %rbp,%rcx
  mov    %r12,%rdx
  call   <mergeSort>
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <calloc@plt>
  mov    %rax,0x10(%rsp)
  test   %rax,%rax
  je     L91
L74:
  cmpq   $0x0,0x18(%rsp)
  je     L80
  mov    $0x0,%r14d
  mov    $0x0,%r13d
  mov    $0x0,%ebx
  mov    $0x0,%ebp
  jmp    L22
L91:
  mov    D3(%rip),%rax
  mov    (%rax),%edi
  call   <exit@plt>
  jmp    L74
L20:
  lea    0x0(%r13,%r14,1),%edi
  movslq %edi,%rdi
  imul   %r12,%rdi
  add    0x10(%rsp),%rdi
  mov    %r12,%rdx
  mov    %rbp,%rsi
  call   <memcpy@plt>
  add    $0x1,%r13d
L107:
  movslq %r13d,%rbp
  cmp    %rbp,%r15
  jbe    L65
  movslq %r14d,%rbx
  cmp    %rbx,0x18(%rsp)
  jbe    L82
L22:
  add    %r15,%rbx
  imul   %r12,%rbx
  mov    0x8(%rsp),%rax
  add    %rax,%rbx
  imul   %r12,%rbp
  add    %rax,%rbp
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  mov    0x20(%rsp),%rax
  call   *%rax
  test   %eax,%eax
  jle    L20
  lea    0x0(%r13,%r14,1),%edi
  movslq %edi,%rdi
  imul   %r12,%rdi
  add    0x10(%rsp),%rdi
  mov    %r12,%rdx
  mov    %rbx,%rsi
  call   <memcpy@plt>
  add    $0x1,%r14d
  jmp    L107
L65:
  jne    L82
  movslq %r14d,%rax
  mov    0x18(%rsp),%rdx
  sub    %rax,%rdx
  imul   %r12,%rdx
  lea    0x0(%rbp,%rax,1),%rsi
  imul   %r12,%rsi
  mov    0x8(%rsp),%rax
  lea    (%rax,%rsi,1),%rsi
  lea    (%r14,%r13,1),%edi
  movslq %edi,%rdi
  imul   %r12,%rdi
  add    0x10(%rsp),%rdi
  call   <memcpy@plt>
  jmp    L31
L80:
  mov    0x18(%rsp),%rbp
  mov    $0x0,%r14d
  mov    $0x0,%r13d
L82:
  mov    %r15,%rdx
  sub    %rbp,%rdx
  imul   %r12,%rdx
  imul   %r12,%rbp
  mov    0x8(%rsp),%rax
  lea    (%rax,%rbp,1),%rsi
  lea    0x0(%r13,%r14,1),%edi
  movslq %edi,%rdi
  imul   %r12,%rdi
  add    0x10(%rsp),%rdi
  call   <memcpy@plt>
L31:
  mov    0x28(%rsp),%rdx
  imul   %r12,%rdx
  mov    0x10(%rsp),%rbx
  mov    %rbx,%rsi
  mov    0x8(%rsp),%rdi
  call   <memcpy@plt>
  mov    %rbx,%rdi
  call   <free@plt>
L26:
  mov    $0x0,%eax
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void *mergeSort(void *base, size_t nmeb, size_t size, int (*compar)(const void *, const void *)) {
  if (nmeb < 2)
    return;
  mergeSort(base, nmeb / 2, size, compar);
  mergeSort(base + (nmeb / 2) * size, nmeb - nmeb / 2, size, compar);
  int i, j;
  void *hold;
  hold = calloc(nmeb, size);
  if (hold == NULL) {
    exit(EXIT_FAILURE);
  }
  i = j = 0;
  while (i < nmeb / 2 && j < nmeb - nmeb / 2) {
    if (compar(base + i * size, base + (nmeb / 2 + j) * size) > 0) {
      memcpy(hold + (i + j) * size, base + (nmeb / 2 + j) * size, size);
      ++j;
    } else {
      memcpy(hold + (i + j) * size, base + i * size, size);
      ++i;
    }
  }
  if (i == nmeb / 2) {
    memcpy(hold + (i + j) * size, base + (nmeb / 2 + j) * size, (nmeb - nmeb / 2 - j) * size);
  } else {
    memcpy(hold + (i + j) * size, base + i * size, (nmeb / 2 - i) * size);
  }
  memcpy(base, hold, nmeb * size);
  free(hold);
}
```