// File: /workspace/github_cpp_makefile_star2_O3/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 0x4048b
leaq 0x70(%rsp), %rdi
callq 0x9310
leaq 0x80(%rsp), %rbx
leaq 0x15d53(%rip), %rsi     # 0x5614d
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 0x1afae
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4046d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x29ad4(%rip), %rsi     # 0x69f48
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 0x4056e
movq 0xb8(%rbp), %rdi
movzbl 0x17d(%rbp), %esi
movl %esi, %ecx
xorl $0x1, %ecx
orl $0x6, %ecx
shll $0x5, %ecx
movl %r15d, %eax
xorl %edx, %edx
divl %ecx
movzwl %dx, %ecx
movl 0x15c(%rbp), %r8d
imull %eax, %r8d
leaq 0x30(%rsp), %r14
movl %eax, 0x4(%r14)
movw %cx, 0x8(%r14)
movl %r8d, (%r14)
prefetcht1 (%rdi,%r8)
andb $0x1, %al
movzbl %al, %eax
testl %esi, %esi
movl $0x1, %esi
cmovel %eax, %esi
movb %sil, 0xa(%r14)
shrl $0x2, %ecx
movw %cx, 0xc(%r14)
andb $0x3, %dl
movb %dl, 0xe(%r14)
testb %sil, %sil
jne 0x4056e
movzwl %cx, %eax
notl %eax
addw 0x160(%rbp), %ax
movw %ax, 0x3c(%rsp)
xorb $0x3, %dl
movb %dl, 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 0x4061f
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 0x405da
cmpb $0x0, 0x17d(%rbp)
je 0x405e7
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1d45a
jmp 0x405f2
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1d61a
jmp 0x405f2
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1d276
movl %eax, %r15d
movq 0xb8(%rbp), %rcx
movq %r14, %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x1b036
incl %r13d
movl 0x68(%rbp), %ecx
cmpl %ecx, %r15d
sete %al
testl %ebx, %r15d
je 0x4061f
cmpl %ecx, %r15d
jne 0x4059f
testb %al, %al
je 0x40722
cmpb $0x1, 0xc(%rbp)
jne 0x4082b
leaq 0x70(%rsp), %rdi
callq 0x9310
leaq 0x80(%rsp), %r14
leaq 0x15b15(%rip), %rsi     # 0x5615f
movl $0x1e, %edx
movq %r14, %rdi
callq 0x9560
movl %r13d, %ebx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x92e0
movq %rax, %r14
leaq 0x15b0f(%rip), %rsi     # 0x5617e
movl $0x8, %edx
movq %rax, %rdi
callq 0x9560
movq %r14, %rdi
movq %rbx, %rsi
callq 0x92e0
movq %rax, %rbx
leaq 0x15c62(%rip), %rsi     # 0x562f3
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 0x1afae
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x406ff
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x29842(%rip), %rsi     # 0x69f48
leaq 0x70(%rsp), %rdi
callq 0x9340
leaq 0xf0(%rsp), %rdi
callq 0x9180
jmp 0x4082b
movl 0x2c(%rsp), %ecx
shrl %cl, %r15d
movq 0x40(%rsp), %rax
movl (%rax,%r15,4), %r14d
addl %r13d, %r14d
cmpb $0x1, 0xc(%rbp)
jne 0x40828
leaq 0x70(%rsp), %rdi
callq 0x9310
leaq 0x80(%rsp), %rbx
leaq 0x15a2f(%rip), %rsi     # 0x56187
movl $0x19, %edx
movq %rbx, %rdi
callq 0x9560
movl %r14d, %esi
movq %rbx, %rdi
callq 0x92e0
movq %rax, %rbx
leaq 0x15a04(%rip), %rsi     # 0x5617e
movl $0x8, %edx
movq %rax, %rdi
callq 0x9560
movl %r13d, %esi
movq %rbx, %rdi
callq 0x92e0
movq %rax, %rbx
leaq 0x15b57(%rip), %rsi     # 0x562f3
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 0x1afae
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4080a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x29737(%rip), %rsi     # 0x69f48
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 0x4094a
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 0x408d2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x40924
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x408f2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x40924
jmp 0x4091c
jmp 0x4091c
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40924
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x40924
jmp 0x40921
jmp 0x4091c
movq %rax, %rbx
jmp 0x40924
movq %rax, %rbx
movq 0x2961d(%rip), %rsi     # 0x69f48
leaq 0x70(%rsp), %rdi
callq 0x9340
leaq 0xf0(%rsp), %rdi
callq 0x9180
movq %rbx, %rdi
callq 0x9930