// File: /workspace/github_cpp_makefile_star2_O3/BenLangmead[P]bowtie/./ebwt.h
// Function: Ebwt::countFwSide(SideLocus const&, int) const
inline TIndexOffU Ebwt::countFwSide(const SideLocus& l, int c) const { /* check */
	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);
	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--; // Adjust for '$' looking like an 'A'
		}
	}
	TIndexOffU ret;
	// Now factor in the occ[] count at the side break
	if(c < 2) {
		const TIndexOffU *ac = reinterpret_cast<const TIndexOffU*>(side - 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 + 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 jumpded into next char's section
	if(c == 0) {
		assert_leq(cCnt, this->_eh._sideBwtLen);
	} else {
		assert_leq(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 0x18854
testl %ebp, %ebp
js 0x188f8
movq %rsi, %r14
movq %rdi, %rbx
movswl 0x14(%rsi), %esi
cmpl %esi, 0x190(%rdi)
jle 0x18999
movslq %esi, %rcx
testw %cx, %cx
js 0x18a41
movsbq 0x16(%r14), %rax
cmpq $0x4, %rax
jge 0x18ae5
testb %al, %al
js 0x18b8c
movq (%r14), %rdx
movq 0xc8(%rbx), %r15
addq %rdx, %r15
cmpb $0x0, (%rbx)
je 0x185b6
cmpw $0x8, %cx
jb 0x1864a
movl %ebp, %edi
leaq 0x17b20(%rip), %r8      # 0x30090
movq (%r8,%rdi,8), %r8
xorl %edi, %edi
movabsq $0x5555555555555555, %r9 # imm = 0x5555555555555555
xorl %r14d, %r14d
movq %rdi, %r10
movq (%r15,%rdi), %rdi
xorq %r8, %rdi
movq %rdi, %r11
shrq %r11
andq %r9, %rdi
andq %r11, %rdi
popcntq %rdi, %r11
movslq %r11d, %rdi
addq %rdi, %r14
leaq 0x8(%r10), %rdi
addq $0xf, %r10
cmpq %rcx, %r10
jb 0x18583
jmp 0x1864f
cmpw $0x8, %cx
jb 0x1864a
movabsq $0x1111111111111111, %r8 # imm = 0x1111111111111111
movl %ebp, %edi
leaq 0x17abd(%rip), %r9      # 0x30090
movq (%r9,%rdi,8), %r9
xorl %edi, %edi
movabsq $0x707070707070707, %r10 # imm = 0x707070707070707
xorl %r14d, %r14d
movq %rdi, %r11
movq (%r15,%rdi), %rdi
xorq %r9, %rdi
movq %rdi, %r12
shrq %r12
andq %rdi, %r12
movq %r12, %rdi
andq %r8, %rdi
shrq $0x2, %r12
andq %r8, %r12
addq %rdi, %r12
movq %r12, %rdi
shrq $0x4, %rdi
addq %r12, %rdi
andq %r10, %rdi
movq %rdi, %r12
shrq $0x8, %r12
addq %rdi, %r12
movq %r12, %rdi
shrq $0x10, %rdi
addq %r12, %rdi
movq %rdi, %r12
shrq $0x20, %r12
addl %edi, %r12d
andl $0x3f, %r12d
addq %r12, %r14
leaq 0x8(%r11), %rdi
addq $0xf, %r11
cmpq %rcx, %r11
jb 0x185e6
jmp 0x1864f
xorl %r14d, %r14d
xorl %edi, %edi
cmpl %esi, %edi
jge 0x1867d
movl %ebp, %r8d
movl %edi, %edi
movl %esi, %r9d
shlq $0x8, %r8
addq 0x1e972(%rip), %r8      # 0x36fd8
movzbl (%r15,%rdi), %r10d
movzbl (%r10,%r8), %r10d
addq %r10, %r14
incq %rdi
cmpq %rdi, %r9
jne 0x18666
movl %esi, %edi
testb %al, %al
je 0x186a6
movl %ebp, %esi
movl %edi, %edi
movzbl (%r15,%rdi), %edi
movq %rax, %r8
shlq $0xa, %r8
addq 0x1e940(%rip), %r8      # 0x36fd8
shlq $0x8, %rsi
addq %r8, %rsi
movzbl (%rdi,%rsi), %esi
addq %rsi, %r14
movl 0x194(%rbx), %esi
cmpq %rsi, %r14
ja 0x18c30
testl %ebp, %ebp
je 0x1870c
cmpl $0x1, %ebp
jle 0x18732
movl 0x18c(%rbx), %eax
leaq (%r15,%rax), %r13
addq $-0x10, %r13
movq 0x108(%rbx), %rcx
cmpq %rcx, (%r13)
ja 0x18edb
addq %rax, %r15
cmpq %rcx, -0x8(%r15)
ja 0x18ef7
movl %ebp, %r12d
addq -0x10(%r13,%r12,8), %r14
movq 0xa0(%rbx), %rax
movq %r14, %r15
addq (%rax,%r12,8), %r15
cmpq 0x8(%rax,%r12,8), %r15
jbe 0x18785
jmp 0x18cd6
movq 0x70(%rbx), %rdi
cmpq %rdi, %rdx
ja 0x18732
addq %rcx, %rdx
cmpq %rdi, %rdx
jb 0x18732
seta %cl
movzbl %al, %eax
cmpq %rax, 0x78(%rbx)
setl %al
orb %cl, %al
movzbl %al, %eax
subq %rax, %r14
leaq -0x10(%r15), %r13
movq 0x1a0(%rbx), %rax
imulq %rsi, %rax
cmpq %rax, -0x10(%r15)
ja 0x18d84
movq -0x8(%r15), %rax
cmpq 0x108(%rbx), %rax
ja 0x18e33
movl %ebp, %r12d
movq (%r13,%r12,8), %r15
addq %r14, %r15
movq 0xa0(%rbx), %rax
addq (%rax,%r12,8), %r15
cmpq 0x8(%rax,%r12,8), %r15
ja 0x18cd6
testl %ebp, %ebp
je 0x18839
cmpq 0x110(%rbx), %r15
jbe 0x18842
movq 0x1e81f(%rip), %r14     # 0x36fb8
leaq 0x13ab0(%rip), %rsi     # 0x2c250
movq %r14, %rdi
callq 0x4310
movq %rax, %rdi
movq %r15, %rsi
callq 0x40c0
leaq 0x13aad(%rip), %rsi     # 0x2c267
movq %rax, %rdi
callq 0x4310
movq 0x110(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x15bcd(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x1397b(%rip), %rbx     # 0x2c16a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x14fa7(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x816, %esi            # imm = 0x816
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x14e63(%rip), %rdi     # 0x2d688
leaq 0x149aa(%rip), %rcx     # 0x2d1d6
movq %rbx, %rsi
movl $0x816, %edx            # imm = 0x816
callq 0x41c0
cmpq %rsi, %r14
ja 0x18f9f
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1e75d(%rip), %rbx     # 0x36fb8
leaq 0x13a92(%rip), %rsi     # 0x2c2f4
movq %rbx, %rdi
callq 0x4310
movq %rax, %rdi
movl %ebp, %esi
callq 0x4610
leaq 0x13a8f(%rip), %rsi     # 0x2c30a
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x4, %esi
callq 0x4610
leaq 0x15b0e(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x138bc(%rip), %r14     # 0x2c16a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x14ee8(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x7f3, %esi            # imm = 0x7F3
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x14da4(%rip), %rdi     # 0x2d688
leaq 0x148eb(%rip), %rcx     # 0x2d1d6
movq %r14, %rsi
movl $0x7f3, %edx            # imm = 0x7F3
callq 0x41c0
movq 0x1e6b9(%rip), %rbx     # 0x36fb8
leaq 0x139ac(%rip), %rsi     # 0x2c2b2
movq %rbx, %rdi
callq 0x4310
movq %rax, %rdi
movl %ebp, %esi
callq 0x4610
leaq 0x139aa(%rip), %rsi     # 0x2c2c9
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
xorl %esi, %esi
callq 0x4610
leaq 0x15a6d(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x1381b(%rip), %r14     # 0x2c16a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x14e47(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x7f4, %esi            # imm = 0x7F4
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x14d03(%rip), %rdi     # 0x2d688
leaq 0x1484a(%rip), %rcx     # 0x2d1d6
movq %r14, %rsi
movl $0x7f4, %edx            # imm = 0x7F4
callq 0x41c0
movq 0x1e618(%rip), %r15     # 0x36fb8
leaq 0x1394d(%rip), %rsi     # 0x2c2f4
movq %r15, %rdi
callq 0x4310
movswl 0x14(%r14), %esi
movq %rax, %rdi
callq 0x42c0
leaq 0x13947(%rip), %rsi     # 0x2c30a
movq %rax, %rdi
callq 0x4310
movl 0x190(%rbx), %esi
movq %rax, %rdi
callq 0x4610
leaq 0x159c5(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x13773(%rip), %rbx     # 0x2c16a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x14d9f(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x7f5, %esi            # imm = 0x7F5
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x14c5b(%rip), %rdi     # 0x2d688
leaq 0x147a2(%rip), %rcx     # 0x2d1d6
movq %rbx, %rsi
movl $0x7f5, %edx            # imm = 0x7F5
callq 0x41c0
movq 0x1e570(%rip), %rbx     # 0x36fb8
leaq 0x13863(%rip), %rsi     # 0x2c2b2
movq %rbx, %rdi
callq 0x4310
movswl 0x14(%r14), %esi
movq %rax, %rdi
callq 0x42c0
leaq 0x1385e(%rip), %rsi     # 0x2c2c9
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
xorl %esi, %esi
callq 0x4610
leaq 0x15921(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x136cf(%rip), %r14     # 0x2c16a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x14cfb(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x7f6, %esi            # imm = 0x7F6
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x14bb7(%rip), %rdi     # 0x2d688
leaq 0x146fe(%rip), %rcx     # 0x2d1d6
movq %r14, %rsi
movl $0x7f6, %edx            # imm = 0x7F6
callq 0x41c0
movq 0x1e4cc(%rip), %rbx     # 0x36fb8
leaq 0x13801(%rip), %rsi     # 0x2c2f4
movq %rbx, %rdi
callq 0x4310
movsbl 0x16(%r14), %esi
movq %rax, %rdi
callq 0x4470
leaq 0x137fb(%rip), %rsi     # 0x2c30a
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x4, %esi
callq 0x4610
leaq 0x1587a(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x13628(%rip), %r14     # 0x2c16a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x14c54(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x7f7, %esi            # imm = 0x7F7
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x14b10(%rip), %rdi     # 0x2d688
leaq 0x14657(%rip), %rcx     # 0x2d1d6
movq %r14, %rsi
movl $0x7f7, %edx            # imm = 0x7F7
callq 0x41c0
movq 0x1e425(%rip), %rbx     # 0x36fb8
leaq 0x13718(%rip), %rsi     # 0x2c2b2
movq %rbx, %rdi
callq 0x4310
movsbl 0x16(%r14), %esi
movq %rax, %rdi
callq 0x4470
leaq 0x13713(%rip), %rsi     # 0x2c2c9
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
xorl %esi, %esi
callq 0x4610
leaq 0x157d6(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x13584(%rip), %r14     # 0x2c16a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4310
leaq 0x14bb0(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x7f8, %esi            # imm = 0x7F8
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x14a6c(%rip), %rdi     # 0x2d688
leaq 0x145b3(%rip), %rcx     # 0x2d1d6
movq %r14, %rsi
movl $0x7f8, %edx            # imm = 0x7F8
callq 0x41c0
movq 0x1e381(%rip), %r15     # 0x36fb8
leaq 0x13612(%rip), %rsi     # 0x2c250
movq %r15, %rdi
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0x1360f(%rip), %rsi     # 0x2c267
movq %rax, %rdi
callq 0x4310
movl 0x194(%rbx), %esi
movq %rax, %rdi
callq 0x4440
leaq 0x15730(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x134de(%rip), %rbx     # 0x2c16a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x14b0a(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x7fb, %esi            # imm = 0x7FB
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x149c6(%rip), %rdi     # 0x2d688
leaq 0x1450d(%rip), %rcx     # 0x2d1d6
movq %rbx, %rsi
movl $0x7fb, %edx            # imm = 0x7FB
callq 0x41c0
incq %r12
movq 0x1e2d8(%rip), %r14     # 0x36fb8
leaq 0x13569(%rip), %rsi     # 0x2c250
movq %r14, %rdi
callq 0x4310
movq %rax, %rdi
movq %r15, %rsi
callq 0x40c0
leaq 0x13566(%rip), %rsi     # 0x2c267
movq %rax, %rdi
callq 0x4310
movq 0xa0(%rbx), %rcx
movq (%rcx,%r12,8), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x15682(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x13430(%rip), %rbx     # 0x2c16a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x14a5c(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x812, %esi            # imm = 0x812
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x14918(%rip), %rdi     # 0x2d688
leaq 0x1445f(%rip), %rcx     # 0x2d1d6
movq %rbx, %rsi
movl $0x812, %edx            # imm = 0x812
callq 0x41c0
movq 0x1e22d(%rip), %r14     # 0x36fb8
leaq 0x134be(%rip), %rsi     # 0x2c250
movq %r14, %rdi
callq 0x4310
movq (%r13), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x134ba(%rip), %rsi     # 0x2c267
movq %rax, %rdi
callq 0x4310
movl 0x194(%rbx), %esi
imulq 0x1a0(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x155d3(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x13381(%rip), %rbx     # 0x2c16a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x149ad(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x809, %esi            # imm = 0x809
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x14869(%rip), %rdi     # 0x2d688
leaq 0x143b0(%rip), %rcx     # 0x2d1d6
movq %rbx, %rsi
movl $0x809, %edx            # imm = 0x809
callq 0x41c0
movq 0x1e17e(%rip), %r14     # 0x36fb8
leaq 0x1340f(%rip), %rsi     # 0x2c250
movq %r14, %rdi
callq 0x4310
movq -0x8(%r15), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x1340b(%rip), %rsi     # 0x2c267
movq %rax, %rdi
callq 0x4310
movq 0x108(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x1552b(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x132d9(%rip), %rbx     # 0x2c16a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x14905(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x80a, %esi            # imm = 0x80A
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x147c1(%rip), %rdi     # 0x2d688
leaq 0x14308(%rip), %rcx     # 0x2d1d6
movq %rbx, %rsi
movl $0x80a, %edx            # imm = 0x80A
callq 0x41c0
movq 0x1e0d6(%rip), %r14     # 0x36fb8
leaq 0x13367(%rip), %rsi     # 0x2c250
movq %r14, %rdi
callq 0x4310
movq (%r13), %rsi
jmp 0x18f11
movq 0x1e0ba(%rip), %r14     # 0x36fb8
leaq 0x1334b(%rip), %rsi     # 0x2c250
movq %r14, %rdi
callq 0x4310
movq -0x8(%r15), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x13347(%rip), %rsi     # 0x2c267
movq %rax, %rdi
callq 0x4310
movq 0x108(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x15467(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x13215(%rip), %rbx     # 0x2c16a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x14841(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x80e, %esi            # imm = 0x80E
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x146fd(%rip), %rdi     # 0x2d688
leaq 0x14244(%rip), %rcx     # 0x2d1d6
movq %rbx, %rsi
movl $0x80e, %edx            # imm = 0x80E
callq 0x41c0
movq 0x1e012(%rip), %r15     # 0x36fb8
leaq 0x132a3(%rip), %rsi     # 0x2c250
movq %r15, %rdi
callq 0x4310
movq %rax, %rdi
movq %r14, %rsi
callq 0x40c0
leaq 0x132a0(%rip), %rsi     # 0x2c267
movq %rax, %rdi
callq 0x4310
movl 0x194(%rbx), %esi
movq %rax, %rdi
callq 0x4440
leaq 0x153c1(%rip), %rsi     # 0x2e3a5
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
callq 0x4150
leaq 0x1316f(%rip), %rbx     # 0x2c16a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4310
leaq 0x1479b(%rip), %rsi     # 0x2d7a8
movq %rax, %rdi
callq 0x4310
movq %rax, %rdi
movl $0x814, %esi            # imm = 0x814
callq 0x4610
movq %rax, %rdi
callq 0x4150
leaq 0x14657(%rip), %rdi     # 0x2d688
leaq 0x1419e(%rip), %rcx     # 0x2d1d6
movq %rbx, %rsi
movl $0x814, %edx            # imm = 0x814
callq 0x41c0
nop