user: What is the c source code of the assembly code below?

```asm
<qsort>:
  endbr64
  cmp    $0x1,%esi
  jle    L98
  push   %r15
  movslq %edx,%r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %r15d,%r12d
  imul   %esi,%r12d
  push   %rbp
  push   %rbx
  mov    %rcx,%rbx
  movslq %r12d,%r12
  sub    $0x18,%rsp
  lea    (%rdi,%r12,1),%rax
  mov    %rax,0x8(%rsp)
  mov    %rax,(%rsp)
  cmp    $0x3,%esi
  jg     L35
L118:
  lea    0x0(%r13,%r15,1),%r12
  mov    %r13,%rbp
  mov    %r12,%r14
  cmp    %r12,(%rsp)
  jbe    L145
  nopl   (%rax)
L18:
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   *%rbx
  test   %eax,%eax
  cmovg  %r14,%rbp
  add    %r15,%r14
  cmp    %r14,(%rsp)
  ja     L18
  cmp    %r13,%rbp
  je     L145
  cmp    %r12,%r13
  jae    L145
  nopl   0x0(%rax)
L7:
  movzbl 0x0(%rbp),%eax
  movzbl 0x0(%r13),%edx
  add    $0x1,%r13
  add    $0x1,%rbp
  mov    %dl,-0x1(%rbp)
  mov    %al,-0x1(%r13)
  cmp    %r12,%r13
  jne    L7
L145:
  cmp    %r12,0x8(%rsp)
  jbe    L28
  lea    -0x1(%r12,%r15,1),%rax
  mov    %r15,%r14
  mov    %rax,(%rsp)
  neg    %r14
  nopl   0x0(%rax,%rax,1)
L157:
  mov    %r12,%rbp
  nopl   0x0(%rax,%rax,1)
L102:
  mov    %rbp,%r13
  lea    0x0(%rbp,%r14,1),%rbp
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   *%rbx
  test   %eax,%eax
  jg     L102
  cmp    %r12,%r13
  jne    L54
L159:
  add    %r15,(%rsp)
  add    %r15,%r12
  cmp    %r12,0x8(%rsp)
  ja     L157
L28:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L54:
  mov    (%rsp),%rax
  mov    %rax,%rsi
  cmp    %r12,%rax
  jb     L159
  mov    %rax,%rdi
  movzbl (%rsi),%r9d
  lea    -0x1(%r12),%r10
  sub    %r15,%rdi
  mov    %rdi,%rax
  cmp    %rdi,%r13
  ja     L100
  nopl   0x0(%rax,%rax,1)
L78:
  mov    %rsi,%rdx
  nopl   0x0(%rax,%rax,1)
L91:
  movzbl (%rax),%ecx
  mov    %cl,(%rdx)
  mov    %rax,%rcx
  add    %r14,%rax
  sub    %r15,%rdx
  cmp    %rax,%r13
  jbe    L91
  sub    $0x1,%rsi
  mov    %r9b,(%rcx)
  sub    $0x1,%rdi
  cmp    %r10,%rsi
  je     L159
L186:
  movzbl (%rsi),%r9d
  mov    %rdi,%rax
  cmp    %rdi,%r13
  jbe    L78
L100:
  mov    %rsi,%rcx
  sub    $0x1,%rsi
  sub    $0x1,%rdi
  mov    %r9b,(%rcx)
  cmp    %r10,%rsi
  jne    L186
  jmp    L159
L35:
  lea    (%r15,%r15,2),%r9d
  mov    %rax,%rsi
  mov    %r15d,%ecx
  mov    %rbx,%rdx
  lea    0x0(,%r15,4),%ebp
  add    %r9d,%r9d
  xor    %eax,%eax
  mov    %ebp,%r8d
  movslq %ebp,%rbp
  call   <qst@plt>
  lea    0x0(%r13,%rbp,1),%rax
  mov    %rax,(%rsp)
  jmp    L118
L98:
  ret
```

assistant: ```c
void qsort(void *base, int n, int size, int (*compar)(void *, void *)) {
  register char c, *i, *j, *lo, *hi;
  char *min, *max;
  int thresh = size * 4;
  int mthresh = size * 6;
  if (n <= 1)
    return;
  max = (char *)base + n * size;
  if (n >= 4) {
    qst(base, max, compar, size, thresh, mthresh);
    hi = (char *)base + thresh;
  } else {
    hi = max;
  }
  for (j = lo = base; (lo += size) < hi;)
    if (compar(j, lo) > 0)
      j = lo;
  if (j != base) {
    for (i = (char *)base, hi = (char *)base + size; i < hi;) {
      c = *j;
      *j++ = *i;
      *i++ = c;
    }
  }
  for (min = base; (hi = min += size) < max;) {
    while (compar(hi -= size, min) > 0)
      ;
    if ((hi += size) != min) {
      for (lo = min + size; --lo >= min;) {
        c = *lo;
        for (i = j = lo; (j -= size) >= hi; i = j)
          *i = *j;
        *i = c;
      }
    }
  }
}
```