user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<merge_sort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    %ecx,-0x48(%rbp)
  mov    -0x44(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jne    L136
  mov    -0x44(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    -0x44(%rbp),%edx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x40(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x40(%rbp),%rax
  jmp    L114
L136:
  mov    -0x44(%rbp),%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  test   %rax,%rax
  js     L17
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
  jmp    L7
L17:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2ss %rdx,%xmm0
  addss  %xmm0,%xmm0
L7:
  movss  D6(%rip),%xmm1
  mulss  %xmm1,%xmm0
  cvttss2si %xmm0,%rax
  mov    %eax,-0x1c(%rbp)
  mov    -0x1c(%rbp),%ecx
  mov    -0x44(%rbp),%edx
  mov    -0x40(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <merge_sort>
  mov    %rax,-0x18(%rbp)
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%edi
  mov    -0x48(%rbp),%edx
  mov    -0x40(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    %edx,%ecx
  mov    %edi,%edx
  mov    %rax,%rdi
  call   <merge_sort>
  mov    %rax,-0x10(%rbp)
  mov    -0x18(%rbp),%rax
  cmp    -0x38(%rbp),%rax
  jne    L109
  mov    -0x40(%rbp),%rax
  jmp    L44
L109:
  mov    -0x38(%rbp),%rax
L44:
  mov    %rax,-0x8(%rbp)
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x1c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  jmp    L48
L134:
  mov    -0x28(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  ja     L10
  mov    -0x24(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  ja     L10
  mov    -0x28(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x24(%rbp),%eax
  lea    0x0(,%rax,4),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L122
  mov    -0x28(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%edx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x28(%rbp)
  jmp    L119
L122:
  mov    -0x24(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%edx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x24(%rbp)
  jmp    L119
L10:
  mov    -0x28(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  ja     L69
  mov    -0x28(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%edx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x28(%rbp)
  jmp    L119
L69:
  mov    -0x24(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%edx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x24(%rbp)
L119:
  addl   $0x1,-0x20(%rbp)
L48:
  mov    -0x20(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jbe    L134
  mov    -0x8(%rbp),%rax
L114:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D6
data_type: byte[4]

tool: {"D6": [0x00,0x00,0x00,0x3f]}

assistant: ```c
int *merge_sort(int *up, int *down, unsigned int left, unsigned int right) {
  if (left == right) {
    down[left] = up[left];
    return down;
  }
  unsigned int middle = (unsigned int)((left + right) * 0.5f);
  int *l_buff = merge_sort(up, down, left, middle);
  int *r_buff = merge_sort(up, down, middle + 1, right);
  int *target = l_buff == up ? down : up;
  unsigned int l_cur = left, r_cur = middle + 1;
  for (unsigned int i = left; i <= right; i++) {
    if (l_cur <= middle && r_cur <= right) {
      if (l_buff[l_cur] < r_buff[r_cur]) {
        target[i] = l_buff[l_cur];
        l_cur++;
      } else {
        target[i] = r_buff[r_cur];
        r_cur++;
      }
    } else if (l_cur <= middle) {
      target[i] = l_buff[l_cur];
      l_cur++;
    } else {
      target[i] = r_buff[r_cur];
      r_cur++;
    }
  }
  return target;
}
```