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

```asm
<merge>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    %ecx,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  add    $0x1,%eax
  mov    $0x4,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L100
L59:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L4
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
  jmp    L118
L4:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x18(%rbp)
L118:
  addl   $0x1,-0x10(%rbp)
L100:
  mov    -0x18(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jg     L47
  mov    -0x14(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L59
L47:
  mov    -0x18(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jg     L33
  jmp    L105
L30:
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
L105:
  mov    -0x18(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jle    L30
  jmp    L102
L39:
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x14(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
L33:
  mov    -0x14(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L39
L102:
  movl   $0x0,-0xc(%rbp)
  jmp    L27
L3:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    -0x2c(%rbp),%ecx
  mov    -0xc(%rbp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0xc(%rbp)
L27:
  mov    -0x34(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  cmp    %eax,-0xc(%rbp)
  jle    L3
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  leave
  ret
```

assistant: ```c
void merge(int *nums, int p, int q, int r) {
  int *temp = calloc(r - p + 1, sizeof(int));
  int i = p, j = q + 1, k = 0;
  while (i <= q && j <= r) {
    if (nums[j] < nums[i]) {
      temp[k] = nums[j];
      ++j;
    } else {
      temp[k] = nums[i];
      ++i;
    }
    ++k;
  }
  if (i <= q) {
    while (i <= q)
      temp[k++] = nums[i++];
  } else {
    while (j <= r)
      temp[k++] = nums[j++];
  }
  for (int i = 0; i < r - p + 1; i++)
    nums[p + i] = temp[i];
  free(temp);
}
```