user: Converte this assembly snippet into its equivalent C code:

```asm
<mergeSort>:
  endbr64
  cmp    %edx,%esi
  jl     L103
  ret
  nopl   0x0(%rax)
L103:
  lea    (%rsi,%rdx,1),%eax
  push   %r15
  mov    %rdi,%r15
  push   %r14
  mov    %r8,%r14
  push   %r13
  mov    %eax,%r13d
  push   %r12
  shr    $0x1f,%r13d
  mov    %edx,%r12d
  push   %rbp
  add    %eax,%r13d
  mov    %esi,%ebp
  push   %rbx
  sar    %r13d
  mov    %rcx,%rbx
  sub    $0x18,%rsp
  cmp    %r13d,%esi
  jl     L0
  lea    0x1(%r13),%r9d
  cmp    %r12d,%r9d
  jl     L7
L83:
  add    $0x18,%rsp
  mov    %rbx,%r8
  mov    %r12d,%ecx
  mov    %r13d,%edx
  pop    %rbx
  mov    %ebp,%esi
  mov    %r15,%rdi
  pop    %rbp
  mov    %r14,%rax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    *%rax
  nopl   0x0(%rax,%rax,1)
L0:
  lea    (%rsi,%r13,1),%eax
  mov    %eax,%r9d
  shr    $0x1f,%r9d
  add    %eax,%r9d
  sar    %r9d
  cmp    %r9d,%esi
  jl     L118
L4:
  lea    0x1(%r9),%r10d
  cmp    %r10d,%r13d
  jg     L70
L91:
  mov    %r9d,%edx
  mov    %rbx,%r8
  mov    %r13d,%ecx
  mov    %ebp,%esi
  mov    %r15,%rdi
  call   *%r14
  lea    0x1(%r13),%r9d
  cmp    %r12d,%r9d
  jge    L83
L7:
  lea    (%r9,%r12,1),%eax
  mov    %eax,%r10d
  shr    $0x1f,%r10d
  add    %eax,%r10d
  sar    %r10d
  cmp    %r10d,%r9d
  jl     L123
L29:
  lea    0x1(%r10),%r11d
  cmp    %r11d,%r12d
  jg     L14
L61:
  mov    %rbx,%r8
  mov    %r12d,%ecx
  mov    %r10d,%edx
  mov    %r9d,%esi
  mov    %r15,%rdi
  call   *%r14
  jmp    L83
  nopl   0x0(%rax,%rax,1)
L118:
  lea    (%rsi,%r9,1),%eax
  mov    %r9d,0x8(%rsp)
  mov    %eax,%r10d
  shr    $0x1f,%r10d
  add    %eax,%r10d
  sar    %r10d
  mov    %r10d,%edx
  mov    %r10d,(%rsp)
  call   <mergeSort>
  mov    (%rsp),%r10d
  mov    %r14,%r8
  mov    %rbx,%rcx
  mov    0x8(%rsp),%r9d
  mov    %r15,%rdi
  lea    0x1(%r10),%esi
  mov    %r10d,0x4(%rsp)
  mov    %r9d,%edx
  mov    %r9d,(%rsp)
  call   <mergeSort>
  mov    (%rsp),%ecx
  mov    0x4(%rsp),%edx
  mov    %rbx,%r8
  mov    %ebp,%esi
  mov    %r15,%rdi
  call   *%r14
  mov    (%rsp),%r9d
  jmp    L4
  nopl   0x0(%rax)
L14:
  lea    (%r12,%r11,1),%edx
  mov    %r11d,%esi
  mov    %r14,%r8
  mov    %rbx,%rcx
  mov    %edx,%eax
  mov    %r15,%rdi
  mov    %r10d,0xc(%rsp)
  shr    $0x1f,%eax
  mov    %r9d,0x8(%rsp)
  add    %edx,%eax
  mov    %r11d,0x4(%rsp)
  sar    %eax
  mov    %eax,%edx
  mov    %eax,(%rsp)
  call   <mergeSort>
  mov    (%rsp),%eax
  mov    %r14,%r8
  mov    %rbx,%rcx
  mov    %r12d,%edx
  mov    %r15,%rdi
  lea    0x1(%rax),%esi
  call   <mergeSort>
  mov    (%rsp),%edx
  mov    0x4(%rsp),%esi
  mov    %rbx,%r8
  mov    %r12d,%ecx
  mov    %r15,%rdi
  call   *%r14
  mov    0xc(%rsp),%r10d
  mov    0x8(%rsp),%r9d
  jmp    L61
  nopl   0x0(%rax,%rax,1)
L123:
  lea    (%r9,%r10,1),%eax
  mov    %r9d,%esi
  mov    %r14,%r8
  mov    %rbx,%rcx
  mov    %eax,%r11d
  mov    %r15,%rdi
  mov    %r9d,0xc(%rsp)
  shr    $0x1f,%r11d
  mov    %r10d,0x4(%rsp)
  add    %eax,%r11d
  sar    %r11d
  mov    %r11d,%edx
  mov    %r11d,(%rsp)
  call   <mergeSort>
  mov    (%rsp),%r11d
  mov    %r14,%r8
  mov    %rbx,%rcx
  mov    0x4(%rsp),%r10d
  mov    %r15,%rdi
  lea    0x1(%r11),%esi
  mov    %r11d,0x8(%rsp)
  mov    %r10d,%edx
  mov    %r10d,(%rsp)
  call   <mergeSort>
  mov    (%rsp),%r10d
  mov    0x8(%rsp),%edx
  mov    %rbx,%r8
  mov    0xc(%rsp),%r9d
  mov    %r15,%rdi
  mov    %r10d,0x4(%rsp)
  mov    %r10d,%ecx
  mov    %r9d,(%rsp)
  mov    %r9d,%esi
  call   *%r14
  mov    0x4(%rsp),%r10d
  mov    (%rsp),%r9d
  jmp    L29
  nopl   (%rax)
L70:
  lea    0x0(%r13,%r10,1),%eax
  mov    %r10d,%esi
  mov    %r14,%r8
  mov    %rbx,%rcx
  mov    %eax,%r11d
  mov    %r15,%rdi
  mov    %r9d,0x8(%rsp)
  shr    $0x1f,%r11d
  mov    %r10d,0x4(%rsp)
  add    %eax,%r11d
  sar    %r11d
  mov    %r11d,%edx
  mov    %r11d,(%rsp)
  call   <mergeSort>
  mov    (%rsp),%r11d
  mov    %r14,%r8
  mov    %rbx,%rcx
  mov    %r13d,%edx
  mov    %r15,%rdi
  lea    0x1(%r11),%esi
  call   <mergeSort>
  mov    (%rsp),%edx
  mov    0x4(%rsp),%esi
  mov    %rbx,%r8
  mov    %r13d,%ecx
  mov    %r15,%rdi
  call   *%r14
  mov    0x8(%rsp),%r9d
  jmp    L91
```

assistant: ```c
void mergeSort(void *arr, int left, int right, int (*comp)(void *, void *), void (*merge)(void *, int, int, int, int (*)(void *, void *))) {
  if (left < right) {
    int mid = (left + right) / 2;
    mergeSort(arr, left, mid, comp, merge);
    mergeSort(arr, mid + 1, right, comp, merge);
    merge(arr, left, mid, right, comp);
  }
  return;
}
```