user: Translate the below assembly code into C programming language:

```asm
<qsortx>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x218,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x208(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%esi
  jbe    L255
  mov    %edx,%r15d
  test   %edx,%edx
  je     L255
  sub    $0x1,%esi
  movl   $0x0,0x1c(%rsp)
  mov    %rdi,%r14
  mov    %rcx,%rbx
  imul   %edx,%esi
  lea    (%rdi,%rsi,1),%rax
  mov    %rax,0x8(%rsp)
  mov    %edx,%eax
  mov    0x8(%rsp),%rsi
  mov    %rax,0x10(%rsp)
  mov    %rax,%rbp
  neg    %rbp
  nopl   0x0(%rax,%rax,1)
L198:
  mov    %rsi,%rax
  sub    %r14,%rax
  cqto
  idivq  0x10(%rsp)
  add    $0x1,%eax
  cmp    $0x8,%eax
  ja     L48
  mov    %rbx,%rcx
  mov    %r15d,%edx
  mov    %r14,%rdi
  call   <shortsort@plt>
L161:
  subl   $0x1,0x1c(%rsp)
  movslq 0x1c(%rsp),%rax
  cmp    $0xffffffff,%eax
  je     L255
  mov    0x20(%rsp,%rax,8),%r14
  mov    0x110(%rsp,%rax,8),%rax
  mov    %rax,0x8(%rsp)
  mov    %rax,%rsi
  jmp    L198
L255:
  mov    0x208(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L233
  add    $0x218,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L48:
  shr    %eax
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    %r14,%r12
  imul   %r15d,%eax
  lea    (%r14,%rax,1),%rdi
  call   <swap@plt>
  mov    0x8(%rsp),%r13
  add    0x10(%rsp),%r13
  nopw   0x0(%rax,%rax,1)
L21:
  add    0x10(%rsp),%r12
  cmp    %r12,0x8(%rsp)
  jb     L85
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   *%rbx
  test   %eax,%eax
  jg     L85
  jmp    L21
  nopw   0x0(%rax,%rax,1)
L184:
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   *%rbx
  test   %eax,%eax
  js     L244
L85:
  add    %rbp,%r13
  cmp    %r13,%r14
  jb     L184
L244:
  cmp    %r13,%r12
  ja     L141
  mov    %r15d,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <swap@plt>
  jmp    L21
  nopl   0x0(%rax)
L141:
  mov    %r15d,%edx
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <swap@plt>
  mov    0x10(%rsp),%rax
  mov    0x8(%rsp),%rdi
  lea    (%r14,%rax,1),%rsi
  mov    %rdi,%rdx
  lea    -0x1(%r13),%rax
  sub    %r14,%rax
  sub    %r12,%rdx
  cmp    %rdx,%rax
  jl     L221
  cmp    %rsi,%r13
  jbe    L182
  movslq 0x1c(%rsp),%rax
  lea    0x0(%r13,%rbp,1),%rcx
  mov    %r14,0x20(%rsp,%rax,8)
  mov    %rcx,0x110(%rsp,%rax,8)
  cmp    %r12,%rdi
  ja     L159
  mov    %rcx,0x8(%rsp)
  mov    %rcx,%rsi
  jmp    L198
L221:
  cmp    %r12,%rdi
  jbe    L124
  movslq 0x1c(%rsp),%rax
  mov    %r12,0x20(%rsp,%rax,8)
  mov    %rdi,0x110(%rsp,%rax,8)
  cmp    %rsi,%r13
  ja     L240
  mov    %r12,%r14
  mov    %rdi,%rsi
  jmp    L198
L124:
  cmp    %rsi,%r13
  jbe    L161
  lea    0x0(%r13,%rbp,1),%rax
  mov    %rax,0x8(%rsp)
  mov    %rax,%rsi
  jmp    L198
L182:
  cmp    %r12,0x8(%rsp)
  jbe    L161
  mov    %r12,%r14
  mov    %rdi,%rsi
  jmp    L198
L159:
  addl   $0x1,0x1c(%rsp)
  mov    %r12,%r14
  mov    %rdi,%rsi
  jmp    L198
L240:
  lea    0x0(%r13,%rbp,1),%rax
  addl   $0x1,0x1c(%rsp)
  mov    %rax,0x8(%rsp)
  mov    %rax,%rsi
  jmp    L198
L233:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void qsortx(void *base, unsigned num, unsigned width, int (*comp)(const void *, const void *)) {
  char *lo, *hi;
  char *mid;
  char *loguy, *higuy;
  unsigned size;
  char *lostk[30], *histk[30];
  int stkptr;
  if (num < 2 || width == 0)
    return;
  stkptr = 0;
  lo = base;
  hi = (char *)base + width * (num - 1);
recurse:
  size = (hi - lo) / width + 1;
  if (size <= 8) {
    shortsort(lo, hi, width, comp);
  } else {
    mid = lo + (size / 2) * width;
    swap(mid, lo, width);
    loguy = lo;
    higuy = hi + width;
    for (;;) {
      do {
        loguy += width;
      } while (loguy <= hi && comp(loguy, lo) <= 0);
      do {
        higuy -= width;
      } while (higuy > lo && comp(higuy, lo) >= 0);
      if (higuy < loguy)
        break;
      swap(loguy, higuy, width);
    }
    swap(lo, higuy, width);
    if (higuy - 1 - lo >= hi - loguy) {
      if (lo + width < higuy) {
        lostk[stkptr] = lo;
        histk[stkptr] = higuy - width;
        ++stkptr;
      }
      if (loguy < hi) {
        lo = loguy;
        goto recurse;
      }
    } else {
      if (loguy < hi) {
        lostk[stkptr] = loguy;
        histk[stkptr] = hi;
        ++stkptr;
      }
      if (lo + width < higuy) {
        hi = higuy - width;
        goto recurse;
      }
    }
  }
  --stkptr;
  if (stkptr >= 0) {
    lo = lostk[stkptr];
    hi = histk[stkptr];
    goto recurse;
  } else
    return;
}
```