// File: 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
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movw %r9w, %ax
movq %rdi, -0x38(%rbp)
movl %esi, -0x3c(%rbp)
movl %edx, -0x40(%rbp)
movl %ecx, -0x44(%rbp)
movl %r8d, -0x48(%rbp)
movw %ax, -0x4a(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpl $0x0, -0x3c(%rbp)
jne 0x69d11
movq -0x68(%rbp), %rax
testb $0x1, 0xa4(%rax)
jne 0x69d11
movb $0x0, -0x29(%rbp)
jmp 0x69e3d
movq -0x68(%rbp), %rdi
movl -0x44(%rbp), %eax
subl -0x40(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x6c(%rbp)
addq $0x134, %rdi            # imm = 0x134
callq 0x69f30
xorl %edx, %edx
divl -0x50(%rbp)
movl -0x6c(%rbp), %eax
addl %edx, %eax
movl %eax, -0x54(%rbp)
movl $0x0, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x69e39
movl -0x54(%rbp), %eax
addl -0x58(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jb 0x69d6c
movl -0x50(%rbp), %ecx
movl -0x5c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x5c(%rbp)
movq -0x68(%rbp), %rax
movq 0x20(%rax), %rdi
movq (%rax), %rsi
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
movq %rax, %r8
addq $0x58, %r8
movq %rax, %r9
addq $0x78, %r9
movl -0x3c(%rbp), %r10d
movq %r10, -0x88(%rbp)
movl -0x5c(%rbp), %r10d
movl %r10d, -0x7c(%rbp)
movl -0x40(%rbp), %r13d
movl -0x44(%rbp), %r12d
movq 0x8(%rax), %r10
movl %r10d, %r15d
movl -0x48(%rbp), %r14d
movw -0x4a(%rbp), %bx
movl 0x1d8(%rax), %r11d
movl 0x1dc(%rax), %r10d
movq 0x28(%rax), %rax
movq %rax, -0x78(%rbp)
xorl %eax, %eax
movq -0x88(%rbp), %rax
movq %rax, (%rsp)
movl -0x7c(%rbp), %eax
movl %eax, 0x8(%rsp)
movq -0x78(%rbp), %rax
movl %r13d, 0x10(%rsp)
movl %r12d, 0x18(%rsp)
movl %r15d, 0x20(%rsp)
movl %r14d, 0x28(%rsp)
movzwl %bx, %ebx
movl %ebx, 0x30(%rsp)
movl %r11d, 0x38(%rsp)
movl %r10d, 0x40(%rsp)
movq %rax, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
callq 0x69f50
testb $0x1, %al
jne 0x69e23
jmp 0x69e29
movb $0x1, -0x29(%rbp)
jmp 0x69e3d
jmp 0x69e2b
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x69d44
movb $0x0, -0x29(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop