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
  mov    %rdx,%rbx
  sub    %rsi,%rbx
  sub    $0xc8,%rsp
  mov    %rdx,0xa0(%rsp)
  movq   $0x0,0x98(%rsp)
  cmp    $0x1,%rbx
  jle    L112
  mov    %rdi,%r15
  mov    %rsi,%r13
L9:
  mov    0xa0(%rsp),%rdx
  mov    %r13,%rsi
  mov    %r15,%rdi
  mov    %r13,%r14
  call   <partition@plt>
  lea    -0x1(%rbx),%rdx
  movq   $0x0,0x70(%rsp)
  mov    %rax,0x40(%rsp)
  sub    %r13,%rax
  mov    %r15,%r13
  mov    %rdx,0x60(%rsp)
  mov    %rax,%rbx
  cmp    $0x1,%rax
  jle    L105
L34:
  mov    0x40(%rsp),%rdx
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <partition@plt>
  lea    -0x1(%rbx),%rsi
  movq   $0x0,0x78(%rsp)
  mov    %rax,0x48(%rsp)
  sub    %r14,%rax
  mov    %rsi,0x68(%rsp)
  mov    %rax,%rbx
  cmp    $0x1,%rax
  jle    L158
  mov    %r14,%rax
  mov    %r13,%r14
  mov    %rax,%r13
L59:
  mov    0x48(%rsp),%rdx
  mov    %r13,%rsi
  mov    %r14,%rdi
  mov    %r13,%r15
  call   <partition@plt>
  lea    -0x1(%rbx),%rcx
  movq   $0x0,0x80(%rsp)
  mov    %rax,0x50(%rsp)
  sub    %r13,%rax
  mov    %rcx,0x90(%rsp)
  mov    %rax,%rbx
  cmp    $0x1,%rax
  jle    L170
L148:
  mov    0x50(%rsp),%rdx
  mov    %r15,%rsi
  mov    %r14,%rdi
  mov    %r15,%r12
  call   <partition@plt>
  lea    -0x1(%rbx),%rdx
  movq   $0x0,0x18(%rsp)
  mov    %rax,(%rsp)
  sub    %r15,%rax
  mov    %rdx,0x88(%rsp)
  mov    %rax,%rbx
  cmp    $0x1,%rax
  jle    L4
L8:
  mov    (%rsp),%rdx
  mov    %r12,%rsi
  mov    %r14,%rdi
  lea    -0x1(%rbx),%r15
  call   <partition@plt>
  movq   $0x0,0x8(%rsp)
  mov    %rax,%rbx
  mov    %rax,%r13
  sub    %r12,%rbx
  cmp    $0x1,%rbx
  jle    L82
  mov    %r15,0x30(%rsp)
  mov    %r14,%r15
  mov    %rax,%r14
L114:
  mov    %r12,%rsi
  mov    %r14,%rdx
  mov    %r15,%rdi
  call   <partition@plt>
  lea    -0x1(%rbx),%rsi
  movq   $0x0,0x28(%rsp)
  mov    %rax,0x20(%rsp)
  sub    %r12,%rax
  mov    %rsi,0x10(%rsp)
  cmp    $0x1,%rax
  jle    L138
  mov    %r14,0x38(%rsp)
  mov    %rax,%r13
  mov    %r15,%r14
L166:
  mov    0x20(%rsp),%rdx
  mov    %r12,%rsi
  mov    %r14,%rdi
  sub    $0x1,%r13
  xor    %ebp,%ebp
  call   <partition@plt>
  mov    %rax,%rbx
  mov    %rax,%r15
  sub    %r12,%rbx
  cmp    $0x1,%rbx
  jle    L23
  mov    %r13,0x58(%rsp)
  mov    %rbp,%r15
  mov    %r14,%r13
  mov    %r12,%rbp
  mov    %rax,%r14
L127:
  mov    %r14,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  sub    $0x1,%rbx
  call   <partition@plt>
  xor    %ecx,%ecx
  mov    %rax,%r8
  mov    %rax,%r12
  sub    %rbp,%r8
  cmp    $0x1,%r8
  jle    L46
  mov    %r15,%r9
  mov    %rbp,%r12
  mov    %rbx,%r15
  mov    %rax,%rbx
