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

```asm
<iiqst>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    %rdi,%rbx
  sar    $0x2,%rbx
  sub    $0x8,%rsp
L55:
  mov    %ebx,%eax
  lea    -0x4(%r13),%r8
  shr    %eax
  lea    (%r12,%rax,4),%rdx
  cmp    $0x5,%ebx
  jle    L144
  mov    (%r12),%eax
  mov    (%rdx),%ecx
  mov    -0x4(%r13),%edi
  cmp    %ecx,%eax
  jle    L36
  mov    %r12,%rsi
  cmp    %edi,%eax
  jg     L167
L52:
  cmp    %rdx,%rsi
  je     L144
  mov    (%rsi),%eax
L180:
  mov    %eax,(%rdx)
  mov    %ecx,(%rsi)
L144:
  mov    %r12,%rbp
  xchg   %ax,%ax
L273:
  cmp    %rdx,%rbp
  jae    L229
L108:
  mov    0x0(%rbp),%edi
  mov    (%rdx),%esi
  cmp    %esi,%edi
  jg     L173
  add    $0x4,%rbp
  cmp    %rdx,%rbp
  jb     L108
L229:
  cmp    %rdx,%r8
  jbe    L49
  mov    (%rdx),%esi
L275:
  mov    %r8,%rax
L38:
  mov    (%rax),%ecx
  cmp    %esi,%ecx
  jl     L231
  sub    $0x4,%rax
  cmp    %rax,%rdx
  jb     L38
  cmp    %rdx,%rbp
  je     L116
L48:
  mov    0x0(%rbp),%edi
  mov    (%rdx),%ecx
L76:
  lea    -0x4(%rax),%r8
  mov    %rbp,%rsi
  mov    %rdx,%rax
  mov    %rbp,%rdx
  nopw   0x0(%rax,%rax,1)
L15:
  mov    %ecx,0x0(%rbp)
  mov    %rsi,%rbp
  mov    %edi,(%rax)
  jmp    L273
  nopw   0x0(%rax,%rax,1)
L231:
  mov    0x0(%rbp),%edi
  lea    0x4(%rbp),%rsi
  lea    -0x4(%rax),%r8
  cmp    %rdx,%rbp
  jne    L15
  mov    %rax,%rdx
  mov    %rax,%r8
  jmp    L15
  nopl   0x0(%rax,%rax,1)
L173:
  mov    %esi,%ecx
  mov    %r8,%rax
  cmp    %rdx,%r8
  ja     L275
  jmp    L76
  nopl   0x0(%rax)
L49:
  mov    %r8,%rax
  cmp    %rdx,%rbp
  jne    L48
L116:
  lea    0x4(%rbp),%r15
  mov    %rbp,%r14
  mov    %r13,%rax
  sub    %r12,%r14
  sub    %r15,%rax
  sar    $0x2,%rax
  sar    $0x2,%r14
  mov    %eax,%ebx
  cmp    %eax,%r14d
  jg     L54
  test   %r14d,%r14d
  jg     L130
  mov    %r15,%r12
L199:
  test   %ebx,%ebx
  jg     L55
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L54:
  test   %eax,%eax
  jg     L68
  mov    %r14d,%ebx
  mov    %rbp,%r13
  jmp    L199
L36:
  cmp    %edi,%ecx
  jle    L144
  cmp    %rdx,%r12
  je     L144
  mov    %r12,%rsi
  cmp    %edi,%eax
  jge    L180
  mov    %r8,%rsi
  jmp    L52
L130:
  mov    %r12,%rdi
  mov    %rbp,%rsi
  mov    %r15,%r12
  call   <iiqst>
  jmp    L199
L68:
  mov    %r13,%rsi
  mov    %r15,%rdi
  mov    %r14d,%ebx
  mov    %rbp,%r13
  call   <iiqst>
  jmp    L199
L167:
  mov    %r8,%rsi
  cmp    %edi,%ecx
  jl     L52
  jmp    L144
```

assistant: ```c
void iiqst(int *base, int *max) {
  register int *i;
  register int *j;
  register int *jj;
  register int *mid;
  register int ii;
  register int c;
  int *tmp;
  int lo;
  int hi;
  lo = max - base;
  do {
    mid = base + ((unsigned)lo >> 1);
    if (lo >= 6) {
      j = (*base > *mid ? base : mid);
      tmp = max - 1;
      if (*j > *tmp) {
        j = (j == base ? mid : base);
        if (*j < *tmp)
          j = tmp;
      }
      if (j != mid) {
        c = *mid;
        *mid = *j;
        *j = c;
      }
    }
    for (i = base, j = max - 1;;) {
      while (i < mid && *i <= *mid)
        i++;
      while (j > mid) {
        if (*mid <= *j) {
          j--;
          continue;
        }
        tmp = i + 1;
        if (i == mid)
          mid = jj = j;
        else
          jj = j--;
        goto swap;
      }
      if (i == mid)
        break;
      else {
        jj = mid;
        tmp = mid = i;
        j--;
      }
    swap:
      c = *i;
      *i = *jj;
      *jj = c;
      i = tmp;
    }
    i = (j = mid) + 1;
    if ((lo = j - base) <= (hi = max - i)) {
      if (lo >= 1)
        iiqst(base, j);
      base = i;
      lo = hi;
    } else {
      if (hi >= 1)
        iiqst(i, max);
      max = j;
    }
  } while (lo >= 1);
}
```