// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, 0x68(%rsp)
movq %rdi, %rbp
cmpb $0x1, 0xc(%rdi)
jne 0x4131b
leaq 0x70(%rsp), %rdi
callq 0x9310
leaq 0x80(%rsp), %rbx
leaq 0x15de3(%rip), %rsi     # 0x5706d
movl $0x11, %edx
movq %rbx, %rdi
callq 0x9560
movq 0x80(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9050
movq %rax, %rdi
callq 0x92f0
leaq 0x88(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x97e0
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x1b248
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x412fd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x29c44(%rip), %rsi     # 0x6af48
leaq 0x70(%rsp), %rdi
callq 0x9340
leaq 0xf0(%rsp), %rdi
callq 0x9180
movq %r15, 0x58(%rsp)
movq %r14, 0x60(%rsp)
movq 0x280(%rsp), %r14
movl 0x238(%rsp), %r15d
movq $0x0, 0x30(%rsp)
movw $0x0, 0x38(%rsp)
movb $0x1, 0x3a(%rsp)
movw $0xffff, 0x3c(%rsp)     # imm = 0xFFFF
movb $-0x1, 0x3e(%rsp)
movl 0x118(%rbp), %ebx
movl 0x114(%rbp), %eax
movl %eax, 0x2c(%rsp)
movq 0xa8(%rbp), %rax
movq %rax, 0x40(%rsp)
testq %r14, %r14
jne 0x413fc
movq 0xb8(%rbp), %rcx
movzbl 0x17d(%rbp), %esi
movl %esi, %edi
xorl $0x1, %edi
orl $0x6, %edi
shll $0x5, %edi
movl %r15d, %eax
xorl %edx, %edx
divl %edi
movl 0x15c(%rbp), %edi
imull %eax, %edi
leaq 0x30(%rsp), %r14
movl %eax, 0x4(%r14)
movw %dx, 0x8(%r14)
movl %edi, (%r14)
prefetcht1 (%rcx,%rdi)
andb $0x1, %al
movzbl %al, %eax
testl %esi, %esi
movl $0x1, %edx
cmovel %eax, %edx
movb %dl, 0xa(%r14)
movzwl 0x8(%r14), %eax
movl %eax, %ecx
shrl $0x2, %ecx
movw %cx, 0xc(%r14)
andb $0x3, %al
movb %al, 0xe(%r14)
testb %dl, %dl
jne 0x413fc
movzwl %cx, %ecx
notl %ecx
addw 0x160(%rbp), %cx
movw %cx, 0x3c(%rsp)
xorb $0x3, %al
movb %al, 0x3e(%rsp)
movq %r13, 0x48(%rsp)
movq %r12, 0x50(%rsp)
notl %ebx
testl %ebx, %r15d
sete %cl
cmpl %r15d, 0x68(%rbp)
sete %al
orb %al, %cl
xorl %r13d, %r13d
testb $0x1, %cl
jne 0x414ad
leaq 0xf8(%rbp), %r12
xorl %r13d, %r13d
movl (%r14), %eax
addq 0xb8(%rbp), %rax
movswq 0xc(%r14), %rcx
movzbl (%rcx,%rax), %edx
movb 0xe(%r14), %cl
addb %cl, %cl
shrl %cl, %edx
andl $0x3, %edx
cmpb $0x1, 0xa(%r14)
jne 0x41468
cmpb $0x0, 0x17d(%rbp)
je 0x41475
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1d6b6
jmp 0x41480
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1d872
jmp 0x41480
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1d4e6
movl %eax, %r15d
movq 0xb8(%rbp), %rcx
movq %r14, %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x1b2d0
incl %r13d
movl 0x68(%rbp), %ecx
cmpl %ecx, %r15d
sete %al
testl %ebx, %r15d
je 0x414ad
cmpl %ecx, %r15d
jne 0x4142d
testb %al, %al
je 0x415b0
cmpb $0x1, 0xc(%rbp)
jne 0x416b9
leaq 0x70(%rsp), %rdi
callq 0x9310
leaq 0x80(%rsp), %r14
leaq 0x15ba7(%rip), %rsi     # 0x5707f
movl $0x1e, %edx
movq %r14, %rdi
callq 0x9560
movl %r13d, %ebx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x92e0
movq %rax, %r14
leaq 0x15ba1(%rip), %rsi     # 0x5709e
movl $0x8, %edx
movq %rax, %rdi
callq 0x9560
movq %r14, %rdi
movq %rbx, %rsi
callq 0x92e0
movq %rax, %rbx
leaq 0x15cf4(%rip), %rsi     # 0x57213
movl $0x1, %edx
movq %rax, %rdi
callq 0x9560
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9050
movq %rax, %rdi
callq 0x92f0
leaq 0x88(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x97e0
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x1b248
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4158d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x299b4(%rip), %rsi     # 0x6af48
leaq 0x70(%rsp), %rdi
callq 0x9340
leaq 0xf0(%rsp), %rdi
callq 0x9180
jmp 0x416b9
movl 0x2c(%rsp), %ecx
shrl %cl, %r15d
movq 0x40(%rsp), %rax
movl (%rax,%r15,4), %r14d
addl %r13d, %r14d
cmpb $0x1, 0xc(%rbp)
jne 0x416b6
leaq 0x70(%rsp), %rdi
callq 0x9310
leaq 0x80(%rsp), %rbx
leaq 0x15ac1(%rip), %rsi     # 0x570a7
movl $0x19, %edx
movq %rbx, %rdi
callq 0x9560
movl %r14d, %esi
movq %rbx, %rdi
callq 0x92e0
movq %rax, %rbx
leaq 0x15a96(%rip), %rsi     # 0x5709e
movl $0x8, %edx
movq %rax, %rdi
callq 0x9560
movl %r13d, %esi
movq %rbx, %rdi
callq 0x92e0
movq %rax, %rbx
leaq 0x15be9(%rip), %rsi     # 0x57213
movl $0x1, %edx
movq %rax, %rdi
callq 0x9560
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9050
movq %rax, %rdi
callq 0x92f0
leaq 0x88(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x97e0
leaq 0x8(%rsp), %rsi
movq %rbp, %rdi
callq 0x1b248
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41698
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x298a9(%rip), %rsi     # 0x6af48
leaq 0x70(%rsp), %rdi
callq 0x9340
leaq 0xf0(%rsp), %rdi
callq 0x9180
movl %r14d, %r13d
movl 0x270(%rsp), %eax
movl 0x268(%rsp), %r10d
movzwl 0x260(%rsp), %ecx
movl 0x258(%rsp), %r11d
movl 0x250(%rsp), %ebx
movl 0x248(%rsp), %r14d
movl 0x240(%rsp), %r15d
movzwl %cx, %r12d
movq %rbp, %rdi
movq 0x68(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0x60(%rsp), %r9
pushq 0x278(%rsp)
pushq %rax
pushq %r10
pushq %r12
pushq %r11
pushq %rbx
pushq %r14
pushq %r15
pushq %r13
pushq 0x278(%rsp)
callq 0x417d8
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41760
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x417b2
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41780
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x417b2
jmp 0x417aa
jmp 0x417aa
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x417b2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x417b2
jmp 0x417af
jmp 0x417aa
movq %rax, %rbx
jmp 0x417b2
movq %rax, %rbx
movq 0x2978f(%rip), %rsi     # 0x6af48
leaq 0x70(%rsp), %rdi
callq 0x9340
leaq 0xf0(%rsp), %rdi
callq 0x9180
movq %rbx, %rdi
callq 0x9930