// File: BenLangmead[P]bowtie/./ebwt.h
// Function: Ebwt::reportChaseOne(SDnaStringExpandable<25, 2> const&, SStringExpandable<char, 25, 2, 0>*, SStringExpandable<char, 25, 2, 0>*, EList<unsigned int, 128> const&, EList<unsigned char, 128> const&, unsigned long, unsigned int, unsigned int, unsigned int, unsigned int, int, unsigned short, unsigned int, unsigned int, EbwtSearchParams const&, SideLocus*) const
inline bool Ebwt::reportChaseOne(const BTDnaString& query,
                                       BTString* quals,
                                       BTString* name,
                                       const EList<TIndexOffU>& mmui32,
                                       const EList<uint8_t>& refcs,
                                       size_t numMms,
                                       TIndexOffU i,
                                       TIndexOffU top,
                                       TIndexOffU bot,
                                       uint32_t qlen,
                                       int stratum,
                                       uint16_t cost,
                                       uint32_t patid,
                                       uint32_t seed,
                                       const EbwtSearchParams& params,
                                       SideLocus *l) const
{
	VMSG_NL("In reportChaseOne");
	TIndexOffU off;
	uint32_t jumps = 0;
	ASSERT_ONLY(uint32_t origi = i);
	SideLocus myl;
	const TIndexOffU offMask = this->_eh._offMask;
	const uint32_t offRate = this->_eh._offRate;
	const TIndexOffU* offs = this->_offs;
	// If the caller didn't give us a pre-calculated (and prefetched)
	// locus, then we have to do that now
	if(l == NULL) {
		l = &myl;
		l->initFromRow(i, this->_eh, this->_ebwt);
	}
	assert(l != NULL);
	assert(l->valid());
	// Walk along until we reach the next marked row to the left
	while(((i & offMask) != i) && i != _zOff) {
		// Not a marked row; walk left one more char
		TIndexOffU newi = mapLF(*l); // calc next row
		assert_neq(newi, i);
		i = newi;                                  // update row
		l->initFromRow(i, this->_eh, this->_ebwt); // update locus
		jumps++;
	}
	// This is a marked row
	if(i == _zOff) {
		// Special case: it's the row corresponding to the
		// lexicographically smallest suffix, which is implicitly
		// marked 0
		off = jumps;
		VMSG_NL("reportChaseOne found zoff off=" << off << " (jumps=" << jumps << ")");
	} else {
		// Normal marked row, calculate offset of row i
		off = offs[i >> offRate] + jumps;
		VMSG_NL("reportChaseOne found off=" << off << " (jumps=" << jumps << ")");
	}
#ifndef NDEBUG
	{
		uint32_t rcoff = RowChaser::toFlatRefOff(this, qlen, origi);
		assert_eq(rcoff, off);
	}
#endif
	return report(query, quals, name, mmui32, refcs, numMms, off, top, bot,
	              qlen, stratum, cost, patid, seed, params);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x638, %rsp            # imm = 0x638
movq 0x60(%rbp), %rax
movq 0x58(%rbp), %rax
movl 0x50(%rbp), %eax
movl 0x48(%rbp), %eax
movw 0x40(%rbp), %ax
movl 0x38(%rbp), %eax
movl 0x30(%rbp), %eax
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq %r8, -0x50(%rbp)
movq %r9, -0x58(%rbp)
movq -0x30(%rbp), %rdi
movq %rdi, -0x598(%rbp)
callq 0x24d10
testb $0x1, %al
jne 0x69fba
jmp 0x6a07e
leaq -0x1e0(%rbp), %rdi
callq 0xa3f0
leaq -0x1d0(%rbp), %rdi
leaq 0x233e0(%rip), %rsi     # 0x8d3b4
callq 0xa5d0
movq %rax, -0x5a0(%rbp)
jmp 0x69fe2
movq -0x5a0(%rbp), %rdi
movq 0x3df78(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x69ff7
leaq -0x210(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0xa5c0
jmp 0x6a00c
movq -0x598(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x24d30
jmp 0x6a021
leaq -0x210(%rbp), %rdi
callq 0xacd8
leaq -0x1e0(%rbp), %rdi
callq 0xa440
jmp 0x6a07e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
jmp 0x6a06d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
leaq -0x210(%rbp), %rdi
callq 0xacd8
leaq -0x1e0(%rbp), %rdi
callq 0xa440
jmp 0x6a50d
movl $0x0, -0x218(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x4b6d0
movq -0x598(%rbp), %rax
movl 0x118(%rax), %ecx
movl %ecx, -0x22c(%rbp)
movl 0x114(%rax), %ecx
movl %ecx, -0x230(%rbp)
movq 0xa8(%rax), %rax
movq %rax, -0x238(%rbp)
cmpq $0x0, 0x60(%rbp)
jne 0x6a0f7
movq -0x598(%rbp), %rax
leaq -0x228(%rbp), %rcx
movq %rcx, 0x60(%rbp)
movq 0x60(%rbp), %rdi
movl 0x18(%rbp), %esi
movq %rax, %rdx
addq $0xf8, %rdx
movq 0xb8(%rax), %rcx
callq 0x24f80
jmp 0x6a0f9
movl 0x18(%rbp), %ecx
andl -0x22c(%rbp), %ecx
xorl %eax, %eax
cmpl 0x18(%rbp), %ecx
movb %al, -0x5a1(%rbp)
je 0x6a125
movq -0x598(%rbp), %rcx
movl 0x18(%rbp), %eax
cmpl 0x68(%rcx), %eax
setne %al
movb %al, -0x5a1(%rbp)
movb -0x5a1(%rbp), %al
testb $0x1, %al
jne 0x6a131
jmp 0x6a18a
movq -0x598(%rbp), %rdi
movq 0x60(%rbp), %rsi
callq 0x24e80
movl %eax, %ecx
movq -0x598(%rbp), %rax
movl %ecx, -0x23c(%rbp)
movl -0x23c(%rbp), %ecx
movl %ecx, 0x18(%rbp)
movq 0x60(%rbp), %rdi
movl 0x18(%rbp), %esi
movq %rax, %rdx
addq $0xf8, %rdx
movq 0xb8(%rax), %rcx
callq 0x24f80
movl -0x218(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x218(%rbp)
jmp 0x6a0f9
movq -0x598(%rbp), %rcx
movl 0x18(%rbp), %eax
cmpl 0x68(%rcx), %eax
jne 0x6a2f5
movq -0x598(%rbp), %rdi
movl -0x218(%rbp), %eax
movl %eax, -0x214(%rbp)
callq 0x24d10
testb $0x1, %al
jne 0x6a1be
jmp 0x6a2f0
leaq -0x3c8(%rbp), %rdi
callq 0xa3f0
leaq -0x3b8(%rbp), %rdi
leaq 0x231ee(%rip), %rsi     # 0x8d3c6
callq 0xa5d0
movq %rax, -0x5b0(%rbp)
jmp 0x6a1e6
movq -0x5b0(%rbp), %rdi
movl -0x214(%rbp), %esi
callq 0xa810
movq %rax, -0x5b8(%rbp)
jmp 0x6a201
movq -0x5b8(%rbp), %rdi
leaq 0x231d6(%rip), %rsi     # 0x8d3e5
callq 0xa5d0
movq %rax, -0x5c0(%rbp)
jmp 0x6a21d
movq -0x5c0(%rbp), %rdi
movl -0x218(%rbp), %esi
callq 0xa810
movq %rax, -0x5c8(%rbp)
jmp 0x6a238
movq -0x5c8(%rbp), %rdi
leaq 0x23314(%rip), %rsi     # 0x8d55a
callq 0xa5d0
movq %rax, -0x5d0(%rbp)
jmp 0x6a254
movq -0x5d0(%rbp), %rdi
movq 0x3dd06(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x6a269
leaq -0x3e8(%rbp), %rdi
leaq -0x3c8(%rbp), %rsi
callq 0xa5c0
jmp 0x6a27e
movq -0x598(%rbp), %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x24d30
jmp 0x6a293
leaq -0x3e8(%rbp), %rdi
callq 0xacd8
leaq -0x3c8(%rbp), %rdi
callq 0xa440
jmp 0x6a2f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
jmp 0x6a2df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
leaq -0x3e8(%rbp), %rdi
callq 0xacd8
leaq -0x3c8(%rbp), %rdi
callq 0xa440
jmp 0x6a50d
jmp 0x6a463
movq -0x598(%rbp), %rdi
movq -0x238(%rbp), %rax
movl 0x18(%rbp), %edx
movl -0x230(%rbp), %ecx
shrl %cl, %edx
movl %edx, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
addl -0x218(%rbp), %eax
movl %eax, -0x214(%rbp)
callq 0x24d10
testb $0x1, %al
jne 0x6a32f
jmp 0x6a461
leaq -0x570(%rbp), %rdi
callq 0xa3f0
leaq -0x560(%rbp), %rdi
leaq 0x230a5(%rip), %rsi     # 0x8d3ee
callq 0xa5d0
movq %rax, -0x5d8(%rbp)
jmp 0x6a357
movq -0x5d8(%rbp), %rdi
movl -0x214(%rbp), %esi
callq 0xa810
movq %rax, -0x5e0(%rbp)
jmp 0x6a372
movq -0x5e0(%rbp), %rdi
leaq 0x23065(%rip), %rsi     # 0x8d3e5
callq 0xa5d0
movq %rax, -0x5e8(%rbp)
jmp 0x6a38e
movq -0x5e8(%rbp), %rdi
movl -0x218(%rbp), %esi
callq 0xa810
movq %rax, -0x5f0(%rbp)
jmp 0x6a3a9
movq -0x5f0(%rbp), %rdi
leaq 0x231a3(%rip), %rsi     # 0x8d55a
callq 0xa5d0
movq %rax, -0x5f8(%rbp)
jmp 0x6a3c5
movq -0x5f8(%rbp), %rdi
movq 0x3db95(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x6a3da
leaq -0x590(%rbp), %rdi
leaq -0x570(%rbp), %rsi
callq 0xa5c0
jmp 0x6a3ef
movq -0x598(%rbp), %rdi
leaq -0x590(%rbp), %rsi
callq 0x24d30
jmp 0x6a404
leaq -0x590(%rbp), %rdi
callq 0xacd8
leaq -0x570(%rbp), %rdi
callq 0xa440
jmp 0x6a461
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
jmp 0x6a450
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e8(%rbp)
movl %eax, -0x1ec(%rbp)
leaq -0x590(%rbp), %rdi
callq 0xacd8
leaq -0x570(%rbp), %rdi
callq 0xa440
jmp 0x6a50d
jmp 0x6a463
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x48(%rbp), %rcx
movq -0x50(%rbp), %r8
movq -0x58(%rbp), %r9
movq 0x10(%rbp), %rax
movl -0x214(%rbp), %edi
movl %edi, -0x604(%rbp)
movl 0x20(%rbp), %r13d
movl 0x28(%rbp), %r12d
movl 0x30(%rbp), %r15d
movl 0x38(%rbp), %r14d
movw 0x40(%rbp), %bx
movl 0x48(%rbp), %r11d
movl 0x50(%rbp), %r10d
movq 0x58(%rbp), %rdi
movq %rdi, -0x600(%rbp)
movq -0x598(%rbp), %rdi
movq %rax, (%rsp)
movl -0x604(%rbp), %eax
movl %eax, 0x8(%rsp)
movq -0x600(%rbp), %rax
movl %r13d, 0x10(%rsp)
movl %r12d, 0x18(%rsp)
movl %r15d, 0x20(%rsp)
movl %r14d, 0x28(%rsp)
movzwl %bx, %ebx
movl %ebx, 0x30(%rsp)
movl %r11d, 0x38(%rsp)
movl %r10d, 0x40(%rsp)
movq %rax, 0x48(%rsp)
callq 0x6a520
andb $0x1, %al
addq $0x638, %rsp            # imm = 0x638
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x1e8(%rbp), %rdi
callq 0xab60
nopl (%rax)