// File: /workspace/github_cpp_makefile_star2_O3/BenLangmead[P]bowtie/./ebwt_search_backtrack.h
// Function: EbwtRangeSource::setQuery(Read&, Range*)
virtual void setQuery(Read& r, Range *seedRange) {
		const bool ebwtFw = ebwt_->fw();
		if(ebwtFw) {
			qry_  = fw_ ? &r.patFw : &r.patRc;
			qual_ = fw_ ? &r.qual  : &r.qualRev;
		} else {
			qry_  = fw_ ? &r.patFwRev : &r.patRcRev;
			qual_ = fw_ ? &r.qualRev  : &r.qual;
		}
		name_ = &r.name;
		if(seedRange != NULL) seedRange_ = *seedRange;
		else                  seedRange_.invalidate();
		qlen_ = qry_->length();
		skippingThisRead_ = false;
		// Apply edits from the partial alignment to the query pattern
		if(seedRange_.valid()) {
			qryBuf_ = *qry_;
			const size_t srSz = seedRange_.mms.size();
			assert_gt(srSz, 0);
			assert_eq(srSz, seedRange_.refcs.size());
			for(size_t i = 0; i < srSz; i++) {
				assert_lt(seedRange_.mms[i], qlen_);
				char rc = (char)seedRange_.refcs[i];
				assert(rc == 'A' || rc == 'C' || rc == 'G' || rc == 'T');
				ASSERT_ONLY(char oc = (char)qryBuf_[qlen_ - seedRange_.mms[i] - 1]);
				assert_neq(rc, oc);
				qryBuf_[qlen_ - seedRange_.mms[i] - 1] = asc2dna[(int)rc];
				assert_neq(rc, (*qry_)[qlen_ - seedRange_.mms[i] - 1]);
			}
			qry_ = &qryBuf_;
		}
		// Make sure every qual is a valid qual ASCII character (>= 33)
		for(size_t i = 0; i < qual_->length(); i++) {
			assert_geq((*qual_)[i], 33);
		}
		assert_geq(qual_->length(), qlen_);
		this->done = false;
		this->foundRange = false;
		rand_.init(r.seed);
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movb 0x70(%rdi), %cl
xorl %eax, %eax
testb %cl, %cl
movl $0x30, %edx
cmovneq %rax, %rdx
movl $0x90, %esi
movl $0xc0, %eax
cmovneq %rsi, %rax
movq 0x68(%rdi), %rsi
movb 0x10(%rsi), %sil
testb %sil, %sil
cmovneq %rdx, %rax
xorb %sil, %cl
leaq 0x60(%r14), %rdx
leaq 0xf0(%r14), %rsi
testb %cl, %cl
cmovneq %rsi, %rdx
addq %r14, %rax
movq %rax, 0x18(%rdi)
movq %rdx, 0x58(%rdi)
leaq 0x150(%r14), %rcx
movq %rcx, 0x60(%rdi)
testq %r15, %r15
je 0x2a0c2
leaq 0x118(%rbx), %rax
movq 0xe(%r15), %rcx
movq %rcx, 0xe(%rax)
movups (%r15), %xmm0
movups %xmm0, (%rax)
leaq 0x130(%rbx), %rdi
leaq 0x18(%r15), %rsi
callq 0x2b070
leaq 0x150(%rbx), %rdi
leaq 0x38(%r15), %rsi
callq 0x2b124
movq 0x58(%r15), %rax
movq %rax, 0x170(%rbx)
cmpl $-0x1, 0x118(%rbx)
movq 0x18(%rbx), %rax
movq 0x20(%rax), %rcx
movq %rcx, 0x50(%rbx)
movb $0x0, 0x178(%rbx)
je 0x2a0db
leaq 0x20(%rbx), %r15
movq 0x8(%rax), %rsi
movq 0x20(%rax), %rdx
movq 0x20(%rbx), %rax
movq %r15, %rdi
callq *0x10(%rax)
movq 0x148(%rbx), %rax
testq %rax, %rax
je 0x2a0bc
xorl %ecx, %ecx
leaq 0x424c6(%rip), %rdx     # 0x6c550
movq 0x158(%rbx), %rsi
movsbq (%rsi,%rcx), %rsi
movb (%rdx,%rsi), %sil
movq 0x28(%rbx), %rdi
movq 0x138(%rbx), %r8
movl (%r8,%rcx,4), %r8d
addq 0x50(%rbx), %rdi
notq %r8
movb %sil, (%r8,%rdi)
incq %rcx
cmpq %rcx, %rax
jne 0x2a08a
movq %r15, 0x18(%rbx)
jmp 0x2a0db
movl $0xffffffff, 0x118(%rbx) # imm = 0xFFFFFFFF
movq 0x20(%rax), %rax
movq %rax, 0x50(%rbx)
movb $0x0, 0x178(%rbx)
movw $0x0, 0x8(%rbx)
movl 0x18c(%r14), %eax
movl %eax, 0xa8(%rbx)
movb $0x1, 0xb0(%rbx)
movl $0x1e, 0xac(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop