// File: /workspace/github_cpp_makefile_star2_O1/BenLangmead[P]bowtie/./range_chaser.h
// Function: RangeChaser::setRow(unsigned int)
void setRow(TIndexOffU row) {
		// Must be within bounds of range
		assert_lt(row, bot_);
		assert_geq(row, top_);
		row_ = row;
		while(true) {
			// First thing to try is the cache
			if(cached_) {
				assert(cacheEnt_.valid());
				TIndexOffU cached = cacheEnt_.get(row_ - top_);
				assert(cacheEnt_.valid());
				if(cached != RANGE_NOT_SET) {
					// Assert that it matches what we would have got...
					ASSERT_ONLY(uint32_t sanity = RowChaser::toFlatRefOff(ebwt_, 1, row_));
					assert_eq(sanity, cached);
					// We have a cached result.  Cached result is in the
					// form of an offset into the joined reference string,
					// so now we have to convert it to a tidx/toff pair.
					ebwt_->joinedToTextOff(qlen_, cached, off_.first, off_.second, tlen_);
					// Note: tidx may be 0xffffffff, if alignment overlaps a
					// reference boundary
					if(off_.first != OFF_MASK) {
						// Bingo, we found a valid result using the cache
						assert(foundOff());
						return;
					}
				} else {
					// Wasn't in the cache; use the RowChaser
				}
			}
			// Second thing to try is the chaser
			chaser_.setRow(row_, qlen_, ebwt_);
			assert(chaser_.prepped_ || chaser_.done);
			// It might be done immediately...
			if(chaser_.done) {
				// We're done immediately
				off_ = chaser_.off();
				if(off_.first != OFF_MASK) {
					// This is a valid result
					if(cached_) {
						// Install the result in the cache
						assert(cacheEnt_.valid());
						cacheEnt_.install(row_ - top_, chaser_.flatOff());
						//if(ebwt_->fw()) assert(cacheFw_->repOk());
						//else            assert(cacheBw_->repOk());
					}
					tlen_ = chaser_.tlen();
					assert(foundOff());
					return; // found result
				}
			} else {
				// Pursue this row
				break;
			}
			// That row didn't have a valid result, move to the next
			row_++;
			if(row_ == bot_) {
				// Wrap back to top_
				row_ = top_;
			}
			if(row_ == irow_) {
				// Exhausted all possible rows
				done = true;
				assert_eq(OFF_MASK, off_.first);
				return;
			}
		}
		assert(chaser_.prepped_);
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, 0x24(%rdi)
leaq 0x80(%rdi), %r14
leaq 0x28(%rdi), %r15
leaq 0x2c(%rdi), %r12
leaq 0x30(%rdi), %r13
leaq 0x38(%rdi), %rbp
cmpb $0x1, 0xa8(%rbx)
jne 0x31707
movl 0x24(%rbx), %esi
subl 0x18(%rbx), %esi
movq %r14, %rdi
callq 0x31978
cmpl $-0x1, %eax
je 0x31707
movq 0x8(%rbx), %rdi
movl 0x10(%rbx), %esi
movl %eax, %edx
movq %r15, %rcx
movq %r12, %r8
movq %r13, %r9
callq 0xb6be
cmpl $-0x1, 0x28(%rbx)
jne 0x31770
movl 0x24(%rbx), %esi
movl 0x10(%rbx), %edx
movq 0x8(%rbx), %rcx
movq %rbp, %rdi
callq 0x31a72
cmpb $0x1, 0x38(%rbx)
jne 0x31770
movq %rbp, %rdi
callq 0x31840
movq %rax, 0x28(%rbx)
cmpl $-0x1, %eax
jne 0x31750
movl 0x24(%rbx), %eax
incl %eax
movl %eax, 0x24(%rbx)
cmpl 0x1c(%rbx), %eax
jne 0x31743
movl 0x18(%rbx), %eax
movl %eax, 0x24(%rbx)
movl 0x24(%rbx), %eax
cmpl 0x20(%rbx), %eax
jne 0x316ce
movb $0x1, (%rbx)
jmp 0x31770
cmpb $0x1, 0xa8(%rbx)
jne 0x3176a
movl 0x24(%rbx), %esi
movl 0x70(%rbx), %edx
subl 0x18(%rbx), %esi
movq %r14, %rdi
callq 0x31882
movl 0x74(%rbx), %eax
movl %eax, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop