user: What would the C source look like for the assembly code provided here:

```asm
<merge>:
  endbr64
  push   %r15
  mov    %edx,%eax
  push   %r14
  sub    %ecx,%eax
  mov    %esi,%r14d
  push   %r13
  push   %r12
  mov    %rdi,%r12
  lea    0x4(,%rax,4),%edi
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x18,%rsp
  call   <malloc@plt>
  mov    %ebp,%edx
  sub    %r14d,%edx
  mov    %rax,%r15
  lea    0x1(%rdx),%ecx
  mov    %edx,0xc(%rsp)
  lea    0x0(,%rcx,4),%edi
  mov    %ecx,0x8(%rsp)
  call   <malloc@plt>
  cmp    %r14d,%ebp
  mov    0x8(%rsp),%ecx
  mov    0xc(%rsp),%edx
  mov    %rax,%r13
  jl     L186
  movslq %r14d,%rax
  lea    0x4(,%rax,4),%rsi
  mov    %r15,%rax
  lea    (%r12,%rsi,1),%rdi
  sub    %rdi,%rax
  cmp    $0x8,%rax
  jbe    L55
  cmp    $0x2,%edx
  jbe    L55
  mov    %ecx,%edx
  mov    %r12,%rdi
  mov    %r15,%rax
  shr    $0x2,%edx
  sub    %r15,%rdi
  shl    $0x4,%rdx
  lea    -0x4(%rdi,%rsi,1),%rsi
  add    %r15,%rdx
  nopl   0x0(%rax)
L21:
  movdqu (%rax,%rsi,1),%xmm0
  add    $0x10,%rax
  movups %xmm0,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L21
  mov    %ecx,%edx
  and    $0xfffffffc,%edx
  lea    (%r14,%rdx,1),%eax
  cmp    %edx,%ecx
  je     L186
  movslq %eax,%rcx
  movslq %edx,%rdx
  mov    (%r12,%rcx,4),%ecx
  mov    %ecx,(%r15,%rdx,4)
  lea    0x1(%rax),%edx
  cmp    %edx,%ebp
  jl     L186
  movslq %edx,%rcx
  sub    %r14d,%edx
  add    $0x2,%eax
  lea    0x0(,%rcx,4),%rsi
  mov    (%r12,%rcx,4),%ecx
  movslq %edx,%rdx
  mov    %ecx,(%r15,%rdx,4)
  cmp    %eax,%ebp
  jl     L186
  mov    0x4(%r12,%rsi,1),%edx
  sub    %r14d,%eax
  cltq
  mov    %edx,(%r15,%rax,4)
L186:
  lea    0x1(%rbp),%ecx
  cmp    %ecx,%ebx
  jl     L247
  movslq %ebp,%rax
  mov    %ebx,%edi
  lea    0x8(,%rax,4),%rsi
  mov    %r13,%rax
  sub    %ebp,%edi
  lea    (%r12,%rsi,1),%r8
  lea    -0x1(%rdi),%edx
  sub    %r8,%rax
  cmp    $0x8,%rax
  jbe    L150
  cmp    $0x2,%edx
  jbe    L150
  mov    %edi,%edx
  mov    %r12,%r8
  mov    %r13,%rax
  shr    $0x2,%edx
  sub    %r13,%r8
  shl    $0x4,%rdx
  lea    -0x4(%r8,%rsi,1),%rsi
  add    %r13,%rdx
  xchg   %ax,%ax
L68:
  movdqu (%rax,%rsi,1),%xmm1
  add    $0x10,%rax
  movups %xmm1,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L68
  mov    %edi,%edx
  and    $0xfffffffc,%edx
  lea    (%rdx,%rcx,1),%eax
  cmp    %edx,%edi
  je     L247
  movslq %eax,%rdx
  mov    (%r12,%rdx,4),%ecx
  mov    %eax,%edx
  sub    %ebp,%edx
  movslq %edx,%rdx
  mov    %ecx,-0x4(%r13,%rdx,4)
  lea    0x1(%rax),%edx
  cmp    %edx,%ebx
  jl     L247
  movslq %edx,%rcx
  sub    %ebp,%edx
  add    $0x2,%eax
  lea    0x0(,%rcx,4),%rsi
  mov    (%r12,%rcx,4),%ecx
  movslq %edx,%rdx
  mov    %ecx,-0x4(%r13,%rdx,4)
  cmp    %eax,%ebx
  jl     L247
  mov    0x4(%r12,%rsi,1),%edx
  sub    %ebp,%eax
  cltq
  mov    %edx,-0x4(%r13,%rax,4)
L247:
  lea    0x1(%r14),%eax
  xor    %ecx,%ecx
  xor    %edx,%edx
  cltq
L6:
  lea    (%rdx,%r14,1),%esi
  cmp    %ebp,%esi
  jle    L140
  movslq %ecx,%rdx
  mov    %eax,%r10d
  add    $0x1,%ecx
  mov    0x0(%r13,%rdx,4),%edx
  mov    %edx,-0x4(%r12,%rax,4)
  cmp    %eax,%ebx
  jl     L27
  mov    %ebx,%r9d
  movslq %ecx,%rdx
  sub    %eax,%r9d
  cltq
  lea    0x0(%r13,%rdx,4),%rsi
  lea    (%r12,%rax,4),%rdi
  lea    0x4(%rsi),%rdx
  mov    %rdi,%r8
  sub    %rdx,%r8
  cmp    $0x8,%r8
  jbe    L13
  cmp    $0x2,%r9d
  ja     1080 <merge.cold>
  jmp    L13
  nopl   0x0(%rax,%rax,1)
L202:
  add    $0x4,%rdx
L13:
  mov    (%rsi),%ecx
  mov    %rdx,%rsi
  mov    %ecx,(%r12,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%ebx
  jge    L202
L27:
  mov    %r15,%rdi
  call   <free@plt>
  add    $0x18,%rsp
  mov    %r13,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <free@plt>
  nopl   0x0(%rax,%rax,1)
L140:
  movslq %edx,%rsi
  lea    (%rcx,%rbp,1),%edi
  mov    (%r15,%rsi,4),%esi
  cmp    %ebx,%edi
  jge    L56
  movslq %ecx,%rdi
  mov    0x0(%r13,%rdi,4),%edi
  cmp    %esi,%edi
  jge    L56
  add    $0x1,%ecx
  mov    %edi,%esi
L91:
  mov    %esi,-0x4(%r12,%rax,4)
  cmp    %eax,%ebx
  jl     L27
  add    $0x1,%rax
  jmp    L6
  nopl   0x0(%rax)
L56:
  add    $0x1,%edx
  jmp    L91
  nopl   (%rax)
L150:
  lea    0x4(%r13,%rdx,4),%rdi
  mov    %r12,%rdx
  mov    %r13,%rax
  sub    %r13,%rdx
  lea    -0x8(%rdx,%rsi,1),%rcx
  nopl   0x0(%rax,%rax,1)
L222:
  mov    0x4(%rcx,%rax,1),%edx
  add    $0x4,%rax
  mov    %edx,-0x4(%rax)
  cmp    %rdi,%rax
  jne    L222
  jmp    L247
  nopl   (%rax)
L55:
  lea    0x4(%r15,%rdx,4),%rdi
  mov    %r12,%rdx
  mov    %r15,%rax
  sub    %r15,%rdx
  lea    -0x4(%rdx,%rsi,1),%rcx
  nopl   0x0(%rax,%rax,1)
L111:
  mov    (%rcx,%rax,1),%edx
  add    $0x4,%rax
  mov    %edx,-0x4(%rax)
  cmp    %rdi,%rax
  jne    L111
  jmp    L186
```

assistant: ```c
void merge(int *Array, int first, int last, int mid) {
  int i, j, k;
  int *tempArray1 = (int *)malloc((last - mid + 1) * sizeof(int));
  int *tempArray2 = (int *)malloc((mid - first + 1) * sizeof(int));
  for (i = first; i <= mid; i = i + 1)
    tempArray1[i - first] = Array[i];
  for (j = mid + 1; j <= last; j = j + 1)
    tempArray2[j - mid - 1] = Array[j];
  i = 0;
  j = 0;
  k = first;
  do {
    if (i + first > mid) {
      Array[k] = tempArray2[j];
      j++;
    } else if (j + mid + 1 > last) {
      Array[k] = tempArray1[i];
      i++;
    } else if (tempArray1[i] <= tempArray2[j]) {
      Array[k] = tempArray1[i];
      i++;
    } else {
      Array[k] = tempArray2[j];
      j++;
    }
    k++;
  } while (k <= last);
  free(tempArray1);
  free(tempArray2);
}
```