user: What is the c source code of the assembly code below?

```asm
<merge>:
  endbr64
  push   %r15
  mov    %ecx,%r9d
  mov    %edx,%ecx
  push   %r14
  sub    %edx,%r9d
  push   %r13
  push   %r12
  movslq %esi,%r12
  push   %rbp
  sub    %r12d,%ecx
  mov    %r9d,%ebp
  push   %rbx
  lea    0x1(%rcx),%r15d
  mov    %rdi,%rbx
  lea    0x0(,%r15,4),%edi
  sub    $0x18,%rsp
  mov    %ecx,0xc(%rsp)
  mov    %edx,0x8(%rsp)
  call   <malloc@plt>
  lea    0x0(,%rbp,4),%edi
  mov    %rax,%r13
  call   <malloc@plt>
  test   %r15d,%r15d
  movslq 0x8(%rsp),%r8
  mov    0xc(%rsp),%ecx
  mov    %rax,%r14
  jle    L101
  mov    %ecx,%edx
  mov    %r13,%rax
  lea    0x4(%r13,%rdx,4),%rdi
  movslq %r12d,%rdx
  lea    (%rbx,%rdx,4),%rsi
  sub    %r13,%rsi
  nopl   0x0(%rax,%rax,1)
L56:
  mov    (%rsi,%rax,1),%edx
  add    $0x4,%rax
  mov    %edx,-0x4(%rax)
  cmp    %rdi,%rax
  jne    L56
L101:
  xor    %edi,%edi
  xor    %edx,%edx
  test   %ebp,%ebp
  jle    L50
  mov    %ebp,%edx
  lea    (%rbx,%r8,4),%rsi
  mov    %r14,%rax
  lea    (%r14,%rdx,4),%rdi
  sub    %r14,%rsi
  nopl   0x0(%rax,%rax,1)
L0:
  mov    0x4(%rsi,%rax,1),%edx
  add    $0x4,%rax
  mov    %edx,-0x4(%rax)
  cmp    %rdi,%rax
  jne    L0
  test   %r15d,%r15d
  jle    L25
  lea    0x1(%r12),%eax
  xor    %edi,%edi
  xor    %edx,%edx
  cltq
  jmp    L133
  xchg   %ax,%ax
L107:
  add    $0x1,%edx
  mov    %esi,-0x4(%rbx,%rax,4)
  movslq %eax,%r12
  add    $0x1,%rax
  cmp    %r15d,%edx
  jge    L50
L67:
  cmp    %ebp,%edi
  jge    L50
L133:
  movslq %edx,%rsi
  movslq %edi,%r8
  mov    0x0(%r13,%rsi,4),%esi
  mov    (%r14,%r8,4),%r8d
  cmp    %r8d,%esi
  jle    L107
  mov    %r8d,%esi
  movslq %eax,%r12
  add    $0x1,%edi
  mov    %esi,-0x4(%rbx,%rax,4)
  add    $0x1,%rax
  cmp    %r15d,%edx
  jl     L67
L50:
  cmp    %edx,%r15d
  jle    L88
  movslq %edx,%rsi
  sub    %edx,%ecx
  lea    0x0(,%rsi,4),%r9
  add    %rsi,%rcx
  movslq %r12d,%rsi
  shl    $0x2,%rsi
  lea    0x0(%r13,%r9,1),%rax
  lea    0x4(%r13,%rcx,4),%r8
  sub    %r9,%rsi
  sub    %r13,%rsi
  add    %rbx,%rsi
L17:
  mov    (%rax),%ecx
  mov    %ecx,(%rsi,%rax,1)
  add    $0x4,%rax
  cmp    %r8,%rax
  jne    L17
  add    %r12d,%r15d
  sub    %edx,%r15d
  movslq %r15d,%r12
L88:
  cmp    %edi,%ebp
  jle    L113
L83:
  movslq %edi,%rcx
  sub    $0x1,%ebp
  lea    0x0(,%rcx,4),%rdx
  sub    %edi,%ebp
  lea    (%r14,%rdx,1),%rax
  neg    %rdx
  add    %rcx,%rbp
  sub    %r14,%rdx
  lea    0x4(%r14,%rbp,4),%rcx
  lea    (%rdx,%r12,4),%rdx
  add    %rdx,%rbx
  nopl   0x0(%rax)
L44:
  mov    (%rax),%edx
  mov    %edx,(%rbx,%rax,1)
  add    $0x4,%rax
  cmp    %rcx,%rax
  jne    L44
L113:
  mov    %r13,%rdi
  call   <free@plt>
  add    $0x18,%rsp
  mov    %r14,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <free@plt>
L25:
  xor    %edi,%edi
  jmp    L83
```

assistant: ```c
void merge(int *a, int l, int m, int r) {
  int i, j, k;
  int len1 = m - l + 1;
  int len2 = r - m;
  int *a1;
  a1 = (int *)malloc(len1 * sizeof(int));
  int *a2;
  a2 = (int *)malloc(len2 * sizeof(int));
  for (i = 0; i < len1; i++) {
    *(a1 + i) = *(a + l + i);
  }
  for (i = 0; i < len2; i++) {
    *(a2 + i) = *(a + m + 1 + i);
  }
  i = 0;
  j = 0;
  k = l;
  while (i < len1 && j < len2) {
    if (*(a1 + i) <= *(a2 + j)) {
      *(a + k) = *(a1 + i);
      i++;
    } else {
      *(a + k) = *(a2 + j);
      j++;
    }
    k++;
  }
  while (i < len1) {
    *(a + k) = *(a1 + i);
    i++;
    k++;
  }
  while (j < len2) {
    *(a + k) = *(a2 + j);
    j++;
    k++;
  }
  free(a1);
  free(a2);
}
```