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

```asm
<quickSort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %esi,%r12d
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %esi,%rax
  mov    %rsp,%rsi
  shl    $0x2,%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rdi
  mov    %rdx,%rcx
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rcx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L182
L75:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L75
L182:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L93
L23:
  mov    %rdx,%rdi
  mov    %rsp,%rsi
  mov    %rdx,%rcx
  mov    %rsp,%r9
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rcx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L31
L191:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L191
L31:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L29
L255:
  mov    %rdx,%rcx
  mov    %rsp,%rsi
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%r8
  sub    %rdx,%rsi
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L257
L151:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L151
L257:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  je     L21
  orq    $0x0,-0x8(%rsp,%rcx,1)
L21:
  mov    %rsp,%rcx
  mov    %r8,-0x58(%rbp)
  mov    %r9,-0x50(%rbp)
  mov    %rcx,-0x48(%rbp)
  cmp    $0x1,%r12d
  jg     L39
  nopl   0x0(%rax,%rax,1)
L232:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L210
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L93:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L23
  nopl   0x0(%rax,%rax,1)
L29:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L255
L39:
  mov    -0x4(%r13,%rax,1),%edx
  mov    %r12d,%eax
  mov    0x0(%r13),%edi
  xor    %r14d,%r14d
  sar    $0x2,%eax
  xor    %r15d,%r15d
  xor    %ebx,%ebx
  cltq
  mov    0x0(%r13,%rax,4),%esi
  call   <findMedian@plt>
  mov    -0x58(%rbp),%r8
  mov    -0x50(%rbp),%r9
  mov    %eax,%esi
  lea    -0x1(%r12),%eax
  mov    -0x48(%rbp),%rcx
  cltq
  jmp    L33
  nopl   (%rax)
L158:
  movslq %ebx,%rdi
  add    $0x1,%ebx
  mov    %edx,(%r9,%rdi,4)
L212:
  sub    $0x1,%rax
  cmp    $0xffffffff,%eax
  je     L63
L33:
  mov    0x0(%r13,%rax,4),%edx
  cmp    %esi,%edx
  jl     L158
  jle    L209
  movslq %r14d,%rdi
  sub    $0x1,%rax
  add    $0x1,%r14d
  mov    %edx,(%rcx,%rdi,4)
  cmp    $0xffffffff,%eax
  jne    L33
L63:
  mov    %ebx,%esi
  mov    %r9,%rdi
  mov    %rcx,-0x48(%rbp)
  mov    %r8,-0x50(%rbp)
  mov    %r9,-0x58(%rbp)
  call   <quickSort>
  mov    -0x48(%rbp),%rdi
  mov    %r14d,%esi
  call   <quickSort>
  cmp    %r12d,%ebx
  mov    -0x48(%rbp),%rcx
  mov    -0x50(%rbp),%r8
  cmovg  %r12d,%ebx
  test   %ebx,%ebx
  je     L100
  mov    -0x58(%rbp),%rsi
  movslq %ebx,%rdx
  mov    %r13,%rdi
  mov    %rcx,-0x50(%rbp)
  shl    $0x2,%rdx
  mov    %r8,-0x48(%rbp)
  call   <memcpy@plt>
  mov    -0x50(%rbp),%rcx
  mov    -0x48(%rbp),%r8
L100:
  cmp    %ebx,%r12d
  setg   %al
  mov    %eax,%edx
  test   %r15d,%r15d
  jle    L165
  test   %al,%al
  je     L165
  movslq %ebx,%rax
  lea    0x0(%r13,%rax,4),%rdi
  mov    $0x1,%eax
  nopl   0x0(%rax,%rax,1)
L247:
  mov    -0x4(%r8,%rax,4),%edx
  add    $0x1,%ebx
  cmp    %ebx,%r12d
  mov    %edx,-0x4(%rdi,%rax,4)
  setg   %dl
  cmp    %eax,%r15d
  setg   %sil
  add    $0x1,%rax
  test   %dl,%sil
  jne    L247
L165:
  test   %r14d,%r14d
  jle    L232
  test   %dl,%dl
  je     L232
  movslq %ebx,%rax
  lea    0x0(%r13,%rax,4),%rdi
  mov    $0x1,%eax
L98:
  mov    -0x4(%rcx,%rax,4),%edx
  cmp    %eax,%r14d
  setg   %sil
  mov    %edx,-0x4(%rdi,%rax,4)
  lea    (%rbx,%rax,1),%edx
  cmp    %r12d,%edx
  setl   %dl
  add    $0x1,%rax
  test   %dl,%sil
  jne    L98
  jmp    L232
  cs nopw 0x0(%rax,%rax,1)
L209:
  movslq %r15d,%rdi
  add    $0x1,%r15d
  mov    %edx,(%r8,%rdi,4)
  jmp    L212
L210:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void quickSort(int *array, int length) {
  int pivot;
  int less[length];
  int lessLen = 0;
  int equal[length];
  int equalLen = 0;
  int greater[length];
  int greaterLen = 0;
  int i = length >> 2;
  int first, middle, last;
  if (length > 1) {
    first = array[0];
    middle = array[i];
    last = array[length - 1];
    pivot = findMedian(first, middle, last);
    for (i = length - 1; i >= 0; --i) {
      if (array[i] < pivot) {
        less[lessLen] = array[i];
        ++lessLen;
      } else if (array[i] > pivot) {
        greater[greaterLen] = array[i];
        ++greaterLen;
      } else {
        equal[equalLen] = array[i];
        ++equalLen;
      }
    }
    quickSort(less, lessLen);
    quickSort(greater, greaterLen);
    for (i = 0; i < lessLen && i < length; ++i)
      array[i] = less[i];
    for (int j = 0; j < equalLen && i < length; ++i, ++j)
      array[i] = equal[j];
    for (int k = 0; k < greaterLen && i < length; ++i, ++k)
      array[i] = greater[k];
  }
}
```