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

```asm
<sort>:
  endbr64
  cmp    $0x1,%esi
  jle    L285
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  sar    %r12d
  mov    %rdi,%rbp
  push   %rbx
  mov    %esi,%ebx
  mov    %r12d,%esi
  movslq %r12d,%r13
  sub    $0x18,%rsp
  call   <sort>
  mov    %ebx,%esi
  lea    0x0(%rbp,%r13,4),%rdi
  sub    %r12d,%esi
  call   <sort>
  mov    %r12d,%eax
  cmp    %r12d,%ebx
  jle    L44
  mov    $0x1,%esi
  xor    %edx,%edx
  xor    %r10d,%r10d
  mov    %r13,%r9
  lea    D11(%rip),%r11
L38:
  mov    0x0(%rbp,%r10,4),%r8d
  mov    0x0(%rbp,%r9,4),%edi
  mov    %esi,%ecx
  cmp    %r8d,%edi
  jle    L154
  mov    %r8d,(%r11,%rsi,4)
  add    $0x1,%edx
  add    $0x1,%rsi
  cmp    %eax,%ebx
  jle    L1
  cmp    %edx,%r12d
  jle    L1
  movslq %edx,%r10
  jmp    L38
  nopw   0x0(%rax,%rax,1)
L154:
  mov    %edi,(%r11,%rsi,4)
  add    $0x1,%eax
  add    $0x1,%rsi
  cmp    %edx,%r12d
  jle    L1
  cmp    %eax,%ebx
  jle    L1
  movslq %eax,%r9
  jmp    L38
  nopl   0x0(%rax)
L1:
  lea    D0(%rip),%r8
  cmp    %edx,%r12d
  jle    L69
L256:
  mov    %r12d,%r11d
  movslq %ecx,%rsi
  lea    D0(%rip),%r8
  sub    %edx,%r11d
  lea    0x0(,%rsi,4),%rdi
  cmp    %r12d,%edx
  lea    -0x1(%r11),%r10d
  mov    %rdi,0x8(%rsp)
  lea    (%r8,%rdi,1),%r9
  setl   %r15b
  movslq %edx,%rdi
  cmp    $0x2,%r10d
  lea    0x1(%rdi),%rsi
  seta   %r14b
  lea    0x0(,%rsi,4),%r13
  test   %r14b,%r15b
  je     L178
  lea    0x0(%rbp,%r13,1),%r15
  mov    %r9,%r14
  sub    %r15,%r14
  cmp    $0x8,%r14
  jbe    L178
  cmp    %r12d,%edx
  mov    $0x1,%esi
  lea    -0x4(%rbp,%r13,1),%r13
  cmovge %esi,%r11d
  xor    %esi,%esi
  mov    %r11d,%edi
  shr    $0x2,%edi
  shl    $0x4,%rdi
  xchg   %ax,%ax
L186:
  movdqu 0x0(%r13,%rsi,1),%xmm0
  movups %xmm0,(%r9,%rsi,1)
  add    $0x10,%rsi
  cmp    %rsi,%rdi
  jne    L186
  mov    %r11d,%r9d
  and    $0xfffffffc,%r9d
  lea    (%rdx,%r9,1),%edi
  lea    (%rcx,%r9,1),%esi
  cmp    %r9d,%r11d
  je     L152
  movslq %edi,%r13
  lea    0x1(%rdi),%r9d
  lea    0x1(%rsi),%r11d
  mov    0x0(%rbp,%r13,4),%r14d
  movslq %esi,%r13
  mov    %r14d,(%r8,%r13,4)
  cmp    %r9d,%r12d
  jle    L152
  movslq %r9d,%r9
  movslq %r11d,%r11
  add    $0x2,%edi
  add    $0x2,%esi
  lea    0x0(,%r9,4),%r13
  mov    0x0(%rbp,%r9,4),%r9d
  mov    %r9d,(%r8,%r11,4)
  cmp    %r12d,%edi
  jge    L152
  mov    0x4(%rbp,%r13,1),%edi
  movslq %esi,%rsi
  mov    %edi,(%r8,%rsi,4)
L152:
  cmp    %r12d,%edx
  mov    $0x0,%edx
  cmovl  %r10d,%edx
  lea    0x1(%rcx,%rdx,1),%ecx
L69:
  cmp    %ebx,%eax
  jge    L10
  movslq %ecx,%rdx
  mov    %ebx,%r9d
  lea    (%r8,%rdx,4),%rdi
  lea    0x1(%rax),%edx
  sub    %eax,%r9d
  movslq %edx,%rdx
  mov    %rdi,%rsi
  shl    $0x2,%rdx
  lea    0x0(%rbp,%rdx,1),%r10
  sub    %r10,%rsi
  cmp    $0x8,%rsi
  jbe    L170
  lea    -0x1(%r9),%esi
  cmp    $0x2,%esi
  jbe    L170
  mov    %r9d,%esi
  lea    -0x4(%rbp,%rdx,1),%r10
  xor    %edx,%edx
  shr    $0x2,%esi
  shl    $0x4,%rsi
  nopl   (%rax)
L216:
  movdqu (%r10,%rdx,1),%xmm1
  movups %xmm1,(%rdi,%rdx,1)
  add    $0x10,%rdx
  cmp    %rsi,%rdx
  jne    L216
  mov    %r9d,%edx
  and    $0xfffffffc,%edx
  add    %edx,%eax
  add    %edx,%ecx
  cmp    %edx,%r9d
  je     L10
  movslq %eax,%rdi
  lea    0x1(%rax),%edx
  lea    0x1(%rcx),%esi
  mov    0x0(%rbp,%rdi,4),%r9d
  movslq %ecx,%rdi
  mov    %r9d,(%r8,%rdi,4)
  cmp    %edx,%ebx
  jle    L10
  movslq %edx,%rdx
  movslq %esi,%rsi
  add    $0x2,%eax
  add    $0x2,%ecx
  lea    0x0(,%rdx,4),%rdi
  mov    0x0(%rbp,%rdx,4),%edx
  mov    %edx,(%r8,%rsi,4)
  cmp    %ebx,%eax
  jge    L10
  mov    0x4(%rbp,%rdi,1),%eax
  movslq %ecx,%rcx
  mov    %eax,(%r8,%rcx,4)
L10:
  add    $0x18,%rsp
  lea    0x0(,%rbx,4),%edx
  mov    %rbp,%rdi
  mov    %r8,%rsi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1050 <memcpy@plt>
  xchg   %ax,%ax
L285:
  ret
  nopl   0x0(%rax)
L170:
  lea    -0x1(%rbx),%ecx
  sub    %eax,%ecx
  xor    %eax,%eax
  lea    0x4(,%rcx,4),%rsi
  lea    -0x4(%rbp,%rdx,1),%rcx
  nopl   0x0(%rax)
L117:
  mov    (%rcx,%rax,1),%edx
  mov    %edx,(%rdi,%rax,1)
  add    $0x4,%rax
  cmp    %rsi,%rax
  jne    L117
  jmp    L10
  nopl   0x0(%rax)
L178:
  mov    0x8(%rsp),%r15
  mov    %rdi,%r9
  neg    %r9
  lea    (%r15,%r9,4),%r11
  add    %r8,%r11
  jmp    L58
  nopl   0x0(%rax)
L113:
  add    $0x1,%rsi
L58:
  mov    0x0(%rbp,%rdi,4),%r9d
  mov    %r9d,(%r11,%rdi,4)
  mov    %rsi,%rdi
  cmp    %esi,%r12d
  jg     L113
  jmp    L152
  nopw   0x0(%rax,%rax,1)
L44:
  xor    %ecx,%ecx
  xor    %edx,%edx
  jmp    L256
```

assistant: ```c
void sort(int *arr, int size) {
  static int tmp[(144 * 1024)];
  int pivot, i, j, k;
  if (size < 2) {
    return;
  }
  pivot = size / 2;
  sort(arr, pivot);
  sort(&arr[pivot], size - pivot);
  i = 0;
  j = pivot;
  k = 0;
  while (i < pivot && j < size) {
    if (arr[i] < arr[j]) {
      tmp[k++] = arr[i++];
    } else {
      tmp[k++] = arr[j++];
    }
  }
  while (i < pivot) {
    tmp[k++] = arr[i++];
  }
  while (j < size) {
    tmp[k++] = arr[j++];
  }
  memcpy(arr, tmp, size * sizeof(int));
}
```