user: Demonstrate the C code that generates the assembly output below:

```asm
<merge>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %esi,%eax
  mov    %edx,%r8d
  mov    %ecx,%esi
  mov    %fs:0x28,%rdx
  mov    %rdx,-0x28(%rbp)
  xor    %edx,%edx
  mov    %r8d,%r9d
  sub    %eax,%r9d
  lea    0x1(%r9),%edx
  movslq %edx,%rdx
  lea    0xf(,%rdx,4),%rdx
  mov    %rdx,%r10
  and    $0xfffffffffffffff0,%r10
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L167:
  cmp    %rcx,%rsp
  je     L163
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L167
L163:
  mov    %r10,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L130
  orq    $0x0,-0x8(%rsp,%rdx,1)
L130:
  mov    %rsp,%rbx
  mov    %esi,%r10d
  sub    %r8d,%r10d
  movslq %r10d,%rdx
  lea    0xf(,%rdx,4),%rdx
  mov    %rdx,%r11
  and    $0xfffffffffffffff0,%r11
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L96:
  cmp    %rcx,%rsp
  je     L210
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L96
L210:
  mov    %r11,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L151
  orq    $0x0,-0x8(%rsp,%rdx,1)
L151:
  mov    %rsp,%r11
  cmp    %eax,%r8d
  jl     L8
  movslq %eax,%rdx
  mov    %rdx,%rcx
  neg    %rcx
  lea    (%rbx,%rcx,4),%r12
L87:
  mov    (%rdi,%rdx,4),%ecx
  mov    %ecx,(%r12,%rdx,4)
  add    $0x1,%rdx
  cmp    %edx,%r8d
  jge    L87
L8:
  lea    0x1(%r8),%edx
  cmp    %edx,%esi
  jl     L103
  movslq %edx,%rdx
  movslq %r8d,%r8
  neg    %r8
  lea    (%r11,%r8,4),%r8
L63:
  mov    (%rdi,%rdx,4),%ecx
  mov    %ecx,-0x4(%r8,%rdx,4)
  add    $0x1,%rdx
  cmp    %edx,%esi
  jge    L63
L103:
  mov    %r9d,%edx
  not    %edx
  shr    $0x1f,%edx
  test   %r10d,%r10d
  setg   %cl
  test   %dl,%cl
  je     L54
  cmp    %esi,%eax
  jg     L54
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  jmp    L147
L122:
  mov    %r13d,%eax
L86:
  add    $0x1,%r8d
  movslq %eax,%r12
  mov    %edx,(%rdi,%r12,4)
  lea    0x1(%rax),%eax
L248:
  cmp    %ecx,%r9d
  setge  %r12b
  cmp    %esi,%eax
  setle  %dl
  test   %dl,%r12b
  je     L229
  cmp    %r10d,%r8d
  jge    L229
L147:
  movslq %ecx,%rdx
  mov    (%rbx,%rdx,4),%r12d
  movslq %r8d,%rdx
  mov    (%r11,%rdx,4),%edx
  cmp    %edx,%r12d
  jle    L86
  add    $0x1,%ecx
  lea    0x1(%rax),%r13d
  cltq
  mov    %r12d,(%rdi,%rax,4)
  movslq %ecx,%rax
  cmp    (%rbx,%rax,4),%edx
  jge    L122
  mov    %r13d,%eax
  jmp    L248
L54:
  mov    $0x0,%r8d
  mov    $0x0,%ecx
L229:
  cmp    %eax,%esi
  jl     L77
  cmp    %ecx,%r9d
  jl     L77
  lea    0x1(%rax),%edx
  movslq %edx,%rdx
  movslq %eax,%r13
  movslq %ecx,%r12
  sub    %r13,%r12
  lea    (%rbx,%r12,4),%r13
  sub    %eax,%ecx
L69:
  mov    %edx,%eax
  mov    -0x4(%r13,%rdx,4),%ebx
  mov    %ebx,-0x4(%rdi,%rdx,4)
  lea    (%rcx,%rdx,1),%ebx
  cmp    %edx,%esi
  setge  %r12b
  cmp    %ebx,%r9d
  setge  %bl
  add    $0x1,%rdx
  test   %bl,%r12b
  jne    L69
L77:
  cmp    %eax,%esi
  jl     L190
  cmp    %r8d,%r10d
  jle    L190
  lea    0x1(%r8),%edx
  movslq %edx,%rdx
  movslq %r8d,%r9
  movslq %eax,%rcx
  sub    %r9,%rcx
  lea    (%rdi,%rcx,4),%r9
  sub    %r8d,%eax
L41:
  mov    -0x4(%r11,%rdx,4),%ecx
  mov    %ecx,-0x4(%r9,%rdx,4)
  lea    (%rax,%rdx,1),%ecx
  cmp    %esi,%ecx
  setle  %dil
  cmp    %edx,%r10d
  setg   %cl
  add    $0x1,%rdx
  test   %cl,%dil
  jne    L41
L190:
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L129
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
L129:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void merge(int arr[], int low, int mid, int high) {
  int A1[mid - low + 1];
  int A2[high - mid];
  int i = 0, j = 0;
  for (i = low; i <= mid; i++)
    A1[i - low] = arr[i];
  for (j = mid + 1; j <= high; j++)
    A2[j - mid - 1] = arr[j];
  int k = low;
  j = 0;
  i = 0;
  while (k <= high && i <= mid - low && j <= high - mid - 1) {
    if (A1[i] > A2[j])
      arr[k++] = A1[i++];
    if (A2[j] >= A1[i])
      arr[k++] = A2[j++];
  }
  while (i <= mid - low && k <= high)
    arr[k++] = A1[i++];
  while (j <= high - mid - 1 && k <= high)
    arr[k++] = A2[j++];
}
```