// File: /workspace/github_cpp_makefile_star2_O2/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 0x34f7e
testl %r15d, %r15d
je 0x34f7a
movq %rbx, %rdi
movl %r15d, %esi
callq 0x36604
xorl %eax, %eax
jmp 0x34ff8
movl %r8d, %r12d
movl %ecx, %ebp
movl %edx, %r14d
testl %r15d, %r15d
je 0x34f9f
leaq 0x58(%rbx), %rsi
movq %rbx, %rdi
movl %r15d, %edx
callq 0x3676a
movl %eax, %r13d
jmp 0x34fa2
xorl %r13d, %r13d
cmpq $0x0, 0xb0(%rbx)
je 0x35007
movq %rbx, %rdi
callq 0x36794
movq %rbx, %rdi
movl %r15d, %esi
callq 0x367cc
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 0x368e0
movl %eax, %ebp
movq %rbx, %rdi
callq 0x36a1a
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 0x368e0
nop