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

```asm
<quicksort>:
  endbr64
  push   %r15
  movslq %edx,%rax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %eax,0x20(%rsp)
  cmp    %esi,%eax
  jle    L416
  lea    (%rdi,%rax,4),%rax
  mov    %rdi,%r14
  mov    %esi,%r15d
  mov    %rax,0x30(%rsp)
L198:
  movslq %r15d,%r13
  mov    %r15d,%edx
  mov    %r13,%rbp
  jmp    L207
L238:
  add    $0x1,%rbp
  cmp    %ebp,0x20(%rsp)
  jle    L3
L207:
  mov    0x30(%rsp),%rax
  mov    %ebp,%esi
  mov    (%rax),%eax
  cmp    %eax,(%r14,%rbp,4)
  jge    L238
  lea    0x1(%rdx),%ebx
  mov    %r14,%rdi
  add    $0x1,%rbp
  call   <swap@plt>
  mov    %ebx,%edx
  cmp    %ebp,0x20(%rsp)
  jg     L207
L3:
  mov    %edx,%ebx
  mov    %edx,0x3c(%rsp)
  mov    0x20(%rsp),%edx
  mov    %r14,%rdi
  mov    %ebx,%esi
  call   <swap@plt>
  mov    %ebx,%eax
  sub    $0x1,%eax
  mov    %eax,0x4(%rsp)
  cmp    %r15d,%eax
  jle    L436
  movslq 0x4(%rsp),%rax
  lea    (%r14,%rax,4),%rax
  mov    %rax,0x40(%rsp)
L141:
  mov    %r13,%rbp
  mov    %r15d,%edx
  jmp    L384
L315:
  add    $0x1,%rbp
  cmp    %ebp,0x4(%rsp)
  jle    L295
L384:
  mov    0x40(%rsp),%rax
  mov    %ebp,%esi
  mov    (%rax),%eax
  cmp    %eax,(%r14,%rbp,4)
  jge    L315
  lea    0x1(%rdx),%ebx
  mov    %r14,%rdi
  add    $0x1,%rbp
  call   <swap@plt>
  mov    %ebx,%edx
  cmp    %ebp,0x4(%rsp)
  jg     L384
L295:
  mov    %edx,%ebx
  mov    %edx,0x50(%rsp)
  mov    0x4(%rsp),%edx
  mov    %r14,%rdi
  mov    %ebx,%esi
  call   <swap@plt>
  mov    %ebx,%eax
  sub    $0x1,%eax
  mov    %eax,0x8(%rsp)
  cmp    %r15d,%eax
  jle    L46
  movslq 0x8(%rsp),%rax
  lea    (%r14,%rax,4),%rax
  mov    %rax,0x48(%rsp)
L552:
  mov    %r13,%rbp
  mov    %r15d,%edx
  jmp    L290
L502:
  add    $0x1,%rbp
  cmp    %ebp,0x8(%rsp)
  jle    L99
L290:
  mov    0x48(%rsp),%rax
  mov    %ebp,%esi
  mov    (%rax),%eax
  cmp    %eax,(%r14,%rbp,4)
  jge    L502
  lea    0x1(%rdx),%ebx
  mov    %r14,%rdi
  add    $0x1,%rbp
  call   <swap@plt>
  mov    %ebx,%edx
  cmp    %ebp,0x8(%rsp)
  jg     L290
L99:
  mov    %edx,%ebx
  mov    %edx,0x54(%rsp)
  mov    0x8(%rsp),%edx
  mov    %r14,%rdi
  mov    %ebx,%esi
  call   <swap@plt>
  mov    %ebx,%eax
  sub    $0x1,%eax
  mov    %eax,0xc(%rsp)
  cmp    %r15d,%eax
  jle    L424
  movslq 0xc(%rsp),%rax
  mov    %r13,%rbx
  mov    %r15d,%r13d
  lea    (%r14,%rax,4),%rax
  mov    %rax,0x58(%rsp)
L429:
  mov    %rbx,%rbp
  mov    %r13d,%edx
  jmp    L60
L396:
  add    $0x1,%rbp
  cmp    %ebp,0xc(%rsp)
  jle    L538
L60:
  mov    0x58(%rsp),%rax
  mov    %ebp,%esi
  mov    (%rax),%eax
  cmp    %eax,(%r14,%rbp,4)
  jge    L396
  lea    0x1(%rdx),%r12d
  mov    %r14,%rdi
  add    $0x1,%rbp
  call   <swap@plt>
  mov    %r12d,%edx
  cmp    %ebp,0xc(%rsp)
  jg     L60
L538:
  mov    %edx,%r15d
  mov    %edx,0x68(%rsp)
  mov    0xc(%rsp),%edx
  mov    %r14,%rdi
  mov    %r15d,%esi
  call   <swap@plt>
  mov    %r15d,%eax
  sub    $0x1,%eax
  mov    %eax,0x18(%rsp)
  cmp    %r13d,%eax
  jle    L303
  movslq 0x18(%rsp),%rax
  lea    (%r14,%rax,4),%rax
  mov    %rax,0x60(%rsp)
L320:
  mov    %rbx,%rbp
  mov    %r13d,%edx
  jmp    L194
L511:
  add    $0x1,%rbp
  cmp    %ebp,0x18(%rsp)
  jle    L204
L194:
  mov    0x60(%rsp),%rax
  mov    %ebp,%esi
  mov    (%rax),%eax
  cmp    %eax,(%r14,%rbp,4)
  jge    L511
  lea    0x1(%rdx),%r12d
  mov    %r14,%rdi
  add    $0x1,%rbp
  call   <swap@plt>
  mov    %r12d,%edx
  cmp    %ebp,0x18(%rsp)
  jg     L194
L204:
  mov    %edx,%r15d
  mov    %edx,0x6c(%rsp)
  mov    0x18(%rsp),%edx
  mov    %r14,%rdi
  mov    %r15d,%esi
  call   <swap@plt>
  mov    %r15d,%eax
  sub    $0x1,%eax
  mov    %eax,(%rsp)
  cmp    %r13d,%eax
  jle    L498
  movslq (%rsp),%rax
  mov    %r14,%r15
  lea    (%r14,%rax,4),%rax
  mov    %rax,0x28(%rsp)
L473:
  mov    0x28(%rsp),%rbp
  mov    %rbx,%r12
  mov    %r13d,%edx
L262:
  mov    0x0(%rbp),%eax
  mov    %r12d,%esi
  cmp    %eax,(%r15,%r12,4)
  jl     L205
L73:
  mov    (%rsp),%eax
  add    $0x1,%r12
  cmp    %r12d,%eax
  jg     L262
  mov    %edx,%r14d
  mov    %edx,0x1c(%rsp)
  mov    %r15,%rdi
  mov    %eax,%edx
  mov    %r14d,%esi
  lea    -0x1(%r14),%ebp
  call   <swap@plt>
  cmp    %r13d,%ebp
  jle    L375
  movslq %ebp,%rax
  mov    %r15,%r14
  lea    (%r15,%rax,4),%rax
  mov    %rax,0x10(%rsp)
L522:
  mov    %rbx,%r15
  mov    %r13d,%edx
  mov    %rbx,%r12
L244:
  mov    0x10(%rsp),%rax
  mov    %r15d,%esi
  mov    (%rax),%eax
  cmp    %eax,(%r14,%r15,4)
  jl     L413
L400:
  add    $0x1,%r15
  cmp    %r15d,%ebp
  jg     L244
  mov    %r12,%rbx
  mov    %edx,%r12d
  mov    %r14,%rdi
  mov    %ebp,%edx
  mov    %r12d,%esi
  lea    -0x1(%r12),%r15d
  call   <swap@plt>
  cmp    %r13d,%r15d
  jle    L373
  movslq %r15d,%rax
  mov    %ebp,0x78(%rsp)
  lea    (%r14,%rax,4),%rax
  mov    %r12d,0x7c(%rsp)
  mov    %rax,0x70(%rsp)
  mov    %r13d,%eax
  mov    %r14,%r13
  mov    %eax,%r14d
L227:
  mov    0x70(%rsp),%r12
  mov    %rbx,%rbp
  mov    %r14d,%edx
L490:
  mov    (%r12),%eax
  mov    %ebp,%esi
  cmp    %eax,0x0(%r13,%rbp,4)
  jl     L12
L292:
  add    $0x1,%rbp
  cmp    %ebp,%r15d
  jg     L490
  mov    %edx,%r9d
  mov    %r13,%rdi
  mov    %r15d,%edx
  mov    %r9d,%esi
  mov    %r9d,0x24(%rsp)
  call   <swap@plt>
  mov    0x24(%rsp),%r9d
  lea    -0x1(%r9),%r12d
  cmp    %r14d,%r12d
  jle    L341
  movslq %r12d,%rax
  mov    %r14d,%edx
  lea    0x0(%r13,%rax,4),%rcx
  mov    %rcx,%rax
  mov    %r15d,%ecx
  mov    %ecx,%ebp
  mov    %rax,%r15
L118:
  mov    (%r15),%eax
  mov    %ebx,%esi
  cmp    %eax,0x0(%r13,%rbx,4)
  jl     L197
L37:
  add    $0x1,%rbx
  cmp    %ebx,%r12d
  jg     L118
  mov    %ebp,0x38(%rsp)
  mov    %edx,%ebp
  mov    %r13,%rdi
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %r9d,0x24(%rsp)
  call   <swap@plt>
  mov    %r14d,%esi
  lea    -0x1(%rbp),%edx
  mov    %r13,%rdi
  call   <quicksort>
  lea    0x1(%rbp),%r14d
  mov    0x24(%rsp),%r9d
  mov    0x38(%rsp),%ecx
  cmp    %r14d,%r12d
  jle    L248
  movslq %r14d,%rbx
  mov    (%r15),%eax
  mov    %r14d,%edx
  mov    %ecx,%ebp
  mov    %ebx,%esi
  cmp    %eax,0x0(%r13,%rbx,4)
  jge    L37
  nopl   0x0(%rax,%rax,1)
L197:
  lea    0x1(%rdx),%eax
  mov    %r13,%rdi
  mov    %r9d,0x38(%rsp)
  mov    %eax,0x24(%rsp)
  call   <swap@plt>
  mov    0x24(%rsp),%edx
  mov    0x38(%rsp),%r9d
  jmp    L37
L436:
  mov    0x3c(%rsp),%r15d
  add    $0x1,%r15d
  cmp    0x20(%rsp),%r15d
  jl     L198
L416:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L248:
  mov    %ecx,%r15d
L341:
  lea    0x1(%r9),%r14d
  cmp    %r14d,%r15d
  jle    L338
  movslq %r14d,%rbx
  jmp    L227
L338:
  mov    0x78(%rsp),%ebp
  mov    0x7c(%rsp),%r12d
  mov    %r13,%r14
L373:
  lea    0x1(%r12),%r13d
  cmp    %r13d,%ebp
  jle    L103
  movslq %r13d,%rbx
  jmp    L522
  nopw   0x0(%rax,%rax,1)
L413:
  lea    0x1(%rdx),%ebx
  mov    %r14,%rdi
  call   <swap@plt>
  mov    %ebx,%edx
  jmp    L400
L103:
  mov    %r14,%r15
L375:
  mov    0x1c(%rsp),%r13d
  add    $0x1,%r13d
  cmp    %r13d,(%rsp)
  jle    L319
  movslq %r13d,%rbx
  jmp    L473
L205:
  lea    0x1(%rdx),%r14d
  mov    %r15,%rdi
  call   <swap@plt>
  mov    %r14d,%edx
  jmp    L73
  nopl   0x0(%rax,%rax,1)
L12:
  lea    0x1(%rdx),%eax
  mov    %r13,%rdi
  mov    %eax,0x24(%rsp)
  call   <swap@plt>
  mov    0x24(%rsp),%edx
  jmp    L292
L319:
  mov    %r15,%r14
L498:
  mov    0x6c(%rsp),%r13d
  add    $0x1,%r13d
  cmp    %r13d,0x18(%rsp)
  jle    L303
  movslq %r13d,%rbx
  jmp    L320
L303:
  mov    0x68(%rsp),%r13d
  add    $0x1,%r13d
  cmp    %r13d,0xc(%rsp)
  jle    L424
  movslq %r13d,%rbx
  jmp    L429
L424:
  mov    0x54(%rsp),%r15d
  add    $0x1,%r15d
  cmp    %r15d,0x8(%rsp)
  jle    L46
  movslq %r15d,%r13
  jmp    L552
L46:
  mov    0x50(%rsp),%r15d
  add    $0x1,%r15d
  cmp    %r15d,0x4(%rsp)
  jle    L436
  movslq %r15d,%r13
  jmp    L141
```

assistant: ```c
void quicksort(int *values, int l, int r) {
  if (l >= r)
    return;
  int j = l;
  for (int i = l; i < r; i++) {
    if (values[i] < values[r]) {
      swap(values, i, j++);
    }
  }
  swap(values, j, r);
  quicksort(values, l, j - 1);
  quicksort(values, j + 1, r);
}
```