// File: /workspace/github_cpp_makefile_star2_O2/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, %rdi
movl %esi, 0xac(%rsp)
movl 0x178(%rsp), %esi
movl 0x170(%rsp), %r9d
movq 0x20(%r8), %rax
pushq $0x20
popq %r10
cmpl %r10d, %eax
movl %r10d, %r14d
cmovll %eax, %r14d
subl %r14d, %r10d
leal -0x20(%rax), %ecx
xorl %r13d, %r13d
cmpl $0x21, %eax
cmovbl %r13d, %ecx
movq %rcx, 0xc0(%rsp)
subl %eax, %esi
subl %r9d, %esi
movl %esi, 0x64(%rsp)
movl %esi, %r11d
movq %r10, 0x100(%rsp)
leal (%r10,%r10), %ecx
pushq $-0x1
popq %r12
movq %r12, 0x88(%rsp)
shrq %cl, %r12
shrl %r11d
addl %r11d, %r9d
movq %r9, 0x78(%rsp)
movq %r8, 0x118(%rsp)
movq 0x8(%r8), %rsi
movl %eax, %ecx
movq %rcx, 0xd0(%rsp)
leal -0x2(%r14,%r14), %ecx
movq %rdi, 0x50(%rsp)
movq %r11, 0x70(%rsp)
leaq (%r11,%rdi), %r8
pushq $-0x1
popq %rdi
movq %r14, 0x90(%rsp)
xorl %ebp, %ebp
xorl %r9d, %r9d
movq %rdi, 0xa0(%rsp)
movq %rdi, 0x98(%rsp)
movl $0x0, 0x60(%rsp)
xorl %edi, %edi
movq $0x0, 0x80(%rsp)
xorl %ebx, %ebx
xorl %r15d, %r15d
movq %r14, %r10
subq $0x1, %r10
jb 0x3bec8
movzbl (%r8,%r9), %r11d
testb $0x4, %r11b
je 0x3be41
cmpq %r9, %rbp
cmovbeq %r9, %rbp
cmpq %r14, %r13
cmovbeq %r14, %r13
xorl %r11d, %r11d
movsbq (%rsi,%r9), %r14
cmpb $0x4, %r14b
jne 0x3bea3
cmpl $0x1, %edi
jg 0x3c694
incl %edi
cmpl $0x2, %edi
movq 0xa0(%rsp), %r14
cmovnel %r9d, %r14d
movq %r14, 0xa0(%rsp)
movq 0x98(%rsp), %r14
cmovel %r9d, %r14d
movq %r14, 0x98(%rsp)
incl 0x60(%rsp)
movq 0x80(%rsp), %r14
leaq 0x1(,%r14,4), %r14
movq %r14, 0x80(%rsp)
xorl %r14d, %r14d
jmp 0x3beac
shlq $0x2, 0x80(%rsp)
shlq $0x2, %r15
orq %r14, %r15
shlq $0x2, %rbx
movl %r11d, %r11d
orq %r11, %rbx
incq %r9
movq %r10, %r14
jmp 0x3be1b
movq 0x90(%rsp), %r8
cmpq 0xd0(%rsp), %r8
jae 0x3bef1
cmpb $0x4, (%rsi,%r8)
jne 0x3beec
cmpl $0x1, %edi
jg 0x3c694
incl %edi
incq %r8
jmp 0x3bed0
movq 0x78(%rsp), %rsi
leal 0x1(%rsi), %r8d
movq 0x70(%rsp), %rdi
leal 0x1(%rdi), %r11d
incl 0x64(%rsp)
movq 0x90(%rsp), %rsi
cmpl $0x20, %esi
leal -0x1(%rsi,%rdi), %edi
movl %ecx, %r9d
movq 0x88(%rsp), %rcx
cmovbq %r12, %rcx
movq %rcx, 0x88(%rsp)
shlq $0x20, %rdx
movl 0x198(%rsp), %ecx
movq %rdx, 0xf0(%rsp)
orq %rdx, %rcx
movq %rcx, 0xb8(%rsp)
movq 0x190(%rsp), %rcx
addq $0x8, %rcx
movq %rcx, 0xe8(%rsp)
movq 0xc0(%rsp), %rcx
movl %ecx, %edx
movq %rdx, 0xf8(%rsp)
negq %rdx
movq %rdx, 0x130(%rsp)
cltq
cmpq $0x20, %rax
pushq $0x20
popq %rdx
cmovlq %rax, %rdx
movq %rdx, 0xe0(%rsp)
leal -0x1(%rcx), %eax
movq %rax, 0xd8(%rsp)
pushq $0x1
popq %r12
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r14
movq %r9, 0x20(%rsp)
cmpl 0x64(%rsp), %r12d
ja 0x3c694
testb $0x1, %cl
je 0x3c012
movq 0x78(%rsp), %rax
incl %eax
movq %rax, 0x78(%rsp)
movq 0x70(%rsp), %rax
incl %eax
movq %rax, 0x70(%rsp)
incl %edi
movq 0x50(%rsp), %rax
movzbl (%rax,%rdi), %esi
xorl %ecx, %ecx
testb $0x4, %sil
cmovneq 0x90(%rsp), %rbp
cmovnel %ecx, %esi
shlq $0x2, %r14
orq %r14, %rsi
andq 0x88(%rsp), %rsi
testq %rbp, %rbp
je 0x3c05c
decq %rbp
xorl %ecx, %ecx
movq %rsi, %r14
jmp 0x3c68c
decl %r8d
decl %r11d
movq 0x50(%rsp), %rax
movzbl (%rax,%r11), %esi
testb $0x4, %sil
cmovneq 0xd0(%rsp), %r13
cmovnel %edx, %esi
movq %rbx, %rax
shrq $0x2, %rax
movl %r9d, %ecx
shlq %cl, %rsi
orq %rax, %rsi
cmpl $0x2, %r12d
cmovbq %rbx, %rsi
testq %r13, %r13
je 0x3c063
decq %r13
movb $0x1, %cl
movq %rsi, %rbx
jmp 0x3c68c
xorl %ebp, %ebp
movq %rsi, %r14
jmp 0x3c06b
movb $0x1, %cl
xorl %r13d, %r13d
movq %rsi, %rbx
xorq %r15, %rsi
orq 0x80(%rsp), %rsi
testl $0xfffff, %esi          # imm = 0xFFFFF
je 0x3c0a9
movabsq $0xffffff00000, %rax    # imm = 0xFFFFFF00000
addq $0x100000, %rax         # imm = 0x100000
cmpq %rax, %rsi
jb 0x3c0a9
movq %rsi, %rax
movabsq $0xffffff00000, %r10    # imm = 0xFFFFFF00000
andq %r10, %rax
jne 0x3c68c
movq %r14, 0x28(%rsp)
movq %rdi, 0x30(%rsp)
movq %rsi, %r9
shrq $0x38, %r9
testb %cl, %cl
movq 0x78(%rsp), %rax
movl %eax, %edi
cmovnel %r8d, %edi
movl %edi, 0xb4(%rsp)
movq 0x70(%rsp), %rax
cmovnel %r11d, %eax
movq %rax, 0x10(%rsp)
movzbl %sil, %r10d
leaq 0x28c39(%rip), %rdx     # 0x64d20
movzbl (%rdx,%r10), %eax
movzbl (%rdx,%r9), %r14d
addl %eax, %r14d
cmpl $0x3, %r14d
jb 0x3c110
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %r9
xorl %edx, %edx
movq 0x28(%rsp), %r14
jmp 0x3c68c
movl %r12d, 0x5c(%rsp)
movq %r10, 0x18(%rsp)
movl %edi, 0xb0(%rsp)
movq %rcx, 0xc8(%rsp)
movq %r11, 0x38(%rsp)
movl %r8d, 0x4(%rsp)
movq %rsi, %r11
shrq $0x8, %r11
movq %rsi, %rax
shrq $0x10, %rax
movq %rsi, %rcx
shrq $0x18, %rcx
movq %rsi, %r10
shrq $0x20, %r10
movq %rsi, %rdi
shrq $0x28, %rdi
movq %rsi, %r12
shrq $0x30, %r12
movq %r11, 0x68(%rsp)
movl $0xff, %r8d
andq %r8, %r11
movzbl (%rdx,%r11), %r11d
movl %r11d, (%rsp)
movq %rax, 0x128(%rsp)
movq %rax, %r11
andq %r8, %r11
movzbl (%rdx,%r11), %r11d
movq %rcx, 0x120(%rsp)
movq %rcx, %rax
andq %r8, %rax
movzbl (%rdx,%rax), %eax
addl %r11d, %eax
movq %r10, 0x110(%rsp)
movq %r10, %r11
andq %r8, %r11
movq %rdx, %rcx
movzbl (%rdx,%r11), %edx
movq %rdi, 0x108(%rsp)
movq %rdi, %r10
andq %r8, %r10
movzbl (%rcx,%r10), %r10d
addl %edx, %r10d
movq %r12, %rdx
andq %r8, %rdx
movzbl (%rcx,%rdx), %edx
addl %r10d, %edx
addl (%rsp), %r14d
addl %eax, %r14d
addl %edx, %r14d
orl $-0x1, 0xc(%rsp)
orl $-0x1, 0x8(%rsp)
cmpl $0x2, %r14d
jbe 0x3c214
movl 0x4(%rsp), %r8d
movq 0x38(%rsp), %r11
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %r9
xorl %edx, %edx
movq 0x28(%rsp), %r14
movl 0x5c(%rsp), %r12d
jmp 0x3c684
movq %r12, %rdi
movl 0x60(%rsp), %eax
cmpl $0x2, %eax
movl 0x5c(%rsp), %r12d
jb 0x3c27b
cmpl %eax, %r14d
jne 0x3c27b
movq 0xa0(%rsp), %rax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %r10
addl %r10d, %eax
movq 0x50(%rsp), %r9
movzbl (%r9,%rax), %eax
leaq 0xb271(%rip), %rcx      # 0x474c0
movb (%rax,%rcx), %al
movb %al, (%rsp)
movq 0x98(%rsp), %rax
movl %eax, 0x8(%rsp)
addl %r10d, %eax
movzbl (%r9,%rax), %eax
movb (%rax,%rcx), %cl
movl 0x4(%rsp), %r8d
movq 0x38(%rsp), %r11
jmp 0x3c448
testl %r14d, %r14d
leaq 0xb23b(%rip), %r8       # 0x474c0
je 0x3c411
pushq $0x1f
popq %rax
movl %eax, %ecx
movq %rsi, %rax
testl %esi, %esi
movq 0x128(%rsp), %r10
movq 0x120(%rsp), %rdx
jne 0x3c2cc
movq %r11, 0x18(%rsp)
pushq $0xf
popq %rax
movl %eax, %ecx
movq %r9, %rdx
movq %rdi, %r10
movq 0x108(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x110(%rsp), %rax
movq 0x68(%rsp), %rdi
movq %rax, %r11
movl %edi, %eax
shll $0x8, %eax
movzwl %ax, %eax
movq %rcx, %r9
addl $-0x8, %ecx
orq 0x18(%rsp), %rax
cmovnel %r9d, %ecx
cmovneq %rdi, %rdx
cmovneq %r11, %r10
leal -0x4(%rcx), %eax
testb %r10b, %r10b
cmovnel %ecx, %eax
cmoveq %rdx, %r10
movl %r10d, %edx
shrl $0x4, %edx
leal -0x2(%rax), %ecx
testb $0xf, %r10b
cmovnel %eax, %ecx
cmovneq %r10, %rdx
andl $0x3, %edx
cmpq $0x1, %rdx
sbbl $0x0, %ecx
movl %ecx, %edi
movq 0x100(%rsp), %r10
subl %r10d, %edi
movl %edi, 0xc(%rsp)
movq 0x10(%rsp), %rdx
leal (%rdi,%rdx), %eax
movq 0x50(%rsp), %r9
movzbl (%r9,%rax), %eax
movb (%rax,%r8), %al
cmpl $0x2, %r14d
movq 0x38(%rsp), %r11
jne 0x3c428
movb %al, 0x18(%rsp)
addl %ecx, %ecx
movabsq $-0x4000000000000000, %rax # imm = 0xC000000000000000
shrq %cl, %rax
notq %rax
andq %rax, %rsi
movq %rsi, %rax
shlq $0x20, %rax
movq %rsi, %rcx
shrq $0x20, %rcx
xorl %edx, %edx
testq %rax, %rax
setne %dl
cmovneq %rsi, %rcx
shll $0x4, %edx
leal 0xf(%rdx), %eax
movq %rcx, %rsi
shrq $0x10, %rsi
orl $0x7, %edx
testw %cx, %cx
cmovnel %eax, %edx
cmovneq %rcx, %rsi
movq %rsi, %rcx
shrq $0x8, %rcx
leal -0x4(%rdx), %r8d
testb %sil, %sil
cmovnel %edx, %r8d
cmovneq %rsi, %rcx
movl %ecx, %edx
shrl $0x4, %edx
leal -0x2(%r8), %eax
testb $0xf, %cl
cmovnel %r8d, %eax
cmovneq %rcx, %rdx
andl $0x3, %edx
cmpq $0x1, %rdx
sbbl $0x0, %eax
subl %r10d, %eax
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rcx
addl %eax, %ecx
movzbl (%r9,%rcx), %ecx
leaq 0xb0d1(%rip), %rdx      # 0x474c0
movb (%rcx,%rdx), %cl
cmpl %edi, %eax
jae 0x3c437
movl %eax, 0xc(%rsp)
movl %edi, 0x8(%rsp)
movb %cl, (%rsp)
movl 0x4(%rsp), %r8d
movq 0x10(%rsp), %r10
movb 0x18(%rsp), %cl
jmp 0x3c448
movb $-0x1, (%rsp)
movb $-0x1, %cl
movq 0x50(%rsp), %r9
movl 0x4(%rsp), %r8d
movq 0x38(%rsp), %r11
jmp 0x3c443
movb %al, (%rsp)
movb $-0x1, %cl
movl 0x4(%rsp), %r8d
movq %rdx, %r10
jmp 0x3c448
movb 0x18(%rsp), %al
movb %al, (%rsp)
movl 0x4(%rsp), %r8d
movq 0x10(%rsp), %r10
movb %cl, 0x18(%rsp)
cmpl $0x0, 0xc0(%rsp)
je 0x3c4e2
addl $0x20, %r10d
movq 0x118(%rsp), %rax
movq 0x8(%rax), %rsi
xorl %ecx, %ecx
movq 0x130(%rsp), %rax
addq %rcx, %rax
je 0x3c4d4
leal (%r10,%rcx), %eax
movzbl (%r9,%rax), %edx
cmpl $0x4, %edx
je 0x3c529
leaq 0x20(%rcx), %rax
movl %eax, %edi
movsbl (%rsi,%rdi), %edi
cmpl %edx, %edi
je 0x3c4cf
incl %r14d
cmpl $0x2, %r14d
ja 0x3c4d4
movl %edx, %edx
je 0x3c4b9
movl %eax, 0xc(%rsp)
leaq 0xb00f(%rip), %rax      # 0x474c0
movb (%rdx,%rax), %al
movb %al, (%rsp)
jmp 0x3c4cf
movl %eax, 0x8(%rsp)
leaq 0xaffc(%rip), %rax      # 0x474c0
movb (%rdx,%rax), %al
movb %al, 0x18(%rsp)
pushq $0x2
popq %r14
incq %rcx
jmp 0x3c46c
cmpq 0xf8(%rsp), %rcx
jb 0x3c673
movq 0x190(%rsp), %rdi
testq %rdi, %rdi
je 0x3c58e
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movl 0xb0(%rsp), %ecx
movl %ecx, %eax
orq 0xf0(%rsp), %rax
cmpl 0x198(%rsp), %ecx
jae 0x3c547
movq %rax, 0x40(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0x3c559
cmpb $0x0, 0xc8(%rsp)
je 0x3c669
movq 0xd8(%rsp), %r13
subl %ecx, %r13d
jmp 0x3c673
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x40(%rsp), %rsi
callq 0x2ea84
cmpq 0xe8(%rsp), %rax
je 0x3c57c
movl 0x4(%rsp), %r8d
movq 0x38(%rsp), %r11
jmp 0x3c673
movq 0x190(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x2eb18
movq 0x180(%rsp), %rdi
movq 0x18(%rdi), %rsi
incq %rsi
callq 0x2ea42
movq 0x180(%rsp), %rcx
imulq $0x60, 0x18(%rcx), %rax
movq 0x8(%rcx), %rcx
movl %r14d, -0x54(%rcx,%rax)
movl %r14d, -0x50(%rcx,%rax)
testl %r14d, %r14d
je 0x3c62b
addq %rax, %rcx
movq %rcx, 0x10(%rsp)
leaq -0x48(%rcx), %rdi
movq %rdi, 0x68(%rsp)
leaq 0xc(%rsp), %rsi
callq 0x1bf46
addq $-0x28, 0x10(%rsp)
movb (%rsp), %al
movb %al, 0x40(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x233ce
movq 0x10(%rsp), %rax
cmpl $0x1, %r14d
je 0x3c62b
movq %rax, %r14
movq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1bf46
movb 0x18(%rsp), %al
movb %al, 0x40(%rsp)
movq %r14, %rdi
leaq 0x40(%rsp), %rsi
callq 0x233ce
movq 0x188(%rsp), %rdi
leaq 0xb4(%rsp), %rsi
callq 0x1bf46
decl 0xac(%rsp)
movl 0x4(%rsp), %r8d
movq 0x38(%rsp), %r11
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %r9
movl $0x0, %edx
movq 0x28(%rsp), %r14
jne 0x3c684
jmp 0x3c694
addl 0xe0(%rsp), %ecx
movq %rcx, %rbp
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %r9
xorl %edx, %edx
movq 0x28(%rsp), %r14
movq 0xc8(%rsp), %rcx
incl %r12d
jmp 0x3bfac
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq