user: Translate the below assembly code into C programming language:

```asm
<merge>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r13
  mov    %rsi,%rbx
  mov    %rdx,0x18(%rsp)
  mov    %rdx,%rdi
  sub    %rsi,%rdi
  mov    %rdi,0x8(%rsp)
  lea    0x1(%rdi),%r15
  sub    %rdx,%rcx
  mov    %rcx,%r14
  lea    0x0(,%r15,8),%rdi
  call   <malloc@plt>
  mov    %rax,%rbp
  lea    0x0(,%r14,8),%rsi
  mov    %rsi,0x10(%rsp)
  mov    %rsi,%rdi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %r15,%r15
  jle    L77
  mov    %rbp,%rax
  mov    0x8(%rsp),%rdi
  lea    0x8(%rbp,%rdi,8),%rsi
  lea    0x0(%r13,%rbx,8),%rcx
  sub    %rbp,%rcx
L67:
  mov    (%rcx,%rax,1),%rdx
  mov    %rdx,(%rax)
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L67
  mov    $0x0,%edx
  mov    $0x0,%ecx
  test   %r14,%r14
  jle    L11
L147:
  mov    %r12,%rax
  mov    0x10(%rsp),%rdi
  lea    (%rdi,%r12,1),%rsi
  mov    0x18(%rsp),%rdi
  lea    0x0(%r13,%rdi,8),%rcx
  sub    %r12,%rcx
L86:
  mov    0x8(%rcx,%rax,1),%rdx
  mov    %rdx,(%rax)
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L86
  test   %r15,%r15
  jle    L43
  mov    $0x0,%edx
  mov    $0x0,%ecx
  jmp    L165
L79:
  mov    %rax,0x0(%r13,%rbx,8)
  add    $0x1,%rdx
L31:
  add    $0x1,%rbx
  cmp    %r15,%rcx
  jge    L155
  cmp    %r14,%rdx
  jge    L155
L165:
  mov    0x0(%rbp,%rcx,8),%rsi
  mov    (%r12,%rdx,8),%rax
  cmp    %rax,%rsi
  jg     L79
  mov    %rsi,0x0(%r13,%rbx,8)
  add    $0x1,%rcx
  jmp    L31
L155:
  cmp    %r15,%rcx
  jge    L83
L11:
  mov    %rcx,%r8
  lea    0x0(%rbp,%rcx,8),%rax
  mov    0x8(%rsp),%rdi
  lea    0x8(%rbp,%rdi,8),%rdi
  mov    %rbx,%r9
  sub    %rcx,%rbx
  lea    0x0(%r13,%rbx,8),%rsi
  sub    %rbp,%rsi
L150:
  mov    (%rax),%rcx
  mov    %rcx,(%rsi,%rax,1)
  add    $0x8,%rax
  cmp    %rdi,%rax
  jne    L150
  mov    0x8(%rsp),%rax
  lea    0x1(%rax,%r9,1),%rbx
  sub    %r8,%rbx
L83:
  cmp    %r14,%rdx
  jge    L130
  lea    (%r12,%rdx,8),%rax
  mov    0x10(%rsp),%rsi
  add    %r12,%rsi
  neg    %rdx
  shl    $0x3,%rdx
  sub    %r12,%rdx
  lea    (%rdx,%rbx,8),%rcx
  add    %r13,%rcx
L71:
  mov    (%rax),%rdx
  mov    %rdx,(%rcx,%rax,1)
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L71
L130:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r12,%rdi
  call   <free@plt>
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L43:
  mov    $0x0,%edx
  jmp    L83
L77:
  mov    $0x0,%edx
  test   %r14,%r14
  jg     L147
  jmp    L83
```

assistant: ```c
void merge(long long *arr, long long l, long long m, long long r) {
  long long i, j, k;
  long long n1 = m - l + 1;
  long long n2 = r - m;
  long long *L = (long long *)malloc(n1 * sizeof(long long));
  long long *R = (long long *)malloc(n2 * sizeof(long long));
  for (i = 0; i < n1; i++)
    L[i] = arr[l + i];
  for (j = 0; j < n2; j++)
    R[j] = arr[m + 1 + j];
  i = 0;
  j = 0;
  k = l;
  while (i < n1 && j < n2) {
    if (L[i] <= R[j]) {
      arr[k] = L[i];
      i++;
    } else {
      arr[k] = R[j];
      j++;
    }
    k++;
  }
  while (i < n1) {
    arr[k] = L[i];
    i++;
    k++;
  }
  while (j < n2) {
    arr[k] = R[j];
    j++;
    k++;
  }
  free(L);
  free(R);
}
```