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

```asm
<quicksort_recursive>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    %ecx,-0x34(%rbp)
  mov    -0x2c(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x30(%rbp)
  jle    L13
  mov    -0x30(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x30(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L44
L52:
  cmpl   $0x0,-0x34(%rbp)
  je     L100
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  setg   %al
  jmp    L108
L100:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  setl   %al
L108:
  test   %al,%al
  je     L78
  addl   $0x1,-0x14(%rbp)
  jmp    L44
L78:
  cmpl   $0x0,-0x34(%rbp)
  je     L23
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  setl   %al
  jmp    L73
L23:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x8(%rbp)
  setg   %al
L73:
  test   %al,%al
  je     L99
  subl   $0x1,-0x10(%rbp)
  jmp    L44
L99:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x14(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
L44:
  mov    -0x14(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jle    L52
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edi
  mov    -0x34(%rbp),%edx
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %edx,%ecx
  mov    %edi,%edx
  mov    %rax,%rdi
  call   <quicksort_recursive>
  mov    -0x34(%rbp),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x14(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <quicksort_recursive>
L13:
  nop
  leave
  ret
```

assistant: ```c
void quicksort_recursive(int *array, int begin, int end, int isAscending) {
  if (end > begin + 1) {
    int midPoint = (end + begin) / 2;
    int pivot = array[midPoint];
    int left = begin;
    int right = end - 1;
    while (left <= right) {
      if (isAscending ? array[left] < pivot : array[left] > pivot) {
        left++;
      } else if (isAscending ? array[right] > pivot : array[right] < pivot) {
        right--;
      } else {
        int t = array[left];
        array[left++] = array[right];
        array[right--] = t;
      }
    }
    quicksort_recursive(array, begin, right + 1, isAscending);
    quicksort_recursive(array, left, end, isAscending);
  }
}
```