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    %rdi,%r8
  mov    %esi,%edi
  mov    %edx,%r13d
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    %edx,%r11d
  sub    %esi,%r11d
  lea    0x1(%r11),%ebx
  sub    %edx,%ecx
  mov    %ecx,%r9d
  movslq %ebx,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L103:
  cmp    %rdx,%rsp
  je     L161
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L103
L161:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L171
  orq    $0x0,-0x8(%rsp,%rax,1)
L171:
  mov    %rsp,%r10
  test   %ebx,%ebx
  jle    L47
  mov    %r11d,%eax
  lea    0x4(,%rax,4),%rsi
  movslq %edi,%rax
  lea    (%r8,%rax,4),%rcx
  mov    $0x0,%eax
L142:
  mov    (%rcx,%rax,1),%edx
  mov    %edx,(%r10,%rax,1)
  add    $0x4,%rax
  cmp    %rsi,%rax
  jne    L142
L47:
  movslq %r9d,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L69:
  cmp    %rdx,%rsp
  je     L182
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L69
L182:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L81
  orq    $0x0,-0x8(%rsp,%rax,1)
L81:
  mov    %rsp,%rsi
  test   %r9d,%r9d
  jle    L188
  lea    0x1(%r9),%r12d
  movslq %r13d,%r13
  lea    (%r8,%r13,4),%rcx
  mov    $0x1,%eax
L18:
  mov    (%rcx,%rax,4),%edx
  mov    %edx,-0x4(%rsi,%rax,4)
  add    $0x1,%rax
  cmp    %r12,%rax
  jne    L18
  test   %ebx,%ebx
  jle    L58
  lea    0x1(%rdi),%edx
  movslq %edx,%rdx
  mov    $0x0,%eax
  mov    $0x0,%ecx
  jmp    L180
L146:
  mov    %edi,-0x4(%r8,%rdx,4)
  add    $0x1,%eax
L173:
  mov    %edx,%edi
  add    $0x1,%rdx
  cmp    %ebx,%ecx
  jge    L134
  cmp    %r9d,%eax
  jge    L134
L180:
  movslq %ecx,%rdi
  mov    (%r10,%rdi,4),%r12d
  movslq %eax,%rdi
  mov    (%rsi,%rdi,4),%edi
  cmp    %edi,%r12d
  jg     L146
  mov    %r12d,-0x4(%r8,%rdx,4)
  add    $0x1,%ecx
  jmp    L173
L134:
  cmp    %ebx,%ecx
  jge    L152
L115:
  mov    %ecx,%r12d
  mov    %r11d,%ebx
  sub    %ecx,%ebx
  movslq %ecx,%rcx
  lea    (%r10,%rcx,4),%r13
  movslq %edi,%rdx
  lea    (%r8,%rdx,4),%r10
  mov    $0x0,%edx
L111:
  mov    0x0(%r13,%rdx,4),%ecx
  mov    %ecx,(%r10,%rdx,4)
  mov    %rdx,%rcx
  add    $0x1,%rdx
  cmp    %rbx,%rcx
  jne    L111
  lea    0x1(%r11,%rdi,1),%edi
  sub    %r12d,%edi
L152:
  cmp    %r9d,%eax
  jge    L9
  cltq
  movslq %edi,%rdi
  sub    %rax,%rdi
  lea    (%r8,%rdi,4),%rcx
L179:
  mov    (%rsi,%rax,4),%edx
  mov    %edx,(%rcx,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r9d
  jg     L179
L9:
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L200
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
L58:
  mov    $0x0,%eax
  jmp    L152
L188:
  mov    $0x0,%eax
  mov    $0x0,%ecx
  test   %ebx,%ebx
  jg     L115
  jmp    L9
L200:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void merge(int arr[], int l, int m, int r) {
  int i, j, k;
  int n1 = m - l + 1;
  int n2 = r - m;
  int L[n1];
  for (i = 0; i < n1; i++) {
    L[i] = arr[l + i];
  }
  int R[n2];
  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++;
  }
}
```