// File: /workspace/github_cpp_makefile_star2_O1/BenLangmead[P]bowtie/./ebwt.h
// Function: EbwtSearchParams::reportHit(SDnaStringExpandable<25, 2> const&, SStringExpandable<char, 25, 2, 0>*, SStringExpandable<char, 25, 2, 0>*, bool, EList<unsigned int, 128> const&, EList<unsigned char, 128> const&, unsigned long, std::pair<unsigned int, unsigned int>, std::pair<unsigned int, unsigned int>, bool, unsigned short, std::pair<unsigned int, unsigned int>, unsigned int, unsigned int, int, unsigned short, unsigned int, unsigned int, unsigned int, unsigned char) const
bool reportHit(const BTDnaString& query, // read sequence
	               BTString* quals, // read quality values
	               BTString* name,  // read name
	               bool ebwtFw,         // whether index is forward (true) or mirror (false)
	               const EList<TIndexOffU>& mmui32, // mismatch list
	               const EList<uint8_t>& refcs,  // reference characters
	               size_t numMms,      // # mismatches
	               UPair h,          // ref coords
	               UPair mh,         // mate's ref coords
	               bool mfw,           // mate's orientation
	               uint16_t mlen,      // mate length
	               UPair a,          // arrow pair
	               uint32_t tlen,      // length of text
	               uint32_t qlen,      // length of query
	               int stratum,        // alignment stratum
	               uint16_t cost,      // cost of alignment
	               uint32_t oms,       // approx. # other valid alignments
	               uint32_t patid,
	               uint32_t seed,
	               uint8_t mate) const
	{
#ifndef NDEBUG
		// Check that no two elements of the mms array are the same
		for(size_t i = 0; i < numMms; i++) {
			for(size_t j = i+1; j < numMms; j++) {
				assert_neq(mmui32[i], mmui32[j]);
			}
		}
#endif
		// If ebwtFw is true, then 'query' and 'quals' are reversed
		// If _fw is false, then 'query' and 'quals' are reverse complemented
		assert(quals != NULL);
		assert(name != NULL);
		assert_eq(mmui32.size(), refcs.size());
		assert_leq(numMms, mmui32.size());
		assert_gt(qlen, 0);
		Hit hit;
		hit.stratum = stratum;
		hit.cost = cost;
		hit.patSeq = query;
		hit.quals = *quals;
		if(!ebwtFw) {
			// Re-reverse the pattern and the quals back to how they
			// appeared in the read file
			hit.patSeq.reverse();
			hit.quals.reverse();
		}
		// Turn the mmui32 and refcs arrays into the mm FixedBitset and
		// the refc vector
		hit.refcs.resize(qlen);
		hit.refcs.fillZero();
		for(size_t i = 0; i < numMms; i++) {
			if (ebwtFw != _fw) {
				// The 3' end is on the left but the mm vector encodes
				// mismatches w/r/t the 5' end, so we flip
				uint32_t off = qlen - mmui32[i] - 1;
				hit.mms.set(off);
				hit.refcs[off] = refcs[i];
			} else {
				hit.mms.set(mmui32[i]);
				hit.refcs[mmui32[i]] = refcs[i];
			}
		}
		// Check the hit against the original text, if it's available
		if(_texts.size() > 0) {
			assert_lt(h.first, _texts.size());
			FixedBitset<1024> diffs;
			// This type of check assumes that only mismatches are
			// possible.  If indels are possible, then we either need
			// the caller to provide information about indel locations,
			// or we need to extend this to a more complicated check.
			assert_leq(h.second + qlen, _texts[h.first].length());
			for(size_t i = 0; i < qlen; i++) {
				assert_neq(4, (int)_texts[h.first][h.second + i]);
				// Forward pattern appears at h
				if((int)hit.patSeq[i] != (int)_texts[h.first][h.second + i]) {
					uint32_t qoff = (uint32_t)i;
					// if ebwtFw != _fw the 3' end is on on the
					// left end of the pattern, but the diff vector
					// should encode mismatches w/r/t the 5' end,
					// so we flip
					if (_fw) diffs.set(qoff);
					else     diffs.set(qlen - qoff - 1);
				}
			}
			if(diffs != hit.mms) {
				// Oops, mismatches were not where we expected them;
				// print a diagnostic message before asserting
				cerr << "Expected " << hit.mms.str() << " mismatches, got " << diffs.str() << endl;
				cerr << "  Pat:  " << hit.patSeq << endl;
				cerr << "  Tseg: ";
				for(size_t i = 0; i < qlen; i++) {
					cerr << _texts[h.first][h.second + i];
				}
				cerr << endl;
				cerr << "  mmui32: ";
				for(size_t i = 0; i < numMms; i++) {
					cerr << mmui32[i] << " ";
				}
				cerr << endl;
				cerr << "  FW: " << _fw << endl;
				cerr << "  Ebwt FW: " << ebwtFw << endl;
			}
			if(diffs != hit.mms) assert(false);
		}
		hit.h = h;
		hit.patId = ((patid == 0xffffffff) ? _patid : patid);
		hit.patName = *name;
		hit.mh = mh;
		hit.fw = _fw;
		hit.mfw = mfw;
		hit.mlen = mlen;
		hit.oms = oms;
		hit.mate = mate;
		hit.seed = seed;
		assert(hit.repOk());
		return sink().reportHit(hit, stratum);
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %r9, 0x18(%rsp)
movl %r8d, 0xc(%rsp)
movq %rcx, 0x40(%rsp)
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, 0x48(%rsp)
movl 0x318(%rsp), %r13d
movzwl 0x320(%rsp), %ebx
xorps %xmm0, %xmm0
leaq 0xb8(%rsp), %rdx
movaps %xmm0, -0x48(%rdx)
leaq 0x37eaf(%rip), %rax     # 0x69a00
movq %rax, -0x30(%rdx)
movaps %xmm0, -0x28(%rdx)
movups %xmm0, -0x10(%rdx)
movaps %xmm0, 0x8(%rdx)
movups %xmm0, 0x20(%rdx)
leaq 0x37f64(%rip), %rcx     # 0x69ad0
movq %rcx, (%rdx)
movq %rax, 0x30(%rdx)
leaq 0x108(%rsp), %r15
movaps %xmm0, -0x18(%r15)
movl $0x0, 0xa0(%r15)
xorl %r14d, %r14d
movl $0x9c, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x9250
movl $0xffffffff, 0xa4(%r15) # imm = 0xFFFFFFFF
movq %r14, 0xa8(%r15)
movl $0x80, %eax
movq %rax, 0xb0(%r15)
movq %r14, 0xb8(%r15)
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
movq %rcx, 0xc0(%r15)
movq %r14, 0xc8(%r15)
movq %rax, 0xd0(%r15)
movq %r14, 0xd8(%r15)
movb %r13b, 0xe8(%r15)
movl %ebx, 0xec(%r15)
movq 0x8(%r12), %r13
movq 0x20(%r12), %rbx
movq 0x48(%rsp), %r12
cmpq %rbx, -0x28(%r15)
jae 0x31c20
leaq 0x32(,%rbx,2), %rsi
leaq 0xb8(%rsp), %rdi
callq 0x25560
leaq 0xe8(%rsp), %r14
movq -0x28(%r14), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x93c0
movq %rbx, -0x10(%r14)
movq 0x8(%rbp), %rsi
movq 0x20(%rbp), %rdx
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movl 0x310(%rsp), %r13d
leaq 0x1a8(%rsp), %rdi
cmpb $0x0, 0xc(%rsp)
jne 0x31d19
movq 0xd8(%rsp), %rdx
cmpq $0x2, %rdx
jb 0x31cc0
movq $-0x1, %rax
xorl %ecx, %ecx
movq 0xc0(%rsp), %rsi
movb (%rsi,%rcx), %r8b
addq %rsi, %rdx
movb (%rax,%rdx), %dl
movb %dl, (%rsi,%rcx)
movq 0xc0(%rsp), %rdx
addq 0xd8(%rsp), %rdx
movb %r8b, (%rax,%rdx)
incq %rcx
movq 0xd8(%rsp), %rdx
movq %rdx, %rsi
shrq %rsi
decq %rax
cmpq %rsi, %rcx
jb 0x31c7e
movq 0x108(%rsp), %rdx
cmpq $0x2, %rdx
jb 0x31d19
movq $-0x1, %rax
xorl %ecx, %ecx
movq 0xf0(%rsp), %rsi
movb (%rsi,%rcx), %r8b
addq %rsi, %rdx
movb (%rax,%rdx), %dl
movb %dl, (%rsi,%rcx)
movq 0xf0(%rsp), %rdx
addq 0x108(%rsp), %rdx
movb %r8b, (%rax,%rdx)
incq %rcx
movq 0x108(%rsp), %rdx
movq %rdx, %rsi
shrq %rsi
decq %rax
cmpq %rsi, %rcx
jb 0x31cd7
movl %r13d, %r15d
movq %r15, %rsi
callq 0x323f8
movq 0x2e0(%rsp), %rbx
movq 0x2d8(%rsp), %r14
movq 0x1b0(%rsp), %rdi
movq 0x1c0(%rsp), %rdx
xorl %esi, %esi
callq 0x9250
testq %r14, %r14
movl 0xc(%rsp), %r9d
movq 0x18(%rsp), %r10
je 0x31e05
movq 0x2d0(%rsp), %rdx
xorl %esi, %esi
movq 0x8(%r10), %rdi
movl (%rdi,%rsi,4), %eax
cmpb %r9b, 0x14(%r12)
jne 0x31dac
movl $0x1, %r8d
movl %eax, %ecx
shll %cl, %r8d
movl %eax, %ecx
shrl $0x5, %ecx
orl %r8d, 0x120(%rsp,%rcx,4)
incl 0x118(%rsp)
cmpl %eax, 0x11c(%rsp)
ja 0x31da7
incl %eax
movl %eax, 0x11c(%rsp)
movl (%rdi,%rsi,4), %ecx
jmp 0x31de5
movl %eax, %ecx
notl %ecx
addl %r13d, %ecx
movl $0x1, %edi
shll %cl, %edi
movl %ecx, %r8d
shrl $0x5, %r8d
orl %edi, 0x120(%rsp,%r8,4)
incl 0x118(%rsp)
cmpl %ecx, 0x11c(%rsp)
ja 0x31de5
movl %r13d, %edi
subl %eax, %edi
movl %edi, 0x11c(%rsp)
movq 0x8(%rdx), %rax
movb (%rax,%rsi), %al
movl %ecx, %ecx
movq 0x1b0(%rsp), %rdi
movb %al, (%rdi,%rcx)
incq %rsi
cmpq %rsi, %r14
jne 0x31d68
shrq $0x20, %rbx
movq %rbx, 0x10(%rsp)
movq 0x8(%r12), %rbx
cmpq $0x0, 0x18(%rbx)
je 0x32246
leaq 0x20c(%rsp), %rdi
movl $0x8c, %edx
xorl %esi, %esi
callq 0x9250
testl %r13d, %r13d
je 0x31ef4
movl 0x20c(%rsp), %edx
movl 0x210(%rsp), %r9d
movq 0xc0(%rsp), %rsi
movq 0x2e0(%rsp), %rax
movl %eax, %edi
movb 0x14(%r12), %r8b
xorl %eax, %eax
shlq $0x5, %rdi
movq %r15, %r10
movb (%rsi,%rax), %cl
movq 0x8(%rbx), %r11
movq 0x8(%r11,%rdi), %r11
addq 0x10(%rsp), %r11
cmpb (%rax,%r11), %cl
je 0x31ee8
testb $0x1, %r8b
je 0x31eb3
movl $0x1, %r11d
movl %eax, %ecx
shll %cl, %r11d
movl %eax, %ecx
shrl $0x5, %ecx
orl %r11d, 0x214(%rsp,%rcx,4)
incl %edx
movl %edx, 0x20c(%rsp)
cmpl %eax, %r9d
ja 0x31ee8
leal 0x1(%rax), %r9d
jmp 0x31ee0
leal -0x1(%r10), %ecx
movl $0x1, %r11d
shll %cl, %r11d
movl %ecx, %r14d
shrl $0x5, %r14d
orl %r11d, 0x214(%rsp,%r14,4)
incl %edx
movl %edx, 0x20c(%rsp)
cmpl %ecx, %r9d
ja 0x31ee8
movl %r10d, %r9d
movl %r9d, 0x210(%rsp)
incq %rax
decq %r10
jne 0x31e6a
movl 0x214(%rsp), %eax
cmpl 0x120(%rsp), %eax
jne 0x31f37
xorl %ecx, %ecx
cmpq $0x20, %rcx
je 0x31f28
movl 0x218(%rsp,%rcx,4), %edx
leaq 0x1(%rcx), %rax
cmpl 0x124(%rsp,%rcx,4), %edx
movq %rax, %rcx
je 0x31f06
decq %rax
jmp 0x31f2d
movl $0x20, %eax
cmpq $0x20, %rax
jae 0x32246
movq 0x390b2(%rip), %rdi     # 0x6aff0
leaq 0x24bc7(%rip), %rsi     # 0x56b0c
movl $0x9, %edx
callq 0x9560
leaq 0x118(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x32462
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x3907e(%rip), %rdi     # 0x6aff0
callq 0x9560
movq %rax, %rbx
leaq 0x24b95(%rip), %rsi     # 0x56b16
movl $0x11, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x50(%rsp), %rdi
leaq 0x20c(%rsp), %rsi
callq 0x32462
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq %rbx, %rdi
callq 0x9560
movq %rax, %rbx
movq (%rax), %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 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x31ff7
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x94c0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x32012
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x38fd7(%rip), %rdi     # 0x6aff0
leaq 0x24b08(%rip), %rsi     # 0x56b28
movl $0x8, %edx
callq 0x9560
movq 0x38fbf(%rip), %rdi     # 0x6aff0
leaq 0xb8(%rsp), %rsi
callq 0x1fe01
movq %rax, %rbx
movq (%rax), %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
movq 0x38f81(%rip), %rdi     # 0x6aff0
leaq 0x24abb(%rip), %rsi     # 0x56b31
movl $0x8, %edx
callq 0x9560
movq %r12, %rbp
testl %r13d, %r13d
je 0x320d5
movq 0x2e0(%rsp), %rax
movl %eax, %r12d
shlq $0x5, %r12
movq 0x38f52(%rip), %rbx     # 0x6aff0
leaq 0x20(%rsp), %r13
movq 0x10(%rsp), %r14
movq 0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax,%r12), %rax
movb (%rax,%r14), %al
movb %al, 0x20(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x9560
incq %r14
decq %r15
jne 0x320a8
movq 0x38f14(%rip), %rdi     # 0x6aff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x9480
movl 0xc(%rsp), %r14d
movsbl %al, %esi
movq 0x38ef4(%rip), %rdi     # 0x6aff0
callq 0x9050
movq %rax, %rdi
callq 0x92f0
movq 0x38ee0(%rip), %r15     # 0x6aff0
leaq 0x24a23(%rip), %rsi     # 0x56b3a
movl $0xa, %edx
movq %r15, %rdi
callq 0x9560
cmpq $0x0, 0x2d8(%rsp)
je 0x32172
xorl %r13d, %r13d
movq 0x38eb7(%rip), %r12     # 0x6aff0
leaq 0x24c7d(%rip), %rbx     # 0x56dbd
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movl (%rax,%r13,4), %esi
movq %r12, %rdi
callq 0x92e0
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x9560
incq %r13
cmpq %r13, 0x2d8(%rsp)
jne 0x32140
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x9480
movq %rbp, %r12
movsbl %al, %esi
movq 0x38e5d(%rip), %rdi     # 0x6aff0
callq 0x9050
movq %rax, %rdi
callq 0x92f0
movq 0x38e49(%rip), %rdi     # 0x6aff0
leaq 0x24997(%rip), %rsi     # 0x56b45
movl $0x6, %edx
callq 0x9560
movzbl 0x14(%r12), %esi
movq 0x38e2b(%rip), %rdi     # 0x6aff0
callq 0x9850
movq %rax, %rbx
movq (%rax), %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
movq 0x38df5(%rip), %rdi     # 0x6aff0
leaq 0x2494a(%rip), %rsi     # 0x56b4c
movl $0xb, %edx
callq 0x9560
movzbl %r14b, %esi
movq 0x38dd9(%rip), %rdi     # 0x6aff0
callq 0x9850
movq %rax, %rbx
movq (%rax), %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
movl 0x330(%rsp), %eax
leaq 0x88(%rsp), %r15
movq 0x2e0(%rsp), %rcx
movl %ecx, -0x18(%r15)
movq 0x10(%rsp), %rcx
movl %ecx, -0x14(%r15)
cmpl $-0x1, %eax
jne 0x32274
movl 0x10(%r12), %eax
movl %eax, 0x80(%rsp)
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x20(%rax), %rdx
movq 0x88(%rsp), %rax
movq %r15, %rdi
callq *0x10(%rax)
movq 0x2e8(%rsp), %rax
leaq 0x70(%rsp), %rsi
movl %eax, 0x8(%rsi)
shrq $0x20, %rax
movb 0x340(%rsp), %cl
movl 0x338(%rsp), %edx
movl 0x328(%rsp), %edi
movzwl 0x2f8(%rsp), %r8d
movb 0x2f0(%rsp), %r9b
movl %eax, 0xc(%rsi)
movb 0x14(%r12), %al
movb %al, 0x17c(%rsi)
movb %r9b, 0x17d(%rsi)
movw %r8w, 0x17e(%rsi)
movl %edi, 0x178(%rsi)
movb %cl, 0x188(%rsi)
movl %edx, 0x18c(%rsi)
movq (%r12), %rdi
movq (%rdi), %rax
movl 0x318(%rsp), %edx
callq *0x28(%rax)
movl %eax, %ebp
movq 0x1d0(%rsp), %rdi
testq %rdi, %rdi
je 0x3233a
leaq 0x1d0(%rsp), %rbx
callq 0x95e0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq 0x1b0(%rsp), %rdi
testq %rdi, %rdi
je 0x32362
leaq 0x1b0(%rsp), %rbx
callq 0x95e0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
leaq 0xe8(%rsp), %rdi
callq 0x253a0
leaq 0xb8(%rsp), %rdi
callq 0x253a0
movq %r15, %rdi
callq 0x253a0
movl %ebp, %eax
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3239c
jmp 0x323e2
movq %rax, %rbx
jmp 0x323bf
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x323bf
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x94c0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x323e5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x323e5
jmp 0x323e2
jmp 0x323e2
jmp 0x323e2
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x26402
movq %rbx, %rdi
callq 0x9930
nop