user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<quicksort>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %ecx,0x24(%rsp)
  cmp    %ecx,%edx
  jl     L14
L25:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L14:
  mov    %rdi,%rbp
  mov    %rsi,%r15
  mov    %edx,%r14d
  mov    %ecx,%ebx
  mov    %r8,%r12
  lea    -0x1(%rdx),%eax
  mov    %eax,0x20(%rsp)
  movslq %ecx,%r13
  imul   %rsi,%r13
  add    %rdi,%r13
  mov    $0x0,%eax
  call   <rand@plt>
  mov    %ebx,%ecx
  sub    %r14d,%ecx
  cltd
  idiv   %ecx
  add    %r14d,%edx
  mov    %ebx,%ecx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <exch@plt>
  movslq %r14d,%rax
  imul   %r15,%rax
  mov    %rax,%rcx
  add    %rbp,%rcx
  mov    %rcx,0x10(%rsp)
  mov    %ebx,0x2c(%rsp)
  mov    0x20(%rsp),%eax
  mov    %eax,0x28(%rsp)
  mov    %ebx,%ebp
  mov    %r15,(%rsp)
  jmp    L111
L5:
  cmp    %ebp,%r15d
  jge    L125
  mov    %ebp,%ecx
  mov    %r15d,%edx
  mov    (%rsp),%rsi
  mov    0x18(%rsp),%rdi
  call   <exch@plt>
  mov    %r13,%rsi
  mov    0x10(%rsp),%rdi
  call   *%r12
  test   %eax,%eax
  je     L98
L171:
  mov    0x8(%rsp),%rsi
  mov    %r13,%rdi
  call   *%r12
  test   %eax,%eax
  je     L130
L16:
  mov    (%rsp),%rdx
  add    %rdx,0x10(%rsp)
  mov    %r15d,0x20(%rsp)
L111:
  mov    0x20(%rsp),%eax
  lea    0x1(%rax),%r15d
  cmp    %r15d,0x24(%rsp)
  je     L67
  mov    %r13,%rsi
  mov    0x10(%rsp),%rdi
  call   *%r12
  test   %eax,%eax
  js     L16
L67:
  movslq %ebp,%rbx
  sub    $0x1,%rbx
  imul   (%rsp),%rbx
  add    0x18(%rsp),%rbx
L142:
  sub    $0x1,%ebp
  mov    %rbx,0x8(%rsp)
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   *%r12
  sub    (%rsp),%rbx
  test   %eax,%eax
  jns    L5
  cmp    %ebp,%r14d
  jne    L142
  jmp    L5
L98:
  addl   $0x1,0x28(%rsp)
  mov    0x28(%rsp),%eax
  mov    %r15d,%ecx
  mov    %eax,%edx
  mov    (%rsp),%rsi
  mov    0x18(%rsp),%rdi
  call   <exch@plt>
  jmp    L171
L130:
  subl   $0x1,0x2c(%rsp)
  mov    0x2c(%rsp),%eax
  mov    %eax,%ecx
  mov    %ebp,%edx
  mov    (%rsp),%rsi
  mov    0x18(%rsp),%rdi
  call   <exch@plt>
  jmp    L16
L125:
  mov    %r15d,%edx
  mov    (%rsp),%r15
  mov    0x24(%rsp),%ecx
  mov    %r15,%rsi
  mov    0x18(%rsp),%rdi
  call   <exch@plt>
  mov    0x20(%rsp),%eax
  lea    0x2(%rax),%r13d
  mov    0x28(%rsp),%ecx
  cmp    %r14d,%ecx
  jle    L80
  mov    %r14d,%ebx
  mov    %r13d,(%rsp)
  mov    %eax,0x8(%rsp)
  mov    %ecx,%ebp
  mov    0x18(%rsp),%r13
  mov    %r12,0x10(%rsp)
  mov    %eax,%r12d
L10:
  lea    (%r14,%r12,1),%ecx
  sub    %ebx,%ecx
  mov    %ebx,%edx
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <exch@plt>
  add    $0x1,%ebx
  cmp    %ebx,%ebp
  jne    L10
  mov    (%rsp),%r13d
  mov    0x8(%rsp),%ebp
  mov    0x10(%rsp),%r12
  mov    %r14d,%eax
  sub    0x28(%rsp),%eax
  add    %ebp,%eax
  mov    %eax,(%rsp)
L85:
  mov    0x24(%rsp),%eax
  lea    -0x1(%rax),%ebx
  mov    0x2c(%rsp),%ecx
  cmp    %ebx,%ecx
  jge    L48
  mov    0x20(%rsp),%edx
  lea    0x1(%rdx,%rax,1),%ebp
  mov    %r13d,0x8(%rsp)
  mov    0x18(%rsp),%r13
  mov    %r12,0x10(%rsp)
  mov    %ecx,%r12d
L141:
  mov    %ebp,%edx
  sub    %ebx,%edx
  mov    %ebx,%ecx
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <exch@plt>
  sub    $0x1,%ebx
  cmp    %ebx,%r12d
  jne    L141
  mov    0x8(%rsp),%r13d
  mov    0x10(%rsp),%r12
  mov    0x24(%rsp),%eax
  lea    -0x1(%r13,%rax,1),%eax
  sub    0x2c(%rsp),%eax
  mov    %eax,%r13d
L48:
  mov    %r12,%r8
  mov    (%rsp),%ecx
  mov    %r14d,%edx
  mov    %r15,%rsi
  mov    0x18(%rsp),%rbx
  mov    %rbx,%rdi
  call   <quicksort>
  mov    %r12,%r8
  mov    0x24(%rsp),%ecx
  mov    %r13d,%edx
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   <quicksort>
  jmp    L25
L80:
  mov    0x20(%rsp),%eax
  mov    %eax,(%rsp)
  jmp    L85
```

assistant: ```c
void quicksort(char *base, size_t size, ssize_t l, ssize_t r, int (*compar)(const void *, const void *)) {
  ssize_t i = l - 1, j = r, p = l - 1, q = r, k;
  char *v = base + r * size;
  if (r <= l)
    return;
  exch(base, size, l + (rand() % (r - l)), r);
  for (;;) {
    while (++i != r && compar(base + i * size, v) < 0)
      ;
    while (compar(v, base + (--j) * size) < 0)
      if (j == l)
        break;
    if (i >= j)
      break;
    exch(base, size, i, j);
    if (compar(base + i * size, v) == 0)
      exch(base, size, ++p, i);
    if (compar(v, base + j * size) == 0)
      exch(base, size, j, --q);
  }
  exch(base, size, i, r);
  j = i - 1;
  ++i;
  for (k = l; k < p; k++, j--)
    exch(base, size, k, j);
  for (k = r - 1; k > q; k--, i++)
    exch(base, size, i, k);
  quicksort(base, size, l, j, compar);
  quicksort(base, size, i, r, compar);
}
```