user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<merge_sort>:
  endbr64
  push   %r15
  mov    %edx,%eax
  push   %r14
  sub    %esi,%eax
  push   %r13
  mov    %rdi,%r13
  lea    0x4(,%rax,4),%edi
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  sub    $0x38,%rsp
  call   <malloc@plt>
  cmp    %r12d,%ebp
  jl     L26
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L26:
  mov    %rax,%rbx
  lea    0x0(%rbp,%r12,1),%eax
  mov    %eax,%r14d
  shr    $0x1f,%r14d
  add    %eax,%r14d
  sar    %r14d
  mov    %r14d,%eax
  sub    %ebp,%eax
  lea    0x4(,%rax,4),%edi
  call   <malloc@plt>
  mov    %rax,0x8(%rsp)
  cmp    %r14d,%ebp
  jl     L39
L30:
  mov    %r12d,%edi
  lea    0x1(%r14),%r15d
  sub    %r14d,%edi
  shl    $0x2,%edi
  call   <malloc@plt>
  mov    %rax,0x8(%rsp)
  cmp    %r12d,%r15d
  jl     L92
L107:
  add    $0x38,%rsp
  mov    %rbx,%r8
  mov    %r12d,%ecx
  mov    %r14d,%edx
  pop    %rbx
  mov    %ebp,%esi
  mov    %r13,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <merge@plt>
  nopl   0x0(%rax)
L39:
  lea    0x0(%rbp,%r14,1),%eax
  mov    %eax,%r9d
  shr    $0x1f,%r9d
  add    %eax,%r9d
  mov    %r9d,%r15d
  sar    %r15d
  mov    %r15d,%eax
  sub    %ebp,%eax
  lea    0x4(,%rax,4),%edi
  call   <malloc@plt>
  cmp    %r15d,%ebp
  jl     L20
L104:
  mov    %r14d,%edi
  lea    0x1(%r15),%r10d
  sub    %r15d,%edi
  mov    %r10d,0x14(%rsp)
  shl    $0x2,%edi
  call   <malloc@plt>
  mov    0x14(%rsp),%r10d
  cmp    %r10d,%r14d
  jg     L57
L0:
  mov    0x8(%rsp),%r8
  mov    %r14d,%ecx
  mov    %r15d,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <merge@plt>
  jmp    L30
  cs nopw 0x0(%rax,%rax,1)
L92:
  lea    (%r15,%r12,1),%eax
  mov    %eax,%r9d
  shr    $0x1f,%r9d
  add    %eax,%r9d
  sar    %r9d
  mov    %r9d,%eax
  mov    %r9d,0x14(%rsp)
  sub    %r15d,%eax
  lea    0x4(,%rax,4),%edi
  call   <malloc@plt>
  mov    0x14(%rsp),%r9d
  cmp    %r9d,%r15d
  jl     L19
L51:
  mov    %r12d,%edi
  lea    0x1(%r9),%r10d
  mov    %r9d,0x14(%rsp)
  sub    %r9d,%edi
  mov    %r10d,0x18(%rsp)
  shl    $0x2,%edi
  call   <malloc@plt>
  mov    0x18(%rsp),%r10d
  mov    0x14(%rsp),%r9d
  cmp    %r10d,%r12d
  jg     L37
L75:
  mov    0x8(%rsp),%r8
  mov    %r12d,%ecx
  mov    %r9d,%edx
  mov    %r15d,%esi
  mov    %r13,%rdi
  call   <merge@plt>
  jmp    L107
  nopl   0x0(%rax)
L20:
  lea    0x0(%rbp,%r15,1),%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  mov    %rax,0x18(%rsp)
  mov    %edx,%r10d
  shr    $0x1f,%r10d
  add    %edx,%r10d
  sar    %r10d
  mov    %r10d,%edx
  mov    %r10d,0x14(%rsp)
  call   <merge_sort>
  mov    0x14(%rsp),%r10d
  mov    %r15d,%edx
  mov    %r13,%rdi
  lea    0x1(%r10),%esi
  call   <merge_sort>
  mov    0x18(%rsp),%r8
  mov    0x14(%rsp),%edx
  mov    %ebp,%esi
  mov    %r15d,%ecx
  mov    %r13,%rdi
  call   <merge@plt>
  jmp    L104
  nopl   0x0(%rax,%rax,1)
L37:
  lea    (%r12,%r10,1),%edx
  mov    %r10d,%esi
  mov    %r13,%rdi
  mov    %r9d,0x28(%rsp)
  mov    %edx,%r11d
  mov    %rax,0x20(%rsp)
  shr    $0x1f,%r11d
  add    %edx,%r11d
  sar    %r11d
  mov    %r11d,%edx
  mov    %r11d,0x14(%rsp)
  call   <merge_sort>
  mov    0x14(%rsp),%r11d
  mov    %r12d,%edx
  mov    %r13,%rdi
  lea    0x1(%r11),%esi
  call   <merge_sort>
  mov    0x20(%rsp),%r8
  mov    %r12d,%ecx
  mov    %r13,%rdi
  mov    0x14(%rsp),%edx
  mov    0x18(%rsp),%esi
  call   <merge@plt>
  mov    0x28(%rsp),%r9d
  jmp    L75
  nopl   0x0(%rax)
L19:
  lea    (%r15,%r9,1),%edx
  mov    %r15d,%esi
  mov    %r13,%rdi
  mov    %rax,0x28(%rsp)
  mov    %edx,%r10d
  mov    %r9d,0x20(%rsp)
  shr    $0x1f,%r10d
  add    %edx,%r10d
  sar    %r10d
  mov    %r10d,%edx
  mov    %r10d,0x14(%rsp)
  call   <merge_sort>
  mov    0x14(%rsp),%r10d
  mov    0x20(%rsp),%r9d
  mov    %r13,%rdi
  mov    %r9d,%edx
  lea    0x1(%r10),%esi
  mov    %r9d,0x14(%rsp)
  mov    %r10d,0x18(%rsp)
  call   <merge_sort>
  mov    0x28(%rsp),%r8
  mov    %r15d,%esi
  mov    %r13,%rdi
  mov    0x14(%rsp),%ecx
  mov    0x18(%rsp),%edx
  call   <merge@plt>
  mov    0x14(%rsp),%r9d
  jmp    L51
  nopl   0x0(%rax,%rax,1)
L57:
  lea    (%r14,%r10,1),%edx
  mov    %r10d,%esi
  mov    %r13,%rdi
  mov    %rax,0x20(%rsp)
  mov    %edx,%r11d
  mov    %r10d,0x18(%rsp)
  shr    $0x1f,%r11d
  add    %edx,%r11d
  sar    %r11d
  mov    %r11d,%edx
  mov    %r11d,0x14(%rsp)
  call   <merge_sort>
  mov    0x14(%rsp),%r11d
  mov    %r14d,%edx
  mov    %r13,%rdi
  lea    0x1(%r11),%esi
  call   <merge_sort>
  mov    0x20(%rsp),%r8
  mov    %r14d,%ecx
  mov    %r13,%rdi
  mov    0x14(%rsp),%edx
  mov    0x18(%rsp),%esi
  call   <merge@plt>
  jmp    L0
```

assistant: ```c
void merge_sort(int *arr, int start, int end) {
  int mid = (start + end) / 2;
  int *result;
  result = (int *)malloc(sizeof(int) * (end - start + 1));
  if (start < end) {
    merge_sort(arr, start, mid);
    merge_sort(arr, mid + 1, end);
    merge(arr, start, mid, end, result);
  }
}
```