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

```asm
<mergeSortAndCountInversion>:
  endbr64
  cmp    %edx,%esi
  jl     L128
  xor    %eax,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L128:
  mov    %edx,%eax
  push   %r15
  mov    %rdi,%r15
  sub    %esi,%eax
  push   %r14
  push   %r13
  mov    %eax,%r13d
  push   %r12
  sar    %r13d
  mov    %edx,%r12d
  push   %rbp
  add    %esi,%r13d
  mov    %esi,%ebp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x38,%rsp
  cmp    %r13d,%esi
  jge    L5
  mov    %eax,%r14d
  sar    $0x2,%r14d
  add    %esi,%r14d
  cmp    %r14d,%esi
  jl     L80
  lea    0x1(%r14),%r8d
  cmp    %r8d,%r13d
  jg     L194
L202:
  mov    %r13d,%ecx
  mov    %r14d,%edx
  mov    %ebp,%esi
  mov    %r15,%rdi
  call   <mergeAndCountInversion@plt>
  add    %rax,%rbx
L5:
  lea    0x1(%r13),%r14d
  cmp    %r12d,%r14d
  jge    L24
  mov    %r12d,%r10d
  movq   $0x0,(%rsp)
  sub    %r14d,%r10d
  mov    %r10d,%r8d
  sar    %r8d
  add    %r14d,%r8d
  cmp    %r8d,%r14d
  jl     L159
  lea    0x1(%r8),%r9d
  cmp    %r9d,%r12d
  jg     L4
L192:
  mov    %r12d,%ecx
  mov    %r8d,%edx
  mov    %r14d,%esi
  mov    %r15,%rdi
  call   <mergeAndCountInversion@plt>
  add    (%rsp),%rax
  add    %rax,%rbx
L24:
  mov    %r12d,%ecx
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %r15,%rdi
  call   <mergeAndCountInversion@plt>
  add    $0x38,%rsp
  add    %rbx,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L4:
  movq   $0x0,0x8(%rsp)
  mov    %r12d,%r10d
  sub    %r9d,%r10d
  mov    %r10d,%eax
  sar    %eax
  lea    (%rax,%r9,1),%r11d
  cmp    %r11d,%r9d
  jge    L34
  sar    $0x2,%r10d
  mov    %r9d,%esi
  mov    %r15,%rdi
  mov    %r8d,0x28(%rsp)
  add    %r9d,%r10d
  mov    %r9d,0x24(%rsp)
  mov    %r10d,%edx
  mov    %r11d,0x18(%rsp)
  mov    %r10d,0x14(%rsp)
  call   <mergeSortAndCountInversion>
  mov    0x14(%rsp),%r10d
  mov    0x18(%rsp),%r11d
  mov    %r15,%rdi
  mov    %rax,0x8(%rsp)
  lea    0x1(%r10),%esi
  mov    %r11d,%edx
  mov    %r10d,0x20(%rsp)
  mov    %r11d,0x14(%rsp)
  call   <mergeSortAndCountInversion>
  mov    0x14(%rsp),%r11d
  mov    0x24(%rsp),%r9d
  mov    %r15,%rdi
  mov    0x20(%rsp),%edx
  add    0x8(%rsp),%rax
  mov    %r11d,%ecx
  mov    %r9d,%esi
  mov    %r11d,0x18(%rsp)
  mov    %r9d,0x14(%rsp)
  mov    %rax,0x8(%rsp)
  call   <mergeAndCountInversion@plt>
  add    0x8(%rsp),%rax
  mov    0x28(%rsp),%r8d
  mov    0x18(%rsp),%r11d
  mov    0x14(%rsp),%r9d
  mov    %rax,0x8(%rsp)
L34:
  lea    0x1(%r11),%r10d
  cmp    %r10d,%r12d
  jle    L92
  mov    %r12d,%eax
  mov    %r10d,%esi
  mov    %r15,%rdi
  mov    %r11d,0x2c(%rsp)
  sub    %r10d,%eax
  mov    %r9d,0x28(%rsp)
  sar    %eax
  mov    %r8d,0x24(%rsp)
  add    %r10d,%eax
  mov    %r10d,0x20(%rsp)
  mov    %eax,%edx
  mov    %eax,0x14(%rsp)
  call   <mergeSortAndCountInversion>
  mov    0x14(%rsp),%ecx
  mov    %r12d,%edx
  mov    %r15,%rdi
  mov    %rax,0x18(%rsp)
  lea    0x1(%rcx),%esi
  call   <mergeSortAndCountInversion>
  mov    0x14(%rsp),%edx
  mov    0x20(%rsp),%esi
  mov    %r12d,%ecx
  add    0x18(%rsp),%rax
  mov    %r15,%rdi
  mov    %rax,0x18(%rsp)
  call   <mergeAndCountInversion@plt>
  add    0x18(%rsp),%rax
  add    %rax,0x8(%rsp)
  mov    0x2c(%rsp),%r11d
  mov    0x28(%rsp),%r9d
  mov    0x24(%rsp),%r8d
L92:
  mov    %r12d,%ecx
  mov    %r11d,%edx
  mov    %r9d,%esi
  mov    %r15,%rdi
  mov    %r8d,0x14(%rsp)
  call   <mergeAndCountInversion@plt>
  mov    0x14(%rsp),%r8d
  add    0x8(%rsp),%rax
  add    %rax,(%rsp)
  jmp    L192
  nopw   0x0(%rax,%rax,1)
L159:
  mov    %r10d,%r9d
  sar    $0x2,%r9d
  add    %r14d,%r9d
  cmp    %r9d,%r14d
  jge    L30
  sar    $0x3,%r10d
  mov    %r14d,%esi
  mov    %r15,%rdi
  mov    %r8d,0x18(%rsp)
  add    %r14d,%r10d
  mov    %r9d,0x20(%rsp)
  mov    %r10d,%edx
  mov    %r10d,0x8(%rsp)
  call   <mergeSortAndCountInversion>
  mov    0x8(%rsp),%r10d
  mov    0x20(%rsp),%r9d
  mov    %r15,%rdi
  mov    %rax,(%rsp)
  mov    %r9d,%edx
  lea    0x1(%r10),%esi
  mov    %r9d,0x8(%rsp)
  mov    %r10d,0x14(%rsp)
  call   <mergeSortAndCountInversion>
  mov    0x8(%rsp),%ecx
  mov    0x14(%rsp),%edx
  mov    %r14d,%esi
  add    (%rsp),%rax
  mov    %r15,%rdi
  mov    %rax,(%rsp)
  call   <mergeAndCountInversion@plt>
  add    (%rsp),%rax
  mov    0x18(%rsp),%r8d
  mov    %rax,(%rsp)
  mov    0x8(%rsp),%r9d
L30:
  lea    0x1(%r9),%r10d
  cmp    %r10d,%r8d
  jle    L141
  mov    %r8d,%r11d
  mov    %r10d,%esi
  mov    %r15,%rdi
  mov    %r9d,0x28(%rsp)
  sub    %r10d,%r11d
  mov    %r10d,0x20(%rsp)
  sar    %r11d
  mov    %r8d,0x24(%rsp)
  add    %r10d,%r11d
  mov    %r11d,%edx
  mov    %r11d,0x14(%rsp)
  call   <mergeSortAndCountInversion>
  mov    0x14(%rsp),%r11d
  mov    0x24(%rsp),%r8d
  mov    %r15,%rdi
  mov    %rax,0x8(%rsp)
  mov    %r8d,%edx
  lea    0x1(%r11),%esi
  mov    %r8d,0x14(%rsp)
  mov    %r11d,0x18(%rsp)
  call   <mergeSortAndCountInversion>
  mov    0x14(%rsp),%ecx
  mov    0x18(%rsp),%edx
  mov    %r15,%rdi
  mov    0x20(%rsp),%esi
  add    0x8(%rsp),%rax
  mov    %rax,0x8(%rsp)
  call   <mergeAndCountInversion@plt>
  add    0x8(%rsp),%rax
  add    %rax,(%rsp)
  mov    0x28(%rsp),%r9d
  mov    0x14(%rsp),%r8d
L141:
  mov    %r8d,%ecx
  mov    %r9d,%edx
  mov    %r14d,%esi
  mov    %r15,%rdi
  mov    %r8d,0x8(%rsp)
  call   <mergeAndCountInversion@plt>
  mov    0x8(%rsp),%r8d
  add    (%rsp),%rax
  mov    %rax,(%rsp)
  lea    0x1(%r8),%r9d
  cmp    %r9d,%r12d
  jle    L192
  jmp    L4
L194:
  mov    %r13d,%r10d
  movq   $0x0,(%rsp)
  sub    %r8d,%r10d
  mov    %r10d,%r9d
  sar    %r9d
  add    %r8d,%r9d
  cmp    %r9d,%r8d
  jge    L82
  sar    $0x2,%r10d
  mov    %r8d,%esi
  mov    %r15,%rdi
  mov    %r8d,0x20(%rsp)
  add    %r8d,%r10d
  mov    %r9d,0x14(%rsp)
  mov    %r10d,%edx
  mov    %r10d,0x8(%rsp)
  call   <mergeSortAndCountInversion>
  mov    0x8(%rsp),%r10d
  mov    0x14(%rsp),%r9d
  mov    %r15,%rdi
  mov    %rax,(%rsp)
  lea    0x1(%r10),%esi
  mov    %r9d,%edx
  mov    %r10d,0x18(%rsp)
  mov    %r9d,0x8(%rsp)
  call   <mergeSortAndCountInversion>
  mov    0x18(%rsp),%edx
  add    (%rsp),%rax
  mov    %r15,%rdi
  mov    0x8(%rsp),%r9d
  mov    0x20(%rsp),%r8d
  mov    %rax,(%rsp)
  mov    %r9d,%ecx
  mov    %r8d,%esi
  mov    %r9d,0x14(%rsp)
  mov    %r8d,0x8(%rsp)
  call   <mergeAndCountInversion@plt>
  add    (%rsp),%rax
  mov    0x14(%rsp),%r9d
  mov    %rax,(%rsp)
  mov    0x8(%rsp),%r8d
L82:
  lea    0x1(%r9),%r10d
  cmp    %r10d,%r13d
  jle    L9
  mov    %r13d,%r11d
  mov    %r10d,%esi
  mov    %r15,%rdi
  mov    %r9d,0x24(%rsp)
  sub    %r10d,%r11d
  mov    %r8d,0x20(%rsp)
  sar    %r11d
  mov    %r10d,0x18(%rsp)
  add    %r10d,%r11d
  mov    %r11d,%edx
  mov    %r11d,0x14(%rsp)
  call   <mergeSortAndCountInversion>
  mov    0x14(%rsp),%r11d
  mov    %r13d,%edx
  mov    %r15,%rdi
  mov    %rax,0x8(%rsp)
  lea    0x1(%r11),%esi
  call   <mergeSortAndCountInversion>
  mov    0x14(%rsp),%edx
  mov    0x18(%rsp),%esi
  mov    %r13d,%ecx
  add    0x8(%rsp),%rax
  mov    %r15,%rdi
  mov    %rax,0x8(%rsp)
  call   <mergeAndCountInversion@plt>
  add    0x8(%rsp),%rax
  add    %rax,(%rsp)
  mov    0x24(%rsp),%r9d
  mov    0x20(%rsp),%r8d
L9:
  mov    %r13d,%ecx
  mov    %r9d,%edx
  mov    %r8d,%esi
  mov    %r15,%rdi
  call   <mergeAndCountInversion@plt>
  add    (%rsp),%rax
  add    %rax,%rbx
  jmp    L202
  nopl   0x0(%rax,%rax,1)
L80:
  mov    %eax,%edx
  sar    $0x3,%edx
  lea    (%rdx,%rsi,1),%r11d
  cmp    %r11d,%esi
  jge    L204
  sar    $0x4,%eax
  mov    %r11d,0x14(%rsp)
  lea    (%rax,%rsi,1),%r8d
  mov    %r8d,%edx
  mov    %r8d,(%rsp)
  call   <mergeSortAndCountInversion>
  mov    (%rsp),%r8d
  mov    0x14(%rsp),%r11d
  mov    %r15,%rdi
  mov    %rax,%rbx
  mov    %r11d,%edx
  lea    0x1(%r8),%esi
  mov    %r11d,(%rsp)
  mov    %r8d,0x8(%rsp)
  call   <mergeSortAndCountInversion>
  mov    (%rsp),%ecx
  mov    0x8(%rsp),%edx
  mov    %ebp,%esi
  mov    %r15,%rdi
  add    %rax,%rbx
  call   <mergeAndCountInversion@plt>
  mov    (%rsp),%r11d
  add    %rax,%rbx
L204:
  lea    0x1(%r11),%r9d
  cmp    %r9d,%r14d
  jle    L137
  mov    %r14d,%r10d
  mov    %r9d,%esi
  mov    %r15,%rdi
  mov    %r11d,0x18(%rsp)
  sub    %r9d,%r10d
  mov    %r9d,0x14(%rsp)
  sar    %r10d
  add    %r9d,%r10d
  mov    %r10d,%edx
  mov    %r10d,0x8(%rsp)
  call   <mergeSortAndCountInversion>
  mov    0x8(%rsp),%r10d
  mov    %r14d,%edx
  mov    %r15,%rdi
  mov    %rax,(%rsp)
  lea    0x1(%r10),%esi
  call   <mergeSortAndCountInversion>
  mov    0x8(%rsp),%edx
  mov    0x14(%rsp),%esi
  mov    %r14d,%ecx
  add    (%rsp),%rax
  mov    %r15,%rdi
  mov    %rax,(%rsp)
  call   <mergeAndCountInversion@plt>
  mov    0x18(%rsp),%r11d
  add    (%rsp),%rax
  add    %rax,%rbx
L137:
  mov    %r14d,%ecx
  mov    %r11d,%edx
  mov    %ebp,%esi
  mov    %r15,%rdi
  call   <mergeAndCountInversion@plt>
  lea    0x1(%r14),%r8d
  add    %rax,%rbx
  cmp    %r8d,%r13d
  jle    L202
  jmp    L194
```

assistant: ```c
long long int mergeSortAndCountInversion(int arr[], int left, int right) {
  if (left >= right)
    return 0;
  int mid = left + ((right - left) >> 1);
  long long int numInversion;
  numInversion = mergeSortAndCountInversion(arr, left, mid);
  numInversion += mergeSortAndCountInversion(arr, mid + 1, right);
  numInversion += mergeAndCountInversion(arr, left, mid, right);
  return numInversion;
}
```