// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./aligner.h
// Function: UnpairedAlignerV2<EbwtRangeSource>::advance()
virtual bool advance() {
		assert(!this->done);
		if(chase_) {
			assert(!rangeMode_);
			assert(driver_->foundRange);
			assert(!sinkPt_->irrelevantCost(driver_->range().cost));
			if(!rchase_->foundOff() && !rchase_->done) {
				rchase_->advance();
				return false;
			}
			if(rchase_->foundOff()) {
				this->done = report(driver_->range(), rchase_->off().first,
				                    rchase_->off().second, rchase_->tlen());
				rchase_->reset();
			} else {
				assert(rchase_->done);
				// Forget this range; keep looking for ranges
				chase_ = false;
				driver_->foundRange = false;
				this->done = driver_->done;
			}
		}
		// Still advancing a
		if(!this->done && !chase_) {
			assert(!driver_->done || driver_->foundRange);
			if(driver_->foundRange) {
				const Range& ra = driver_->range();
				assert(!sinkPt_->irrelevantCost(ra.cost));
				assert(ra.repOk());
				if(rangeMode_) {
					this->done = report(ra, ra.top, ra.bot, 0);
					driver_->foundRange = false;
				} else {
					rchase_->setTopBot(ra.top, ra.bot, alen_, rand_, ra.ebwt);
					if(rchase_->foundOff()) {
						this->done = report(
								ra, rchase_->off().first,
								rchase_->off().second, rchase_->tlen());
						rchase_->reset();
					}
					if(!rchase_->done && !sinkPt_->irrelevantCost(ra.cost)) {
						// Keep chasing this range
						chase_ = true;
					} else {
						driver_->foundRange = false;
					}
				}
			} else {
				this->done = sinkPt_->irrelevantCost(driver_->minCost);
				if(!this->done) {
					driver_->advance(ADV_COST_CHANGES);
				} else {
					// No longer necessarily true with chain input
					//assert(!sinkPt_->spanStrata());
				}
			}
			if(driver_->done && !driver_->foundRange && !chase_) {
				this->done = true;
			}
		}
		if(this->done) {
			sinkPt_->finishRead(*patsrc_, true, true);
		}
		return this->done;
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x1, 0x5a(%rdi)
jne 0x27ede
movq 0x78(%rbx), %rdi
cmpl $-0x1, 0x28(%rdi)
je 0x27eb9
movq 0x80(%rbx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x78(%rbx), %rsi
movq 0x28(%rsi), %rdx
movq %rdx, %rcx
shrq $0x20, %rcx
movl 0x30(%rsi), %r8d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2827a
movb %al, 0x8(%rbx)
movq 0x78(%rbx), %rax
orl $-0x1, 0x28(%rax)
jmp 0x27ede
cmpb $0x0, (%rdi)
je 0x27f59
xorl %eax, %eax
movb %al, 0x5a(%rbx)
movq 0x80(%rbx), %rcx
movb %al, 0x8(%rcx)
movq 0x80(%rbx), %rax
movb 0x9(%rax), %al
movb %al, 0x8(%rbx)
cmpb $0x0, 0x8(%rbx)
jne 0x27ff1
cmpb $0x0, 0x5a(%rbx)
jne 0x27ff1
movq 0x80(%rbx), %rdi
cmpb $0x1, 0x8(%rdi)
jne 0x27f2b
movq (%rdi), %rax
callq *0x30(%rax)
movq %rax, %r14
cmpb $0x1, 0x34(%rbx)
jne 0x27f63
movl (%r14), %edx
movl 0x4(%r14), %ecx
movq %rbx, %rdi
movq %r14, %rsi
xorl %r8d, %r8d
callq 0x2827a
movb %al, 0x8(%rbx)
jmp 0x27fc9
movq 0x68(%rbx), %rax
movzwl 0xa(%rdi), %esi
movq (%rax), %rcx
movq %rax, %rdi
callq *0x38(%rcx)
movb %al, 0x8(%rbx)
testb %al, %al
jne 0x27fd4
movq 0x80(%rbx), %rdi
movq (%rdi), %rax
pushq $0x2
popq %rsi
callq *0x20(%rax)
jmp 0x27fd4
callq 0x281ee
jmp 0x2800f
movq 0x78(%rbx), %rdi
movl (%r14), %esi
movl 0x4(%r14), %edx
movl 0x20(%rbx), %ecx
leaq 0x38(%rbx), %r8
movq 0x58(%r14), %r9
callq 0x28390
movq 0x78(%rbx), %rax
cmpl $-0x1, 0x28(%rax)
je 0x27fb1
movq 0x28(%rax), %rdx
movq %rdx, %rcx
shrq $0x20, %rcx
movl 0x30(%rax), %r8d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2827a
movb %al, 0x8(%rbx)
movq 0x78(%rbx), %rax
orl $-0x1, 0x28(%rax)
movq 0x78(%rbx), %rax
cmpb $0x0, (%rax)
jne 0x27fc9
movq 0x68(%rbx), %rdi
movzwl 0x8(%r14), %esi
movq (%rdi), %rax
callq *0x38(%rax)
testb %al, %al
je 0x2801b
movq 0x80(%rbx), %rax
movb $0x0, 0x8(%rax)
movq 0x80(%rbx), %rax
cmpb $0x1, 0x9(%rax)
jne 0x27ff1
cmpb $0x0, 0x8(%rax)
jne 0x27ff1
cmpb $0x0, 0x5a(%rbx)
jne 0x27ff1
movb $0x1, 0x8(%rbx)
cmpb $0x1, 0x8(%rbx)
jne 0x2800f
movq 0x10(%rbx), %rsi
movq 0x68(%rbx), %rdi
movq (%rdi), %rax
pushq $0x1
popq %rcx
movl %ecx, %edx
callq *0x10(%rax)
movb 0x8(%rbx), %al
jmp 0x28011
xorl %eax, %eax
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movb $0x1, 0x5a(%rbx)
jmp 0x27fd4
nop