// File: /workspace/github_cpp_makefile_star2_O1/BenLangmead[P]bowtie/./multikey_qsort.h
// Function: void qsortSufDcU8<S2bDnaString, S2bDnaString>(S2bDnaString const&, S2bDnaString const&, unsigned long, unsigned long*, unsigned long, DifferenceCoverSample<S2bDnaString> const&, unsigned long, unsigned long, bool)
inline
void qsortSufDcU8(const T1& host1,
                  const T2& host,
                  size_t hlen,
                  TIndexOffU* s,
                  size_t slen,
                  const DifferenceCoverSample<T1>& dc,
                  size_t begin,
                  size_t end,
                  bool sanityCheck = false)
{
	assert_leq(end, slen);
	assert_lt(begin, slen);
	assert_gt(end, begin);
	size_t n = end - begin;
	if(n <= 1) return;                 // 1-element list already sorted
	// Note: rand() didn't really cut it here; it seemed to run out of
	// randomness and, after a time, returned the same thing over and
	// over again
	size_t a = (rand() % n) + begin; // choose pivot between begin and end
	assert_lt(a, end);
	assert_geq(a, begin);
	SWAP(s, end-1, a); // move pivot to end
	size_t cur = 0;
	for(size_t i = begin; i < end-1; i++) {
		if(sufDcLtU8(host1, host, hlen, s[i], s[end-1], dc, sanityCheck)) {
#ifndef NDEBUG
			if(sanityCheck) {
				assert(sstr_suf_lt(host1, s[i], hlen, host1, s[end-1], hlen, false));
			}
			assert_lt(begin + cur, end-1);

#endif
			SWAP(s, i, begin + cur);
			cur++;
		}
	}
	// Put pivot into place
	assert_lt(cur, end-begin);
	SWAP(s, end-1, begin+cur);
	if(begin+cur > begin) qsortSufDcU8(host1, host, hlen, s, slen, dc, begin, begin+cur);
	if(end > begin+cur+1) qsortSufDcU8(host1, host, hlen, s, slen, dc, begin+cur+1, end);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, 0x30(%rsp)
movq %r8, %r12
movq %rcx, %rbp
movq %rdx, 0x20(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdi, 0x18(%rsp)
movb 0x90(%rsp), %al
movl %eax, 0xc(%rsp)
movq 0x88(%rsp), %r15
movq 0x80(%rsp), %rax
leaq -0x1(%r15), %r13
cmpq %r12, %r15
ja 0x256ef
cmpq %r12, %rax
jae 0x25649
movq %r15, %r14
subq %rax, %r14
jbe 0x255a3
cmpq $0x2, %r14
jb 0x25379
movq %rax, 0x10(%rsp)
callq 0x40e0
cltq
xorl %edx, %edx
divq %r14
movq %r15, %rax
movq 0x10(%rsp), %r15
movq %rdx, %rbx
addq %r15, %rbx
cmpq %rax, %rbx
jae 0x25835
movq %r14, 0x38(%rsp)
cmpq %r15, %rbx
jb 0x25792
cmpq %r15, %r13
jb 0x258dd
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0xede5
cmpq %r15, %r13
movq %r15, %r14
movq 0x88(%rsp), %r15
jbe 0x252ed
movzbl 0xc(%rsp), %eax
andl $0x1, %eax
movq %rax, 0x40(%rsp)
xorl %ebx, %ebx
movq (%rbp,%r14,8), %rcx
movq -0x8(%rbp,%r15,8), %r8
subq $0x8, %rsp
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x38(%rsp), %r9
pushq 0x48(%rsp)
callq 0x25af0
addq $0x10, %rsp
testb %al, %al
je 0x252df
testb $0x1, 0xc(%rsp)
je 0x2527f
movq (%rbp,%r14,8), %rsi
movq -0x8(%rbp,%r15,8), %r8
movq 0x18(%rsp), %rcx
movq %rcx, %rdi
movq 0x20(%rsp), %rdx
movq %rdx, %r9
callq 0xf567
testb %al, %al
je 0x25584
movq 0x10(%rsp), %rax
leaq (%rbx,%rax), %r15
cmpq %r13, %r15
jae 0x253c8
cmpq %rax, %r14
jb 0x2546b
cmpq %rax, %r15
jb 0x254a6
movq %r12, %rcx
movq 0x88(%rsp), %r12
cmpq %r12, %r14
jae 0x254e1
cmpq %r12, %r15
jae 0x25388
movq %rbp, %rdi
movq %rcx, %r12
movq %rcx, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0xede5
incq %rbx
movq 0x88(%rsp), %r15
incq %r14
cmpq %r14, %r13
jne 0x2521a
jmp 0x252ef
xorl %ebx, %ebx
movq 0x38(%rsp), %r15
cmpq %r15, %rbx
jae 0x25a4d
movq 0x10(%rsp), %r15
addq %r15, %rbx
jb 0x259aa
movq 0x88(%rsp), %r15
cmpq %r15, %rbx
jae 0x25980
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0xede5
movq 0x10(%rsp), %rax
cmpq %rax, %rbx
jbe 0x25362
subq $0x8, %rsp
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rbp, %rcx
movq %r12, %r8
movq 0x38(%rsp), %r9
pushq $0x0
pushq %rbx
pushq %rax
callq 0x25138
addq $0x20, %rsp
incq %rbx
movl $0x0, 0xc(%rsp)
movq %rbx, %rax
cmpq %r15, %rbx
jb 0x2517f
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x11c29(%rip), %rbx     # 0x36fb8
leaq 0x7ece(%rip), %rsi      # 0x2d264
movq %rbx, %rdi
callq 0x4310
movq %rax, %rdi
movq %r15, %rsi
callq 0x40c0
leaq 0x7eca(%rip), %rsi      # 0x2d27a
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq 0x88(%rsp), %rsi
jmp 0x25517
movq 0x11be9(%rip), %rbx     # 0x36fb8
leaq 0x7e8e(%rip), %rsi      # 0x2d264
movq %rbx, %rdi
callq 0x4310
movq %rax, %rdi
movq %r15, %rsi
callq 0x40c0
leaq 0x7e8a(%rip), %rsi      # 0x2d27a
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %r13, %rsi
callq 0x40c0
leaq 0x9f0b(%rip), %rsi      # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xa7f9(%rip), %r14      # 0x2fc1a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x92e5(%rip), %rsi      # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x335, %esi            # imm = 0x335
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x91a1(%rip), %rdi      # 0x2e5f8
leaq 0xa98b(%rip), %rcx      # 0x2fde9
movq %r14, %rsi
movl $0x335, %edx            # imm = 0x335
callq 0x41c0
movq 0x11b46(%rip), %rbx     # 0x36fb8
leaq 0x7da9(%rip), %rsi      # 0x2d222
movq %rbx, %rdi
movq %rax, %r15
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0x7da3(%rip), %rsi      # 0x2d239
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %r15, %rsi
jmp 0x25517
movq 0x11b0b(%rip), %rbx     # 0x36fb8
leaq 0x7d6e(%rip), %rsi      # 0x2d222
movq %rbx, %rdi
movq %rax, %r14
callq 0x4310
movq %rax, %rdi
movq %r15, %rsi
callq 0x40c0
leaq 0x7d68(%rip), %rsi      # 0x2d239
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
jmp 0x25517
movq 0x11ad0(%rip), %rbx     # 0x36fb8
leaq 0x7d75(%rip), %rsi      # 0x2d264
movq %rbx, %rdi
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0x7d71(%rip), %rsi      # 0x2d27a
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %r12, %rsi
callq 0x40c0
leaq 0x9df2(%rip), %rsi      # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xa6e0(%rip), %r14      # 0x2fc1a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x91cc(%rip), %rsi      # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x338, %esi            # imm = 0x338
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x9088(%rip), %rdi      # 0x2e5f8
leaq 0xa872(%rip), %rcx      # 0x2fde9
movq %r14, %rsi
movl $0x338, %edx            # imm = 0x338
callq 0x41c0
leaq 0xa906(%rip), %rdi      # 0x2fe91
leaq 0xa688(%rip), %rsi      # 0x2fc1a
leaq 0xa850(%rip), %rcx      # 0x2fde9
movl $0x333, %edx            # imm = 0x333
callq 0x41c0
movq 0x11a0e(%rip), %rbx     # 0x36fb8
leaq 0x7b64(%rip), %rsi      # 0x2d115
movq %rbx, %rdi
movq %rax, %r14
callq 0x4310
movq %rax, %rdi
movq %r15, %rsi
callq 0x40c0
leaq 0x7b5d(%rip), %rsi      # 0x2d12b
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0x9d2d(%rip), %rsi      # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xa61b(%rip), %r14      # 0x2fc1a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x9107(%rip), %rsi      # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x324, %esi            # imm = 0x324
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x8fc3(%rip), %rdi      # 0x2e5f8
leaq 0xa7ad(%rip), %rcx      # 0x2fde9
movq %r14, %rsi
movl $0x324, %edx            # imm = 0x324
callq 0x41c0
movq 0x11968(%rip), %rbx     # 0x36fb8
leaq 0x7c0d(%rip), %rsi      # 0x2d264
movq %rbx, %rdi
movq %rax, %r14
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0x7c06(%rip), %rsi      # 0x2d27a
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %r12, %rsi
callq 0x40c0
leaq 0x9c87(%rip), %rsi      # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xa575(%rip), %r14      # 0x2fc1a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x9061(%rip), %rsi      # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x323, %esi            # imm = 0x323
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x8f1d(%rip), %rdi      # 0x2e5f8
leaq 0xa707(%rip), %rcx      # 0x2fde9
movq %r14, %rsi
movl $0x323, %edx            # imm = 0x323
callq 0x41c0
movq 0x118c2(%rip), %rbx     # 0x36fb8
leaq 0x7ac3(%rip), %rsi      # 0x2d1c0
movq %rbx, %rdi
callq 0x4310
movq %rax, %rdi
movq %r15, %rsi
callq 0x40c0
leaq 0x7ac0(%rip), %rsi      # 0x2d1d7
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %r12, %rsi
callq 0x40c0
leaq 0x9be4(%rip), %rsi      # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xa4d2(%rip), %r14      # 0x2fc1a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x8fbe(%rip), %rsi      # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x322, %esi            # imm = 0x322
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x8e7a(%rip), %rdi      # 0x2e5f8
leaq 0xa664(%rip), %rcx      # 0x2fde9
movq %r14, %rsi
movl $0x322, %edx            # imm = 0x322
callq 0x41c0
movq 0x1181f(%rip), %r14     # 0x36fb8
leaq 0x7a82(%rip), %rsi      # 0x2d222
movq %r14, %rdi
callq 0x4310
movq %rax, %rdi
movq %rbx, %rsi
callq 0x40c0
leaq 0x7a7f(%rip), %rsi      # 0x2d239
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %r15, %rsi
callq 0x40c0
leaq 0x9b41(%rip), %rsi      # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xa42f(%rip), %rbx      # 0x2fc1a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x8f1b(%rip), %rsi      # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x32c, %esi            # imm = 0x32C
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x8dd7(%rip), %rdi      # 0x2e5f8
leaq 0xa5c1(%rip), %rcx      # 0x2fde9
movq %rbx, %rsi
movl $0x32c, %edx            # imm = 0x32C
callq 0x41c0
movq 0x1177c(%rip), %r14     # 0x36fb8
leaq 0x7a21(%rip), %rsi      # 0x2d264
movq %r14, %rdi
callq 0x4310
movq %rax, %rdi
movq %rbx, %rsi
callq 0x40c0
leaq 0x7a1d(%rip), %rsi      # 0x2d27a
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq 0x88(%rsp), %rsi
callq 0x40c0
leaq 0x9a99(%rip), %rsi      # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xa387(%rip), %rbx      # 0x2fc1a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x8e73(%rip), %rsi      # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x32b, %esi            # imm = 0x32B
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x8d2f(%rip), %rdi      # 0x2e5f8
leaq 0xa519(%rip), %rcx      # 0x2fde9
movq %rbx, %rsi
movl $0x32b, %edx            # imm = 0x32B
callq 0x41c0
movq 0x116d4(%rip), %rbx     # 0x36fb8
leaq 0x7937(%rip), %rsi      # 0x2d222
movq %rbx, %rdi
callq 0x4310
movq %rax, %rdi
movq %r13, %rsi
callq 0x40c0
leaq 0x7934(%rip), %rsi      # 0x2d239
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %r15, %rsi
callq 0x40c0
leaq 0x99f6(%rip), %rsi      # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xa2e4(%rip), %r14      # 0x2fc1a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x8dd0(%rip), %rsi      # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x32d, %esi            # imm = 0x32D
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x8c8c(%rip), %rdi      # 0x2e5f8
leaq 0xa476(%rip), %rcx      # 0x2fde9
movq %r14, %rsi
movl $0x32d, %edx            # imm = 0x32D
callq 0x41c0
movq 0x11631(%rip), %r14     # 0x36fb8
leaq 0x78d6(%rip), %rsi      # 0x2d264
movq %r14, %rdi
callq 0x4310
movq %rax, %rdi
movq %rbx, %rsi
callq 0x40c0
leaq 0x78d2(%rip), %rsi      # 0x2d27a
jmp 0x259d2
movq 0x11607(%rip), %r14     # 0x36fb8
leaq 0x786a(%rip), %rsi      # 0x2d222
movq %r14, %rdi
callq 0x4310
movq %rax, %rdi
movq %rbx, %rsi
callq 0x40c0
leaq 0x7867(%rip), %rsi      # 0x2d239
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %r15, %rsi
callq 0x40c0
leaq 0x9929(%rip), %rsi      # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xa217(%rip), %rbx      # 0x2fc1a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x8d03(%rip), %rsi      # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x33e, %esi            # imm = 0x33E
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x8bbf(%rip), %rdi      # 0x2e5f8
leaq 0xa3a9(%rip), %rcx      # 0x2fde9
movq %rbx, %rsi
movl $0x33e, %edx            # imm = 0x33E
callq 0x41c0
movq 0x11564(%rip), %r14     # 0x36fb8
leaq 0x7809(%rip), %rsi      # 0x2d264
movq %r14, %rdi
callq 0x4310
movq %rax, %rdi
movq %rbx, %rsi
callq 0x40c0
leaq 0x7805(%rip), %rsi      # 0x2d27a
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq %r15, %rsi
callq 0x40c0
leaq 0x9886(%rip), %rsi      # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xa174(%rip), %rbx      # 0x2fc1a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x8c60(%rip), %rsi      # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x33d, %esi            # imm = 0x33D
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x8b1c(%rip), %rdi      # 0x2e5f8
leaq 0xa306(%rip), %rcx      # 0x2fde9
movq %rbx, %rsi
movl $0x33d, %edx            # imm = 0x33D
callq 0x41c0