// File: /workspace/github_cpp_makefile_star2_O1/BenLangmead[P]bowtie/./ebwt.h
// Function: Ebwt::mapLFEx(SideLocus const&, SideLocus const&, unsigned int*, unsigned int*) const
inline void Ebwt::mapLFEx(const SideLocus& ltop,
                                const SideLocus& lbot,
                                TIndexOffU *tops,
                                TIndexOffU *bots
                                ASSERT_ONLY(, bool overrideSanity)
                                ) const
{
	// TODO: Where there's overlap, reuse the count for the overlapping
	// portion
#ifdef EBWT_STATS
	const_cast<Ebwt*>(this)->mapLFExs_++;
#endif
	assert_eq(0, tops[0]); assert_eq(0, bots[0]);
	assert_eq(0, tops[1]); assert_eq(0, bots[1]);
	assert_eq(0, tops[2]); assert_eq(0, bots[2]);
	assert_eq(0, tops[3]); assert_eq(0, bots[3]);
	if(ltop._fw) {
		 // Forward side
		!_eh._isBt2Index ? countFwSideEx(ltop, tops)
		                 : countBt2SideEx(ltop, tops);
	} else {
		countBwSideEx(ltop, tops); // Backward side
	}

	if(lbot._fw) {
		// Forward side
		!_eh._isBt2Index ? countFwSideEx(lbot, bots)
		                 : countBt2SideEx(lbot, bots);
	} else {
		countBwSideEx(lbot, bots); // Backward side
	}
#ifndef NDEBUG
	if(_sanity && !overrideSanity) {
		// Make sure results match up with individual calls to mapLF;
		// be sure to override sanity-checking in the callee, or we'll
		// have infinite recursion
		assert_eq(mapLF(ltop, 0, true), tops[0]);
		assert_eq(mapLF(ltop, 1, true), tops[1]);
		assert_eq(mapLF(ltop, 2, true), tops[2]);
		assert_eq(mapLF(ltop, 3, true), tops[3]);
		assert_eq(mapLF(lbot, 0, true), bots[0]);
		assert_eq(mapLF(lbot, 1, true), bots[1]);
		assert_eq(mapLF(lbot, 2, true), bots[2]);
		assert_eq(mapLF(lbot, 3, true), bots[3]);
	}
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r14
cmpb $0x1, 0xa(%rsi)
jne 0x2d630
movb 0x17d(%r14), %bpl
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2ed00
testb %bpl, %bpl
je 0x2d68f
movl (%r13), %eax
movl 0x6c(%r14), %ecx
cmpl %ecx, %eax
ja 0x2d754
movswl 0xc(%r13), %edx
addl %edx, %eax
cmpl %ecx, %eax
jb 0x2d754
jbe 0x2d743
decl (%r12)
jmp 0x2d754
movq 0xb8(%r14), %rbp
movl (%r13), %eax
movq %rax, (%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2ed00
movl (%r13), %eax
addq 0xb8(%r14), %rax
movswq 0xc(%r13), %rcx
movzbl (%rcx,%rax), %eax
movb 0xe(%r13), %cl
addb %cl, %cl
shrl %cl, %eax
andl $0x3, %eax
incl (%r12,%rax,4)
movl (%r13), %eax
movl 0x6c(%r14), %ecx
cmpl %ecx, %eax
ja 0x2d6d1
movswl 0xc(%r13), %edx
addl %edx, %eax
cmpl %ecx, %eax
jb 0x2d6d1
jbe 0x2d6c4
decl (%r12)
jmp 0x2d6d1
movq 0xb8(%r14), %rax
movl (%r13), %ecx
movl 0x6c(%r14), %edx
cmpl %edx, %ecx
ja 0x2d7be
movswl 0xc(%r13), %esi
addl %ecx, %esi
cmpl %edx, %esi
jb 0x2d7be
jbe 0x2d7ad
decl (%r12)
jmp 0x2d7be
jne 0x2d6d1
movsbl 0xe(%r13), %eax
cmpl %eax, 0x70(%r14)
jle 0x2d689
addq (%rsp), %rbp
movl 0x15c(%r14), %eax
movl -0x8(%rax,%rbp), %ecx
subl (%r12), %ecx
movq 0x90(%r14), %rdx
addl (%rdx), %ecx
movl %ecx, (%r12)
movl -0x4(%rax,%rbp), %ecx
subl 0x4(%r12), %ecx
addl %eax, %eax
movq 0x90(%r14), %rdx
addl 0x4(%rdx), %ecx
movl %ecx, 0x4(%r12)
movl -0x8(%rax,%rbp), %ecx
subl 0x8(%r12), %ecx
movq 0x90(%r14), %rdx
addl 0x8(%rdx), %ecx
movl %ecx, 0x8(%r12)
movl -0x4(%rax,%rbp), %eax
subl 0xc(%r12), %eax
movq %r12, %rcx
addq $0xc, %rcx
movq 0x90(%r14), %r12
addq $0xc, %r12
jmp 0x2d814
jne 0x2d754
movsbl 0xe(%r13), %eax
cmpl %eax, 0x70(%r14)
jl 0x2d627
movl (%r13), %ecx
addq 0xb8(%r14), %rcx
movl 0x15c(%r14), %edx
movq 0x90(%r14), %rax
movl (%rax), %eax
addl -0x10(%rdx,%rcx), %eax
addl %eax, (%r12)
movq 0x90(%r14), %rax
movl 0x4(%rax), %eax
addl -0xc(%rdx,%rcx), %eax
addl %eax, 0x4(%r12)
movq 0x90(%r14), %rax
movl 0x8(%rax), %eax
addl -0x8(%rdx,%rcx), %eax
addl %eax, 0x8(%r12)
movq 0x90(%r14), %rax
movl 0xc(%rax), %eax
addl -0x4(%rdx,%rcx), %eax
jmp 0x2d80d
jne 0x2d7be
movsbl 0xe(%r13), %edx
cmpl %edx, 0x70(%r14)
jl 0x2d6bb
movq 0x90(%r14), %rdx
movl (%rdx), %edx
addl -0x8(%rax,%rcx), %edx
movl 0x15c(%r14), %esi
addl %edx, (%r12)
movq 0x90(%r14), %rdx
movl 0x4(%rdx), %edx
addl -0x4(%rax,%rcx), %edx
addq %rax, %rcx
addl %edx, 0x4(%r12)
movq 0x90(%r14), %rax
movl 0x8(%rax), %eax
addl -0x8(%rsi,%rcx), %eax
addl %eax, 0x8(%r12)
movq 0x90(%r14), %rax
movl 0xc(%rax), %eax
addl -0x4(%rsi,%rcx), %eax
addq $0xc, %r12
movq %r12, %rcx
addl (%r12), %eax
movl %eax, (%rcx)
cmpb $0x1, 0xa(%r15)
jne 0x2d86a
movb 0x17d(%r14), %bpl
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2ed00
testb %bpl, %bpl
je 0x2d8bf
movl (%r15), %eax
movl 0x6c(%r14), %ecx
cmpl %ecx, %eax
ja 0x2d976
movswl 0xc(%r15), %edx
addl %edx, %eax
cmpl %ecx, %eax
jb 0x2d976
jbe 0x2d965
decl (%rbx)
jmp 0x2d976
movq 0xb8(%r14), %r12
movl (%r15), %r13d
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2ed00
movl (%r15), %eax
addq 0xb8(%r14), %rax
movswq 0xc(%r15), %rcx
movzbl (%rcx,%rax), %eax
movb 0xe(%r15), %cl
addb %cl, %cl
shrl %cl, %eax
andl $0x3, %eax
incl (%rbx,%rax,4)
movl (%r15), %eax
movl 0x6c(%r14), %ecx
cmpl %ecx, %eax
ja 0x2d8fe
movswl 0xc(%r15), %edx
addl %edx, %eax
cmpl %ecx, %eax
jb 0x2d8fe
jbe 0x2d8f1
decl (%rbx)
jmp 0x2d8fe
movq 0xb8(%r14), %rax
movl (%r15), %ecx
movl 0x6c(%r14), %edx
cmpl %edx, %ecx
ja 0x2d9d9
movswl 0xc(%r15), %esi
addl %ecx, %esi
cmpl %edx, %esi
jb 0x2d9d9
jbe 0x2d9c8
decl (%rbx)
jmp 0x2d9d9
jne 0x2d8fe
movsbl 0xe(%r15), %eax
cmpl %eax, 0x70(%r14)
jle 0x2d8bb
addq %r13, %r12
movl 0x15c(%r14), %eax
movl -0x8(%rax,%r12), %ecx
subl (%rbx), %ecx
movq 0x90(%r14), %rdx
addl (%rdx), %ecx
movl %ecx, (%rbx)
movl -0x4(%rax,%r12), %ecx
subl 0x4(%rbx), %ecx
addl %eax, %eax
movq 0x90(%r14), %rdx
addl 0x4(%rdx), %ecx
movl %ecx, 0x4(%rbx)
movl -0x8(%rax,%r12), %ecx
subl 0x8(%rbx), %ecx
movq 0x90(%r14), %rdx
addl 0x8(%rdx), %ecx
movl %ecx, 0x8(%rbx)
movl -0x4(%rax,%r12), %eax
subl 0xc(%rbx), %eax
movq %rbx, %rcx
addq $0xc, %rcx
movq 0x90(%r14), %rbx
addq $0xc, %rbx
jmp 0x2da29
jne 0x2d976
movsbl 0xe(%r15), %eax
cmpl %eax, 0x70(%r14)
jl 0x2d863
movl (%r15), %ecx
addq 0xb8(%r14), %rcx
movl 0x15c(%r14), %edx
movq 0x90(%r14), %rax
movl (%rax), %eax
addl -0x10(%rdx,%rcx), %eax
addl %eax, (%rbx)
movq 0x90(%r14), %rax
movl 0x4(%rax), %eax
addl -0xc(%rdx,%rcx), %eax
addl %eax, 0x4(%rbx)
movq 0x90(%r14), %rax
movl 0x8(%rax), %eax
addl -0x8(%rdx,%rcx), %eax
addl %eax, 0x8(%rbx)
movq 0x90(%r14), %rax
movl 0xc(%rax), %eax
addl -0x4(%rdx,%rcx), %eax
jmp 0x2da22
jne 0x2d9d9
movsbl 0xe(%r15), %edx
cmpl %edx, 0x70(%r14)
jl 0x2d8ea
movq 0x90(%r14), %rdx
movl (%rdx), %edx
addl -0x8(%rax,%rcx), %edx
movl 0x15c(%r14), %esi
addl %edx, (%rbx)
movq 0x90(%r14), %rdx
movl 0x4(%rdx), %edx
addl -0x4(%rax,%rcx), %edx
addq %rax, %rcx
addl %edx, 0x4(%rbx)
movq 0x90(%r14), %rax
movl 0x8(%rax), %eax
addl -0x8(%rsi,%rcx), %eax
addl %eax, 0x8(%rbx)
movq 0x90(%r14), %rax
movl 0xc(%rax), %eax
addl -0x4(%rsi,%rcx), %eax
addq $0xc, %rbx
movq %rbx, %rcx
addl (%rbx), %eax
movl %eax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq