user: What is the c source code of the assembly code below?

```asm
<_pqsort>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%r13
  mov    %rsi,0x10(%rsp)
  mov    %rdx,(%rsp)
  mov    %rcx,%r14
  mov    %r8,0x20(%rsp)
  mov    %r9,0x28(%rsp)
  jmp    L367
L455:
  cmpq   $0x8,(%rsp)
  setne  %r15b
  movzbl %r15b,%r15d
  jmp    L94
L396:
  mov    (%rsp),%rcx
  lea    0x0(%r13,%rcx,1),%r12
  mov    0x10(%rsp),%rax
  imul   %rcx,%rax
  add    %r13,%rax
  mov    %rax,0x10(%rsp)
  cmp    %rax,%r12
  jae    L63
  mov    %r12,0x8(%rsp)
  mov    (%rsp),%rbp
  jmp    L255
L36:
  mov    %r15d,%ecx
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <swapfunc@plt>
L85:
  cmp    %r13,%rbx
  jbe    L241
L363:
  mov    %rbx,%r12
  sub    %rbp,%rbx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   *%r14
  test   %eax,%eax
  jle    L241
  test   %r15d,%r15d
  jne    L36
  mov    (%rbx,%rbp,1),%rax
  mov    (%rbx),%rdx
  mov    %rdx,(%rbx,%rbp,1)
  mov    %rax,(%rbx)
  jmp    L85
L241:
  add    %rbp,0x8(%rsp)
  mov    0x8(%rsp),%rax
  cmp    0x10(%rsp),%rax
  jae    L63
L255:
  mov    0x8(%rsp),%rax
  mov    %rax,%rbx
  cmp    %rax,%r13
  jb     L363
  jmp    L241
L22:
  shr    $0x3,%rax
  imul   %rcx,%rax
  lea    0x0(%r13,%rax,2),%rdx
  mov    %rax,0x8(%rsp)
  lea    0x0(%r13,%rax,1),%rsi
  mov    %r14,%rcx
  mov    %r13,%rdi
  call   <med3@plt>
  mov    %rax,%r12
  mov    0x8(%rsp),%rcx
  mov    %rcx,%rax
  lea    (%rbx,%rcx,1),%rdx
  neg    %rax
  mov    %rax,0x8(%rsp)
  mov    %rbx,%rdi
  sub    %rcx,%rdi
  mov    %r14,%rcx
  mov    %rbx,%rsi
  call   <med3@plt>
  mov    %rax,%rbx
  mov    0x8(%rsp),%rax
  lea    0x0(%rbp,%rax,1),%rsi
  lea    (%rsi,%rax,1),%rdi
  mov    %r14,%rcx
  mov    %rbp,%rdx
  call   <med3@plt>
  mov    %rax,%rbp
  jmp    L123
L112:
  mov    %r15d,%ecx
  mov    (%rsp),%rdx
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <swapfunc@plt>
  jmp    L386
L361:
  mov    %r15d,%ecx
  mov    (%rsp),%rdx
  mov    %r12,%rsi
  mov    0x18(%rsp),%rdi
  call   <swapfunc@plt>
  jmp    L156
L309:
  mov    %r15d,%ecx
  mov    (%rsp),%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <swapfunc@plt>
L357:
  sub    (%rsp),%rbp
L137:
  sub    (%rsp),%rbx
  cmp    %rbx,%r12
  ja     L37
L435:
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   *%r14
  test   %eax,%eax
  js     L205
  jne    L137
  test   %r15d,%r15d
  jne    L309
  mov    (%rbx),%rax
  mov    0x0(%rbp),%rdx
  mov    %rdx,(%rbx)
  mov    %rax,0x0(%rbp)
  jmp    L357
L205:
  cmp    %rbx,%r12
  ja     L37
  test   %r15d,%r15d
  jne    L167
  mov    (%r12),%rax
  mov    (%rbx),%rdx
  mov    %rdx,(%r12)
  mov    %rax,(%rbx)
L158:
  sub    (%rsp),%rbx
L8:
  mov    (%rsp),%rcx
  add    %rcx,0x8(%rsp)
L148:
  mov    0x8(%rsp),%rax
  mov    %rax,%r12
  cmp    %rbx,%rax
  ja     L37
  mov    %r13,%rsi
  mov    %rax,%rdi
  call   *%r14
  test   %eax,%eax
  jg     L435
  jne    L8
  test   %r15d,%r15d
  jne    L361
  mov    0x18(%rsp),%rcx
  mov    (%rcx),%rax
  mov    (%r12),%rdx
  mov    %rdx,(%rcx)
  mov    %rax,(%r12)
L156:
  mov    (%rsp),%rcx
  add    %rcx,0x18(%rsp)
  jmp    L8
L167:
  mov    %r15d,%ecx
  mov    (%rsp),%rdx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <swapfunc@plt>
  jmp    L158
L37:
  mov    0x10(%rsp),%rax
  imul   (%rsp),%rax
  add    %r13,%rax
  mov    %rax,0x8(%rsp)
  mov    %r12,%rcx
  mov    0x18(%rsp),%rax
  sub    %rax,%rcx
  mov    %rcx,0x10(%rsp)
  sub    %r13,%rax
  cmp    %rcx,%rax
  cmovg  %rcx,%rax
  mov    %rax,%rdx
  test   %rax,%rax
  jne    L303
L77:
  mov    %rbp,%rcx
  sub    %rbx,%rcx
  mov    %rcx,%rbx
  mov    0x8(%rsp),%rax
  sub    %rbp,%rax
  sub    (%rsp),%rax
  cmp    %rcx,%rax
  cmova  %rcx,%rax
  mov    %rax,%rdx
  test   %rax,%rax
  jne    L405
L221:
  mov    0x10(%rsp),%rcx
  mov    %rcx,%rax
  cmp    %rcx,(%rsp)
  jae    L27
  cmp    0x20(%rsp),%r13
  jbe    L185
  cmp    0x28(%rsp),%r13
  jbe    L185
L27:
  mov    %rbx,%rax
  mov    (%rsp),%rdx
  cmp    %rdx,%rbx
  jbe    L63
  mov    0x8(%rsp),%rcx
  mov    %rcx,%r13
  sub    %rbx,%r13
  mov    %rdx,%rdi
  mov    $0x0,%edx
  div    %rdi
  mov    %rax,0x10(%rsp)
  mov    %rcx,%rax
  sub    $0x1,%rax
  cmp    %r13,0x20(%rsp)
  jae    L308
  cmp    %r13,0x28(%rsp)
  jb     L63
L308:
  cmp    %rax,0x20(%rsp)
  jbe    L367
  cmp    %rax,0x28(%rsp)
  ja     L63
L367:
  mov    (%rsp),%rax
  or     %r13,%rax
  mov    $0x2,%r15d
  test   $0x7,%al
  je     L455
L94:
  cmpq   $0x6,0x10(%rsp)
  jbe    L396
  mov    0x10(%rsp),%rax
  mov    %rax,%rbx
  shr    %rbx
  mov    (%rsp),%rcx
  imul   %rcx,%rbx
  add    %r13,%rbx
  cmp    $0x7,%rax
  jbe    L174
  lea    -0x1(%rax),%rbp
  imul   %rcx,%rbp
  add    %r13,%rbp
  mov    %r13,%r12
  cmp    $0x28,%rax
  ja     L22
L123:
  mov    %r14,%rcx
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <med3@plt>
  mov    %rax,%rbx
L174:
  test   %r15d,%r15d
  jne    L112
  mov    0x0(%r13),%rax
  mov    (%rbx),%rdx
  mov    %rdx,0x0(%r13)
  mov    %rax,(%rbx)
L386:
  mov    (%rsp),%rcx
  lea    0x0(%r13,%rcx,1),%rax
  mov    %rax,0x18(%rsp)
  mov    0x10(%rsp),%rdx
  lea    -0x1(%rdx),%rbx
  imul   %rcx,%rbx
  add    %r13,%rbx
  mov    %rax,0x8(%rsp)
  mov    %rbx,%rbp
  jmp    L148
L303:
  mov    %r12,%rsi
  sub    %rax,%rsi
  mov    %r15d,%ecx
  mov    %r13,%rdi
  call   <swapfunc@plt>
  jmp    L77
L405:
  mov    0x8(%rsp),%rsi
  sub    %rax,%rsi
  mov    %r15d,%ecx
  mov    %r12,%rdi
  call   <swapfunc@plt>
  jmp    L221
L185:
  mov    0x10(%rsp),%rcx
  lea    -0x1(%r13,%rcx,1),%rdx
  cmp    0x20(%rsp),%rdx
  jae    L130
  cmp    0x28(%rsp),%rdx
  jb     L27
L130:
  mov    (%rsp),%rdi
  mov    $0x0,%edx
  div    %rdi
  mov    0x28(%rsp),%r9
  mov    0x20(%rsp),%r8
  mov    %r14,%rcx
  mov    %rdi,%rdx
  mov    %rax,%rsi
  mov    %r13,%rdi
  call   <_pqsort>
  jmp    L27
L63:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void _pqsort(void *a, size_t n, size_t es, int (*cmp)(const void *, const void *), void *lrange, void *rrange) {
  char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
  size_t d, r;
  int swaptype, cmp_result;
loop:
  swaptype = ((char *)a - (char *)0) % sizeof(long) || es % sizeof(long) ? 2 : es == sizeof(long) ? 0 : 1;
  ;
  if (n < 7) {
    for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
      for (pl = pm; pl > (char *)a && cmp(pl - es, pl) > 0; pl -= es)
        if (swaptype == 0) {
          long t = *(long *)(void *)(pl);
          *(long *)(void *)(pl) = *(long *)(void *)(pl - es);
          *(long *)(void *)(pl - es) = t;
        } else
          swapfunc(pl, pl - es, es, swaptype);
    return;
  }
  pm = (char *)a + (n / 2) * es;
  if (n > 7) {
    pl = (char *)a;
    pn = (char *)a + (n - 1) * es;
    if (n > 40) {
      d = (n / 8) * es;
      pl = med3(pl, pl + d, pl + 2 * d, cmp);
      pm = med3(pm - d, pm, pm + d, cmp);
      pn = med3(pn - 2 * d, pn - d, pn, cmp);
    }
    pm = med3(pl, pm, pn, cmp);
  }
  if (swaptype == 0) {
    long t = *(long *)(void *)(a);
    *(long *)(void *)(a) = *(long *)(void *)(pm);
    *(long *)(void *)(pm) = t;
  } else
    swapfunc(a, pm, es, swaptype);
  pa = pb = (char *)a + es;
  pc = pd = (char *)a + (n - 1) * es;
  for (;;) {
    while (pb <= pc && (cmp_result = cmp(pb, a)) <= 0) {
      if (cmp_result == 0) {
        if (swaptype == 0) {
          long t = *(long *)(void *)(pa);
          *(long *)(void *)(pa) = *(long *)(void *)(pb);
          *(long *)(void *)(pb) = t;
        } else
          swapfunc(pa, pb, es, swaptype);
        pa += es;
      }
      pb += es;
    }
    while (pb <= pc && (cmp_result = cmp(pc, a)) >= 0) {
      if (cmp_result == 0) {
        if (swaptype == 0) {
          long t = *(long *)(void *)(pc);
          *(long *)(void *)(pc) = *(long *)(void *)(pd);
          *(long *)(void *)(pd) = t;
        } else
          swapfunc(pc, pd, es, swaptype);
        pd -= es;
      }
      pc -= es;
    }
    if (pb > pc)
      break;
    if (swaptype == 0) {
      long t = *(long *)(void *)(pb);
      *(long *)(void *)(pb) = *(long *)(void *)(pc);
      *(long *)(void *)(pc) = t;
    } else
      swapfunc(pb, pc, es, swaptype);
    pb += es;
    pc -= es;
  }
  pn = (char *)a + n * es;
  r = (pa - (char *)a) < (pb - pa) ? pa - (char *)a : pb - pa;
  if ((r) > 0)
    swapfunc((a), (pb - r), (size_t)(r), swaptype);
  r = ((size_t)(pd - pc)) < (pn - pd - es) ? (size_t)(pd - pc) : pn - pd - es;
  if ((r) > 0)
    swapfunc((pb), (pn - r), (size_t)(r), swaptype);
  if ((r = pb - pa) > es) {
    void *_l = a, *_r = ((unsigned char *)a) + r - 1;
    if (!((lrange < _l && rrange < _l) || (lrange > _r && rrange > _r)))
      _pqsort(a, r / es, es, cmp, lrange, rrange);
  }
  if ((r = pd - pc) > es) {
    void *_l, *_r;
    a = pn - r;
    n = r / es;
    _l = a;
    _r = ((unsigned char *)a) + r - 1;
    if (!((lrange < _l && rrange < _l) || (lrange > _r && rrange > _r)))
      goto loop;
  }
}
```