// File: BenLangmead[P]bowtie/./ebwt_search_backtrack.h
// Function: GreedyDFSRangeSource::reportPartial(unsigned int)
bool reportPartial(uint32_t stackDepth) {
		// Sanity-check stack depth
		if(_3revOff != _2revOff) {
			assert_leq(stackDepth, 3);
		} else if(_2revOff != _1revOff) {
			assert_leq(stackDepth, 2);
		} else {
			assert_leq(stackDepth, 1);
		}

		// Possibly report
		assert_gt(_reportPartials, 0);
		assert(_partials != NULL);
		ASSERT_ONLY(uint32_t qualTot = 0);
		PartialAlignment al;
		al.u64.u64 = 0xffffffffffffffffllu;
		assert_leq(stackDepth, 3);
		assert_gt(stackDepth, 0);

		// First mismatch
		assert_gt(_mms.size(), 0);
		assert_lt(_mms[0], _qlen);
		// First, append the mismatch position in the read
		al.entry.pos0 = (uint16_t)_mms[0]; // pos
		ASSERT_ONLY(uint8_t qual0 = mmPenalty(_maqPenalty, phredCharToPhredQual((*_qual)[_mms[0]])));
		ASSERT_ONLY(qualTot += qual0);
		uint32_t ci = (uint32_t)(_qlen - _mms[0] - 1);
		// _chars[] is index in terms of RHS-relative depth
		int c = asc2dna[(int)_chars[ci]];
		assert_lt(c, 4);
		assert_neq(c, (int)(*_qry)[_mms[0]]);
		// Second, append the substituted character for the position
		al.entry.char0 = c;

		if(stackDepth > 1) {
			assert_gt(_mms.size(), 1);
			// Second mismatch
			assert_lt(_mms[1], _qlen);
			// First, append the mismatch position in the read
			al.entry.pos1 = (uint16_t)_mms[1]; // pos
			ASSERT_ONLY(uint8_t qual1 = mmPenalty(_maqPenalty, phredCharToPhredQual((*_qual)[_mms[1]])));
			ASSERT_ONLY(qualTot += qual1);
			ci = (uint32_t)(_qlen - _mms[1] - 1);
			// _chars[] is index in terms of RHS-relative depth
			c = asc2dna[(int)_chars[ci]];
			assert_lt(c, 4);
			assert_neq(c, (int)(*_qry)[_mms[1]]);
			// Second, append the substituted character for the position
			al.entry.char1 = c;
			if(stackDepth > 2) {
				assert_gt(_mms.size(), 2);
				// Second mismatch
				assert_lt(_mms[2], _qlen);
				// First, append the mismatch position in the read
				al.entry.pos2 = (uint16_t)_mms[2]; // pos
				ASSERT_ONLY(uint8_t qual2 = mmPenalty(_maqPenalty, phredCharToPhredQual((*_qual)[_mms[2]])));
				ASSERT_ONLY(qualTot += qual2);
				ci = (uint32_t)(_qlen - _mms[2] - 1);
				// _chars[] is index in terms of RHS-relative depth
				c = asc2dna[(int)_chars[ci]];
				assert_lt(c, 4);
				assert_neq(c, (int)(*_qry)[_mms[2]]);
				// Second, append the substituted character for the position
				al.entry.char2 = c;
			} else {
				// Signal that the '2' slot is empty
				al.entry.pos2 = 0xffff;
			}
		} else {
			// Signal that the '1' slot is empty
			al.entry.pos1 = 0xffff;
		}

		assert_leq(qualTot, _qualThresh);
		assert(validPartialAlignment(al));
#ifndef NDEBUG
		assert(al.repOk(_qualThresh, (uint32_t)_qlen, (*_qual), _maqPenalty));
		for(size_t i = 0; i < _partialsBuf.size(); i++) {
			assert(validPartialAlignment(_partialsBuf[i]));
			assert(!samePartialAlignment(_partialsBuf[i], al));
		}
#endif
		_partialsBuf.push_back(al);
		return true;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movl 0x3c(%rcx), %eax
cmpl 0x38(%rcx), %eax
je 0x69621
jmp 0x69633
movq -0x28(%rbp), %rcx
movl 0x38(%rcx), %eax
cmpl 0x34(%rcx), %eax
je 0x6962f
jmp 0x69631
jmp 0x69631
jmp 0x69633
movq -0x28(%rbp), %rdi
movq $-0x1, -0x18(%rbp)
addq $0x58, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x24930
movq -0x28(%rbp), %rdi
movl (%rax), %eax
movzwl %ax, %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
andq $0xffff, %rcx           # imm = 0xFFFF
andq $-0x10000, %rax         # imm = 0xFFFF0000
orq %rcx, %rax
movq %rax, -0x18(%rbp)
movq 0x8(%rdi), %rax
movq %rax, -0x30(%rbp)
addq $0x58, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x24930
movq -0x30(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl (%rdx), %edx
subq %rdx, %rcx
subq $0x1, %rcx
movl %ecx, -0x1c(%rbp)
movq 0x98(%rax), %rax
movl -0x1c(%rbp), %ecx
movsbl (%rax,%rcx), %eax
movslq %eax, %rcx
leaq 0x40ffd(%rip), %rax     # 0xaa6b0
movzbl (%rax,%rcx), %eax
movl %eax, -0x20(%rbp)
movslq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
andq $0x3, %rcx
shlq $0x30, %rcx
movabsq $-0x3000000000001, %rdx # imm = 0xFFFCFFFFFFFFFFFF
andq %rdx, %rax
orq %rcx, %rax
movq %rax, -0x18(%rbp)
cmpl $0x1, -0xc(%rbp)
jbe 0x69875
movq -0x28(%rbp), %rdi
addq $0x58, %rdi
movl $0x1, %esi
callq 0x24930
movq -0x28(%rbp), %rdi
movl (%rax), %eax
movzwl %ax, %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
andq $0xffff, %rcx           # imm = 0xFFFF
shlq $0x10, %rcx
movabsq $-0xffff0001, %rdx      # imm = 0xFFFFFFFF0000FFFF
andq %rdx, %rax
orq %rcx, %rax
movq %rax, -0x18(%rbp)
movq 0x8(%rdi), %rax
movq %rax, -0x38(%rbp)
addq $0x58, %rdi
movl $0x1, %esi
callq 0x24930
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl (%rdx), %edx
subq %rdx, %rcx
subq $0x1, %rcx
movl %ecx, -0x1c(%rbp)
movq 0x98(%rax), %rax
movl -0x1c(%rbp), %ecx
movsbl (%rax,%rcx), %eax
movslq %eax, %rcx
leaq 0x40f43(%rip), %rax     # 0xaa6b0
movzbl (%rax,%rcx), %eax
movl %eax, -0x20(%rbp)
movslq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
andq $0x3, %rcx
shlq $0x32, %rcx
movabsq $-0xc000000000001, %rdx # imm = 0xFFF3FFFFFFFFFFFF
andq %rdx, %rax
orq %rcx, %rax
movq %rax, -0x18(%rbp)
cmpl $0x2, -0xc(%rbp)
jbe 0x69854
movq -0x28(%rbp), %rdi
addq $0x58, %rdi
movl $0x2, %esi
callq 0x24930
movq -0x28(%rbp), %rdi
movl (%rax), %eax
movzwl %ax, %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
andq $0xffff, %rcx           # imm = 0xFFFF
shlq $0x20, %rcx
movabsq $-0xffff00000001, %rdx  # imm = 0xFFFF0000FFFFFFFF
andq %rdx, %rax
orq %rcx, %rax
movq %rax, -0x18(%rbp)
movq 0x8(%rdi), %rax
movq %rax, -0x40(%rbp)
addq $0x58, %rdi
movl $0x2, %esi
callq 0x24930
movq -0x40(%rbp), %rcx
movq %rax, %rdx
movq -0x28(%rbp), %rax
movl (%rdx), %edx
subq %rdx, %rcx
subq $0x1, %rcx
movl %ecx, -0x1c(%rbp)
movq 0x98(%rax), %rax
movl -0x1c(%rbp), %ecx
movsbl (%rax,%rcx), %eax
movslq %eax, %rcx
leaq 0x40e89(%rip), %rax     # 0xaa6b0
movzbl (%rax,%rcx), %eax
movl %eax, -0x20(%rbp)
movslq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
andq $0x3, %rcx
shlq $0x34, %rcx
movabsq $-0x30000000000001, %rdx # imm = 0xFFCFFFFFFFFFFFFF
andq %rdx, %rax
orq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x69873
movabsq $-0xffff00000001, %rax  # imm = 0xFFFF0000FFFFFFFF
andq -0x18(%rbp), %rax
movabsq $0xffff00000000, %rcx   # imm = 0xFFFF00000000
orq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x69894
movabsq $-0xffff0001, %rax      # imm = 0xFFFFFFFF0000FFFF
andq -0x18(%rbp), %rax
movabsq $0xffff0000, %rcx       # imm = 0xFFFF0000
orq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
addq $0x158, %rdi            # imm = 0x158
leaq -0x18(%rbp), %rsi
callq 0x698e0
movb $0x1, %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)