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

```asm
<sort>:
  endbr64
  push   %r15
  lea    0x1(%rsi),%r15d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %esi,0x4(%rsp)
  mov    %edx,0x58(%rsp)
  cmp    %r15d,%edx
  jle    L385
  mov    %r15d,%ebx
  mov    %r15d,%r13d
  mov    %rdi,%r15
L343:
  movslq 0x4(%rsp),%r14
  mov    0x58(%rsp),%eax
  mov    %r13d,0x8(%rsp)
  movslq %ebx,%r12
  lea    (%r15,%r14,4),%rbp
  mov    %r14,0x10(%rsp)
  mov    0x0(%rbp),%edx
  mov    %rbp,%r14
  mov    %eax,%ebp
  mov    %edx,%r13d
L467:
  lea    (%r15,%r12,4),%rdi
  cmp    %r13d,(%rdi)
  jg     L134
L482:
  add    $0x1,%ebx
  cmp    %ebp,%ebx
  jge    L307
  movslq %ebx,%r12
  lea    (%r15,%r12,4),%rdi
  cmp    %r13d,(%rdi)
  jle    L482
L134:
  sub    $0x1,%ebp
  movslq %ebp,%rax
  lea    (%r15,%rax,4),%rsi
  call   <swap@plt>
  cmp    %ebx,%ebp
  jg     L467
L307:
  lea    -0x1(%rbx),%r12d
  mov    %ebp,0x44(%rsp)
  mov    0x8(%rsp),%r13d
  mov    %r14,%rbp
  movslq %r12d,%rax
  mov    %rbp,%rsi
  mov    %r12d,0x30(%rsp)
  mov    0x10(%rsp),%r14
  lea    (%r15,%rax,4),%rdi
  mov    %r13d,%ebx
  call   <swap@plt>
  cmp    %r13d,%r12d
  jle    L6
L594:
  lea    (%r15,%r14,4),%rbp
  mov    0x30(%rsp),%eax
  mov    %r13d,0x8(%rsp)
  movslq %ebx,%r12
  mov    0x0(%rbp),%edx
  mov    %r14,0x10(%rsp)
  mov    %rbp,%r14
  mov    %ebx,%ebp
  mov    %eax,%ebx
  mov    %edx,%r13d
L403:
  lea    (%r15,%r12,4),%rdi
  cmp    (%rdi),%r13d
  jl     L414
L590:
  add    $0x1,%ebp
  cmp    %ebx,%ebp
  jge    L148
  movslq %ebp,%r12
  lea    (%r15,%r12,4),%rdi
  cmp    (%rdi),%r13d
  jge    L590
L414:
  sub    $0x1,%ebx
  movslq %ebx,%rax
  lea    (%r15,%rax,4),%rsi
  call   <swap@plt>
  cmp    %ebp,%ebx
  jg     L403
L148:
  mov    %ebx,0x34(%rsp)
  mov    %ebp,%ebx
  mov    0x8(%rsp),%r13d
  mov    %r14,%rbp
  lea    -0x1(%rbx),%r12d
  mov    %rbp,%rsi
  mov    0x10(%rsp),%r14
  movslq %r12d,%rax
  mov    %r12d,0x38(%rsp)
  mov    %r13d,%ebx
  lea    (%r15,%rax,4),%rdi
  call   <swap@plt>
  cmp    %r13d,%r12d
  jle    L342
L551:
  lea    (%r15,%r14,4),%rbp
  mov    0x38(%rsp),%eax
  mov    %r13d,0x8(%rsp)
  movslq %ebx,%r12
  mov    0x0(%rbp),%edx
  mov    %r14,0x10(%rsp)
  mov    %rbp,%r14
  mov    %eax,%ebp
  mov    %edx,%r13d
L408:
  lea    (%r15,%r12,4),%rdi
  cmp    (%rdi),%r13d
  jl     L557
L419:
  add    $0x1,%ebx
  cmp    %ebp,%ebx
  jge    L168
  movslq %ebx,%r12
  lea    (%r15,%r12,4),%rdi
  cmp    (%rdi),%r13d
  jge    L419
L557:
  sub    $0x1,%ebp
  movslq %ebp,%rax
  lea    (%r15,%rax,4),%rsi
  call   <swap@plt>
  cmp    %ebx,%ebp
  jg     L408
L168:
  lea    -0x1(%rbx),%r12d
  mov    %ebp,0x48(%rsp)
  mov    0x8(%rsp),%r13d
  mov    %r14,%rbp
  movslq %r12d,%rax
  mov    %rbp,%rsi
  mov    %r12d,0x3c(%rsp)
  mov    0x10(%rsp),%r14
  lea    (%r15,%rax,4),%rdi
  mov    %r13d,%ebx
  call   <swap@plt>
  cmp    %r13d,%r12d
  jle    L16
  mov    %r13d,0x10(%rsp)
L358:
  mov    0x3c(%rsp),%eax
  lea    (%r15,%r14,4),%rbp
  mov    %r14,0x8(%rsp)
  movslq %ebx,%r12
  mov    0x0(%rbp),%r13d
  mov    %rbp,%r14
  mov    %eax,%ebp
L613:
  lea    (%r15,%r12,4),%rdi
  cmp    (%rdi),%r13d
  jl     L565
L376:
  add    $0x1,%ebx
  cmp    %ebp,%ebx
  jge    L544
  movslq %ebx,%r12
  lea    (%r15,%r12,4),%rdi
  cmp    (%rdi),%r13d
  jge    L376
L565:
  sub    $0x1,%ebp
  movslq %ebp,%rax
  lea    (%r15,%rax,4),%rsi
  call   <swap@plt>
  cmp    %ebx,%ebp
  jg     L613
L544:
  lea    -0x1(%rbx),%r13d
  mov    %ebp,0x4c(%rsp)
  mov    %r14,%rbp
  mov    0x8(%rsp),%r14
  movslq %r13d,%rax
  mov    %rbp,%rsi
  mov    %r13d,0x40(%rsp)
  lea    (%r15,%rax,4),%rdi
  call   <swap@plt>
  mov    0x10(%rsp),%eax
  mov    %eax,%ebx
  cmp    %eax,%r13d
  jle    L54
L97:
  mov    0x40(%rsp),%eax
  lea    (%r15,%r14,4),%r12
  mov    (%r12),%r13d
  mov    %eax,0x8(%rsp)
  jmp    L364
L500:
  add    $0x1,%ebx
  cmp    0x8(%rsp),%ebx
  jge    L407
L364:
  movslq %ebx,%rbp
L511:
  lea    (%r15,%rbp,4),%rdi
  cmp    (%rdi),%r13d
  jge    L500
  subl   $0x1,0x8(%rsp)
  movslq 0x8(%rsp),%rax
  lea    (%r15,%rax,4),%rsi
  call   <swap@plt>
  cmp    %ebx,0x8(%rsp)
  jg     L511
L407:
  lea    -0x1(%rbx),%ebp
  mov    %r12,%rsi
  movslq %ebp,%rax
  mov    %ebp,0x1c(%rsp)
  lea    (%r15,%rax,4),%rdi
  call   <swap@plt>
  mov    0x10(%rsp),%eax
  mov    0x4(%rsp),%r12d
  mov    %eax,%ebx
  cmp    %eax,%ebp
  jle    L442
L17:
  mov    0x1c(%rsp),%eax
  lea    (%r15,%r14,4),%r13
  mov    0x0(%r13),%edx
  mov    %eax,0x4(%rsp)
L4:
  movslq %ebx,%rbp
L555:
  lea    (%r15,%rbp,4),%rdi
  cmp    (%rdi),%edx
  jl     L593
  add    $0x1,%ebx
  cmp    0x4(%rsp),%ebx
  jl     L4
L175:
  sub    $0x1,%ebx
  mov    %r13,%rsi
  movslq %ebx,%rax
  mov    %ebx,0x18(%rsp)
  lea    (%r15,%rax,4),%rdi
  call   <swap@plt>
  mov    0x10(%rsp),%eax
  mov    %r14,%rdx
  mov    %eax,%ebp
  mov    %eax,%r13d
  cmp    %eax,%ebx
  jle    L446
L117:
  lea    (%r15,%rdx,4),%rbx
  mov    0x18(%rsp),%r14d
  mov    (%rbx),%r9d
L519:
  movslq %ebp,%r8
L230:
  lea    (%r15,%r8,4),%rdi
  cmp    (%rdi),%r9d
  jl     L135
  add    $0x1,%ebp
  cmp    %r14d,%ebp
  jl     L519
L284:
  sub    $0x1,%ebp
  mov    %rbx,%rsi
  mov    %rdx,0x10(%rsp)
  mov    %r13d,%ebx
  movslq %ebp,%rax
  mov    %ebp,0x20(%rsp)
  lea    (%r15,%rax,4),%rdi
  call   <swap@plt>
  cmp    %r13d,%ebp
  mov    0x10(%rsp),%rdx
  jle    L393
  mov    %r14d,0x28(%rsp)
  mov    %rdx,%r14
L292:
  lea    (%r15,%r14,4),%r9
  mov    0x20(%rsp),%ecx
  mov    (%r9),%r8d
L629:
  movslq %ebx,%rbp
L90:
  lea    (%r15,%rbp,4),%rdi
  cmp    (%rdi),%r8d
  jl     L569
  add    $0x1,%ebx
  cmp    %ecx,%ebx
  jl     L629
L345:
  sub    $0x1,%ebx
  mov    %r9,%rsi
  mov    %ecx,0x10(%rsp)
  mov    %r13d,%ebp
  movslq %ebx,%rax
  lea    (%r15,%rax,4),%rdi
  call   <swap@plt>
  cmp    %ebx,%r13d
  mov    0x10(%rsp),%ecx
  jge    L269
L357:
  lea    (%r15,%r14,4),%r8
  mov    %ebx,%r14d
  mov    (%r8),%edx
L416:
  movslq %ebp,%r13
L450:
  lea    (%r15,%r13,4),%rdi
  cmp    (%rdi),%edx
  jl     L579
  add    $0x1,%ebp
  cmp    %r14d,%ebp
  jl     L416
L392:
  lea    -0x1(%rbp),%r13d
  mov    %r8,%rsi
  mov    %ecx,0x10(%rsp)
  lea    0x1(%r14),%ebp
  movslq %r13d,%rax
  lea    (%r15,%rax,4),%rdi
  call   <swap@plt>
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <sort>
  cmp    %ebp,%ebx
  mov    0x10(%rsp),%ecx
  jle    L269
  movslq %r14d,%r14
  mov    %r14,%r12
  jmp    L357
L385:
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L447:
  mov    0x28(%rsp),%r14d
L393:
  lea    0x1(%r14),%ebp
  cmp    %ebp,0x18(%rsp)
  jle    L446
  movslq %r14d,%rdx
  mov    %ebp,%r13d
  mov    %rdx,%r12
  jmp    L117
  nopw   0x0(%rax,%rax,1)
L135:
  sub    $0x1,%r14d
  mov    %rdx,0x28(%rsp)
  movslq %r14d,%rax
  mov    %r8,0x20(%rsp)
  lea    (%r15,%rax,4),%rsi
  mov    %r9d,0x10(%rsp)
  call   <swap@plt>
  cmp    %ebp,%r14d
  mov    0x10(%rsp),%r9d
  mov    0x20(%rsp),%r8
  mov    0x28(%rsp),%rdx
  jle    L284
  jmp    L230
L446:
  mov    0x4(%rsp),%eax
  lea    0x1(%rax),%ebx
  cmp    %ebx,0x1c(%rsp)
  jle    L442
  movslq %eax,%r14
  mov    %ebx,0x10(%rsp)
  mov    %r14,%r12
  jmp    L17
  nopl   0x0(%rax)
L579:
  sub    $0x1,%r14d
  mov    %edx,0x5c(%rsp)
  movslq %r14d,%rax
  mov    %r8,0x50(%rsp)
  lea    (%r15,%rax,4),%rsi
  mov    %ecx,0x10(%rsp)
  call   <swap@plt>
  cmp    %ebp,%r14d
  mov    0x10(%rsp),%ecx
  mov    0x5c(%rsp),%edx
  mov    0x50(%rsp),%r8
  jle    L392
  jmp    L450
L593:
  subl   $0x1,0x4(%rsp)
  movslq 0x4(%rsp),%rax
  mov    %edx,0x18(%rsp)
  lea    (%r15,%rax,4),%rsi
  call   <swap@plt>
  cmp    %ebx,0x4(%rsp)
  mov    0x18(%rsp),%edx
  jle    L175
  jmp    L555
  nopw   0x0(%rax,%rax,1)
L569:
  sub    $0x1,%ecx
  mov    %r8d,0x5c(%rsp)
  movslq %ecx,%rax
  mov    %r9,0x50(%rsp)
  lea    (%r15,%rax,4),%rsi
  mov    %ecx,0x10(%rsp)
  call   <swap@plt>
  mov    0x10(%rsp),%ecx
  mov    0x50(%rsp),%r9
  mov    0x5c(%rsp),%r8d
  cmp    %ebx,%ecx
  jle    L345
  jmp    L90
L442:
  mov    0x8(%rsp),%eax
  lea    0x1(%rax),%ebx
  cmp    %ebx,0x40(%rsp)
  jle    L54
  mov    %eax,0x4(%rsp)
  movslq %eax,%r14
  mov    %ebx,0x10(%rsp)
  jmp    L97
  nopl   (%rax)
L269:
  lea    0x1(%rcx),%ebx
  cmp    %ebx,0x20(%rsp)
  jle    L447
  movslq %ecx,%r14
  mov    %ebx,%r13d
  mov    %r14,%r12
  jmp    L292
L54:
  mov    0x4c(%rsp),%eax
  lea    0x1(%rax),%ebx
  cmp    %ebx,0x3c(%rsp)
  jle    L16
  mov    %eax,0x4(%rsp)
  movslq %eax,%r14
  mov    %ebx,0x10(%rsp)
  jmp    L358
L16:
  mov    0x48(%rsp),%eax
  lea    0x1(%rax),%ebx
  cmp    %ebx,0x38(%rsp)
  jle    L342
  mov    %eax,0x4(%rsp)
  mov    %ebx,%r13d
  movslq %eax,%r14
  jmp    L551
L342:
  mov    0x34(%rsp),%eax
  lea    0x1(%rax),%ebx
  cmp    %ebx,0x30(%rsp)
  jle    L6
  mov    %eax,0x4(%rsp)
  mov    %ebx,%r13d
  movslq %eax,%r14
  jmp    L594
L6:
  mov    0x44(%rsp),%eax
  lea    0x1(%rax),%ebx
  cmp    0x58(%rsp),%ebx
  jge    L385
  mov    %eax,0x4(%rsp)
  mov    %ebx,%r13d
  jmp    L343
```

assistant: ```c
void sort(int *xs, int beg, int end) {
  if (end > beg + 1) {
    int piv = xs[beg], l = beg + 1, r = end;
    while (l < r) {
      if (xs[l] <= piv) {
        l++;
      } else {
        swap(&xs[l], &xs[--r]);
      }
    }
    swap(&xs[--l], &xs[beg]);
    sort(xs, beg, l);
    sort(xs, r, end);
  }
}
```