user: 请将以下的汇编代码转换成C语言代码：

```asm
<qsort>:
  endbr64
  cmp    $0x1,%esi
  jle    L166
  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
  lea    (%rdi,%r12,1),%rax
  sub    $0x18,%rsp
  mov    %rax,0x8(%rsp)
  mov    %rax,%r14
  cmp    $0x3,%esi
  jg     L177
L175:
  lea    0x0(%r13,%r15,1),%rax
  mov    %r13,%rbp
  mov    %rax,(%rsp)
  mov    %rax,%r12
  cmp    %rax,%r14
  jbe    L248
  nopl   0x0(%rax,%rax,1)
L309:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   *%rbx
  test   %eax,%eax
  cmovg  %r12,%rbp
  add    %r15,%r12
  cmp    %r12,%r14
  ja     L309
  cmp    %r13,%rbp
  je     L248
  cmp    (%rsp),%r13
  jae    L248
  lea    0xf(%rbp),%rax
  lea    -0x1(%r15),%rdx
  sub    %r13,%rax
  cmp    $0x1e,%rax
  jbe    L265
  cmp    $0x6,%rdx
  jbe    L265
  cmp    $0xe,%rdx
  mov    %r15,%rdx
  jbe    L182
  and    $0xfffffffffffffff0,%rdx
  xor    %eax,%eax
L15:
  movdqu 0x0(%rbp,%rax,1),%xmm0
  movdqu 0x0(%r13,%rax,1),%xmm1
  movups %xmm1,0x0(%rbp,%rax,1)
  movups %xmm0,0x0(%r13,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L15
  mov    %r15,%rsi
  and    $0xfffffffffffffff0,%rsi
  lea    0x0(%r13,%rsi,1),%rax
  lea    0x0(%rbp,%rsi,1),%rcx
  mov    %rax,%r10
  mov    %rcx,%rbp
  cmp    %rsi,%r15
  je     L248
  mov    %r15,%rdx
  sub    %rsi,%rdx
  lea    -0x1(%rdx),%rsi
  cmp    $0x6,%rsi
  jbe    L136
L290:
  mov    (%rax),%rdi
  mov    (%rcx),%rsi
  mov    %rdi,(%rcx)
  mov    %rsi,(%rax)
  mov    %rdx,%rax
  and    $0xfffffffffffffff8,%rax
  add    %rax,%r10
  add    %rax,%rbp
  cmp    %rax,%rdx
  je     L248
L136:
  movzbl 0x0(%rbp),%eax
  movzbl (%r10),%edx
  mov    (%rsp),%rdi
  mov    %dl,0x0(%rbp)
  mov    %al,(%r10)
  lea    0x1(%r10),%rax
  cmp    %rax,%rdi
  jbe    L248
  movzbl 0x1(%rbp),%eax
  movzbl 0x1(%r10),%edx
  mov    %dl,0x1(%rbp)
  mov    %al,0x1(%r10)
  lea    0x2(%r10),%rax
  cmp    %rax,%rdi
  jbe    L248
  movzbl 0x2(%rbp),%eax
  movzbl 0x2(%r10),%edx
  mov    %dl,0x2(%rbp)
  mov    %al,0x2(%r10)
  lea    0x3(%r10),%rax
  cmp    %rax,%rdi
  jbe    L248
  movzbl 0x3(%rbp),%eax
  movzbl 0x3(%r10),%edx
  mov    %dl,0x3(%rbp)
  mov    %al,0x3(%r10)
  lea    0x4(%r10),%rax
  cmp    %rax,%rdi
  jbe    L248
  movzbl 0x4(%rbp),%eax
  movzbl 0x4(%r10),%edx
  mov    %dl,0x4(%rbp)
  mov    %al,0x4(%r10)
  lea    0x5(%r10),%rax
  cmp    %rax,%rdi
  jbe    L248
  movzbl 0x5(%rbp),%eax
  movzbl 0x5(%r10),%edx
  mov    %dl,0x5(%rbp)
  mov    %al,0x5(%r10)
  lea    0x6(%r10),%rax
  cmp    %rax,%rdi
  jbe    L248
  movzbl 0x6(%rbp),%eax
  movzbl 0x6(%r10),%edx
  mov    %dl,0x6(%rbp)
  mov    %al,0x6(%r10)
L248:
  mov    (%rsp),%rdi
  cmp    %rdi,0x8(%rsp)
  jbe    L59
  lea    -0x1(%r15,%rdi,1),%rax
  mov    %r15,%r14
  mov    %rdi,%r12
  mov    %rax,(%rsp)
  neg    %r14
  nopw   0x0(%rax,%rax,1)
L34:
  mov    %r12,%rbp
  nopl   0x0(%rax,%rax,1)
L20:
  mov    %rbp,%r13
  lea    0x0(%rbp,%r14,1),%rbp
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   *%rbx
  test   %eax,%eax
  jg     L20
  cmp    %r12,%r13
  jne    L264
L276:
  add    %r15,(%rsp)
  add    %r15,%r12
  cmp    %r12,0x8(%rsp)
  ja     L34
L59:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L264:
  mov    (%rsp),%rax
  mov    %rax,%rsi
  cmp    %r12,%rax
  jb     L276
  mov    %rax,%rdi
  movzbl (%rsi),%r9d
  lea    -0x1(%r12),%r10
  sub    %r15,%rdi
  mov    %rdi,%rax
  cmp    %rdi,%r13
  ja     L224
  nopl   0x0(%rax,%rax,1)
L333:
  mov    %rsi,%rdx
  nopl   0x0(%rax,%rax,1)
L54:
  movzbl (%rax),%ecx
  mov    %cl,(%rdx)
  mov    %rax,%rcx
  add    %r14,%rax
  sub    %r15,%rdx
  cmp    %rax,%r13
  jbe    L54
  sub    $0x1,%rsi
  mov    %r9b,(%rcx)
  sub    $0x1,%rdi
  cmp    %r10,%rsi
  je     L276
L310:
  movzbl (%rsi),%r9d
  mov    %rdi,%rax
  cmp    %rdi,%r13
  jbe    L333
L224:
  mov    %rsi,%rcx
  sub    $0x1,%rsi
  sub    $0x1,%rdi
  mov    %r9b,(%rcx)
  cmp    %r10,%rsi
  jne    L310
  jmp    L276
L177:
  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),%r14
  jmp    L175
L166:
  ret
L265:
  lea    0x0(%rbp,%r15,1),%rcx
L90:
  movzbl 0x0(%rbp),%eax
  movzbl 0x0(%r13),%edx
  add    $0x1,%rbp
  add    $0x1,%r13
  mov    %dl,-0x1(%rbp)
  mov    %al,-0x1(%r13)
  cmp    %rcx,%rbp
  jne    L90
  jmp    L248
L182:
  mov    %r13,%r10
  mov    %r13,%rax
  mov    %rbp,%rcx
  jmp    L290
```

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;
      }
    }
  }
}
```