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

```asm
<quickSort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r12
  mov    %esi,%ebx
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %esi,%rdx
  shl    $0x2,%rdx
  lea    0xf(%rdx),%rax
  mov    %rax,%rsi
  and    $0xfffffffffffffff0,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L79:
  cmp    %rcx,%rsp
  je     L62
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L79
L62:
  mov    %rsi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L241
  orq    $0x0,-0x8(%rsp,%rax,1)
L241:
  mov    %rsp,%r13
  lea    0xf(%rdx),%rax
  mov    %rax,%rsi
  and    $0xfffffffffffffff0,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L253:
  cmp    %rcx,%rsp
  je     L122
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L253
L122:
  mov    %rsi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L21
  orq    $0x0,-0x8(%rsp,%rax,1)
L21:
  mov    %rsp,%r15
  lea    0xf(%rdx),%rax
  mov    %rax,%rsi
  and    $0xfffffffffffffff0,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L168:
  cmp    %rcx,%rsp
  je     L231
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L168
L231:
  mov    %rsi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L4
  orq    $0x0,-0x8(%rsp,%rax,1)
L4:
  mov    %rsp,%r14
  cmp    $0x1,%ebx
  jle    L244
  mov    -0x4(%r12,%rdx,1),%edx
  mov    %ebx,%eax
  sar    $0x2,%eax
  cltq
  mov    (%r12,%rax,4),%esi
  mov    (%r12),%edi
  call   <findMedian@plt>
  lea    -0x1(%rbx),%edx
  movslq %edx,%rdx
  movl   $0x0,-0x44(%rbp)
  movl   $0x0,-0x48(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L177
L237:
  jle    L165
  mov    -0x44(%rbp),%edi
  movslq %edi,%rsi
  mov    %ecx,(%r14,%rsi,4)
  add    $0x1,%edi
  mov    %edi,-0x44(%rbp)
L186:
  sub    $0x1,%rdx
  test   %edx,%edx
  js     L22
L177:
  mov    (%r12,%rdx,4),%ecx
  cmp    %eax,%ecx
  jge    L237
  mov    -0x4c(%rbp),%edi
  movslq %edi,%rsi
  mov    %ecx,0x0(%r13,%rsi,4)
  add    $0x1,%edi
  mov    %edi,-0x4c(%rbp)
  jmp    L186
L165:
  mov    -0x48(%rbp),%edi
  movslq %edi,%rsi
  mov    %ecx,(%r15,%rsi,4)
  add    $0x1,%edi
  mov    %edi,-0x48(%rbp)
  jmp    L186
L22:
  mov    -0x4c(%rbp),%esi
  mov    %r13,%rdi
  call   <quickSort>
  mov    -0x44(%rbp),%esi
  mov    %r14,%rdi
  call   <quickSort>
  mov    -0x4c(%rbp),%eax
  cmp    %ebx,%eax
  mov    %eax,%edx
  cmovg  %ebx,%edx
  test   %edx,%edx
  jle    L150
  mov    %edx,%esi
  mov    $0x0,%eax
L47:
  mov    0x0(%r13,%rax,4),%ecx
  mov    %ecx,(%r12,%rax,4)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L47
L112:
  cmpl   $0x0,-0x48(%rbp)
  jle    L188
  cmp    %edx,%ebx
  jle    L188
  movslq %edx,%rax
  lea    (%r12,%rax,4),%rdi
  mov    $0x1,%eax
L36:
  mov    -0x4(%r15,%rax,4),%ecx
  mov    %ecx,-0x4(%rdi,%rax,4)
  add    $0x1,%edx
  cmp    %eax,-0x48(%rbp)
  setg   %sil
  cmp    %edx,%ebx
  setg   %cl
  add    $0x1,%rax
  test   %cl,%sil
  jne    L36
L188:
  cmpl   $0x0,-0x44(%rbp)
  jle    L244
  cmp    %edx,%ebx
  jle    L244
  movslq %edx,%rax
  lea    (%r12,%rax,4),%rdi
  mov    $0x1,%eax
L81:
  mov    -0x4(%r14,%rax,4),%ecx
  mov    %ecx,-0x4(%rdi,%rax,4)
  lea    (%rdx,%rax,1),%ecx
  cmp    %eax,-0x44(%rbp)
  setg   %sil
  cmp    %ebx,%ecx
  setl   %cl
  add    $0x1,%rax
  test   %cl,%sil
  jne    L81
L244:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L102
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L150:
  mov    $0x0,%edx
  jmp    L112
L102:
  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];
  }
}
```