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

```asm
<mergesort>:
  endbr64
  cmp    %edx,%esi
  jl     L99
  ret
  nopl   0x0(%rax)
L99:
  lea    (%rsi,%rdx,1),%eax
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %eax,%r12d
  push   %rbp
  shr    $0x1f,%r12d
  mov    %esi,%ebp
  push   %rbx
  add    %eax,%r12d
  mov    %edx,%ebx
  sar    %r12d
  sub    $0x18,%rsp
  cmp    %r12d,%esi
  jl     L66
  lea    0x1(%r12),%r14d
  cmp    %ebx,%r14d
  jl     L122
L60:
  add    $0x18,%rsp
  mov    %ebx,%r8d
  mov    %r14d,%ecx
  mov    %r12d,%edx
  pop    %rbx
  mov    %ebp,%esi
  mov    %r13,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1050 <merge@plt>
  nopl   (%rax)
L66:
  lea    (%rsi,%r12,1),%eax
  mov    %eax,%r14d
  shr    $0x1f,%r14d
  add    %eax,%r14d
  sar    %r14d
  cmp    %r14d,%esi
  jl     L90
L12:
  lea    0x1(%r14),%r15d
  cmp    %r15d,%r12d
  jg     L35
L118:
  mov    %r14d,%edx
  mov    %r12d,%r8d
  mov    %r15d,%ecx
  mov    %ebp,%esi
  mov    %r13,%rdi
  lea    0x1(%r12),%r14d
  call   <merge@plt>
  cmp    %ebx,%r14d
  jge    L60
L122:
  lea    (%r14,%rbx,1),%eax
  mov    %eax,%r15d
  shr    $0x1f,%r15d
  add    %eax,%r15d
  sar    %r15d
  cmp    %r15d,%r14d
  jl     L64
L86:
  lea    0x1(%r15),%r9d
  cmp    %r9d,%ebx
  jg     L128
L52:
  mov    %ebx,%r8d
  mov    %r9d,%ecx
  mov    %r15d,%edx
  mov    %r14d,%esi
  mov    %r13,%rdi
  call   <merge@plt>
  jmp    L60
  nopl   0x0(%rax)
L90:
  lea    (%rsi,%r14,1),%eax
  mov    %eax,%r15d
  shr    $0x1f,%r15d
  add    %eax,%r15d
  sar    %r15d
  mov    %r15d,%edx
  call   <mergesort>
  lea    0x1(%r15),%ecx
  mov    %r14d,%edx
  mov    %r13,%rdi
  mov    %ecx,%esi
  mov    %ecx,0x4(%rsp)
  call   <mergesort>
  mov    0x4(%rsp),%ecx
  mov    %r14d,%r8d
  mov    %r15d,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <merge@plt>
  jmp    L12
  nop
L128:
  lea    (%rbx,%r9,1),%eax
  mov    %r9d,%esi
  mov    %r13,%rdi
  mov    %r9d,0xc(%rsp)
  mov    %eax,%r10d
  shr    $0x1f,%r10d
  add    %eax,%r10d
  sar    %r10d
  mov    %r10d,%edx
  mov    %r10d,0x4(%rsp)
  call   <mergesort>
  mov    0x4(%rsp),%r10d
  mov    %ebx,%edx
  mov    %r13,%rdi
  lea    0x1(%r10),%ecx
  mov    %r10d,0x8(%rsp)
  mov    %ecx,%esi
  mov    %ecx,0x4(%rsp)
  call   <mergesort>
  mov    0xc(%rsp),%r9d
  mov    %ebx,%r8d
  mov    %r13,%rdi
  mov    0x4(%rsp),%ecx
  mov    0x8(%rsp),%edx
  mov    %r9d,%esi
  mov    %r9d,0x4(%rsp)
  call   <merge@plt>
  mov    0x4(%rsp),%r9d
  jmp    L52
  nopl   0x0(%rax)
L64:
  lea    (%r14,%r15,1),%eax
  mov    %r14d,%esi
  mov    %r13,%rdi
  mov    %eax,%r9d
  shr    $0x1f,%r9d
  add    %eax,%r9d
  sar    %r9d
  mov    %r9d,%edx
  mov    %r9d,0x4(%rsp)
  call   <mergesort>
  mov    0x4(%rsp),%r9d
  mov    %r15d,%edx
  mov    %r13,%rdi
  lea    0x1(%r9),%ecx
  mov    %r9d,0x8(%rsp)
  mov    %ecx,%esi
  mov    %ecx,0x4(%rsp)
  call   <mergesort>
  mov    0x4(%rsp),%ecx
  mov    0x8(%rsp),%edx
  mov    %r15d,%r8d
  mov    %r14d,%esi
  mov    %r13,%rdi
  call   <merge@plt>
  jmp    L86
  cs nopw 0x0(%rax,%rax,1)
L35:
  lea    (%r12,%r15,1),%eax
  mov    %r15d,%esi
  mov    %r13,%rdi
  mov    %eax,%r9d
  shr    $0x1f,%r9d
  add    %eax,%r9d
  sar    %r9d
  mov    %r9d,%edx
  mov    %r9d,0x4(%rsp)
  call   <mergesort>
  mov    0x4(%rsp),%r9d
  mov    %r12d,%edx
  mov    %r13,%rdi
  lea    0x1(%r9),%ecx
  mov    %r9d,0x8(%rsp)
  mov    %ecx,%esi
  mov    %ecx,0x4(%rsp)
  call   <mergesort>
  mov    0x4(%rsp),%ecx
  mov    0x8(%rsp),%edx
  mov    %r12d,%r8d
  mov    %r15d,%esi
  mov    %r13,%rdi
  call   <merge@plt>
  jmp    L118
```

assistant: ```c
void mergesort(int a[], int i, int j) {
  int mid;
  if (i < j) {
    mid = (i + j) / 2;
    mergesort(a, i, mid);
    mergesort(a, mid + 1, j);
    merge(a, i, mid, mid + 1, j);
  }
}
```