// File: /workspace/github_cpp_makefile_star2_O2/readmapping[P]alfalfa/src/qsufsort.c
// Function: sort_split
static void sort_split(int *p, int n)
{
   int *pa, *pb, *pc, *pd, *pl, *pm, *pn;
   int f, v, s, t, tmp;

   if (n<7) {                   /* multi-selection sort smallest arrays.*/
      select_sort_split(p, n);
      return;
   }

   v=choose_pivot(p, n);
   pa=pb=p;
   pc=pd=p+n-1;
   while (1) {                  /* split-end partition.*/
      while (pb<=pc && (f=KEY(pb))<=v) {
         if (f==v) {
            SWAP(pa, pb);
            ++pa;
         }
         ++pb;
      }
      while (pc>=pb && (f=KEY(pc))>=v) {
         if (f==v) {
            SWAP(pc, pd);
            --pd;
         }
         --pc;
      }
      if (pb>pc)
         break;
      SWAP(pb, pc);
      ++pb;
      --pc;
   }
   pn=p+n;
   if ((s=pa-p)>(t=pb-pa))
      s=t;
   for (pl=p, pm=pb-s; s; --s, ++pl, ++pm)
      SWAP(pl, pm);
   if ((s=pd-pc)>(t=pn-pd-1))
      s=t;
   for (pl=pb, pm=pn-s; s; --s, ++pl, ++pm)
      SWAP(pl, pm);

   s=pb-pa;
   t=pd-pc;
   if (s>0)
      sort_split(p, s);
   update_group(p+s, p+n-t-1);
   if (t>0)
      sort_split(p+n-t, t);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %rbx
cmpl $0x6, %r14d
jle 0x30041
movl %r14d, %eax
shrl %eax
leaq (%rbx,%rax,4), %rsi
movq 0x1a752(%rip), %rax     # 0x4a428
cmpl $0x7, %r14d
jne 0x2fcea
movl 0x1a756(%rip), %ecx     # 0x4a438
pushq $0x7
popq %rdx
jmp 0x2feaa
movl %r14d, %edx
leaq (%rbx,%rdx,4), %r12
addq $-0x4, %r12
cmpl $0x28, %r14d
jbe 0x2fd5a
shrl $0x3, %r14d
movl (%rbx), %r10d
movl 0x1a730(%rip), %ecx     # 0x4a438
leal (%rcx,%r10), %edi
movslq %edi, %rdi
movl (%rax,%rdi,4), %ebp
leal (,%r14,4), %edi
leaq (%rbx,%rdi), %r15
movl (%rbx,%rdi), %r9d
leal (%r9,%rcx), %r8d
movslq %r8d, %r8
movl (%rax,%r8,4), %r13d
leaq (%r15,%rdi), %r11
movq %r15, 0x8(%rsp)
movl (%rdi,%r15), %r15d
leal (%r15,%rcx), %edi
movslq %edi, %rdi
movl (%rax,%rdi,4), %edi
cmpl %r13d, %ebp
jge 0x2fd72
cmpl %edi, %r13d
jl 0x2fd89
cmpl %edi, %ebp
cmovll %r15d, %r10d
cmovgeq %rbx, %r11
jmp 0x2fd81
movl (%rbx), %r9d
movl 0x1a6d5(%rip), %ecx     # 0x4a438
movl (%rsi), %r10d
movl (%r12), %r11d
movq %rbx, %r14
jmp 0x2fe6b
cmpl %edi, %r13d
jg 0x2fd89
cmpl %edi, %ebp
cmovgl %r15d, %r10d
cmovleq %rbx, %r11
movl %r10d, %r9d
movq %r11, 0x8(%rsp)
leal (,%r14,4), %edi
movq %rsi, %r11
subq %rdi, %r11
movl (%r11), %r15d
leal (%r15,%rcx), %r8d
movslq %r8d, %r8
movl (%rax,%r8,4), %ebp
movl (%rsi), %r10d
leal (%r10,%rcx), %r8d
movslq %r8d, %r8
movl (%rax,%r8,4), %r8d
leaq (%rsi,%rdi), %r13
movq %r13, 0x10(%rsp)
movl (%rsi,%rdi), %r13d
leal (%rcx,%r13), %edi
movslq %edi, %rdi
movl (%rax,%rdi,4), %edi
cmpl %r8d, %ebp
jge 0x2fde2
cmpl %edi, %r8d
jl 0x2fdf9
cmpl %edi, %ebp
cmovll %r13d, %r15d
cmovlq 0x10(%rsp), %r11
jmp 0x2fdf3
cmpl %edi, %r8d
jg 0x2fdf9
cmpl %edi, %ebp
cmovgl %r13d, %r15d
cmovgq 0x10(%rsp), %r11
movl %r15d, %r10d
movq %r11, %rsi
negq %r14
leaq (%r12,%r14,4), %r15
leaq (%r15,%r14,4), %rdi
movq %rdi, 0x10(%rsp)
movl (%rdi), %r14d
leal (%r14,%rcx), %edi
movslq %edi, %rdi
movl (%rax,%rdi,4), %ebp
movl (%r15), %r11d
leal (%r11,%rcx), %edi
movslq %edi, %rdi
movl (%rax,%rdi,4), %r8d
movl (%r12), %edi
leal (%rdi,%rcx), %r13d
movslq %r13d, %r13
movl (%rax,%r13,4), %r13d
cmpl %r8d, %ebp
jge 0x2fe4c
cmpl %r13d, %r8d
jl 0x2fe51
cmpl %r13d, %ebp
cmovll %edi, %r14d
cmovgeq 0x10(%rsp), %r12
jmp 0x2fe63
cmpl %r13d, %r8d
jle 0x2fe56
movq %r15, %r12
jmp 0x2fe66
cmpl %r13d, %ebp
cmovgl %edi, %r14d
cmovleq 0x10(%rsp), %r12
movl %r14d, %r11d
movq 0x8(%rsp), %r14
addl %ecx, %r9d
movslq %r9d, %rdi
movl (%rax,%rdi,4), %edi
addl %ecx, %r10d
movslq %r10d, %r8
movl (%rax,%r8,4), %r9d
addl %ecx, %r11d
movslq %r11d, %r8
movl (%rax,%r8,4), %r8d
cmpl %r9d, %edi
jge 0x2fe9b
cmpl %r8d, %r9d
jl 0x2feaa
cmpl %r8d, %edi
cmovlq %r12, %r14
jmp 0x2fea7
cmpl %r8d, %r9d
jg 0x2feaa
cmpl %r8d, %edi
cmovgq %r12, %r14
movq %r14, %rsi
movslq (%rsi), %rsi
movslq %ecx, %rdi
addq %rsi, %rdi
movl (%rax,%rdi,4), %r8d
leaq (%rbx,%rdx,4), %r13
leaq (%rbx,%rdx,4), %r9
addq $-0x4, %r9
movq %r9, %rdi
movq %rbx, %rsi
movq %rbx, %rbp
movq %rbx, %rdx
movq %rsi, %r15
shlq $0x1e, %r15
cmpq %r9, %rdx
ja 0x2ff13
movl (%rdx), %r10d
leal (%rcx,%r10), %r11d
movslq %r11d, %r11
cmpl %r8d, (%rax,%r11,4)
jg 0x2ff13
jne 0x2fefc
movl (%rbp), %r11d
movl %r10d, (%rbp)
movl %r11d, (%rdx)
addq $0x4, %rbp
addq $0x4, %rdx
movabsq $0x100000000, %r10      # imm = 0x100000000
addq %r10, %r15
addq $0x4, %rsi
jmp 0x2fed6
movq %r9, %r10
negq %r10
movq %r9, %r11
cmpq %rdx, %r9
jb 0x2ff66
movl (%r9), %r14d
leal (%rcx,%r14), %r12d
movslq %r12d, %r12
cmpl %r8d, (%rax,%r12,4)
jl 0x2ff4e
jne 0x2ff40
movl (%rdi), %r12d
movl %r12d, (%r9)
movl %r14d, (%rdi)
addq $-0x4, %rdi
addq $-0x4, %r9
addq $-0x4, %r11
addq $0x4, %r10
jmp 0x2ff1c
movl (%rdx), %esi
movl %r14d, (%rdx)
movl %esi, (%r9)
addq $0x4, %rdx
addq $-0x4, %r9
movq %rdx, %rsi
jmp 0x2fecf
movq %rbp, %rax
subq %rbx, %rax
shrq $0x2, %rax
subq %rbp, %rsi
shrq $0x2, %rsi
movslq %eax, %rcx
movslq %esi, %rax
cmpq %rax, %rcx
cmovlq %rcx, %rax
leaq (,%rax,4), %r8
movq %rdx, %rcx
subq %r8, %rcx
xorl %r8d, %r8d
cmpl %r8d, %eax
je 0x2ffaf
movl (%rbx,%r8,4), %r9d
movl (%rcx,%r8,4), %r14d
movl %r14d, (%rbx,%r8,4)
movl %r9d, (%rcx,%r8,4)
incq %r8
jmp 0x2ff95
movq %rdi, %r14
subq %r11, %r14
shrq $0x2, %r14
movq %r13, %rax
subq %rdi, %rax
shrq $0x2, %rax
decl %eax
movslq %eax, %rcx
addq %rdi, %r10
shrq $0x2, %r10
movslq %r10d, %rax
cmpq %rax, %rcx
cmovlq %rcx, %rax
leaq (,%rax,4), %rdi
movq %r13, %rcx
subq %rdi, %rcx
xorl %edi, %edi
cmpl %edi, %eax
je 0x30002
movl (%rdx,%rdi,4), %r8d
movl (%rcx,%rdi,4), %r9d
movl %r9d, (%rdx,%rdi,4)
movl %r8d, (%rcx,%rdi,4)
incq %rdi
jmp 0x2ffe9
testl %esi, %esi
jle 0x3000e
movq %rbx, %rdi
callq 0x2fca8
shlq $0x1e, %rbp
subq %rbp, %r15
sarq $0x20, %r15
leaq (%rbx,%r15,4), %rdi
movslq %r14d, %rax
shlq $0x2, %rax
subq %rax, %r13
leaq -0x4(%r13), %rsi
callq 0x300e9
movq %r13, %rbx
testl %r14d, %r14d
jg 0x2fcbc
jmp 0x300da
movslq %r14d, %rax
leaq (%rbx,%rax,4), %r14
addq $-0x4, %r14
movq 0x1a3d5(%rip), %r15     # 0x4a428
movslq 0x1a3de(%rip), %r12     # 0x4a438
cmpq %r14, %rbx
jae 0x300bf
leaq 0x4(%rbx), %rax
movslq (%rbx), %rcx
addq %r12, %rcx
movl (%r15,%rcx,4), %edx
movq %rax, %rcx
movq %rax, %r13
cmpq %r14, %rcx
ja 0x300ae
movslq (%rcx), %rdi
movq %rdi, %rsi
addq %r12, %rsi
movl (%r15,%rsi,4), %esi
cmpl %edx, %esi
jge 0x30094
movl (%rbx), %edx
movl %edx, (%rcx)
movl %edi, (%rbx)
movq %rax, %r13
jmp 0x300a6
jne 0x300a4
movl (%r13), %esi
movl %esi, (%rcx)
movl %edi, (%r13)
addq $0x4, %r13
movl %edx, %esi
addq $0x4, %rcx
movl %esi, %edx
jmp 0x30073
leaq -0x4(%r13), %rsi
movq %rbx, %rdi
callq 0x300e9
movq %r13, %rbx
jmp 0x3005a
jne 0x300da
movq %r14, %rax
subq 0x1a365(%rip), %rax     # 0x4a430
shrq $0x2, %rax
movslq (%r14), %rcx
movl %eax, (%r15,%rcx,4)
orl $-0x1, (%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq