// File: BenLangmead[P]bowtie/./multikey_qsort.h
// Function: bool assertPartitionedSuf<S2bDnaString>(S2bDnaString const&, unsigned long*, unsigned long, int, int, unsigned long, unsigned long, unsigned long)
bool assertPartitionedSuf(
	const THost& host,
	TIndexOffU *s,
	size_t slen,
	int hi,
	int pivot,
	size_t begin,
	size_t end,
	size_t depth)
{
	size_t hlen = host.length();
	int state = 0; // 0 -> 1st = section, 1 -> < section, 2 -> > section, 3 -> 2nd = section
	for(size_t i = begin; i < end; i++) {
		switch(state) {
		case 0:
			if       (CHAR_AT_SUF(i, depth) < pivot)  { state = 1; break; }
			else if  (CHAR_AT_SUF(i, depth) > pivot)  { state = 2; break; }
			assert_eq(CHAR_AT_SUF(i, depth), pivot);  break;
		case 1:
			if       (CHAR_AT_SUF(i, depth) > pivot)  { state = 2; break; }
			else if  (CHAR_AT_SUF(i, depth) == pivot) { state = 3; break; }
			assert_lt(CHAR_AT_SUF(i, depth), pivot);  break;
		case 2:
			if       (CHAR_AT_SUF(i, depth) == pivot) { state = 3; break; }
			assert_gt(CHAR_AT_SUF(i, depth), pivot);	 break;
		case 3:
			assert_eq(CHAR_AT_SUF(i, depth), pivot);	 break;
		}
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x17c60
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq 0x10(%rbp), %rax
jae 0x39f49
movl -0x34(%rbp), %eax
movq %rax, -0x48(%rbp)
subq $0x3, %rax
ja 0x39f36
movq -0x48(%rbp), %rax
leaq 0x5934(%rip), %rcx      # 0x3f004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x39710
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0x4c(%rbp)
jmp 0x39716
movl -0x1c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x3972a
movl $0x1, -0x34(%rbp)
jmp 0x39f36
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x39761
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0x50(%rbp)
jmp 0x39767
movl -0x1c(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x3977b
movl $0x2, -0x34(%rbp)
jmp 0x39f36
jmp 0x3977d
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x397b4
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0x54(%rbp)
jmp 0x397ba
movl -0x1c(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x20(%rbp), %eax
je 0x3996d
movq 0x107f3(%rip), %rdi     # 0x49fc0
leaq 0x5945(%rip), %rsi      # 0x3f119
callq 0x5360
movq %rax, -0x60(%rbp)
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x39814
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0x64(%rbp)
jmp 0x3981a
movl -0x1c(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x60(%rbp), %rdi
movl -0x64(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq 0x58ff(%rip), %rsi      # 0x3f12f
callq 0x5360
movq %rax, %rdi
leaq -0x2105f(%rip), %rsi    # 0x187e0
callq 0x5120
movq %rax, -0x70(%rbp)
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x3987f
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0x74(%rbp)
jmp 0x39885
movl -0x1c(%rbp), %eax
movl %eax, -0x74(%rbp)
movq -0x70(%rbp), %rdi
movl -0x74(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq -0x2108b(%rip), %rsi    # 0x18810
callq 0x5120
movq %rax, %rdi
leaq 0x588a(%rip), %rsi      # 0x3f134
callq 0x5360
movq %rax, %rdi
movl -0x20(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq 0x586b(%rip), %rsi      # 0x3f12f
callq 0x5360
movq %rax, %rdi
leaq -0x210f3(%rip), %rsi    # 0x187e0
callq 0x5120
movq %rax, %rdi
movl -0x20(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq -0x210dd(%rip), %rsi    # 0x18810
callq 0x5120
movq %rax, %rdi
leaq 0x7cbc(%rip), %rsi      # 0x415b8
callq 0x5360
movq %rax, %rdi
movq 0x10675(%rip), %rsi     # 0x49f80
callq 0x53c0
movq 0x106a9(%rip), %rdi     # 0x49fc0
leaq 0x8610(%rip), %rsi      # 0x41f2e
callq 0x5360
movq %rax, %rdi
leaq 0x6e5d(%rip), %rsi      # 0x4078a
callq 0x5360
movq %rax, %rdi
movl $0xf4, %esi
callq 0x5750
movq %rax, %rdi
movq 0x10637(%rip), %rsi     # 0x49f80
callq 0x53c0
leaq 0x6d15(%rip), %rdi      # 0x4066a
leaq 0x85d2(%rip), %rsi      # 0x41f2e
movl $0xf4, %edx
leaq 0x93b3(%rip), %rcx      # 0x42d1b
callq 0x51e0
jmp 0x39f36
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x399a9
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0x78(%rbp)
jmp 0x399af
movl -0x1c(%rbp), %eax
movl %eax, -0x78(%rbp)
movl -0x78(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x399c3
movl $0x2, -0x34(%rbp)
jmp 0x39f36
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x399fa
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0x7c(%rbp)
jmp 0x39a00
movl -0x1c(%rbp), %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jne 0x39a14
movl $0x3, -0x34(%rbp)
jmp 0x39f36
jmp 0x39a16
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x39a4d
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0x80(%rbp)
jmp 0x39a53
movl -0x1c(%rbp), %eax
movl %eax, -0x80(%rbp)
movl -0x80(%rbp), %eax
cmpl -0x20(%rbp), %eax
jl 0x39b63
movq 0x1055a(%rip), %rdi     # 0x49fc0
leaq 0x57da(%rip), %rsi      # 0x3f247
callq 0x5360
movq %rax, -0x88(%rbp)
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x39ab3
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0x8c(%rbp)
jmp 0x39abc
movl -0x1c(%rbp), %eax
movl %eax, -0x8c(%rbp)
movq -0x88(%rbp), %rdi
movl -0x8c(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq 0x5785(%rip), %rsi      # 0x3f25d
callq 0x5360
movq %rax, %rdi
movl -0x20(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq 0x7ac6(%rip), %rsi      # 0x415b8
callq 0x5360
movq %rax, %rdi
movq 0x1047f(%rip), %rsi     # 0x49f80
callq 0x53c0
movq 0x104b3(%rip), %rdi     # 0x49fc0
leaq 0x841a(%rip), %rsi      # 0x41f2e
callq 0x5360
movq %rax, %rdi
leaq 0x6c67(%rip), %rsi      # 0x4078a
callq 0x5360
movq %rax, %rdi
movl $0xf8, %esi
callq 0x5750
movq %rax, %rdi
movq 0x10441(%rip), %rsi     # 0x49f80
callq 0x53c0
leaq 0x6b1f(%rip), %rdi      # 0x4066a
leaq 0x83dc(%rip), %rsi      # 0x41f2e
movl $0xf8, %edx
leaq 0x91bd(%rip), %rcx      # 0x42d1b
callq 0x51e0
jmp 0x39f36
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x39ba2
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0x90(%rbp)
jmp 0x39bab
movl -0x1c(%rbp), %eax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %eax
cmpl -0x20(%rbp), %eax
jne 0x39bc2
movl $0x3, -0x34(%rbp)
jmp 0x39f36
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x39bfc
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0x94(%rbp)
jmp 0x39c05
movl -0x1c(%rbp), %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %eax
cmpl -0x20(%rbp), %eax
jg 0x39d18
movq 0x103a5(%rip), %rdi     # 0x49fc0
leaq 0x54d6(%rip), %rsi      # 0x3f0f8
callq 0x5360
movq %rax, -0xa0(%rbp)
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x39c68
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0xa4(%rbp)
jmp 0x39c71
movl -0x1c(%rbp), %eax
movl %eax, -0xa4(%rbp)
movq -0xa0(%rbp), %rdi
movl -0xa4(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq 0x5481(%rip), %rsi      # 0x3f10e
callq 0x5360
movq %rax, %rdi
movl -0x20(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq 0x7911(%rip), %rsi      # 0x415b8
callq 0x5360
movq %rax, %rdi
movq 0x102ca(%rip), %rsi     # 0x49f80
callq 0x53c0
movq 0x102fe(%rip), %rdi     # 0x49fc0
leaq 0x8265(%rip), %rsi      # 0x41f2e
callq 0x5360
movq %rax, %rdi
leaq 0x6ab2(%rip), %rsi      # 0x4078a
callq 0x5360
movq %rax, %rdi
movl $0xfb, %esi
callq 0x5750
movq %rax, %rdi
movq 0x1028c(%rip), %rsi     # 0x49f80
callq 0x53c0
leaq 0x696a(%rip), %rdi      # 0x4066a
leaq 0x8227(%rip), %rsi      # 0x41f2e
movl $0xfb, %edx
leaq 0x9008(%rip), %rcx      # 0x42d1b
callq 0x51e0
jmp 0x39f36
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x39d57
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0xa8(%rbp)
jmp 0x39d60
movl -0x1c(%rbp), %eax
movl %eax, -0xa8(%rbp)
movl -0xa8(%rbp), %eax
cmpl -0x20(%rbp), %eax
je 0x39f34
movq 0x1024a(%rip), %rdi     # 0x49fc0
leaq 0x539c(%rip), %rsi      # 0x3f119
callq 0x5360
movq %rax, -0xb0(%rbp)
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x39dc3
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0xb4(%rbp)
jmp 0x39dcc
movl -0x1c(%rbp), %eax
movl %eax, -0xb4(%rbp)
movq -0xb0(%rbp), %rdi
movl -0xb4(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq 0x5347(%rip), %rsi      # 0x3f12f
callq 0x5360
movq %rax, %rdi
leaq -0x21617(%rip), %rsi    # 0x187e0
callq 0x5120
movq %rax, -0xc0(%rbp)
movq 0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x40(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
cmpq -0x30(%rbp), %rax
jae 0x39e3d
movq -0x8(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
addq (%rax,%rcx,8), %rsi
callq 0x356a0
movsbl %al, %eax
movl %eax, -0xc4(%rbp)
jmp 0x39e46
movl -0x1c(%rbp), %eax
movl %eax, -0xc4(%rbp)
movq -0xc0(%rbp), %rdi
movl -0xc4(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq -0x21652(%rip), %rsi    # 0x18810
callq 0x5120
movq %rax, %rdi
leaq 0x52c3(%rip), %rsi      # 0x3f134
callq 0x5360
movq %rax, %rdi
movl -0x20(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq 0x52a4(%rip), %rsi      # 0x3f12f
callq 0x5360
movq %rax, %rdi
leaq -0x216ba(%rip), %rsi    # 0x187e0
callq 0x5120
movq %rax, %rdi
movl -0x20(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq -0x216a4(%rip), %rsi    # 0x18810
callq 0x5120
movq %rax, %rdi
leaq 0x76f5(%rip), %rsi      # 0x415b8
callq 0x5360
movq %rax, %rdi
movq 0x100ae(%rip), %rsi     # 0x49f80
callq 0x53c0
movq 0x100e2(%rip), %rdi     # 0x49fc0
leaq 0x8049(%rip), %rsi      # 0x41f2e
callq 0x5360
movq %rax, %rdi
leaq 0x6896(%rip), %rsi      # 0x4078a
callq 0x5360
movq %rax, %rdi
movl $0xfd, %esi
callq 0x5750
movq %rax, %rdi
movq 0x10070(%rip), %rsi     # 0x49f80
callq 0x53c0
leaq 0x674e(%rip), %rdi      # 0x4066a
leaq 0x800b(%rip), %rsi      # 0x41f2e
movl $0xfd, %edx
leaq 0x8dec(%rip), %rcx      # 0x42d1b
callq 0x51e0
jmp 0x39f36
jmp 0x39f38
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x396a6
movb $0x1, %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)