// File: /workspace/github_cpp_makefile_star2_O3/BenLangmead[P]bowtie/./ebwt_search_backtrack.h
// Function: GreedyDFSRangeSource::reportFullAlignment(unsigned int, unsigned int, unsigned int, int, unsigned short)
bool reportFullAlignment(uint32_t stackDepth,
			TIndexOffU top,
			TIndexOffU bot,
	                         int stratum,
	                         uint16_t cost)
	{
		assert_gt(bot, top);
		if(stackDepth == 0 && !_reportExacts) {
			// We are not reporting exact hits (usually because we've
			// already reported them as part of a previous invocation
			// of the backtracker)
			return false;
		}
		assert(!_reportRanges);
		TIndexOffU spread = bot - top;
		// Pick a random spot in the range to begin report
		TIndexOffU r = top + (_rand.nextU<TIndexOffU>() % spread);
		for(TIndexOffU i = 0; i < spread; i++) {
			TIndexOffU ri = r + i;
			if(ri >= bot) ri -= spread;
			// reportChaseOne takes the _mms[] list in terms of
			// their indices into the query string; not in terms
			// of their offset from the 3' or 5' end.
			assert_geq(cost, (uint32_t)(stratum << 14));
			if(_ebwt->reportChaseOne((*_qry), _qual, _name,
			                         _mms, _refcs,
			                         stackDepth, ri, top, bot,
			                         (uint32_t)_qlen, stratum, cost, _patid,
			                         _seed, _params))
			{
				// Return value of true means that we can stop
				return true;
			}
			// Return value of false means that we should continue
			// searching.  This could happen if we the call to
			// reportChaseOne() reported a hit, but the user asked for
			// multiple hits and we haven't reached the ceiling yet.
			// This might also happen if the call to reportChaseOne()
			// didn't report a hit because the alignment was spurious
			// (i.e. overlapped some padding).
		}
		// All range elements were examined and we should keep going
		return false;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, 0x30(%rsp)
movl %ecx, %r14d
movl %edx, %r15d
movq %rdi, %r12
testl %esi, %esi
jne 0x4025b
cmpb $0x1, 0xa4(%r12)
jne 0x40365
movl %r14d, %ebp
subl %r15d, %ebp
movl 0x134(%r12), %ecx
movl 0x138(%r12), %edx
movl 0x13c(%r12), %eax
imull %ecx, %eax
addl %edx, %eax
movl %eax, %edi
shrl $0x10, %edi
imull %ecx, %eax
addl %edx, %eax
movl %eax, 0x13c(%r12)
xorl %edi, %eax
movl $0x0, 0x140(%r12)
xorl %edx, %edx
divl %ebp
addl %r15d, %edx
movq %rdx, 0x28(%rsp)
leaq 0x58(%r12), %rax
movq %rax, 0x20(%rsp)
leaq 0x78(%r12), %rax
movq %rax, 0x18(%rsp)
movl %esi, %eax
movq %rax, 0x10(%rsp)
cmpl $0x1, %ebp
movl %ebp, 0x4(%rsp)
adcl $-0x1, %ebp
movzwl %r9w, %eax
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
movq 0x28(%rsp), %rax
addl %ebx, %eax
cmpl %r14d, %eax
movl 0x4(%rsp), %ecx
movl $0x0, %edx
cmovbl %edx, %ecx
subl %ecx, %eax
movq 0x20(%r12), %rdi
movq (%r12), %rsi
movq 0x10(%r12), %rdx
movq 0x18(%r12), %rcx
movl 0x8(%r12), %r10d
movl 0x1d8(%r12), %r11d
movl 0x1dc(%r12), %r13d
subq $0x8, %rsp
movq 0x28(%rsp), %r8
movq 0x20(%rsp), %r9
pushq $0x0
pushq 0x28(%r12)
pushq %r13
pushq %r11
pushq 0x30(%rsp)
pushq 0x60(%rsp)
pushq %r10
pushq %r14
pushq %r15
pushq %rax
pushq 0x68(%rsp)
callq 0x403b2
addq $0x60, %rsp
subl $0x1, %ebp
setb %cl
testb %al, %al
jne 0x40367
incl %ebx
testb %cl, %cl
je 0x402da
jmp 0x40367
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq