// File: BenLangmead[P]bowtie/./ebwt.h
// Function: Ebwt::mapLF(SideLocus const&, bool) const
inline TIndexOffU Ebwt::mapLF(const SideLocus& l
                                  ASSERT_ONLY(, bool overrideSanity)
                                  ) const
{
#ifdef EBWT_STATS
	const_cast<Ebwt*>(this)->mapLFs_++;
#endif
	TIndexOffU ret;
	assert(l.side(this->_ebwt) != NULL);
	int c = rowL(l);
	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 $0x60, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
movq 0xc8(%rax), %rsi
callq 0x23610
cmpq $0x0, %rax
je 0x18ad7
jmp 0x18af6
leaq 0x27650(%rip), %rdi     # 0x4012e
leaq 0x265d8(%rip), %rsi     # 0x3f0bd
movl $0x97c, %edx            # imm = 0x97C
leaq 0x27659(%rip), %rcx     # 0x4014a
callq 0x51e0
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x18f40
movl %eax, -0x24(%rbp)
cmpl $0x4, -0x24(%rbp)
jl 0x18bc5
movq 0x314a9(%rip), %rdi     # 0x49fc0
leaq 0x26729(%rip), %rsi     # 0x3f247
callq 0x5360
movq %rax, %rdi
movl -0x24(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq 0x26725(%rip), %rsi     # 0x3f25d
callq 0x5360
movq %rax, %rdi
movl $0x4, %esi
callq 0x5750
movq %rax, %rdi
leaq 0x28a64(%rip), %rsi     # 0x415b8
callq 0x5360
movq %rax, %rdi
movq 0x3141d(%rip), %rsi     # 0x49f80
callq 0x53c0
movq 0x31451(%rip), %rdi     # 0x49fc0
leaq 0x26547(%rip), %rsi     # 0x3f0bd
callq 0x5360
movq %rax, %rdi
leaq 0x27c05(%rip), %rsi     # 0x4078a
callq 0x5360
movq %rax, %rdi
movl $0x97e, %esi            # imm = 0x97E
callq 0x5750
movq %rax, %rdi
movq 0x313df(%rip), %rsi     # 0x49f80
callq 0x53c0
leaq 0x27abd(%rip), %rdi     # 0x4066a
leaq 0x26509(%rip), %rsi     # 0x3f0bd
movl $0x97e, %edx            # imm = 0x97E
leaq 0x2758a(%rip), %rcx     # 0x4014a
callq 0x51e0
cmpl $0x0, -0x24(%rbp)
jge 0x18c81
movq 0x313ea(%rip), %rdi     # 0x49fc0
leaq 0x26628(%rip), %rsi     # 0x3f205
callq 0x5360
movq %rax, %rdi
movl -0x24(%rbp), %esi
callq 0x5750
movq %rax, %rdi
leaq 0x26625(%rip), %rsi     # 0x3f21c
callq 0x5360
movq %rax, %rdi
xorl %esi, %esi
callq 0x5750
movq %rax, %rdi
leaq 0x289a8(%rip), %rsi     # 0x415b8
callq 0x5360
movq %rax, %rdi
movq 0x31361(%rip), %rsi     # 0x49f80
callq 0x53c0
movq 0x31395(%rip), %rdi     # 0x49fc0
leaq 0x2648b(%rip), %rsi     # 0x3f0bd
callq 0x5360
movq %rax, %rdi
leaq 0x27b49(%rip), %rsi     # 0x4078a
callq 0x5360
movq %rax, %rdi
movl $0x97f, %esi            # imm = 0x97F
callq 0x5750
movq %rax, %rdi
movq 0x31323(%rip), %rsi     # 0x49f80
callq 0x53c0
leaq 0x27a01(%rip), %rdi     # 0x4066a
leaq 0x2644d(%rip), %rsi     # 0x3f0bd
movl $0x97f, %edx            # imm = 0x97F
leaq 0x274ce(%rip), %rcx     # 0x4014a
callq 0x51e0
movq -0x10(%rbp), %rax
testb $0x1, 0x12(%rax)
je 0x18ccc
movq -0x58(%rbp), %rax
testb $0x1, 0x1c1(%rax)
jne 0x18cae
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x23630
movq %rax, -0x60(%rbp)
jmp 0x18cc2
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x24330
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x18ce0
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x24c10
movq %rax, -0x20(%rbp)
movq -0x58(%rbp), %rcx
movq -0x20(%rbp), %rax
cmpq 0x110(%rcx), %rax
jb 0x18db1
movq 0x312c4(%rip), %rdi     # 0x49fc0
leaq 0x26544(%rip), %rsi     # 0x3f247
callq 0x5360
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0x50c0
movq %rax, %rdi
leaq 0x2653f(%rip), %rsi     # 0x3f25d
callq 0x5360
movq %rax, %rdi
movq -0x58(%rbp), %rax
movq 0x110(%rax), %rsi
callq 0x50c0
movq %rax, %rdi
leaq 0x28878(%rip), %rsi     # 0x415b8
callq 0x5360
movq %rax, %rdi
movq 0x31231(%rip), %rsi     # 0x49f80
callq 0x53c0
movq 0x31265(%rip), %rdi     # 0x49fc0
leaq 0x2635b(%rip), %rsi     # 0x3f0bd
callq 0x5360
movq %rax, %rdi
leaq 0x27a19(%rip), %rsi     # 0x4078a
callq 0x5360
movq %rax, %rdi
movl $0x988, %esi            # imm = 0x988
callq 0x5750
movq %rax, %rdi
movq 0x311f3(%rip), %rsi     # 0x49f80
callq 0x53c0
leaq 0x278d1(%rip), %rdi     # 0x4066a
leaq 0x2631d(%rip), %rsi     # 0x3f0bd
movl $0x988, %edx            # imm = 0x988
leaq 0x2739e(%rip), %rcx     # 0x4014a
callq 0x51e0
movq -0x58(%rbp), %rax
testb $0x1, 0xe(%rax)
je 0x18f35
testb $0x1, -0x11(%rbp)
jne 0x18f35
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x5190
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movl $0x1, %ecx
callq 0x25940
movslq -0x24(%rbp), %rax
movq -0x50(%rbp,%rax,8), %rax
cmpq -0x20(%rbp), %rax
je 0x18f33
movq 0x311b7(%rip), %rdi     # 0x49fc0
leaq 0x26309(%rip), %rsi     # 0x3f119
callq 0x5360
movq %rax, %rdi
movslq -0x24(%rbp), %rax
movq -0x50(%rbp,%rax,8), %rsi
callq 0x50c0
movq %rax, %rdi
leaq 0x262ff(%rip), %rsi     # 0x3f12f
callq 0x5360
movq %rax, %rdi
leaq -0x65f(%rip), %rsi      # 0x187e0
callq 0x5120
movq %rax, %rdi
movslq -0x24(%rbp), %rax
movq -0x50(%rbp,%rax,8), %rsi
callq 0x50c0
movq %rax, %rdi
leaq -0x64f(%rip), %rsi      # 0x18810
callq 0x5120
movq %rax, %rdi
leaq 0x262c6(%rip), %rsi     # 0x3f134
callq 0x5360
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0x50c0
movq %rax, %rdi
leaq 0x262a6(%rip), %rsi     # 0x3f12f
callq 0x5360
movq %rax, %rdi
leaq -0x6b8(%rip), %rsi      # 0x187e0
callq 0x5120
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0x50c0
movq %rax, %rdi
leaq -0x6a3(%rip), %rsi      # 0x18810
callq 0x5120
movq %rax, %rdi
leaq 0x286f6(%rip), %rsi     # 0x415b8
callq 0x5360
movq %rax, %rdi
movq 0x310af(%rip), %rsi     # 0x49f80
callq 0x53c0
movq 0x310e3(%rip), %rdi     # 0x49fc0
leaq 0x261d9(%rip), %rsi     # 0x3f0bd
callq 0x5360
movq %rax, %rdi
leaq 0x27897(%rip), %rsi     # 0x4078a
callq 0x5360
movq %rax, %rdi
movl $0x990, %esi            # imm = 0x990
callq 0x5750
movq %rax, %rdi
movq 0x31071(%rip), %rsi     # 0x49f80
callq 0x53c0
leaq 0x2774f(%rip), %rdi     # 0x4066a
leaq 0x2619b(%rip), %rsi     # 0x3f0bd
movl $0x990, %edx            # imm = 0x990
leaq 0x2721c(%rip), %rcx     # 0x4014a
callq 0x51e0
jmp 0x18f35
movq -0x20(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nop