// File: /workspace/github_cpp_makefile_star2_O1/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 0xfb60
testb %al, %al
je 0x6904
movq 0x158(%rbx), %rcx
cmpq $0x2, %rcx
jb 0x6202
movl $0x1, %r14d
movq 0xa8(%rbx), %rdi
movq 0xb0(%rbx), %rsi
movq 0x108(%rbx), %rdx
movl 0x14c(%rbx), %r8d
movq %r14, %r9
callq 0x186e4
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 0x18864
cmpq %rax, %r12
jb 0x6748
movq 0xa8(%rbx), %rdi
movq 0xb0(%rbx), %rsi
movq 0x108(%rbx), %rdx
movq 0x158(%rbx), %rcx
movl 0x14c(%rbx), %r8d
movq %r14, %r9
callq 0x18864
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 0x186e4
cmpq %rax, %r12
jb 0x6807
movq 0xa8(%rbx), %rdi
movq 0xb0(%rbx), %rsi
movq 0x108(%rbx), %rdx
movq 0x158(%rbx), %rcx
movl 0x14c(%rbx), %r8d
movq %r14, %r9
callq 0x186e4
movq 0x110(%rbx), %rcx
incq %rcx
cmpq %rcx, %rax
ja 0x6690
incq %r14
movq 0x158(%rbx), %rcx
cmpq %rcx, %r14
jb 0x60f0
leaq -0x1(%rcx), %r9
movq 0xa8(%rbx), %rdi
movq 0xb0(%rbx), %rsi
movq 0x108(%rbx), %rdx
movl 0x14c(%rbx), %r8d
callq 0x186e4
movq 0x110(%rbx), %r12
cmpq %r12, %rax
jne 0x6923
movl %ebp, 0xc(%rsp)
leaq 0x1f(%r12), %r15
shrq $0x2, %r15
andq $-0x8, %r15
movq %r15, %rdi
callq 0x4030
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x4190
movq 0x168(%rbx), %rax
testq %rax, %rax
je 0x62b9
movq 0xb8(%rbx), %rdx
xorl %ebp, %ebp
movq (%rdx,%rbp,8), %rcx
cmpq %r12, %rcx
jae 0x652d
movq %rcx, %r13
shrq $0x5, %r13
movl %ecx, %r15d
andl $0x1f, %r15d
movq (%r14,%r13,8), %rsi
btl %ecx, %esi
jb 0x63ef
movl $0x1, %edi
movl %r15d, %ecx
shll %cl, %edi
movslq %edi, %rcx
orq %rcx, %rsi
movq %rsi, (%r14,%r13,8)
incq %rbp
cmpq %rbp, %rax
jne 0x6275
movq %r14, %rdi
callq 0x4420
cmpq $0x0, 0x80(%rbx)
je 0x6a81
movq 0x88(%rbx), %rax
decq %rax
movl 0xc(%rsp), %edi
je 0x6323
movq 0x98(%rbx), %rcx
xorl %r15d, %r15d
movq 0x18(%rcx,%r15), %rdx
cmpq (%rcx,%r15), %rdx
jbe 0x65dc
movq 0x8(%rcx,%r15), %rdx
movq 0x20(%rcx,%r15), %rsi
cmpl $0x1, %edi
jne 0x6311
cmpq %rsi, %rdx
jae 0x631a
jmp 0x68c6
cmpq %rsi, %rdx
ja 0x68e5
addq $0x18, %r15
decq %rax
jne 0x62e9
movq 0x1a0(%rbx), %rsi
movq %rbx, %rdi
callq 0x57f0
cmpb $0x0, 0xc(%rbx)
je 0x63dd
leaq 0x30(%rsp), %rdi
callq 0x41f0
leaq 0x40(%rsp), %r14
leaq 0x26f9c(%rip), %rsi     # 0x2d2ee
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 0x10302
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63bf
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4340
movq 0x30b9a(%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 0x30bc2(%rip), %rbx     # 0x36fb8
leaq 0x26d39(%rip), %rsi     # 0x2d136
movq %rbx, %rdi
callq 0x4310
movq %rax, %rdi
xorl %esi, %esi
callq 0x4610
leaq 0x26d36(%rip), %r12     # 0x2d14c
movq %rax, %rdi
movq %r12, %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 0x26cf5(%rip), %rsi     # 0x2d151
movq %rax, %rdi
callq 0x4310
movl (%r14,%r13,8), %ecx
xorl %esi, %esi
btl %r15d, %ecx
setb %sil
movq %rax, %rdi
callq 0x4650
movq %rax, %rdi
movq %r12, %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)
movl (%r14,%r13,8), %ecx
xorl %esi, %esi
btl %r15d, %ecx
setb %sil
movq %rax, %rdi
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 0x28e49(%rip), %rsi     # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x26bf7(%rip), %r14     # 0x2d0da
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x28223(%rip), %rsi     # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x679, %esi            # imm = 0x679
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x280df(%rip), %rdi     # 0x2e5f8
leaq 0x26cdd(%rip), %rcx     # 0x2d1fd
movq %r14, %rsi
movl $0x679, %edx            # imm = 0x679
callq 0x41c0
movq 0x30a84(%rip), %r14     # 0x36fb8
leaq 0x26d29(%rip), %rsi     # 0x2d264
movq %r14, %rdi
callq 0x4310
movq 0xb8(%rbx), %rcx
movq (%rcx,%rbp,8), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x26d1d(%rip), %rsi     # 0x2d27a
movq %rax, %rdi
callq 0x4310
movq 0x110(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x28d9a(%rip), %rsi     # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x26b48(%rip), %rbx     # 0x2d0da
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x28174(%rip), %rsi     # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x676, %esi            # imm = 0x676
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x28030(%rip), %rdi     # 0x2e5f8
leaq 0x26c2e(%rip), %rcx     # 0x2d1fd
movq %rbx, %rsi
movl $0x676, %edx            # imm = 0x676
callq 0x41c0
movq 0x309d5(%rip), %r14     # 0x36fb8
leaq 0x26b2b(%rip), %rsi     # 0x2d115
movq %r14, %rdi
callq 0x4310
movq 0x98(%rbx), %rcx
movq 0x18(%rcx,%r15), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x26b1e(%rip), %rsi     # 0x2d12b
movq %rax, %rdi
callq 0x4310
movq 0x98(%rbx), %rcx
movq (%rcx,%r15), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x28ce6(%rip), %rsi     # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x26a94(%rip), %rbx     # 0x2d0da
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x280c0(%rip), %rsi     # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x688, %esi            # imm = 0x688
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x27f7c(%rip), %rdi     # 0x2e5f8
leaq 0x26b7a(%rip), %rcx     # 0x2d1fd
movq %rbx, %rsi
movl $0x688, %edx            # imm = 0x688
callq 0x41c0
movq 0x30921(%rip), %r15     # 0x36fb8
leaq 0x26b22(%rip), %rsi     # 0x2d1c0
movq %r15, %rdi
callq 0x4310
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1029a
movq %r12, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x26b11(%rip), %rsi     # 0x2d1d7
movq %rax, %rdi
callq 0x4310
movq 0x110(%rbx), %rsi
incq %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x28c2e(%rip), %rsi     # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x269dc(%rip), %rbx     # 0x2d0da
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x28008(%rip), %rsi     # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x666, %esi            # imm = 0x666
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x27ec4(%rip), %rdi     # 0x2e5f8
leaq 0x26ac2(%rip), %rcx     # 0x2d1fd
movq %rbx, %rsi
movl $0x666, %edx            # imm = 0x666
callq 0x41c0
movq 0x30869(%rip), %r12     # 0x36fb8
leaq 0x26acc(%rip), %rsi     # 0x2d222
movq %r12, %rdi
callq 0x4310
movq %rax, %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1029a
movq %r13, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x26abb(%rip), %rsi     # 0x2d239
movq %rax, %rdi
callq 0x4310
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x102c8
movq %r14, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x28b6f(%rip), %rsi     # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x2691d(%rip), %rbx     # 0x2d0da
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x27f49(%rip), %rsi     # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x664, %esi            # imm = 0x664
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x27e05(%rip), %rdi     # 0x2e5f8
leaq 0x26a03(%rip), %rcx     # 0x2d1fd
movq %rbx, %rsi
movl $0x664, %edx            # imm = 0x664
callq 0x41c0
movq 0x307aa(%rip), %r12     # 0x36fb8
leaq 0x26a0d(%rip), %rsi     # 0x2d222
movq %r12, %rdi
callq 0x4310
movq %rax, %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x102c8
movq %r13, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x269fc(%rip), %rsi     # 0x2d239
movq %rax, %rdi
callq 0x4310
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1029a
movq %r14, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x28ab0(%rip), %rsi     # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x2685e(%rip), %rbx     # 0x2d0da
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x27e8a(%rip), %rsi     # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x665, %esi            # imm = 0x665
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x27d46(%rip), %rdi     # 0x2e5f8
leaq 0x26944(%rip), %rcx     # 0x2d1fd
movq %rbx, %rsi
movl $0x665, %edx            # imm = 0x665
callq 0x41c0
leaq 0x269b3(%rip), %rdi     # 0x2d280
leaq 0x26806(%rip), %rsi     # 0x2d0da
leaq 0x26922(%rip), %rcx     # 0x2d1fd
movl $0x68a, %edx            # imm = 0x68A
callq 0x41c0
leaq 0x269cb(%rip), %rdi     # 0x2d2b7
leaq 0x267e7(%rip), %rsi     # 0x2d0da
leaq 0x26903(%rip), %rcx     # 0x2d1fd
movl $0x68c, %edx            # imm = 0x68C
callq 0x41c0
leaq 0x267c2(%rip), %rdi     # 0x2d0cd
leaq 0x267c8(%rip), %rsi     # 0x2d0da
leaq 0x268e4(%rip), %rcx     # 0x2d1fd
movl $0x661, %edx            # imm = 0x661
callq 0x41c0
movq 0x3068e(%rip), %r14     # 0x36fb8
leaq 0x26805(%rip), %rsi     # 0x2d136
movq %r14, %rdi
callq 0x4310
movq %rax, %r15
movq 0x158(%rbx), %rsi
decq %rsi
movq %rbx, %rdi
callq 0x1029a
movq %r15, %rdi
movq %rax, %rsi
callq 0x40c0
leaq 0x267ec(%rip), %r15     # 0x2d14c
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 0x1029a
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 0x26793(%rip), %rsi     # 0x2d151
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 0x288f5(%rip), %rsi     # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x266a3(%rip), %rbx     # 0x2d0da
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x27ccf(%rip), %rsi     # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x668, %esi            # imm = 0x668
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x27b8b(%rip), %rdi     # 0x2e5f8
leaq 0x26789(%rip), %rcx     # 0x2d1fd
movq %rbx, %rsi
movl $0x668, %edx            # imm = 0x668
callq 0x41c0
movq 0x30530(%rip), %r14     # 0x36fb8
leaq 0x26686(%rip), %rsi     # 0x2d115
movq %r14, %rdi
callq 0x4310
movq 0x80(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x2667e(%rip), %rsi     # 0x2d12b
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
xorl %esi, %esi
callq 0x4610
leaq 0x2884f(%rip), %rsi     # 0x2f315
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x265fd(%rip), %rbx     # 0x2d0da
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x27c29(%rip), %rsi     # 0x2e718
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x67f, %esi            # imm = 0x67F
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x27ae5(%rip), %rdi     # 0x2e5f8
leaq 0x266e3(%rip), %rcx     # 0x2d1fd
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 0x6c0b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4340
jmp 0x6c0b
jmp 0x6c08
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x6c29
movq %rbx, %rdi
callq 0x4130
movq 0x30482(%rip), %rdi     # 0x36ff0
leaq 0x266cb(%rip), %rsi     # 0x2d240
movl $0x23, %edx
callq 0x43b0
movq 0x3046a(%rip), %rdi     # 0x36ff0
leaq 0x2654d(%rip), %rsi     # 0x2d0da
movl $0x8, %edx
callq 0x43b0
movq 0x30452(%rip), %rdi     # 0x36ff0
leaq 0x27b73(%rip), %rsi     # 0x2e718
movl $0x1, %edx
callq 0x43b0
movq 0x3043a(%rip), %rdi     # 0x36ff0
movl $0x670, %esi            # imm = 0x670
callq 0x4610
movq %rax, %rdi
callq 0x4150
movl $0x8, %edi
callq 0x4160
movq 0x303c7(%rip), %rcx     # 0x36fa0
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x303d9(%rip), %rsi     # 0x36fc0
movq 0x30392(%rip), %rdx     # 0x36f80
movq %rax, %rdi
callq 0x45f0
movq %rax, %rbx
callq 0x4580
jmp 0x6c29
movq %rax, %rdi
callq 0x102f6
movq %rax, %rbx
movq 0x3034e(%rip), %rsi     # 0x36f60
leaq 0x30(%rsp), %rdi
callq 0x4220
leaq 0xb0(%rsp), %rdi
callq 0x4120
movq %rbx, %rdi
callq 0x4620
nop