// File: /workspace/github_cpp_makefile_star2_O1/BenLangmead[P]bowtie/./ref_aligner.h
// Function: TwoMMRefAligner::anchor64Find(unsigned int, unsigned long, unsigned char*, SDnaStringExpandable<25, 2> const&, SStringExpandable<char, 25, 2, 0> const&, unsigned int, unsigned int, EList<Range, 128>&, EList<unsigned int, 128>&, std::set<std::pair<unsigned long, unsigned long>, std::less<std::pair<unsigned long, unsigned long>>, std::allocator<std::pair<unsigned long, unsigned long>>>*, unsigned int, bool) const
virtual void anchor64Find(uint32_t numToFind,
							  size_t tidx,
							  uint8_t* ref,
							  const BTDnaString& qry,
							  const BTString& quals,
							  TIndexOffU begin,
							  TIndexOffU end,
							  TRangeVec& ranges,
							  EList<TIndexOffU>& results,
							  TSetPairs* pairs = NULL,
							  TIndexOffU aoff = OFF_MASK,
							  bool seedOnLeft = false) const
				{
					assert_gt(numToFind, 0);
					ASSERT_ONLY(const uint32_t rangesInitSz = (uint32_t)ranges.size());
					ASSERT_ONLY(uint32_t duplicates = 0);
					ASSERT_ONLY(uint32_t r2i = 0);
					const uint32_t qlen = (uint32_t)qry.length();
					assert_geq(end - begin, qlen); // caller should have checked this
					assert_gt(end, begin);
					assert_gt(qlen, 0);
#ifndef NDEBUG
					// Get results from the naive matcher for sanity-checking
					TRangeVec r2; EList<TIndexOffU> re2;
					naiveFind(numToFind, tidx, ref, qry, quals, begin, end, r2,
						  re2, pairs, aoff, seedOnLeft);
#endif
					const uint32_t anchorBitPairs = min<int>((int)qlen, 32);
					const int lhsShift = ((anchorBitPairs - 1) << 1);
					const uint32_t anchorCushion  = 32 - anchorBitPairs;
					// anchorOverhang = # read bases not included in the anchor
					const uint32_t anchorOverhang = (uint32_t)(qlen <= 32 ? 0 : (qlen - 32));
					const TIndexOffU lim = end - qlen - begin;
					const TIndexOffU halfway = begin + (lim >> 1);
					uint64_t anchor = 0llu;
					uint64_t buffw = 0llu;  // rotating ref sequence buffer
					// OR the 'diff' buffer with this so that we can always count
					// 'N's as mismatches
					uint64_t diffMask = 0llu;
					// Set up a mask that we'll apply to the two bufs every round
					// to discard bits that were rotated out of the anchor area
					uint64_t clearMask = 0xffffffffffffffffllu;
					bool useMask = false;
					if(anchorBitPairs < 32) {
						clearMask >>= ((32-anchorBitPairs) << 1);
						useMask = true;
					}
					int nsInAnchor = 0;
					uint32_t nPoss = 0;
					int nPos1 = -1;
					int nPos2 = -1;
					size_t skipLeftToRights = 0;
					size_t skipRightToLefts = 0;
					// Construct the 'anchor' 64-bit buffer so that it holds all of
					// the first 'anchorBitPairs' bit pairs of the query.
					for(size_t i = 0; i < anchorBitPairs; i++) {
						int c = (int)qry[i]; // next query character
						int r = (int)ref[halfway - begin + i]; // next reference character
						if(r & 4) {
							r = 0;
							// The right-to-left direction absorbs the candidate
							// alignment based at 'halfway'; so skipLeftToRights is
							// i, not i+1
							skipLeftToRights = max(skipLeftToRights, i);
							skipRightToLefts = max(skipRightToLefts, anchorBitPairs - i);
						}
						assert_leq(c, 4);
						assert_lt(r, 4);
						// Special case: query has an 'N'
						if(c == 4) {
							if(++nsInAnchor > 2) {
								// More than two 'N's in the anchor region; can't
								// possibly have a 2-mismatch hit anywhere
								return;   // can't match if query has Ns
							} else if(nsInAnchor == 2) {
								nPos2 = (int)i;
								nPoss++;
							} else {
								assert_eq(1, nsInAnchor);
								nPos1 = (int)i;
								nPoss++;
							}
							// Make it look like an 'A' in the anchor
							c = 0;
							diffMask = (diffMask << 2llu) | 1llu;
						} else {
							diffMask <<= 2llu;
						}
						anchor  = ((anchor  << 2llu) | c);
						buffw = ((buffw << 2llu) | r);
					}
					assert_leq(nPoss, 2);
					// Check whether read is disqualified by Ns outside of the anchor
					// region
					for(size_t i = anchorBitPairs; i < qlen; i++) {
						if((int)qry[i] == 4) {
							if(++nsInAnchor > 2) {
								return; // can't match if query has Ns
							}
						}
					}
					uint64_t bufbw = buffw;
					// We're moving the right-hand edge of the anchor along until
					// it's 'anchorOverhang' chars from the end of the target region.
					// Note that we're not making a 3'/5' distinction here; if we
					// were, we might need to make the 'anchorOverhang' adjustment on
					// the left end of the range rather than the right.
					bool hi = false;
					TIndexOffU riHi  = halfway;
					TIndexOffU rirHi = halfway - begin;
					TIndexOffU rirHiAnchor = rirHi + anchorBitPairs - 1;
					TIndexOffU riLo  = halfway + 1;
					TIndexOffU rirLo = halfway - begin + 1;
					TIndexOffU i;
					for(i = 1; i <= lim + 1; i++) {
						int r;       // new reference char
						uint64_t diff;
						assert_lt(skipLeftToRights, qlen);
						assert_leq(skipRightToLefts, qlen);
						if(hi) {
							hi = false;
							// Moving left-to-right
							riHi++;
							rirHi++;
							rirHiAnchor++;
							r = (int)ref[rirHiAnchor];
							if(r & 4) {
								r = 0;
								skipLeftToRights = anchorBitPairs;
							}
							assert_lt(r, 4);
							// Bring in new base pair at the least significant
							// position
							buffw = ((buffw << 2llu) | r);
							if(useMask) buffw &= clearMask;
							if(skipLeftToRights > 0) {
								skipLeftToRights--;
								continue;
							}
							diff = (buffw ^ anchor) | diffMask;
						} else {
							hi = true;
							// Moving right-to-left
							riLo--;
							rirLo--;
							r = (int)ref[rirLo];
							if(r & 4) {
								r = 0;
								skipRightToLefts = qlen;
							}
							assert_lt(r, 4);
							if(i >= 2) {
								bufbw >>= 2llu;
								// Bring in new base pair at the most significant
								// position
								bufbw |= ((uint64_t)r << lhsShift);
							}
							if(skipRightToLefts > 0) {
								skipRightToLefts--;
								continue;
							}
							diff = (bufbw ^ anchor) | diffMask;
						}
						if((diff & 0xfffff00000000000llu) &&
						   (diff & 0x00000ffffff00000llu) &&
						   (diff & 0x00000000000fffffllu)) continue;
						TIndexOffU ri  = hi ? riLo  : riHi;
						TIndexOffU rir = hi ? rirLo : rirHi;
						// Could use pop count
						uint8_t *diff8 = reinterpret_cast<uint8_t*>(&diff);
						// As a first cut, see if there are too many mismatches in
						// the first and last parts of the anchor
						uint32_t diffs = u8toMms[(int)diff8[0]] + u8toMms[(int)diff8[7]];
						if(diffs > 2) continue;
						diffs += u8toMms[(int)diff8[1]] +
							u8toMms[(int)diff8[2]] +
							u8toMms[(int)diff8[3]] +
							u8toMms[(int)diff8[4]] +
							u8toMms[(int)diff8[5]] +
							u8toMms[(int)diff8[6]];
						TIndexOffU mmpos1 = OFF_MASK;
						int refc1 = -1;
						TIndexOffU mmpos2 = OFF_MASK;
						int refc2 = -1;
						if(diffs > 2) {
							// Too many differences
							continue;
						} else if(nPoss > 1 && diffs == nPoss) {
							// There was one difference, but there was also one N,
							// so we already know where the difference is
							mmpos1 = nPos1;
							refc1 = "ACGT"[(int)ref[rir + nPos1]];
							if(nPoss == 2) {
								mmpos2 = nPos2;
								refc2 = "ACGT"[(int)ref[rir + nPos2]];
							}
						} else if(diffs > 0) {
							// Figure out which position mismatched
							uint64_t diff2 = diff;
							mmpos1 = 31;
							if((diff & 0xffffffffllu) == 0) { diff >>= 32llu; mmpos1 -= 16; }
							assert_neq(0, diff);
							if((diff & 0xffffllu) == 0)     { diff >>= 16llu; mmpos1 -=  8; }
							assert_neq(0, diff);
							if((diff & 0xffllu) == 0)       { diff >>= 8llu;  mmpos1 -=  4; }
							assert_neq(0, diff);
							if((diff & 0xfllu) == 0)        { diff >>= 4llu;  mmpos1 -=  2; }
							assert_neq(0, diff);
							if((diff & 0x3llu) == 0)        { mmpos1--; }
							assert_neq(0, diff);
							assert_geq(mmpos1, 0);
							assert_lt(mmpos1, 32);
							mmpos1 -= anchorCushion;
							refc1 = "ACGT"[(int)ref[rir + mmpos1]];
							if(diffs > 1) {
								// Figure out the second mismatched position
								ASSERT_ONLY(uint64_t origDiff2 = diff2);
								diff2 &= ~(0xc000000000000000llu >> (uint64_t)((mmpos1+anchorCushion) << 1));
								assert_neq(diff2, origDiff2);
								mmpos2 = 31;
								if((diff2 & 0xffffffffllu) == 0) { diff2 >>= 32llu; mmpos2 -= 16; }
								assert_neq(0, diff2);
								if((diff2 & 0xffffllu) == 0)     { diff2 >>= 16llu; mmpos2 -=  8; }
								assert_neq(0, diff2);
								if((diff2 & 0xffllu) == 0)       { diff2 >>= 8llu;  mmpos2 -=  4; }
								assert_neq(0, diff2);
								if((diff2 & 0xfllu) == 0)        { diff2 >>= 4llu;  mmpos2 -=  2; }
								assert_neq(0, diff2);
								if((diff2 & 0x3llu) == 0)        { mmpos2--; }
								assert_neq(0, diff2);
								assert_geq(mmpos2, 0);
								assert_lt(mmpos2, 32);
								mmpos2 -= anchorCushion;
								assert_neq(mmpos1, mmpos2);
								refc2 = "ACGT"[(int)ref[rir + mmpos2]];
								if(mmpos2 < mmpos1) {
									uint32_t mmtmp = mmpos1;
									mmpos1 = mmpos2;
									mmpos2 = mmtmp;
									int refctmp = refc1;
									refc1 = refc2;
									refc2 = refctmp;
								}
								assert_lt(mmpos1, mmpos2);
							}
						}
						// Now extend the anchor into a longer alignment
						bool foundHit = true;
						if(anchorOverhang > 0) {
							assert_leq(ri + anchorBitPairs + anchorOverhang, end);
							bool skipCandidate = false;
							for(uint32_t j = 0; j < anchorOverhang; j++) {
								int rc = (int)ref[rir + 32 + j];
								if(rc == 4) {
									// Oops, encountered an N in the reference in
									// the overhang portion of the candidate
									// alignment
									// (Note that we inverted hi earlier)
									if(hi) {
										// Right-to-left
										skipRightToLefts = anchorOverhang - j - 1;
									} else {
										// Left-to-right
										skipLeftToRights = anchorBitPairs + j;
									}
									skipCandidate = true; // Skip this candidate
									break;
								}
								if((int)qry[32 + j] != rc) {
									if(++diffs > 2) {
										foundHit = false;
										break;
									} else if(diffs == 2) {
										mmpos2 = 32 + j;
										refc2 = "ACGT"[(int)ref[rir + 32 + j]];
									} else {
										assert_eq(1, diffs);
										mmpos1 = 32 + j;
										refc1 = "ACGT"[(int)ref[rir + 32 + j]];
									}
								}
							}
							if(skipCandidate) continue;
						}
						if(!foundHit) continue;
						if(pairs != NULL) {
							TU64Pair p;
							if(ri < aoff) {
								// By convention, the upstream mate's
								// coordinates go in the 'first' field
								p.first  = ((uint64_t)tidx << 32) | (uint64_t)ri;
								p.second = ((uint64_t)tidx << 32) | (uint64_t)aoff;
							} else {
								p.second = ((uint64_t)tidx << 32) | (uint64_t)ri;
								p.first  = ((uint64_t)tidx << 32) | (uint64_t)aoff;
							}
							if(pairs->find(p) != pairs->end()) {
								// We already found this hit!  Continue.
								ASSERT_ONLY(duplicates++);
								ASSERT_ONLY(r2i++);
								continue;
							} else {
								// Record this hit
								pairs->insert(p);
							}
						}
						assert_leq(diffs, 2);
						assert_lt(r2i, r2.size());
						assert_eq(re2[r2i], ri);
						ranges.resize(ranges.size()+1);
						Range& range = ranges.back();
						assert_eq(diffs, r2[r2i].numMms);
						range.stratum = diffs;
						range.numMms = diffs;
						assert_eq(0, range.mms.size());
						assert_eq(0, range.refcs.size());
						if(diffs > 0) {
							assert_neq(mmpos1, OFF_MASK);
							assert_eq(mmpos1, r2[r2i].mms[0]);
							assert_neq(-1, refc1);
							assert_eq(refc1, r2[r2i].refcs[0]);
							range.mms.push_back(mmpos1);
							range.refcs.push_back(refc1);
							if(diffs > 1) {
								assert_neq(mmpos2, OFF_MASK);
								assert_eq(mmpos2, r2[r2i].mms[1]);
								assert_neq(-1, refc2);
								assert_eq(refc2, r2[r2i].refcs[1]);
								range.mms.push_back(mmpos2);
								range.refcs.push_back(refc2);
							}
						}
						ASSERT_ONLY(r2i++);
						results.push_back(ri);
						if(--numToFind == 0) return;
					}
					assert_leq(duplicates, r2.size());
					assert_geq(r2.size() - duplicates, ranges.size() - rangesInitSz);
					return; // no hit
				}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rcx, %r9
