user: Please show me the C implementation that matches the assembly code listed below:

```asm
<mergesort_rec>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  sub    $0x28,%rsp
  mov    %esi,0x4(%rsp)
  cmp    %ecx,%edx
  jg     L287
  je     L321
  lea    (%rdx,%rcx,1),%eax
  mov    %rdi,%r13
  mov    %r8,%rbx
  mov    %eax,%r14d
  shr    $0x1f,%r14d
  add    %eax,%r14d
  sar    %r14d
  cmp    %r14d,%edx
  jg     L49
  je     L303
  lea    (%rdx,%r14,1),%eax
  mov    %eax,%r15d
  shr    $0x1f,%r15d
  add    %eax,%r15d
  sar    %r15d
  cmp    %r15d,%edx
  jg     L409
  je     L189
  lea    (%rdx,%r15,1),%eax
  mov    %eax,%r10d
  shr    $0x1f,%r10d
  add    %eax,%r10d
  sar    %r10d
  cmp    %r10d,%edx
  jg     L58
  je     L335
  lea    (%rdx,%r10,1),%eax
  mov    %r10d,0xc(%rsp)
  mov    %eax,%r11d
  shr    $0x1f,%r11d
  add    %eax,%r11d
  sar    %r11d
  mov    %r11d,%ecx
  mov    %r11d,0x8(%rsp)
  call   <mergesort_rec>
  mov    0x8(%rsp),%r11d
  mov    %rbx,%r8
  mov    %r13,%rdi
  mov    0xc(%rsp),%r10d
  mov    0x4(%rsp),%esi
  lea    0x1(%r11),%eax
  mov    %r11d,0x10(%rsp)
  mov    %r10d,%ecx
  mov    %eax,%edx
  mov    %r10d,0x8(%rsp)
  mov    %eax,0xc(%rsp)
  call   <mergesort_rec>
  mov    0x8(%rsp),%r8d
  mov    0xc(%rsp),%ecx
  mov    %ebp,%esi
  mov    0x10(%rsp),%edx
  mov    %r13,%r9
  mov    %rbx,%rdi
  call   <merge@plt>
  mov    0x8(%rsp),%r10d
L335:
  lea    0x1(%r10),%r11d
  cmp    %r11d,%r15d
  jl     L144
  je     L186
  lea    (%r15,%r11,1),%edx
  mov    0x4(%rsp),%esi
  mov    %rbx,%r8
  mov    %r13,%rdi
  mov    %edx,%eax
  mov    %r10d,0x14(%rsp)
  shr    $0x1f,%eax
  mov    %r11d,0x10(%rsp)
  add    %edx,%eax
  mov    %r11d,%edx
  sar    %eax
  mov    %eax,%ecx
  mov    %eax,0x8(%rsp)
  call   <mergesort_rec>
  mov    0x8(%rsp),%eax
  mov    0x4(%rsp),%esi
  mov    %rbx,%r8
  mov    %r15d,%ecx
  mov    %r13,%rdi
  lea    0x1(%rax),%edx
  mov    %eax,0xc(%rsp)
  mov    %edx,0x8(%rsp)
  call   <mergesort_rec>
  mov    0x10(%rsp),%r11d
  mov    %r13,%r9
  mov    %r15d,%r8d
  mov    0x8(%rsp),%ecx
  mov    0xc(%rsp),%edx
  mov    %rbx,%rdi
  mov    %r11d,%esi
  mov    %r11d,0x8(%rsp)
  call   <merge@plt>
  mov    0x14(%rsp),%r10d
  mov    0x8(%rsp),%r11d
L186:
  mov    %rbx,%r9
  mov    %r15d,%r8d
  mov    %r11d,%ecx
  mov    %r10d,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <merge@plt>
L189:
  lea    0x1(%r15),%r10d
  cmp    %r10d,%r14d
  jl     L126
  je     L101
  lea    (%r14,%r10,1),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  mov    %eax,0x8(%rsp)
  cmp    %eax,%r10d
  jg     L379
  je     L109
  add    %r10d,%eax
  mov    0x4(%rsp),%esi
  mov    %r10d,%edx
  mov    %rbx,%r8
  mov    %eax,%r11d
  mov    %r13,%rdi
  mov    %r10d,0x14(%rsp)
  shr    $0x1f,%r11d
  add    %eax,%r11d
  sar    %r11d
  mov    %r11d,%ecx
  mov    %r11d,0xc(%rsp)
  call   <mergesort_rec>
  mov    0xc(%rsp),%r11d
  mov    %rbx,%r8
  mov    %r13,%rdi
  mov    0x8(%rsp),%ecx
  mov    0x4(%rsp),%esi
  lea    0x1(%r11),%eax
  mov    %r11d,0x10(%rsp)
  mov    %eax,%edx
  mov    %eax,0xc(%rsp)
  call   <mergesort_rec>
  mov    0x14(%rsp),%r10d
  mov    %r13,%r9
  mov    %rbx,%rdi
  mov    0xc(%rsp),%ecx
  mov    0x8(%rsp),%r8d
  mov    0x10(%rsp),%edx
  mov    %r10d,%esi
  mov    %r10d,0xc(%rsp)
  call   <merge@plt>
  mov    0xc(%rsp),%r10d
L109:
  mov    0x8(%rsp),%eax
  lea    0x1(%rax),%r11d
  cmp    %r11d,%r14d
  jl     L385
  je     L315
  lea    (%r14,%r11,1),%edx
  mov    0x4(%rsp),%esi
  mov    %rbx,%r8
  mov    %r13,%rdi
  mov    %edx,%eax
  mov    %r10d,0x18(%rsp)
  shr    $0x1f,%eax
  mov    %r11d,0x14(%rsp)
  add    %edx,%eax
  mov    %r11d,%edx
  sar    %eax
  mov    %eax,%ecx
  mov    %eax,0xc(%rsp)
  call   <mergesort_rec>
  mov    0xc(%rsp),%eax
  mov    0x4(%rsp),%esi
  mov    %rbx,%r8
  mov    %r14d,%ecx
  mov    %r13,%rdi
  lea    0x1(%rax),%edx
  mov    %eax,0x10(%rsp)
  mov    %edx,0xc(%rsp)
  call   <mergesort_rec>
  mov    0x14(%rsp),%r11d
  mov    %r13,%r9
  mov    %r14d,%r8d
  mov    0xc(%rsp),%ecx
  mov    0x10(%rsp),%edx
  mov    %rbx,%rdi
  mov    %r11d,%esi
  mov    %r11d,0xc(%rsp)
  call   <merge@plt>
  mov    0x18(%rsp),%r10d
  mov    0xc(%rsp),%r11d
L315:
  mov    0x8(%rsp),%edx
  mov    %r10d,%esi
  mov    %rbx,%r9
  mov    %r14d,%r8d
  mov    %r11d,%ecx
  mov    %r13,%rdi
  mov    %r10d,0x8(%rsp)
  call   <merge@plt>
  mov    0x8(%rsp),%r10d
L101:
  mov    %r13,%r9
  mov    %r14d,%r8d
  mov    %r10d,%ecx
  mov    %r15d,%edx
  mov    %ebp,%esi
  mov    %rbx,%rdi
  call   <merge@plt>
L303:
  lea    0x1(%r14),%r15d
  cmp    %r12d,%r15d
  jg     L192
L122:
  je     L267
  lea    (%r15,%r12,1),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  mov    %eax,0x8(%rsp)
  cmp    %eax,%r15d
  jg     L239
  je     L290
  add    %r15d,%eax
  mov    %eax,%r10d
  shr    $0x1f,%r10d
  add    %eax,%r10d
  sar    %r10d
  cmp    %r10d,%r15d
  jg     L355
  je     L300
  lea    (%r15,%r10,1),%eax
  mov    0x4(%rsp),%esi
  mov    %rbx,%r8
  mov    %r15d,%edx
  mov    %eax,%r11d
  mov    %r13,%rdi
  mov    %r10d,0x10(%rsp)
  shr    $0x1f,%r11d
  add    %eax,%r11d
  sar    %r11d
  mov    %r11d,%ecx
  mov    %r11d,0xc(%rsp)
  call   <mergesort_rec>
  mov    0xc(%rsp),%r11d
  mov    %rbx,%r8
  mov    %r13,%rdi
  mov    0x10(%rsp),%r10d
  mov    0x4(%rsp),%esi
  lea    0x1(%r11),%eax
  mov    %r11d,0x14(%rsp)
  mov    %r10d,%ecx
  mov    %eax,%edx
  mov    %r10d,0xc(%rsp)
  mov    %eax,0x10(%rsp)
  call   <mergesort_rec>
  mov    0xc(%rsp),%r8d
  mov    %r13,%r9
  mov    %r15d,%esi
  mov    0x10(%rsp),%ecx
  mov    0x14(%rsp),%edx
  mov    %rbx,%rdi
  call   <merge@plt>
  mov    0xc(%rsp),%r10d
L300:
  lea    0x1(%r10),%r11d
  cmp    %r11d,0x8(%rsp)
  jl     L292
  je     L234
  mov    0x8(%rsp),%eax
  mov    0x4(%rsp),%esi
  mov    %rbx,%r8
  mov    %r13,%rdi
  mov    %r10d,0x18(%rsp)
  lea    (%rax,%r11,1),%edx
  mov    %r11d,0x14(%rsp)
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  mov    %r11d,%edx
  sar    %eax
  mov    %eax,%ecx
  mov    %eax,0xc(%rsp)
  call   <mergesort_rec>
  mov    0xc(%rsp),%eax
  mov    0x8(%rsp),%ecx
  mov    %rbx,%r8
  mov    0x4(%rsp),%esi
  mov    %r13,%rdi
  lea    0x1(%rax),%edx
  mov    %eax,0x10(%rsp)
  mov    %edx,0xc(%rsp)
  call   <mergesort_rec>
  mov    0x14(%rsp),%r11d
  mov    %r13,%r9
  mov    %rbx,%rdi
  mov    0xc(%rsp),%ecx
  mov    0x8(%rsp),%r8d
  mov    0x10(%rsp),%edx
  mov    %r11d,%esi
  mov    %r11d,0xc(%rsp)
  call   <merge@plt>
  mov    0x18(%rsp),%r10d
  mov    0xc(%rsp),%r11d
L234:
  mov    0x8(%rsp),%r8d
  mov    %rbx,%r9
  mov    %r11d,%ecx
  mov    %r10d,%edx
  mov    %r15d,%esi
  mov    %r13,%rdi
  call   <merge@plt>
L290:
  mov    0x8(%rsp),%eax
  lea    0x1(%rax),%r10d
  cmp    %r10d,%r12d
  jl     L288
  je     L107
  lea    (%r12,%r10,1),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  mov    %eax,0xc(%rsp)
  cmp    %eax,%r10d
  jg     L429
  je     L350
  add    %r10d,%eax
  mov    0x4(%rsp),%esi
  mov    %r10d,%edx
  mov    %rbx,%r8
  mov    %eax,%r11d
  mov    %r13,%rdi
  mov    %r10d,0x18(%rsp)
  shr    $0x1f,%r11d
  add    %eax,%r11d
  sar    %r11d
  mov    %r11d,%ecx
  mov    %r11d,0x10(%rsp)
  call   <mergesort_rec>
  mov    0x10(%rsp),%r11d
  mov    %rbx,%r8
  mov    %r13,%rdi
  mov    0xc(%rsp),%ecx
  mov    0x4(%rsp),%esi
  lea    0x1(%r11),%eax
  mov    %r11d,0x14(%rsp)
  mov    %eax,%edx
  mov    %eax,0x10(%rsp)
  call   <mergesort_rec>
  mov    0x18(%rsp),%r10d
  mov    %r13,%r9
  mov    %rbx,%rdi
  mov    0x10(%rsp),%ecx
  mov    0xc(%rsp),%r8d
  mov    0x14(%rsp),%edx
  mov    %r10d,%esi
  mov    %r10d,0x10(%rsp)
  call   <merge@plt>
  mov    0x10(%rsp),%r10d
L350:
  mov    0xc(%rsp),%eax
  lea    0x1(%rax),%r11d
  cmp    %r11d,%r12d
  jl     L370
  je     L402
  lea    (%r12,%r11,1),%edx
  mov    0x4(%rsp),%esi
  mov    %rbx,%r8
  mov    %r13,%rdi
  mov    %edx,%eax
  mov    %r10d,0x1c(%rsp)
  shr    $0x1f,%eax
  mov    %r11d,0x18(%rsp)
  add    %edx,%eax
  mov    %r11d,%edx
  sar    %eax
  mov    %eax,%ecx
  mov    %eax,0x10(%rsp)
  call   <mergesort_rec>
  mov    0x10(%rsp),%eax
  mov    0x4(%rsp),%esi
  mov    %rbx,%r8
  mov    %r12d,%ecx
  mov    %r13,%rdi
  lea    0x1(%rax),%edx
  mov    %eax,0x14(%rsp)
  mov    %edx,0x10(%rsp)
  call   <mergesort_rec>
  mov    0x18(%rsp),%r11d
  mov    %r13,%r9
  mov    %r12d,%r8d
  mov    0x10(%rsp),%ecx
  mov    0x14(%rsp),%edx
  mov    %rbx,%rdi
  mov    %r11d,%esi
  mov    %r11d,0x4(%rsp)
  call   <merge@plt>
  mov    0x1c(%rsp),%r10d
  mov    0x4(%rsp),%r11d
L402:
  mov    0xc(%rsp),%edx
  mov    %r10d,%esi
  mov    %rbx,%r9
  mov    %r12d,%r8d
  mov    %r11d,%ecx
  mov    %r13,%rdi
  mov    %r10d,0x4(%rsp)
  call   <merge@plt>
  mov    0x4(%rsp),%r10d
L107:
  mov    0x8(%rsp),%edx
  mov    %r13,%r9
  mov    %r12d,%r8d
  mov    %r10d,%ecx
  mov    %r15d,%esi
  mov    %rbx,%rdi
  call   <merge@plt>
L267:
  add    $0x28,%rsp
  mov    %rbx,%r9
  mov    %r12d,%r8d
  mov    %r15d,%ecx
  pop    %rbx
  mov    %r14d,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <merge@plt>
  nopw   0x0(%rax,%rax,1)
L321:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L287:
  add    $0x28,%rsp
  mov    %ebp,%esi
  lea    D9(%rip),%rdi
  mov    %ecx,%edx
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <printf@plt>
  xchg   %ax,%ax
L49:
  mov    %r14d,%edx
  lea    D9(%rip),%rdi
  lea    0x1(%r14),%r15d
  mov    %ebp,%esi
  call   <printf@plt>
  cmp    %r12d,%r15d
  jle    L122
L192:
  mov    %r12d,%edx
  mov    %r15d,%esi
  lea    D9(%rip),%rdi
  call   <printf@plt>
  jmp    L267
  nopl   (%rax)
L126:
  mov    %r10d,%esi
  mov    %r14d,%edx
  mov    %r10d,0x8(%rsp)
  lea    D9(%rip),%rdi
  call   <printf@plt>
  mov    0x8(%rsp),%r10d
  jmp    L101
  nopl   0x0(%rax)
L409:
  mov    %r15d,%edx
  mov    %ebp,%esi
  lea    D9(%rip),%rdi
  call   <printf@plt>
  jmp    L189
  cs nopw 0x0(%rax,%rax,1)
L288:
  mov    %r10d,%esi
  mov    %r12d,%edx
  mov    %r10d,0x4(%rsp)
  lea    D9(%rip),%rdi
  call   <printf@plt>
  mov    0x4(%rsp),%r10d
  jmp    L107
  nopl   0x0(%rax)
L239:
  mov    %eax,%edx
  mov    %r15d,%esi
  lea    D9(%rip),%rdi
  call   <printf@plt>
  jmp    L290
  xchg   %ax,%ax
L429:
  mov    %r10d,%esi
  mov    %eax,%edx
  mov    %r10d,0x10(%rsp)
  lea    D9(%rip),%rdi
  call   <printf@plt>
  mov    0x10(%rsp),%r10d
  jmp    L350
L144:
  mov    %r11d,%esi
  mov    %r15d,%edx
  mov    %r10d,0xc(%rsp)
  lea    D9(%rip),%rdi
  mov    %r11d,0x8(%rsp)
  call   <printf@plt>
  mov    0x8(%rsp),%r11d
  mov    0xc(%rsp),%r10d
  jmp    L186
  nopl   0x0(%rax,%rax,1)
L58:
  mov    %r10d,%edx
  mov    %ebp,%esi
  mov    %r10d,0x8(%rsp)
  lea    D9(%rip),%rdi
  call   <printf@plt>
  mov    0x8(%rsp),%r10d
  jmp    L335
L385:
  mov    %r11d,%esi
  mov    %r14d,%edx
  mov    %r10d,0x10(%rsp)
  lea    D9(%rip),%rdi
  mov    %r11d,0xc(%rsp)
  call   <printf@plt>
  mov    0xc(%rsp),%r11d
  mov    0x10(%rsp),%r10d
  jmp    L315
  nopl   0x0(%rax,%rax,1)
L379:
  mov    %r10d,%esi
  mov    %eax,%edx
  mov    %r10d,0xc(%rsp)
  lea    D9(%rip),%rdi
  call   <printf@plt>
  mov    0xc(%rsp),%r10d
  jmp    L109
L292:
  mov    0x8(%rsp),%edx
  mov    %r11d,%esi
  mov    %r10d,0x10(%rsp)
  lea    D9(%rip),%rdi
  mov    %r11d,0xc(%rsp)
  call   <printf@plt>
  mov    0xc(%rsp),%r11d
  mov    0x10(%rsp),%r10d
  jmp    L234
  nopl   0x0(%rax)
L355:
  mov    %r10d,%edx
  mov    %r15d,%esi
  mov    %r10d,0xc(%rsp)
  lea    D9(%rip),%rdi
  call   <printf@plt>
  mov    0xc(%rsp),%r10d
  jmp    L300
  nopl   0x0(%rax)
L370:
  mov    %r11d,%esi
  mov    %r12d,%edx
  mov    %r10d,0x10(%rsp)
  lea    D9(%rip),%rdi
  mov    %r11d,0x4(%rsp)
  call   <printf@plt>
  mov    0x4(%rsp),%r11d
  mov    0x10(%rsp),%r10d
  jmp    L402
```

tool_calls: name: retrieve_data
arguments: label: D9
data_type: string

tool: D9: FATAL: low: %d, high: %d


assistant: ```c
void mergesort_rec(int A[], int h, int low, int high, int B[]) {
  int div;
  if (low > high) {
    printf("FATAL: low: %d, high: %d\n", low, high);
    return;
  }
  if (low == high) {
    return;
  }
  div = (low + high) / 2;
  mergesort_rec(B, h, low, div, A);
  mergesort_rec(B, h, div + 1, high, A);
  merge(A, low, div, div + 1, high, B);
}
```