// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x5a(%rdi)
jne 0x30b4e
movq 0x78(%rbx), %rdi
cmpl $-0x1, 0x28(%rdi)
je 0x30b29
movq 0x80(%rbx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x70(%rbx), %rcx
movq 0x78(%rbx), %rdx
movq 0x28(%rdx), %rsi
movq %rsi, 0x10(%rsp)
movl 0x30(%rdx), %edx
movq %rdx, 0x8(%rsp)
movq 0x58(%rax), %rdx
movzbl 0x10(%rdx), %r11d
movb 0x14(%rax), %r9b
xorl %esi, %esi
testl %r11d, %r11d
movl $0x90, %edx
cmovneq %rsi, %rdx
movl $0x30, %edi
movl $0xc0, %esi
cmovneq %rdi, %rsi
movb %r9b, 0x14(%rcx)
testb %r9b, %r9b
cmovneq %rdx, %rsi
movq 0x18(%rbx), %rdi
xorb %r11b, %r9b
addq %rdi, %rsi
leaq 0x60(%rdi), %rdx
leaq 0xf0(%rdi), %rcx
testb %r9b, %r9b
cmovneq %rcx, %rdx
movq 0x10(%rbx), %r8
leaq 0x18(%rax), %r9
leaq 0x38(%rax), %rcx
movq %rcx, (%rsp)
movl 0x10(%rax), %ecx
movq %rcx, 0x18(%rsp)
movl (%rax), %ebp
movl 0x4(%rax), %ecx
movq %rcx, %r13
shlq $0x20, %r13
orq %rbp, %r13
notl %ebp
addl %ecx, %ebp
movl 0x50(%r8), %r10d
addl 0x58(%r8), %r10d
movl 0xc(%rax), %r12d
movzwl 0x8(%rax), %eax
leaq 0x150(%rdi), %rcx
movl 0x18c(%rdi), %r14d
movq 0x70(%rbx), %rdi
movl 0x20(%rbx), %r15d
subq $0x8, %rsp
movl %r11d, %r8d
xorl %r11d, %r11d
pushq %r11
pushq %r14
pushq %r10
pushq %rbp
pushq %rax
pushq %r12
pushq %r15
pushq 0x48(%rsp)
pushq %r13
pushq %r11
pushq $0x1
pushq $0x0
pushq 0x78(%rsp)
pushq 0x88(%rsp)
pushq 0x78(%rsp)
callq 0x3166a
addq $0x80, %rsp
movb %al, 0x8(%rbx)
movq 0x78(%rbx), %rax
movl $0xffffffff, 0x28(%rax) # imm = 0xFFFFFFFF
jmp 0x30b4e
cmpb $0x0, (%rdi)
je 0x30cac
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 0x30e2e
cmpb $0x0, 0x5a(%rbx)
jne 0x30e2e
movq 0x80(%rbx), %rdi
cmpb $0x1, 0x8(%rdi)
jne 0x30c79
movq (%rdi), %rax
callq *0x30(%rax)
movq %rax, %r14
cmpb $0x1, 0x34(%rbx)
jne 0x30cb6
movq (%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x58(%r14), %rcx
movzbl 0x10(%rcx), %r8d
movq 0x70(%rbx), %rcx
movb 0x14(%r14), %r9b
movb %r9b, 0x14(%rcx)
xorl %eax, %eax
testl %r8d, %r8d
movl $0x90, %ecx
cmovneq %rax, %rcx
movl $0x30, %edx
movl $0xc0, %esi
cmovneq %rdx, %rsi
movq 0x10(%rbx), %rdi
testb %r9b, %r9b
cmovneq %rcx, %rsi
movq 0x18(%rbx), %rbp
xorb %r8b, %r9b
addq %rbp, %rsi
leaq 0x60(%rbp), %rdx
leaq 0xf0(%rbp), %rcx
testb %r9b, %r9b
cmovneq %rcx, %rdx
leaq 0x150(%rbp), %rcx
leaq 0x18(%r14), %r9
movq %r14, %r11
addq $0x38, %r11
movl 0x10(%r14), %eax
movq %rax, 0x8(%rsp)
movl (%r14), %r13d
movl 0x4(%r14), %eax
movq %rax, %r12
shlq $0x20, %r12
orq %r13, %r12
notl %r13d
addl %eax, %r13d
movl 0x50(%rdi), %eax
addl 0x58(%rdi), %eax
movl 0xc(%r14), %edi
movq %rdi, (%rsp)
movzwl 0x8(%r14), %r14d
movl 0x18c(%rbp), %ebp
movq 0x70(%rbx), %rdi
movl 0x20(%rbx), %r10d
subq $0x8, %rsp
xorl %r15d, %r15d
pushq %r15
pushq %rbp
pushq %rax
pushq %r13
pushq %r14
pushq 0x30(%rsp)
pushq %r10
movl $0x0, %eax
pushq %rax
pushq %r12
pushq %rax
pushq $0x1
pushq $0x0
pushq 0x78(%rsp)
pushq 0x78(%rsp)
pushq %r11
callq 0x3166a
addq $0x80, %rsp
movb %al, 0x8(%rbx)
jmp 0x30e06
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 0x30e11
movq 0x80(%rbx), %rdi
movq (%rdi), %rax
movl $0x2, %esi
callq *0x20(%rax)
jmp 0x30e11
callq 0x3109c
jmp 0x30e51
movq 0x78(%rbx), %rdi
movl (%r14), %esi
movl 0x4(%r14), %edx
movl 0x20(%rbx), %ecx
leaq 0x38(%rbx), %r8
movq 0x58(%r14), %r9
callq 0x3112c
movq 0x78(%rbx), %rax
cmpl $-0x1, 0x28(%rax)
je 0x30dee
movq 0x28(%rax), %rcx
movq %rcx, 0x10(%rsp)
movl 0x30(%rax), %eax
movq %rax, 0x8(%rsp)
movq 0x58(%r14), %rax
movzbl 0x10(%rax), %r8d
movq 0x70(%rbx), %rax
movb 0x14(%r14), %cl
movb %cl, 0x14(%rax)
xorl %edx, %edx
testl %r8d, %r8d
movl $0x90, %eax
cmovneq %rdx, %rax
movl $0x30, %edx
movl $0xc0, %esi
cmovneq %rdx, %rsi
movq 0x70(%rbx), %rdi
testb %cl, %cl
cmovneq %rax, %rsi
movq 0x18(%rbx), %rax
xorb %r8b, %cl
addq %rax, %rsi
leaq 0x60(%rax), %rdx
leaq 0xf0(%rax), %r9
testb %cl, %cl
cmovneq %r9, %rdx
movq 0x10(%rbx), %r13
leaq 0x150(%rax), %r11
leaq 0x18(%r14), %r9
movq %r14, %r15
addq $0x38, %r15
movl (%r14), %ebp
movl 0x4(%r14), %ecx
movq %rcx, %r12
shlq $0x20, %r12
orq %rbp, %r12
notl %ebp
addl %ecx, %ebp
movl 0x50(%r13), %r10d
addl 0x58(%r13), %r10d
movl 0x10(%r14), %ecx
movq %rcx, (%rsp)
movl 0x18c(%rax), %eax
movl 0x20(%rbx), %ecx
movq %rcx, 0x18(%rsp)
movl 0xc(%r14), %ecx
movq %rcx, 0x20(%rsp)
movzwl 0x8(%r14), %r13d
subq $0x8, %rsp
movq %r11, %rcx
xorl %r11d, %r11d
pushq %r11
pushq %rax
pushq %r10
pushq %rbp
pushq %r13
pushq 0x50(%rsp)
pushq 0x50(%rsp)
pushq 0x48(%rsp)
pushq %r12
movl $0x0, %eax
pushq %rax
pushq $0x1
pushq $0x0
pushq 0x78(%rsp)
pushq 0x70(%rsp)
pushq %r15
callq 0x3166a
addq $0x80, %rsp
movb %al, 0x8(%rbx)
movq 0x78(%rbx), %rax
movl $0xffffffff, 0x28(%rax) # imm = 0xFFFFFFFF
movq 0x78(%rbx), %rax
cmpb $0x0, (%rax)
jne 0x30e06
movq 0x68(%rbx), %rdi
movzwl 0x8(%r14), %esi
movq (%rdi), %rax
callq *0x38(%rax)
testb %al, %al
je 0x30e64
movq 0x80(%rbx), %rax
movb $0x0, 0x8(%rax)
movq 0x80(%rbx), %rax
cmpb $0x1, 0x9(%rax)
jne 0x30e2e
cmpb $0x0, 0x8(%rax)
jne 0x30e2e
cmpb $0x0, 0x5a(%rbx)
jne 0x30e2e
movb $0x1, 0x8(%rbx)
cmpb $0x1, 0x8(%rbx)
jne 0x30e51
movq 0x10(%rbx), %rsi
movq 0x68(%rbx), %rdi
movq (%rdi), %rax
movl $0x1, %edx
movl $0x1, %ecx
callq *0x10(%rax)
movb 0x8(%rbx), %al
jmp 0x30e53
xorl %eax, %eax
andb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x5a(%rbx)
jmp 0x30e11