movq %rdx, 0x80(%rsp)
movl %esi, 0xc8(%rsp)
movl 0x178(%rsp), %edx
movl 0x170(%rsp), %ecx
movq 0x20(%r8), %rax
movl $0x20, %esi
cmpl %esi, %eax
movl $0x20, %r10d
cmovll %eax, %r10d
subl %r10d, %esi
leal -0x20(%rax), %edi
xorl %r11d, %r11d
cmpl $0x21, %eax
cmovbl %r11d, %edi
movq %rdi, 0xf8(%rsp)
addl %eax, %ecx
subl %ecx, %edx
movq %rsi, 0xe8(%rsp)
leal (%rsi,%rsi), %ecx
movq $-0x1, %rsi
shrq %cl, %rsi
movq %rsi, 0x58(%rsp)
movl %edx, 0x14(%rsp)
shrl %edx
testl %eax, %eax
setne %cl
movq %r9, 0x48(%rsp)
movq %r10, 0x30(%rsp)
movq %r8, 0xf0(%rsp)
movq %rdx, 0xa0(%rsp)
je 0x4624c
movq 0x8(%r8), %rdi
cmpq $0x1, %r10
movq %r10, %r8
adcq $0x0, %r8
addq %rdx, %r9
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rdx, 0x90(%rsp)
xorl %ebp, %ebp
xorl %r14d, %r14d
movq $0x0, 0x60(%rsp)
xorl %esi, %esi
movq $0x0, 0x98(%rsp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rdx, 0x88(%rsp)
xorl %r11d, %r11d
xorl %r12d, %r12d
xorl %r15d, %r15d
movzbl (%r9,%r11), %ebx
testb $0x4, %bl
je 0x461a6
cmpq %r11, %r12
cmovbeq %r11, %r12
cmpq %r10, %r15
cmovbeq %r10, %r15
xorl %ebx, %ebx
movsbq (%rdi,%r11), %rdx
cmpb $0x4, %dl
jne 0x461bd
leal 0x1(%rsi), %r13d
cmpl $0x1, %esi
jle 0x461c8
xorl %ebx, %ebx
jmp 0x4622c
shlq $0x2, 0x60(%rsp)
movl %esi, %r13d
jmp 0x4621a
cmpl $0x2, %r13d
movq 0x88(%rsp), %rdx
cmovnel %r11d, %edx
movq %rdx, 0x88(%rsp)
movq 0x90(%rsp), %rdx
cmovel %r11d, %edx
movq %rdx, 0x90(%rsp)
movq 0x98(%rsp), %rdx
incl %edx
movq %rdx, 0x98(%rsp)
movq 0x60(%rsp), %rdx
leaq 0x1(,%rdx,4), %rdx
movq %rdx, 0x60(%rsp)
xorl %edx, %edx
shlq $0x2, %rbp
orq %rdx, %rbp
shlq $0x2, %r14
movl %ebx, %edx
orq %rdx, %r14
movb $0x1, %bl
movl %r13d, %esi
testb %bl, %bl
je 0x46288
incq %r11
cmpq 0x30(%rsp), %r11
setb %cl
decq %r10
cmpq %r11, %r8
jne 0x4618c
jmp 0x46288
movq $0x0, 0x98(%rsp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rdx, 0x88(%rsp)
xorl %r15d, %r15d
xorl %r12d, %r12d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rdx, 0x90(%rsp)
xorl %esi, %esi
movq $0x0, 0x60(%rsp)
xorl %r14d, %r14d
xorl %ebp, %ebp
testb $0x1, %cl
movq 0x48(%rsp), %r11
movl 0x14(%rsp), %r9d
movl 0x170(%rsp), %r8d
movq 0x30(%rsp), %r10
jne 0x46ba1
movl %eax, %ecx
movq %rcx, 0x108(%rsp)
cmpl %r10d, %ecx
jbe 0x462e4
movq 0xf0(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq %r10, %rdx
cmpb $0x4, (%rcx,%rdx)
jne 0x462d7
cmpl $0x1, %esi
jg 0x46ba1
incl %esi
incq %rdx
cmpq %rdx, 0x108(%rsp)
jne 0x462c6
incl %r9d
je 0x46ba1
movq 0x190(%rsp), %rsi
leal -0x2(,%r10,2), %ecx
movq 0xa0(%rsp), %rdx
addl %edx, %r8d
leal 0x1(%rdx), %edi
movq %rdi, 0xb8(%rsp)
leal 0x1(%r8), %edi
movl %edi, 0x6c(%rsp)
cmpl $0x20, %r10d
leal -0x1(%r10,%rdx), %edx
movq %rdx, 0x100(%rsp)
movl %ecx, %ecx
movq %rcx, 0x128(%rsp)
movq $-0x1, %rcx
cmovbq 0x58(%rsp), %rcx
movq %rcx, 0x120(%rsp)
movq 0x80(%rsp), %rcx
shlq $0x20, %rcx
movl 0x198(%rsp), %edx
movq %rcx, 0x80(%rsp)
orq %rcx, %rdx
movq %rdx, 0xd0(%rsp)
leaq 0x8(%rsi), %rcx
movq %rcx, 0xd8(%rsp)
movq 0xf8(%rsp), %rcx
movl %ecx, %edx
movq %rdx, 0x130(%rsp)
cltq
cmpq $0x20, %rax
movl $0x20, %edx
cmovlq %rax, %rdx
movq %rdx, 0x118(%rsp)
leal -0x1(%rcx), %eax
movl %eax, 0xc4(%rsp)
xorps %xmm0, %xmm0
movl $0x1, %ebx
leaq 0x27951(%rip), %rsi     # 0x6dd10
xorl %ecx, %ecx
movq %r14, %r13
movl %r9d, 0x14(%rsp)
testb $0x1, %cl
je 0x4642d
incl %r8d
movq 0xa0(%rsp), %rax
incl %eax
movq %rax, 0xa0(%rsp)
movq 0x100(%rsp), %rax
incl %eax
movq %rax, 0x100(%rsp)
movzbl (%r11,%rax), %edi
xorl %ecx, %ecx
testb $0x4, %dil
cmovneq %r10, %r12
cmovnel %ecx, %edi
shlq $0x2, %r14
orq %r14, %rdi
andq 0x120(%rsp), %rdi
testq %r12, %r12
je 0x46490
decq %r12
movl $0xa, %eax
xorl %ecx, %ecx
movq %rdi, %r14
jmp 0x46b8d
decl 0x6c(%rsp)
movq 0xb8(%rsp), %rax
decl %eax
movq %rax, 0xb8(%rsp)
movzbl (%r11,%rax), %edi
testb $0x4, %dil
cmovneq 0x108(%rsp), %r15
movl $0x0, %eax
cmovnel %eax, %edi
movq %r13, %rax
shrq $0x2, %rax
movq 0x128(%rsp), %rcx
shlq %cl, %rdi
orq %rax, %rdi
cmpl $0x2, %ebx
cmovbq %r13, %rdi
testq %r15, %r15
je 0x46495
decq %r15
movb $0x1, %cl
movl $0xa, %eax
movq %rdi, %r13
jmp 0x46b8d
movq %rdi, %r14
jmp 0x4649a
movb $0x1, %cl
movq %rdi, %r13
xorq %rbp, %rdi
orq 0x60(%rsp), %rdi
testl $0xfffff, %edi          # imm = 0xFFFFF
movl %ecx, 0x58(%rsp)
je 0x464e2
movabsq $0xffffff00000, %rax    # imm = 0xFFFFFF00000
addq $0x100000, %rax         # imm = 0x100000
cmpq %rax, %rdi
jb 0x464e2
movq %rdi, %rcx
movl $0xa, %eax
movabsq $0xffffff00000, %rdx    # imm = 0xFFFFFF00000
andq %rdx, %rcx
movl 0x58(%rsp), %ecx
jne 0x46b8d
movq %r15, 0x18(%rsp)
movq %rdi, %r10
shrq $0x38, %r10
testb %cl, %cl
movl %r8d, %eax
cmovnel 0x6c(%rsp), %eax
movl %eax, 0x50(%rsp)
movl %eax, 0xcc(%rsp)
movq 0xa0(%rsp), %rax
movl %eax, %edx
cmovnel 0xb8(%rsp), %edx
movzbl %dil, %eax
movzbl (%rsi,%rax), %eax
movzbl (%rsi,%r10), %r15d
addl %eax, %r15d
movl $0xa, %eax
cmpl $0x2, %r15d
jbe 0x4653f
movq 0x30(%rsp), %r10
movq 0x18(%rsp), %r15
jmp 0x46b8d
movq %rdx, 0x20(%rsp)
movq %r13, 0xb0(%rsp)
movq %r8, 0x40(%rsp)
movq %rdi, %rax
shrq $0x8, %rax
movq %rdi, %rdx
shrq $0x10, %rdx
movq %rdi, %r9
shrq $0x18, %r9
movq %rdi, %r8
shrq $0x20, %r8
movq %rdi, %r11
shrq $0x28, %r11
movq %rdi, %rcx
shrq $0x30, %rcx
movq %rax, 0xa8(%rsp)
movl $0xff, %r13d
andq %r13, %rax
movzbl (%rsi,%rax), %eax
movq %rdx, 0x38(%rsp)
andq %r13, %rdx
movzbl (%rsi,%rdx), %edx
movq %r9, 0xe0(%rsp)
andq %r13, %r9
movzbl (%rsi,%r9), %r9d
addl %edx, %r9d
movq %r8, 0x110(%rsp)
movq %r8, %rdx
andq %r13, %rdx
movzbl (%rsi,%rdx), %edx
movq %r11, %r8
andq %r13, %r8
movzbl (%rsi,%r8), %r8d
addl %edx, %r8d
movq %rcx, %rdx
andq %r13, %rdx
movzbl (%rsi,%rdx), %edx
addl %r8d, %edx
addl %eax, %r15d
addl %r9d, %r15d
addl %edx, %r15d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x10(%rsp)
movl %eax, 0xc(%rsp)
movl $0xa, %eax
cmpl $0x2, %r15d
jbe 0x4662a
movq 0x48(%rsp), %r11
movl 0x14(%rsp), %r9d
movq 0x40(%rsp), %r8
movq 0x30(%rsp), %r10
leaq 0x276f8(%rip), %rsi     # 0x6dd10
movq 0xb0(%rsp), %r13
movq 0x18(%rsp), %r15
jmp 0x46b89
movq 0x98(%rsp), %rdx
cmpl $0x2, %edx
movl 0x14(%rsp), %r9d
movq 0x40(%rsp), %r8
movl %r15d, 0x2c(%rsp)
jb 0x466a5
cmpl %edx, %r15d
jne 0x466a5
movq 0x88(%rsp), %rcx
movl %ecx, 0x10(%rsp)
movq 0x20(%rsp), %rdi
addl %edi, %ecx
movq 0x48(%rsp), %r11
movzbl (%r11,%rcx), %ecx
leaq 0xce06(%rip), %rsi      # 0x53475
movzbl (%rcx,%rsi), %ecx
movl %ecx, 0x38(%rsp)
movq 0x90(%rsp), %rcx
movl %ecx, 0xc(%rsp)
addl %edi, %ecx
movzbl (%r11,%rcx), %ecx
movzbl (%rcx,%rsi), %r13d
movq 0x30(%rsp), %r10
leaq 0x27675(%rip), %rsi     # 0x6dd10
movq 0x18(%rsp), %r15
jmp 0x46883
testl %r15d, %r15d
je 0x4683e
movl $0x1f, %r15d
movq %rdi, %rdx
testl %edi, %edi
movq 0x38(%rsp), %r8
movq 0xa8(%rsp), %r13
jne 0x466e4
movl $0xf, %r15d
movq %r10, 0xe0(%rsp)
movq %rcx, %r8
movq %r11, %r13
movq 0x110(%rsp), %rdx
movl %r13d, %ecx
shll $0x8, %ecx
movq %rdx, %r10
movzbl %r10b, %edx
movzwl %cx, %ecx
leal -0x8(%r15), %esi
orq %rdx, %rcx
cmovnel %r15d, %esi
cmovneq %r10, %r8
movl %esi, 0x10(%rsp)
testb %r8b, %r8b
movq 0x18(%rsp), %r15
jne 0x46725
testq %rcx, %rcx
cmoveq 0xe0(%rsp), %r13
addl $-0x4, 0x10(%rsp)
movq %r13, %r8
testb $0xf, %r8b
movq 0x48(%rsp), %r11
movq 0x30(%rsp), %r10
leaq 0x275d6(%rip), %rsi     # 0x6dd10
movq 0x20(%rsp), %rdx
jne 0x4674e
shrl $0x4, %r8d
andl $0xf, %r8d
addl $-0x2, 0x10(%rsp)
testb $0x3, %r8b
jne 0x46758
decl 0x10(%rsp)
movl 0x10(%rsp), %ecx
movl %ecx, %r8d
subl 0xe8(%rsp), %r8d
movl %r8d, 0x10(%rsp)
addl %r8d, %edx
movzbl (%r11,%rdx), %edx
leaq 0xccfa(%rip), %r13      # 0x53475
movzbl (%rdx,%r13), %r13d
cmpl $0x2, 0x2c(%rsp)
jne 0x46864
addl %ecx, %ecx
movabsq $-0x4000000000000000, %rdx # imm = 0xC000000000000000
shrq %cl, %rdx
notq %rdx
andq %rdx, %rdi
movq %rdi, %rcx
shlq $0x20, %rcx
movq %rdi, %rdx
shrq $0x20, %rdx
xorl %esi, %esi
testq %rcx, %rcx
setne %sil
cmovneq %rdi, %rdx
shll $0x4, %esi
leal 0xf(%rsi), %edi
movq %rdx, %rcx
shrq $0x10, %rcx
orl $0x7, %esi
testw %dx, %dx
cmovnel %edi, %esi
cmovneq %rdx, %rcx
movl %esi, 0xc(%rsp)
testb %cl, %cl
jne 0x467e6
shrq $0x8, %rcx
addl $-0x4, 0xc(%rsp)
movq 0x20(%rsp), %rdx
testb $0xf, %cl
leaq 0x2751b(%rip), %rsi     # 0x6dd10
jne 0x46800
shrq $0x4, %rcx
addl $-0x2, 0xc(%rsp)
testb $0x3, %cl
jne 0x46809
decl 0xc(%rsp)
movl 0xc(%rsp), %ecx
subl 0xe8(%rsp), %ecx
movl %ecx, 0xc(%rsp)
addl %ecx, %edx
movzbl (%r11,%rdx), %edx
leaq 0xcc4f(%rip), %rdi      # 0x53475
movzbl (%rdx,%rdi), %edx
cmpl %r8d, %ecx
jae 0x46871
movl %ecx, 0x10(%rsp)
movl %r8d, 0xc(%rsp)
movl %edx, 0x38(%rsp)
jmp 0x46879
movl $0xffffffff, 0x38(%rsp) # imm = 0xFFFFFFFF
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq 0x48(%rsp), %r11
movq 0x30(%rsp), %r10
leaq 0x274b3(%rip), %rsi     # 0x6dd10
movq 0x18(%rsp), %r15
jmp 0x4687e
movl %r13d, 0x38(%rsp)
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x46879
movl %r13d, 0x38(%rsp)
movl %edx, %r13d
movq 0x40(%rsp), %r8
movq 0x20(%rsp), %rdi
movl %r13d, 0x20(%rsp)
cmpl $0x0, 0xf8(%rsp)
je 0x469a9
addl $0x20, %edi
movq 0xf0(%rsp), %rcx
movq 0x8(%rcx), %r13
movb $0x1, %cl
movl %ecx, 0x18(%rsp)
xorl %r8d, %r8d
movl 0xc4(%rsp), %r9d
xorl %r10d, %r10d
leal (%rdi,%r8), %ecx
movzbl (%r11,%rcx), %ecx
cmpl $0x4, %ecx
jne 0x468d3
cmpb $0x0, 0x58(%rsp)
je 0x46909
movl %r9d, %r15d
jmp 0x46915
leaq 0x20(%r8), %rdx
movl %edx, %esi
movsbl (%r13,%rsi), %esi
movb $0x1, %r11b
cmpl %ecx, %esi
je 0x46900
movl 0x2c(%rsp), %esi
incl %esi
movl %esi, 0x2c(%rsp)
cmpl $0x2, %esi
jbe 0x46937
xorl %r11d, %r11d
movl $0x0, 0x18(%rsp)
leaq 0x27409(%rip), %rsi     # 0x6dd10
jmp 0x4691b
movq 0x118(%rsp), %rcx
leal (%rcx,%r8), %r12d
movb $0x1, %r10b
xorl %r11d, %r11d
testb %r11b, %r11b
movq 0x48(%rsp), %r11
je 0x46974
incq %r8
decl %r9d
cmpq 0x130(%rsp), %r8
jb 0x468b9
jmp 0x46974
movl %ecx, %ecx
leaq 0x273d0(%rip), %rsi     # 0x6dd10
je 0x46957
movl %edx, 0x10(%rsp)
leaq 0xcb28(%rip), %rdx      # 0x53475
movzbl (%rcx,%rdx), %ecx
movl %ecx, 0x38(%rsp)
jmp 0x4691b
movl %edx, 0xc(%rsp)
leaq 0xcb13(%rip), %rdx      # 0x53475
movzbl (%rcx,%rdx), %ecx
movl %ecx, 0x20(%rsp)
movl $0x2, 0x2c(%rsp)
jmp 0x4691b
movl $0x0, %ecx
testb $0x1, %r10b
movl $0xa, %edx
cmovnel %edx, %ecx
movl 0x14(%rsp), %r9d
movq 0x40(%rsp), %r8
movq 0x30(%rsp), %r10
movl 0x18(%rsp), %edx
je 0x469ab
movl %ecx, %eax
movq 0xb0(%rsp), %r13
jmp 0x46b89
movb $0x1, %dl
testb $0x1, %dl
movq 0xb0(%rsp), %r13
je 0x46b89
cmpq $0x0, 0x190(%rsp)
je 0x46a89
movaps %xmm0, 0x70(%rsp)
movl 0x50(%rsp), %ecx
movl %ecx, %eax
cmpl 0x198(%rsp), %ecx
jae 0x469fb
orq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0x46a15
orq 0x80(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x190(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x383e8
movl $0xa, %edx
movq 0xd8(%rsp), %rcx
cmpq %rcx, %rax
jne 0x46a5f
movq 0x190(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movq %rax, 0x18(%rsp)
callq 0x38458
movq 0x18(%rsp), %rax
movq 0xd8(%rsp), %rcx
xorl %edx, %edx
cmpq %rcx, %rax
movq 0x48(%rsp), %r11
movl 0x14(%rsp), %r9d
movq 0x40(%rsp), %r8
movq 0x30(%rsp), %r10
xorps %xmm0, %xmm0
leaq 0x27290(%rip), %rsi     # 0x6dd10
je 0x46a89
movl %edx, %eax
jmp 0x46b89
movq 0x180(%rsp), %rdi
movq 0x18(%rdi), %rsi
incq %rsi
callq 0x38382
movq 0x180(%rsp), %rax
movq 0x8(%rax), %rdx
movq 0x18(%rax), %rax
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
movl 0x2c(%rsp), %ecx
movl %ecx, -0x54(%rdx,%rax)
movl %ecx, -0x50(%rdx,%rax)
testl %ecx, %ecx
je 0x46b4a
addq %rax, %rdx
movq %rdx, 0x50(%rsp)
leaq -0x48(%rdx), %rdi
movq %rdi, 0xa8(%rsp)
movq %r15, 0x18(%rsp)
movl %ecx, %r15d
leaq 0x10(%rsp), %rsi
callq 0x22e84
addq $-0x28, 0x50(%rsp)
movl 0x38(%rsp), %eax
movb %al, 0x70(%rsp)
movq 0x50(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x2b9ac
movq 0x50(%rsp), %rax
cmpl $0x1, %r15d
movq 0x18(%rsp), %r15
je 0x46b4a
movq %rax, 0x50(%rsp)
movq 0xa8(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x22e84
movl 0x20(%rsp), %eax
movb %al, 0x70(%rsp)
movq 0x50(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x2b9ac
movq 0x188(%rsp), %rdi
leaq 0xcc(%rsp), %rsi
callq 0x22e84
xorl %eax, %eax
decl 0xc8(%rsp)
sete %al
movq 0x48(%rsp), %r11
movl 0x14(%rsp), %r9d
movq 0x40(%rsp), %r8
movq 0x30(%rsp), %r10
xorps %xmm0, %xmm0
leaq 0x27187(%rip), %rsi     # 0x6dd10
movl 0x58(%rsp), %ecx
cmpl $0xa, %eax
je 0x46b96
testl %eax, %eax
jne 0x46ba1
incl %ebx
cmpl %r9d, %ebx
jbe 0x463c9
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop