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

```asm
<quicksort>:
  endbr64
  push   %r15
  mov    %edx,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  mov    %edx,%esi
  push   %rbx
  or     %ebp,%eax
  shr    $0x1f,%eax
  sub    $0x48,%rsp
  test   %rdi,%rdi
  mov    %edx,0x10(%rsp)
  sete   %dl
  or     %al,%dl
  jne    L351
  mov    %rdi,%rbx
  cmp    %ebp,%esi
  jle    L351
L179:
  mov    0x10(%rsp),%edx
  mov    %rbx,%rdi
  mov    %ebp,%esi
  call   <partition@plt>
  lea    -0x1(%rax),%edi
  mov    %eax,0x20(%rsp)
  mov    %ebp,%eax
  mov    %edi,%edx
  shr    $0x1f,%eax
  mov    %edi,0x8(%rsp)
  shr    $0x1f,%edx
  or     %dl,%al
  jne    L177
  cmp    %ebp,%edi
  jle    L177
  mov    %ebp,%r15d
L92:
  mov    0x8(%rsp),%edx
  mov    %r15d,%esi
  mov    %rbx,%rdi
  call   <partition@plt>
  mov    %eax,0x24(%rsp)
  sub    $0x1,%eax
  mov    %eax,0xc(%rsp)
  cmp    %r15d,%eax
  jle    L338
  test   %eax,%eax
  js     L338
  mov    %r15d,%ebp
L211:
  mov    0xc(%rsp),%edx
  mov    %ebp,%esi
  mov    %rbx,%rdi
  call   <partition@plt>
  lea    -0x1(%rax),%r14d
  mov    %eax,0x28(%rsp)
  cmp    %ebp,%r14d
  jle    L359
  test   %r14d,%r14d
  js     L359
  mov    %r14d,%r12d
  mov    %ebp,%r13d
L189:
  mov    %r12d,%edx
  mov    %r13d,%esi
  mov    %rbx,%rdi
  call   <partition@plt>
  lea    -0x1(%rax),%r15d
  mov    %eax,0x2c(%rsp)
  cmp    %r13d,%r15d
  jle    L35
  test   %r15d,%r15d
  js     L35
  mov    %r12d,0x14(%rsp)
  mov    %r13d,%ebp
  mov    %rbx,%r13
L28:
  mov    %r15d,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <partition@plt>
  lea    -0x1(%rax),%r14d
  mov    %eax,0x30(%rsp)
  cmp    %ebp,%r14d
  jle    L60
  test   %r14d,%r14d
  js     L60
  mov    %r13,%rbx
  mov    %r14d,%r13d
L339:
  mov    %r13d,%edx
  mov    %ebp,%esi
  mov    %rbx,%rdi
  call   <partition@plt>
  lea    -0x1(%rax),%r14d
  mov    %eax,0x34(%rsp)
  cmp    %ebp,%r14d
  jle    L96
  test   %r14d,%r14d
  js     L96
  mov    %r15d,0x18(%rsp)
  mov    %r13d,0x1c(%rsp)
  mov    %rbx,%r13
L296:
  mov    %r14d,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <partition@plt>
  lea    -0x1(%rax),%r15d
  mov    %eax,%r12d
  cmp    %ebp,%r15d
  jle    L178
  test   %r15d,%r15d
  js     L178
  mov    %r14d,%ebx
  mov    %r15d,%r14d
L87:
  mov    %r14d,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <partition@plt>
  lea    -0x1(%rax),%r15d
  mov    %eax,%ecx
  cmp    %ebp,%r15d
  jle    L90
  test   %r15d,%r15d
  js     L90
  mov    %r14d,%r8d
  mov    %r12d,%r14d
  mov    %ebx,%r12d
  mov    %r15d,%ebx
L316:
  mov    %ebp,%esi
  mov    %ebx,%edx
  mov    %r13,%rdi
  mov    %ecx,0x3c(%rsp)
  mov    %r8d,0x38(%rsp)
  call   <partition@plt>
  mov    %ebp,%esi
  mov    %r13,%rdi
  mov    %eax,%r15d
  lea    -0x1(%rax),%edx
  call   <quicksort>
  lea    0x1(%r15),%ebp
  mov    0x38(%rsp),%r8d
  mov    0x3c(%rsp),%ecx
  cmp    %ebp,%ebx
  jle    L149
  test   %ebp,%ebp
  jns    L316
L149:
  mov    %r12d,%ebx
  mov    %r14d,%r12d
  mov    %r8d,%r14d
L90:
  add    $0x1,%ecx
  mov    %ecx,%ebp
  js     L187
  cmp    %ecx,%r14d
  jg     L87
L187:
  mov    %ebx,%r14d
L178:
  mov    %r12d,%ebp
  add    $0x1,%ebp
  js     L294
  cmp    %ebp,%r14d
  jg     L296
L294:
  mov    %r13,%rbx
  mov    0x18(%rsp),%r15d
  mov    0x1c(%rsp),%r13d
L96:
  mov    0x34(%rsp),%ebp
  add    $0x1,%ebp
  cmp    %ebp,%r13d
  jle    L352
  test   %ebp,%ebp
  jns    L339
L352:
  mov    %rbx,%r13
L60:
  mov    0x30(%rsp),%ebp
  add    $0x1,%ebp
  js     L4
  cmp    %ebp,%r15d
  jg     L28
L4:
  mov    0x14(%rsp),%r12d
  mov    %r13,%rbx
L35:
  mov    0x2c(%rsp),%r13d
  add    $0x1,%r13d
  js     L359
  cmp    %r13d,%r12d
  jg     L189
L359:
  mov    0x28(%rsp),%ebp
  add    $0x1,%ebp
  js     L338
  cmp    %ebp,0xc(%rsp)
  jg     L211
L338:
  mov    0x24(%rsp),%r15d
  add    $0x1,%r15d
  js     L177
  cmp    %r15d,0x8(%rsp)
  jg     L92
L177:
  mov    0x20(%rsp),%ebp
  add    $0x1,%ebp
  cmp    0x10(%rsp),%ebp
  jge    L351
  test   %ebp,%ebp
  jns    L179
L351:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void quicksort(char *array, int low, int high) {
  int partition_index;
  if (!array || (low < 0) || (high < 0)) {
    return;
  }
  if (low < high) {
    partition_index = partition(array, low, high);
    quicksort(array, low, partition_index - 1);
    quicksort(array, partition_index + 1, high);
  }
}
```