// File: BenLangmead[P]bowtie/ebwt_search.cpp
// Function: driver(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, EList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 128> const&, EList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 128> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static void driver(const char * type,
                   const string& ebwtFileBase,
                   const string& query,
                   const EList<string>& queries,
                   const EList<string>& qualities,
                   const string& outfile)
{
	if(verbose || startVerbose)  {
		cerr << "Entered driver(): "; logTime(cerr, true);
	}
	// Vector of the reference sequences; used for sanity-checking
	EList<BTRefString> os;
	// Read reference sequences from the command-line or from a FASTA file
	if(!origString.empty()) {
		// Determine if it's a file by looking at whether it has a FASTA-like
		// extension
		size_t len = origString.length();
		if((len >= 6 && origString.substr(len-6) == ".fasta") ||
		   (len >= 4 && origString.substr(len-4) == ".mfa")   ||
		   (len >= 4 && origString.substr(len-4) == ".fas")   ||
		   (len >= 4 && origString.substr(len-4) == ".fna")   ||
		   (len >= 3 && origString.substr(len-3) == ".fa"))
		{
			// Read fasta file
			EList<string> origFiles;
			tokenize(origString, ",", origFiles);
			readSequenceFiles(origFiles, os);
		} else {
			// Read sequence
			readSequenceString(origString, os);
		}
	}
	// Adjust
	adjustedEbwtFileBase = adjustEbwtBase(argv0, ebwtFileBase, verbose);
	bool isBt2Index = false;
	if (gEbwt_ext == "bt2" || gEbwt_ext == "bt2l") {
		isBt2Index = true;
	}


	EList<PatternSource*> patsrcs_a;
	EList<PatternSource*> patsrcs_b;
	EList<PatternSource*> patsrcs_ab;

	// If there were any first-mates specified, we will operate in
	// stateful mode
	bool paired = mates1.size() > 0 || mates12.size() > 0;
	if(paired) stateful = true;

	// Create list of pattern sources for paired reads appearing
	// interleaved in a single file
	if(verbose || startVerbose) {
		cerr << "Creating paired-end patsrcs: "; logTime(cerr, true);
	}
	for(size_t i = 0; i < mates12.size(); i++) {
		const EList<string>* qs = &mates12;
		EList<string> tmp;
		if(fileParallel) {
			// Feed query files one to each PatternSource
			qs = &tmp;
			tmp.push_back(mates12[i]);
			assert_eq(1, tmp.size());
		}
		patsrcs_ab.push_back(patsrcFromStrings(format, *qs, NULL));
		if(!fileParallel) {
			break;
		}
	}

	// Create list of pattern sources for paired reads
	for(size_t i = 0; i < mates1.size(); i++) {
		const EList<string>* qs = &mates1;
		const EList<string>* quals = &qualities1;
		EList<string> tmpSeq;
		EList<string> tmpQual;
		if(fileParallel) {
			// Feed query files one to each PatternSource
			qs = &tmpSeq;
			tmpSeq.push_back(mates1[i]);
			quals = &tmpSeq;
			tmpQual.push_back(qualities1[i]);
			assert_eq(1, tmpSeq.size());
		}
		if(quals->empty()) quals = NULL;
		patsrcs_a.push_back(patsrcFromStrings(format, *qs, quals));
		if(!fileParallel) {
			break;
		}
	}

	// Create list of pattern sources for paired reads
	for(size_t i = 0; i < mates2.size(); i++) {
		const EList<string>* qs = &mates2;
		const EList<string>* quals = &qualities2;
		EList<string> tmpSeq;
		EList<string> tmpQual;
		if(fileParallel) {
			// Feed query files one to each PatternSource
			qs = &tmpSeq;
			tmpSeq.push_back(mates2[i]);
			quals = &tmpQual;
			tmpQual.push_back(qualities2[i]);
			assert_eq(1, tmpSeq.size());
		}
		if(quals->empty()) quals = NULL;
		patsrcs_b.push_back(patsrcFromStrings(format, *qs, quals));
		if(!fileParallel) {
			break;
		}
	}
	// All mates/mate files must be paired
	assert_eq(patsrcs_a.size(), patsrcs_b.size());

	// Create list of pattern sources for the unpaired reads
	if(verbose || startVerbose) {
		cerr << "Creating single-end patsrcs: "; logTime(cerr, true);
	}
	for(size_t i = 0; i < queries.size(); i++) {
		const EList<string>* qs = &queries;
		const EList<string>* quals = &qualities;
		PatternSource* patsrc = NULL;
		EList<string> tmpSeq;
		EList<string> tmpQual;
		if(fileParallel) {
			// Feed query files one to each PatternSource
			qs = &tmpSeq;
			tmpSeq.push_back(queries[i]);
			quals = &tmpQual;
			tmpQual.push_back(qualities[i]);
			assert_eq(1, tmpSeq.size());
		}
		if(quals->empty()) quals = NULL;
		patsrc = patsrcFromStrings(format, *qs, quals);
		assert(patsrc != NULL);
		patsrcs_a.push_back(patsrc);
		patsrcs_b.push_back(NULL);
		if(!fileParallel) {
			break;
		}
	}

	if(verbose || startVerbose) {
		cerr << "Creating PatternSource: "; logTime(cerr, true);
	}
	PatternComposer *patsrc = NULL;
	if(mates12.size() > 0) {
		patsrc = new SoloPatternComposer(patsrcs_ab);
	} else {
		patsrc = new DualPatternComposer(patsrcs_a, patsrcs_b);
	}

	// Open hit output file
	if(verbose || startVerbose) {
		cerr << "Opening hit output file: "; logTime(cerr, true);
	}
	OutFileBuf *fout;
	if(!outfile.empty()) {
		fout = new OutFileBuf(outfile.c_str(), false);
	} else {
		fout = new OutFileBuf();
	}
	// Initialize Ebwt object and read in header
	if(verbose || startVerbose) {
		cerr << "About to initialize fw Ebwt: "; logTime(cerr, true);
	}
	Ebwt ebwt(adjustedEbwtFileBase,
	                -1,     // don't care about entireReverse
	                true,     // index is for the forward direction
	                /* overriding: */ offRate,
	                /* overriding: */ isaRate,
	                useMm,    // whether to use memory-mapped files
	                useShmem, // whether to use shared memory
	                mmSweep,  // sweep memory-mapped files
	                !noRefNames, // load names?
	                verbose, // whether to be talkative
	                startVerbose, // talkative during initialization
	                false /*passMemExc*/,
	                sanityCheck,
	                isBt2Index);
	Ebwt* ebwtBw = NULL;
	// We need the mirror index if mismatches are allowed
	if(mismatches > 0 || maqLike) {
		if(verbose || startVerbose) {
			cerr << "About to initialize rev Ebwt: "; logTime(cerr, true);
		}
		ebwtBw = new Ebwt(
			adjustedEbwtFileBase + ".rev",
			-1,     // don't care about entireReverse
			false, // index is for the reverse direction
			/* overriding: */ offRate,
			/* overriding: */ isaRate,
			useMm,    // whether to use memory-mapped files
			useShmem, // whether to use shared memory
			mmSweep,  // sweep memory-mapped files
			!noRefNames, // load names?
			verbose,  // whether to be talkative
			startVerbose, // talkative during initialization
			false /*passMemExc*/,
			sanityCheck,
	        isBt2Index);
	}
	if(!os.empty()) {
		for(size_t i = 0; i < os.size(); i++) {
			size_t olen = os[i].length();
			int longestStretch = 0;
			int curStretch = 0;
			for(size_t j = 0; j < olen; j++) {
				if((int)os[i][j] < 4) {
					curStretch++;
					if(curStretch > longestStretch) longestStretch = curStretch;
				} else {
					curStretch = 0;
				}
			}
			if(longestStretch < 1) {
				os.erase(i--);
			}
		}
	}
	if(sanityCheck && !os.empty()) {
		// Sanity check number of patterns and pattern lengths in Ebwt
		// against original strings
		assert_eq(os.size(), ebwt.nPat());
		for(size_t i = 0; i < os.size(); i++) {
			assert_eq(os[i].length(), ebwt.plen()[i]);
		}
		ebwt.loadIntoMemory(-1, !noRefNames, startVerbose);
		ebwt.checkOrigs(os, false);
		ebwt.evictFromMemory();
	}
	{
		Timer _t(cerr, "Time searching: ", timing);
		if(verbose || startVerbose) {
			cerr << "Creating HitSink: "; logTime(cerr, true);
		}
		// Set up hit sink; if sanityCheck && !os.empty() is true,
		// then instruct the sink to "retain" hits in a vector in
		// memory so that we can easily sanity check them later on
		HitSink *sink;
		EList<string>* refnames = &ebwt.refnames();
		if(noRefNames) refnames = NULL;
		if(outType == OUTPUT_FULL) {
			sink = new VerboseHitSink(
					*fout, offBase,
					printCost,
					suppressOuts,
					fullRef,
					dumpAlBase,
					dumpUnalBase,
					dumpMaxBase,
					format == TAB_MATE, sampleMax,
					refnames, nthreads,
					outBatchSz, partitionSz);
		} else if(outType == OUTPUT_SAM) {
			SAMHitSink *sam = new SAMHitSink(
				*fout,
				fullRef, samNoQnameTrunc,
				dumpAlBase,
				dumpUnalBase,
				dumpMaxBase,
				format == TAB_MATE,
				sampleMax,
				refnames,
				nthreads,
				outBatchSz,
				reorder);
			if(!samNoHead) {
				EList<string> refnames;
				if(!samNoSQ) {
					readEbwtRefnames(adjustedEbwtFileBase, refnames);
				}
				sam->appendHeaders(
					sam->out(),
					ebwt.nPat(),
					refnames, samNoSQ,
					ebwt.plen(), fullRef,
					samNoQnameTrunc,
					argstr.c_str(),
					rgs.empty() ? NULL : rgs.c_str());
			}
			sink = sam;
		} else {
			cerr << "Invalid output type: " << outType << endl;
			throw 1;
		}
		if(verbose || startVerbose) {
			cerr << "Dispatching to search driver: "; logTime(cerr, true);
		}
		if(maqLike) {
			seededQualCutoffSearchFull(seedLen,
									   qualThresh,
									   seedMms,
									   *patsrc,
									   *sink,
									   ebwt,    // forward index
									   *ebwtBw, // mirror index (not optional)
									   os);     // references, if available
		}
		else if(mismatches > 0) {
			if(mismatches == 1) {
				assert(ebwtBw != NULL);
				mismatchSearchFull(*patsrc, *sink, ebwt, *ebwtBw, os);
			} else if(mismatches == 2 || mismatches == 3) {
				twoOrThreeMismatchSearchFull(*patsrc, *sink, ebwt, *ebwtBw, os, mismatches == 2);
			} else {
				cerr << "Error: " << mismatches << " is not a supported number of mismatches" << endl;
				throw 1;
			}
		} else {
			// Search without mismatches
			// Note that --fast doesn't make a difference here because
			// we're only loading half of the index anyway
			exactSearch(*patsrc, *sink, ebwt, os);
		}
		// Evict any loaded indexes from memory
		if(ebwt.isInMemory()) {
			ebwt.evictFromMemory();
		}
		if(ebwtBw != NULL) {
			delete ebwtBw;
		}
		sink->finish(hadoopOut); // end the hits section of the hit file
		for(size_t i = 0; i < patsrcs_a.size(); i++) {
			assert(patsrcs_a[i] != NULL);
			delete patsrcs_a[i];
		}
		for(size_t i = 0; i < patsrcs_b.size(); i++) {
			if(patsrcs_b[i] != NULL) {
				delete patsrcs_b[i];
			}
		}
		for(size_t i = 0; i < patsrcs_ab.size(); i++) {
			if(patsrcs_ab[i] != NULL) {
				delete patsrcs_ab[i];
			}
		}
		delete patsrc;
		delete sink;
		if(fout != NULL) delete fout;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8c8, %rsp            # imm = 0x8C8
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq %r8, -0x40(%rbp)
movq %r9, -0x48(%rbp)
testb $0x1, 0x95451(%rip)     # 0xab3a0
jne 0x15f5a
testb $0x1, 0x95430(%rip)     # 0xab388
je 0x15f7e
movq 0x9208f(%rip), %rdi     # 0xa7ff0
leaq 0x7656c(%rip), %rsi     # 0x8c4d4
callq 0xa5d0
movq 0x9207c(%rip), %rdi     # 0xa7ff0
movl $0x1, %esi
callq 0x10f50
leaq -0x68(%rbp), %rdi
callq 0x28700
leaq 0x9523a(%rip), %rdi     # 0xab1c8
callq 0xaa90
testb $0x1, %al
jne 0x1640c
leaq 0x95226(%rip), %rdi     # 0xab1c8
callq 0xa950
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movb $0x0, -0x9d(%rbp)
movb $0x0, -0xc1(%rbp)
movb $0x0, -0xe9(%rbp)
movb $0x0, -0x111(%rbp)
movb $0x0, -0x139(%rbp)
cmpq $0x6, %rax
jb 0x16029
movq -0x70(%rbp), %rdx
addq $-0x6, %rdx
leaq 0x951e1(%rip), %rsi     # 0xab1c8
leaq -0x90(%rbp), %rdi
movq $-0x1, %rcx
callq 0xa620
jmp 0x15ffc
movb $0x1, -0x9d(%rbp)
leaq -0x90(%rbp), %rdi
leaq 0x764d6(%rip), %rsi     # 0x8c4e7
callq 0x28440
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x601(%rbp)
jne 0x1618c
cmpq $0x4, -0x70(%rbp)
jb 0x16081
movq -0x70(%rbp), %rdx
addq $-0x4, %rdx
leaq 0x95189(%rip), %rsi     # 0xab1c8
leaq -0xc0(%rbp), %rdi
movq $-0x1, %rcx
callq 0xa620
jmp 0x16054
movb $0x1, -0xc1(%rbp)
leaq -0xc0(%rbp), %rdi
leaq 0x752cf(%rip), %rsi     # 0x8b338
callq 0x28440
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x601(%rbp)
jne 0x1618c
cmpq $0x4, -0x70(%rbp)
jb 0x160d9
movq -0x70(%rbp), %rdx
addq $-0x4, %rdx
leaq 0x95131(%rip), %rsi     # 0xab1c8
leaq -0xe8(%rbp), %rdi
movq $-0x1, %rcx
callq 0xa620
jmp 0x160ac
movb $0x1, -0xe9(%rbp)
leaq -0xe8(%rbp), %rdi
leaq 0x7642d(%rip), %rsi     # 0x8c4ee
callq 0x28440
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x601(%rbp)
jne 0x1618c
cmpq $0x4, -0x70(%rbp)
jb 0x1612d
movq -0x70(%rbp), %rdx
addq $-0x4, %rdx
leaq 0x950d9(%rip), %rsi     # 0xab1c8
leaq -0x110(%rbp), %rdi
movq $-0x1, %rcx
callq 0xa620
jmp 0x16104
movb $0x1, -0x111(%rbp)
leaq -0x110(%rbp), %rdi
leaq 0x763da(%rip), %rsi     # 0x8c4f3
callq 0x28440
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x601(%rbp)
jne 0x1618c
xorl %eax, %eax
cmpq $0x3, -0x70(%rbp)
movb %al, -0x602(%rbp)
jb 0x16180
movq -0x70(%rbp), %rdx
addq $-0x3, %rdx
leaq 0x9507d(%rip), %rsi     # 0xab1c8
leaq -0x138(%rbp), %rdi
movq $-0x1, %rcx
callq 0xa620
jmp 0x16160
movb $0x1, -0x139(%rbp)
leaq -0x138(%rbp), %rdi
leaq 0x76383(%rip), %rsi     # 0x8c4f8
callq 0x28440
movb %al, -0x602(%rbp)
movb -0x602(%rbp), %al
movb %al, -0x601(%rbp)
movb -0x601(%rbp), %al
movb %al, -0x603(%rbp)
testb $0x1, -0x139(%rbp)
jne 0x161a3
jmp 0x161af
leaq -0x138(%rbp), %rdi
callq 0xacd8
testb $0x1, -0x111(%rbp)
jne 0x161ba
jmp 0x161c6
leaq -0x110(%rbp), %rdi
callq 0xacd8
testb $0x1, -0xe9(%rbp)
jne 0x161d1
jmp 0x161dd
leaq -0xe8(%rbp), %rdi
callq 0xacd8
testb $0x1, -0xc1(%rbp)
jne 0x161e8
jmp 0x161f4
leaq -0xc0(%rbp), %rdi
callq 0xacd8
testb $0x1, -0x9d(%rbp)
jne 0x161ff
jmp 0x1620b
leaq -0x90(%rbp), %rdi
callq 0xacd8
movb -0x603(%rbp), %al
testb $0x1, %al
jne 0x1621a
jmp 0x163ef
leaq -0x160(%rbp), %rdi
callq 0x27220
jmp 0x16228
leaq -0x181(%rbp), %rdi
movq %rdi, -0x610(%rbp)
callq 0xab70
movq -0x610(%rbp), %rdx
leaq 0x774f2(%rip), %rsi     # 0x8d73b
leaq -0x180(%rbp), %rdi
callq 0x24c10
jmp 0x16257
callq 0x27450
movq %rax, %rcx
leaq 0x94f62(%rip), %rdi     # 0xab1c8
leaq -0x180(%rbp), %rsi
leaq -0x160(%rbp), %rdx
callq 0x15dd0
jmp 0x1627b
leaq -0x180(%rbp), %rdi
callq 0xacd8
leaq -0x181(%rbp), %rdi
callq 0xa670
leaq -0x160(%rbp), %rdi
leaq -0x68(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x18540
jmp 0x162ac
leaq -0x160(%rbp), %rdi
callq 0x27260
jmp 0x1640a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x18044
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x16370
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x16357
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x1633e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
testb $0x1, -0x111(%rbp)
jne 0x16330
jmp 0x1633c
leaq -0x110(%rbp), %rdi
callq 0xacd8
jmp 0x1633e
testb $0x1, -0xe9(%rbp)
jne 0x16349
jmp 0x16355
leaq -0xe8(%rbp), %rdi
callq 0xacd8
jmp 0x16357
testb $0x1, -0xc1(%rbp)
jne 0x16362
jmp 0x1636e
leaq -0xc0(%rbp), %rdi
callq 0xacd8
jmp 0x16370
testb $0x1, -0x9d(%rbp)
jne 0x1637b
jmp 0x16387
leaq -0x90(%rbp), %rdi
callq 0xacd8
jmp 0x18044
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x163be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0xacd8
leaq -0x181(%rbp), %rdi
callq 0xa670
jmp 0x163de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x27260
jmp 0x18044
leaq 0x94dd2(%rip), %rdi     # 0xab1c8
leaq -0x68(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x28740
jmp 0x16408
jmp 0x1640a
jmp 0x1640c
movq 0x94f7d(%rip), %rax     # 0xab390
movq %rax, -0x620(%rbp)
leaq -0x1c9(%rbp), %rdi
movq %rdi, -0x618(%rbp)
callq 0xab70
movq -0x620(%rbp), %rsi
movq -0x618(%rbp), %rdx
leaq -0x1c8(%rbp), %rdi
callq 0x24c10
jmp 0x16449
movq -0x28(%rbp), %rdx
movzbl 0x94f4c(%rip), %ecx     # 0xab3a0
andl $0x1, %ecx
leaq -0x1a8(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x7cd70
jmp 0x1646c
leaq 0x94d2d(%rip), %rdi     # 0xab1a0
leaq -0x1a8(%rbp), %rsi
callq 0xa760
leaq -0x1a8(%rbp), %rdi
callq 0xacd8
leaq -0x1c8(%rbp), %rdi
callq 0xacd8
leaq -0x1c9(%rbp), %rdi
callq 0xa670
movb $0x0, -0x1ca(%rbp)
leaq 0x950ff(%rip), %rdi     # 0xab5b0
leaq 0x76044(%rip), %rsi     # 0x8c4fc
callq 0x28440
testb $0x1, %al
jne 0x164da
leaq 0x950e8(%rip), %rdi     # 0xab5b0
leaq 0x76031(%rip), %rsi     # 0x8c500
callq 0x28440
testb $0x1, %al
jne 0x164da
jmp 0x16526
movb $0x1, -0x1ca(%rbp)
jmp 0x16526
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x16515
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0xacd8
leaq -0x1c9(%rbp), %rdi
callq 0xa670
jmp 0x18044
leaq -0x1f0(%rbp), %rdi
callq 0x28790
jmp 0x16534
leaq -0x210(%rbp), %rdi
callq 0x28790
jmp 0x16542
leaq -0x230(%rbp), %rdi
callq 0x28790
jmp 0x16550
leaq 0x94be9(%rip), %rdi     # 0xab140
callq 0x26400
movq %rax, -0x628(%rbp)
jmp 0x16565
movq -0x628(%rbp), %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0x629(%rbp)
ja 0x165a3
leaq 0x94bff(%rip), %rdi     # 0xab180
callq 0x26400
movq %rax, -0x638(%rbp)
jmp 0x1658f
movq -0x638(%rbp), %rax
cmpq $0x0, %rax
seta %al
movb %al, -0x629(%rbp)
movb -0x629(%rbp), %al
andb $0x1, %al
movb %al, -0x231(%rbp)
testb $0x1, -0x231(%rbp)
je 0x16608
movb $0x1, 0x94e6c(%rip)     # 0xab42d
jmp 0x16608
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x18038
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x1802c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x18020
testb $0x1, 0x94d91(%rip)     # 0xab3a0
jne 0x1661a
testb $0x1, 0x94d70(%rip)     # 0xab388
je 0x16644
movq 0x919cf(%rip), %rdi     # 0xa7ff0
leaq 0x75edd(%rip), %rsi     # 0x8c505
callq 0xa5d0
jmp 0x1662f
movq 0x919ba(%rip), %rdi     # 0xa7ff0
movl $0x1, %esi
callq 0x10f50
jmp 0x16642
jmp 0x16644
movq $0x0, -0x240(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x648(%rbp)
leaq 0x94b1c(%rip), %rdi     # 0xab180
callq 0x26400
movq %rax, -0x640(%rbp)
jmp 0x16672
movq -0x648(%rbp), %rax
movq -0x640(%rbp), %rcx
cmpq %rcx, %rax
jae 0x167a6
leaq 0x94af0(%rip), %rax     # 0xab180
movq %rax, -0x248(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x27220
jmp 0x166a5
testb $0x1, 0x94d7d(%rip)     # 0xab429
je 0x16712
leaq -0x268(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0x240(%rbp), %rsi
leaq 0x94ab6(%rip), %rdi     # 0xab180
callq 0x27460
movq %rax, -0x650(%rbp)
jmp 0x166d8
movq -0x650(%rbp), %rsi
leaq -0x268(%rbp), %rdi
callq 0x26380
jmp 0x166ed
jmp 0x16712
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x27260
jmp 0x18020
movl 0x94c8c(%rip), %edi     # 0xab3a4
movq -0x248(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x18590
movq %rax, -0x658(%rbp)
jmp 0x16731
movq -0x658(%rbp), %rax
movq %rax, -0x270(%rbp)
leaq -0x230(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x287d0
jmp 0x16754
testb $0x1, 0x94cce(%rip)     # 0xab429
jne 0x16769
movl $0x2, -0x274(%rbp)
jmp 0x16773
movl $0x0, -0x274(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x27260
movl -0x274(%rbp), %eax
testl %eax, %eax
je 0x1678d
jmp 0x1678b
jmp 0x167a6
jmp 0x1678f
movq -0x240(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x240(%rbp)
jmp 0x1664f
movq $0x0, -0x280(%rbp)
movq -0x280(%rbp), %rax
movq %rax, -0x668(%rbp)
leaq 0x9497a(%rip), %rdi     # 0xab140
callq 0x26400
movq %rax, -0x660(%rbp)
jmp 0x167d4
movq -0x668(%rbp), %rax
movq -0x660(%rbp), %rcx
cmpq %rcx, %rax
jae 0x169c9
leaq 0x9494e(%rip), %rax     # 0xab140
movq %rax, -0x288(%rbp)
leaq 0x94ad0(%rip), %rax     # 0xab2d0
movq %rax, -0x290(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0x27220
jmp 0x16815
leaq -0x2d0(%rbp), %rdi
callq 0x27220
jmp 0x16823
testb $0x1, 0x94bff(%rip)     # 0xab429
je 0x168ea
leaq -0x2b0(%rbp), %rax
movq %rax, -0x288(%rbp)
movq -0x280(%rbp), %rsi
leaq 0x948f4(%rip), %rdi     # 0xab140
callq 0x27460
movq %rax, -0x670(%rbp)
jmp 0x1685a
movq -0x670(%rbp), %rsi
leaq -0x2b0(%rbp), %rdi
callq 0x26380
jmp 0x1686f
leaq -0x2b0(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x280(%rbp), %rsi
leaq 0x94a45(%rip), %rdi     # 0xab2d0
callq 0x27460
movq %rax, -0x678(%rbp)
jmp 0x16899
movq -0x678(%rbp), %rsi
leaq -0x2d0(%rbp), %rdi
callq 0x26380
jmp 0x168ae
jmp 0x168ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x169b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x27260
jmp 0x169b8
movq -0x290(%rbp), %rdi
callq 0x28840
movb %al, -0x679(%rbp)
jmp 0x168fe
movb -0x679(%rbp), %al
testb $0x1, %al
jne 0x1690a
jmp 0x16915
movq $0x0, -0x290(%rbp)
movl 0x94a89(%rip), %edi     # 0xab3a4
movq -0x288(%rbp), %rsi
movq -0x290(%rbp), %rdx
callq 0x18590
movq %rax, -0x688(%rbp)
jmp 0x16937
movq -0x688(%rbp), %rax
movq %rax, -0x2d8(%rbp)
leaq -0x1f0(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x287d0
jmp 0x1695a
testb $0x1, 0x94ac8(%rip)     # 0xab429
jne 0x1696f
movl $0x5, -0x274(%rbp)
jmp 0x16979
movl $0x0, -0x274(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x27260
leaq -0x2b0(%rbp), %rdi
callq 0x27260
movl -0x274(%rbp), %eax
testl %eax, %eax
je 0x1699f
jmp 0x1699d
jmp 0x169c9
jmp 0x169a1
movq -0x280(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x280(%rbp)
jmp 0x167b1
leaq -0x2b0(%rbp), %rdi
callq 0x27260
jmp 0x18020
movq $0x0, -0x2e0(%rbp)
movq -0x2e0(%rbp), %rax
movq %rax, -0x698(%rbp)
leaq 0x94777(%rip), %rdi     # 0xab160
callq 0x26400
movq %rax, -0x690(%rbp)
jmp 0x169f7
movq -0x698(%rbp), %rax
movq -0x690(%rbp), %rcx
cmpq %rcx, %rax
jae 0x16bec
leaq 0x9474b(%rip), %rax     # 0xab160
movq %rax, -0x2e8(%rbp)
leaq 0x948cd(%rip), %rax     # 0xab2f0
movq %rax, -0x2f0(%rbp)
leaq -0x310(%rbp), %rdi
callq 0x27220
jmp 0x16a38
leaq -0x330(%rbp), %rdi
callq 0x27220
jmp 0x16a46
testb $0x1, 0x949dc(%rip)     # 0xab429
je 0x16b0d
leaq -0x310(%rbp), %rax
movq %rax, -0x2e8(%rbp)
movq -0x2e0(%rbp), %rsi
leaq 0x946f1(%rip), %rdi     # 0xab160
callq 0x27460
movq %rax, -0x6a0(%rbp)
jmp 0x16a7d
movq -0x6a0(%rbp), %rsi
leaq -0x310(%rbp), %rdi
callq 0x26380
jmp 0x16a92
leaq -0x330(%rbp), %rax
movq %rax, -0x2f0(%rbp)
movq -0x2e0(%rbp), %rsi
leaq 0x94842(%rip), %rdi     # 0xab2f0
callq 0x27460
movq %rax, -0x6a8(%rbp)
jmp 0x16abc
movq -0x6a8(%rbp), %rsi
leaq -0x330(%rbp), %rdi
callq 0x26380
jmp 0x16ad1
jmp 0x16b0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x16bdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x330(%rbp), %rdi
callq 0x27260
jmp 0x16bdb
movq -0x2f0(%rbp), %rdi
callq 0x28840
movb %al, -0x6a9(%rbp)
jmp 0x16b21
movb -0x6a9(%rbp), %al
testb $0x1, %al
jne 0x16b2d
jmp 0x16b38
movq $0x0, -0x2f0(%rbp)
movl 0x94866(%rip), %edi     # 0xab3a4
movq -0x2e8(%rbp), %rsi
movq -0x2f0(%rbp), %rdx
callq 0x18590
movq %rax, -0x6b8(%rbp)
jmp 0x16b5a
movq -0x6b8(%rbp), %rax
movq %rax, -0x338(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0x287d0
jmp 0x16b7d
testb $0x1, 0x948a5(%rip)     # 0xab429
jne 0x16b92
movl $0x8, -0x274(%rbp)
jmp 0x16b9c
movl $0x0, -0x274(%rbp)
leaq -0x330(%rbp), %rdi
callq 0x27260
leaq -0x310(%rbp), %rdi
callq 0x27260
movl -0x274(%rbp), %eax
testl %eax, %eax
je 0x16bc2
jmp 0x16bc0
jmp 0x16bec
jmp 0x16bc4
movq -0x2e0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x2e0(%rbp)
jmp 0x169d4
leaq -0x310(%rbp), %rdi
callq 0x27260
jmp 0x18020
testb $0x1, 0x947ad(%rip)     # 0xab3a0
jne 0x16bfe
testb $0x1, 0x9478c(%rip)     # 0xab388
je 0x16c28
movq 0x913eb(%rip), %rdi     # 0xa7ff0
leaq 0x75917(%rip), %rsi     # 0x8c523
callq 0xa5d0
jmp 0x16c13
movq 0x913d6(%rip), %rdi     # 0xa7ff0
movl $0x1, %esi
callq 0x10f50
jmp 0x16c26
jmp 0x16c28
movq $0x0, -0x340(%rbp)
movq -0x340(%rbp), %rax
movq %rax, -0x6c8(%rbp)
movq -0x38(%rbp), %rdi
callq 0x26400
movq %rax, -0x6c0(%rbp)
jmp 0x16c53
movq -0x6c8(%rbp), %rax
movq -0x6c0(%rbp), %rcx
cmpq %rcx, %rax
jae 0x16e67
movq -0x38(%rbp), %rax
movq %rax, -0x348(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x350(%rbp)
movq $0x0, -0x358(%rbp)
leaq -0x378(%rbp), %rdi
callq 0x27220
jmp 0x16c99
leaq -0x398(%rbp), %rdi
callq 0x27220
jmp 0x16ca7
testb $0x1, 0x9477b(%rip)     # 0xab429
je 0x16d68
leaq -0x378(%rbp), %rax
movq %rax, -0x348(%rbp)
movq -0x38(%rbp), %rdi
movq -0x340(%rbp), %rsi
callq 0x28860
movq %rax, -0x6d0(%rbp)
jmp 0x16cdb
movq -0x6d0(%rbp), %rsi
leaq -0x378(%rbp), %rdi
callq 0x26380
jmp 0x16cf0
leaq -0x398(%rbp), %rax
movq %rax, -0x350(%rbp)
movq -0x40(%rbp), %rdi
movq -0x340(%rbp), %rsi
callq 0x28860
movq %rax, -0x6d8(%rbp)
jmp 0x16d17
movq -0x6d8(%rbp), %rsi
leaq -0x398(%rbp), %rdi
callq 0x26380
jmp 0x16d2c
jmp 0x16d68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x16e56
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x27260
jmp 0x16e56
movq -0x350(%rbp), %rdi
callq 0x28840
movb %al, -0x6d9(%rbp)
jmp 0x16d7c
movb -0x6d9(%rbp), %al
testb $0x1, %al
jne 0x16d88
jmp 0x16d93
movq $0x0, -0x350(%rbp)
movl 0x9460b(%rip), %edi     # 0xab3a4
movq -0x348(%rbp), %rsi
movq -0x350(%rbp), %rdx
callq 0x18590
movq %rax, -0x6e8(%rbp)
jmp 0x16db5
movq -0x6e8(%rbp), %rax
movq %rax, -0x358(%rbp)
leaq -0x1f0(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0x287d0
jmp 0x16dd8
movq $0x0, -0x3a0(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x287d0
jmp 0x16df8
testb $0x1, 0x9462a(%rip)     # 0xab429
jne 0x16e0d
movl $0xb, -0x274(%rbp)
jmp 0x16e17
movl $0x0, -0x274(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x27260
leaq -0x378(%rbp), %rdi
callq 0x27260
movl -0x274(%rbp), %eax
testl %eax, %eax
je 0x16e3d
jmp 0x16e3b
jmp 0x16e67
jmp 0x16e3f
movq -0x340(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x340(%rbp)
jmp 0x16c33
leaq -0x378(%rbp), %rdi
callq 0x27260
jmp 0x18020
testb $0x1, 0x94532(%rip)     # 0xab3a0
jne 0x16e79
testb $0x1, 0x94511(%rip)     # 0xab388
je 0x16ea3
movq 0x91170(%rip), %rdi     # 0xa7ff0
leaq 0x756ba(%rip), %rsi     # 0x8c541
callq 0xa5d0
jmp 0x16e8e
movq 0x9115b(%rip), %rdi     # 0xa7ff0
movl $0x1, %esi
callq 0x10f50
jmp 0x16ea1
jmp 0x16ea3
movq $0x0, -0x3a8(%rbp)
leaq 0x942cb(%rip), %rdi     # 0xab180
callq 0x26400
movq %rax, -0x6f0(%rbp)
jmp 0x16ec3
movq -0x6f0(%rbp), %rax
cmpq $0x0, %rax
jbe 0x16f33
movl $0x30, %edi
callq 0xa5f0
movq %rax, -0x6f8(%rbp)
jmp 0x16ee3
movq -0x6f8(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x28890
jmp 0x16ef8
movq -0x6f8(%rbp), %rax
movq %rax, -0x3a8(%rbp)
jmp 0x16f9a
movq -0x6f8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
movl $0x30, %esi
callq 0xa600
jmp 0x18020
movl $0x50, %edi
callq 0xa5f0
movq %rax, -0x700(%rbp)
jmp 0x16f46
movq -0x700(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
leaq -0x210(%rbp), %rdx
callq 0x28960
jmp 0x16f62
movq -0x700(%rbp), %rax
movq %rax, -0x3a8(%rbp)
jmp 0x16f9a
movq -0x700(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
movl $0x50, %esi
callq 0xa600
jmp 0x18020
testb $0x1, 0x943ff(%rip)     # 0xab3a0
jne 0x16fac
testb $0x1, 0x943de(%rip)     # 0xab388
je 0x16fd6
movq 0x9103d(%rip), %rdi     # 0xa7ff0
leaq 0x755a0(%rip), %rsi     # 0x8c55a
callq 0xa5d0
jmp 0x16fc1
movq 0x91028(%rip), %rdi     # 0xa7ff0
movl $0x1, %esi
callq 0x10f50
jmp 0x16fd4
jmp 0x16fd6
movq -0x48(%rbp), %rdi
callq 0xaa90
testb $0x1, %al
jne 0x1704d
movl $0x4020, %edi           # imm = 0x4020
callq 0xa5f0
movq %rax, -0x708(%rbp)
jmp 0x16ff6
movq -0x48(%rbp), %rdi
callq 0xa210
movq -0x708(%rbp), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x28aa0
jmp 0x17012
movq -0x708(%rbp), %rax
movq %rax, -0x3b0(%rbp)
jmp 0x170a6
movq -0x708(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
movl $0x4020, %esi           # imm = 0x4020
callq 0xa600
jmp 0x18020
movl $0x4020, %edi           # imm = 0x4020
callq 0xa5f0
movq %rax, -0x710(%rbp)
jmp 0x17060
movq -0x710(%rbp), %rdi
callq 0x28b60
jmp 0x1706e
movq -0x710(%rbp), %rax
movq %rax, -0x3b0(%rbp)
jmp 0x170a6
movq -0x710(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
movl $0x4020, %esi           # imm = 0x4020
callq 0xa600
jmp 0x18020
testb $0x1, 0x942f3(%rip)     # 0xab3a0
jne 0x170b8
testb $0x1, 0x942d2(%rip)     # 0xab388
je 0x170e2
movq 0x90f31(%rip), %rdi     # 0xa7ff0
leaq 0x754ae(%rip), %rsi     # 0x8c574
callq 0xa5d0
jmp 0x170cd
movq 0x90f1c(%rip), %rdi     # 0xa7ff0
movl $0x1, %esi
callq 0x10f50
jmp 0x170e0
jmp 0x170e2
movl 0x942df(%rip), %r8d     # 0xab3c8
movl 0x942dc(%rip), %r9d     # 0xab3cc
movb 0x9430d(%rip), %dil     # 0xab404
notb %dil
movl 0x942a8(%rip), %eax     # 0xab3a8
testl %eax, %eax
setne %bl
movzbl 0x9431f(%rip), %ecx     # 0xab42b
movzbl 0x94317(%rip), %edx     # 0xab42a
movzbl 0x94312(%rip), %esi     # 0xab42c
movzbl 0x9427e(%rip), %r10d    # 0xab3a0
movzbl 0x9425e(%rip), %r11d    # 0xab388
movzbl -0x1ca(%rbp), %r14d
andl $0x1, %r14d
movq %rsp, %rax
movq %rax, -0x718(%rbp)
movl %r14d, 0x40(%rax)
movzbl %bl, %ebx
movl %ebx, 0x38(%rax)
andl $0x1, %r11d
movl %r11d, 0x28(%rax)
andl $0x1, %r10d
movl %r10d, 0x20(%rax)
movzbl %dil, %edi
andl $0x1, %edi
movl %edi, 0x18(%rax)
andl $0x1, %esi
movl %esi, 0x10(%rax)
andl $0x1, %edx
movl %edx, 0x8(%rax)
andl $0x1, %ecx
movl %ecx, (%rax)
movl $0x0, 0x30(%rax)
leaq 0x9401d(%rip), %rsi     # 0xab1a0
leaq -0x538(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0x28ba0
jmp 0x1719b
movq $0x0, -0x540(%rbp)
cmpl $0x0, 0x94223(%rip)     # 0xab3d0
jg 0x171bc
cmpl $0x0, 0x94222(%rip)     # 0xab3d8
je 0x17373
testb $0x1, 0x941dd(%rip)     # 0xab3a0
jne 0x171ce
testb $0x1, 0x941bc(%rip)     # 0xab388
je 0x1720f
movq 0x90e1b(%rip), %rdi     # 0xa7ff0
leaq 0x753b6(%rip), %rsi     # 0x8c592
callq 0xa5d0
jmp 0x171e3
movq 0x90e06(%rip), %rdi     # 0xa7ff0
movl $0x1, %esi
callq 0x10f50
jmp 0x171f6
jmp 0x1720f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x18014
movl $0x188, %edi            # imm = 0x188
callq 0xa5f0
movq %rax, -0x720(%rbp)
jmp 0x17222
movb $0x1, -0x561(%rbp)
leaq 0x93f70(%rip), %rsi     # 0xab1a0
leaq 0x7537a(%rip), %rdx     # 0x8c5b1
leaq -0x560(%rbp), %rdi
callq 0x26290
jmp 0x17245
movq -0x720(%rbp), %rdi
movl 0x94175(%rip), %r8d     # 0xab3c8
movl 0x94172(%rip), %r9d     # 0xab3cc
movb 0x941a3(%rip), %r10b    # 0xab404
notb %r10b
movl 0x9413e(%rip), %eax     # 0xab3a8
testl %eax, %eax
setne %r14b
movzbl 0x941b4(%rip), %ecx     # 0xab42b
movzbl 0x941ac(%rip), %edx     # 0xab42a
movzbl 0x941a7(%rip), %esi     # 0xab42c
movzbl 0x94113(%rip), %r11d    # 0xab3a0
movzbl 0x940f4(%rip), %ebx     # 0xab388
movzbl -0x1ca(%rbp), %r15d
andl $0x1, %r15d
movq %rsp, %rax
movq %rax, -0x728(%rbp)
movl %r15d, 0x40(%rax)
movzbl %r14b, %r14d
movl %r14d, 0x38(%rax)
andl $0x1, %ebx
movl %ebx, 0x28(%rax)
andl $0x1, %r11d
movl %r11d, 0x20(%rax)
movzbl %r10b, %r10d
andl $0x1, %r10d
movl %r10d, 0x18(%rax)
andl $0x1, %esi
movl %esi, 0x10(%rax)
andl $0x1, %edx
movl %edx, 0x8(%rax)
andl $0x1, %ecx
movl %ecx, (%rax)
movl $0x0, 0x30(%rax)
leaq -0x560(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x28ba0
jmp 0x172fd
movq -0x720(%rbp), %rax
movb $0x0, -0x561(%rbp)
movq %rax, -0x540(%rbp)
leaq -0x560(%rbp), %rdi
callq 0xacd8
jmp 0x17373
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x17352
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x560(%rbp), %rdi
callq 0xacd8
testb $0x1, -0x561(%rbp)
jne 0x1735d
jmp 0x1736e
movq -0x720(%rbp), %rdi
movl $0x188, %esi            # imm = 0x188
callq 0xa600
jmp 0x18014
leaq -0x68(%rbp), %rdi
callq 0x29010
movb %al, -0x729(%rbp)
jmp 0x17384
movb -0x729(%rbp), %al
testb $0x1, %al
jne 0x1751c
jmp 0x17394
movq $0x0, -0x570(%rbp)
movq -0x570(%rbp), %rax
movq %rax, -0x740(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x250e0
movq %rax, -0x738(%rbp)
jmp 0x173bf
movq -0x740(%rbp), %rax
movq -0x738(%rbp), %rcx
cmpq %rcx, %rax
jae 0x1751a
movq -0x570(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x29030
movq %rax, -0x748(%rbp)
jmp 0x173ef
movq -0x748(%rbp), %rdi
callq 0x25130
movq %rax, -0x750(%rbp)
jmp 0x17404
movq -0x750(%rbp), %rax
movq %rax, -0x578(%rbp)
movl $0x0, -0x57c(%rbp)
movl $0x0, -0x580(%rbp)
movq $0x0, -0x588(%rbp)
movq -0x588(%rbp), %rax
cmpq -0x578(%rbp), %rax
jae 0x174d7
movq -0x570(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x29030
movq %rax, -0x758(%rbp)
jmp 0x1745e
movq -0x758(%rbp), %rdi
movq -0x588(%rbp), %rsi
callq 0x24f60
movq %rax, -0x760(%rbp)
jmp 0x1747a
movq -0x760(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4, %eax
jge 0x174b4
movl -0x580(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x580(%rbp)
movl -0x580(%rbp), %eax
cmpl -0x57c(%rbp), %eax
jle 0x174b2
movl -0x580(%rbp), %eax
movl %eax, -0x57c(%rbp)
jmp 0x174be
movl $0x0, -0x580(%rbp)
jmp 0x174c0
movq -0x588(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x588(%rbp)
jmp 0x17431
cmpl $0x1, -0x57c(%rbp)
jge 0x17501
movq -0x570(%rbp), %rsi
movq %rsi, %rax
decq %rax
movq %rax, -0x570(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x29060
jmp 0x174ff
jmp 0x17501
jmp 0x17503
movq -0x570(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x570(%rbp)
jmp 0x1739f
jmp 0x1751c
cmpl $0x0, 0x93e85(%rip)     # 0xab3a8
je 0x175ed
leaq -0x68(%rbp), %rdi
callq 0x29010
movb %al, -0x761(%rbp)
jmp 0x1753a
movb -0x761(%rbp), %al
testb $0x1, %al
jne 0x175ed
jmp 0x1754a
movq $0x0, -0x590(%rbp)
movq -0x590(%rbp), %rax
movq %rax, -0x778(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x250e0
movq %rax, -0x770(%rbp)
jmp 0x17575
movq -0x778(%rbp), %rax
movq -0x770(%rbp), %rcx
cmpq %rcx, %rax
jae 0x1759e
jmp 0x1758a
movq -0x590(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x590(%rbp)
jmp 0x17555
movb 0x93e60(%rip), %al      # 0xab404
notb %al
movzbl 0x93ddb(%rip), %ecx     # 0xab388
andl $0x1, %ecx
movzbl %al, %edx
andl $0x1, %edx
leaq -0x538(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x290f0
jmp 0x175c9
leaq -0x538(%rbp), %rdi
leaq -0x68(%rbp), %rsi
xorl %edx, %edx
callq 0xdc40
jmp 0x175dd
leaq -0x538(%rbp), %rdi
callq 0x29140
jmp 0x175eb
jmp 0x175ed
movl 0x93da9(%rip), %eax     # 0xab39c
testl %eax, %eax
setne %al
movzbl %al, %ecx
movq 0x909ee(%rip), %rsi     # 0xa7ff0
leaq 0x74fad(%rip), %rdx     # 0x8c5b6
leaq -0x5b0(%rbp), %rdi
callq 0x273f0
jmp 0x17617
testb $0x1, 0x93d82(%rip)     # 0xab3a0
jne 0x17629
testb $0x1, 0x93d61(%rip)     # 0xab388
je 0x1766a
movq 0x909c0(%rip), %rdi     # 0xa7ff0
leaq 0x74f90(%rip), %rsi     # 0x8c5c7
callq 0xa5d0
jmp 0x1763e
movq 0x909ab(%rip), %rdi     # 0xa7ff0
movl $0x1, %esi
callq 0x10f50
jmp 0x17651
jmp 0x1766a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x18008
leaq -0x538(%rbp), %rdi
callq 0x292c0
movq %rax, -0x780(%rbp)
jmp 0x1767f
movq -0x780(%rbp), %rax
movq %rax, -0x5c0(%rbp)
testb $0x1, 0x93d70(%rip)     # 0xab404
je 0x176a1
movq $0x0, -0x5c0(%rbp)
cmpl $0x1, 0x93d58(%rip)     # 0xab400
jne 0x177af
movl $0x228, %edi            # imm = 0x228
callq 0xa5f0
movq %rax, -0x788(%rbp)
jmp 0x176c1
movq -0x788(%rbp), %rdi
movq -0x3b0(%rbp), %rsi
movl 0x93d7f(%rip), %edx     # 0xab454
movl 0x93cc9(%rip), %eax     # 0xab3a4
subl $0x5, %eax
sete %r8b
movq -0x5c0(%rbp), %r11
movslq 0x93d00(%rip), %rbx     # 0xab3f0
movq 0x93d29(%rip), %r14     # 0xab420
movl 0x93d16(%rip), %r15d    # 0xab414
movzbl 0x93d7b(%rip), %r9d     # 0xab481
movzbl 0x93d7f(%rip), %ecx     # 0xab48c
movzbl 0x93d70(%rip), %r10d    # 0xab485
movq %rsp, %rax
movq %rax, -0x790(%rbp)
movl %r15d, 0x40(%rax)
movq %r14, 0x38(%rax)
movq %rbx, 0x30(%rax)
movq %r11, 0x28(%rax)
andl $0x1, %r10d
movl %r10d, 0x20(%rax)
movzbl %r8b, %r8d
movl %r8d, 0x18(%rax)
leaq 0x93b02(%rip), %r8      # 0xab248
movq %r8, 0x10(%rax)
leaq 0x93ad7(%rip), %r8      # 0xab228
movq %r8, 0x8(%rax)
leaq 0x93aac(%rip), %r8      # 0xab208
movq %r8, (%rax)
andl $0x1, %ecx
andl $0x1, %r9d
leaq 0x93b1b(%rip), %r8      # 0xab288
callq 0x292e0
jmp 0x17774
movq -0x788(%rbp), %rax
movq %rax, -0x5b8(%rbp)
jmp 0x17abe
movq -0x788(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
movl $0x228, %esi            # imm = 0x228
callq 0xa600
jmp 0x18008
cmpl $0x4, 0x93c4a(%rip)     # 0xab400
jne 0x17a48
movl $0x1f8, %edi            # imm = 0x1F8
callq 0xa5f0
movq %rax, -0x798(%rbp)
jmp 0x177cf
movq -0x798(%rbp), %rdi
movq -0x3b0(%rbp), %rsi
movl 0x93bc1(%rip), %eax     # 0xab3a4
subl $0x5, %eax
sete %r8b
movq -0x5c0(%rbp), %r10
movslq 0x93bf8(%rip), %r11     # 0xab3f0
movl 0x93c22(%rip), %ebx     # 0xab420
movzbl 0x93c7d(%rip), %ecx     # 0xab482
movzbl 0x93c75(%rip), %edx     # 0xab481
movzbl 0x93c71(%rip), %r9d     # 0xab485
movzbl 0x93bd8(%rip), %r14d    # 0xab3f4
andl $0x1, %r14d
movq %rsp, %rax
movl %r14d, 0x30(%rax)
movl %ebx, 0x28(%rax)
movq %r11, 0x20(%rax)
movq %r10, 0x18(%rax)
andl $0x1, %r9d
movl %r9d, 0x10(%rax)
movzbl %r8b, %r8d
movl %r8d, 0x8(%rax)
leaq 0x939ff(%rip), %r8      # 0xab248
movq %r8, (%rax)
andl $0x1, %edx
andl $0x1, %ecx
leaq 0x939af(%rip), %r8      # 0xab208
leaq 0x939c8(%rip), %r9      # 0xab228
callq 0x29420
jmp 0x17867
movq -0x798(%rbp), %rax
movq %rax, -0x5c8(%rbp)
testb $0x1, 0x93c07(%rip)     # 0xab483
jne 0x17a38
leaq -0x5e8(%rbp), %rdi
callq 0x27220
jmp 0x17890
testb $0x1, 0x93bed(%rip)     # 0xab484
jne 0x178fb
leaq 0x93900(%rip), %rdi     # 0xab1a0
leaq -0x5e8(%rbp), %rsi
callq 0x18920
jmp 0x178ae
jmp 0x178fb
movq -0x798(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
movl $0x1f8, %esi            # imm = 0x1F8
callq 0xa600
jmp 0x18008
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x5e8(%rbp), %rdi
callq 0x27260
jmp 0x18008
movq -0x5c8(%rbp), %rdi
movq %rdi, -0x7a8(%rbp)
callq 0x29520
movq %rax, -0x7a0(%rbp)
jmp 0x17917
leaq -0x538(%rbp), %rdi
callq 0x29540
movl %eax, -0x7ac(%rbp)
jmp 0x1792b
movl -0x7ac(%rbp), %eax
movl %eax, %eax
movq %rax, -0x7c8(%rbp)
movb 0x93b44(%rip), %al      # 0xab484
movb %al, -0x7b9(%rbp)
leaq -0x538(%rbp), %rdi
callq 0x29560
movq %rax, -0x7b8(%rbp)
jmp 0x1795b
movb 0x93b20(%rip), %al      # 0xab481
movb %al, -0x7d2(%rbp)
movb 0x93b15(%rip), %al      # 0xab482
movb %al, -0x7d1(%rbp)
leaq 0x939ee(%rip), %rdi     # 0xab368
callq 0xa210
movq %rax, -0x7d0(%rbp)
leaq 0x938db(%rip), %rdi     # 0xab268
callq 0xaa90
testb $0x1, %al
jne 0x17998
jmp 0x179a3
xorl %eax, %eax
movq %rax, -0x7e0(%rbp)
jmp 0x179b6
leaq 0x938be(%rip), %rdi     # 0xab268
callq 0xa210
movq %rax, -0x7e0(%rbp)
movq -0x7b8(%rbp), %r9
movq -0x7c8(%rbp), %rdx
movq -0x7a0(%rbp), %rsi
movq -0x7a8(%rbp), %rdi
movb -0x7b9(%rbp), %al
movb -0x7d2(%rbp), %r8b
movb -0x7d1(%rbp), %r10b
movq -0x7d0(%rbp), %r11
movq -0x7e0(%rbp), %rbx
movq %rsp, %rcx
movq %rbx, 0x18(%rcx)
movq %r11, 0x10(%rcx)
movzbl %r10b, %r10d
andl $0x1, %r10d
movl %r10d, 0x8(%rcx)
movzbl %r8b, %r8d
andl $0x1, %r8d
movl %r8d, (%rcx)
movzbl %al, %r8d
andl $0x1, %r8d
leaq -0x5e8(%rbp), %rcx
callq 0x84cb0
jmp 0x17a2c
leaq -0x5e8(%rbp), %rdi
callq 0x27260
movq -0x5c8(%rbp), %rax
movq %rax, -0x5b8(%rbp)
jmp 0x17abc
movq 0x905a1(%rip), %rdi     # 0xa7ff0
leaq 0x74b84(%rip), %rsi     # 0x8c5da
callq 0xa5d0
movq %rax, -0x7e8(%rbp)
jmp 0x17a64
movq -0x7e8(%rbp), %rdi
movl 0x9398f(%rip), %esi     # 0xab400
callq 0xab40
movq %rax, -0x7f0(%rbp)
jmp 0x17a7f
movq -0x7f0(%rbp), %rdi
movq 0x904db(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x17a94
movl $0x4, %edi
callq 0xa290
movq %rax, %rdi
movl $0x1, (%rdi)
movq 0x904a2(%rip), %rsi     # 0xa7f50
xorl %eax, %eax
movl %eax, %edx
callq 0xab10
jmp 0x18059
jmp 0x17abe
testb $0x1, 0x938db(%rip)     # 0xab3a0
jne 0x17ad0
testb $0x1, 0x938ba(%rip)     # 0xab388
je 0x17afa
movq 0x90519(%rip), %rdi     # 0xa7ff0
leaq 0x74b12(%rip), %rsi     # 0x8c5f0
callq 0xa5d0
jmp 0x17ae5
movq 0x90504(%rip), %rdi     # 0xa7ff0
movl $0x1, %esi
callq 0x10f50
jmp 0x17af8
jmp 0x17afa
cmpl $0x0, 0x938d7(%rip)     # 0xab3d8
je 0x17b4b
movl 0x938d3(%rip), %edi     # 0xab3dc
movl 0x938d5(%rip), %esi     # 0xab3e4
movl 0x938cb(%rip), %edx     # 0xab3e0
movq -0x3a8(%rbp), %rcx
movq -0x5b8(%rbp), %r8
movq -0x540(%rbp), %r9
movq %rsp, %rax
leaq -0x68(%rbp), %r10
movq %r10, 0x8(%rax)
movq %r9, (%rax)
leaq -0x538(%rbp), %r9
callq 0x18ac0
jmp 0x17b46
jmp 0x17c93
cmpl $0x0, 0x9387e(%rip)     # 0xab3d0
jle 0x17c6f
cmpl $0x1, 0x93871(%rip)     # 0xab3d0
jne 0x17b8d
movq -0x3a8(%rbp), %rdi
movq -0x5b8(%rbp), %rsi
movq -0x540(%rbp), %rcx
leaq -0x538(%rbp), %rdx
leaq -0x68(%rbp), %r8
callq 0x19760
jmp 0x17b88
jmp 0x17c6d
cmpl $0x2, 0x9383c(%rip)     # 0xab3d0
je 0x17b9f
cmpl $0x3, 0x93833(%rip)     # 0xab3d0
jne 0x17bdb
movq -0x3a8(%rbp), %rdi
movq -0x5b8(%rbp), %rsi
movq -0x540(%rbp), %rcx
movl 0x93816(%rip), %eax     # 0xab3d0
subl $0x2, %eax
sete %al
movzbl %al, %r9d
leaq -0x538(%rbp), %rdx
leaq -0x68(%rbp), %r8
callq 0x1a2c0
jmp 0x17bd6
jmp 0x17c6b
movq 0x9040e(%rip), %rdi     # 0xa7ff0
leaq 0x72de6(%rip), %rsi     # 0x8a9cf
callq 0xa5d0
movq %rax, -0x7f8(%rbp)
jmp 0x17bf7
movq -0x7f8(%rbp), %rdi
movl 0x937cc(%rip), %esi     # 0xab3d0
callq 0xab40
movq %rax, -0x800(%rbp)
jmp 0x17c12
movq -0x800(%rbp), %rdi
leaq 0x749ef(%rip), %rsi     # 0x8c60f
callq 0xa5d0
movq %rax, -0x808(%rbp)
jmp 0x17c2e
movq -0x808(%rbp), %rdi
movq 0x9032c(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x17c43
movl $0x4, %edi
callq 0xa290
movq %rax, %rdi
movl $0x1, (%rdi)
movq 0x902f3(%rip), %rsi     # 0xa7f50
xorl %eax, %eax
movl %eax, %edx
callq 0xab10
jmp 0x18059
jmp 0x17c6d
jmp 0x17c91
movq -0x3a8(%rbp), %rdi
movq -0x5b8(%rbp), %rsi
leaq -0x538(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0x1ae40
jmp 0x17c8f
jmp 0x17c91
jmp 0x17c93
leaq -0x538(%rbp), %rdi
callq 0x27d10
testb $0x1, %al
jne 0x17ca5
jmp 0x17cb5
leaq -0x538(%rbp), %rdi
callq 0x29140
jmp 0x17cb3
jmp 0x17cb5
cmpq $0x0, -0x540(%rbp)
je 0x17cf2
movq -0x540(%rbp), %rax
movq %rax, -0x810(%rbp)
cmpq $0x0, %rax
je 0x17cf0
movq -0x810(%rbp), %rdi
callq 0x29580
movq -0x810(%rbp), %rdi
movl $0x188, %esi            # imm = 0x188
callq 0xa600
jmp 0x17cf2
movq -0x5b8(%rbp), %rdi
movzbl 0x93780(%rip), %esi     # 0xab480
andl $0x1, %esi
callq 0x29800
jmp 0x17d0a
movq $0x0, -0x5f0(%rbp)
movq -0x5f0(%rbp), %rax
movq %rax, -0x820(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x29fa0
movq %rax, -0x818(%rbp)
jmp 0x17d38
movq -0x820(%rbp), %rax
movq -0x818(%rbp), %rcx
cmpq %rcx, %rax
jae 0x17da4
movq -0x5f0(%rbp), %rsi
leaq -0x1f0(%rbp), %rdi
callq 0x29fc0
movq %rax, -0x828(%rbp)
jmp 0x17d67
movq -0x828(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x830(%rbp)
cmpq $0x0, %rax
je 0x17d8b
movq -0x830(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17d8d
movq -0x5f0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x5f0(%rbp)
jmp 0x17d15
movq $0x0, -0x5f8(%rbp)
movq -0x5f8(%rbp), %rax
movq %rax, -0x840(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x29fa0
movq %rax, -0x838(%rbp)
jmp 0x17dd2
movq -0x840(%rbp), %rax
movq -0x838(%rbp), %rcx
cmpq %rcx, %rax
jae 0x17e6d
movq -0x5f8(%rbp), %rsi
leaq -0x210(%rbp), %rdi
callq 0x29fc0
movq %rax, -0x848(%rbp)
jmp 0x17e05
movq -0x848(%rbp), %rax
cmpq $0x0, (%rax)
je 0x17e54
movq -0x5f8(%rbp), %rsi
leaq -0x210(%rbp), %rdi
callq 0x29fc0
movq %rax, -0x850(%rbp)
jmp 0x17e2e
movq -0x850(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x858(%rbp)
cmpq $0x0, %rax
je 0x17e52
movq -0x858(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17e54
jmp 0x17e56
movq -0x5f8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x5f8(%rbp)
jmp 0x17daf
movq $0x0, -0x600(%rbp)
movq -0x600(%rbp), %rax
movq %rax, -0x868(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x29fa0
movq %rax, -0x860(%rbp)
jmp 0x17e9b
movq -0x868(%rbp), %rax
movq -0x860(%rbp), %rcx
cmpq %rcx, %rax
jae 0x17f36
movq -0x600(%rbp), %rsi
leaq -0x230(%rbp), %rdi
callq 0x29fc0
movq %rax, -0x870(%rbp)
jmp 0x17ece
movq -0x870(%rbp), %rax
cmpq $0x0, (%rax)
je 0x17f1d
movq -0x600(%rbp), %rsi
leaq -0x230(%rbp), %rdi
callq 0x29fc0
movq %rax, -0x878(%rbp)
jmp 0x17ef7
movq -0x878(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x880(%rbp)
cmpq $0x0, %rax
je 0x17f1b
movq -0x880(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17f1d
jmp 0x17f1f
movq -0x600(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x600(%rbp)
jmp 0x17e78
movq -0x3a8(%rbp), %rax
movq %rax, -0x888(%rbp)
cmpq $0x0, %rax
je 0x17f57
movq -0x888(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x5b8(%rbp), %rax
movq %rax, -0x890(%rbp)
cmpq $0x0, %rax
je 0x17f78
movq -0x890(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
cmpq $0x0, -0x3b0(%rbp)
je 0x17fb5
movq -0x3b0(%rbp), %rax
movq %rax, -0x898(%rbp)
cmpq $0x0, %rax
je 0x17fb3
movq -0x898(%rbp), %rdi
callq 0x29ff0
movq -0x898(%rbp), %rdi
movl $0x4020, %esi           # imm = 0x4020
callq 0xa600
jmp 0x17fb5
leaq -0x5b0(%rbp), %rdi
callq 0x27490
leaq -0x538(%rbp), %rdi
callq 0x29580
leaq -0x230(%rbp), %rdi
callq 0x2a020
leaq -0x210(%rbp), %rdi
callq 0x2a020
leaq -0x1f0(%rbp), %rdi
callq 0x2a020
leaq -0x68(%rbp), %rdi
callq 0x2a040
addq $0x8c8, %rsp            # imm = 0x8C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x5b0(%rbp), %rdi
callq 0x27490
leaq -0x538(%rbp), %rdi
callq 0x29580
leaq -0x230(%rbp), %rdi
callq 0x2a020
leaq -0x210(%rbp), %rdi
callq 0x2a020
leaq -0x1f0(%rbp), %rdi
callq 0x2a020
leaq -0x68(%rbp), %rdi
callq 0x2a040
movq -0x98(%rbp), %rdi
callq 0xab60
nopl (%rax)