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

```asm
<zqSort>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %esi,0xc(%rsp)
  cmp    $0x2,%esi
  jbe    L140
L19:
  mov    0xc(%rsp),%ecx
  mov    %r14,%rdx
  lea    -0x1(%rcx),%eax
  lea    (%r15,%rax,8),%rbx
  mov    %ecx,%eax
  shr    %eax
  mov    %rbx,%rsi
  lea    (%r15,%rax,8),%rbp
  mov    %rbp,%rdi
  call   *%r12
  test   %eax,%eax
  jle    L205
  mov    0x0(%rbp),%rax
  mov    (%rbx),%rdx
  mov    %rdx,0x0(%rbp)
  mov    %rax,(%rbx)
L205:
  mov    %r14,%rdx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   *%r12
  test   %eax,%eax
  jle    L136
  mov    0x0(%rbp),%rax
  mov    (%r15),%rdx
  mov    %rdx,0x0(%rbp)
  mov    %rax,(%r15)
L231:
  cmpl   $0x3,0xc(%rsp)
  je     L20
L157:
  lea    0x8(%r15),%rbp
  mov    %rbp,%r13
  nopl   (%rax)
L3:
  mov    %r14,%rdx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   *%r12
  test   %eax,%eax
  jg     L53
L225:
  jne    L133
  mov    0x0(%r13),%rdx
  mov    0x0(%rbp),%rax
  add    $0x8,%r13
  mov    %rdx,0x0(%rbp)
  mov    %rax,-0x8(%r13)
L133:
  cmp    %rbx,%rbp
  jae    L41
  add    $0x8,%rbp
  mov    %r14,%rdx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   *%r12
  test   %eax,%eax
  jle    L225
L53:
  cmp    %rbx,%rbp
  jb     L236
  jmp    L41
  cs nopw 0x0(%rax,%rax,1)
L85:
  sub    $0x8,%rbx
  cmp    %rbx,%rbp
  jae    L41
L236:
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   *%r12
  test   %eax,%eax
  js     L85
  mov    0x0(%rbp),%rax
  mov    (%rbx),%rdx
  mov    %rdx,0x0(%rbp)
  mov    %rax,(%rbx)
  je     L135
  add    $0x8,%rbp
  sub    $0x8,%rbx
L135:
  cmp    %rbx,%rbp
  jb     L3
  nopw   0x0(%rax,%rax,1)
L41:
  mov    %r14,%rdx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   *%r12
  test   %eax,%eax
  jle    L235
  lea    -0x8(%rbp),%rax
L0:
  cmp    %r15,%r13
  jbe    L307
  mov    %r15,%rdx
  jmp    L248
  nopw   0x0(%rax,%rax,1)
L31:
  mov    (%rax),%rsi
  mov    (%rdx),%rcx
  add    $0x8,%rdx
  sub    $0x8,%rax
  mov    %rsi,-0x8(%rdx)
  mov    %rcx,0x8(%rax)
  cmp    %rdx,%r13
  jbe    L307
L248:
  cmp    %rax,%r13
  jbe    L31
L307:
  mov    %rbp,%rax
  sub    %r13,%rax
  sar    $0x3,%rax
  mov    %rax,%r13
  mov    0xc(%rsp),%eax
  lea    (%r15,%rax,8),%rbx
  sub    %rbp,%rbx
  sar    $0x3,%rbx
  mov    %ebx,%esi
  cmp    %ebx,%r13d
  ja     L181
  mov    %r14,%rcx
  mov    %r12,%rdx
  mov    %r13d,%esi
  mov    %r15,%rdi
  call   <zqSort>
  cmp    $0x2,%ebx
  jbe    L73
  mov    %ebx,%r9d
  mov    %rbp,%r15
L278:
  mov    %r9d,0xc(%rsp)
  jmp    L19
L181:
  mov    %r14,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rdi
  mov    %r13d,0xc(%rsp)
  call   <zqSort>
  cmp    $0x2,%r13d
  mov    0xc(%rsp),%r9d
  ja     L278
L48:
  cmp    $0x2,%r9d
  je     L70
L148:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L136:
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   *%r12
  test   %eax,%eax
  jle    L231
  mov    (%r15),%rax
  mov    (%rbx),%rdx
  cmpl   $0x3,0xc(%rsp)
  mov    %rdx,(%r15)
  mov    %rax,(%rbx)
  jne    L157
L20:
  mov    (%r15),%rax
  mov    0x0(%rbp),%rdx
  mov    %rdx,(%r15)
  mov    %rax,0x0(%rbp)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L235:
  mov    %rbp,%rax
  add    $0x8,%rbp
  jmp    L0
L70:
  lea    0x8(%r15),%rsi
  mov    %r14,%rdx
  mov    %r15,%rdi
  call   *%r12
  test   %eax,%eax
  jle    L148
  movdqu (%r15),%xmm0
  shufpd $0x1,%xmm0,%xmm0
  movups %xmm0,(%r15)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L140:
  mov    %esi,%r9d
  cmp    $0x2,%r9d
  jne    L148
  jmp    L70
L73:
  mov    %rbp,%r15
  mov    %ebx,%r9d
  jmp    L48
```

