// File: /workspace/github_cpp_makefile_star2_O3/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 $0x288, %rsp            # imm = 0x288
movq %r9, %rbp
movl %r8d, 0xc(%rsp)
movq %rcx, 0x38(%rsp)
movq %rdx, (%rsp)
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
movl 0x308(%rsp), %r14d
movzwl 0x310(%rsp), %r15d
xorps %xmm0, %xmm0
leaq 0xa8(%rsp), %rdx
movaps %xmm0, -0x48(%rdx)
leaq 0x373c5(%rip), %rax     # 0x68a80
movq %rax, -0x30(%rdx)
movaps %xmm0, -0x28(%rdx)
movups %xmm0, -0x10(%rdx)
movaps %xmm0, 0x8(%rdx)
movups %xmm0, 0x20(%rdx)
leaq 0x3747a(%rip), %rcx     # 0x68b50
movq %rcx, (%rdx)
movq %rax, 0x30(%rdx)
leaq 0xf8(%rsp), %r13
movaps %xmm0, -0x18(%r13)
movl $0x0, 0xa0(%r13)
xorl %ebx, %ebx
movl $0x9c, %edx
movq %r13, %rdi
xorl %esi, %esi
callq 0x9250
movl $0xffffffff, 0xa4(%r13) # imm = 0xFFFFFFFF
movq %rbx, 0xa8(%r13)
movl $0x80, %eax
movq %rax, 0xb0(%r13)
movq %rbx, 0xb8(%r13)
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
movq %rcx, 0xc0(%r13)
movq %rbx, 0xc8(%r13)
movq %rax, 0xd0(%r13)
movq %rbx, 0xd8(%r13)
movb %r14b, 0xe8(%r13)
movl %r15d, 0xec(%r13)
movq 0x8(%r12), %r13
movq 0x20(%r12), %r12
testq %r12, %r12
je 0x3178b
leaq 0x32(,%r12,2), %rsi
leaq 0xa8(%rsp), %rdi
callq 0x252d4
movq 0xb0(%rsp), %rbx
leaq 0xd8(%rsp), %r14
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x93c0
movq %r12, -0x10(%r14)
movq (%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x20(%rax), %rdx
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movl 0xc(%rsp), %ebx
movl 0x300(%rsp), %r13d
leaq 0x198(%rsp), %rdi
testb %bl, %bl
jne 0x31888
movq 0xc8(%rsp), %rdx
cmpq $0x2, %rdx
jb 0x3182f
movq $-0x1, %rax
xorl %ecx, %ecx
movq 0xb0(%rsp), %rsi
movb (%rsi,%rcx), %r8b
addq %rsi, %rdx
movb (%rax,%rdx), %dl
movb %dl, (%rsi,%rcx)
movq 0xb0(%rsp), %rdx
addq 0xc8(%rsp), %rdx
movb %r8b, (%rax,%rdx)
incq %rcx
movq 0xc8(%rsp), %rdx
movq %rdx, %rsi
shrq %rsi
decq %rax
cmpq %rsi, %rcx
jb 0x317ed
movq 0xf8(%rsp), %rdx
cmpq $0x2, %rdx
jb 0x31888
movq $-0x1, %rax
xorl %ecx, %ecx
movq 0xe0(%rsp), %rsi
movb (%rsi,%rcx), %r8b
addq %rsi, %rdx
movb (%rax,%rdx), %dl
movb %dl, (%rsi,%rcx)
movq 0xe0(%rsp), %rdx
addq 0xf8(%rsp), %rdx
movb %r8b, (%rax,%rdx)
incq %rcx
movq 0xf8(%rsp), %rdx
movq %rdx, %rsi
shrq %rsi
decq %rax
cmpq %rsi, %rcx
jb 0x31846
movl %r13d, %r15d
movq %r15, %rsi
callq 0x31f54
movq 0x2c8(%rsp), %r14
movq 0x1a0(%rsp), %rdi
movq 0x1b0(%rsp), %rdx
xorl %esi, %esi
callq 0x9250
testq %r14, %r14
movq 0x10(%rsp), %r12
je 0x31967
movq 0x2c0(%rsp), %rdx
xorl %esi, %esi
movq 0x8(%rbp), %rdi
movl (%rdi,%rsi,4), %eax
cmpb %bl, 0x14(%r12)
jne 0x3190e
movl $0x1, %r8d
movl %eax, %ecx
shll %cl, %r8d
movl %eax, %ecx
shrl $0x5, %ecx
orl %r8d, 0x110(%rsp,%rcx,4)
incl 0x108(%rsp)
cmpl %eax, 0x10c(%rsp)
ja 0x31909
incl %eax
movl %eax, 0x10c(%rsp)
movl (%rdi,%rsi,4), %ecx
jmp 0x31947
movl %eax, %ecx
notl %ecx
addl %r13d, %ecx
movl $0x1, %edi
shll %cl, %edi
movl %ecx, %r8d
shrl $0x5, %r8d
orl %edi, 0x110(%rsp,%r8,4)
incl 0x108(%rsp)
cmpl %ecx, 0x10c(%rsp)
ja 0x31947
movl %r13d, %edi
subl %eax, %edi
movl %edi, 0x10c(%rsp)
movq 0x8(%rdx), %rax
movb (%rax,%rsi), %al
movl %ecx, %ecx
movq 0x1a0(%rsp), %rdi
movb %al, (%rdi,%rcx)
incq %rsi
cmpq %rsi, %r14
jne 0x318ca
movq 0x2d0(%rsp), %rax
shrq $0x20, %rax
movq %rax, (%rsp)
movq 0x8(%r12), %rbx
cmpq $0x0, 0x18(%rbx)
je 0x31da9
leaq 0x1fc(%rsp), %rdi
xorl %r14d, %r14d
movl $0x8c, %edx
xorl %esi, %esi
callq 0x9250
testl %r13d, %r13d
je 0x31a62
movq 0xb0(%rsp), %rdx
movq 0x2d0(%rsp), %rax
movl %eax, %esi
movb 0x14(%r12), %dil
xorl %r9d, %r9d
shlq $0x5, %rsi
movq %r15, %r8
xorl %eax, %eax
xorl %r10d, %r10d
movb (%rdx,%rax), %cl
movq 0x8(%rbx), %r11
movq 0x8(%r11,%rsi), %r11
addq (%rsp), %r11
cmpb (%rax,%r11), %cl
je 0x31a4e
testb $0x1, %dil
je 0x31a17
movl $0x1, %r11d
movl %eax, %ecx
shll %cl, %r11d
movl %eax, %ecx
shrl $0x5, %ecx
orl %r11d, 0x204(%rsp,%rcx,4)
incl %r10d
movl %r10d, 0x1fc(%rsp)
cmpl %eax, %r9d
ja 0x31a4e
leal 0x1(%rax), %r9d
jmp 0x31a46
leal -0x1(%r8), %ecx
movl $0x1, %r11d
shll %cl, %r11d
movl %ecx, %r14d
shrl $0x5, %r14d
orl %r11d, 0x204(%rsp,%r14,4)
incl %r10d
movl %r10d, 0x1fc(%rsp)
cmpl %ecx, %r9d
ja 0x31a4e
movl %r8d, %r9d
movl %r9d, 0x200(%rsp)
incq %rax
decq %r8
jne 0x319cd
movl 0x204(%rsp), %r14d
cmpl 0x110(%rsp), %r14d
jne 0x31a9c
xorl %eax, %eax
cmpq $0x20, %rax
je 0x31da9
movl 0x208(%rsp,%rax,4), %edx
leaq 0x1(%rax), %rcx
cmpl 0x114(%rsp,%rax,4), %edx
movq %rcx, %rax
je 0x31a6e
decq %rcx
cmpq $0x20, %rcx
jae 0x31da9
movq 0x3854d(%rip), %rdi     # 0x69ff0
leaq 0x24142(%rip), %rsi     # 0x55bec
movl $0x9, %edx
callq 0x9560
leaq 0x108(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x31fbc
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x38519(%rip), %rdi     # 0x69ff0
callq 0x9560
movq %rax, %rbx
leaq 0x24110(%rip), %rsi     # 0x55bf6
movl $0x11, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x40(%rsp), %rdi
leaq 0x1fc(%rsp), %rsi
callq 0x31fbc
movq 0x40(%rsp), %rsi
movq 0x48(%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 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x31b5c
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x94c0
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x31b77
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x38472(%rip), %rdi     # 0x69ff0
leaq 0x24083(%rip), %rsi     # 0x55c08
movl $0x8, %edx
callq 0x9560
movq 0x3845a(%rip), %rdi     # 0x69ff0
leaq 0xa8(%rsp), %rsi
callq 0x1fb3f
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 0x3841c(%rip), %rdi     # 0x69ff0
leaq 0x24036(%rip), %rsi     # 0x55c11
movl $0x8, %edx
callq 0x9560
testl %r13d, %r13d
je 0x31c3b
movq 0x2d0(%rsp), %rax
movl %eax, %r12d
shlq $0x5, %r12
movq 0x383f0(%rip), %rbx     # 0x69ff0
leaq 0x18(%rsp), %r13
movq (%rsp), %r14
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax,%r12), %rax
movb (%rax,%r14), %al
movb %al, 0x18(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x9560
incq %r14
decq %r15
jne 0x31c09
movq 0x383ae(%rip), %rdi     # 0x69ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x9480
movl 0xc(%rsp), %r14d
movsbl %al, %esi
movq 0x3838e(%rip), %rdi     # 0x69ff0
callq 0x9050
movq %rax, %rdi
callq 0x92f0
movq 0x3837a(%rip), %r15     # 0x69ff0
leaq 0x23f9d(%rip), %rsi     # 0x55c1a
movl $0xa, %edx
movq %r15, %rdi
callq 0x9560
cmpq $0x0, 0x2c8(%rsp)
je 0x31cd3
xorl %r13d, %r13d
movq 0x38351(%rip), %r12     # 0x69ff0
leaq 0x241f7(%rip), %rbx     # 0x55e9d
movq 0x8(%rbp), %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, 0x2c8(%rsp)
jne 0x31ca6
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x9480
movq 0x10(%rsp), %r12
movsbl %al, %esi
movq 0x382fa(%rip), %rdi     # 0x69ff0
callq 0x9050
movq %rax, %rdi
callq 0x92f0
movq 0x382e6(%rip), %rdi     # 0x69ff0
leaq 0x23f14(%rip), %rsi     # 0x55c25
movl $0x6, %edx
callq 0x9560
movzbl 0x14(%r12), %esi
movq 0x382c8(%rip), %rdi     # 0x69ff0
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 0x38292(%rip), %rdi     # 0x69ff0
leaq 0x23ec7(%rip), %rsi     # 0x55c2c
movl $0xb, %edx
callq 0x9560
movzbl %r14b, %esi
movq 0x38276(%rip), %rdi     # 0x69ff0
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 0x320(%rsp), %eax
leaq 0x78(%rsp), %r15
movq 0x2d0(%rsp), %rcx
movl %ecx, -0x18(%r15)
movq (%rsp), %rcx
movl %ecx, -0x14(%r15)
cmpl $-0x1, %eax
jne 0x31dd3
movl 0x10(%r12), %eax
movl %eax, 0x70(%rsp)
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x20(%rax), %rdx
movq 0x78(%rsp), %rax
movq %r15, %rdi
callq *0x10(%rax)
movq 0x2d8(%rsp), %rax
leaq 0x60(%rsp), %rsi
movl %eax, 0x8(%rsi)
shrq $0x20, %rax
movb 0x330(%rsp), %cl
movl 0x328(%rsp), %edx
movl 0x318(%rsp), %edi
movzwl 0x2e8(%rsp), %r8d
movb 0x2e0(%rsp), %r9b
movl %eax, 0xc(%rsi)
movq 0x10(%rsp), %r10
movb 0x14(%r10), %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 (%r10), %rdi
movq (%rdi), %rax
movl 0x308(%rsp), %edx
callq *0x28(%rax)
movl %eax, %ebp
movq 0x1c0(%rsp), %rdi
testq %rdi, %rdi
je 0x31e96
leaq 0x1c0(%rsp), %rbx
callq 0x95e0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq 0x1a0(%rsp), %rdi
testq %rdi, %rdi
je 0x31ebe
leaq 0x1a0(%rsp), %rbx
callq 0x95e0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
leaq 0xd8(%rsp), %rdi
callq 0x250d6
leaq 0xa8(%rsp), %rdi
callq 0x250d6
movq %r15, %rdi
callq 0x250d6
movl %ebp, %eax
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x31ef8
jmp 0x31f3e
movq %rax, %rbx
jmp 0x31f1b
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x31f1b
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x94c0
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x31f41
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x31f41
jmp 0x31f3e
jmp 0x31f3e
jmp 0x31f3e
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x26132
movq %rbx, %rdi
callq 0x9930
nop