// File: /workspace/github_cpp_makefile_star2_O3/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 0x3ea2e
movl %r14d, %eax
shrl %eax
leaq (%rbx,%rax,4), %rsi
movq 0x15d79(%rip), %rax     # 0x54430
cmpl $0x7, %r14d
jne 0x3e6cd
movl $0x7, %ecx
movl 0x15d78(%rip), %edx     # 0x54440
jmp 0x3e890
movl %r14d, %ecx
leaq (%rbx,%rcx,4), %r15
addq $-0x4, %r15
cmpl $0x28, %r14d
jbe 0x3e743
movq %r15, 0x8(%rsp)
shrl $0x3, %r14d
movl (%rbx), %r10d
movl 0x15d50(%rip), %edx     # 0x54440
leal (%rdx,%r10), %edi
movslq %edi, %rdi
movl (%rax,%rdi,4), %ebp
leal (,%r14,4), %edi
leaq (%rbx,%rdi), %r15
movl (%rbx,%rdi), %r9d
leal (%r9,%rdx), %r8d
movslq %r8d, %r8
movl (%rax,%r8,4), %r13d
leaq (%r15,%rdi), %r11
movq %r15, (%rsp)
movl (%rdi,%r15), %r15d
leal (%r15,%rdx), %edi
movslq %edi, %rdi
movl (%rax,%rdi,4), %r12d
cmpl %r13d, %ebp
jge 0x3e75a
cmpl %r12d, %r13d
jl 0x3e771
cmpl %r12d, %ebp
cmovll %r15d, %r10d
cmovgeq %rbx, %r11
jmp 0x3e76a
movl (%rbx), %r9d
movl 0x15cf4(%rip), %edx     # 0x54440
movl (%rsi), %r10d
movl (%r15), %r11d
movq %rbx, %r14
jmp 0x3e851
cmpl %r12d, %r13d
jg 0x3e771
cmpl %r12d, %ebp
cmovgl %r15d, %r10d
cmovleq %rbx, %r11
movl %r10d, %r9d
movq %r11, (%rsp)
leal (,%r14,4), %r8d
movq %rsi, %r11
subq %r8, %r11
movl (%r11), %r15d
leal (%r15,%rdx), %edi
movslq %edi, %rdi
movl (%rax,%rdi,4), %ebp
movl (%rsi), %r10d
leal (%r10,%rdx), %edi
movslq %edi, %rdi
movl (%rax,%rdi,4), %edi
leaq (%rsi,%r8), %r12
movq %r12, 0x10(%rsp)
movl (%rsi,%r8), %r13d
leal (%rdx,%r13), %r8d
movslq %r8d, %r8
movl (%rax,%r8,4), %r12d
cmpl %edi, %ebp
jge 0x3e7c9
cmpl %r12d, %edi
jl 0x3e7e1
cmpl %r12d, %ebp
cmovll %r13d, %r15d
cmovlq 0x10(%rsp), %r11
jmp 0x3e7db
cmpl %r12d, %edi
jg 0x3e7e1
cmpl %r12d, %ebp
cmovgl %r13d, %r15d
cmovgq 0x10(%rsp), %r11
movl %r15d, %r10d
movq %r11, %rsi
negq %r14
movq 0x8(%rsp), %r8
leaq (%r8,%r14,4), %r15
leaq (%r15,%r14,4), %r12
movl (%r12), %r14d
leal (%r14,%rdx), %edi
movslq %edi, %rdi
movl (%rax,%rdi,4), %ebp
movl (%r15), %r11d
leal (%r11,%rdx), %edi
movslq %edi, %rdi
movl (%rax,%rdi,4), %edi
movl (%r8), %r13d
leal (%rdx,%r13), %r8d
movslq %r8d, %r8
movl (%rax,%r8,4), %r8d
cmpl %edi, %ebp
jge 0x3e835
cmpl %r8d, %edi
jl 0x3e84d
cmpl %r8d, %ebp
cmovll %r13d, %r14d
movq 0x8(%rsp), %r15
cmovgeq %r12, %r15
jmp 0x3e84a
cmpl %r8d, %edi
jg 0x3e84d
cmpl %r8d, %ebp
cmovgl %r13d, %r14d
movq 0x8(%rsp), %r15
cmovleq %r12, %r15
movl %r14d, %r11d
movq (%rsp), %r14
addl %edx, %r9d
movslq %r9d, %rdi
movl (%rax,%rdi,4), %r9d
addl %edx, %r10d
movslq %r10d, %rdi
movl (%rax,%rdi,4), %r8d
addl %edx, %r11d
movslq %r11d, %rdi
movl (%rax,%rdi,4), %edi
cmpl %r8d, %r9d
jge 0x3e881
cmpl %edi, %r8d
jl 0x3e890
cmpl %edi, %r9d
cmovlq %r15, %r14
jmp 0x3e88d
cmpl %edi, %r8d
jg 0x3e890
cmpl %edi, %r9d
cmovgq %r15, %r14
movq %r14, %rsi
movslq (%rsi), %rsi
movslq %edx, %rdx
addq %rsi, %rdx
movl (%rax,%rdx,4), %edi
leaq (%rbx,%rcx,4), %r12
leaq (%rbx,%rcx,4), %rdx
addq $-0x4, %rdx
movq %rdx, %r14
movq %rbx, %rcx
movq %rbx, %rsi
cmpq %rdx, %rcx
ja 0x3e8ec
movl 0x15b83(%rip), %r8d     # 0x54440
movl (%rcx), %r9d
leal (%r8,%r9), %r10d
movslq %r10d, %r10
cmpl %edi, (%rax,%r10,4)
jg 0x3e8ec
jne 0x3e8e3
movl (%rsi), %r8d
movl %r9d, (%rsi)
movl %r8d, (%rcx)
addq $0x4, %rsi
movl 0x15b5d(%rip), %r8d     # 0x54440
addq $0x4, %rcx
cmpq %rdx, %rcx
jbe 0x3e8bd
cmpq %rcx, %rdx
jb 0x3e937
movslq 0x15b48(%rip), %r8      # 0x54440
movslq (%rdx), %r9
movq %r9, %r10
addq %r8, %r10
cmpl %edi, (%rax,%r10,4)
jl 0x3e921
jne 0x3e916
movl (%r14), %r10d
movl %r10d, (%rdx)
movl %r9d, (%r14)
addq $-0x4, %r14
addq $-0x4, %rdx
cmpq %rcx, %rdx
jae 0x3e8f8
jmp 0x3e937
movl (%rcx), %r8d
movl %r9d, (%rcx)
movl %r8d, (%rdx)
addq $0x4, %rcx
addq $-0x4, %rdx
jmp 0x3e8b1
movq %rcx, %r15
subq %rsi, %r15
subq %rbx, %rsi
shrq $0x2, %rsi
shrq $0x2, %r15
cmpl %r15d, %esi
cmovgel %r15d, %esi
testl %esi, %esi
je 0x3e97b
movslq %esi, %r8
shlq $0x2, %r8
movq %rcx, %rdi
subq %r8, %rdi
xorl %r8d, %r8d
movl (%rbx,%r8,4), %r9d
movl (%rdi,%r8,4), %r10d
movl %r10d, (%rbx,%r8,4)
movl %r9d, (%rdi,%r8,4)
incq %r8
cmpl %r8d, %esi
jne 0x3e963
movq %r12, %rsi
subq %r14, %rsi
subq %rdx, %r14
shrq $0x2, %r14
shrq $0x2, %rsi
decl %esi
cmpl %r14d, %esi
cmovgel %r14d, %esi
testl %esi, %esi
je 0x3e9bf
movslq %esi, %rdi
shlq $0x2, %rdi
movq %r12, %rdx
subq %rdi, %rdx
xorl %edi, %edi
movl (%rcx,%rdi,4), %r8d
movl (%rdx,%rdi,4), %r9d
movl %r9d, (%rcx,%rdi,4)
movl %r8d, (%rdx,%rdi,4)
incq %rdi
cmpl %edi, %esi
jne 0x3e9a8
testl %r15d, %r15d
jle 0x3e9d6
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3e689
movq 0x15a5a(%rip), %rax     # 0x54430
movslq %r15d, %rcx
leaq (%rbx,%rcx,4), %rcx
movslq %r14d, %rdx
shlq $0x2, %rdx
subq %rdx, %r12
leaq -0x4(%r12), %rdx
movq %rdx, %rsi
subq 0x15a42(%rip), %rsi     # 0x54438
shrq $0x2, %rsi
movslq (%rcx), %rdi
movl %esi, (%rax,%rdi,4)
cmpq %rdx, %rcx
je 0x3ea17
movslq 0x4(%rcx), %rdi
addq $0x4, %rcx
movl %esi, (%rax,%rdi,4)
cmpq %rdx, %rcx
jb 0x3ea05
jmp 0x3ea1d
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
movq %r12, %rbx
testl %r14d, %r14d
jg 0x3e69d
jmp 0x3eb22
movslq %r14d, %rax
leaq (%rbx,%rax,4), %rax
addq $-0x4, %rax
cmpq %rbx, %rax
jbe 0x3eaf9
movq 0x159e7(%rip), %rcx     # 0x54430
movl 0x159f1(%rip), %edx     # 0x54440
movq 0x159e2(%rip), %rsi     # 0x54438
leaq 0x4(%rbx), %r8
movl (%rbx), %r9d
cmpq %rax, %r8
jbe 0x3ea67
movq %r8, %rdi
jmp 0x3eab8
addl %edx, %r9d
movslq %r9d, %rdi
movl (%rcx,%rdi,4), %r10d
movq %r8, %rdi
movq %r8, %r9
movl (%r9), %r14d
leal (%r14,%rdx), %r11d
movslq %r11d, %r11
movl (%rcx,%r11,4), %r11d
cmpl %r10d, %r11d
jge 0x3ea97
movl (%rbx), %edi
movl %edi, (%r9)
movl %r14d, (%rbx)
movq %r8, %rdi
jmp 0x3eaa9
jne 0x3eaa6
movl (%rdi), %r11d
movl %r11d, (%r9)
movl %r14d, (%rdi)
addq $0x4, %rdi
movl %r10d, %r11d
addq $0x4, %r9
movl %r11d, %r10d
cmpq %rax, %r9
jbe 0x3ea77
movl (%rbx), %r9d
leaq -0x4(%rdi), %r8
movq %r8, %r10
subq %rsi, %r10
shrq $0x2, %r10
movslq %r9d, %r9
movl %r10d, (%rcx,%r9,4)
cmpq %r8, %rbx
je 0x3eae5
movslq 0x4(%rbx), %r9
addq $0x4, %rbx
movl %r10d, (%rcx,%r9,4)
cmpq %r8, %rbx
jb 0x3ead2
jmp 0x3eaeb
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
movq %rdi, %rbx
cmpq %rax, %rdi
jb 0x3ea56
jmp 0x3eafc
movq %rbx, %rdi
cmpq %rax, %rdi
jne 0x3eb22
movq %rax, %rcx
subq 0x1592d(%rip), %rcx     # 0x54438
shrq $0x2, %rcx
movq 0x1591a(%rip), %rdx     # 0x54430
movslq (%rax), %rsi
movl %ecx, (%rdx,%rsi,4)
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)