// File: /workspace/github_cpp_makefile_star2_O3/BenLangmead[P]bowtie/./ebwt.h
// Function: Ebwt::sanityCheckAll(int) const
void Ebwt::sanityCheckAll(int reverse) const {
	const EbwtParams& eh = this->_eh;
	assert(isInMemory());
	// Check ftab
	for(TIndexOffU i = 1; i < eh._ftabLen; i++) {
		assert_geq(this->ftabHi(i), this->ftabLo(i-1));
		assert_geq(this->ftabLo(i), this->ftabHi(i-1));
		assert_leq(this->ftabHi(i), eh._bwtLen+1);
	}
	assert_eq(this->ftabHi(eh._ftabLen-1), eh._bwtLen);

	// Check offs
	TIndexOff seenLen = (eh._bwtLen + 31) >> ((TIndexOffU)5);
	TIndexOff *seen;
	try {
		seen = new TIndexOff[seenLen]; // bitvector marking seen offsets
	} catch(bad_alloc& e) {
		cerr << "Out of memory allocating seen[] at " << __FILE__ << ":" << __LINE__ << endl;
		throw e;
	}
	memset(seen, 0, OFF_SIZE * seenLen);
	TIndexOffU offsLen = eh._offsLen;
	for(TIndexOffU i = 0; i < offsLen; i++) {
		assert_lt(this->_offs[i], eh._bwtLen);
		TIndexOff w = this->_offs[i] >> 5;
		TIndexOff r = this->_offs[i] & 31;
		assert_eq(0, (seen[w] >> r) & 1); // shouldn't have been seen before
		seen[w] |= (1 << r);
	}
	delete[] seen;

	// Check nPat
	assert_gt(this->_nPat, 0);

	// Check plen, flen
	for(TIndexOffU i = 0; i < this->_nPat; i++) {
		assert_geq(this->_plen[i], 0);
	}

	// Check rstarts
	for(TIndexOffU i = 0; i < this->_nFrag-1; i++) {
		assert_gt(this->_rstarts[(i+1)*3], this->_rstarts[i*3]);
		if(reverse == REF_READ_REVERSE) {
			assert(this->_rstarts[(i*3)+1] >= this->_rstarts[((i+1)*3)+1]);
		} else {
			assert(this->_rstarts[(i*3)+1] <= this->_rstarts[((i+1)*3)+1]);
		}
	}

	// Check ebwt
	sanityCheckUpToSide(eh._numSides);
	VMSG_NL("Ebwt::sanityCheck passed");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movl %esi, %ebp
movq %rdi, %rbx
callq 0xf948
testb %al, %al
je 0x6959
movq 0x158(%rbx), %rcx
cmpq $0x2, %rcx
jb 0x6262
movl $0x1, %r14d
movq 0xa8(%rbx), %rdi
movq 0xb0(%rbx), %rsi
movq 0x108(%rbx), %rdx
movl 0x14c(%rbx), %r8d
movq %r14, %r9
callq 0x181f0
movq %rax, %r12
leaq -0x1(%r14), %r15
movq 0xa8(%rbx), %rdi
movq 0xb0(%rbx), %rsi
movq 0x108(%rbx), %rdx
movq 0x158(%rbx), %rcx
movl 0x14c(%rbx), %r8d
movq %r15, %r9
callq 0x18370
cmpq %rax, %r12
jb 0x679d
movq 0xa8(%rbx), %rdi
movq 0xb0(%rbx), %rsi
movq 0x108(%rbx), %rdx
movq 0x158(%rbx), %rcx
movl 0x14c(%rbx), %r8d
movq %r14, %r9
callq 0x18370
movq %rax, %r12
movq 0xa8(%rbx), %rdi
movq 0xb0(%rbx), %rsi
movq 0x108(%rbx), %rdx
movq 0x158(%rbx), %rcx
movl 0x14c(%rbx), %r8d
movq %r15, %r9
callq 0x181f0
cmpq %rax, %r12
jb 0x685c
movq 0xa8(%rbx), %rdi
movq 0xb0(%rbx), %rsi
movq 0x108(%rbx), %rdx
movq 0x158(%rbx), %rcx
movl 0x14c(%rbx), %r8d
movq %r14, %r9
callq 0x181f0
movq 0x110(%rbx), %rcx
incq %rcx
cmpq %rcx, %rax
ja 0x66e5
incq %r14
movq 0x158(%rbx), %rcx
cmpq %rcx, %r14
jb 0x6150
leaq -0x1(%rcx), %r9
movq 0xa8(%rbx), %rdi
movq 0xb0(%rbx), %rsi
movq 0x108(%rbx), %rdx
movl 0x14c(%rbx), %r8d
callq 0x181f0
cmpq 0x110(%rbx), %rax
jne 0x6978
movq %rax, %r14
movl %ebp, 0xc(%rsp)
leaq 0x1f(%rax), %r15
shrq $0x2, %r15
andq $-0x8, %r15
movq %r15, %rdi
callq 0x4030
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x4190
movq 0x168(%rbx), %rax
testq %rax, %rax
je 0x6319
movq 0xb8(%rbx), %rdx
xorl %ebp, %ebp
movq (%rdx,%rbp,8), %rcx
cmpq %r14, %rcx
jae 0x6582
movq %rcx, %rsi
shrq $0x5, %rsi
movl %ecx, %r15d
andl $0x1f, %r15d
movq (%r12,%rsi,8), %r13
btl %ecx, %r13d
jb 0x644f
movl $0x1, %edi
movl %r15d, %ecx
shll %cl, %edi
movslq %edi, %rcx
orq %rcx, %r13
movq %r13, (%r12,%rsi,8)
incq %rbp
cmpq %rbp, %rax
jne 0x62d4
movq %r12, %rdi
callq 0x4420
cmpq $0x0, 0x80(%rbx)
je 0x6ad6
movq 0x88(%rbx), %rax
decq %rax
movl 0xc(%rsp), %edi
je 0x6383
movq 0x98(%rbx), %rcx
xorl %r15d, %r15d
movq 0x18(%rcx,%r15), %rdx
cmpq (%rcx,%r15), %rdx
jbe 0x6631
movq 0x8(%rcx,%r15), %rdx
movq 0x20(%rcx,%r15), %rsi
cmpl $0x1, %edi
jne 0x6371
cmpq %rsi, %rdx
jae 0x637a
jmp 0x691b
cmpq %rsi, %rdx
ja 0x693a
addq $0x18, %r15
decq %rax
jne 0x6349
movq 0x1a0(%rbx), %rsi
movq %rbx, %rdi
callq 0x5844
cmpb $0x0, 0xc(%rbx)
je 0x643d
leaq 0x30(%rsp), %rdi
callq 0x41f0
leaq 0x40(%rsp), %r14
leaq 0x25fcc(%rip), %rsi     # 0x2c37e
movl $0x18, %edx
movq %r14, %rdi
callq 0x43b0
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4300
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41e0
leaq 0x48(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x4560
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x100ea
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x641f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x30b3a(%rip), %rsi     # 0x36f60
leaq 0x30(%rsp), %rdi
callq 0x4220
leaq 0xb0(%rsp), %rdi
callq 0x4120
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30b62(%rip), %rbx     # 0x36fb8
leaq 0x25d69(%rip), %rsi     # 0x2c1c6
movq %rbx, %rdi
callq 0x4310
movq %rax, %rdi
xorl %esi, %esi
callq 0x4610
leaq 0x25d66(%rip), %r14     # 0x2c1dc
movq %rax, %rdi
movq %r14, %rsi
callq 0x4310
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
xorl %esi, %esi
callq 0x4610
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x25d25(%rip), %rsi     # 0x2c1e1
movq %rax, %rdi
callq 0x4310
xorl %r12d, %r12d
btl %r15d, %r13d
setb %r12b
movq %rax, %rdi
movq %r12, %rsi
callq 0x4650
movq %rax, %rdi
movq %r14, %rsi
callq 0x4310
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movq %r12, %rsi
callq 0x4650
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x27e84(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x25c32(%rip), %r14     # 0x2c16a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x2725e(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x679, %esi            # imm = 0x679
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x2711a(%rip), %rdi     # 0x2d688
leaq 0x25d18(%rip), %rcx     # 0x2c28d
movq %r14, %rsi
movl $0x679, %edx            # imm = 0x679
callq 0x41c0
movq 0x30a2f(%rip), %r14     # 0x36fb8
leaq 0x25d64(%rip), %rsi     # 0x2c2f4
movq %r14, %rdi
callq 0x4310
movq 0xb8(%rbx), %rcx
movq (%rcx,%rbp,8), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x25d58(%rip), %rsi     # 0x2c30a
movq %rax, %rdi
callq 0x4310
movq 0x110(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x27dd5(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x25b83(%rip), %rbx     # 0x2c16a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x271af(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x676, %esi            # imm = 0x676
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x2706b(%rip), %rdi     # 0x2d688
leaq 0x25c69(%rip), %rcx     # 0x2c28d
movq %rbx, %rsi
movl $0x676, %edx            # imm = 0x676
callq 0x41c0
movq 0x30980(%rip), %r14     # 0x36fb8
leaq 0x25b66(%rip), %rsi     # 0x2c1a5
movq %r14, %rdi
callq 0x4310
movq 0x98(%rbx), %rcx
movq 0x18(%rcx,%r15), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x25b59(%rip), %rsi     # 0x2c1bb
movq %rax, %rdi
callq 0x4310
movq 0x98(%rbx), %rcx
movq (%rcx,%r15), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x27d21(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x25acf(%rip), %rbx     # 0x2c16a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x270fb(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x688, %esi            # imm = 0x688
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x26fb7(%rip), %rdi     # 0x2d688
leaq 0x25bb5(%rip), %rcx     # 0x2c28d
movq %rbx, %rsi
movl $0x688, %edx            # imm = 0x688
callq 0x41c0
movq 0x308cc(%rip), %r15     # 0x36fb8
leaq 0x25b5d(%rip), %rsi     # 0x2c250
movq %r15, %rdi
callq 0x4310
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10082
movq %r12, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x25b4c(%rip), %rsi     # 0x2c267
movq %rax, %rdi
callq 0x4310
movq 0x110(%rbx), %rsi
incq %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x27c69(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x25a17(%rip), %rbx     # 0x2c16a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x27043(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x666, %esi            # imm = 0x666
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x26eff(%rip), %rdi     # 0x2d688
leaq 0x25afd(%rip), %rcx     # 0x2c28d
movq %rbx, %rsi
movl $0x666, %edx            # imm = 0x666
callq 0x41c0
movq 0x30814(%rip), %r12     # 0x36fb8
leaq 0x25b07(%rip), %rsi     # 0x2c2b2
movq %r12, %rdi
callq 0x4310
movq %rax, %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10082
movq %r13, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x25af6(%rip), %rsi     # 0x2c2c9
movq %rax, %rdi
callq 0x4310
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x100b0
movq %r14, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x27baa(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x25958(%rip), %rbx     # 0x2c16a
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x26f84(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x664, %esi            # imm = 0x664
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x26e40(%rip), %rdi     # 0x2d688
leaq 0x25a3e(%rip), %rcx     # 0x2c28d
movq %rbx, %rsi
movl $0x664, %edx            # imm = 0x664
callq 0x41c0
movq 0x30755(%rip), %r12     # 0x36fb8
leaq 0x25a48(%rip), %rsi     # 0x2c2b2
movq %r12, %rdi
callq 0x4310
movq %rax, %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x100b0
movq %r13, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x25a37(%rip), %rsi     # 0x2c2c9
movq %rax, %rdi
callq 0x4310
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10082
movq %r14, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x27aeb(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x25899(%rip), %rbx     # 0x2c16a
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x26ec5(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x665, %esi            # imm = 0x665
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x26d81(%rip), %rdi     # 0x2d688
leaq 0x2597f(%rip), %rcx     # 0x2c28d
movq %rbx, %rsi
movl $0x665, %edx            # imm = 0x665
callq 0x41c0
leaq 0x259ee(%rip), %rdi     # 0x2c310
leaq 0x25841(%rip), %rsi     # 0x2c16a
leaq 0x2595d(%rip), %rcx     # 0x2c28d
movl $0x68a, %edx            # imm = 0x68A
callq 0x41c0
leaq 0x25a06(%rip), %rdi     # 0x2c347
leaq 0x25822(%rip), %rsi     # 0x2c16a
leaq 0x2593e(%rip), %rcx     # 0x2c28d
movl $0x68c, %edx            # imm = 0x68C
callq 0x41c0
leaq 0x257fd(%rip), %rdi     # 0x2c15d
leaq 0x25803(%rip), %rsi     # 0x2c16a
leaq 0x2591f(%rip), %rcx     # 0x2c28d
movl $0x661, %edx            # imm = 0x661
callq 0x41c0
movq 0x30639(%rip), %r14     # 0x36fb8
leaq 0x25840(%rip), %rsi     # 0x2c1c6
movq %r14, %rdi
callq 0x4310
movq %rax, %r15
movq 0x158(%rbx), %rsi
decq %rsi
movq %rbx, %rdi
callq 0x10082
movq %r15, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x25827(%rip), %r15     # 0x2c1dc
movq %rax, %rdi
movq %r15, %rsi
callq 0x4310
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rax
movl 0x18(%r12,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r12,%rax)
movq 0x158(%rbx), %rsi
decq %rsi
movq %rbx, %rdi
callq 0x10082
movq %r12, %rdi
movq %rax, %rsi
callq 0x40c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x257ce(%rip), %rsi     # 0x2c1e1
movq %rax, %rdi
callq 0x4310
movq 0x110(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4310
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq 0x110(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x27930(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x256de(%rip), %rbx     # 0x2c16a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x26d0a(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x668, %esi            # imm = 0x668
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x26bc6(%rip), %rdi     # 0x2d688
leaq 0x257c4(%rip), %rcx     # 0x2c28d
movq %rbx, %rsi
movl $0x668, %edx            # imm = 0x668
callq 0x41c0
movq 0x304db(%rip), %r14     # 0x36fb8
leaq 0x256c1(%rip), %rsi     # 0x2c1a5
movq %r14, %rdi
callq 0x4310
movq 0x80(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x256b9(%rip), %rsi     # 0x2c1bb
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
xorl %esi, %esi
callq 0x4610
leaq 0x2788a(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x25638(%rip), %rbx     # 0x2c16a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x26c64(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x67f, %esi            # imm = 0x67F
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x26b20(%rip), %rdi     # 0x2d688
leaq 0x2571e(%rip), %rcx     # 0x2c28d
movq %rbx, %rsi
movl $0x67f, %edx            # imm = 0x67F
callq 0x41c0
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c60
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0x6c60
jmp 0x6c5d
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x6c7e
movq %rbx, %rdi
callq 0x4130
movq 0x3042d(%rip), %rdi     # 0x36ff0
leaq 0x25706(%rip), %rsi     # 0x2c2d0
movl $0x23, %edx
callq 0x43b0
movq 0x30415(%rip), %rdi     # 0x36ff0
leaq 0x25588(%rip), %rsi     # 0x2c16a
movl $0x8, %edx
callq 0x43b0
movq 0x303fd(%rip), %rdi     # 0x36ff0
leaq 0x26bae(%rip), %rsi     # 0x2d7a8
movl $0x1, %edx
callq 0x43b0
movq 0x303e5(%rip), %rdi     # 0x36ff0
movl $0x670, %esi            # imm = 0x670
callq 0x4610
movq %rax, %rdi
callq 0x4150
movl $0x8, %edi
callq 0x4160
movq 0x30372(%rip), %rcx     # 0x36fa0
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x30384(%rip), %rsi     # 0x36fc0
movq 0x3033d(%rip), %rdx     # 0x36f80
movq %rax, %rdi
callq 0x45f0
movq %rax, %rbx
callq 0x4580
jmp 0x6c7e
movq %rax, %rdi
callq 0x100de
movq %rax, %rbx
movq 0x302f9(%rip), %rsi     # 0x36f60
leaq 0x30(%rsp), %rdi
callq 0x4220
leaq 0xb0(%rsp), %rdi
callq 0x4120
movq %rbx, %rdi
callq 0x4620