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

```asm
<merge>:
  endbr64
  push   %r15
  mov    %rdi,%rax
  mov    %edx,%r10d
  mov    %rsi,%rdi
  push   %r14
  mov    %ecx,%esi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  cmp    %ecx,%edx
  jge    L37
  cmp    %r8d,%ecx
  jg     L37
  lea    0x1(%rdx),%ebx
  xor    %r11d,%r11d
  movslq %edx,%r13
  movslq %ecx,%r14
  movslq %ebx,%rbx
  nopl   (%rax)
L178:
  mov    (%rax,%r13,4),%r12d
  mov    (%rax,%r14,4),%ebp
  mov    %ebx,%r9d
  cmp    %r12d,%ebp
  jl     L241
L322:
  mov    %r12d,-0x4(%rdi,%rbx,4)
  add    $0x1,%edx
  add    $0x1,%rbx
  cmp    %ecx,%r8d
  jl     L143
  cmp    %edx,%esi
  jle    L116
  movslq %edx,%r13
  mov    (%rax,%r14,4),%ebp
  mov    %ebx,%r9d
  mov    (%rax,%r13,4),%r12d
  cmp    %r12d,%ebp
  jge    L322
L241:
  mov    %esi,%r12d
  add    $0x1,%ecx
  mov    %ebp,-0x4(%rdi,%rbx,4)
  add    $0x1,%rbx
  sub    %edx,%r12d
  movslq %r12d,%r12
  add    %r12,%r11
  cmp    %ecx,%r8d
  jl     L143
  cmp    %edx,%esi
  jle    L116
  movslq %ecx,%r14
  jmp    L178
  nopl   (%rax)
L37:
  mov    %r10d,%r9d
  mov    %esi,%ecx
  mov    %r10d,%edx
  xor    %r11d,%r11d
  nopl   0x0(%rax,%rax,1)
L143:
  cmp    %edx,%esi
  jle    L116
  movslq %r9d,%rbx
  movslq %edx,%rbp
  mov    %esi,%r13d
  shl    $0x2,%rbx
  sub    %edx,%r13d
  lea    (%rdi,%rbx,1),%r12
  mov    %rbx,-0x18(%rsp)
  lea    0x1(%rbp),%rbx
  lea    0x0(,%rbx,4),%r15
  mov    %rbx,-0x10(%rsp)
  mov    %r12,%rbx
  lea    (%rax,%r15,1),%r14
  sub    %r14,%rbx
  cmp    $0x8,%rbx
  jbe    L287
  lea    -0x1(%r13),%r14d
  cmp    $0x2,%r14d
  jbe    L287
  mov    %r13d,%ebp
  lea    -0x4(%rax,%r15,1),%r14
  xor    %ebx,%ebx
  shr    $0x2,%ebp
  shl    $0x4,%rbp
  nopl   (%rax)
L59:
  movdqu (%r14,%rbx,1),%xmm0
  movups %xmm0,(%r12,%rbx,1)
  add    $0x10,%rbx
  cmp    %rbx,%rbp
  jne    L59
  mov    %r13d,%ebx
  and    $0xfffffffc,%ebx
  add    %ebx,%edx
  lea    (%r9,%rbx,1),%ebp
  cmp    %ebx,%r13d
  je     L145
  movslq %edx,%r14
  lea    0x1(%rbp),%r12d
  lea    0x1(%rdx),%ebx
  movslq %ebp,%rbp
  mov    (%rax,%r14,4),%r14d
  mov    %r14d,(%rdi,%rbp,4)
  cmp    %esi,%ebx
  jge    L145
  movslq %ebx,%rbx
  movslq %r12d,%rbp
  add    $0x2,%edx
  lea    0x0(,%rbx,4),%r14
  mov    (%rax,%rbx,4),%ebx
  lea    0x0(,%rbp,4),%r12
  mov    %ebx,(%rdi,%rbp,4)
  cmp    %esi,%edx
  jge    L145
  mov    0x4(%rax,%r14,1),%edx
  mov    %edx,0x4(%rdi,%r12,1)
L145:
  add    %r13d,%r9d
L116:
  cmp    %ecx,%r8d
  jl     L108
  movslq %r9d,%r12
  movslq %ecx,%rsi
  mov    %r8d,%ebp
  shl    $0x2,%r12
  lea    0x1(%rsi),%rdx
  sub    %ecx,%ebp
  lea    (%rdi,%r12,1),%rbx
  lea    0x0(,%rdx,4),%r13
  lea    (%rax,%r13,1),%r15
  mov    %rbx,%r14
  sub    %r15,%r14
  cmp    $0x8,%r14
  jbe    L73
  cmp    $0x2,%ebp
  jbe    L73
  add    $0x1,%ebp
  lea    -0x4(%rax,%r13,1),%r12
  xor    %edx,%edx
  mov    %ebp,%esi
  shr    $0x2,%esi
  shl    $0x4,%rsi
  xchg   %ax,%ax
L130:
  movdqu (%r12,%rdx,1),%xmm1
  movups %xmm1,(%rbx,%rdx,1)
  add    $0x10,%rdx
  cmp    %rdx,%rsi
  jne    L130
  mov    %ebp,%edx
  and    $0xfffffffc,%edx
  add    %edx,%ecx
  add    %edx,%r9d
  cmp    %edx,%ebp
  je     L108
  movslq %ecx,%rbx
  lea    0x1(%r9),%esi
  lea    0x1(%rcx),%edx
  movslq %r9d,%r9
  mov    (%rax,%rbx,4),%ebx
  mov    %ebx,(%rdi,%r9,4)
  cmp    %r8d,%edx
  jg     L108
  movslq %edx,%rdx
  movslq %esi,%rsi
  add    $0x2,%ecx
  lea    0x0(,%rdx,4),%rbx
  mov    (%rax,%rdx,4),%edx
  lea    0x0(,%rsi,4),%r9
  mov    %edx,(%rdi,%rsi,4)
  cmp    %ecx,%r8d
  jl     L108
  mov    0x4(%rax,%rbx,1),%edx
  mov    %edx,0x4(%rdi,%r9,1)
L108:
  cmp    %r8d,%r10d
  jg     L151
  movslq %r10d,%rdx
  mov    %r8d,%ebx
  lea    0x0(,%rdx,4),%rcx
  sub    %r10d,%ebx
  lea    (%rax,%rcx,1),%r9
  lea    0x4(%rdi,%rcx,1),%rbp
  mov    %r9,%rsi
  sub    %rbp,%rsi
  cmp    $0x8,%rsi
  jbe    L216
  cmp    $0x2,%ebx
  jbe    L216
  add    $0x1,%ebx
  add    %rdi,%rcx
  xor    %edx,%edx
  mov    %ebx,%esi
  shr    $0x2,%esi
  shl    $0x4,%rsi
L325:
  movdqu (%rcx,%rdx,1),%xmm2
  movups %xmm2,(%r9,%rdx,1)
  add    $0x10,%rdx
  cmp    %rdx,%rsi
  jne    L325
  mov    %ebx,%edx
  and    $0xfffffffc,%edx
  add    %edx,%r10d
  cmp    %ebx,%edx
  je     L151
  movslq %r10d,%rdx
  mov    (%rdi,%rdx,4),%ecx
  mov    %ecx,(%rax,%rdx,4)
  lea    0x1(%r10),%edx
  cmp    %r8d,%edx
  jg     L151
  movslq %edx,%rdx
  add    $0x2,%r10d
  mov    (%rdi,%rdx,4),%esi
  lea    0x0(,%rdx,4),%rcx
  mov    %esi,(%rax,%rdx,4)
  cmp    %r8d,%r10d
  jg     L151
  mov    0x4(%rdi,%rcx,1),%edx
  mov    %edx,0x4(%rax,%rcx,1)
L151:
  pop    %rbx
  mov    %r11,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L216:
  mov    (%rdi,%rdx,4),%ecx
  mov    %ecx,(%rax,%rdx,4)
  add    $0x1,%rdx
  cmp    %edx,%r8d
  jl     L151
  mov    (%rdi,%rdx,4),%ecx
  mov    %ecx,(%rax,%rdx,4)
  add    $0x1,%rdx
  cmp    %edx,%r8d
  jge    L216
  jmp    L151
  nopl   0x0(%rax,%rax,1)
L287:
  mov    -0x18(%rsp),%rbx
  mov    %rbp,%rdx
  neg    %rdx
  lea    (%rbx,%rdx,4),%r12
  mov    -0x10(%rsp),%rbx
  add    %rdi,%r12
  jmp    L56
  nopl   0x0(%rax)
L45:
  add    $0x1,%rbx
L56:
  mov    (%rax,%rbp,4),%edx
  mov    %edx,(%r12,%rbp,4)
  mov    %rbx,%rbp
  cmp    %ebx,%esi
  jg     L45
  add    %r13d,%r9d
  jmp    L116
  nopw   0x0(%rax,%rax,1)
L73:
  mov    %rsi,%rcx
  neg    %rcx
  lea    (%r12,%rcx,4),%r9
  add    %rdi,%r9
  jmp    L16
  nop
L232:
  add    $0x1,%rdx
L16:
  mov    (%rax,%rsi,4),%ecx
  mov    %ecx,(%r9,%rsi,4)
  mov    %rdx,%rsi
  cmp    %edx,%r8d
  jge    L232
  jmp    L108
```

assistant: ```c
long long int merge(int arr[], int temp[], int left, int mid, int right) {
  int i, j, k;
  long long int inv_count = 0;
  i = left;
  j = mid;
  k = left;
  while ((i <= mid - 1) && (j <= right)) {
    if (arr[i] <= arr[j]) {
      temp[k++] = arr[i++];
    } else {
      temp[k++] = arr[j++];
      inv_count = inv_count + (mid - i);
    }
  }
  while (i <= mid - 1)
    temp[k++] = arr[i++];
  while (j <= right)
    temp[k++] = arr[j++];
  for (i = left; i <= right; i++)
    arr[i] = temp[i];
  return inv_count;
}
```