user: 请从给定的汇编指令推导出C源代码:

```asm
<quick>:
  endbr64
  push   %r15
  mov    %rdi,%r9
  mov    %edx,%ecx
  push   %r14
  mov    %esi,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %edx,0x38(%rsp)
L86:
  mov    %r14d,%edx
  mov    %ecx,%esi
  add    %ecx,%edx
  mov    %r14d,%ecx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cltq
  mov    (%r9,%rax,4),%edx
L904:
  cmp    %esi,%ecx
  jge    L323
L354:
  movslq %ecx,%rax
  movslq %esi,%rbx
  shl    $0x2,%rax
  lea    (%r9,%rbx,4),%r11
  lea    (%r9,%rax,1),%r8
  mov    (%r11),%edi
  lea    0x4(%r9,%rax,1),%rax
  mov    (%r8),%r10d
  cmp    %edx,%r10d
  jge    L843
  nopl   (%rax)
L743:
  mov    %rax,%r8
  mov    (%rax),%r10d
  lea    0x4(%rax),%rax
  add    $0x1,%ecx
  cmp    %edx,%r10d
  jl     L743
  cmp    %edi,%edx
  jge    L604
L619:
  lea    -0x4(%r9,%rbx,4),%rax
  nopl   0x0(%rax,%rax,1)
L721:
  mov    %rax,%r11
  mov    (%rax),%edi
  sub    $0x4,%rax
  sub    $0x1,%esi
  cmp    %edx,%edi
  jg     L721
L604:
  cmp    %ecx,%esi
  jl     L904
  mov    %edi,(%r8)
  add    $0x1,%ecx
  sub    $0x1,%esi
  mov    %r10d,(%r11)
L34:
  cmp    %esi,%ecx
  jl     L354
L323:
  mov    %ecx,0x10(%rsp)
  mov    %esi,0x18(%rsp)
  cmp    %r14d,%esi
  jg     L526
L349:
  mov    0x38(%rsp),%ebx
  cmp    %ebx,0x10(%rsp)
  jge    L501
  mov    0x10(%rsp),%r14d
  mov    %ebx,%ecx
  jmp    L86
L843:
  cmp    %edi,%edx
  jl     L619
  mov    %edi,(%r8)
  add    $0x1,%ecx
  sub    $0x1,%esi
  mov    %r10d,(%r11)
  jmp    L34
L775:
  mov    %ecx,0x1c(%rsp)
  mov    %esi,0x20(%rsp)
  cmp    %ecx,%r14d
  jl     L1007
L325:
  mov    0x20(%rsp),%ebx
  cmp    %ebx,0x18(%rsp)
  jle    L349
  mov    %ebx,%r14d
L526:
  mov    0x18(%rsp),%ebx
  mov    %r14d,%esi
  mov    %ebx,%edx
  mov    %ebx,%ecx
  add    %r14d,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cltq
  mov    (%r9,%rax,4),%edx
L799:
  cmp    %ecx,%esi
  jge    L775
  movslq %esi,%rax
  movslq %ecx,%rbx
  shl    $0x2,%rax
  lea    (%r9,%rbx,4),%r11
  lea    (%r9,%rax,1),%r8
  mov    (%r11),%edi
  lea    0x4(%r9,%rax,1),%rax
  mov    (%r8),%r10d
  cmp    %r10d,%edx
  jle    L673
  xchg   %ax,%ax
L943:
  mov    %rax,%r8
  mov    (%rax),%r10d
  lea    0x4(%rax),%rax
  add    $0x1,%esi
  cmp    %r10d,%edx
  jg     L943
  cmp    %edi,%edx
  jge    L712
L1012:
  lea    -0x4(%r9,%rbx,4),%rax
  nopl   0x0(%rax,%rax,1)
L77:
  mov    %rax,%r11
  mov    (%rax),%edi
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edi,%edx
  jl     L77
L712:
  cmp    %esi,%ecx
  jl     L799
  mov    %edi,(%r8)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r10d,(%r11)
  jmp    L799
L673:
  cmp    %edi,%edx
  jl     L1012
  mov    %edi,(%r8)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r10d,(%r11)
  jmp    L799
L176:
  mov    %ecx,0x24(%rsp)
  mov    %esi,0x28(%rsp)
  cmp    %ecx,%r14d
  jl     L264
L512:
  mov    0x28(%rsp),%ebx
  cmp    %ebx,0x1c(%rsp)
  jle    L325
  mov    %ebx,%r14d
L1007:
  mov    0x1c(%rsp),%ebx
  mov    %r14d,%esi
  mov    %ebx,%edx
  mov    %ebx,%ecx
  add    %r14d,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cltq
  mov    (%r9,%rax,4),%edx
  nopl   0x0(%rax,%rax,1)
L15:
  cmp    %ecx,%esi
  jge    L176
  movslq %esi,%rax
  movslq %ecx,%rbx
  shl    $0x2,%rax
  lea    (%r9,%rbx,4),%r11
  lea    (%r9,%rax,1),%r8
  mov    (%r11),%edi
  lea    0x4(%r9,%rax,1),%rax
  mov    (%r8),%r10d
  cmp    %r10d,%edx
  jle    L606
  xchg   %ax,%ax
L889:
  mov    %rax,%r8
  mov    (%rax),%r10d
  lea    0x4(%rax),%rax
  add    $0x1,%esi
  cmp    %r10d,%edx
  jg     L889
  cmp    %edi,%edx
  jge    L25
L13:
  lea    -0x4(%r9,%rbx,4),%rax
  nopl   0x0(%rax,%rax,1)
L236:
  mov    %rax,%r11
  mov    (%rax),%edi
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edi,%edx
  jl     L236
L25:
  cmp    %esi,%ecx
  jl     L15
  mov    %edi,(%r8)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r10d,(%r11)
  jmp    L15
L606:
  cmp    %edi,%edx
  jl     L13
  mov    %edi,(%r8)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r10d,(%r11)
  jmp    L15
L587:
  mov    %edx,0x2c(%rsp)
  mov    %ecx,0x30(%rsp)
  cmp    %edx,%r14d
  jl     L355
L620:
  mov    0x30(%rsp),%ebx
  cmp    %ebx,0x24(%rsp)
  jle    L512
  mov    %ebx,%r14d
L264:
  mov    0x24(%rsp),%ebx
  mov    %r14d,%ecx
  mov    %ebx,%edx
  add    %r14d,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  mov    %ebx,%edx
  sar    %eax
  cltq
  mov    (%r9,%rax,4),%esi
  nopl   0x0(%rax,%rax,1)
L241:
  cmp    %edx,%ecx
  jge    L587
  movslq %ecx,%rax
  movslq %edx,%rbx
  shl    $0x2,%rax
  lea    (%r9,%rbx,4),%r11
  lea    (%r9,%rax,1),%rdi
  mov    (%r11),%r10d
  lea    0x4(%r9,%rax,1),%rax
  mov    (%rdi),%r8d
  cmp    %r8d,%esi
  jle    L521
  xchg   %ax,%ax
L592:
  mov    %rax,%rdi
  mov    (%rax),%r8d
  lea    0x4(%rax),%rax
  add    $0x1,%ecx
  cmp    %r8d,%esi
  jg     L592
  cmp    %r10d,%esi
  jge    L5
L545:
  lea    -0x4(%r9,%rbx,4),%rax
  nopl   0x0(%rax)
L333:
  mov    %rax,%r11
  mov    (%rax),%r10d
  sub    $0x4,%rax
  sub    $0x1,%edx
  cmp    %r10d,%esi
  jl     L333
L5:
  cmp    %ecx,%edx
  jl     L241
  mov    %r10d,(%rdi)
  add    $0x1,%ecx
  sub    $0x1,%edx
  mov    %r8d,(%r11)
  jmp    L241
L521:
  cmp    %r10d,%esi
  jl     L545
  mov    %r10d,(%rdi)
  add    $0x1,%ecx
  sub    $0x1,%edx
  mov    %r8d,(%r11)
  jmp    L241
L355:
  mov    %r9,%r11
L385:
  mov    0x2c(%rsp),%ebx
  mov    %r14d,%esi
  mov    %ebx,%edx
  mov    %ebx,%ecx
  add    %r14d,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cltq
  mov    (%r11,%rax,4),%edx
L635:
  cmp    %ecx,%esi
  jge    L448
  movslq %esi,%rax
  movslq %ecx,%rbx
  shl    $0x2,%rax
  lea    (%r11,%rbx,4),%r10
  lea    (%r11,%rax,1),%r9
  mov    (%r10),%edi
  lea    0x4(%r11,%rax,1),%rax
  mov    (%r9),%r8d
  cmp    %r8d,%edx
  jle    L1023
  nopl   0x0(%rax)
L546:
  mov    %rax,%r9
  mov    (%rax),%r8d
  lea    0x4(%rax),%rax
  add    $0x1,%esi
  cmp    %r8d,%edx
  jg     L546
  cmp    %edi,%edx
  jge    L638
L110:
  lea    -0x4(%r11,%rbx,4),%rax
  nopl   0x0(%rax,%rax,1)
L88:
  mov    %rax,%r10
  mov    (%rax),%edi
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edi,%edx
  jl     L88
L638:
  cmp    %ecx,%esi
  jle    L314
L448:
  mov    %ecx,0x14(%rsp)
  mov    %esi,0x34(%rsp)
  cmp    %ecx,%r14d
  jl     L259
L634:
  mov    0x34(%rsp),%ebx
  cmp    %ebx,0x2c(%rsp)
  jle    L196
  mov    %ebx,%r14d
  jmp    L385
L367:
  cmp    %r15d,%r14d
  jl     L527
L912:
  cmp    %r10d,0x14(%rsp)
  jle    L634
  mov    %r10d,%r14d
L259:
  mov    0x14(%rsp),%r15d
  mov    %r14d,%r10d
  mov    %r15d,%edx
  add    %r14d,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cltq
  mov    (%r11,%rax,4),%edx
  nopl   0x0(%rax,%rax,1)
L837:
  cmp    %r15d,%r10d
  jge    L367
  movslq %r10d,%rax
  movslq %r15d,%r9
  shl    $0x2,%rax
  lea    (%r11,%r9,4),%r8
  lea    (%r11,%rax,1),%rdi
  mov    (%r8),%ecx
  lea    0x4(%r11,%rax,1),%rax
  mov    (%rdi),%esi
  cmp    %edx,%esi
  jge    L627
  nopl   (%rax)
L631:
  mov    %rax,%rdi
  mov    (%rax),%esi
  lea    0x4(%rax),%rax
  add    $0x1,%r10d
  cmp    %esi,%edx
  jg     L631
  cmp    %ecx,%edx
  jge    L871
L85:
  lea    -0x4(%r11,%r9,4),%rax
  nopw   0x0(%rax,%rax,1)
L869:
  mov    %rax,%r8
  mov    (%rax),%ecx
  sub    $0x4,%rax
  sub    $0x1,%r15d
  cmp    %ecx,%edx
  jl     L869
L871:
  cmp    %r10d,%r15d
  jl     L837
  mov    %ecx,(%rdi)
  add    $0x1,%r10d
  sub    $0x1,%r15d
  mov    %esi,(%r8)
  jmp    L837
L627:
  cmp    %ecx,%edx
  jl     L85
  mov    %ecx,(%rdi)
  add    $0x1,%r10d
  sub    $0x1,%r15d
  mov    %esi,(%r8)
  jmp    L837
L1023:
  cmp    %edi,%edx
  jl     L110
L314:
  mov    %edi,(%r9)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r8d,(%r10)
  jmp    L635
L527:
  mov    %r10d,0x3c(%rsp)
  mov    %r15d,0xc(%rsp)
  mov    %r11,%r15
L675:
  mov    0xc(%rsp),%r13d
  mov    %r14d,%r10d
  lea    0x0(%r13,%r14,1),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cltq
  mov    (%r15,%rax,4),%edx
  nopw   0x0(%rax,%rax,1)
L44:
  cmp    %r13d,%r14d
  jge    L495
L800:
  movslq %r14d,%rax
  movslq %r13d,%r9
  shl    $0x2,%rax
  lea    (%r15,%r9,4),%r8
  lea    (%r15,%rax,1),%rdi
  mov    (%r8),%ecx
  lea    0x4(%r15,%rax,1),%rax
  mov    (%rdi),%esi
  cmp    %edx,%esi
  jge    L686
  nopl   (%rax)
L248:
  mov    %rax,%rdi
  mov    (%rax),%esi
  lea    0x4(%rax),%rax
  add    $0x1,%r14d
  cmp    %esi,%edx
  jg     L248
  cmp    %ecx,%edx
  jge    L150
L151:
  lea    -0x4(%r15,%r9,4),%rax
  nopw   0x0(%rax,%rax,1)
L947:
  mov    %rax,%r8
  mov    (%rax),%ecx
  sub    $0x4,%rax
  sub    $0x1,%r13d
  cmp    %ecx,%edx
  jl     L947
L150:
  cmp    %r14d,%r13d
  jl     L44
  mov    %ecx,(%rdi)
  add    $0x1,%r14d
  sub    $0x1,%r13d
  mov    %esi,(%r8)
L194:
  cmp    %r13d,%r14d
  jl     L800
L495:
  cmp    %r13d,%r10d
  jl     L681
L204:
  cmp    %r14d,0xc(%rsp)
  jg     L675
  mov    0x3c(%rsp),%r10d
  mov    %r15,%r11
  jmp    L912
L686:
  cmp    %ecx,%edx
  jl     L151
  mov    %ecx,(%rdi)
  add    $0x1,%r14d
  sub    $0x1,%r13d
  mov    %esi,(%r8)
  jmp    L194
L568:
  cmp    %ebp,%r10d
  jl     L154
L819:
  cmp    %r12d,%r13d
  jle    L204
  mov    %r12d,%r10d
L681:
  lea    0x0(%r13,%r10,1),%edx
  mov    %r13d,%ebp
  mov    %r10d,%r12d
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cltq
  mov    (%r15,%rax,4),%edx
  nopl   0x0(%rax,%rax,1)
L735:
  cmp    %ebp,%r12d
  jge    L568
  movslq %r12d,%rax
  movslq %ebp,%r9
  shl    $0x2,%rax
  lea    (%r15,%r9,4),%r8
  lea    (%r15,%rax,1),%rdi
  mov    (%r8),%ecx
  lea    0x4(%r15,%rax,1),%rax
  mov    (%rdi),%esi
  cmp    %edx,%esi
  jge    L84
  nopl   (%rax)
L168:
  mov    %rax,%rdi
  mov    (%rax),%esi
  lea    0x4(%rax),%rax
  add    $0x1,%r12d
  cmp    %esi,%edx
  jg     L168
  cmp    %ecx,%edx
  jge    L394
L62:
  lea    -0x4(%r15,%r9,4),%rax
  nopw   0x0(%rax,%rax,1)
L813:
  mov    %rax,%r8
  mov    (%rax),%ecx
  sub    $0x4,%rax
  sub    $0x1,%ebp
  cmp    %ecx,%edx
  jl     L813
L394:
  cmp    %r12d,%ebp
  jl     L735
  mov    %ecx,(%rdi)
  add    $0x1,%r12d
  sub    $0x1,%ebp
  mov    %esi,(%r8)
  jmp    L735
L84:
  cmp    %ecx,%edx
  jl     L62
  mov    %ecx,(%rdi)
  add    $0x1,%r12d
  sub    $0x1,%ebp
  mov    %esi,(%r8)
  jmp    L735
L959:
  cmp    %edx,%r10d
  jl     L851
L344:
  cmp    %ebx,%ebp
  jle    L819
  mov    %ebx,%r10d
L154:
  lea    0x0(%rbp,%r10,1),%edx
  mov    %r10d,%ebx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  mov    %ebp,%edx
  sar    %eax
  cltq
  mov    (%r15,%rax,4),%edi
  nopw   0x0(%rax,%rax,1)
L812:
  cmp    %edx,%ebx
  jge    L959
  movslq %ebx,%rax
  movslq %edx,%r11
  shl    $0x2,%rax
  lea    (%r15,%r11,4),%r9
  lea    (%r15,%rax,1),%rsi
  mov    (%r9),%r8d
  lea    0x4(%r15,%rax,1),%rax
  mov    (%rsi),%ecx
  cmp    %edi,%ecx
  jge    L244
  nopl   0x0(%rax)
L141:
  mov    %rax,%rsi
  mov    (%rax),%ecx
  lea    0x4(%rax),%rax
  add    $0x1,%ebx
  cmp    %ecx,%edi
  jg     L141
  cmp    %r8d,%edi
  jge    L477
L840:
  lea    -0x4(%r15,%r11,4),%rax
  nopw   0x0(%rax,%rax,1)
L659:
  mov    %rax,%r9
  mov    (%rax),%r8d
  sub    $0x4,%rax
  sub    $0x1,%edx
  cmp    %r8d,%edi
  jl     L659
L477:
  cmp    %ebx,%edx
  jl     L812
  mov    %r8d,(%rsi)
  add    $0x1,%ebx
  sub    $0x1,%edx
  mov    %ecx,(%r9)
  jmp    L812
  nopl   0x0(%rax)
L244:
  cmp    %r8d,%edi
  jl     L840
  mov    %r8d,(%rsi)
  add    $0x1,%ebx
  sub    $0x1,%edx
  mov    %ecx,(%r9)
  jmp    L812
L196:
  mov    %r11,%r9
  jmp    L620
L501:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L851:
  mov    %r10d,%esi
  mov    %r15,%rdi
  call   <quick>
  jmp    L344
```

assistant: ```c
void quick(int *v, int inicio, int fim) {
  int i, j, pivo, aux;
  i = inicio;
  j = fim;
  pivo = v[(inicio + fim) / 2];
  while (i < j) {
    while (v[i] < pivo)
      i++;
    while (v[j] > pivo)
      j--;
    if (i <= j) {
      aux = v[i];
      v[i++] = v[j];
      v[j--] = aux;
    }
  }
  if (j > inicio)
    quick(v, inicio, j);
  if (i < fim)
    quick(v, i, fim);
  return;
}
```