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

```asm
<quicksort>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %ecx,0x24(%rsp)
  cmp    %edx,%ecx
  jle    L74
  mov    %rsi,%r13
  mov    %rdi,%r15
  mov    %edx,%r14d
L147:
  mov    0x24(%rsp),%ecx
  mov    %r14d,%edx
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <partition@plt>
  mov    %eax,0x28(%rsp)
  sub    $0x1,%eax
  mov    %eax,0x18(%rsp)
  cmp    %r14d,%eax
  jle    L13
  mov    %r14d,%eax
  mov    %r15,%r14
  mov    %eax,%r15d
L61:
  mov    0x18(%rsp),%ecx
  mov    %r15d,%edx
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <partition@plt>
  mov    %eax,0x2c(%rsp)
  sub    $0x1,%eax
  mov    %eax,0x1c(%rsp)
  cmp    %r15d,%eax
  jle    L35
  mov    %r15d,%eax
  mov    %r14,%r15
  mov    %eax,%r14d
L110:
  mov    0x1c(%rsp),%ecx
  mov    %r14d,%edx
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <partition@plt>
  mov    %eax,0x30(%rsp)
  sub    $0x1,%eax
  mov    %eax,0x20(%rsp)
  cmp    %r14d,%eax
  jle    L132
  mov    %r14d,%r12d
  mov    %r15,%r14
L30:
  mov    0x20(%rsp),%ecx
  mov    %r12d,%edx
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <partition@plt>
  lea    -0x1(%rax),%r15d
  mov    %eax,0x34(%rsp)
  cmp    %r12d,%r15d
  jle    L104
L131:
  mov    %r15d,%ecx
  mov    %r12d,%edx
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <partition@plt>
  lea    -0x1(%rax),%ebp
  mov    %eax,%ebx
  cmp    %r12d,%ebp
  jle    L153
  mov    %r15d,0x4(%rsp)
  mov    %r14,%rbx
  mov    %r13,%r14
  mov    %ebp,%r13d
  mov    %eax,0x8(%rsp)
L97:
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <partition@plt>
  mov    %eax,0xc(%rsp)
  sub    $0x1,%eax
  mov    %eax,0x10(%rsp)
  cmp    %r12d,%eax
  jle    L101
  mov    %r14,%rax
  mov    %rbx,%r14
  mov    %rax,%rbx
L168:
  mov    0x10(%rsp),%ecx
  mov    %r12d,%edx
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <partition@plt>
  lea    -0x1(%rax),%r15d
  mov    %eax,0x38(%rsp)
  cmp    %r12d,%r15d
  jle    L162
  mov    %r13d,0x14(%rsp)
  mov    %rbx,%r13
  mov    %r15d,%ebx
L176:
  mov    %ebx,%ecx
  mov    %r12d,%edx
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <partition@plt>
  lea    -0x1(%rax),%r15d
  mov    %eax,%ebp
  cmp    %r12d,%r15d
  jle    L111
  mov    %ebx,%ebp
  mov    %eax,%r8d
  mov    %r15d,%ebx
  mov    %r12d,%r15d
L165:
  mov    %r15d,%edx
  mov    %ebx,%ecx
  mov    %r13,%rsi
  mov    %r14,%rdi
  mov    %r8d,0x3c(%rsp)
  call   <partition@plt>
  mov    %r15d,%edx
  mov    %r13,%rsi
  mov    %r14,%rdi
  mov    %eax,%r12d
  lea    -0x1(%rax),%ecx
  call   <quicksort>
  lea    0x1(%r12),%r15d
  mov    0x3c(%rsp),%r8d
  cmp    %r15d,%ebx
  jg     L165
  mov    %ebp,%ebx
  mov    %r8d,%ebp
L111:
  lea    0x1(%rbp),%r12d
  cmp    %r12d,%ebx
  jg     L176
  mov    %r13,%rbx
  mov    0x14(%rsp),%r13d
L162:
  mov    0x38(%rsp),%r12d
  add    $0x1,%r12d
  cmp    %r12d,0x10(%rsp)
  jg     L168
  mov    %rbx,%rax
  mov    %r14,%rbx
  mov    %rax,%r14
L101:
  mov    0xc(%rsp),%r12d
  add    $0x1,%r12d
  cmp    %r12d,%r13d
  jg     L97
  mov    %r14,%r13
  mov    0x4(%rsp),%r15d
  mov    %rbx,%r14
  mov    0x8(%rsp),%ebx
L153:
  lea    0x1(%rbx),%r12d
  cmp    %r12d,%r15d
  jg     L131
L104:
  mov    0x34(%rsp),%r12d
  add    $0x1,%r12d
  cmp    %r12d,0x20(%rsp)
  jg     L30
  mov    %r14,%r15
L132:
  mov    0x30(%rsp),%r14d
  add    $0x1,%r14d
  cmp    %r14d,0x1c(%rsp)
  jg     L110
  mov    %r15,%r14
L35:
  mov    0x2c(%rsp),%r15d
  add    $0x1,%r15d
  cmp    %r15d,0x18(%rsp)
  jg     L61
  mov    %r14,%r15
L13:
  mov    0x28(%rsp),%r14d
  add    $0x1,%r14d
  cmp    0x24(%rsp),%r14d
  jl     L147
L74:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void quicksort(int *piIndex, int *piValue, int left, int right) {
  if (left >= right)
    return;
  int index = partition(piIndex, piValue, left, right);
  quicksort(piIndex, piValue, left, index - 1);
  quicksort(piIndex, piValue, index + 1, right);
}
```