user: Converte this assembly snippet into its equivalent C code:

```asm
<quick_sort>:
  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)
L70:
  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
L870:
  cmp    %esi,%ecx
  jg     L18
L594:
  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    L744
  nopl   (%rax)
L1001:
  mov    %rax,%r8
  mov    (%rax),%r10d
  lea    0x4(%rax),%rax
  add    $0x1,%ecx
  cmp    %edx,%r10d
  jl     L1001
  cmp    %edi,%edx
  jge    L11
L319:
  lea    -0x4(%r9,%rbx,4),%rax
  nopl   0x0(%rax,%rax,1)
L766:
  mov    %rax,%r11
  mov    (%rax),%edi
  sub    $0x4,%rax
  sub    $0x1,%esi
  cmp    %edx,%edi
  jg     L766
L11:
  cmp    %ecx,%esi
  jl     L870
  mov    %edi,(%r8)
  add    $0x1,%ecx
  sub    $0x1,%esi
  mov    %r10d,(%r11)
L700:
  cmp    %esi,%ecx
  jle    L594
L18:
  mov    %ecx,0x10(%rsp)
  mov    %esi,0x18(%rsp)
  cmp    %r14d,%esi
  jg     L187
L332:
  mov    0x38(%rsp),%ebx
  cmp    %ebx,0x10(%rsp)
  jge    L442
  mov    0x10(%rsp),%r14d
  mov    %ebx,%ecx
  jmp    L70
L744:
  cmp    %edi,%edx
  jl     L319
  mov    %edi,(%r8)
  add    $0x1,%ecx
  sub    $0x1,%esi
  mov    %r10d,(%r11)
  jmp    L700
L846:
  mov    %ecx,0x1c(%rsp)
  mov    %esi,0x20(%rsp)
  cmp    %ecx,%r14d
  jl     L455
L435:
  mov    0x20(%rsp),%ebx
  cmp    %ebx,0x18(%rsp)
  jle    L332
  mov    %ebx,%r14d
L187:
  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
L303:
  cmp    %ecx,%esi
  jg     L846
  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    L161
  xchg   %ax,%ax
L229:
  mov    %rax,%r8
  mov    (%rax),%r10d
  lea    0x4(%rax),%rax
  add    $0x1,%esi
  cmp    %r10d,%edx
  jg     L229
  cmp    %edi,%edx
  jge    L947
L38:
  lea    -0x4(%r9,%rbx,4),%rax
  nopl   0x0(%rax,%rax,1)
L383:
  mov    %rax,%r11
  mov    (%rax),%edi
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edi,%edx
  jl     L383
L947:
  cmp    %esi,%ecx
  jl     L303
  mov    %edi,(%r8)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r10d,(%r11)
  jmp    L303
L161:
  cmp    %edi,%edx
  jl     L38
  mov    %edi,(%r8)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r10d,(%r11)
  jmp    L303
L521:
  mov    %ecx,0x24(%rsp)
  mov    %esi,0x28(%rsp)
  cmp    %ecx,%r14d
  jl     L337
L28:
  mov    0x28(%rsp),%ebx
  cmp    %ebx,0x1c(%rsp)
  jle    L435
  mov    %ebx,%r14d
L455:
  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)
L813:
  cmp    %ecx,%esi
  jg     L521
  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    L364
  xchg   %ax,%ax
L493:
  mov    %rax,%r8
  mov    (%rax),%r10d
  lea    0x4(%rax),%rax
  add    $0x1,%esi
  cmp    %r10d,%edx
  jg     L493
  cmp    %edi,%edx
  jge    L767
L732:
  lea    -0x4(%r9,%rbx,4),%rax
  nopl   0x0(%rax,%rax,1)
L420:
  mov    %rax,%r11
  mov    (%rax),%edi
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edi,%edx
  jl     L420
L767:
  cmp    %esi,%ecx
  jl     L813
  mov    %edi,(%r8)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r10d,(%r11)
  jmp    L813
L364:
  cmp    %edi,%edx
  jl     L732
  mov    %edi,(%r8)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r10d,(%r11)
  jmp    L813
L600:
  mov    %edx,0x2c(%rsp)
  mov    %ecx,0x30(%rsp)
  cmp    %edx,%r14d
  jl     L882
L1005:
  mov    0x30(%rsp),%ebx
  cmp    %ebx,0x24(%rsp)
  jle    L28
  mov    %ebx,%r14d
L337:
  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)
L361:
  cmp    %edx,%ecx
  jg     L600
  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    L959
  xchg   %ax,%ax
L333:
  mov    %rax,%rdi
  mov    (%rax),%r8d
  lea    0x4(%rax),%rax
  add    $0x1,%ecx
  cmp    %r8d,%esi
  jg     L333
  cmp    %r10d,%esi
  jge    L576
L806:
  lea    -0x4(%r9,%rbx,4),%rax
  nopl   0x0(%rax)
L253:
  mov    %rax,%r11
  mov    (%rax),%r10d
  sub    $0x4,%rax
  sub    $0x1,%edx
  cmp    %r10d,%esi
  jl     L253
L576:
  cmp    %ecx,%edx
  jl     L361
  mov    %r10d,(%rdi)
  add    $0x1,%ecx
  sub    $0x1,%edx
  mov    %r8d,(%r11)
  jmp    L361
L959:
  cmp    %r10d,%esi
  jl     L806
  mov    %r10d,(%rdi)
  add    $0x1,%ecx
  sub    $0x1,%edx
  mov    %r8d,(%r11)
  jmp    L361
L882:
  mov    %r9,%r11
L402:
  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
L439:
  cmp    %ecx,%esi
  jg     L531
  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    L148
  nopl   0x0(%rax)
L478:
  mov    %rax,%r9
  mov    (%rax),%r8d
  lea    0x4(%rax),%rax
  add    $0x1,%esi
  cmp    %r8d,%edx
  jg     L478
  cmp    %edi,%edx
  jge    L776
L844:
  lea    -0x4(%r11,%rbx,4),%rax
  nopl   0x0(%rax,%rax,1)
L906:
  mov    %rax,%r10
  mov    (%rax),%edi
  sub    $0x4,%rax
  sub    $0x1,%ecx
  cmp    %edi,%edx
  jl     L906
L776:
  cmp    %ecx,%esi
  jle    L263
L531:
  mov    %ecx,0x14(%rsp)
  mov    %esi,0x34(%rsp)
  cmp    %ecx,%r14d
  jl     L638
L833:
  mov    0x34(%rsp),%ebx
  cmp    %ebx,0x2c(%rsp)
  jle    L330
  mov    %ebx,%r14d
  jmp    L402
L923:
  cmp    %r15d,%r14d
  jl     L969
L989:
  cmp    %r10d,0x14(%rsp)
  jle    L833
  mov    %r10d,%r14d
L638:
  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)
L186:
  cmp    %r15d,%r10d
  jg     L923
  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    L35
  nopl   (%rax)
L494:
  mov    %rax,%rdi
  mov    (%rax),%esi
  lea    0x4(%rax),%rax
  add    $0x1,%r10d
  cmp    %esi,%edx
  jg     L494
  cmp    %ecx,%edx
  jge    L464
L612:
  lea    -0x4(%r11,%r9,4),%rax
  nopw   0x0(%rax,%rax,1)
L742:
  mov    %rax,%r8
  mov    (%rax),%ecx
  sub    $0x4,%rax
  sub    $0x1,%r15d
  cmp    %ecx,%edx
  jl     L742
L464:
  cmp    %r10d,%r15d
  jl     L186
  mov    %ecx,(%rdi)
  add    $0x1,%r10d
  sub    $0x1,%r15d
  mov    %esi,(%r8)
  jmp    L186
L35:
  cmp    %ecx,%edx
  jl     L612
  mov    %ecx,(%rdi)
  add    $0x1,%r10d
  sub    $0x1,%r15d
  mov    %esi,(%r8)
  jmp    L186
L148:
  cmp    %edi,%edx
  jl     L844
L263:
  mov    %edi,(%r9)
  add    $0x1,%esi
  sub    $0x1,%ecx
  mov    %r8d,(%r10)
  jmp    L439
L969:
  mov    %r10d,0x3c(%rsp)
  mov    %r15d,0xc(%rsp)
  mov    %r11,%r15
L4:
  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)
L392:
  cmp    %r13d,%r14d
  jg     L335
L299:
  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    L931
  nopl   (%rax)
L500:
  mov    %rax,%rdi
  mov    (%rax),%esi
  lea    0x4(%rax),%rax
  add    $0x1,%r14d
  cmp    %esi,%edx
  jg     L500
  cmp    %ecx,%edx
  jge    L506
L155:
  lea    -0x4(%r15,%r9,4),%rax
  nopw   0x0(%rax,%rax,1)
L762:
  mov    %rax,%r8
  mov    (%rax),%ecx
  sub    $0x4,%rax
  sub    $0x1,%r13d
  cmp    %ecx,%edx
  jl     L762
L506:
  cmp    %r14d,%r13d
  jl     L392
  mov    %ecx,(%rdi)
  add    $0x1,%r14d
  sub    $0x1,%r13d
  mov    %esi,(%r8)
L290:
  cmp    %r13d,%r14d
  jle    L299
L335:
  cmp    %r13d,%r10d
  jl     L228
L197:
  cmp    %r14d,0xc(%rsp)
  jg     L4
  mov    0x3c(%rsp),%r10d
  mov    %r15,%r11
  jmp    L989
L931:
  cmp    %ecx,%edx
  jl     L155
  mov    %ecx,(%rdi)
  add    $0x1,%r14d
  sub    $0x1,%r13d
  mov    %esi,(%r8)
  jmp    L290
L505:
  cmp    %ebp,%r10d
  jl     L99
L848:
  cmp    %r12d,%r13d
  jle    L197
  mov    %r12d,%r10d
L228:
  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)
L328:
  cmp    %ebp,%r12d
  jg     L505
  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    L386
  nopl   (%rax)
L644:
  mov    %rax,%rdi
  mov    (%rax),%esi
  lea    0x4(%rax),%rax
  add    $0x1,%r12d
  cmp    %esi,%edx
  jg     L644
  cmp    %ecx,%edx
  jge    L345
L1025:
  lea    -0x4(%r15,%r9,4),%rax
  nopw   0x0(%rax,%rax,1)
L172:
  mov    %rax,%r8
  mov    (%rax),%ecx
  sub    $0x4,%rax
  sub    $0x1,%ebp
  cmp    %ecx,%edx
  jl     L172
L345:
  cmp    %r12d,%ebp
  jl     L328
  mov    %ecx,(%rdi)
  add    $0x1,%r12d
  sub    $0x1,%ebp
  mov    %esi,(%r8)
  jmp    L328
L386:
  cmp    %ecx,%edx
  jl     L1025
  mov    %ecx,(%rdi)
  add    $0x1,%r12d
  sub    $0x1,%ebp
  mov    %esi,(%r8)
  jmp    L328
L930:
  cmp    %edx,%r10d
  jl     L104
L558:
  cmp    %ebx,%ebp
  jle    L848
  mov    %ebx,%r10d
L99:
  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)
L745:
  cmp    %edx,%ebx
  jg     L930
  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    L1015
  nopl   0x0(%rax)
L553:
  mov    %rax,%rsi
  mov    (%rax),%ecx
  lea    0x4(%rax),%rax
  add    $0x1,%ebx
  cmp    %ecx,%edi
  jg     L553
  cmp    %r8d,%edi
  jge    L686
L382:
  lea    -0x4(%r15,%r11,4),%rax
  nopw   0x0(%rax,%rax,1)
L839:
  mov    %rax,%r9
  mov    (%rax),%r8d
  sub    $0x4,%rax
  sub    $0x1,%edx
  cmp    %r8d,%edi
  jl     L839
L686:
  cmp    %ebx,%edx
  jl     L745
  mov    %r8d,(%rsi)
  add    $0x1,%ebx
  sub    $0x1,%edx
  mov    %ecx,(%r9)
  jmp    L745
  nopl   0x0(%rax)
L1015:
  cmp    %r8d,%edi
  jl     L382
  mov    %r8d,(%rsi)
  add    $0x1,%ebx
  sub    $0x1,%edx
  mov    %ecx,(%r9)
  jmp    L745
L330:
  mov    %r11,%r9
  jmp    L1005
L442:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L104:
  mov    %r10d,%esi
  mov    %r15,%rdi
  call   <quick_sort>
  jmp    L558
```

assistant: ```c
void quick_sort(int arr[10000], int low, int high) {
  int i = low, j = high;
  int pivot = arr[(i + j) / 2];
  while (i <= j) {
    while (arr[i] < pivot)
      i++;
    while (arr[j] > pivot)
      j--;
    if (i <= j) {
      int temp = arr[i];
      arr[i] = arr[j];
      arr[j] = temp;
      i++;
      j--;
    }
  }
  if (low < j)
    quick_sort(arr, low, j);
  if (i < high)
    quick_sort(arr, i, high);
}
```