user: Demonstrate the C code that generates the assembly output below:

```asm
<_pqsort>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%r15
  mov    %rsi,0x18(%rsp)
  mov    %rdx,(%rsp)
  mov    %rcx,%r14
  mov    %r8,0x28(%rsp)
  mov    %r9,0x38(%rsp)
  jmp    L457
L16:
  cmpq   $0x8,(%rsp)
  setne  %r13b
  movzbl %r13b,%r13d
  jmp    L424
L106:
  mov    (%rsp),%rcx
  lea    (%r15,%rcx,1),%r12
  mov    0x18(%rsp),%rax
  imul   %rcx,%rax
  add    %r15,%rax
  mov    %rax,0x10(%rsp)
  cmp    %rax,%r12
  jae    L538
  mov    %r12,0x8(%rsp)
  mov    (%rsp),%rbp
  jmp    L242
L234:
  mov    %r13d,%ecx
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <swapfunc@plt>
L304:
  cmp    %r15,%rbx
  jbe    L275
L280:
  mov    %rbx,%r12
  sub    %rbp,%rbx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   *%r14
  test   %eax,%eax
  jle    L275
  test   %r13d,%r13d
  jne    L234
  mov    (%rbx,%rbp,1),%rax
  mov    (%rbx),%rdx
  mov    %rdx,(%rbx,%rbp,1)
  mov    %rax,(%rbx)
  jmp    L304
L275:
  add    %rbp,0x8(%rsp)
  mov    0x8(%rsp),%rax
  cmp    0x10(%rsp),%rax
  jae    L538
L242:
  mov    0x8(%rsp),%rax
  mov    %rax,%rbx
  cmp    %rax,%r15
  jb     L280
  jmp    L275
L100:
  shr    $0x3,%rax
  imul   %rcx,%rax
  lea    (%r15,%rax,2),%rdx
  mov    %rax,0x8(%rsp)
  lea    (%r15,%rax,1),%rsi
  mov    %r14,%rcx
  mov    %r15,%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    L167
L174:
  mov    %r13d,%ecx
  mov    (%rsp),%rdx
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <swapfunc@plt>
  jmp    L279
L370:
  mov    %r13d,%ecx
  mov    (%rsp),%rdx
  mov    %r12,%rsi
  mov    0x20(%rsp),%rdi
  call   <swapfunc@plt>
  jmp    L563
L518:
  mov    %r13d,%ecx
  mov    (%rsp),%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <swapfunc@plt>
L483:
  sub    (%rsp),%rbp
  movl   $0x1,0x8(%rsp)
L257:
  sub    (%rsp),%rbx
  cmp    %rbx,%r12
  ja     L157
L525:
  mov    %r15,%rsi
  mov    %rbx,%rdi
  call   *%r14
  test   %eax,%eax
  js     L219
  jne    L257
  test   %r13d,%r13d
  jne    L518
  mov    (%rbx),%rax
  mov    0x0(%rbp),%rdx
  mov    %rdx,(%rbx)
  mov    %rax,0x0(%rbp)
  jmp    L483
L219:
  cmp    %rbx,%r12
  ja     L157
  test   %r13d,%r13d
  jne    L62
  mov    (%r12),%rax
  mov    (%rbx),%rdx
  mov    %rdx,(%r12)
  mov    %rax,(%rbx)
L246:
  sub    (%rsp),%rbx
  movl   $0x1,0x8(%rsp)
L232:
  mov    (%rsp),%rcx
  add    %rcx,0x10(%rsp)
L342:
  mov    0x10(%rsp),%rax
  mov    %rax,%r12
  cmp    %rbx,%rax
  ja     L157
  mov    %r15,%rsi
  mov    %rax,%rdi
  call   *%r14
  test   %eax,%eax
  jg     L525
  jne    L232
  test   %r13d,%r13d
  jne    L370
  mov    0x20(%rsp),%rcx
  mov    (%rcx),%rax
  mov    (%r12),%rdx
  mov    %rdx,(%rcx)
  mov    %rax,(%r12)
L563:
  mov    (%rsp),%rcx
  add    %rcx,0x20(%rsp)
  movl   $0x1,0x8(%rsp)
  jmp    L232
L62:
  mov    %r13d,%ecx
  mov    (%rsp),%rdx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <swapfunc@plt>
  jmp    L246
L157:
  cmpl   $0x0,0x8(%rsp)
  je     L94
  mov    0x18(%rsp),%rax
  imul   (%rsp),%rax
  add    %r15,%rax
  mov    %rax,0x8(%rsp)
  mov    %r12,%rcx
  mov    0x20(%rsp),%rax
  sub    %rax,%rcx
  mov    %rcx,0x10(%rsp)
  sub    %r15,%rax
  cmp    %rcx,%rax
  cmovg  %rcx,%rax
  mov    %rax,%rdx
  test   %rax,%rax
  jne    L120
L565:
  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    L373
L560:
  mov    0x10(%rsp),%rcx
  mov    %rcx,%rax
  cmp    %rcx,(%rsp)
  jae    L165
  cmp    0x28(%rsp),%r15
  jbe    L238
  cmp    0x38(%rsp),%r15
  jbe    L238
L165:
  mov    %rbx,%rax
  mov    (%rsp),%rdx
  cmp    %rdx,%rbx
  jbe    L538
  mov    0x8(%rsp),%rcx
  mov    %rcx,%r15
  sub    %rbx,%r15
  mov    %rdx,%rdi
  mov    $0x0,%edx
  div    %rdi
  mov    %rax,0x18(%rsp)
  mov    %rcx,%rax
  sub    $0x1,%rax
  cmp    %r15,0x28(%rsp)
  jae    L318
  cmp    %r15,0x38(%rsp)
  jb     L538
L318:
  cmp    %rax,0x28(%rsp)
  jbe    L457
  cmp    %rax,0x38(%rsp)
  ja     L538
L457:
  mov    (%rsp),%rax
  or     %r15,%rax
  mov    $0x2,%r13d
  test   $0x7,%al
  je     L16
L424:
  cmpq   $0x6,0x18(%rsp)
  jbe    L106
  mov    0x18(%rsp),%rax
  mov    %rax,%rbx
  shr    %rbx
  mov    (%rsp),%rcx
  imul   %rcx,%rbx
  add    %r15,%rbx
  cmp    $0x7,%rax
  jbe    L302
  lea    -0x1(%rax),%rbp
  imul   %rcx,%rbp
  add    %r15,%rbp
  mov    %r15,%r12
  cmp    $0x28,%rax
  ja     L100
L167:
  mov    %r14,%rcx
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <med3@plt>
  mov    %rax,%rbx
L302:
  test   %r13d,%r13d
  jne    L174
  mov    (%r15),%rax
  mov    (%rbx),%rdx
  mov    %rdx,(%r15)
  mov    %rax,(%rbx)
L279:
  mov    (%rsp),%rcx
  lea    (%r15,%rcx,1),%rax
  mov    %rax,0x30(%rsp)
  mov    0x18(%rsp),%rdx
  lea    -0x1(%rdx),%rbx
  imul   %rcx,%rbx
  add    %r15,%rbx
  mov    %rax,0x10(%rsp)
  mov    %rbx,%rbp
  mov    %rax,0x20(%rsp)
  movl   $0x0,0x8(%rsp)
  jmp    L342
L94:
  mov    0x18(%rsp),%rbp
  imul   (%rsp),%rbp
  add    %r15,%rbp
  cmp    %rbp,0x30(%rsp)
  jae    L538
  mov    %rbp,0x8(%rsp)
  mov    (%rsp),%rbp
  jmp    L22
L7:
  mov    %r13d,%ecx
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <swapfunc@plt>
L220:
  cmp    %r15,%rbx
  jbe    L90
L328:
  mov    %rbx,%r12
  sub    %rbp,%rbx
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   *%r14
  test   %eax,%eax
  jle    L90
  test   %r13d,%r13d
  jne    L7
  mov    (%rbx,%rbp,1),%rax
  mov    (%rbx),%rdx
  mov    %rdx,(%rbx,%rbp,1)
  mov    %rax,(%rbx)
  jmp    L220
L90:
  add    %rbp,0x30(%rsp)
  mov    0x30(%rsp),%rax
  cmp    0x8(%rsp),%rax
  jae    L538
L22:
  mov    0x30(%rsp),%rax
  mov    %rax,%rbx
  cmp    %rax,%r15
  jb     L328
  jmp    L90
L120:
  mov    %r12,%rsi
  sub    %rax,%rsi
  mov    %r13d,%ecx
  mov    %r15,%rdi
  call   <swapfunc@plt>
  jmp    L565
L373:
  mov    0x8(%rsp),%rsi
  sub    %rax,%rsi
  mov    %r13d,%ecx
  mov    %r12,%rdi
  call   <swapfunc@plt>
  jmp    L560
L238:
  mov    0x10(%rsp),%rcx
  lea    -0x1(%r15,%rcx,1),%rdx
  cmp    0x28(%rsp),%rdx
  jae    L287
  cmp    0x38(%rsp),%rdx
  jb     L165
L287:
  mov    (%rsp),%rdi
  mov    $0x0,%edx
  div    %rdi
  mov    0x38(%rsp),%r9
  mov    0x28(%rsp),%r8
  mov    %r14,%rcx
  mov    %rdi,%rdx
  mov    %rax,%rsi
  mov    %r15,%rdi
  call   <_pqsort>
  jmp    L165
L538:
  add    $0x48,%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, swap_cnt, cmp_result;
loop:
  swaptype = ((char *)a - (char *)0) % sizeof(long) || es % sizeof(long) ? 2 : es == sizeof(long) ? 0 : 1;
  ;
  swap_cnt = 0;
  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) {
        swap_cnt = 1;
        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) {
        swap_cnt = 1;
        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);
    swap_cnt = 1;
    pb += es;
    pc -= es;
  }
  if (swap_cnt == 0) {
    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;
  }
  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;
  }
}
```