// File: /workspace/github_cpp_makefile_star2_O3/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 $0x148, %rsp            # imm = 0x148
movq %rcx, %r9
movq %rdx, 0xb8(%rsp)
movl %esi, 0xd8(%rsp)
movl 0x188(%rsp), %edx
movq 0x20(%r8), %rax
movl $0x20, %esi
cmpl %esi, %eax
movl $0x20, %r10d
cmovll %eax, %r10d
subl %r10d, %esi
leal -0x20(%rax), %ecx
xorl %edi, %edi
cmpl $0x21, %eax
cmovbl %edi, %ecx
movq %rcx, 0xf0(%rsp)
movl 0x180(%rsp), %ecx
addl %eax, %ecx
subl %ecx, %edx
movl %edx, 0x84(%rsp)
movl %edx, %r11d
shrl %r11d
movq %rsi, 0x138(%rsp)
leal (%rsi,%rsi), %ecx
movq $-0x1, %rdx
shrq %cl, %rdx
testl %eax, %eax
movq %r9, 0x70(%rsp)
movq %r8, 0xe8(%rsp)
movq %r10, 0x90(%rsp)
movq %r11, 0x98(%rsp)
je 0x452ee
movq 0x8(%r8), %rsi
cmpq $0x1, %r10
movq %r10, %rdi
adcq $0x0, %rdi
leaq (%r9,%r11), %r8
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rcx, 0xa8(%rsp)
xorl %ebp, %ebp
movq %r10, %r9
xorl %r11d, %r11d
movq $0x0, 0x78(%rsp)
xorl %ecx, %ecx
movq $0x0, 0xb0(%rsp)
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movq %r10, 0xa0(%rsp)
xorl %r10d, %r10d
xorl %ebx, %ebx
xorl %r14d, %r14d
movzbl (%r8,%r10), %r15d
testb $0x4, %r15b
je 0x45258
cmpq %r10, %rbx
cmovbeq %r10, %rbx
cmpq %r9, %r14
cmovbeq %r9, %r14
xorl %r15d, %r15d
movsbq (%rsi,%r10), %r12
cmpb $0x4, %r12b
jne 0x452c3
cmpl $0x1, %ecx
jg 0x45bba
incl %ecx
cmpl $0x2, %ecx
movq 0xa0(%rsp), %r12
cmovnel %r10d, %r12d
movq %r12, 0xa0(%rsp)
movq 0xa8(%rsp), %r12
cmovel %r10d, %r12d
movq %r12, 0xa8(%rsp)
movq 0xb0(%rsp), %r12
incl %r12d
movq %r12, 0xb0(%rsp)
movq 0x78(%rsp), %r12
leaq 0x1(,%r12,4), %r12
movq %r12, 0x78(%rsp)
xorl %r12d, %r12d
jmp 0x452c9
shlq $0x2, 0x78(%rsp)
shlq $0x2, %rbp
orq %r12, %rbp
shlq $0x2, %r11
movl %r15d, %r13d
orq %r11, %r13
incq %r10
decq %r9
movq %r13, %r11
cmpq %r10, %rdi
jne 0x4523c
jmp 0x45329
movq $0x0, 0xb0(%rsp)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rcx, 0xa0(%rsp)
xorl %r14d, %r14d
xorl %ebx, %ebx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rcx, 0xa8(%rsp)
xorl %ecx, %ecx
movq $0x0, 0x78(%rsp)
xorl %r13d, %r13d
xorl %ebp, %ebp
movl %eax, %r11d
cmpl 0x90(%rsp), %r11d
jbe 0x45363
movq 0xe8(%rsp), %rsi
movq 0x8(%rsi), %rsi
movq 0x90(%rsp), %rdi
cmpb $0x4, (%rsi,%rdi)
jne 0x4535b
cmpl $0x1, %ecx
jg 0x45bba
incl %ecx
incq %rdi
cmpq %rdi, %r11
jne 0x4534a
incl 0x84(%rsp)
je 0x45bba
movq 0x1a0(%rsp), %r9
movq 0x90(%rsp), %rsi
leal -0x2(,%rsi,2), %ecx
movl 0x180(%rsp), %edi
movq 0x98(%rsp), %r8
addl %r8d, %edi
leal 0x1(%r8), %r10d
movq %rdi, 0xc8(%rsp)
incl %edi
cmpl $0x20, %esi
movabsq $0xffffff00000, %r15    # imm = 0xFFFFFF00000
leal -0x1(%rsi,%r8), %esi
movl %ecx, %r8d
movq $-0x1, %r12
cmovbq %rdx, %r12
movl %edi, %edx
movq 0xb8(%rsp), %rcx
shlq $0x20, %rcx
movl 0x1a8(%rsp), %edi
movq %rcx, 0xb8(%rsp)
orq %rcx, %rdi
movq %rdi, 0xe0(%rsp)
leaq 0x8(%r9), %rcx
movq %rcx, 0x110(%rsp)
movq %r12, %r9
movq %r8, %rcx
movq %rsi, %rdi
cltq
cmpq $0x20, %rax
movl $0x20, %esi
cmovlq %rax, %rsi
movq %rsi, 0x108(%rsp)
movq 0xf0(%rsp), %rax
movl %eax, %esi
movq %rsi, 0x140(%rsp)
decl %eax
movq %rax, 0x100(%rsp)
movl $0x1, %r12d
xorl %r8d, %r8d
movq %r13, 0xc0(%rsp)
movq %r11, 0x58(%rsp)
movq %rcx, 0x40(%rsp)
movq %r9, 0x38(%rsp)
testb $0x1, %r8b
je 0x454bd
movq 0xc8(%rsp), %rax
incl %eax
movq %rax, 0xc8(%rsp)
movq 0x98(%rsp), %rax
incl %eax
movq %rax, 0x98(%rsp)
incl %edi
movq 0x70(%rsp), %rax
movzbl (%rax,%rdi), %esi
xorl %r8d, %r8d
testb $0x4, %sil
cmovneq 0x90(%rsp), %rbx
cmovnel %r8d, %esi
shlq $0x2, %r13
orq %r13, %rsi
andq %r9, %rsi
testq %rbx, %rbx
je 0x45511
decq %rbx
xorl %r8d, %r8d
movq %rsi, %r13
jmp 0x45ba9
decl %edx
decl %r10d
movq 0x70(%rsp), %rax
movzbl (%rax,%r10), %esi
testb $0x4, %sil
cmovneq %r11, %r14
movl $0x0, %eax
cmovnel %eax, %esi
movq 0xc0(%rsp), %r8
movq %r8, %rax
shrq $0x2, %rax
shlq %cl, %rsi
orq %rax, %rsi
cmpl $0x2, %r12d
cmovbq %r8, %rsi
testq %r14, %r14
je 0x45518
decq %r14
movb $0x1, %r8b
movq %rsi, 0xc0(%rsp)
jmp 0x45ba9
xorl %ebx, %ebx
movq %rsi, %r13
jmp 0x45526
movb $0x1, %r8b
xorl %r14d, %r14d
movq %rsi, 0xc0(%rsp)
xorq %rbp, %rsi
orq 0x78(%rsp), %rsi
testl $0xfffff, %esi          # imm = 0xFFFFF
je 0x4554e
leaq 0x100000(%r15), %rax
cmpq %rax, %rsi
jb 0x4554e
movq %rsi, %rax
andq %r15, %rax
jne 0x45ba9
movq %rdi, 0x50(%rsp)
movq %rsi, %r9
shrq $0x38, %r9
testb %r8b, %r8b
movq 0xc8(%rsp), %rax
movl %eax, %edi
cmovnel %edx, %edi
movl %edi, 0xdc(%rsp)
movq 0x98(%rsp), %rax
cmovnel %r10d, %eax
movq %rax, 0x10(%rsp)
movzbl %sil, %eax
leaq 0x27783(%rip), %rcx     # 0x6cd10
movq %rax, 0x30(%rsp)
movzbl (%rcx,%rax), %eax
movzbl (%rcx,%r9), %r15d
addl %eax, %r15d
cmpl $0x3, %r15d
jb 0x455c2
movabsq $0xffffff00000, %r15    # imm = 0xFFFFFF00000
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r9
jmp 0x45ba9
movq %r14, 0xf8(%rsp)
movl %edi, 0xd4(%rsp)
movq %r8, 0x18(%rsp)
movl %edx, 0xc(%rsp)
movq %r10, 0x48(%rsp)
movq %rsi, %rdi
shrq $0x8, %rdi
movq %rsi, %r11
shrq $0x10, %r11
movq %rsi, %r8
shrq $0x18, %r8
movq %rsi, %rax
shrq $0x20, %rax
movq %rsi, %r10
shrq $0x28, %r10
movq %rsi, %r14
shrq $0x30, %r14
movq %r11, 0x130(%rsp)
movl $0xff, %edx
andq %rdx, %r11
movzbl (%rcx,%r11), %r11d
movq %r8, 0x28(%rsp)
andq %rdx, %r8
movzbl (%rcx,%r8), %r8d
addl %r11d, %r8d
movq %rax, 0x128(%rsp)
movq %rax, %r11
andq %rdx, %r11
movzbl (%rcx,%r11), %eax
movq %r10, 0x120(%rsp)
andq %rdx, %r10
movzbl (%rcx,%r10), %r10d
addl %eax, %r10d
movq %r14, 0x118(%rsp)
andq %rdx, %r14
movzbl (%rcx,%r14), %eax
addl %r10d, %eax
movq %rdi, 0x88(%rsp)
andq %rdx, %rdi
movzbl (%rcx,%rdi), %r10d
addl %r10d, %r15d
addl %r8d, %r15d
addl %eax, %r15d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x24(%rsp)
movl %eax, 0x20(%rsp)
cmpl $0x2, %r15d
jbe 0x456cc
movq 0x58(%rsp), %r11
movq 0x48(%rsp), %r10
movl 0xc(%rsp), %edx
movabsq $0xffffff00000, %r15    # imm = 0xFFFFFF00000
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r9
movq 0x18(%rsp), %r8
movq 0xf8(%rsp), %r14
jmp 0x45ba9
movq 0xb0(%rsp), %rax
cmpl $0x2, %eax
movq 0x48(%rsp), %r10
movq 0xf8(%rsp), %r14
jb 0x45738
cmpl %eax, %r15d
jne 0x45738
movq 0xa0(%rsp), %rax
movl %eax, 0x24(%rsp)
movq 0x10(%rsp), %rdx
addl %edx, %eax
movq 0x70(%rsp), %rdi
movzbl (%rdi,%rax), %eax
leaq 0xce47(%rip), %rcx      # 0x52555
movb (%rax,%rcx), %al
movb %al, 0x30(%rsp)
movq 0xa8(%rsp), %rax
movl %eax, 0x20(%rsp)
addl %edx, %eax
movzbl (%rdi,%rax), %eax
movb (%rax,%rcx), %al
movb %al, 0x28(%rsp)
movq 0x18(%rsp), %r8
jmp 0x45919
testl %r15d, %r15d
movq 0x18(%rsp), %r8
je 0x458cd
movl $0x1f, %ecx
movq %rsi, %rax
testl %esi, %esi
movq 0x130(%rsp), %r10
movq 0x30(%rsp), %rdx
jne 0x4578c
movl $0xf, %ecx
movq %r11, %rdx
movq %r9, 0x28(%rsp)
movq 0x118(%rsp), %r10
movq 0x120(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x128(%rsp), %rax
movq 0x88(%rsp), %rdi
movq %rax, %r11
movl %edi, %eax
shll $0x8, %eax
movzwl %ax, %eax
movq %rcx, %r9
addl $-0x8, %ecx
orq %rdx, %rax
cmovnel %r9d, %ecx
movq 0x28(%rsp), %rdx
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 0x138(%rsp), %r10
subl %r10d, %edi
movl %edi, 0x24(%rsp)
movq 0x10(%rsp), %rax
addl %edi, %eax
movq 0x70(%rsp), %r9
movzbl (%r9,%rax), %eax
leaq 0xcd48(%rip), %rdx      # 0x52555
movb (%rax,%rdx), %al
cmpl $0x2, %r15d
jne 0x458e3
movb %al, 0x28(%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, 0x20(%rsp)
movq 0x10(%rsp), %rcx
addl %eax, %ecx
movq %r9, %rsi
movzbl (%r9,%rcx), %ecx
leaq 0xcc9d(%rip), %rdx      # 0x52555
movb (%rcx,%rdx), %cl
cmpl %edi, %eax
jae 0x458fb
movl %eax, 0x24(%rsp)
movl %edi, 0x20(%rsp)
movb %cl, 0x30(%rsp)
jmp 0x45907
movb $-0x1, 0x30(%rsp)
movb $-0x1, 0x28(%rsp)
movq 0x70(%rsp), %rdi
movq 0x10(%rsp), %rdx
jmp 0x45919
movb %al, 0x30(%rsp)
movb $-0x1, 0x28(%rsp)
movq 0x48(%rsp), %r10
movq 0x10(%rsp), %rdx
movq %r9, %rdi
jmp 0x45919
movb 0x28(%rsp), %al
movb %al, 0x30(%rsp)
movb %cl, 0x28(%rsp)
movq 0x48(%rsp), %r10
movq 0x18(%rsp), %r8
movq 0x10(%rsp), %rdx
movq %rsi, %rdi
cmpl $0x0, 0xf0(%rsp)
je 0x45a04
addl $0x20, %edx
movq 0xe8(%rsp), %rax
movq 0x8(%rax), %rsi
movb $0x1, %al
xorl %ecx, %ecx
movq %rdx, %r9
addl %ecx, %edx
movq %rdi, %r11
movzbl (%rdi,%rdx), %edi
cmpl $0x4, %edi
je 0x459b2
leaq 0x20(%rcx), %rdx
movl %edx, %r8d
movsbl (%rsi,%r8), %r8d
cmpl %edi, %r8d
je 0x45995
incl %r15d
cmpl $0x2, %r15d
ja 0x459d4
movl %edi, %eax
je 0x4597d
movl %edx, 0x24(%rsp)
leaq 0xcbe1(%rip), %rdx      # 0x52555
movb (%rax,%rdx), %al
movb %al, 0x30(%rsp)
jmp 0x45995
movl %edx, 0x20(%rsp)
leaq 0xcbcd(%rip), %rdx      # 0x52555
movb (%rax,%rdx), %al
movb %al, 0x28(%rsp)
movl $0x2, %r15d
movq 0x18(%rsp), %r8
movq %r9, %rdx
movq %r11, %rdi
incq %rcx
cmpq 0x140(%rsp), %rcx
setb %al
jne 0x4593a
jmp 0x459d9
testb %r8b, %r8b
je 0x459c4
movq 0x100(%rsp), %r14
subl %ecx, %r14d
jmp 0x459ce
addl 0x108(%rsp), %ecx
movq %rcx, %rbx
movl 0xc(%rsp), %edx
jmp 0x459e1
movq 0x18(%rsp), %r8
testb $0x1, %al
movl 0xc(%rsp), %edx
je 0x45a04
movabsq $0xffffff00000, %r15    # imm = 0xFFFFFF00000
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r9
movq 0x58(%rsp), %r11
jmp 0x45ba9
movq 0x1a0(%rsp), %rdi
testq %rdi, %rdi
je 0x45ab4
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movl 0xd4(%rsp), %ecx
movl %ecx, %eax
orq 0xb8(%rsp), %rax
cmpl 0x1a8(%rsp), %ecx
jae 0x45a4b
movq %rax, 0x60(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x68(%rsp)
jmp 0x45a5d
movq %rax, 0x68(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x60(%rsp), %rsi
callq 0x37976
cmpq 0x110(%rsp), %rax
je 0x45aa2
movq 0x58(%rsp), %r11
movq 0x48(%rsp), %r10
movl 0xc(%rsp), %edx
movabsq $0xffffff00000, %r15    # imm = 0xFFFFFF00000
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r9
movq 0x18(%rsp), %r8
jmp 0x45ba9
movq 0x1a0(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x379dc
movq 0x190(%rsp), %rdi
movq 0x18(%rdi), %rsi
incq %rsi
callq 0x37910
movq 0x190(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x18(%rax), %rax
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
movl %r15d, -0x54(%rcx,%rax)
movl %r15d, -0x50(%rcx,%rax)
testl %r15d, %r15d
je 0x45b5f
addq %rax, %rcx
movq %rcx, 0x10(%rsp)
leaq -0x48(%rcx), %rdi
movq %rdi, 0x88(%rsp)
leaq 0x24(%rsp), %rsi
callq 0x22bde
addq $-0x28, 0x10(%rsp)
movb 0x30(%rsp), %al
movb %al, 0x60(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x2b5fc
movq 0x10(%rsp), %rax
cmpl $0x1, %r15d
je 0x45b5f
movq %rax, %r15
movq 0x88(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x22bde
movb 0x28(%rsp), %al
movb %al, 0x60(%rsp)
movq %r15, %rdi
leaq 0x60(%rsp), %rsi
callq 0x2b5fc
movq 0x198(%rsp), %rdi
leaq 0xdc(%rsp), %rsi
callq 0x22bde
decl 0xd8(%rsp)
movq 0x58(%rsp), %r11
movq 0x48(%rsp), %r10
movl 0xc(%rsp), %edx
movabsq $0xffffff00000, %r15    # imm = 0xFFFFFF00000
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r9
movq 0x18(%rsp), %r8
je 0x45bba
incl %r12d
cmpl 0x84(%rsp), %r12d
jbe 0x45457
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq