// File: /workspace/github_cpp_makefile_star2_O1/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 0x24d1e
movq %r9, %r12
movq 0x60(%rsp), %rax
decq %rcx
cmpq %rax, %rcx
cmovaeq %rax, %rcx
cmpq %r9, %rcx
jbe 0x24ba8
movq %rdi, %rbx
movq %rcx, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rax,%r12,8), %r13
cmpq 0x8(%rsp), %r13
jae 0x24b97
movq 0x10(%rsp), %rax
movq (%rax,%r12,8), %r14
cmpq $-0x1, 0x18(%rsp)
je 0x24b76
movq 0x18(%rbx), %r15
movq %r15, %rax
subq %r14, %rax
jb 0x24c5b
subq %r13, %r15
jb 0x24bb7
movq 0x18(%rsp), %rcx
cmpq %rcx, %r15
cmovaeq %rcx, %r15
cmpq %rax, %r15
cmovaeq %rax, %r15
testq %r15, %r15
je 0x24b97
decq %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x268fa
movl %eax, %ebp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x268fa
cmpb %al, %bpl
jl 0x24b97
movq %rbx, %rdi
movq %r14, %rsi
callq 0x268fa
movl %eax, %ebp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x268fa
subq $0x1, %r15
setb %cl
cmpb %al, %bpl
jg 0x24b97
incq %r13
incq %r14
testb %cl, %cl
je 0x24b29
jmp 0x24b97
movq %rbx, %rdi
movq %r14, %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rcx
movq %r13, %r8
movq %rdx, %r9
callq 0xf567
testb %al, %al
je 0x24cff
incq %r12
movq 0x20(%rsp), %rcx
cmpq %rcx, %r12
jne 0x24acb
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x123fa(%rip), %r14     # 0x36fb8
leaq 0x85fb(%rip), %rsi      # 0x2d1c0
movq %r14, %rdi
callq 0x4310
movq %rax, %rdi
movq %r13, %rsi
callq 0x40c0
leaq 0x85f8(%rip), %rsi      # 0x2d1d7
movq %rax, %rdi
callq 0x4310
movq 0x18(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0xa71b(%rip), %rsi      # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xb50d(%rip), %rbx      # 0x3011e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x9af5(%rip), %rsi      # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0xe8, %esi
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x99b1(%rip), %rdi      # 0x2e5f8
leaq 0xbb96(%rip), %rcx      # 0x307e4
movq %rbx, %rsi
movl $0xe8, %edx
callq 0x41c0
movq 0x12356(%rip), %r15     # 0x36fb8
leaq 0x8557(%rip), %rsi      # 0x2d1c0
movq %r15, %rdi
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0x8554(%rip), %rsi      # 0x2d1d7
movq %rax, %rdi
callq 0x4310
movq 0x18(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0xa677(%rip), %rsi      # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xb469(%rip), %rbx      # 0x3011e
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x9a51(%rip), %rsi      # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0xe7, %esi
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x990d(%rip), %rdi      # 0x2e5f8
leaq 0xbaf2(%rip), %rcx      # 0x307e4
movq %rbx, %rsi
movl $0xe7, %edx
callq 0x41c0
leaq 0xbaa5(%rip), %rdi      # 0x307ab
leaq 0xaf0d(%rip), %rsi      # 0x2fc1a
leaq 0xba27(%rip), %rcx      # 0x3073b
movl $0x15a, %edx            # imm = 0x15A
callq 0x41c0
movq 0x12293(%rip), %rbx     # 0x36fb8
leaq 0x8538(%rip), %rsi      # 0x2d264
movq %rbx, %rdi
callq 0x4310
movq 0x10(%rsp), %rcx
movq (%rcx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x852f(%rip), %rsi      # 0x2d27a
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movq 0x8(%rsp), %rsi
callq 0x40c0
leaq 0xa5ae(%rip), %rsi      # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0xae9c(%rip), %r14      # 0x2fc1a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x9988(%rip), %rsi      # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x152, %esi            # imm = 0x152
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x9844(%rip), %rdi      # 0x2e5f8
leaq 0xb980(%rip), %rcx      # 0x3073b
movq %r14, %rsi
movl $0x152, %edx            # imm = 0x152
callq 0x41c0