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

```asm
<ss_mintrosort>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x1e8,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rcx,%rdi
  mov    %r8d,0xc(%rsp)
  sub    %rdx,%rdi
  sar    $0x2,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x1d8(%rsp)
  xor    %eax,%eax
  call   <ss_ilg@plt>
  movl   $0x0,0x10(%rsp)
  mov    %eax,%ebp
L635:
  mov    %r12,%rax
  sub    %r15,%rax
  cmp    $0x20,%rax
  jg     L610
  cmp    $0x4,%rax
  jg     L263
L308:
  mov    $0x1,%edi
  call   <assert@plt>
  mov    0x10(%rsp),%eax
  test   %eax,%eax
  jne    L454
  mov    0x1d8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L694
  add    $0x1e8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L610:
  movslq 0xc(%rsp),%rdi
  mov    0x18(%rsp),%rdx
  lea    (%rdx,%rdi,1),%r13
  test   %ebp,%ebp
  je     L336
  mov    %ebp,%eax
  sub    $0x1,%eax
  mov    %eax,0x20(%rsp)
  js     L518
  mov    %r12,%rcx
  mov    %r15,%rdx
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <ss_pivot@plt>
  mov    %r15,%r8
  movslq (%rax),%rcx
  mov    %rcx,%rdx
  movslq (%rbx,%rcx,4),%rcx
  movzbl 0x0(%r13,%rcx,1),%r9d
  mov    (%r15),%ecx
  mov    %edx,(%r15)
  mov    %r9d,%r10d
  mov    %ecx,(%rax)
  jmp    L362
  cs nopw 0x0(%rax,%rax,1)
L449:
  movslq (%r8),%rax
  movslq (%rbx,%rax,4),%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    %eax,%r9d
  jne    L592
L362:
  mov    %r8,%rdx
  add    $0x4,%r8
  cmp    %r8,%r12
  ja     L449
  mov    %r8,%rax
L215:
  mov    %r12,%rdx
  jmp    L343
  nopw   0x0(%rax,%rax,1)
L515:
  movslq (%rdx),%rdi
  mov    %rdi,%rsi
  movslq (%rbx,%rdi,4),%rdi
  movzbl 0x0(%r13,%rdi,1),%edi
  cmp    %edi,%r9d
  jne    L705
L343:
  mov    %rdx,%rcx
  sub    $0x4,%rdx
  cmp    %rdx,%rax
  jb     L515
  nopl   (%rax)
L109:
  cmp    %rdx,%r8
  jbe    L82
  movslq (%r15),%rax
  movslq (%rbx,%rax,4),%rax
  cmp    -0x1(%r13,%rax,1),%r10b
  ja     L498
L370:
  addl   $0x1,0xc(%rsp)
  jmp    L635
L336:
  sar    $0x2,%rax
  mov    %r15,%rdx
  mov    %rbx,%rsi
  mov    %r13,%rdi
  mov    %eax,%ecx
  call   <ss_heapsort@plt>
L518:
  movslq (%r15),%rax
  lea    0x4(%r15),%r14
  movslq (%rbx,%rax,4),%rcx
  movzbl 0x0(%r13,%rcx,1),%eax
  cmp    %r14,%r12
  jbe    L431
  nopl   0x0(%rax,%rax,1)
L662:
  mov    %eax,%edx
  movslq (%r14),%rax
  movslq (%rbx,%rax,4),%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    %edx,%eax
  je     L284
  mov    %r14,%rcx
  sub    %r15,%rcx
  cmp    $0x4,%rcx
  jg     L254
  mov    %r14,%r15
L284:
  add    $0x4,%r14
  cmp    %r14,%r12
  ja     L662
  movslq (%r15),%rdx
  mov    %r15,%rsi
  mov    %r14,%r15
  movslq (%rbx,%rdx,4),%rcx
L27:
  movzbl -0x1(%r13,%rcx,1),%edx
  cmp    %eax,%edx
  jl     L712
L237:
  mov    %r14,%r13
  mov    %r12,%rax
  sub    %rsi,%r13
  sub    %r14,%rax
  cmp    %rax,%r13
  jg     L496
  mov    $0xffffffff,%ebp
  cmp    $0x4,%r13
  jle    L635
  mov    0x10(%rsp),%r15d
  xor    %edi,%edi
  mov    %rsi,0x20(%rsp)
  cmp    $0xf,%r15d
  setle  %dil
  call   <assert@plt>
  movslq %r15d,%rax
  mov    0xc(%rsp),%esi
  mov    %r13,%rdi
  mov    %rax,%rdx
  lea    (%rax,%rax,2),%rax
  sar    $0x2,%rdi
  shl    $0x3,%rax
  mov    %esi,0x60(%rsp,%rax,1)
  add    $0x1,%esi
  mov    %r12,0x58(%rsp,%rax,1)
  lea    0x1(%rdx),%r12d
  mov    %r14,0x50(%rsp,%rax,1)
  movl   $0xffffffff,0x64(%rsp,%rax,1)
  mov    %esi,0xc(%rsp)
  call   <ss_ilg@plt>
  mov    %r12d,0x10(%rsp)
  mov    0x20(%rsp),%r15
  mov    %r14,%r12
  mov    %eax,%ebp
  jmp    L635
L454:
  subl   $0x1,0x10(%rsp)
  movslq 0x10(%rsp),%rax
  lea    (%rax,%rax,2),%rax
  shl    $0x3,%rax
  mov    0x60(%rsp,%rax,1),%edx
  mov    0x50(%rsp,%rax,1),%r15
  mov    0x58(%rsp,%rax,1),%r12
  mov    0x64(%rsp,%rax,1),%ebp
  mov    %edx,0xc(%rsp)
  jmp    L635
L263:
  mov    0xc(%rsp),%r8d
  mov    0x18(%rsp),%rdi
  mov    %r12,%rcx
  mov    %r15,%rdx
  mov    %rbx,%rsi
  call   <ss_insertionsort@plt>
  jmp    L308
L705:
  mov    %rdx,%r11
  jl     L228
L462:
  mov    %rdx,%rcx
  mov    %r11,%rdx
  nopl   0x0(%rax,%rax,1)
L631:
  mov    (%rax),%edi
  mov    %esi,(%rax)
  add    $0x4,%rax
  mov    %edi,(%rcx)
  cmp    %rax,%rcx
  ja     L474
  jmp    L262
  nopl   0x0(%rax)
L514:
  jne    L660
  mov    (%r8),%edi
  add    $0x4,%r8
  mov    %edi,(%rax)
  mov    %esi,-0x4(%r8)
L660:
  add    $0x4,%rax
  cmp    %rax,%rcx
  jbe    L262
L474:
  movslq (%rax),%rdi
  mov    %rdi,%rsi
  movslq (%rbx,%rdi,4),%rdi
  movzbl 0x0(%r13,%rdi,1),%edi
  cmp    %edi,%r9d
  jge    L514
L262:
  sub    $0x4,%rcx
  cmp    %rcx,%rax
  jb     L14
  jmp    L109
  nopl   0x0(%rax,%rax,1)
L743:
  jne    L340
  mov    (%rdx),%edi
  sub    $0x4,%rdx
  mov    %edi,(%rcx)
  mov    %esi,0x4(%rdx)
L340:
  sub    $0x4,%rcx
  cmp    %rax,%rcx
  jbe    L109
L14:
  movslq (%rcx),%rdi
  mov    %rdi,%rsi
  movslq (%rbx,%rdi,4),%rdi
  movzbl 0x0(%r13,%rdi,1),%edi
  cmp    %edi,%r9d
  jle    L743
  cmp    %rax,%rcx
  ja     L631
  jmp    L109
  nopl   (%rax)
L592:
  mov    %r8,%rax
  jle    L215
  lea    0x8(%rdx),%rax
  cmp    %r12,%rax
  jb     L416
  jmp    L215
  nopw   0x0(%rax,%rax,1)
L556:
  jne    L672
  mov    (%r8),%ecx
  add    $0x4,%r8
  mov    %ecx,(%rax)
  mov    %edx,-0x4(%r8)
L672:
  add    $0x4,%rax
  cmp    %rax,%r12
  jbe    L215
L416:
  movslq (%rax),%rcx
  mov    %rcx,%rdx
  movslq (%rbx,%rcx,4),%rcx
  movzbl 0x0(%r13,%rcx,1),%ecx
  cmp    %ecx,%r9d
  jge    L556
  jmp    L215
L496:
  mov    0xc(%rsp),%edx
  sar    $0x2,%r13
  mov    %rsi,0x20(%rsp)
  mov    %r13d,%ebp
  lea    0x1(%rdx),%r13d
  cmp    $0x4,%rax
  jle    L103
  xor    %edi,%edi
  cmpl   $0xf,0x10(%rsp)
  setle  %dil
  call   <assert@plt>
  movslq 0x10(%rsp),%rax
  mov    0x20(%rsp),%rsi
  mov    %ebp,%edi
  mov    $0xffffffff,%ebp
  lea    (%rax,%rax,2),%rdx
  shl    $0x3,%rdx
  mov    %rsi,0x50(%rsp,%rdx,1)
  mov    %r14,0x58(%rsp,%rdx,1)
  mov    %r13d,0x60(%rsp,%rdx,1)
  mov    %rdx,0x20(%rsp)
  call   <ss_ilg@plt>
  mov    0x20(%rsp),%rdx
  mov    %eax,0x64(%rsp,%rdx,1)
  mov    0x10(%rsp),%eax
  add    $0x1,%eax
  mov    %eax,0x10(%rsp)
  jmp    L635
L82:
  mov    %rax,%r9
  lea    -0x4(%rax),%rbp
  mov    %rax,%r14
  sub    %r8,%r9
  sub    %r15,%r8
  mov    %r9,%rcx
  sar    $0x2,%r8
  sar    $0x2,%rcx
  cmp    %ecx,%r8d
  cmovg  %ecx,%r8d
  mov    %rax,%rcx
  movslq %r8d,%rsi
  shl    $0x2,%rsi
  sub    %rsi,%rcx
  mov    %r15,%rsi
  test   %r8d,%r8d
  jle    L165
  cs nopw 0x0(%rax,%rax,1)
L446:
  mov    (%rsi),%edi
  mov    (%rcx),%r8d
  add    $0x4,%rcx
  add    $0x4,%rsi
  mov    %r8d,-0x4(%rsi)
  mov    %edi,-0x4(%rcx)
  cmp    %r14,%rcx
  jne    L446
L165:
  mov    %rdx,%r8
  mov    %r12,%rcx
  mov    %r12,%r11
  sub    %rdx,%rcx
  sub    %rbp,%r8
  sar    $0x2,%rcx
  mov    %r8,%rdx
  sar    $0x2,%rdx
  sub    $0x1,%ecx
  cmp    %edx,%ecx
  cmovg  %edx,%ecx
  mov    %r12,%rdx
  movslq %ecx,%rsi
  shl    $0x2,%rsi
  sub    %rsi,%rdx
  test   %ecx,%ecx
  jle    L409
  nopl   0x0(%rax)
L114:
  mov    (%rax),%ecx
  mov    (%rdx),%esi
  add    $0x4,%rdx
  add    $0x4,%rax
  mov    %esi,-0x4(%rax)
  mov    %ecx,-0x4(%rdx)
  cmp    %r11,%rdx
  jne    L114
L409:
  lea    (%r15,%r9,1),%rsi
  mov    %r12,%r14
  movslq (%rsi),%rax
  sub    %r8,%r14
  movslq (%rbx,%rax,4),%rax
  cmp    -0x1(%r13,%rax,1),%r10b
  ja     L289
  mov    %rsi,0x28(%rsp)
L388:
  mov    0x10(%rsp),%edx
  xor    %edi,%edi
  mov    %r14,%rax
  sub    0x28(%rsp),%rax
  mov    %rax,%rbp
  mov    %rsi,0x48(%rsp)
  cmp    $0xf,%edx
  lea    0x1(%rdx),%ecx
  setle  %dil
  mov    %ecx,0x30(%rsp)
  xor    %r13d,%r13d
  cmp    $0xf,%ecx
  mov    0xc(%rsp),%ecx
  setle  %r13b
  add    $0x2,%edx
  sar    $0x2,%rbp
  mov    %edx,0x40(%rsp)
  add    $0x1,%ecx
  mov    %ecx,0x38(%rsp)
  cmp    %r8,%r9
  jg     L199
  cmp    %rax,%r8
  jle    L318
  cmp    %rax,%r9
  jg     L164
  call   <assert@plt>
  movslq 0x10(%rsp),%rax
  mov    0xc(%rsp),%edx
  mov    %r13d,%edi
  lea    (%rax,%rax,2),%rax
  shl    $0x3,%rax
  mov    %edx,0x60(%rsp,%rax,1)
  mov    0x20(%rsp),%edx
  mov    %r12,0x58(%rsp,%rax,1)
  mov    %edx,0x64(%rsp,%rax,1)
  mov    %r14,0x50(%rsp,%rax,1)
  call   <assert@plt>
  movslq 0x30(%rsp),%rax
  mov    %ebp,%edi
  lea    (%rax,%rax,2),%r12
  mov    0x28(%rsp),%rax
  shl    $0x3,%r12
  mov    %rax,0x50(%rsp,%r12,1)
  mov    0x38(%rsp),%eax
  mov    %r14,0x58(%rsp,%r12,1)
  mov    %eax,0x60(%rsp,%r12,1)
  call   <ss_ilg@plt>
  mov    0x20(%rsp),%ebp
  mov    %eax,0x64(%rsp,%r12,1)
  mov    0x40(%rsp),%eax
  mov    0x48(%rsp),%r12
  mov    %eax,0x10(%rsp)
  jmp    L635
L254:
  movslq (%r15),%rax
  mov    %r15,%rsi
  mov    %r14,%r15
  movslq (%rbx,%rax,4),%rcx
  mov    %edx,%eax
  movzbl -0x1(%r13,%rcx,1),%edx
  cmp    %eax,%edx
  jge    L237
L712:
  mov    0xc(%rsp),%ecx
  mov    %r14,%rdx
  mov    %rbx,%rdi
  call   <ss_partition@plt>
  mov    %rax,%rsi
  jmp    L237
L498:
  mov    0xc(%rsp),%ecx
  mov    %r15,%rsi
  mov    %r12,%rdx
  mov    %rbx,%rdi
  call   <ss_partition@plt>
  mov    %r12,%rdi
  sub    %rax,%rdi
  mov    %rax,%r15
  sar    $0x2,%rdi
  call   <ss_ilg@plt>
  mov    %eax,%ebp
  jmp    L370
L103:
  mov    %ebp,%edi
  mov    %r14,%r12
  call   <ss_ilg@plt>
  mov    %r13d,0xc(%rsp)
  mov    0x20(%rsp),%r15
  mov    %eax,%ebp
  jmp    L635
L289:
  mov    0xc(%rsp),%ecx
  mov    %r14,%rdx
  mov    %rbx,%rdi
  mov    %r8,0x40(%rsp)
  mov    %r9,0x38(%rsp)
  mov    %rsi,0x30(%rsp)
  call   <ss_partition@plt>
  mov    0x40(%rsp),%r8
  mov    0x38(%rsp),%r9
  mov    %rax,0x28(%rsp)
  mov    0x30(%rsp),%rsi
  jmp    L388
L228:
  sub    $0x8,%rcx
  cmp    %rcx,%rax
  jb     L692
  jmp    L109
  nopl   0x0(%rax)
L629:
  jne    L657
  mov    (%rdx),%edi
  sub    $0x4,%rdx
  mov    %edi,(%rcx)
  mov    %esi,0x4(%rdx)
L657:
  sub    $0x4,%rcx
  cmp    %rcx,%rax
  jae    L109
L692:
  movslq (%rcx),%rdi
  mov    %rdi,%rsi
  movslq (%rbx,%rdi,4),%rdi
  movzbl 0x0(%r13,%rdi,1),%edi
  cmp    %edi,%r9d
  jle    L629
  cmp    %rcx,%rax
  jae    L109
  mov    %rdx,%r11
  mov    %rcx,%rdx
  jmp    L462
L199:
  cmp    %rax,%r9
  jle    L724
  cmp    %rax,%r8
  jle    L50
  call   <assert@plt>
  movslq 0x10(%rsp),%rax
  mov    0x48(%rsp),%rsi
  mov    %r13d,%edi
  mov    0x20(%rsp),%edx
  lea    (%rax,%rax,2),%rax
  shl    $0x3,%rax
  mov    %r15,0x50(%rsp,%rax,1)
  mov    0xc(%rsp),%r15d
  mov    %rsi,0x58(%rsp,%rax,1)
  mov    %r15d,0x60(%rsp,%rax,1)
  mov    %edx,0x64(%rsp,%rax,1)
  call   <assert@plt>
  movslq 0x30(%rsp),%rax
  lea    (%rax,%rax,2),%rax
  shl    $0x3,%rax
  mov    %r14,0x50(%rsp,%rax,1)
  mov    %r12,0x58(%rsp,%rax,1)
  mov    %r15d,0x60(%rsp,%rax,1)
L260:
  mov    0x20(%rsp),%edx
  mov    %ebp,%edi
  mov    %r14,%r12
  mov    %edx,0x64(%rsp,%rax,1)
  call   <ss_ilg@plt>
  mov    0x28(%rsp),%r15
  mov    %eax,%ebp
  mov    0x40(%rsp),%eax
  mov    %eax,0x10(%rsp)
  mov    0x38(%rsp),%eax
  mov    %eax,0xc(%rsp)
  jmp    L635
L50:
  call   <assert@plt>
  movslq 0x10(%rsp),%rax
  mov    0xc(%rsp),%edx
  mov    %r13d,%edi
  mov    0x48(%rsp),%rsi
  lea    (%rax,%rax,2),%rax
  shl    $0x3,%rax
  mov    %edx,0x60(%rsp,%rax,1)
  mov    0x20(%rsp),%edx
  mov    %r15,0x50(%rsp,%rax,1)
  mov    %rsi,0x58(%rsp,%rax,1)
  mov    %edx,0x64(%rsp,%rax,1)
  call   <assert@plt>
  movslq 0x30(%rsp),%rax
  mov    %ebp,%edi
  lea    (%rax,%rax,2),%r15
  mov    0x28(%rsp),%rax
  shl    $0x3,%r15
  mov    %rax,0x50(%rsp,%r15,1)
  mov    0x38(%rsp),%eax
  mov    %r14,0x58(%rsp,%r15,1)
  mov    %eax,0x60(%rsp,%r15,1)
  call   <ss_ilg@plt>
  mov    0x20(%rsp),%ebp
  mov    %eax,0x64(%rsp,%r15,1)
  mov    0x40(%rsp),%eax
  mov    %r14,%r15
  mov    %eax,0x10(%rsp)
  jmp    L635
L164:
  call   <assert@plt>
  movslq 0x10(%rsp),%rax
  mov    0x20(%rsp),%edx
  mov    %r13d,%edi
  lea    (%rax,%rax,2),%rax
  shl    $0x3,%rax
  mov    %r12,0x58(%rsp,%rax,1)
  mov    0xc(%rsp),%r12d
  mov    %r14,0x50(%rsp,%rax,1)
  mov    %r12d,0x60(%rsp,%rax,1)
  mov    %edx,0x64(%rsp,%rax,1)
  call   <assert@plt>
  movslq 0x30(%rsp),%rax
  mov    0x48(%rsp),%rsi
  lea    (%rax,%rax,2),%rax
  shl    $0x3,%rax
  mov    %r15,0x50(%rsp,%rax,1)
  mov    %rsi,0x58(%rsp,%rax,1)
  mov    %r12d,0x60(%rsp,%rax,1)
  jmp    L260
L724:
  call   <assert@plt>
  movslq 0x10(%rsp),%rax
  mov    %ebp,%edi
  lea    (%rax,%rax,2),%rdx
  mov    0x28(%rsp),%rax
  shl    $0x3,%rdx
  mov    %rax,0x50(%rsp,%rdx,1)
  mov    0x38(%rsp),%eax
  mov    %r14,0x58(%rsp,%rdx,1)
  mov    %eax,0x60(%rsp,%rdx,1)
  mov    %rdx,0x10(%rsp)
  call   <ss_ilg@plt>
  mov    0x10(%rsp),%rdx
  mov    %r13d,%edi
  mov    %eax,0x64(%rsp,%rdx,1)
  call   <assert@plt>
  movslq 0x30(%rsp),%rax
  mov    0xc(%rsp),%edx
  mov    0x48(%rsp),%rsi
  lea    (%rax,%rax,2),%rax
  shl    $0x3,%rax
  mov    %edx,0x60(%rsp,%rax,1)
  mov    0x20(%rsp),%edx
  mov    %r15,0x50(%rsp,%rax,1)
  mov    %r14,%r15
  mov    %rsi,0x58(%rsp,%rax,1)
  mov    %edx,%ebp
  mov    %edx,0x64(%rsp,%rax,1)
  mov    0x40(%rsp),%eax
  mov    %eax,0x10(%rsp)
  jmp    L635
L318:
  call   <assert@plt>
  movslq 0x10(%rsp),%rax
  mov    %ebp,%edi
  lea    (%rax,%rax,2),%rdx
  mov    0x28(%rsp),%rax
  shl    $0x3,%rdx
  mov    %rax,0x50(%rsp,%rdx,1)
  mov    0x38(%rsp),%eax
  mov    %r14,0x58(%rsp,%rdx,1)
  mov    %eax,0x60(%rsp,%rdx,1)
  mov    %rdx,0x10(%rsp)
  call   <ss_ilg@plt>
  mov    0x10(%rsp),%rdx
  mov    %r13d,%edi
  mov    %eax,0x64(%rsp,%rdx,1)
  call   <assert@plt>
  movslq 0x30(%rsp),%rax
  mov    0xc(%rsp),%edx
  lea    (%rax,%rax,2),%rax
  shl    $0x3,%rax
  mov    %edx,0x60(%rsp,%rax,1)
  mov    0x20(%rsp),%edx
  mov    %r12,0x58(%rsp,%rax,1)
  mov    0x48(%rsp),%r12
  mov    %r14,0x50(%rsp,%rax,1)
  mov    %edx,%ebp
  mov    %edx,0x64(%rsp,%rax,1)
  mov    0x40(%rsp),%eax
  mov    %eax,0x10(%rsp)
  jmp    L635
L431:
  mov    %r15,%rsi
  mov    %r14,%r15
  jmp    L27
L694:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void ss_mintrosort(const unsigned char *T, const int *PA, int *first, int *last, int depth) {
  struct {
    int *a, *b, c;
    int d;
  } stack[(16)];
  const unsigned char *Td;
  int *a, *b, *c, *d, *e, *f;
  int s, t;
  int ssize;
  int limit;
  int v, x = 0;
  for (ssize = 0, limit = ss_ilg(last - first);;) {
    if ((last - first) <= (8)) {
      if (1 < (last - first)) {
        ss_insertionsort(T, PA, first, last, depth);
      }
      do {
        assert(0 <= ssize);
        if (ssize == 0) {
          return;
        }
        (first) = stack[--ssize].a, (last) = stack[ssize].b, (depth) = stack[ssize].c, (limit) = stack[ssize].d;
      } while (0);
      continue;
    }
    Td = T + depth;
    if (limit-- == 0) {
      ss_heapsort(Td, PA, first, last - first);
    }
    if (limit < 0) {
      for (a = first + 1, v = Td[PA[*first]]; a < last; ++a) {
        if ((x = Td[PA[*a]]) != v) {
          if (1 < (a - first)) {
            break;
          }
          v = x;
          first = a;
        }
      }
      if (Td[PA[*first] - 1] < v) {
        first = ss_partition(PA, first, a, depth);
      }
      if ((a - first) <= (last - a)) {
        if (1 < (a - first)) {
          do {
            assert(ssize < (16));
            stack[ssize].a = (a), stack[ssize].b = (last), stack[ssize].c = (depth), stack[ssize++].d = (-1);
          } while (0);
          last = a, depth += 1, limit = ss_ilg(a - first);
        } else {
          first = a, limit = -1;
        }
      } else {
        if (1 < (last - a)) {
          do {
            assert(ssize < (16));
            stack[ssize].a = (first), stack[ssize].b = (a), stack[ssize].c = (depth + 1), stack[ssize++].d = (ss_ilg(a - first));
          } while (0);
          first = a, limit = -1;
        } else {
          last = a, depth += 1, limit = ss_ilg(a - first);
        }
      }
      continue;
    }
    a = ss_pivot(Td, PA, first, last);
    v = Td[PA[*a]];
    do {
      t = (*first);
      (*first) = (*a);
      (*a) = t;
    } while (0);
    for (b = first; (++b < last) && ((x = Td[PA[*b]]) == v);) {
    }
    if (((a = b) < last) && (x < v)) {
      for (; (++b < last) && ((x = Td[PA[*b]]) <= v);) {
        if (x == v) {
          do {
            t = (*b);
            (*b) = (*a);
            (*a) = t;
          } while (0);
          ++a;
        }
      }
    }
    for (c = last; (b < --c) && ((x = Td[PA[*c]]) == v);) {
    }
    if ((b < (d = c)) && (x > v)) {
      for (; (b < --c) && ((x = Td[PA[*c]]) >= v);) {
        if (x == v) {
          do {
            t = (*c);
            (*c) = (*d);
            (*d) = t;
          } while (0);
          --d;
        }
      }
    }
    for (; b < c;) {
      do {
        t = (*b);
        (*b) = (*c);
        (*c) = t;
      } while (0);
      for (; (++b < c) && ((x = Td[PA[*b]]) <= v);) {
        if (x == v) {
          do {
            t = (*b);
            (*b) = (*a);
            (*a) = t;
          } while (0);
          ++a;
        }
      }
      for (; (b < --c) && ((x = Td[PA[*c]]) >= v);) {
        if (x == v) {
          do {
            t = (*c);
            (*c) = (*d);
            (*d) = t;
          } while (0);
          --d;
        }
      }
    }
    if (a <= d) {
      c = b - 1;
      if ((s = a - first) > (t = b - a)) {
        s = t;
      }
      for (e = first, f = b - s; 0 < s; --s, ++e, ++f) {
        do {
          t = (*e);
          (*e) = (*f);
          (*f) = t;
        } while (0);
      }
      if ((s = d - c) > (t = last - d - 1)) {
        s = t;
      }
      for (e = b, f = last - s; 0 < s; --s, ++e, ++f) {
        do {
          t = (*e);
          (*e) = (*f);
          (*f) = t;
        } while (0);
      }
      a = first + (b - a), c = last - (d - c);
      b = (v <= Td[PA[*a] - 1]) ? a : ss_partition(PA, a, c, depth);
      if ((a - first) <= (last - c)) {
        if ((last - c) <= (c - b)) {
          do {
            assert(ssize < (16));
            stack[ssize].a = (b), stack[ssize].b = (c), stack[ssize].c = (depth + 1), stack[ssize++].d = (ss_ilg(c - b));
          } while (0);
          do {
            assert(ssize < (16));
            stack[ssize].a = (c), stack[ssize].b = (last), stack[ssize].c = (depth), stack[ssize++].d = (limit);
          } while (0);
          last = a;
        } else if ((a - first) <= (c - b)) {
          do {
            assert(ssize < (16));
            stack[ssize].a = (c), stack[ssize].b = (last), stack[ssize].c = (depth), stack[ssize++].d = (limit);
          } while (0);
          do {
            assert(ssize < (16));
            stack[ssize].a = (b), stack[ssize].b = (c), stack[ssize].c = (depth + 1), stack[ssize++].d = (ss_ilg(c - b));
          } while (0);
          last = a;
        } else {
          do {
            assert(ssize < (16));
            stack[ssize].a = (c), stack[ssize].b = (last), stack[ssize].c = (depth), stack[ssize++].d = (limit);
          } while (0);
          do {
            assert(ssize < (16));
            stack[ssize].a = (first), stack[ssize].b = (a), stack[ssize].c = (depth), stack[ssize++].d = (limit);
          } while (0);
          first = b, last = c, depth += 1, limit = ss_ilg(c - b);
        }
      } else {
        if ((a - first) <= (c - b)) {
          do {
            assert(ssize < (16));
            stack[ssize].a = (b), stack[ssize].b = (c), stack[ssize].c = (depth + 1), stack[ssize++].d = (ss_ilg(c - b));
          } while (0);
          do {
            assert(ssize < (16));
            stack[ssize].a = (first), stack[ssize].b = (a), stack[ssize].c = (depth), stack[ssize++].d = (limit);
          } while (0);
          first = c;
        } else if ((last - c) <= (c - b)) {
          do {
            assert(ssize < (16));
            stack[ssize].a = (first), stack[ssize].b = (a), stack[ssize].c = (depth), stack[ssize++].d = (limit);
          } while (0);
          do {
            assert(ssize < (16));
            stack[ssize].a = (b), stack[ssize].b = (c), stack[ssize].c = (depth + 1), stack[ssize++].d = (ss_ilg(c - b));
          } while (0);
          first = c;
        } else {
          do {
            assert(ssize < (16));
            stack[ssize].a = (first), stack[ssize].b = (a), stack[ssize].c = (depth), stack[ssize++].d = (limit);
          } while (0);
          do {
            assert(ssize < (16));
            stack[ssize].a = (c), stack[ssize].b = (last), stack[ssize].c = (depth), stack[ssize++].d = (limit);
          } while (0);
          first = b, last = c, depth += 1, limit = ss_ilg(c - b);
        }
      }
    } else {
      limit += 1;
      if (Td[PA[*first] - 1] < v) {
        first = ss_partition(PA, first, last, depth);
        limit = ss_ilg(last - first);
      }
      depth += 1;
    }
  }
}
```