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

```asm
<_wqsort>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r13
  mov    %esi,-0x44(%rbp)
  mov    %edx,%r14d
  mov    %rcx,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    -0x3c(%rbp),%r15
  jmp    L81
L83:
  mov    -0x44(%rbp),%ebx
  mov    %r14d,%r12d
  lea    (%rbx,%r12,1),%eax
  sar    %eax
  mov    %eax,%ecx
  movslq %ecx,%rax
  shl    $0x2,%rax
  add    %r13,%rax
  mov    (%rax),%eax
  mov    %eax,(%r15)
  movslq %ebx,%rax
  shl    $0x2,%rax
  add    %r13,%rax
  movslq %ecx,%rdx
  shl    $0x2,%rdx
  add    %r13,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  movslq %ebx,%rax
  shl    $0x2,%rax
  lea    0x0(%r13,%rax,1),%rdx
  mov    (%r15),%eax
  mov    %eax,(%rdx)
  jmp    L6
L62:
  sub    $0x1,%r12d
L95:
  movslq %r12d,%rax
  shl    $0x2,%rax
  add    %r13,%rax
  mov    %r15,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  mov    -0x50(%rbp),%rcx
  call   *%rcx
  test   %eax,%eax
  jle    L62
  movslq %r12d,%rax
  shl    $0x2,%rax
  add    %r13,%rax
  movslq %ebx,%rdx
  shl    $0x2,%rdx
  add    %r13,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  jmp    L13
L5:
  add    $0x1,%ebx
L13:
  cmp    %r12d,%ebx
  jge    L56
  movslq %ebx,%rax
  shl    $0x2,%rax
  add    %r13,%rax
  mov    %r15,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  mov    -0x50(%rbp),%rcx
  call   *%rcx
  test   %eax,%eax
  jg     L5
L56:
  movslq %ebx,%rax
  shl    $0x2,%rax
  add    %r13,%rax
  movslq %r12d,%rdx
  shl    $0x2,%rdx
  add    %r13,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
L6:
  cmp    %r12d,%ebx
  jl     L95
  movslq %ebx,%rax
  shl    $0x2,%rax
  lea    0x0(%r13,%rax,1),%rdx
  mov    (%r15),%eax
  mov    %eax,(%rdx)
  mov    %ebx,%edx
  mov    -0x44(%rbp),%esi
  sub    %esi,%edx
  mov    %r14d,%eax
  sub    %ebx,%eax
  cmp    %eax,%edx
  jge    L49
  lea    -0x1(%rbx),%eax
  mov    -0x50(%rbp),%rcx
  mov    %eax,%edx
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <_wqsort>
  lea    0x1(%rbx),%eax
  mov    %eax,-0x44(%rbp)
  jmp    L81
L49:
  lea    0x1(%rbx),%eax
  mov    -0x50(%rbp),%rcx
  mov    %r14d,%edx
  mov    %eax,%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <_wqsort>
  lea    -0x1(%rbx),%r14d
L81:
  cmp    -0x44(%rbp),%r14d
  jg     L83
  nop
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L104
  call   <__stack_chk_fail@plt>
L104:
  add    $0x28,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
void _wqsort(base, lo, hi, cmp) register int *base;
register int lo;
register int hi;
register int (*cmp)();
{
  int k;
  register int i, j, t;
  register int *p = &k;
  while (hi > lo) {
    i = lo;
    j = hi;
    t = ((i + j) >> 1);
    *p = base[t];
    base[t] = base[i];
    base[i] = *p;
    while (i < j) {
      while (((*cmp)((base + j), p)) <= 0)
        --j;
      base[i] = base[j];
      while ((i < j) && (((*cmp)((base + i), p)) > 0))
        ++i;
      base[j] = base[i];
    }
    base[i] = *p;
    if ((i - lo) < (hi - i)) {
      _wqsort(base, lo, (i - 1), cmp);
      lo = i + 1;
    } else {
      _wqsort(base, (i + 1), hi, cmp);
      hi = i - 1;
    }
  }
}
```