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

```asm
<qsort>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x4000(%rsp),%r11
L85:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L85
  sub    $0xe68,%rsp
  mov    %esi,0x2c(%rsp)
  mov    %r9,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x4e58(%rsp)
  xor    %eax,%eax
  cmp    %edx,%esi
  jl     L10
L46:
  mov    0x4e58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L112
  add    $0x4e68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L10:
  mov    %rdi,%rbp
  mov    %edx,%r12d
  mov    %ecx,%r13d
  mov    %r8d,%r14d
  mov    %esi,%ebx
  lea    (%rsi,%rdx,1),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %eax,%edx
  sar    %edx
  call   <swap@plt>
  mov    %ebx,%ecx
  lea    0x1(%rbx),%ebx
  cmp    %ebx,%r12d
  jl     L83
  movslq %ecx,%rax
  lea    0x0(%rbp,%rax,8),%r15
  movslq %ebx,%rbx
  mov    %ecx,0x28(%rsp)
  lea    0x30(%rsp),%rax
  mov    %rax,0x18(%rsp)
  jmp    L105
L14:
  mov    0x0(%rbp,%rbx,8),%rdi
  mov    0x18(%rsp),%rsi
  call   <strtolower@plt>
  lea    0x2740(%rsp),%rax
  mov    %rax,0x20(%rsp)
  mov    %rax,%rsi
  mov    (%r15),%rdi
  call   <strtolower@plt>
  mov    0x20(%rsp),%rsi
  mov    0x18(%rsp),%rdi
  jmp    L115
L44:
  addl   $0x1,0x28(%rsp)
  mov    0x28(%rsp),%eax
  mov    0xc(%rsp),%edx
  mov    %eax,%esi
  mov    %rbp,%rdi
  call   <swap@plt>
  jmp    L99
L83:
  mov    0x2c(%rsp),%eax
  mov    %eax,0x28(%rsp)
L120:
  mov    0x28(%rsp),%ebx
  mov    %ebx,%edx
  mov    0x2c(%rsp),%esi
  mov    %rbp,%rdi
  call   <swap@plt>
  lea    -0x1(%rbx),%edx
  mov    0x10(%rsp),%r15
  mov    %r15,%r9
  mov    %r14d,%r8d
  mov    %r13d,%ecx
  mov    0x2c(%rsp),%esi
  mov    %rbp,%rdi
  call   <qsort>
  lea    0x1(%rbx),%esi
  mov    %r15,%r9
  mov    %r14d,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %rbp,%rdi
  call   <qsort>
  jmp    L46
L98:
  mov    0x10(%rsp),%rax
  call   *%rax
  test   %eax,%eax
  js     L44
L99:
  add    $0x1,%rbx
  cmp    %ebx,%r12d
  jl     L120
L105:
  mov    %ebx,0xc(%rsp)
  test   %r14d,%r14d
  jne    L14
  mov    0x0(%rbp,%rbx,8),%rdi
  mov    (%r15),%rsi
L115:
  test   %r13d,%r13d
  je     L98
  mov    0x10(%rsp),%rax
  call   *%rax
  test   %eax,%eax
  jle    L99
  addl   $0x1,0x28(%rsp)
  mov    0x28(%rsp),%eax
  mov    0xc(%rsp),%edx
  mov    %eax,%esi
  mov    %rbp,%rdi
  call   <swap@plt>
  jmp    L99
L112:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void qsort(void *v[], int left, int right, int reverse, int foldcase, int (*comp)(void *, void *)) {
  int i, last;
  void swap(void *v[], int, int);
  char s1[10000], s2[10000];
  if (left >= right)
    return;
  swap(v, left, (left + right) / 2);
  last = left;
  for (i = left + 1; i <= right; i++) {
    char *vi;
    char *vleft;
    if (foldcase) {
      strtolower(v[i], s1);
      vi = s1;
      strtolower(v[left], s2);
      vleft = s2;
    } else {
      vi = v[i];
      vleft = v[left];
    }
    if (reverse && ((*comp)(vi, vleft) > 0))
      swap(v, ++last, i);
    else if (!reverse && ((*comp)(vi, vleft) < 0))
      swap(v, ++last, i);
  }
  swap(v, left, last);
  qsort(v, left, last - 1, reverse, foldcase, comp);
  qsort(v, last + 1, right, reverse, foldcase, comp);
}
```