// File: BenLangmead[P]bowtie/./ebwt.h
// Function: Ebwt::mapLF(SideLocus const&, int, bool) const
inline TIndexOffU Ebwt::mapLF(const SideLocus& l, int c
                                  ASSERT_ONLY(, bool overrideSanity)
                                  ) const
{
#ifdef EBWT_STATS
	const_cast<Ebwt*>(this)->mapLFcs_++;
#endif
	TIndexOffU ret;
	assert_lt(c, 4);
	assert_geq(c, 0);
	if(l._fw) {
		// Forward side
		ret = !_eh._isBt2Index ? countFwSide(l, c)
		                       : countBt2Side(l, c);
	}
	else {
		ret = countBwSide(l, c); // Backward side
	}
	assert_lt(ret, this->_eh._bwtLen);
#ifndef NDEBUG
	if(_sanity && !overrideSanity) {
		// Make sure results match up with results from mapLFEx;
		// be sure to override sanity-checking in the callee, or we'll
		// have infinite recursion
		TIndexOffU arrs[] = { 0, 0, 0, 0 };
		mapLFEx(l, arrs, true);
		assert_eq(arrs[c], ret);
	}
#endif
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
andb $0x1, %al
movb %al, -0x15(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpl $0x4, -0x14(%rbp)
jl 0x2a841
movq 0x1f82d(%rip), %rdi     # 0x49fc0
leaq 0x14aad(%rip), %rsi     # 0x3f247
callq 0x5360
movq %rax, %rdi
movl -0x14(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq 0x14aa9(%rip), %rsi     # 0x3f25d
callq 0x5360
movq %rax, %rdi
movl $0x4, %esi
callq 0x5750
movq %rax, %rdi
leaq 0x16de8(%rip), %rsi     # 0x415b8
callq 0x5360
movq %rax, %rdi
movq 0x1f7a1(%rip), %rsi     # 0x49f80
callq 0x53c0
movq 0x1f7d5(%rip), %rdi     # 0x49fc0
leaq 0x148cb(%rip), %rsi     # 0x3f0bd
callq 0x5360
movq %rax, %rdi
leaq 0x15f89(%rip), %rsi     # 0x4078a
callq 0x5360
movq %rax, %rdi
movl $0x9a2, %esi            # imm = 0x9A2
callq 0x5750
movq %rax, %rdi
movq 0x1f763(%rip), %rsi     # 0x49f80
callq 0x53c0
leaq 0x15e41(%rip), %rdi     # 0x4066a
leaq 0x1488d(%rip), %rsi     # 0x3f0bd
movl $0x9a2, %edx            # imm = 0x9A2
leaq 0x15af7(%rip), %rcx     # 0x40333
callq 0x51e0
cmpl $0x0, -0x14(%rbp)
jge 0x2a8fd
movq 0x1f76e(%rip), %rdi     # 0x49fc0
leaq 0x149ac(%rip), %rsi     # 0x3f205
callq 0x5360
movq %rax, %rdi
movl -0x14(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq 0x149a9(%rip), %rsi     # 0x3f21c
callq 0x5360
movq %rax, %rdi
xorl %esi, %esi
callq 0x5750
movq %rax, %rdi
leaq 0x16d2c(%rip), %rsi     # 0x415b8
callq 0x5360
movq %rax, %rdi
movq 0x1f6e5(%rip), %rsi     # 0x49f80
callq 0x53c0
movq 0x1f719(%rip), %rdi     # 0x49fc0
leaq 0x1480f(%rip), %rsi     # 0x3f0bd
callq 0x5360
movq %rax, %rdi
leaq 0x15ecd(%rip), %rsi     # 0x4078a
callq 0x5360
movq %rax, %rdi
movl $0x9a3, %esi            # imm = 0x9A3
callq 0x5750
movq %rax, %rdi
movq 0x1f6a7(%rip), %rsi     # 0x49f80
callq 0x53c0
leaq 0x15d85(%rip), %rdi     # 0x4066a
leaq 0x147d1(%rip), %rsi     # 0x3f0bd
movl $0x9a3, %edx            # imm = 0x9A3
leaq 0x15a3b(%rip), %rcx     # 0x40333
callq 0x51e0
movq -0x10(%rbp), %rax
testb $0x1, 0x12(%rax)
je 0x2a948
movq -0x48(%rbp), %rax
testb $0x1, 0x1c1(%rax)
jne 0x2a92a
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x23630
movq %rax, -0x50(%rbp)
jmp 0x2a93e
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x24330
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x2a95c
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x24c10
movq %rax, -0x20(%rbp)
movq -0x48(%rbp), %rcx
movq -0x20(%rbp), %rax
cmpq 0x110(%rcx), %rax
jb 0x2aa2d
movq 0x1f648(%rip), %rdi     # 0x49fc0
leaq 0x148c8(%rip), %rsi     # 0x3f247
callq 0x5360
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0x50c0
movq %rax, %rdi
leaq 0x148c3(%rip), %rsi     # 0x3f25d
callq 0x5360
movq %rax, %rdi
movq -0x48(%rbp), %rax
movq 0x110(%rax), %rsi
callq 0x50c0
movq %rax, %rdi
leaq 0x16bfc(%rip), %rsi     # 0x415b8
callq 0x5360
movq %rax, %rdi
movq 0x1f5b5(%rip), %rsi     # 0x49f80
callq 0x53c0
movq 0x1f5e9(%rip), %rdi     # 0x49fc0
leaq 0x146df(%rip), %rsi     # 0x3f0bd
callq 0x5360
movq %rax, %rdi
leaq 0x15d9d(%rip), %rsi     # 0x4078a
callq 0x5360
movq %rax, %rdi
movl $0x9ac, %esi            # imm = 0x9AC
callq 0x5750
movq %rax, %rdi
movq 0x1f577(%rip), %rsi     # 0x49f80
callq 0x53c0
leaq 0x15c55(%rip), %rdi     # 0x4066a
leaq 0x146a1(%rip), %rsi     # 0x3f0bd
movl $0x9ac, %edx            # imm = 0x9AC
leaq 0x1590b(%rip), %rcx     # 0x40333
callq 0x51e0
movq -0x48(%rbp), %rax
testb $0x1, 0xe(%rax)
je 0x2abb1
testb $0x1, -0x15(%rbp)
jne 0x2abb1
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x5190
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movl $0x1, %ecx
callq 0x25940
movslq -0x14(%rbp), %rax
movq -0x40(%rbp,%rax,8), %rax
cmpq -0x20(%rbp), %rax
je 0x2abaf
movq 0x1f53b(%rip), %rdi     # 0x49fc0
leaq 0x1468d(%rip), %rsi     # 0x3f119
callq 0x5360
movq %rax, %rdi
movslq -0x14(%rbp), %rax
movq -0x40(%rbp,%rax,8), %rsi
callq 0x50c0
movq %rax, %rdi
leaq 0x14683(%rip), %rsi     # 0x3f12f
callq 0x5360
movq %rax, %rdi
leaq -0x122db(%rip), %rsi    # 0x187e0
callq 0x5120
movq %rax, %rdi
movslq -0x14(%rbp), %rax
movq -0x40(%rbp,%rax,8), %rsi
callq 0x50c0
movq %rax, %rdi
leaq -0x122cb(%rip), %rsi    # 0x18810
callq 0x5120
movq %rax, %rdi
leaq 0x1464a(%rip), %rsi     # 0x3f134
callq 0x5360
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0x50c0
movq %rax, %rdi
leaq 0x1462a(%rip), %rsi     # 0x3f12f
callq 0x5360
movq %rax, %rdi
leaq -0x12334(%rip), %rsi    # 0x187e0
callq 0x5120
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0x50c0
movq %rax, %rdi
leaq -0x1231f(%rip), %rsi    # 0x18810
callq 0x5120
movq %rax, %rdi
leaq 0x16a7a(%rip), %rsi     # 0x415b8
callq 0x5360
movq %rax, %rdi
movq 0x1f433(%rip), %rsi     # 0x49f80
callq 0x53c0
movq 0x1f467(%rip), %rdi     # 0x49fc0
leaq 0x1455d(%rip), %rsi     # 0x3f0bd
callq 0x5360
movq %rax, %rdi
leaq 0x15c1b(%rip), %rsi     # 0x4078a
callq 0x5360
movq %rax, %rdi
movl $0x9b4, %esi            # imm = 0x9B4
callq 0x5750
movq %rax, %rdi
movq 0x1f3f5(%rip), %rsi     # 0x49f80
callq 0x53c0
leaq 0x15ad3(%rip), %rdi     # 0x4066a
leaq 0x1451f(%rip), %rsi     # 0x3f0bd
movl $0x9b4, %edx            # imm = 0x9B4
leaq 0x15789(%rip), %rcx     # 0x40333
callq 0x51e0
jmp 0x2abb1
movq -0x20(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)