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

```asm
<sort>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %esi,0x8(%rsp)
  cmp    $0x1,%esi
  jle    L475
  mov    %esi,%eax
  lea    -0x1(%rsi),%ecx
  mov    %r13,%r15
  mov    %r13,%rbp
  sar    %eax
  xor    %r8d,%r8d
  cltq
  mov    (%rdi,%rax,4),%edi
  movslq %ecx,%rax
  nopw   0x0(%rax,%rax,1)
L83:
  mov    0x0(%rbp),%r9d
  lea    0x0(%r13,%rax,4),%rsi
  mov    %r8d,%r11d
  mov    %rbp,%r10
  mov    (%rsi),%edx
  cmp    %edi,%r9d
  jg     L219
  cmp    %edx,%edi
  jle    L607
  lea    -0x4(%r13,%rax,4),%rax
  nop
L109:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edi,%edx
  jl     L109
L607:
  cmp    %r8d,%ecx
  jle    L678
  mov    %edx,0x0(%rbp)
  sub    $0x1,%ecx
  mov    %r9d,(%rsi)
  movslq %ecx,%rax
L219:
  add    $0x1,%r8
  add    $0x4,%rbp
  jmp    L83
L519:
  mov    %r12d,%esi
  mov    %r14,%rdi
  sub    %r12d,%ebx
  call   <sort>
  mov    %ebx,%esi
  mov    %rbp,%rdi
  call   <sort>
L475:
  add    $0x38,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L678:
  mov    %r10,0x10(%rsp)
  mov    %r11d,0x4(%rsp)
  cmp    $0x1,%r11d
  jle    L611
  mov    %r11d,%eax
  lea    -0x1(%r11),%ecx
  mov    %r13,%r12
  xor    %r8d,%r8d
  sar    %eax
  cltq
  mov    0x0(%r13,%rax,4),%edi
  movslq %ecx,%rax
  nopl   (%rax)
L737:
  mov    (%r12),%r9d
  lea    0x0(%r13,%rax,4),%rsi
  mov    %r8d,%r10d
  mov    %r12,%r11
  mov    (%rsi),%edx
  cmp    %r9d,%edi
  jl     L643
  cmp    %edx,%edi
  jle    L889
  lea    -0x4(%r13,%rax,4),%rax
  nopw   0x0(%rax,%rax,1)
L892:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edx,%edi
  jg     L892
L889:
  cmp    %r8d,%ecx
  jle    L171
  mov    %edx,(%r12)
  sub    $0x1,%ecx
  mov    %r9d,(%rsi)
  movslq %ecx,%rax
L643:
  add    $0x1,%r8
  add    $0x4,%r12
  jmp    L737
L105:
  mov    %ebx,%esi
  mov    %r15,%rdi
  call   <sort>
  mov    %r12d,%esi
  mov    %r14,%rdi
  sub    %ebx,%esi
  call   <sort>
L611:
  mov    0x8(%rsp),%ebx
  sub    0x4(%rsp),%ebx
  mov    %ebx,0x4(%rsp)
  cmp    $0x1,%ebx
  jle    L475
  mov    %ebx,%eax
  lea    -0x1(%rbx),%ecx
  mov    %rbp,%r12
  xor    %r9d,%r9d
  sar    %eax
  cltq
  mov    0x0(%rbp,%rax,4),%edi
  movslq %ecx,%rax
  nopw   0x0(%rax,%rax,1)
L99:
  mov    (%r12),%r10d
  lea    0x0(%rbp,%rax,4),%rsi
  mov    %r9d,%r8d
  mov    %r12,%r15
  mov    (%rsi),%edx
  cmp    %r10d,%edi
  jl     L673
  cmp    %edx,%edi
  jle    L116
  lea    -0x4(%rbp,%rax,4),%rax
  nopw   0x0(%rax,%rax,1)
L755:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edx,%edi
  jg     L755
L116:
  cmp    %r9d,%ecx
  jle    L604
  mov    %edx,(%r12)
  sub    $0x1,%ecx
  mov    %r10d,(%rsi)
  movslq %ecx,%rax
L673:
  add    $0x1,%r9
  add    $0x4,%r12
  jmp    L99
L171:
  mov    %r10d,0xc(%rsp)
  cmp    $0x1,%r10d
  jle    L835
  mov    %r10d,%eax
  lea    -0x1(%r10),%ecx
  mov    %r13,%r14
  xor    %r9d,%r9d
  sar    %eax
  cltq
  mov    0x0(%r13,%rax,4),%edi
  movslq %ecx,%rax
  nopl   0x0(%rax,%rax,1)
L227:
  mov    (%r14),%r10d
  lea    0x0(%r13,%rax,4),%rsi
  mov    %r9d,%r8d
  mov    %r14,%rbx
  mov    (%rsi),%edx
  cmp    %r10d,%edi
  jl     L617
  cmp    %edx,%edi
  jle    L249
  lea    -0x4(%r13,%rax,4),%rax
  xchg   %ax,%ax
L665:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edx,%edi
  jg     L665
L249:
  cmp    %r9d,%ecx
  jle    L413
  mov    %edx,(%r14)
  sub    $0x1,%ecx
  mov    %r10d,(%rsi)
  movslq %ecx,%rax
L617:
  add    $0x1,%r9
  add    $0x4,%r14
  jmp    L227
L73:
  mov    %r15d,%esi
  mov    %rbx,%rdi
  mov    %r11,0x20(%rsp)
  mov    %r10d,0x18(%rsp)
  call   <sort>
  mov    0x18(%rsp),%esi
  mov    %r14,%rdi
  sub    %r15d,%esi
  call   <sort>
  mov    0x20(%rsp),%r11
L835:
  mov    0x4(%rsp),%ebx
  sub    0xc(%rsp),%ebx
  mov    %ebx,0xc(%rsp)
  cmp    $0x1,%ebx
  jle    L611
  mov    %ebx,%eax
  lea    -0x1(%rbx),%ecx
  mov    %r12,%r14
  xor    %r8d,%r8d
  sar    %eax
  cltq
  mov    (%r12,%rax,4),%edi
  movslq %ecx,%rax
  nopl   0x0(%rax,%rax,1)
L540:
  mov    (%r14),%r9d
  lea    (%r12,%rax,4),%rsi
  mov    %r8d,%ebx
  mov    %r14,%r15
  mov    (%rsi),%edx
  cmp    %r9d,%edi
  jl     L278
  cmp    %edx,%edi
  jle    L705
  lea    -0x4(%r12,%rax,4),%rax
  nopl   (%rax)
L391:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edx,%edi
  jg     L391
L705:
  cmp    %r8d,%ecx
  jle    L49
  mov    %edx,(%r14)
  sub    $0x1,%ecx
  mov    %r9d,(%rsi)
  movslq %ecx,%rax
L278:
  add    $0x1,%r8
  add    $0x4,%r14
  jmp    L540
L604:
  cmp    $0x1,%r8d
  jle    L382
  mov    %r8d,%eax
  lea    -0x1(%r8),%ecx
  mov    %rbp,%r14
  xor    %r9d,%r9d
  sar    %eax
  cltq
  mov    0x0(%rbp,%rax,4),%edi
  movslq %ecx,%rax
  nopl   0x0(%rax)
L123:
  mov    (%r14),%r10d
  lea    0x0(%rbp,%rax,4),%rsi
  mov    %r9d,%r11d
  mov    %r14,%rbx
  mov    (%rsi),%edx
  cmp    %r10d,%edi
  jl     L861
  cmp    %edx,%edi
  jle    L301
  lea    -0x4(%rbp,%rax,4),%rax
  xchg   %ax,%ax
L85:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edx,%edi
  jg     L85
L301:
  cmp    %r9d,%ecx
  jle    L469
  mov    %edx,(%r14)
  sub    $0x1,%ecx
  mov    %r10d,(%rsi)
  movslq %ecx,%rax
L861:
  add    $0x1,%r9
  add    $0x4,%r14
  jmp    L123
L357:
  mov    %r9d,%esi
  mov    %rbx,%rdi
  mov    %r8d,0xc(%rsp)
  mov    %r9d,0x8(%rsp)
  call   <sort>
  mov    0x8(%rsp),%r9d
  mov    %ebp,%esi
  mov    %r14,%rdi
  sub    %r9d,%esi
  call   <sort>
  mov    0xc(%rsp),%r8d
L382:
  mov    0x4(%rsp),%ebx
  sub    %r8d,%ebx
  cmp    $0x1,%ebx
  jle    L475
  mov    %ebx,%eax
  lea    -0x1(%rbx),%ecx
  mov    %r12,%rbp
  xor    %r9d,%r9d
  sar    %eax
  cltq
  mov    (%r12,%rax,4),%edi
  movslq %ecx,%rax
  nopl   0x0(%rax)
L36:
  mov    0x0(%rbp),%r10d
  lea    (%r12,%rax,4),%rsi
  mov    %r9d,%r8d
  mov    %rbp,%r14
  mov    (%rsi),%edx
  cmp    %r10d,%edi
  jl     L7
  cmp    %edx,%edi
  jle    L327
  lea    -0x4(%r12,%rax,4),%rax
  cs nopw 0x0(%rax,%rax,1)
L681:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edx,%edi
  jg     L681
L327:
  cmp    %r9d,%ecx
  jle    L799
  mov    %edx,0x0(%rbp)
  sub    $0x1,%ecx
  mov    %r10d,(%rsi)
  movslq %ecx,%rax
L7:
  add    $0x1,%r9
  add    $0x4,%rbp
  jmp    L36
L469:
  mov    %r11d,0x8(%rsp)
  cmp    $0x1,%r11d
  jle    L342
  mov    %r11d,%eax
  mov    %r8d,0xc(%rsp)
  lea    -0x1(%r11),%ecx
  xor    %r10d,%r10d
  sar    %eax
  mov    0x10(%rsp),%r11
  cltq
  mov    0x0(%rbp,%rax,4),%edi
  movslq %ecx,%rax
  nopl   (%rax)
L8:
  mov    0x0(%rbp),%r8d
  lea    (%r11,%rax,4),%rsi
  mov    %r10d,%r9d
  mov    (%rsi),%edx
  cmp    %r8d,%edi
  jl     L509
  cmp    %edx,%edi
  jle    L250
  lea    -0x4(%r11,%rax,4),%rax
  nopl   0x0(%rax,%rax,1)
L329:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edx,%edi
  jg     L329
L250:
  cmp    %r10d,%ecx
  jle    L379
  mov    %edx,0x0(%rbp)
  sub    $0x1,%ecx
  mov    %r8d,(%rsi)
  movslq %ecx,%rax
L509:
  add    $0x1,%r10
  add    $0x4,%rbp
  jmp    L8
L379:
  mov    0xc(%rsp),%r8d
  mov    0x10(%rsp),%rdi
  mov    %r9d,%esi
  mov    %r9d,0xc(%rsp)
  mov    %r8d,0x18(%rsp)
  call   <sort>
  mov    0x8(%rsp),%esi
  mov    0xc(%rsp),%r9d
  mov    %rbp,%rdi
  sub    %r9d,%esi
  call   <sort>
  mov    0x18(%rsp),%r8d
L342:
  mov    %r8d,%ebp
  sub    0x8(%rsp),%ebp
  cmp    $0x1,%ebp
  jle    L382
  mov    %ebp,%eax
  lea    -0x1(%rbp),%ecx
  xor    %r10d,%r10d
  sar    %eax
  cltq
  mov    (%r14,%rax,4),%edi
  movslq %ecx,%rax
  nopl   0x0(%rax,%rax,1)
L304:
  mov    (%r14),%r11d
  lea    (%rbx,%rax,4),%rsi
  mov    %r10d,%r9d
  mov    (%rsi),%edx
  cmp    %r11d,%edi
  jl     L505
  cmp    %edx,%edi
  jle    L516
  lea    -0x4(%rbx,%rax,4),%rax
  nopw   0x0(%rax,%rax,1)
L554:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edx,%edi
  jg     L554
L516:
  cmp    %r10d,%ecx
  jle    L357
  mov    %edx,(%r14)
  sub    $0x1,%ecx
  mov    %r11d,(%rsi)
  movslq %ecx,%rax
L505:
  add    $0x1,%r10
  add    $0x4,%r14
  jmp    L304
L799:
  cmp    $0x1,%r8d
  jle    L190
  mov    %r8d,%eax
  lea    -0x1(%r8),%ecx
  xor    %r10d,%r10d
  sar    %eax
  cltq
  mov    (%r12,%rax,4),%edi
  movslq %ecx,%rax
  cs nopw 0x0(%rax,%rax,1)
L60:
  mov    (%r12),%r11d
  lea    (%r15,%rax,4),%rsi
  mov    %r10d,%r9d
  mov    (%rsi),%edx
  cmp    %r11d,%edi
  jl     L722
  cmp    %edx,%edi
  jle    L387
  lea    -0x4(%r15,%rax,4),%rax
  nopl   0x0(%rax,%rax,1)
L724:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edx,%edi
  jg     L724
L387:
  cmp    %r10d,%ecx
  jle    L10
  mov    %edx,(%r12)
  sub    $0x1,%ecx
  mov    %r11d,(%rsi)
  movslq %ecx,%rax
L722:
  add    $0x1,%r10
  add    $0x4,%r12
  jmp    L60
L10:
  mov    %r9d,%esi
  mov    %r15,%rdi
  mov    %r8d,0x4(%rsp)
  mov    %r9d,0x8(%rsp)
  call   <sort>
  mov    0x4(%rsp),%esi
  mov    0x8(%rsp),%r9d
  mov    %r12,%rdi
  sub    %r9d,%esi
  call   <sort>
  mov    0x4(%rsp),%r8d
L190:
  sub    %r8d,%ebx
  cmp    $0x1,%ebx
  jle    L475
  mov    %ebx,%eax
  lea    -0x1(%rbx),%ecx
  xor    %r8d,%r8d
  sar    %eax
  cltq
  mov    0x0(%rbp,%rax,4),%edi
  movslq %ecx,%rax
  nopl   0x0(%rax)
L129:
  mov    0x0(%rbp),%r9d
  lea    (%r14,%rax,4),%rsi
  mov    %r8d,%r12d
  mov    (%rsi),%edx
  cmp    %r9d,%edi
  jl     L455
  cmp    %edx,%edi
  jle    L535
  lea    -0x4(%r14,%rax,4),%rax
  nopl   0x0(%rax,%rax,1)
L56:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edx,%edi
  jg     L56
L535:
  cmp    %r8d,%ecx
  jle    L519
  mov    %edx,0x0(%rbp)
  sub    $0x1,%ecx
  mov    %r9d,(%rsi)
  movslq %ecx,%rax
L455:
  add    $0x1,%r8
  add    $0x4,%rbp
  jmp    L129
L49:
  cmp    $0x1,%ebx
  jle    L797
  mov    %ebx,%eax
  lea    -0x1(%rbx),%ecx
  xor    %r9d,%r9d
  sar    %eax
  cltq
  mov    (%r12,%rax,4),%edi
  movslq %ecx,%rax
  nopl   0x0(%rax,%rax,1)
L294:
  mov    (%r12),%r10d
  lea    (%r11,%rax,4),%rsi
  mov    %r9d,%r8d
  mov    (%rsi),%edx
  cmp    %r10d,%edi
  jl     L811
  cmp    %edx,%edi
  jle    L493
  lea    -0x4(%r11,%rax,4),%rax
  nopl   0x0(%rax,%rax,1)
L631:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edx,%edi
  jg     L631
L493:
  cmp    %r9d,%ecx
  jle    L565
  mov    %edx,(%r12)
  sub    $0x1,%ecx
  mov    %r10d,(%rsi)
  movslq %ecx,%rax
L811:
  add    $0x1,%r9
  add    $0x4,%r12
  jmp    L294
L565:
  mov    %r8d,%esi
  mov    %r11,%rdi
  mov    %r8d,0x18(%rsp)
  call   <sort>
  mov    0x18(%rsp),%r8d
  mov    %ebx,%esi
  mov    %r12,%rdi
  sub    %r8d,%esi
  call   <sort>
L797:
  mov    0xc(%rsp),%r12d
  sub    %ebx,%r12d
  cmp    $0x1,%r12d
  jle    L611
  mov    %r12d,%eax
  lea    -0x1(%r12),%ecx
  xor    %r8d,%r8d
  sar    %eax
  cltq
  mov    (%r14,%rax,4),%edi
  movslq %ecx,%rax
  cs nopw 0x0(%rax,%rax,1)
L261:
  mov    (%r14),%r9d
  lea    (%r15,%rax,4),%rsi
  mov    %r8d,%ebx
  mov    (%rsi),%edx
  cmp    %r9d,%edi
  jl     L119
  cmp    %edx,%edi
  jle    L443
  lea    -0x4(%r15,%rax,4),%rax
  nopw   0x0(%rax,%rax,1)
L460:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edx,%edi
  jg     L460
L443:
  cmp    %r8d,%ecx
  jle    L105
  mov    %edx,(%r14)
  sub    $0x1,%ecx
  mov    %r9d,(%rsi)
  movslq %ecx,%rax
L119:
  add    $0x1,%r8
  add    $0x4,%r14
  jmp    L261
L413:
  cmp    $0x1,%r8d
  jle    L494
  mov    %r8d,%eax
  mov    %r11,0x18(%rsp)
  lea    -0x1(%r8),%ecx
  xor    %r10d,%r10d
  sar    %eax
  cltq
  mov    0x0(%r13,%rax,4),%edi
  movslq %ecx,%rax
  nopl   0x0(%rax)
L655:
  mov    (%r15),%r9d
  lea    0x0(%r13,%rax,4),%rsi
  mov    %r10d,%r11d
  mov    (%rsi),%edx
  cmp    %r9d,%edi
  jl     L287
  cmp    %edx,%edi
  jle    L559
  lea    -0x4(%r13,%rax,4),%rax
  nopl   0x0(%rax,%rax,1)
L352:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edx,%edi
  jg     L352
L559:
  cmp    %r10d,%ecx
  jle    L716
  mov    %edx,(%r15)
  sub    $0x1,%ecx
  mov    %r9d,(%rsi)
  movslq %ecx,%rax
L287:
  add    $0x1,%r10
  add    $0x4,%r15
  jmp    L655
L716:
  mov    %r11d,%eax
  mov    0x18(%rsp),%r11
  mov    %r13,%rdi
  mov    %r8d,0x20(%rsp)
  mov    %eax,%esi
  mov    %eax,0x18(%rsp)
  mov    %r11,0x28(%rsp)
  call   <sort>
  mov    0x20(%rsp),%eax
  sub    0x18(%rsp),%eax
  mov    %r15,%rdi
  mov    %eax,%esi
  call   <sort>
  mov    0x28(%rsp),%r11
  mov    0x20(%rsp),%r8d
L494:
  mov    0xc(%rsp),%r10d
  sub    %r8d,%r10d
  cmp    $0x1,%r10d
  jle    L835
  mov    %r10d,%eax
  lea    -0x1(%r10),%ecx
  xor    %r8d,%r8d
  sar    %eax
  cltq
  mov    (%r14,%rax,4),%edi
  movslq %ecx,%rax
  cs nopw 0x0(%rax,%rax,1)
L483:
  mov    (%r14),%r9d
  lea    (%rbx,%rax,4),%rsi
  mov    %r8d,%r15d
  mov    (%rsi),%edx
  cmp    %r9d,%edi
  jl     L453
  cmp    %edx,%edi
  jle    L490
  lea    -0x4(%rbx,%rax,4),%rax
  nopw   0x0(%rax,%rax,1)
L386:
  mov    %rax,%rsi
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edx,%edi
  jg     L386
L490:
  cmp    %r8d,%ecx
  jle    L73
  mov    %edx,(%r14)
  sub    $0x1,%ecx
  mov    %r9d,(%rsi)
  movslq %ecx,%rax
L453:
  add    $0x1,%r8
  add    $0x4,%r14
  jmp    L483
```

assistant: ```c
int *sort(int a[], int n) {
  int i, j, p, t;
  if (n < 2)
    return a;
  p = a[n / 2];
  for (i = 0, j = n - 1;; i++, j--) {
    while (a[i] > p)
      i++;
    while (p > a[j])
      j--;
    if (i >= j)
      break;
    t = a[i];
    a[i] = a[j];
    a[j] = t;
  }
  sort(a, i);
  sort(a + i, n - i);
  return a;
}
```