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

```asm
<quicksort>:
  endbr64
  push   %r15
  movslq %edx,%rax
  mov    %rdi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x88,%rsp
  mov    %esi,0x4(%rsp)
  mov    %eax,0x78(%rsp)
  mov    %rax,0x70(%rsp)
L352:
  mov    0x78(%rsp),%ecx
  mov    %ebx,%edx
  movslq %ebx,%r11
  lea    0x1(%rbx),%r14d
  lea    (%r15,%r11,4),%r8
  mov    %ebx,%edi
  mov    %r14d,%r9d
  add    %ecx,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  mov    %ecx,%edx
  sar    %eax
  cltq
  mov    (%r15,%rax,4),%esi
  mov    0x70(%rsp),%rax
L118:
  mov    (%r8),%ebx
  lea    (%r15,%rax,4),%r10
  mov    %edi,%ebp
  mov    (%r10),%ecx
  cmp    %esi,%ebx
  jl     L334
  cmp    %ecx,%esi
  jge    L256
  lea    -0x4(%r15,%rax,4),%rax
  nopl   0x0(%rax)
L500:
  mov    %rax,%r10
  mov    (%rax),%ecx
  sub    $0x4,%rax
  sub    $0x1,%edx
  cmp    %esi,%ecx
  jg     L500
L256:
  cmp    %edx,%edi
  jle    L363
L384:
  mov    %ebp,0x40(%rsp)
  mov    %edx,0x2c(%rsp)
  cmp    %edx,0x4(%rsp)
  jl     L149
L388:
  mov    0x40(%rsp),%ebx
  cmp    %ebx,0x78(%rsp)
  jle    L444
  mov    %ebx,0x4(%rsp)
  jmp    L352
L363:
  sub    $0x1,%edx
  mov    %ecx,(%r8)
  mov    %r9d,%ebp
  mov    %ebx,(%r10)
  cmp    %edx,%r9d
  jg     L384
  movslq %edx,%rax
L334:
  add    $0x4,%r8
  add    $0x1,%r9d
  add    $0x1,%edi
  jmp    L118
L149:
  movslq %edx,%rax
  mov    0x4(%rsp),%edi
  mov    %rax,0x68(%rsp)
L734:
  mov    0x2c(%rsp),%ebx
  mov    %edi,%edx
  lea    (%r15,%r11,4),%r8
  mov    %r14d,%r9d
  add    %ebx,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  mov    %ebx,%edx
  sar    %eax
  cltq
  mov    (%r15,%rax,4),%esi
  mov    0x68(%rsp),%rax
  nopl   0x0(%rax,%rax,1)
L487:
  mov    (%r8),%ebx
  lea    (%r15,%rax,4),%r10
  mov    %edi,%ebp
  mov    (%r10),%ecx
  cmp    %ebx,%esi
  jg     L495
  cmp    %ecx,%esi
  jge    L251
  lea    -0x4(%r15,%rax,4),%rax
  nopl   0x0(%rax)
L285:
  mov    %rax,%r10
  mov    (%rax),%ecx
  sub    $0x4,%rax
  sub    $0x1,%edx
  cmp    %ecx,%esi
  jl     L285
L251:
  cmp    %edx,%edi
  jle    L550
L489:
  mov    %ebp,0x44(%rsp)
  mov    %edx,0x30(%rsp)
  cmp    %edx,0x4(%rsp)
  jl     L99
L739:
  mov    0x44(%rsp),%ebx
  cmp    %ebx,0x2c(%rsp)
  jle    L388
  movslq %ebx,%r11
  mov    %r11d,0x4(%rsp)
  lea    0x1(%r11),%r14d
  mov    %r11d,%edi
  jmp    L734
L550:
  sub    $0x1,%edx
  mov    %ecx,(%r8)
  mov    %r9d,%ebp
  mov    %ebx,(%r10)
  cmp    %edx,%r9d
  jg     L489
  movslq %edx,%rax
L495:
  add    $0x4,%r8
  add    $0x1,%r9d
  add    $0x1,%edi
  jmp    L487
L99:
  movslq %edx,%rax
  mov    0x4(%rsp),%edi
  mov    %rax,0x60(%rsp)
L785:
  mov    0x30(%rsp),%ebx
  mov    %edi,%edx
  lea    (%r15,%r11,4),%r8
  mov    %r14d,%r9d
  add    %ebx,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  mov    %ebx,%edx
  sar    %eax
  cltq
  mov    (%r15,%rax,4),%esi
  mov    0x60(%rsp),%rax
  nopl   0x0(%rax)
L289:
  mov    (%r8),%ebx
  lea    (%r15,%rax,4),%r10
  mov    %edi,%ebp
  mov    (%r10),%ecx
  cmp    %ebx,%esi
  jg     L235
  cmp    %ecx,%esi
  jge    L115
  lea    -0x4(%r15,%rax,4),%rax
  nopl   0x0(%rax)
L140:
  mov    %rax,%r10
  mov    (%rax),%ecx
  sub    $0x4,%rax
  sub    $0x1,%edx
  cmp    %ecx,%esi
  jl     L140
L115:
  cmp    %edx,%edi
  jle    L143
L153:
  mov    %ebp,0x48(%rsp)
  mov    %edx,0x34(%rsp)
  cmp    %edx,0x4(%rsp)
  jl     L249
L316:
  mov    0x48(%rsp),%ebx
  cmp    %ebx,0x30(%rsp)
  jle    L739
  movslq %ebx,%r11
  mov    %r11d,0x4(%rsp)
  lea    0x1(%r11),%r14d
  mov    %r11d,%edi
  jmp    L785
L143:
  sub    $0x1,%edx
  mov    %ecx,(%r8)
  mov    %r9d,%ebp
  mov    %ebx,(%r10)
  cmp    %edx,%r9d
  jg     L153
  movslq %edx,%rax
L235:
  add    $0x4,%r8
  add    $0x1,%r9d
  add    $0x1,%edi
  jmp    L289
L249:
  movslq %edx,%rax
  mov    0x4(%rsp),%edi
  mov    %rax,0x58(%rsp)
L117:
  mov    0x34(%rsp),%ebx
  mov    %edi,%edx
  lea    (%r15,%r11,4),%r8
  mov    %r14d,%r9d
  add    %ebx,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  mov    %ebx,%edx
  sar    %eax
  cltq
  mov    (%r15,%rax,4),%esi
  mov    0x58(%rsp),%rax
  nopl   0x0(%rax)
L806:
  mov    (%r8),%ebx
  lea    (%r15,%rax,4),%r10
  mov    %edi,%ebp
  mov    (%r10),%ecx
  cmp    %ebx,%esi
  jg     L432
  cmp    %ecx,%esi
  jge    L825
  lea    -0x4(%r15,%rax,4),%rax
  nopl   0x0(%rax)
L184:
  mov    %rax,%r10
  mov    (%rax),%ecx
  sub    $0x4,%rax
  sub    $0x1,%edx
  cmp    %ecx,%esi
  jl     L184
L825:
  cmp    %edx,%edi
  jle    L575
L96:
  mov    %ebp,0x4c(%rsp)
  mov    %edx,0x1c(%rsp)
  cmp    %edx,0x4(%rsp)
  jl     L263
L233:
  mov    0x4c(%rsp),%ebx
  cmp    %ebx,0x34(%rsp)
  jle    L316
  movslq %ebx,%r11
  mov    %r11d,0x4(%rsp)
  lea    0x1(%r11),%r14d
  mov    %r11d,%edi
  jmp    L117
L575:
  sub    $0x1,%edx
  mov    %ecx,(%r8)
  mov    %r9d,%ebp
  mov    %ebx,(%r10)
  cmp    %edx,%r9d
  jg     L96
  movslq %edx,%rax
L432:
  add    $0x4,%r8
  add    $0x1,%r9d
  add    $0x1,%edi
  jmp    L806
L263:
  movslq %edx,%rax
  mov    0x4(%rsp),%edi
  mov    %r14d,%r13d
  mov    %rax,0x50(%rsp)
L607:
  mov    0x1c(%rsp),%r14d
  mov    %edi,%edx
  lea    (%r15,%r11,4),%r8
  mov    %r13d,%r9d
  add    %r14d,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cltq
  mov    (%r15,%rax,4),%esi
  mov    0x50(%rsp),%rax
  nopl   0x0(%rax)
L598:
  mov    (%r8),%r10d
  lea    (%r15,%rax,4),%rcx
  mov    %edi,%ebx
  mov    (%rcx),%edx
  cmp    %r10d,%esi
  jg     L590
  cmp    %edx,%esi
  jge    L292
  lea    -0x4(%r15,%rax,4),%rax
  nopl   0x0(%rax)
L549:
  mov    %rax,%rcx
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%r14d
  cmp    %edx,%esi
  jl     L549
L292:
  cmp    %r14d,%edi
  jle    L640
L498:
  mov    %ebx,0x28(%rsp)
  cmp    %r14d,0x4(%rsp)
  jl     L187
L820:
  mov    0x28(%rsp),%ebx
  cmp    %ebx,0x1c(%rsp)
  jle    L233
  movslq %ebx,%r11
  mov    %r11d,0x4(%rsp)
  lea    0x1(%r11),%r13d
  mov    %r11d,%edi
  jmp    L607
  nopl   0x0(%rax,%rax,1)
L640:
  sub    $0x1,%r14d
  mov    %edx,(%r8)
  mov    %r9d,%ebx
  mov    %r10d,(%rcx)
  cmp    %r14d,%r9d
  jg     L498
  movslq %r14d,%rax
L590:
  add    $0x4,%r8
  add    $0x1,%r9d
  add    $0x1,%edi
  jmp    L598
L187:
  movslq %r14d,%rax
  mov    %r14d,0x18(%rsp)
  mov    0x4(%rsp),%edi
  mov    %r13d,%r12d
  mov    %rax,0x38(%rsp)
L491:
  mov    0x18(%rsp),%r14d
  mov    %edi,%edx
  lea    (%r15,%r11,4),%r8
  mov    %r12d,%r9d
  add    %r14d,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cltq
  mov    (%r15,%rax,4),%esi
  mov    0x38(%rsp),%rax
  xchg   %ax,%ax
L675:
  mov    (%r8),%r10d
  lea    (%r15,%rax,4),%rcx
  mov    %edi,%ebx
  mov    (%rcx),%edx
  cmp    %r10d,%esi
  jg     L788
  cmp    %edx,%esi
  jge    L193
  lea    -0x4(%r15,%rax,4),%rax
  nopl   0x0(%rax)
L738:
  mov    %rax,%rcx
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%r14d
  cmp    %edx,%esi
  jl     L738
L193:
  cmp    %edi,%r14d
  jge    L167
L707:
  mov    %ebx,0x14(%rsp)
  cmp    %r14d,0x4(%rsp)
  jl     L375
L71:
  mov    0x14(%rsp),%ebx
  cmp    %ebx,0x18(%rsp)
  jle    L820
  movslq %ebx,%r11
  mov    %r11d,0x4(%rsp)
  lea    0x1(%r11),%r12d
  mov    %r11d,%edi
  jmp    L491
  nopl   0x0(%rax,%rax,1)
L167:
  sub    $0x1,%r14d
  mov    %edx,(%r8)
  mov    %r9d,%ebx
  mov    %r10d,(%rcx)
  cmp    %r14d,%r9d
  jg     L707
  movslq %r14d,%rax
L788:
  add    $0x4,%r8
  add    $0x1,%r9d
  add    $0x1,%edi
  jmp    L675
L375:
  movslq %r14d,%rax
  mov    %r14d,0x10(%rsp)
  mov    0x4(%rsp),%edi
  mov    %rax,0x20(%rsp)
L215:
  mov    0x10(%rsp),%ebp
  mov    %edi,%edx
  lea    (%r15,%r11,4),%r8
  mov    %r12d,%r9d
  add    %ebp,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cltq
  mov    (%r15,%rax,4),%esi
  mov    0x20(%rsp),%rax
  nopl   0x0(%rax)
L427:
  mov    (%r8),%r10d
  lea    (%r15,%rax,4),%rcx
  mov    %edi,%r14d
  mov    (%rcx),%edx
  cmp    %r10d,%esi
  jg     L343
  cmp    %edx,%esi
  jge    L464
  lea    -0x4(%r15,%rax,4),%rax
  nopw   0x0(%rax,%rax,1)
L39:
  mov    %rax,%rcx
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ebp
  cmp    %edx,%esi
  jl     L39
L464:
  cmp    %ebp,%edi
  jle    L544
L123:
  cmp    %ebp,0x4(%rsp)
  jl     L21
L14:
  cmp    %r14d,0x10(%rsp)
  jle    L71
  movslq %r14d,%r11
  mov    %r11d,0x4(%rsp)
  lea    0x1(%r11),%r12d
  mov    %r11d,%edi
  jmp    L215
  xchg   %ax,%ax
L544:
  sub    $0x1,%ebp
  mov    %edx,(%r8)
  mov    %r9d,%r14d
  mov    %r10d,(%rcx)
  cmp    %ebp,%r9d
  jg     L123
  movslq %ebp,%rax
L343:
  add    $0x4,%r8
  add    $0x1,%r9d
  add    $0x1,%edi
  jmp    L427
L21:
  movslq %ebp,%rax
  mov    %r14d,0x7c(%rsp)
  mov    0x4(%rsp),%r14d
  mov    %r12d,%r10d
  mov    %rax,0x8(%rsp)
L83:
  lea    (%r14,%rbp,1),%edx
  lea    (%r15,%r11,4),%r8
  mov    %r14d,%edi
  mov    %r10d,%r9d
  mov    %edx,%eax
  mov    %ebp,%ebx
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  cltq
  mov    (%r15,%rax,4),%esi
  mov    0x8(%rsp),%rax
  nopw   0x0(%rax,%rax,1)
L110:
  mov    (%r8),%r12d
  lea    (%r15,%rax,4),%rcx
  mov    %edi,%r13d
  mov    (%rcx),%edx
  cmp    %r12d,%esi
  jg     L527
  cmp    %edx,%esi
  jge    L519
  lea    -0x4(%r15,%rax,4),%rax
  nopw   0x0(%rax,%rax,1)
L657:
  mov    %rax,%rcx
  mov    (%rax),%edx
  sub    $0x4,%rax
  sub    $0x1,%ebx
  cmp    %edx,%esi
  jl     L657
L519:
  cmp    %ebx,%edi
  jle    L656
L229:
  cmp    %ebx,%r14d
  jl     L290
  cmp    %r13d,%ebp
  jle    L326
L264:
  movslq %r13d,%r11
  mov    %r11,%r14
  lea    0x1(%r11),%r10d
  jmp    L83
  xchg   %ax,%ax
L656:
  sub    $0x1,%ebx
  mov    %edx,(%r8)
  mov    %r9d,%r13d
  mov    %r12d,(%rcx)
  cmp    %ebx,%r9d
  jg     L229
  movslq %ebx,%rax
L527:
  add    $0x4,%r8
  add    $0x1,%r9d
  add    $0x1,%edi
  jmp    L110
L290:
  movslq %ebx,%rax
  mov    %ebp,0x4(%rsp)
  mov    %rax,%rbp
L720:
  lea    (%r14,%rbx,1),%edx
  lea    (%r15,%r11,4),%r9
  mov    %r14d,%r8d
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  mov    %ebx,%edx
  sar    %eax
  cltq
  mov    (%r15,%rax,4),%edi
  mov    %rbp,%rax
  nopw   0x0(%rax,%rax,1)
L138:
  mov    (%r9),%r11d
  lea    (%r15,%rax,4),%rsi
  mov    %r8d,%r12d
  mov    (%rsi),%ecx
  cmp    %r11d,%edi
  jg     L308
  cmp    %ecx,%edi
  jge    L406
  lea    -0x4(%r15,%rax,4),%rax
  nopw   0x0(%rax,%rax,1)
L203:
  mov    %rax,%rsi
  mov    (%rax),%ecx
  sub    $0x4,%rax
  sub    $0x1,%edx
  cmp    %ecx,%edi
  jl     L203
L406:
  cmp    %r8d,%edx
  jge    L330
L684:
  cmp    %edx,%r14d
  jl     L618
L499:
  cmp    %r12d,%ebx
  jle    L421
  movslq %r12d,%r11
  mov    %r11,%r14
  lea    0x1(%r11),%r10d
  jmp    L720
  nopl   0x0(%rax,%rax,1)
L330:
  sub    $0x1,%edx
  mov    %ecx,(%r9)
  mov    %r10d,%r12d
  mov    %r11d,(%rsi)
  cmp    %edx,%r10d
  jg     L684
  movslq %edx,%rax
L308:
  add    $0x4,%r9
  add    $0x1,%r10d
  add    $0x1,%r8d
  jmp    L138
L421:
  mov    0x4(%rsp),%ebp
  cmp    %r13d,%ebp
  jg     L264
L326:
  mov    0x7c(%rsp),%r14d
  jmp    L14
L618:
  mov    %r14d,%esi
  mov    %r15,%rdi
  call   <quicksort>
  jmp    L499
L444:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void quicksort(int a[], int L, int R) {
  int i, j, w, x, k;
  i = L;
  j = R;
  k = (L + R) / 2;
  x = a[k];
  do {
    while (a[i] < x)
      i = i + 1;
    while (a[j] > x)
      j = j - 1;
    if (i <= j) {
      w = a[i];
      a[i] = a[j];
      a[j] = w;
      i = i + 1;
      j = j - 1;
    }
  } while (i <= j);
  if (L < j)
    quicksort(a, L, j);
  if (R > i)
    quicksort(a, i, R);
}
```