L164:
  mov    %r12,%rsi
  mov    %rbx,%rdx
  mov    %r13,%rdi
  mov    %rcx,0xb8(%rsp)
  mov    %r8,0xb0(%rsp)
  mov    %r9,0xa8(%rsp)
  call   <partition@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  mov    %rax,%rdx
  mov    %rax,%rbp
  call   <quicksort>
  mov    0xb0(%rsp),%r8
  mov    0xb8(%rsp),%rcx
  lea    0x1(%rbp),%r12
  mov    0xa8(%rsp),%r9
  lea    -0x1(%r8,%rax,1),%rax
  mov    %rbx,%r8
  sub    %r12,%r8
  add    %rax,%rcx
  cmp    $0x1,%r8
  jg     L164
  mov    %rbx,%r12
  mov    %r15,%rbx
  mov    %r9,%r15
  add    %rcx,%rbx
L46:
  lea    0x1(%r12),%rbp
  add    %rbx,%r15
  mov    %r14,%rbx
  sub    %rbp,%rbx
  cmp    $0x1,%rbx
  jg     L127
  mov    %r15,%rbp
  mov    %r14,%r15
  mov    %r13,%r14
  mov    0x58(%rsp),%r13
  add    %rbp,%r13
L23:
  add    %r13,0x28(%rsp)
  mov    0x20(%rsp),%r13
  lea    0x1(%r15),%r12
  sub    %r12,%r13
  cmp    $0x1,%r13
  jg     L166
  mov    0x28(%rsp),%rcx
  add    %rcx,0x10(%rsp)
  mov    %r14,%r15
  mov    0x38(%rsp),%r14
L138:
  mov    0x20(%rsp),%r12
  mov    %r14,%rbx
  mov    0x10(%rsp),%rdi
  add    %rdi,0x8(%rsp)
  add    $0x1,%r12
  sub    %r12,%rbx
  cmp    $0x1,%rbx
  jg     L114
  mov    %r14,%r13
  mov    %r15,%r14
  mov    0x30(%rsp),%r15
  add    0x8(%rsp),%r15
L82:
  mov    (%rsp),%rbx
  lea    0x1(%r13),%r12
  add    %r15,0x18(%rsp)
  sub    %r12,%rbx
  cmp    $0x1,%rbx
  jg     L8
  mov    0x18(%rsp),%rdi
  add    %rdi,0x88(%rsp)
L4:
  mov    (%rsp),%r15
  mov    0x50(%rsp),%rbx
  mov    0x88(%rsp),%rcx
  add    %rcx,0x80(%rsp)
  add    $0x1,%r15
  sub    %r15,%rbx
  cmp    $0x1,%rbx
  jg     L148
  mov    0x80(%rsp),%rsi
  add    %rsi,0x90(%rsp)
L170:
  mov    0x50(%rsp),%r13
  mov    0x48(%rsp),%rbx
  mov    0x90(%rsp),%rsi
  add    %rsi,0x78(%rsp)
  add    $0x1,%r13
  sub    %r13,%rbx
  cmp    $0x1,%rbx
  jg     L59
  mov    0x78(%rsp),%rdi
  add    %rdi,0x68(%rsp)
  mov    %r14,%r13
L158:
  mov    0x48(%rsp),%r14
  mov    0x40(%rsp),%rbx
  mov    0x68(%rsp),%rdi
  add    %rdi,0x70(%rsp)
  add    $0x1,%r14
  sub    %r14,%rbx
  cmp    $0x1,%rbx
  jg     L34
  mov    0x70(%rsp),%rdx
  add    %rdx,0x60(%rsp)
  mov    %r13,%r15
L105:
  mov    0x40(%rsp),%r13
  mov    0xa0(%rsp),%rbx
  mov    0x60(%rsp),%rcx
  add    %rcx,0x98(%rsp)
  add    $0x1,%r13
  sub    %r13,%rbx
  cmp    $0x1,%rbx
  jg     L9
L112:
  mov    0x98(%rsp),%rax
  add    $0xc8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
long int quicksort(long int inputArray[], long int left, long int right) {
  long int p, lc, rc, count = 0;
  if (right - left <= 1)
    return 0;
  else {
    p = partition(inputArray, left, right);
    count = right - left - 1;
    lc = quicksort(inputArray, left, p);
    rc = quicksort(inputArray, p + 1, right);
    return count + lc + rc;
  }
}
```