// File: BenLangmead[P]bowtie/./aligner.h
// Function: PairedBWAlignerV2<EbwtRangeSource>::resolveOutstanding(std::pair<unsigned int, unsigned int> const&, unsigned int, Range const&)
void resolveOutstanding(const UPair& off,
	                        const TIndexOffU tlen,
	                        const Range& range)
	{
		assert(!this->done);
		if(!donePe_) {
			bool ret = resolveOutstandingInRef(off, tlen, range);
			if(++mixedAttempts_ > mixedAttemptLim_ || ret) {
				// Give up on this pair
				donePe_ = true;
				if(sinkPtSe1_ != NULL) {
					if(doneSe1_) driver_->removeMate(1);
					if(doneSe2_) driver_->removeMate(2);
				}
			}
			this->done = (donePe_ && (!sinkPt_->empty() || sinkPtSe1_ == NULL || (doneSe1_ && doneSe2_)));
		}
		if(!this->done && sinkPtSe1_ != NULL) {
			bool doneSe = (range.mate1 ? doneSe1_ : doneSe2_);
			if(!doneSe) {
				// Hold onto this single-end alignment in case we don't
				// find any paired alignments
				reportSe(range, off, tlen);
			}
			this->done = doneSe1_ && doneSe2_ && donePe_;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
testb $0x1, 0x69(%rax)
jne 0x63c8b
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0x63d70
movq -0x38(%rbp), %rcx
andb $0x1, %al
movb %al, -0x21(%rbp)
movl 0xbc(%rcx), %eax
addl $0x1, %eax
movl %eax, 0xbc(%rcx)
cmpl 0xb8(%rcx), %eax
ja 0x63bc3
testb $0x1, -0x21(%rbp)
je 0x63c19
movq -0x38(%rbp), %rax
movb $0x1, 0x69(%rax)
cmpq $0x0, 0x88(%rax)
je 0x63c17
movq -0x38(%rbp), %rax
testb $0x1, 0x6a(%rax)
je 0x63bf5
movq -0x38(%rbp), %rax
movq 0xd0(%rax), %rdi
movq (%rdi), %rax
movl $0x1, %esi
callq *0x48(%rax)
movq -0x38(%rbp), %rax
testb $0x1, 0x6b(%rax)
je 0x63c15
movq -0x38(%rbp), %rax
movq 0xd0(%rax), %rdi
movq (%rdi), %rax
movl $0x2, %esi
callq *0x48(%rax)
jmp 0x63c17
jmp 0x63c19
movq -0x38(%rbp), %rcx
xorl %eax, %eax
testb $0x1, 0x69(%rcx)
movb %al, -0x39(%rbp)
je 0x63c7e
movq -0x38(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x63d40
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x3a(%rbp)
jne 0x63c46
jmp 0x63c78
movq -0x38(%rbp), %rcx
movb $0x1, %al
cmpq $0x0, 0x88(%rcx)
movb %al, -0x3a(%rbp)
je 0x63c78
movq -0x38(%rbp), %rcx
xorl %eax, %eax
testb $0x1, 0x6a(%rcx)
movb %al, -0x3b(%rbp)
je 0x63c72
movq -0x38(%rbp), %rax
movb 0x6b(%rax), %al
movb %al, -0x3b(%rbp)
movb -0x3b(%rbp), %al
movb %al, -0x3a(%rbp)
movb -0x3a(%rbp), %al
movb %al, -0x39(%rbp)
movq -0x38(%rbp), %rax
movb -0x39(%rbp), %cl
andb $0x1, %cl
movb %cl, 0x8(%rax)
movq -0x38(%rbp), %rax
testb $0x1, 0x8(%rax)
jne 0x63d2d
movq -0x38(%rbp), %rax
cmpq $0x0, 0x88(%rax)
je 0x63d2d
movq -0x20(%rbp), %rax
testb $0x1, 0x15(%rax)
je 0x63cc1
movq -0x38(%rbp), %rax
movb 0x6a(%rax), %al
movb %al, -0x3c(%rbp)
jmp 0x63ccb
movq -0x38(%rbp), %rax
movb 0x6b(%rax), %al
movb %al, -0x3c(%rbp)
movb -0x3c(%rbp), %al
andb $0x1, %al
movb %al, -0x22(%rbp)
testb $0x1, -0x22(%rbp)
jne 0x63cf8
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x2c(%rbp)
movl -0x14(%rbp), %ecx
movq -0x2c(%rbp), %rdx
callq 0x64980
movq -0x38(%rbp), %rcx
xorl %eax, %eax
testb $0x1, 0x6a(%rcx)
movb %al, -0x3d(%rbp)
je 0x63d20
movq -0x38(%rbp), %rcx
xorl %eax, %eax
testb $0x1, 0x6b(%rcx)
movb %al, -0x3d(%rbp)
je 0x63d20
movq -0x38(%rbp), %rax
movb 0x69(%rax), %al
movb %al, -0x3d(%rbp)
movq -0x38(%rbp), %rax
movb -0x3d(%rbp), %cl
andb $0x1, %cl
movb %cl, 0x8(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)