// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./ebwt.h
// Function: Ebwt::countBwSide(SideLocus const&, int) const
inline TIndexOffU Ebwt::countBwSide(const SideLocus& l, int c) const {
	assert_lt(c, 4);
	assert_geq(c, 0);
	assert_lt(l._by, (int)this->_eh._sideBwtSz);
	assert_geq(l._by, 0);
	assert_lt(l._bp, 4);
	assert_geq(l._bp, 0);
	const uint8_t *side = l.side(this->_ebwt);
	TIndexOffU cCnt = countUpTo(l, c);
	if(rowL(l) == c) cCnt++;
	assert_leq(cCnt, this->_eh._sideBwtLen);
	if(c == 0 && l._sideByteOff <= _zEbwtByteOff && l._sideByteOff + l._by >= _zEbwtByteOff) {
		// Adjust for the fact that we represented $ with an 'A', but
		// shouldn't count it as an 'A' here
		if((l._sideByteOff + l._by > _zEbwtByteOff) ||
		   (l._sideByteOff + l._by == _zEbwtByteOff && l._bp >= _zEbwtBpOff))
		{
			cCnt--;
		}
	}
	TIndexOffU ret;
	// Now factor in the occ[] count at the side break
	if(c < 2) {
		const TIndexOffU *ac = reinterpret_cast<const TIndexOffU*>(side + this->_eh._sideSz - 2*OFF_SIZE);
		assert_leq(ac[0], this->_eh._numSides * this->_eh._sideBwtLen); // b/c it's used as padding
		assert_leq(ac[1], this->_eh._len);
		ret = ac[c] - cCnt + this->_fchr[c];
	} else {
		const TIndexOffU *gt = reinterpret_cast<const TIndexOffU*>(side + (2*this->_eh._sideSz) - 2*OFF_SIZE); // next
		assert_leq(gt[0], this->_eh._len); assert_leq(gt[1], this->_eh._len);
		ret = gt[c-2] - cCnt + this->_fchr[c];
	}
#ifndef NDEBUG
	assert_leq(ret, this->_fchr[c+1]); // can't have jumped into next char's section
	if(c == 0) {
		assert_leq(cCnt, this->_eh._sideBwtLen);
	} else {
		assert_lt(ret, this->_eh._bwtLen);
	}
#endif
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
cmpl $0x4, %edx
jge 0x15fed
testl %ebp, %ebp
js 0x1608f
movq %rsi, %r15
movq %rdi, %rbx
movswl 0x14(%rsi), %eax
cmpl %eax, 0x190(%rdi)
jle 0x16130
testw %ax, %ax
js 0x161d8
movb 0x16(%r15), %al
cmpb $0x4, %al
jge 0x1627c
testb %al, %al
js 0x16321
movq 0xc8(%rbx), %r13
addq (%r15), %r13
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x172e4
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0xe1d8
xorl %r14d, %r14d
cmpl %ebp, %eax
sete %r14b
addq %r12, %r14
movl 0x194(%rbx), %eax
cmpq %rax, %r14
ja 0x163c5
testl %ebp, %ebp
je 0x15e97
cmpl $0x1, %ebp
je 0x15ec0
movl 0x18c(%rbx), %eax
addl %eax, %eax
leaq (%rax,%r13), %r15
addq $-0x10, %r15
movq 0x108(%rbx), %rcx
cmpq %rcx, (%r15)
ja 0x1666f
addq %rax, %r13
cmpq %rcx, -0x8(%r13)
ja 0x1668a
movl %ebp, %r12d
movq -0x10(%r15,%r12,8), %r15
subq %r14, %r15
movq 0xa0(%rbx), %rax
addq (%rax,%r12,8), %r15
cmpq 0x8(%rax,%r12,8), %r15
jbe 0x15f1e
jmp 0x1646b
movq (%r15), %rcx
movq 0x70(%rbx), %rdx
cmpq %rdx, %rcx
ja 0x15ec0
movswq 0x14(%r15), %rsi
addq %rsi, %rcx
cmpq %rdx, %rcx
jb 0x15ec0
ja 0x15ebd
movsbq 0x16(%r15), %rcx
cmpq %rcx, 0x78(%rbx)
jg 0x15ec0
decq %r14
movl 0x18c(%rbx), %ecx
leaq (%rcx,%r13), %r15
addq $-0x10, %r15
movq 0x1a0(%rbx), %rdx
imulq %rax, %rdx
cmpq %rdx, (%r15)
ja 0x16519
addq %rcx, %r13
movq -0x8(%r13), %rcx
cmpq 0x108(%rbx), %rcx
ja 0x165c7
movl %ebp, %r12d
movq (%r15,%r12,8), %r15
subq %r14, %r15
movq 0xa0(%rbx), %rcx
addq (%rcx,%r12,8), %r15
cmpq 0x8(%rcx,%r12,8), %r15
ja 0x1646b
testl %ebp, %ebp
je 0x15fd2
cmpq 0x110(%rbx), %r15
jb 0x15fdb
movq 0x1e086(%rip), %r14     # 0x33fb8
leaq 0x1234e(%rip), %rsi     # 0x28287
movq %r14, %rdi
callq 0x42d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x40b0
leaq 0x1234a(%rip), %rsi     # 0x2829d
movq %rax, %rdi
callq 0x42d0
movq 0x110(%rbx), %rsi
movq %rax, %rdi
callq 0x40b0
leaq 0x144a7(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x12175(%rip), %rbx     # 0x280fd
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42d0
leaq 0x137a1(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x87d, %esi            # imm = 0x87D
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x1365d(%rip), %rdi     # 0x2961b
leaq 0x1321b(%rip), %rcx     # 0x291e0
movq %rbx, %rsi
movl $0x87d, %edx            # imm = 0x87D
callq 0x4190
cmpq %rax, %r14
ja 0x16732
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1dfc4(%rip), %rbx     # 0x33fb8
leaq 0x1228c(%rip), %rsi     # 0x28287
movq %rbx, %rdi
callq 0x42d0
movq %rax, %rdi
movl %ebp, %esi
callq 0x45d0
leaq 0x12289(%rip), %rsi     # 0x2829d
movq %rax, %rdi
callq 0x42d0
pushq $0x4
popq %rsi
movq %rax, %rdi
callq 0x45d0
leaq 0x143ea(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x120b8(%rip), %r14     # 0x280fd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42d0
leaq 0x136e4(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x859, %esi            # imm = 0x859
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x135a0(%rip), %rdi     # 0x2961b
leaq 0x1315e(%rip), %rcx     # 0x291e0
movq %r14, %rsi
movl $0x859, %edx            # imm = 0x859
callq 0x4190
movq 0x1df22(%rip), %rbx     # 0x33fb8
leaq 0x121a8(%rip), %rsi     # 0x28245
movq %rbx, %rdi
callq 0x42d0
movq %rax, %rdi
movl %ebp, %esi
callq 0x45d0
leaq 0x121a6(%rip), %rsi     # 0x2825c
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
xorl %esi, %esi
callq 0x45d0
leaq 0x14349(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x12017(%rip), %r14     # 0x280fd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42d0
leaq 0x13643(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x85a, %esi            # imm = 0x85A
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x134ff(%rip), %rdi     # 0x2961b
leaq 0x130bd(%rip), %rcx     # 0x291e0
movq %r14, %rsi
movl $0x85a, %edx            # imm = 0x85A
callq 0x4190
movq 0x1de81(%rip), %r14     # 0x33fb8
leaq 0x12149(%rip), %rsi     # 0x28287
movq %r14, %rdi
callq 0x42d0
movswl 0x14(%r15), %esi
movq %rax, %rdi
callq 0x4280
leaq 0x12143(%rip), %rsi     # 0x2829d
movq %rax, %rdi
callq 0x42d0
movl 0x190(%rbx), %esi
movq %rax, %rdi
callq 0x45d0
leaq 0x142a1(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x11f6f(%rip), %rbx     # 0x280fd
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42d0
leaq 0x1359b(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x85b, %esi            # imm = 0x85B
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x13457(%rip), %rdi     # 0x2961b
leaq 0x13015(%rip), %rcx     # 0x291e0
movq %rbx, %rsi
movl $0x85b, %edx            # imm = 0x85B
callq 0x4190
movq 0x1ddd9(%rip), %rbx     # 0x33fb8
leaq 0x1205f(%rip), %rsi     # 0x28245
movq %rbx, %rdi
callq 0x42d0
movswl 0x14(%r15), %esi
movq %rax, %rdi
callq 0x4280
leaq 0x1205a(%rip), %rsi     # 0x2825c
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
xorl %esi, %esi
callq 0x45d0
leaq 0x141fd(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x11ecb(%rip), %r14     # 0x280fd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42d0
leaq 0x134f7(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x85c, %esi            # imm = 0x85C
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x133b3(%rip), %rdi     # 0x2961b
leaq 0x12f71(%rip), %rcx     # 0x291e0
movq %r14, %rsi
movl $0x85c, %edx            # imm = 0x85C
callq 0x4190
movq 0x1dd35(%rip), %rbx     # 0x33fb8
leaq 0x11ffd(%rip), %rsi     # 0x28287
movq %rbx, %rdi
callq 0x42d0
movsbl 0x16(%r15), %esi
movq %rax, %rdi
callq 0x4430
leaq 0x11ff7(%rip), %rsi     # 0x2829d
movq %rax, %rdi
callq 0x42d0
pushq $0x4
popq %rsi
movq %rax, %rdi
callq 0x45d0
leaq 0x14158(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x11e26(%rip), %r14     # 0x280fd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42d0
leaq 0x13452(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x85d, %esi            # imm = 0x85D
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x1330e(%rip), %rdi     # 0x2961b
leaq 0x12ecc(%rip), %rcx     # 0x291e0
movq %r14, %rsi
movl $0x85d, %edx            # imm = 0x85D
callq 0x4190
movq 0x1dc90(%rip), %rbx     # 0x33fb8
leaq 0x11f16(%rip), %rsi     # 0x28245
movq %rbx, %rdi
callq 0x42d0
movsbl 0x16(%r15), %esi
movq %rax, %rdi
callq 0x4430
leaq 0x11f11(%rip), %rsi     # 0x2825c
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
xorl %esi, %esi
callq 0x45d0
leaq 0x140b4(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x11d82(%rip), %r14     # 0x280fd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42d0
leaq 0x133ae(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x85e, %esi            # imm = 0x85E
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x1326a(%rip), %rdi     # 0x2961b
leaq 0x12e28(%rip), %rcx     # 0x291e0
movq %r14, %rsi
movl $0x85e, %edx            # imm = 0x85E
callq 0x4190
movq 0x1dbec(%rip), %r15     # 0x33fb8
leaq 0x11e10(%rip), %rsi     # 0x281e3
movq %r15, %rdi
callq 0x42d0
movq %rax, %rdi
movq %r14, %rsi
callq 0x40b0
leaq 0x11e0d(%rip), %rsi     # 0x281fa
movq %rax, %rdi
callq 0x42d0
movl 0x194(%rbx), %esi
movq %rax, %rdi
callq 0x4400
leaq 0x1400e(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x11cdc(%rip), %rbx     # 0x280fd
movq %r15, %rdi
movq %rbx, %rsi
callq 0x42d0
leaq 0x13308(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x862, %esi            # imm = 0x862
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x131c4(%rip), %rdi     # 0x2961b
leaq 0x12d82(%rip), %rcx     # 0x291e0
movq %rbx, %rsi
movl $0x862, %edx            # imm = 0x862
callq 0x4190
incq %r12
movq 0x1db43(%rip), %r14     # 0x33fb8
leaq 0x11d67(%rip), %rsi     # 0x281e3
movq %r14, %rdi
callq 0x42d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x40b0
leaq 0x11d64(%rip), %rsi     # 0x281fa
movq %rax, %rdi
callq 0x42d0
movq 0xa0(%rbx), %rcx
movq (%rcx,%r12,8), %rsi
movq %rax, %rdi
callq 0x40b0
leaq 0x13f60(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x11c2e(%rip), %rbx     # 0x280fd
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42d0
leaq 0x1325a(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x879, %esi            # imm = 0x879
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x13116(%rip), %rdi     # 0x2961b
leaq 0x12cd4(%rip), %rcx     # 0x291e0
movq %rbx, %rsi
movl $0x879, %edx            # imm = 0x879
callq 0x4190
movq 0x1da98(%rip), %r14     # 0x33fb8
leaq 0x11cbc(%rip), %rsi     # 0x281e3
movq %r14, %rdi
callq 0x42d0
movq (%r15), %rsi
movq %rax, %rdi
callq 0x40b0
leaq 0x11cb9(%rip), %rsi     # 0x281fa
movq %rax, %rdi
callq 0x42d0
movl 0x194(%rbx), %esi
imulq 0x1a0(%rbx), %rsi
movq %rax, %rdi
callq 0x40b0
leaq 0x13eb2(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x11b80(%rip), %rbx     # 0x280fd
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42d0
leaq 0x131ac(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x870, %esi            # imm = 0x870
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x13068(%rip), %rdi     # 0x2961b
leaq 0x12c26(%rip), %rcx     # 0x291e0
movq %rbx, %rsi
movl $0x870, %edx            # imm = 0x870
callq 0x4190
movq 0x1d9ea(%rip), %r14     # 0x33fb8
leaq 0x11c0e(%rip), %rsi     # 0x281e3
movq %r14, %rdi
callq 0x42d0
movq -0x8(%r13), %rsi
movq %rax, %rdi
callq 0x40b0
leaq 0x11c0a(%rip), %rsi     # 0x281fa
movq %rax, %rdi
callq 0x42d0
movq 0x108(%rbx), %rsi
movq %rax, %rdi
callq 0x40b0
leaq 0x13e0a(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x11ad8(%rip), %rbx     # 0x280fd
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42d0
leaq 0x13104(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x871, %esi            # imm = 0x871
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x12fc0(%rip), %rdi     # 0x2961b
leaq 0x12b7e(%rip), %rcx     # 0x291e0
movq %rbx, %rsi
movl $0x871, %edx            # imm = 0x871
callq 0x4190
movq 0x1d942(%rip), %r14     # 0x33fb8
leaq 0x11b66(%rip), %rsi     # 0x281e3
movq %r14, %rdi
callq 0x42d0
movq (%r15), %rsi
jmp 0x166a4
movq 0x1d927(%rip), %r14     # 0x33fb8
leaq 0x11b4b(%rip), %rsi     # 0x281e3
movq %r14, %rdi
callq 0x42d0
movq -0x8(%r13), %rsi
movq %rax, %rdi
callq 0x40b0
leaq 0x11b47(%rip), %rsi     # 0x281fa
movq %rax, %rdi
callq 0x42d0
movq 0x108(%rbx), %rsi
movq %rax, %rdi
callq 0x40b0
leaq 0x13d47(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x11a15(%rip), %rbx     # 0x280fd
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42d0
leaq 0x13041(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x875, %esi            # imm = 0x875
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x12efd(%rip), %rdi     # 0x2961b
leaq 0x12abb(%rip), %rcx     # 0x291e0
movq %rbx, %rsi
movl $0x875, %edx            # imm = 0x875
callq 0x4190
movq 0x1d87f(%rip), %r15     # 0x33fb8
leaq 0x11aa3(%rip), %rsi     # 0x281e3
movq %r15, %rdi
callq 0x42d0
movq %rax, %rdi
movq %r14, %rsi
callq 0x40b0
leaq 0x11aa0(%rip), %rsi     # 0x281fa
movq %rax, %rdi
callq 0x42d0
movl 0x194(%rbx), %esi
movq %rax, %rdi
callq 0x4400
leaq 0x13ca1(%rip), %rsi     # 0x2a418
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
callq 0x4130
leaq 0x1196f(%rip), %rbx     # 0x280fd
movq %r15, %rdi
movq %rbx, %rsi
callq 0x42d0
leaq 0x12f9b(%rip), %rsi     # 0x2973b
movq %rax, %rdi
callq 0x42d0
movq %rax, %rdi
movl $0x87b, %esi            # imm = 0x87B
callq 0x45d0
movq %rax, %rdi
callq 0x4130
leaq 0x12e57(%rip), %rdi     # 0x2961b
leaq 0x12a15(%rip), %rcx     # 0x291e0
movq %rbx, %rsi
movl $0x87b, %edx            # imm = 0x87B
callq 0x4190