// File: /workspace/github_cpp_makefile_star2_O3/BenLangmead[P]bowtie/./multikey_qsort.h
// Function: void sanityCheckOrderedSufs<S2bDnaString>(S2bDnaString const&, unsigned long, unsigned long*, unsigned long, unsigned long, unsigned long, unsigned long)
void sanityCheckOrderedSufs(const T& host,
                            size_t hlen,
                            TIndexOffU *s,
                            size_t slen,
                            size_t upto,
                            size_t lower = 0,
                            size_t upper = OFF_MASK)
{
	assert_lt(s[0], hlen);
	upper = min<size_t>(upper, slen-1);
	for(size_t i = lower; i < upper; i++) {
		// Allow s[i+t] to point off the end of the string; this is
		// convenient for some callers
		if(s[i+1] >= hlen) continue;
#ifndef NDEBUG
		if(upto == OFF_MASK) {
			assert(sstr_suf_lt(host, s[i], hlen, host, s[i+1], hlen, false));
		} else {
			if(sstr_suf_upto_lt(host, s[i], host, s[i+1], upto, false)) {
				// operator > treats shorter strings as
				// lexicographically smaller, but we want to opposite
				//assert(isPrefix(suffix(host, s[i+1]), suffix(host, s[i])));
			}
		}
#endif
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x18(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
cmpq %rsi, (%rdx)
jae 0x243d6
movq %r9, %r12
movq 0x60(%rsp), %rax
decq %rcx
cmpq %rax, %rcx
cmovaeq %rax, %rcx
cmpq %r9, %rcx
jbe 0x24260
movq %rdi, %rbx
movq %rcx, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rax,%r12,8), %r13
cmpq 0x8(%rsp), %r13
jae 0x2424f
movq 0x10(%rsp), %rax
movq (%rax,%r12,8), %r14
cmpq $-0x1, 0x18(%rsp)
je 0x2422e
movq 0x18(%rbx), %r15
movq %r15, %rax
subq %r14, %rax
jb 0x24313
subq %r13, %r15
jb 0x2426f
movq 0x18(%rsp), %rcx
cmpq %rcx, %r15
cmovaeq %rcx, %r15
cmpq %rax, %r15
cmovaeq %rax, %r15
testq %r15, %r15
je 0x2424f
decq %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x25e5e
movl %eax, %ebp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x25e5e
cmpb %al, %bpl
jl 0x2424f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x25e5e
movl %eax, %ebp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x25e5e
subq $0x1, %r15
setb %cl
cmpb %al, %bpl
jg 0x2424f
incq %r13
incq %r14
testb %cl, %cl
je 0x241e1
jmp 0x2424f
movq %rbx, %rdi
movq %r14, %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rcx
movq %r13, %r8
movq %rdx, %r9
callq 0xf3e8
testb %al, %al
je 0x243b7
incq %r12
movq 0x20(%rsp), %rcx
cmpq %rcx, %r12
jne 0x24183
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x12d42(%rip), %r14     # 0x36fb8
leaq 0x7fd3(%rip), %rsi      # 0x2c250
movq %r14, %rdi
callq 0x4310
movq %rax, %rdi
movq %r13, %rsi
callq 0x40c0
leaq 0x7fd0(%rip), %rsi      # 0x2c267
movq %rax, %rdi
callq 0x4310
movq 0x18(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0xa0f3(%rip), %rsi      # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xaee5(%rip), %rbx      # 0x2f1ae
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x94cd(%rip), %rsi      # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0xe8, %esi
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x9389(%rip), %rdi      # 0x2d688
leaq 0xb56e(%rip), %rcx      # 0x2f874
movq %rbx, %rsi
movl $0xe8, %edx
callq 0x41c0
movq 0x12c9e(%rip), %r15     # 0x36fb8
leaq 0x7f2f(%rip), %rsi      # 0x2c250
movq %r15, %rdi
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0x7f2c(%rip), %rsi      # 0x2c267
movq %rax, %rdi
callq 0x4310
movq 0x18(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0xa04f(%rip), %rsi      # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xae41(%rip), %rbx      # 0x2f1ae
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x9429(%rip), %rsi      # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0xe7, %esi
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x92e5(%rip), %rdi      # 0x2d688
leaq 0xb4ca(%rip), %rcx      # 0x2f874
movq %rbx, %rsi
movl $0xe7, %edx
callq 0x41c0
leaq 0xb47d(%rip), %rdi      # 0x2f83b
leaq 0xa8e5(%rip), %rsi      # 0x2ecaa
leaq 0xb3ff(%rip), %rcx      # 0x2f7cb
movl $0x15a, %edx            # imm = 0x15A
callq 0x41c0
movq 0x12bdb(%rip), %rbx     # 0x36fb8
leaq 0x7f10(%rip), %rsi      # 0x2c2f4
movq %rbx, %rdi
callq 0x4310
movq 0x10(%rsp), %rcx
movq (%rcx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x7f07(%rip), %rsi      # 0x2c30a
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq 0x8(%rsp), %rsi
callq 0x40c0
leaq 0x9f86(%rip), %rsi      # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xa874(%rip), %r14      # 0x2ecaa
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x9360(%rip), %rsi      # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x152, %esi            # imm = 0x152
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x921c(%rip), %rdi      # 0x2d688
leaq 0xb358(%rip), %rcx      # 0x2f7cb
movq %r14, %rsi
movl $0x152, %edx            # imm = 0x152
callq 0x41c0