// File: BenLangmead[P]bowtie/./ebwt_search_backtrack.h
// Function: GreedyDFSRangeSource::promotePartialMutations(int)
void promotePartialMutations(int stackDepth) {
		if(_muts == NULL) {
			// No mutations to undo
			return;
		}
		size_t numMuts = _muts->size();
		assert_leq(numMuts, _qlen);
		for(size_t i = 0; i < numMuts; i++) {
			// Entries in _mms[] are in terms of offset into
			// _qry - not in terms of offset from 3' or 5' end
			assert_lt(stackDepth + i, _qlen);
			// All partial-alignment mutations should fall
			// within bounds
			assert_lt((*_muts)[i].pos, _qlen);
			// All partial-alignment mutations should fall
			// within unrevisitable region
			assert_lt(_qlen - (*_muts)[i].pos - 1, _unrevOff);
#ifndef NDEBUG
			// Shouldn't be any overlap between mismatched positions
			// and positions that mismatched in the partial alignment.
			for(size_t j = 0; j < stackDepth + i; j++) {
				assert_neq(_mms[j], (uint32_t)(*_muts)[i].pos);
			}
#endif
			if(_mms.size() <= stackDepth + i) {
				assert_eq(_mms.size(), stackDepth + i);
				_mms.push_back((*_muts)[i].pos);
			} else {
				_mms[stackDepth + i] = (*_muts)[i].pos;
			}
			if(_refcs.size() <= stackDepth + i) {
				assert_eq(_refcs.size(), stackDepth + i);
				_refcs.push_back("ACGT"[(*_muts)[i].newBase]);
			} else {
				_refcs[stackDepth + i] = "ACGT"[(*_muts)[i].newBase];
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, 0xb0(%rax)
jne 0x69b36
jmp 0x69c91
movq -0x30(%rbp), %rax
movq 0xb0(%rax), %rdi
callq 0x69ca0
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x69c91
movq -0x30(%rbp), %rdi
addq $0x58, %rdi
callq 0x24960
movslq -0xc(%rbp), %rcx
addq -0x20(%rbp), %rcx
cmpq %rcx, %rax
ja 0x69bae
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x58, %rcx
movq %rcx, -0x38(%rbp)
movq 0xb0(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x69f00
movq -0x38(%rbp), %rdi
movzwl (%rax), %eax
movl %eax, -0x24(%rbp)
leaq -0x24(%rbp), %rsi
callq 0x32160
jmp 0x69be2
movq -0x30(%rbp), %rax
movq 0xb0(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x69f00
movq -0x30(%rbp), %rdi
movzwl (%rax), %eax
movl %eax, -0x3c(%rbp)
addq $0x58, %rdi
movslq -0xc(%rbp), %rsi
addq -0x20(%rbp), %rsi
callq 0x24930
movl -0x3c(%rbp), %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rdi
addq $0x78, %rdi
callq 0x698c0
movslq -0xc(%rbp), %rcx
addq -0x20(%rbp), %rcx
cmpq %rcx, %rax
ja 0x69c3d
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x78, %rcx
movq %rcx, -0x48(%rbp)
movq 0xb0(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x69f00
movq -0x48(%rbp), %rdi
movzbl 0x3(%rax), %eax
movl %eax, %ecx
leaq 0x1fb94(%rip), %rax     # 0x897c0
movb (%rax,%rcx), %al
movb %al, -0x25(%rbp)
leaq -0x25(%rbp), %rsi
callq 0x40fe0
jmp 0x69c7e
movq -0x30(%rbp), %rax
movq 0xb0(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x69f00
movq -0x30(%rbp), %rdi
movzbl 0x3(%rax), %eax
movl %eax, %ecx
leaq 0x1fb5e(%rip), %rax     # 0x897c0
movb (%rax,%rcx), %al
movb %al, -0x49(%rbp)
addq $0x78, %rdi
movslq -0xc(%rbp), %rsi
addq -0x20(%rbp), %rsi
callq 0x40380
movb -0x49(%rbp), %cl
movb %cl, (%rax)
jmp 0x69c80
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x69b52
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)