user: Converte this assembly snippet into its equivalent C code:

```asm
<merge_sort>:
  endbr64
  cmp    %ecx,%edx
  jl     L54
  ret
  nopl   0x0(%rax)
L54:
  lea    (%rdx,%rcx,1),%eax
  push   %r15
  push   %r14
  mov    %eax,%r14d
  push   %r13
  shr    $0x1f,%r14d
  mov    %esi,%r13d
  push   %r12
  add    %eax,%r14d
  mov    %edx,%r12d
  push   %rbp
  sar    %r14d
  mov    %rdi,%rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x28,%rsp
  cmp    %r14d,%edx
  jge    L97
  lea    (%rdx,%r14,1),%eax
  mov    %eax,%r15d
  shr    $0x1f,%r15d
  add    %eax,%r15d
  sar    %r15d
  cmp    %r15d,%edx
  jl     L126
  lea    0x1(%r15),%r10d
  cmp    %r10d,%r14d
  jg     L187
L14:
  mov    %r14d,%r8d
  mov    %r15d,%ecx
  mov    %r12d,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <merge_arr@plt>
L97:
  lea    0x1(%r14),%r9d
  cmp    %ebx,%r9d
  jge    L129
  lea    (%r9,%rbx,1),%eax
  mov    %eax,%r15d
  shr    $0x1f,%r15d
  add    %eax,%r15d
  sar    %r15d
  cmp    %r15d,%r9d
  jl     L196
  lea    0x1(%r15),%r11d
  cmp    %r11d,%ebx
  jg     L61
L116:
  mov    %ebx,%r8d
  mov    %r15d,%ecx
  mov    %r9d,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <merge_arr@plt>
L129:
  add    $0x28,%rsp
  mov    %ebx,%r8d
  mov    %r14d,%ecx
  mov    %r12d,%edx
  pop    %rbx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1050 <merge_arr@plt>
  nopl   0x0(%rax,%rax,1)
L61:
  lea    (%rbx,%r11,1),%eax
  mov    %eax,%r10d
  shr    $0x1f,%r10d
  add    %eax,%r10d
  sar    %r10d
  cmp    %r10d,%r11d
  jge    L169
  lea    (%r11,%r10,1),%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    %r9d,0x1c(%rsp)
  mov    %edx,%eax
  mov    %r11d,0x18(%rsp)
  shr    $0x1f,%eax
  mov    %r10d,0x10(%rsp)
  add    %edx,%eax
  mov    %r11d,%edx
  sar    %eax
  mov    %eax,%ecx
  mov    %eax,0xc(%rsp)
  call   <merge_sort>
  mov    0xc(%rsp),%eax
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    0x10(%rsp),%r10d
  lea    0x1(%rax),%edx
  mov    %eax,0x14(%rsp)
  mov    %r10d,%ecx
  mov    %r10d,0xc(%rsp)
  call   <merge_sort>
  mov    0xc(%rsp),%r10d
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    0x18(%rsp),%r11d
  mov    0x14(%rsp),%ecx
  mov    %r10d,%r8d
  mov    %r10d,0x10(%rsp)
  mov    %r11d,%edx
  mov    %r11d,0xc(%rsp)
  call   <merge_arr@plt>
  mov    0x1c(%rsp),%r9d
  mov    0x10(%rsp),%r10d
  mov    0xc(%rsp),%r11d
L169:
  lea    0x1(%r10),%eax
  cmp    %eax,%ebx
  jle    L193
  lea    (%rbx,%rax,1),%ecx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    %r10d,0x1c(%rsp)
  mov    %ecx,%edx
  mov    %r11d,0x18(%rsp)
  shr    $0x1f,%edx
  mov    %r9d,0x14(%rsp)
  add    %ecx,%edx
  mov    %eax,0x10(%rsp)
  sar    %edx
  mov    %edx,%ecx
  mov    %edx,0xc(%rsp)
  mov    %eax,%edx
  call   <merge_sort>
  mov    0xc(%rsp),%edx
  mov    %ebx,%ecx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  add    $0x1,%edx
  call   <merge_sort>
  mov    0xc(%rsp),%ecx
  mov    0x10(%rsp),%edx
  mov    %ebx,%r8d
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <merge_arr@plt>
  mov    0x1c(%rsp),%r10d
  mov    0x18(%rsp),%r11d
  mov    0x14(%rsp),%r9d
L193:
  mov    %ebx,%r8d
  mov    %r10d,%ecx
  mov    %r11d,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    %r9d,0xc(%rsp)
  call   <merge_arr@plt>
  mov    0xc(%rsp),%r9d
  jmp    L116
  nopl   0x0(%rax,%rax,1)
L196:
  lea    (%r9,%r15,1),%eax
  mov    %eax,%r10d
  shr    $0x1f,%r10d
  add    %eax,%r10d
  sar    %r10d
  cmp    %r10d,%r9d
  jge    L103
  lea    (%r9,%r10,1),%eax
  mov    %r9d,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    %eax,%r11d
  mov    %r9d,0x18(%rsp)
  shr    $0x1f,%r11d
  mov    %r10d,0x10(%rsp)
  add    %eax,%r11d
  sar    %r11d
  mov    %r11d,%ecx
  mov    %r11d,0xc(%rsp)
  call   <merge_sort>
  mov    0xc(%rsp),%r11d
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    0x10(%rsp),%r10d
  lea    0x1(%r11),%edx
  mov    %r11d,0x14(%rsp)
  mov    %r10d,%ecx
  mov    %r10d,0xc(%rsp)
  call   <merge_sort>
  mov    0xc(%rsp),%r10d
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    0x18(%rsp),%r9d
  mov    0x14(%rsp),%ecx
  mov    %r10d,%r8d
  mov    %r10d,0x10(%rsp)
  mov    %r9d,%edx
  mov    %r9d,0xc(%rsp)
  call   <merge_arr@plt>
  mov    0x10(%rsp),%r10d
  mov    0xc(%rsp),%r9d
L103:
  lea    0x1(%r10),%eax
  cmp    %eax,%r15d
  jle    L124
  lea    (%r15,%rax,1),%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    %r10d,0x18(%rsp)
  mov    %edx,%r11d
  mov    %r9d,0x14(%rsp)
  shr    $0x1f,%r11d
  mov    %eax,0x10(%rsp)
  add    %edx,%r11d
  mov    %eax,%edx
  sar    %r11d
  mov    %r11d,%ecx
  mov    %r11d,0xc(%rsp)
  call   <merge_sort>
  mov    0xc(%rsp),%r11d
  mov    %r15d,%ecx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  lea    0x1(%r11),%edx
  call   <merge_sort>
  mov    0xc(%rsp),%ecx
  mov    0x10(%rsp),%edx
  mov    %r15d,%r8d
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <merge_arr@plt>
  mov    0x18(%rsp),%r10d
  mov    0x14(%rsp),%r9d
L124:
  mov    %r9d,%edx
  mov    %r15d,%r8d
  mov    %r10d,%ecx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    %r9d,0xc(%rsp)
  call   <merge_arr@plt>
  lea    0x1(%r15),%r11d
  mov    0xc(%rsp),%r9d
  cmp    %r11d,%ebx
  jle    L116
  jmp    L61
  nopl   0x0(%rax,%rax,1)
L187:
  lea    (%r14,%r10,1),%eax
  mov    %eax,%r9d
  shr    $0x1f,%r9d
  add    %eax,%r9d
  sar    %r9d
  cmp    %r9d,%r10d
  jge    L75
  lea    (%r10,%r9,1),%eax
  mov    %r10d,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    %eax,%r11d
  mov    %r10d,0x18(%rsp)
  shr    $0x1f,%r11d
  mov    %r9d,0x10(%rsp)
  add    %eax,%r11d
  sar    %r11d
  mov    %r11d,%ecx
  mov    %r11d,0xc(%rsp)
  call   <merge_sort>
  mov    0xc(%rsp),%r11d
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    0x10(%rsp),%r9d
  lea    0x1(%r11),%edx
  mov    %r11d,0x14(%rsp)
  mov    %r9d,%ecx
  mov    %r9d,0xc(%rsp)
  call   <merge_sort>
  mov    0xc(%rsp),%r9d
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    0x18(%rsp),%r10d
  mov    0x14(%rsp),%ecx
  mov    %r9d,%r8d
  mov    %r9d,0x10(%rsp)
  mov    %r10d,%edx
  mov    %r10d,0xc(%rsp)
  call   <merge_arr@plt>
  mov    0x10(%rsp),%r9d
  mov    0xc(%rsp),%r10d
L75:
  lea    0x1(%r9),%eax
  cmp    %eax,%r14d
  jle    L167
  lea    (%r14,%rax,1),%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    %r9d,0x18(%rsp)
  mov    %edx,%r11d
  mov    %r10d,0x14(%rsp)
  shr    $0x1f,%r11d
  mov    %eax,0x10(%rsp)
  add    %edx,%r11d
  mov    %eax,%edx
  sar    %r11d
  mov    %r11d,%ecx
  mov    %r11d,0xc(%rsp)
  call   <merge_sort>
  mov    0xc(%rsp),%r11d
  mov    %r14d,%ecx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  lea    0x1(%r11),%edx
  call   <merge_sort>
  mov    0xc(%rsp),%ecx
  mov    0x10(%rsp),%edx
  mov    %r14d,%r8d
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <merge_arr@plt>
  mov    0x18(%rsp),%r9d
  mov    0x14(%rsp),%r10d
L167:
  mov    %r14d,%r8d
  mov    %r9d,%ecx
  mov    %r10d,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <merge_arr@plt>
  jmp    L14
  nopl   0x0(%rax)
L126:
  lea    (%rdx,%r15,1),%eax
  mov    %eax,%r9d
  shr    $0x1f,%r9d
  add    %eax,%r9d
  sar    %r9d
  cmp    %r9d,%edx
  jge    L93
  lea    (%rdx,%r9,1),%eax
  mov    %r9d,0x14(%rsp)
  mov    %eax,%r10d
  shr    $0x1f,%r10d
  add    %eax,%r10d
  sar    %r10d
  mov    %r10d,%ecx
  mov    %r10d,0xc(%rsp)
  call   <merge_sort>
  mov    0xc(%rsp),%r10d
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    0x14(%rsp),%r9d
  lea    0x1(%r10),%edx
  mov    %r10d,0x10(%rsp)
  mov    %r9d,%ecx
  mov    %r9d,0xc(%rsp)
  call   <merge_sort>
  mov    0xc(%rsp),%r8d
  mov    %r12d,%edx
  mov    %r13d,%esi
  mov    0x10(%rsp),%ecx
  mov    %rbp,%rdi
  call   <merge_arr@plt>
  mov    0xc(%rsp),%r9d
L93:
  lea    0x1(%r9),%r11d
  cmp    %r11d,%r15d
  jle    L188
  lea    (%r15,%r11,1),%eax
  mov    %r11d,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    %eax,%r10d
  mov    %r9d,0x14(%rsp)
  shr    $0x1f,%r10d
  mov    %r11d,0x10(%rsp)
  add    %eax,%r10d
  sar    %r10d
  mov    %r10d,%ecx
  mov    %r10d,0xc(%rsp)
  call   <merge_sort>
  mov    0xc(%rsp),%r10d
  mov    %r15d,%ecx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  lea    0x1(%r10),%edx
  call   <merge_sort>
  mov    0xc(%rsp),%ecx
  mov    0x10(%rsp),%edx
  mov    %r15d,%r8d
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <merge_arr@plt>
  mov    0x14(%rsp),%r9d
L188:
  mov    %r15d,%r8d
  mov    %r9d,%ecx
  mov    %r12d,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <merge_arr@plt>
  lea    0x1(%r15),%r10d
  cmp    %r10d,%r14d
  jle    L14
  jmp    L187
```

assistant: ```c
void merge_sort(int arr[], int sort_order, int low, int high) {
  int mid;
  if (low < high) {
    mid = (low + high) / 2;
    merge_sort(arr, sort_order, low, mid);
    merge_sort(arr, sort_order, (mid + 1), high);
    merge_arr(arr, sort_order, low, mid, high);
  } else {
    return;
  }
}
```