// File: /workspace/github_cpp_makefile_star2_O1/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 0x30fb1
movq 0x78(%rbx), %rdi
movl 0x28(%rdi), %eax
cmpl $-0x1, %eax
je 0x30ea3
movq 0x80(%rbx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x70(%rbx), %rcx
movq 0x78(%rbx), %rdx
movq 0x28(%rdx), %rsi
movq %rsi, 0x18(%rsp)
movl 0x30(%rdx), %edx
movq %rdx, 0x10(%rsp)
movq 0x58(%rax), %rdx
movb 0x10(%rdx), %bpl
movb 0x14(%rax), %dl
movb %dl, 0x14(%rcx)
movq 0x18(%rbx), %rdx
movq 0x70(%rbx), %rdi
movb 0x14(%rax), %cl
cmpb $0x1, %cl
jne 0x30ece
leaq 0x90(%rdx), %rsi
testb %bpl, %bpl
cmovneq %rdx, %rsi
jmp 0x30eef
cmpb $0x0, (%rdi)
je 0x30ed9
cmpl $-0x1, %eax
jne 0x30e4f
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)
jmp 0x30fb1
testb %bpl, %bpl
je 0x30ee5
addq $0x30, %rdx
jmp 0x30eec
callq 0x31530
xorl %eax, %eax
jmp 0x312e6
addq $0xc0, %rdx
movq %rdx, %rsi
movq 0x18(%rbx), %r10
xorb %bpl, %cl
leaq 0x60(%r10), %rdx
leaq 0xf0(%r10), %r9
testb %cl, %cl
cmovneq %r9, %rdx
movq 0x10(%rbx), %r8
leaq 0x150(%r10), %rcx
leaq 0x18(%rax), %r9
movq %rax, %r14
addq $0x38, %r14
movl 0x10(%rax), %r11d
movq %r11, 0x8(%rsp)
movl (%rax), %r13d
movl 0x4(%rax), %r15d
movq %r15, %r12
shlq $0x20, %r12
orq %r13, %r12
movl 0x20(%rbx), %r11d
movq %r11, (%rsp)
movl 0xc(%rax), %r11d
movq %r11, 0x20(%rsp)
movzwl 0x8(%rax), %r11d
notl %r13d
addl %r15d, %r13d
movl 0x50(%r8), %r15d
addl 0x58(%r8), %r15d
movl 0x18c(%r10), %eax
subq $0x8, %rsp
xorl %r10d, %r10d
movzbl %bpl, %r8d
pushq %r10
pushq %rax
pushq %r15
pushq %r13
pushq %r11
pushq 0x50(%rsp)
pushq 0x38(%rsp)
pushq 0x50(%rsp)
pushq %r12
pushq %r10
pushq $0x1
pushq $0x0
pushq 0x80(%rsp)
pushq 0x78(%rsp)
pushq %r14
callq 0x31b00
addq $0x80, %rsp
movb %al, 0x8(%rbx)
movq 0x78(%rbx), %rax
movl $0xffffffff, 0x28(%rax) # imm = 0xFFFFFFFF
cmpb $0x0, 0x8(%rbx)
jne 0x312c5
cmpb $0x0, 0x5a(%rbx)
jne 0x312c5
movq 0x80(%rbx), %rdi
cmpb $0x1, 0x8(%rdi)
jne 0x31028
movq (%rdi), %rax
callq *0x30(%rax)
movq %rax, %r14
cmpb $0x1, 0x34(%rbx)
jne 0x3105b
movl (%r14), %r15d
movl 0x4(%r14), %r10d
movq 0x58(%r14), %rcx
movb 0x10(%rcx), %dil
movq 0x70(%rbx), %rcx
movb 0x14(%r14), %dl
movb %dl, 0x14(%rcx)
movq 0x18(%rbx), %rdx
movq 0x70(%rbx), %rax
movq %rax, 0x8(%rsp)
movb 0x14(%r14), %cl
cmpb $0x1, %cl
jne 0x310cc
leaq 0x90(%rdx), %rsi
testb %dil, %dil
cmovneq %rdx, %rsi
jmp 0x310f3
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 0x312a8
movq 0x80(%rbx), %rdi
movq (%rdi), %rax
movl $0x2, %esi
callq *0x20(%rax)
jmp 0x312a8
movq 0x78(%rbx), %rdi
movl (%r14), %esi
movl 0x4(%r14), %edx
movl 0x20(%rbx), %ecx
leaq 0x38(%rbx), %r8
movq 0x58(%r14), %r9
callq 0x315c2
movq 0x78(%rbx), %rax
cmpl $-0x1, 0x28(%rax)
je 0x31281
movq 0x28(%rax), %rcx
movq %rcx, 0x18(%rsp)
movl 0x30(%rax), %eax
movq %rax, 0x10(%rsp)
movq 0x58(%r14), %rax
movb 0x10(%rax), %bpl
movq 0x70(%rbx), %rax
movb 0x14(%r14), %cl
movb %cl, 0x14(%rax)
movq 0x18(%rbx), %rax
movq 0x70(%rbx), %rdi
movb 0x14(%r14), %cl
cmpb $0x1, %cl
jne 0x310d7
leaq 0x90(%rax), %rsi
testb %bpl, %bpl
cmovneq %rax, %rsi
jmp 0x311c1
testb %dil, %dil
je 0x310e9
addq $0x30, %rdx
jmp 0x310f0
testb %bpl, %bpl
je 0x311b8
addq $0x30, %rax
jmp 0x311be
addq $0xc0, %rdx
movq %rdx, %rsi
movq 0x10(%rbx), %rbp
movq 0x18(%rbx), %r13
xorb %dil, %cl
leaq 0x60(%r13), %rdx
leaq 0xf0(%r13), %r9
testb %cl, %cl
cmovneq %r9, %rdx
leaq 0x150(%r13), %rcx
leaq 0x18(%r14), %r9
movq %r14, %rax
addq $0x38, %rax
movq %rax, 0x18(%rsp)
movl 0x10(%r14), %eax
movq %rax, 0x10(%rsp)
shlq $0x20, %r10
orq %r15, %r10
movl (%r14), %r12d
movl 0x4(%r14), %r8d
movq %r8, %r15
shlq $0x20, %r15
orq %r12, %r15
movl 0x50(%rbp), %r11d
addl 0x58(%rbp), %r11d
movl 0x20(%rbx), %eax
movq %rax, (%rsp)
notl %r12d
addl %r8d, %r12d
movl 0xc(%r14), %ebp
movzwl 0x8(%r14), %r14d
movl 0x18c(%r13), %eax
subq $0x8, %rsp
xorl %r13d, %r13d
movzbl %dil, %r8d
movq 0x10(%rsp), %rdi
pushq %r13
pushq %rax
pushq %r11
pushq %r12
pushq %r14
pushq %rbp
pushq 0x38(%rsp)
pushq %r13
pushq %r15
pushq %r13
pushq $0x1
pushq $0x0
pushq %r10
pushq 0x80(%rsp)
pushq 0x90(%rsp)
callq 0x31b00
addq $0x80, %rsp
movb %al, 0x8(%rbx)
jmp 0x3129d
addq $0xc0, %rax
movq %rax, %rsi
movq 0x18(%rbx), %rax
xorb %bpl, %cl
leaq 0x60(%rax), %rdx
leaq 0xf0(%rax), %r9
testb %cl, %cl
cmovneq %r9, %rdx
movq 0x10(%rbx), %r8
leaq 0x150(%rax), %rcx
leaq 0x18(%r14), %r9
movq %r14, %r11
addq $0x38, %r11
movl 0x10(%r14), %r10d
movq %r10, 0x8(%rsp)
movl (%r14), %r13d
movl 0x4(%r14), %r15d
movq %r15, %r12
shlq $0x20, %r12
orq %r13, %r12
movl 0x20(%rbx), %r10d
movq %r10, (%rsp)
movl 0xc(%r14), %r10d
movq %r10, 0x20(%rsp)
notl %r13d
addl %r15d, %r13d
movl 0x50(%r8), %r15d
addl 0x58(%r8), %r15d
movzwl 0x8(%r14), %r10d
movl 0x18c(%rax), %eax
subq $0x8, %rsp
movzbl %bpl, %r8d
xorl %ebp, %ebp
pushq %rbp
xorl %ebp, %ebp
pushq %rax
pushq %r15
pushq %r13
pushq %r10
pushq 0x50(%rsp)
pushq 0x38(%rsp)
pushq 0x50(%rsp)
pushq %r12
pushq %rbp
pushq $0x1
pushq $0x0
pushq 0x80(%rsp)
pushq 0x78(%rsp)
pushq %r11
callq 0x31b00
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 0x3129d
movq 0x68(%rbx), %rdi
movzwl 0x8(%r14), %esi
movq (%rdi), %rax
callq *0x38(%rax)
testb %al, %al
je 0x312f5
movq 0x80(%rbx), %rax
movb $0x0, 0x8(%rax)
movq 0x80(%rbx), %rax
cmpb $0x1, 0x9(%rax)
jne 0x312c5
cmpb $0x0, 0x8(%rax)
jne 0x312c5
cmpb $0x0, 0x5a(%rbx)
jne 0x312c5
movb $0x1, 0x8(%rbx)
cmpb $0x1, 0x8(%rbx)
jne 0x312e3
movq 0x10(%rbx), %rsi
movq 0x68(%rbx), %rdi
movq (%rdi), %rax
movl $0x1, %edx
movl $0x1, %ecx
callq *0x10(%rax)
movb 0x8(%rbx), %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x5a(%rbx)
jmp 0x312a8
nop