// File: /workspace/github_cpp_makefile_star2_O3/BenLangmead[P]bowtie/./ebwt_search_backtrack.h
// Function: GreedyDFSRangeSource::reportAlignment(unsigned int, unsigned int, unsigned int, unsigned short)
bool reportAlignment(uint32_t stackDepth, TIndexOffU top,
			TIndexOffU bot, uint16_t cost)
	{
#ifndef NDEBUG
		// No two elements of _mms[] should be the same
		assert_geq(_mms.size(), stackDepth);
		for(size_t i = 0; i < stackDepth; i++) {
			for(size_t j = i+1; j < stackDepth; j++) {
				assert_neq(_mms[j], _mms[i]);
			}
			// All elements of _mms[] should fall within bounds
			assert_lt(_mms[i], _qlen);
		}
#endif
		if(_reportPartials) {
			assert_leq(stackDepth, _reportPartials);
			if(stackDepth > 0) {
				// Report this partial alignment.  A partial alignment
				// is defined purely by its mismatches; top and bot are
				// ignored.
				reportPartial(stackDepth);
			}
			return false; // keep going - we want to find all partial alignments
		}
		int stratum = 0;
		if(stackDepth > 0) {
			stratum = calcStratum(_mms, stackDepth);
		}
		assert_lt(stratum, 4);
		assert_geq(stratum, 0);
		bool hit;
		// If _muts != NULL then this alignment extends a partial
		// alignment, so we have to account for the differences present
		// in the partial.
		if(_muts != NULL) {
			// Undo partial-alignment mutations to get original _qry
			ASSERT_ONLY(BTDnaString tmp = (*_qry));
			undoPartialMutations();
			assert_neq(tmp, (*_qry));
			// Add the partial-alignment mutations to the _mms[] array
			promotePartialMutations(stackDepth);
			// All muts are in the seed, so they count toward the stratum
			size_t numMuts = _muts->size();
			stratum += numMuts;
			cost |= (stratum << 14);
			assert_geq(cost, (uint32_t)(stratum << 14));
			// Report the range of full alignments
			hit = reportFullAlignment((uint32_t)(stackDepth + numMuts), top, bot, stratum, cost);
			// Re-apply partial-alignment mutations
			applyPartialMutations();
			assert_eq(tmp, (*_qry));
		} else {
			// Report the range of full alignments
			cost |= (stratum << 14);
			assert_geq(cost, (uint32_t)(stratum << 14));
			hit = reportFullAlignment(stackDepth, top, bot, stratum, cost);
		}
		return hit;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
cmpl $0x0, 0xa0(%rdi)
je 0x3e68d
testl %r15d, %r15d
je 0x3e686
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3ff84
xorl %eax, %eax
jmp 0x3e71d
movl %r8d, %r12d
movl %ecx, %ebp
movl %edx, %r14d
testl %r15d, %r15d
je 0x3e6c4
movl %r15d, %eax
movq 0x60(%rbx), %rcx
movq 0x8(%rbx), %rdx
movl 0x3c(%rbx), %esi
subq %rsi, %rdx
xorl %esi, %esi
xorl %r13d, %r13d
movl (%rcx,%rsi,4), %edi
cmpq %rdx, %rdi
sbbl $-0x1, %r13d
incq %rsi
cmpq %rsi, %rax
jne 0x3e6b0
jmp 0x3e6c7
xorl %r13d, %r13d
cmpq $0x0, 0xb0(%rbx)
je 0x3e72c
movq %rbx, %rdi
callq 0x400f4
movq %rbx, %rdi
movl %r15d, %esi
callq 0x40130
movq 0xb0(%rbx), %rax
movl 0x18(%rax), %esi
addl %esi, %r13d
movl %r13d, %eax
shll $0xe, %eax
orl %eax, %r12d
addl %r15d, %esi
movzwl %r12w, %r9d
movq %rbx, %rdi
movl %r14d, %edx
movl %ebp, %ecx
movl %r13d, %r8d
callq 0x4022c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x40376
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r13d, %eax
shll $0xe, %eax
orl %eax, %r12d
movzwl %r12w, %r9d
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
movl %ebp, %ecx
movl %r13d, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4022c