// File: /workspace/github_cpp_makefile_star2_O3/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 0x2d2c8
movb 0x17d(%r14), %bpl
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2e97e
testb %bpl, %bpl
je 0x2d3a2
movl (%r13), %eax
movl 0x6c(%r14), %ecx
cmpl %ecx, %eax
ja 0x2d26e
movswl 0xc(%r13), %edx
addl %eax, %edx
cmpl %ecx, %edx
jb 0x2d26e
ja 0x2d266
movsbl 0xe(%r13), %ecx
cmpl %ecx, 0x70(%r14)
jge 0x2d26e
decl (%r12)
movl (%r13), %eax
movl %eax, %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 0x2d420
movq 0xb8(%r14), %rbp
movl (%r13), %eax
movq %rax, (%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2e97e
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 0x2d330
movswl 0xc(%r13), %edx
addl %edx, %eax
cmpl %ecx, %eax
jb 0x2d330
ja 0x2d32c
movsbl 0xe(%r13), %eax
cmpl %eax, 0x70(%r14)
jg 0x2d330
decl (%r12)
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 0x2d427
movq 0xb8(%r14), %rax
movl (%r13), %ecx
movl 0x6c(%r14), %edx
cmpl %edx, %ecx
ja 0x2d3d1
movswl 0xc(%r13), %esi
addl %ecx, %esi
cmpl %edx, %esi
jb 0x2d3d1
ja 0x2d3cd
movsbl 0xe(%r13), %edx
cmpl %edx, 0x70(%r14)
jge 0x2d3d1
decl (%r12)
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 0x2d4d2
movb 0x17d(%r14), %bpl
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2e97e
testb %bpl, %bpl
je 0x2d594
movl (%r15), %eax
movl 0x6c(%r14), %ecx
cmpl %ecx, %eax
ja 0x2d47e
movswl 0xc(%r15), %edx
addl %eax, %edx
cmpl %ecx, %edx
jb 0x2d47e
ja 0x2d479
movsbl 0xe(%r15), %ecx
cmpl %ecx, 0x70(%r14)
jge 0x2d47e
decl (%rbx)
movl (%r15), %eax
movl %eax, %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 0x2d609
movq 0xb8(%r14), %r12
movl (%r15), %r13d
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2e97e
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 0x2d530
movswl 0xc(%r15), %edx
addl %edx, %eax
cmpl %ecx, %eax
jb 0x2d530
ja 0x2d52e
movsbl 0xe(%r15), %eax
cmpl %eax, 0x70(%r14)
jg 0x2d530
decl (%rbx)
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 0x2d610
movq 0xb8(%r14), %rax
movl (%r15), %ecx
movl 0x6c(%r14), %edx
cmpl %edx, %ecx
ja 0x2d5c0
movswl 0xc(%r15), %esi
addl %ecx, %esi
cmpl %edx, %esi
jb 0x2d5c0
ja 0x2d5be
movsbl 0xe(%r15), %edx
cmpl %edx, 0x70(%r14)
jge 0x2d5c0
decl (%rbx)
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
nop