// File: BenLangmead[P]bowtie/./aligner.h
// Function: PairedBWAlignerV1<EbwtRangeSource>::setQuery(PatternSourcePerThread*)
virtual void setQuery(PatternSourcePerThread* patsrc) {
		Aligner::setQuery(patsrc); // set fields & random seed
		assert(!patsrc->bufb().empty());
		// Give all of the drivers pointers to the relevant read info
		patsrc_ = patsrc;
		pool_->reset(&patsrc->bufa().name, (uint32_t)patsrc->rdid());
		if(patsrc->bufa().length() < 4 || patsrc->bufb().length() < 4) {
			if(!quiet_) {
				cerr << "Warning: Skipping pair " << patsrc->bufa().name
					 << " because a mate is less than 4 characters long" << endl;
			}
			this->done = true;
			sinkPt_->finishRead(*patsrc_, true, true);
			return;
		}
		driver1Fw_->setQuery(patsrc, NULL);
		driver1Rc_->setQuery(patsrc, NULL);
		driver2Fw_->setQuery(patsrc, NULL);
		driver2Rc_->setQuery(patsrc, NULL);
		qlen1_ = patsrc_->bufa().length();
		qlen2_ = patsrc_->bufb().length();
		if(btCnt_ != NULL) (*btCnt_) = maxBts_;
		// Neither orientation is done
		doneFw_   = false;
		doneFwFirst_ = true;
		this->done   = false;
		// No ranges are being chased yet
		chase1Fw_ = false;
		chase1Rc_ = false;
		chase2Fw_ = false;
		chase2Rc_ = false;
		delayedChase1Fw_ = false;
		delayedChase1Rc_ = false;
		delayedChase2Fw_ = false;
		delayedChase2Rc_ = false;
		// Clear all intermediate ranges
		for(size_t i = 0; i < 32; i++) {
			offs1FwArr_[i].clear();   offs1RcArr_[i].clear();
			offs2FwArr_[i].clear();   offs2RcArr_[i].clear();
			ranges1FwArr_[i].clear(); ranges1RcArr_[i].clear();
			ranges2FwArr_[i].clear(); ranges2RcArr_[i].clear();
		}
		offs1FwSz_ = offs1RcSz_ = offs2FwSz_ = offs2RcSz_ = 0;
		chaseL_        = &chaseL_fw_;
		chaseR_        = &chaseR_fw_;
		delayedchaseL_ = &delayedchaseL_fw_;
		delayedchaseR_ = &delayedchaseR_fw_;
		drL_           = &drL_fw_;
		drR_           = &drR_fw_;
		offsLarr_      = offsLarr_fw_;
		offsRarr_      = offsRarr_fw_;
		rangesLarr_    = rangesLarr_fw_;
		rangesRarr_    = rangesRarr_fw_;
		offsLsz_       = &offsLsz_fw_;
		offsRsz_       = &offsRsz_fw_;
		donePair_      = &doneFw_;
		fwL_           = fw1_;
		fwR_           = fw2_;
		mixedAttempts_ = 0;
		pairs_fw_.clear();
		pairs_rc_.clear();
#ifndef NDEBUG
		allTopsL_fw_.clear();
		allTopsR_fw_.clear();
		allTopsL_rc_.clear();
		allTopsR_rc_.clear();
#endif
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x10(%rbp), %rsi
callq 0x4be20
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x58(%rax)
movq 0xc8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x37f00
addq $0x150, %rax            # imm = 0x150
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x499a0
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl %eax, %edx
callq 0x4f930
movq -0x10(%rbp), %rdi
callq 0x37f00
movq %rax, %rdi
callq 0x499c0
cmpq $0x4, %rax
jb 0x605b5
movq -0x10(%rbp), %rdi
callq 0x38890
movq %rax, %rdi
callq 0x499c0
cmpq $0x4, %rax
jae 0x60638
movq -0x30(%rbp), %rax
testb $0x1, 0xc1(%rax)
jne 0x60613
movq 0x47a27(%rip), %rdi     # 0xa7ff0
leaq 0x2cac7(%rip), %rsi     # 0x8d097
callq 0xa5d0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x37f00
movq -0x38(%rbp), %rdi
movq %rax, %rsi
addq $0x150, %rsi            # imm = 0x150
callq 0x2c0d0
movq %rax, %rdi
leaq 0x2cab0(%rip), %rsi     # 0x8d0af
callq 0xa5d0
movq %rax, %rdi
movq 0x4795a(%rip), %rsi     # 0xa7f68
callq 0xa640
movq -0x30(%rbp), %rax
movb $0x1, 0x8(%rax)
movq 0x88(%rax), %rdi
movq 0x58(%rax), %rsi
movq (%rdi), %rax
movl $0x1, %ecx
movl %ecx, %edx
callq *0x10(%rax)
jmp 0x60943
movq -0x30(%rbp), %rax
movq 0xd8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %edx
callq *0x10(%rax)
movq -0x30(%rbp), %rax
movq 0xe0(%rax), %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %edx
callq *0x10(%rax)
movq -0x30(%rbp), %rax
movq 0x10f8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %edx
callq *0x10(%rax)
movq -0x30(%rbp), %rax
movq 0x1100(%rax), %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %edx
callq *0x10(%rax)
movq -0x30(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x37f00
movq %rax, %rdi
callq 0x499c0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movl %ecx, 0x60(%rax)
movq 0x58(%rax), %rdi
callq 0x38890
movq %rax, %rdi
callq 0x499c0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movl %ecx, 0x64(%rax)
cmpq $0x0, 0xd0(%rax)
je 0x606f3
movq -0x30(%rbp), %rax
movl 0xc4(%rax), %ecx
movq 0xd0(%rax), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x1, 0x69(%rax)
movb $0x0, 0x8(%rax)
movb $0x0, 0x6a(%rax)
movb $0x0, 0x6b(%rax)
movb $0x0, 0x6c(%rax)
movb $0x0, 0x6d(%rax)
movb $0x0, 0x6e(%rax)
movb $0x0, 0x6f(%rax)
movb $0x0, 0x70(%rax)
movb $0x0, 0x71(%rax)
movq $0x0, -0x18(%rbp)
cmpq $0x20, -0x18(%rbp)
jae 0x6081f
movq -0x30(%rbp), %rdi
addq $0xe8, %rdi
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x63160
movq -0x30(%rbp), %rdi
addq $0x8f0, %rdi            # imm = 0x8F0
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x63160
movq -0x30(%rbp), %rdi
addq $0x1108, %rdi           # imm = 0x1108
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x63160
movq -0x30(%rbp), %rdi
addq $0x1910, %rdi           # imm = 0x1910
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x63160
movq -0x30(%rbp), %rdi
addq $0x4e8, %rdi            # imm = 0x4E8
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x63180
movq -0x30(%rbp), %rdi
addq $0xcf0, %rdi            # imm = 0xCF0
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x63180
movq -0x30(%rbp), %rdi
addq $0x1508, %rdi           # imm = 0x1508
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x63180
movq -0x30(%rbp), %rdi
addq $0x1d10, %rdi           # imm = 0x1D10
movq -0x18(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x63180
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6072b
movq -0x30(%rbp), %rdi
movl $0x0, 0x2110(%rdi)
movl $0x0, 0x1908(%rdi)
movl $0x0, 0x10f0(%rdi)
movl $0x0, 0x8e8(%rdi)
movq 0x2118(%rdi), %rax
movq %rax, 0x21d8(%rdi)
movq 0x2120(%rdi), %rax
movq %rax, 0x21e0(%rdi)
movq 0x2128(%rdi), %rax
movq %rax, 0x21e8(%rdi)
movq 0x2130(%rdi), %rax
movq %rax, 0x21f0(%rdi)
movq 0x2138(%rdi), %rax
movq %rax, 0x21f8(%rdi)
movq 0x2140(%rdi), %rax
movq %rax, 0x2200(%rdi)
movq 0x2148(%rdi), %rax
movq %rax, 0x2208(%rdi)
movq 0x2150(%rdi), %rax
movq %rax, 0x2210(%rdi)
movq 0x2158(%rdi), %rax
movq %rax, 0x2218(%rdi)
movq 0x2160(%rdi), %rax
movq %rax, 0x2220(%rdi)
movq 0x2168(%rdi), %rax
movq %rax, 0x2228(%rdi)
movq 0x2170(%rdi), %rax
movq %rax, 0x2230(%rdi)
movq %rdi, %rax
addq $0x68, %rax
movq %rax, 0x2238(%rdi)
movb 0xb4(%rdi), %al
andb $0x1, %al
movb %al, 0x2240(%rdi)
movb 0xb5(%rdi), %al
andb $0x1, %al
movb %al, 0x2241(%rdi)
movl $0x0, 0xb0(%rdi)
addq $0x2248, %rdi           # imm = 0x2248
callq 0x631a0
movq -0x30(%rbp), %rdi
addq $0x2278, %rdi           # imm = 0x2278
callq 0x631a0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)