// File: BenLangmead[P]bowtie/./ebwt_search_backtrack.h
// Function: GreedyDFSRangeSource::setQuery(Read&)
void setQuery(Read& r) {
		const bool fw = _params.fw();
		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;
		// Reset _qlen
		if(_qry->length() > _qlen) {
			try {
				_qlen = _qry->length();
				// Resize _pairs
				if(_pairs != NULL) { delete[] _pairs; }
				_pairs = new TIndexOffU[_qlen*_qlen*8];
				// Resize _elims
				if(_elims != NULL) { delete[] _elims; }
				_elims = new uint8_t[_qlen*_qlen];
				memset(_elims, 0, _qlen*_qlen);
				// Resize _chars
				if(_chars != NULL) { delete[] _chars; }
				_chars = new char[_qlen];
				assert(_pairs != NULL && _elims != NULL && _chars != NULL);
			} catch(std::bad_alloc& e) {
				ThreadSafe _ts(&gLock);
				cerr << "Unable to allocate memory for depth-first "
				     << "backtracking search; new length = " << _qry->length()
				     << endl;
				throw 1;
			}
		} else {
			// New length is less than old length, so there's no need
			// to resize any data structures.
			assert(_pairs != NULL && _elims != NULL && _chars != NULL);
			_qlen = _qry->length();
		}
		_mms.clear();
		_refcs.clear();
		assert_geq(_qual->length(), _qlen);
		if(_verbose) {
			cout << "setQuery(_qry=" << (*_qry) << ", _qual=" << (*_qual) << ")" << endl;
		}
		// Initialize the random source using new read as part of the
		// seed.
		_seed = r.seed;
		_patid = r.rdid;
		_rand.init(r.seed);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x28(%rax), %rdi
callq 0x670f0
movb %al, %cl
movq -0x40(%rbp), %rax
andb $0x1, %cl
movb %cl, -0x11(%rbp)
movq 0x20(%rax), %rdi
callq 0x402a0
andb $0x1, %al
movb %al, -0x12(%rbp)
testb $0x1, -0x12(%rbp)
je 0x65ddb
testb $0x1, -0x11(%rbp)
je 0x65d94
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x65da0
movq -0x10(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
testb $0x1, -0x11(%rbp)
je 0x65dbf
movq -0x10(%rbp), %rax
addq $0x60, %rax
movq %rax, -0x50(%rbp)
jmp 0x65dcd
movq -0x10(%rbp), %rax
addq $0xf0, %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x65e38
testb $0x1, -0x11(%rbp)
je 0x65df1
movq -0x10(%rbp), %rax
addq $0x90, %rax
movq %rax, -0x58(%rbp)
jmp 0x65dff
movq -0x10(%rbp), %rax
addq $0xc0, %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, (%rax)
testb $0x1, -0x11(%rbp)
je 0x65e20
movq -0x10(%rbp), %rax
addq $0xf0, %rax
movq %rax, -0x60(%rbp)
jmp 0x65e2c
movq -0x10(%rbp), %rax
addq $0x60, %rax
movq %rax, -0x60(%rbp)
movq -0x40(%rbp), %rax
movq -0x60(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
addq $0x150, %rcx            # imm = 0x150
movq %rcx, 0x18(%rax)
movq (%rax), %rdi
callq 0x2ef90
movq -0x40(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x6609e
movq -0x40(%rbp), %rax
movq (%rax), %rdi
callq 0x2ef90
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, 0x48(%rax)
je 0x65e9c
movq -0x40(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
je 0x65e9a
movq -0x68(%rbp), %rdi
callq 0xa7c0
jmp 0x65e9c
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
imulq %rax, %rax
shlq $0x3, %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0xa040
movq %rax, -0x70(%rbp)
jmp 0x65ecd
movq -0x40(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, 0x48(%rax)
cmpq $0x0, 0x50(%rax)
je 0x65fd2
movq -0x40(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, %rax
je 0x65eff
movq -0x78(%rbp), %rdi
callq 0xa7c0
jmp 0x65fd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x6617f
movq -0x20(%rbp), %rdi
callq 0xa200
movq %rax, -0x30(%rbp)
leaq 0x45424(%rip), %rsi     # 0xab358
leaq -0x38(%rbp), %rdi
callq 0x2f3b0
jmp 0x65f3f
movq 0x420aa(%rip), %rdi     # 0xa7ff0
leaq 0x27361(%rip), %rsi     # 0x8d2ae
callq 0xa5d0
movq %rax, -0x80(%rbp)
jmp 0x65f58
movq -0x80(%rbp), %rdi
leaq 0x27376(%rip), %rsi     # 0x8d2d9
callq 0xa5d0
movq %rax, -0x88(%rbp)
jmp 0x65f71
movq -0x40(%rbp), %rax
movq (%rax), %rdi
callq 0x2ef90
movq -0x88(%rbp), %rdi
movq %rax, %rsi
callq 0xa130
movq %rax, -0x90(%rbp)
jmp 0x65f95
movq -0x90(%rbp), %rdi
movq 0x41fc5(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x65faa
movl $0x4, %edi
callq 0xa290
movq %rax, %rdi
movl $0x1, (%rdi)
movq 0x41f8c(%rip), %rsi     # 0xa7f50
xorl %eax, %eax
movl %eax, %edx
callq 0xab10
jmp 0x66190
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdi
imulq %rdi, %rdi
callq 0xa040
movq %rax, -0x98(%rbp)
jmp 0x65fec
movq -0x40(%rbp), %rax
movq -0x98(%rbp), %rcx
movq %rcx, 0x50(%rax)
movq 0x50(%rax), %rdi
movq 0x8(%rax), %rdx
imulq 0x8(%rax), %rdx
xorl %esi, %esi
callq 0xa2c0
movq -0x40(%rbp), %rax
cmpq $0x0, 0x98(%rax)
je 0x66043
movq -0x40(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0xa0(%rbp)
cmpq $0x0, %rax
je 0x66041
movq -0xa0(%rbp), %rdi
callq 0xa7c0
jmp 0x66043
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xa040
movq %rax, -0xa8(%rbp)
jmp 0x66059
movq -0x40(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, 0x98(%rax)
jmp 0x6609c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x66090
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x2f3e0
callq 0xaa60
jmp 0x66097
jmp 0x6617f
jmp 0x660b5
movq -0x40(%rbp), %rax
movq (%rax), %rdi
callq 0x2ef90
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rdi
addq $0x58, %rdi
callq 0x401d0
movq -0x40(%rbp), %rdi
addq $0x78, %rdi
callq 0x401f0
movq -0x40(%rbp), %rax
testb $0x1, 0x148(%rax)
je 0x6613b
movq 0x41ed5(%rip), %rdi     # 0xa7fb8
leaq 0x27212(%rip), %rsi     # 0x8d2fc
callq 0xa5d0
movq %rax, %rdi
movq -0x40(%rbp), %rax
movq (%rax), %rsi
callq 0x2c0d0
movq %rax, %rdi
leaq 0x27203(%rip), %rsi     # 0x8d30b
callq 0xa5d0
movq %rax, %rdi
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x2c0d0
movq %rax, %rdi
leaq 0x27433(%rip), %rsi     # 0x8d55a
callq 0xa5d0
movq %rax, %rdi
movq 0x41e32(%rip), %rsi     # 0xa7f68
callq 0xa640
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x18c(%rax), %eax
movl %eax, 0x1dc(%rdi)
movq -0x10(%rbp), %rax
movq 0x180(%rax), %rax
movl %eax, 0x1d8(%rdi)
addq $0x134, %rdi            # imm = 0x134
movq -0x10(%rbp), %rax
movl 0x18c(%rax), %esi
callq 0x403d0
addq $0xb0, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0xab60
movq %rax, %rdi
callq 0x24d00