assistant: ```c
void zqSort(void *base, unsigned nElem, int (*Fcmp)(void *, void *, void *), void *pG) {
  long *pivotP, *leftP, *rightP, *pivotEnd, *pivotTemp, *leftTemp;
  unsigned lNum;
  int retval;
  pivotP = (long *)base;
  while (1) {
    if (nElem <= 2) {
      if (nElem == 2) {
        if (Fcmp(pivotP, rightP = 1 + pivotP, pG) > 0) {
          long t = *(pivotP);
          *(pivotP) = *(rightP);
          *(rightP) = t;
        };
      }
      return;
    }
    rightP = (nElem - 1) + pivotP;
    leftP = (nElem >> 1) + pivotP;
    if (Fcmp(leftP, rightP, pG) > 0) {
      {
        long t = *(leftP);
        *(leftP) = *(rightP);
        *(rightP) = t;
      };
    }
    if (Fcmp(leftP, pivotP, pG) > 0) {
      {
        long t = *(leftP);
        *(leftP) = *(pivotP);
        *(pivotP) = t;
      };
    } else if (Fcmp(pivotP, rightP, pG) > 0) {
      {
        long t = *(pivotP);
        *(pivotP) = *(rightP);
        *(rightP) = t;
      };
    }
    if (nElem == 3) {
      {
        long t = *(pivotP);
        *(pivotP) = *(leftP);
        *(leftP) = t;
      };
      return;
    }
    leftP = pivotEnd = pivotP + 1;
    do {
      while ((retval = Fcmp(leftP, pivotP, pG)) <= 0) {
        if (retval == 0) {
          {
            long t = *(leftP);
            *(leftP) = *(pivotEnd);
            *(pivotEnd) = t;
          };
          pivotEnd++;
        }
        if (leftP < rightP)
          leftP++;
        else
          goto qBreak;
      }
      while (leftP < rightP) {
        if ((retval = Fcmp(pivotP, rightP, pG)) < 0)
          rightP--;
        else {
          {
            long t = *(leftP);
            *(leftP) = *(rightP);
            *(rightP) = t;
          };
          if (retval != 0) {
            leftP++;
            rightP--;
          }
          break;
        }
      }
    } while (leftP < rightP);
  qBreak:
    if (Fcmp(leftP, pivotP, pG) <= 0)
      leftP = leftP + 1;
    leftTemp = leftP - 1;
    pivotTemp = pivotP;
    while ((pivotTemp < pivotEnd) && (leftTemp >= pivotEnd)) {
      {
        long t = *(pivotTemp);
        *(pivotTemp) = *(leftTemp);
        *(leftTemp) = t;
      };
      pivotTemp++;
      leftTemp--;
    }
    lNum = (leftP - pivotEnd);
    nElem = ((nElem + pivotP) - leftP);
    if (nElem < lNum) {
      zqSort(leftP, nElem, Fcmp, pG);
      nElem = lNum;
    } else {
      zqSort(pivotP, lNum, Fcmp, pG);
      pivotP = leftP;
    }
  }
}
```