user: Please show me the C implementation that matches the assembly code listed below:

```asm
<quicksort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  movq   $0x0,-0x30(%rbp)
  mov    -0x50(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x58(%rbp),%rax
  imul   %rdx,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x50(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x20(%rbp)
  mov    %rax,%r10
  mov    $0x0,%r11d
  mov    %rax,%r8
  mov    $0x0,%r9d
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L59:
  cmp    %rdx,%rsp
  je     L6
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L59
L6:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L18
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L18:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x18(%rbp)
  movq   $0x0,-0x40(%rbp)
  mov    -0x18(%rbp),%rax
  mov    -0x40(%rbp),%rdx
  mov    -0x30(%rbp),%rcx
  mov    %rcx,(%rax,%rdx,8)
  addq   $0x1,-0x40(%rbp)
  mov    -0x18(%rbp),%rax
  mov    -0x40(%rbp),%rdx
  mov    -0x28(%rbp),%rcx
  mov    %rcx,(%rax,%rdx,8)
L41:
  mov    -0x40(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  mov    -0x18(%rbp),%rdx
  mov    (%rdx,%rax,8),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x40(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  mov    -0x18(%rbp),%rdx
  mov    (%rdx,%rax,8),%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x60(%rbp),%rdi
  mov    -0x28(%rbp),%rcx
  mov    -0x30(%rbp),%rdx
  mov    -0x58(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <partition@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x10(%rbp)
  jbe    L33
  addq   $0x1,-0x40(%rbp)
  mov    -0x18(%rbp),%rax
  mov    -0x40(%rbp),%rdx
  mov    -0x30(%rbp),%rcx
  mov    %rcx,(%rax,%rdx,8)
  addq   $0x1,-0x40(%rbp)
  mov    -0x10(%rbp),%rax
  sub    -0x58(%rbp),%rax
  mov    %rax,%rcx
  mov    -0x18(%rbp),%rax
  mov    -0x40(%rbp),%rdx
  mov    %rcx,(%rax,%rdx,8)
L33:
  mov    -0x10(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  cmp    %rax,-0x28(%rbp)
  jbe    L41
  addq   $0x1,-0x40(%rbp)
  mov    -0x10(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%rax
  mov    -0x40(%rbp),%rdx
  mov    %rcx,(%rax,%rdx,8)
  addq   $0x1,-0x40(%rbp)
  mov    -0x18(%rbp),%rax
  mov    -0x40(%rbp),%rdx
  mov    -0x28(%rbp),%rcx
  mov    %rcx,(%rax,%rdx,8)
  jmp    L41
```

assistant: ```c
void quicksort(void *array, size_t len, size_t size, int (*compare)(const void *, const void *)) {
  char *arr = (char *)array;
  size_t low = 0;
  size_t up = (len - 1) * size;
  size_t stack[len - 1];
  ssize_t top = 0;
  stack[top] = low;
  stack[++top] = up;
  size_t part;
  while (top >= 0) {
    up = stack[top--];
    low = stack[top--];
    part = partition(arr, size, low, up, compare);
    if (part > low + size) {
      stack[++top] = low;
      stack[++top] = part - size;
    }
    if (part + size < up) {
      stack[++top] = part + size;
      stack[++top] = up;
    }
  }
}
```