// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/KlondikeSolver.cpp
// Function: main
int main(int argc, char * argv[]) {
	Solitaire s;
	s.Initialize();

	bool commandLoaded = false;
	int outputMethod = 0;
	int multiThreaded = 1;
	int maxClosedCount = 0;
	bool fastMode = false;
	string fileContents;
	bool replay = false;
	bool showMoves = false;

	for (int i = 1; i < argc; i++) {
		if (_stricmp(argv[i], "-draw") == 0 || _stricmp(argv[i], "/draw") == 0 || _stricmp(argv[i], "-dc") == 0 || _stricmp(argv[i], "/dc") == 0) {
			if (i + 1 >= argc) { cout << "You must specify draw count."; return 0; }
			int drawCount = atoi(argv[i + 1]);
			if (drawCount < 1 || drawCount > 12) { cout << "Please specify a valid draw count from 1 to 12."; return 0; }
			s.SetDrawCount(drawCount);
			i++;
		} else if (_stricmp(argv[i], "-deck") == 0 || _stricmp(argv[i], "/deck") == 0 || _stricmp(argv[i], "-d") == 0 || _stricmp(argv[i], "/d") == 0) {
			if (i + 1 >= argc) { cout << "You must specify deck to load."; return 0; }
			if (commandLoaded) { cout << "Only one method can be specified (deck/game/file)."; return 0; }
			if (!s.LoadSolitaire(argv[i + 1])) { cout << "Specified deck is invalid."; return 0; }
			commandLoaded = true;
			i++;
		} else if (_stricmp(argv[i], "-game") == 0 || _stricmp(argv[i], "/game") == 0 || _stricmp(argv[i], "-g") == 0 || _stricmp(argv[i], "/g") == 0) {
			if (i + 1 >= argc) { cout << "You must specify a game number to load. Any integeral number."; return 0; }
			if (commandLoaded) { cout << "Only one method can be specified (deck/game/file)."; return 0; }
			commandLoaded = true;
			s.Shuffle1(atoi(argv[i + 1]));
			i++;
		} else if (_stricmp(argv[i], "-out") == 0 || _stricmp(argv[i], "/out") == 0 || _stricmp(argv[i], "-o") == 0 || _stricmp(argv[i], "/o") == 0) {
			if (i + 1 >= argc) { cout << "You must specify a valid output method. 0 or 1."; return 0; }
			outputMethod = atoi(argv[i + 1]);
			if (outputMethod < 0 || outputMethod > 2) { cout << "You must specify a valid output method. 0, 1, or 2."; return 0; }
			i++;
		} else if (_stricmp(argv[i], "-states") == 0 || _stricmp(argv[i], "/states") == 0 || _stricmp(argv[i], "-s") == 0 || _stricmp(argv[i], "/s") == 0) {
			if (i + 1 >= argc) { cout << "You must specify max states."; return 0; }
			maxClosedCount = atoi(argv[i + 1]);
			if (maxClosedCount < 0) { cout << "You must specify a valid max number of states."; return 0; }
			i++;
		} else if (_stricmp(argv[i], "-fast") == 0 || _stricmp(argv[i], "/fast") == 0 || _stricmp(argv[i], "-f") == 0 || _stricmp(argv[i], "/f") == 0) {
			fastMode = true;
			if (maxClosedCount == 0) { maxClosedCount = 200000; }
		} else if (_stricmp(argv[i], "-m") == 0 || _stricmp(argv[i], "/m") == 0 || _stricmp(argv[i], "-multi") == 0 || _stricmp(argv[i], "/multi") == 0) {
			if (i + 1 >= argc) { cout << "You must specify number of threads."; return 0; }
			multiThreaded = atoi(argv[i + 1]);
			if (multiThreaded < 2 || multiThreaded > 99) { cout << "You must specify a valid number of threads."; return 0; }
			i++;
		} else if (_stricmp(argv[i], "-mvs") == 0 || _stricmp(argv[i], "/mvs") == 0 || _stricmp(argv[i], "-moves") == 0 || _stricmp(argv[i], "/moves") == 0) {
			showMoves = true;
		} else if (_stricmp(argv[i], "-r") == 0 || _stricmp(argv[i], "/r") == 0) {
			replay = true;
		} else if (_stricmp(argv[i], "-?") == 0 || _stricmp(argv[i], "/?") == 0 || _stricmp(argv[i], "?") == 0 || _stricmp(argv[i], "/help") == 0 || _stricmp(argv[i], "-help") == 0) {
			cout << "Klondike Solver V2.0\nSolves games of Klondike (Patience) solitaire minimally or a faster best try.\n\n";
			cout << "KlondikeSolver [/DC] [/D] [/G] [/O] [/M] [/S] [/F] [/R] [/MVS] [Path]\n\n";
			cout << "  /DRAW # [/DC #]       Sets the draw count to use when solving. Defaults to 1.\n\n";
			cout << "  /DECK str [/D str]    Loads the deck specified by the string.\n\n";
			cout << "  /GAME # [/G #]        Loads a random game with seed #.\n\n";
			cout << "  Path                  Solves deals specified in the file.\n\n";
			cout << "  /R                    Replays solution to output if one is found.\n\n";
			cout << "  /MULTI # [/M #]       Uses # threads to solve deals.\n";
			cout << "                        Only works when solving minimally.\n\n";
			cout << "  /OUT # [/O #]         Sets the output method of the solver.\n";
			cout << "                        Defaults to 0, 1 for Pysol, and 2 for minimal output.\n";
			cout << "  /MOVES [/MVS]         Will also output a compact list of moves made when a\n";
			cout << "                        solution is found.";
			cout << "  /STATES # [/S #]      Sets the maximum number of game states to evaluate\n";
			cout << "                        before terminating. Defaults to 5,000,000.\n\n";
			cout << "  /FAST [/F]            Run the solver in a best attempt mode, which is\n";
			cout << "                        faster, but not guaranteed to give minimal solution.\n";
			return 0;
		} else {
			if (commandLoaded) { cout << "Only one method can be specified (deck/game/file)."; return 0; }
			commandLoaded = true;
			ifstream file(argv[i], ios::in | ios::binary);
			if (!file) { cout << "You must specify a valid and accessible file."; return 0; }
			file.seekg(0, ios::end);
			fileContents.resize((unsigned int)file.tellg());
			file.seekg(0, ios::beg);
			file.read(&fileContents[0], fileContents.size());
			file.close();
		}
	}

	if (maxClosedCount == 0) { maxClosedCount = 5000000; }

	unsigned int fileIndex = 0;
	do {
		if (fileContents.size() > fileIndex) {
			if (!LoadGame(fileContents, s, fileIndex)) {
				continue;
			}
		}
		s.ResetGame();

		if (outputMethod == 0) {
			cout << s.GameDiagram() << "\n\n";
		} else if (outputMethod == 1) {
			cout << s.GameDiagramPysol() << "\n\n";
		}

		clock_t total = clock();
		SolveResult result = CouldNotComplete;
		if (fastMode) {
			int bestCount = 512;
			int bestFoundation = 0;
			result = s.SolveFast(maxClosedCount, 0, 0);
			if (result == SolvedMinimal || result == SolvedMayNotBeMinimal) {
				bestCount = s.MovesMadeNormalizedCount();
			}
			bestFoundation = s.FoundationCount();
			Solitaire best = s;
			s.ResetGame();
			result = s.SolveFast(maxClosedCount, 0, 4);
			if ((result == SolvedMinimal || result == SolvedMayNotBeMinimal) && s.MovesMadeNormalizedCount() < bestCount) {
				best = s; bestCount = s.MovesMadeNormalizedCount(); bestFoundation = s.FoundationCount();
			}
			if (s.FoundationCount() > bestFoundation) {
				best = s; bestFoundation = s.FoundationCount();
			}
			s.ResetGame();
			result = s.SolveFast(maxClosedCount, 1, 4);
			if ((result == SolvedMinimal || result == SolvedMayNotBeMinimal) && s.MovesMadeNormalizedCount() < bestCount) {
				best = s; bestCount = s.MovesMadeNormalizedCount(); bestFoundation = s.FoundationCount();
			}
			if (s.FoundationCount() > bestFoundation) {
				best = s; bestFoundation = s.FoundationCount();
			}
			s = best;
			if (bestFoundation == 52) { result = SolvedMayNotBeMinimal; }
		} else if (multiThreaded > 1) {
			result = s.SolveMinimalMultithreaded(multiThreaded, maxClosedCount);
		} else {
			result = s.SolveMinimal(maxClosedCount);
		}

		bool canReplay = false;
		if (result == SolvedMinimal) {
			cout << "Minimal solution in " << s.MovesMadeNormalizedCount() << " moves.";
			canReplay = true;
		} else if (result == SolvedMayNotBeMinimal) {
			cout << "Solved in " << s.MovesMadeNormalizedCount() << " moves.";
			canReplay = true;
		} else if (result == Impossible) {
			cout << "Impossible. Max cards in foundation " << s.FoundationCount() << " at " << s.MovesMadeNormalizedCount() << " moves.";
		} else if (result == CouldNotComplete) {
			cout << "Unknown. Max cards in foundation " << s.FoundationCount() << " at " << s.MovesMadeNormalizedCount() << " moves.";
		}
		cout << " Took " << (clock() - total) << " ms.\n";

		if (outputMethod < 2 && replay && canReplay) {
			int movesToMake = s.MovesMadeCount();
			s.ResetGame();
			for (int i = 0; i < movesToMake; i++) {
				cout << "----------------------------------------\n";
				cout << s.GetMoveInfo(s[i]) << "\n\n";
				s.MakeMove(s[i]);

				if (outputMethod == 0) {
					cout << s.GameDiagram() << "\n\n";
				} else {
					cout << s.GameDiagramPysol() << "\n\n";
				}
			}
			cout << "----------------------------------------\n";
		}
		if (showMoves && canReplay) {
			cout << s.MovesMade() << "\n\n";
		} else if (showMoves) {
			cout << "\n";
		}
	} while (fileContents.size() > fileIndex);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3298, %rsp           # imm = 0x3298
movq %rsi, %r14
movl %edi, %r15d
leaq 0x1980(%rsp), %r12
movq %r12, %rdi
callq 0x338a
movq %r12, %rdi
callq 0x6880
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq $0x0, 0x38(%rsp)
pushq $0x1
popq %rbp
movq $0x0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x10(%rsp)
movl %ebp, %eax
movq %rax, 0x30(%rsp)
xorl %eax, %eax
xorl %r13d, %r13d
movl %eax, 0xc(%rsp)
cmpl %r15d, %ebp
jge 0x2c1e
movslq %ebp, %rax
movq (%r14,%rax,8), %rbx
movq %rbx, %rdi
leaq 0x6991(%rip), %rsi      # 0x9014
callq 0x2200
testl %eax, %eax
je 0x2a45
movq %rbx, %rdi
leaq 0x6980(%rip), %rsi      # 0x901a
callq 0x2200
testl %eax, %eax
je 0x2a45
movq %rbx, %rdi
leaq 0x696f(%rip), %rsi      # 0x9020
callq 0x2200
testl %eax, %eax
je 0x2a45
movq %rbx, %rdi
leaq 0x695c(%rip), %rsi      # 0x9024
callq 0x2200
testl %eax, %eax
je 0x2a45
movq %rbx, %rdi
leaq 0x6996(%rip), %rsi      # 0x9075
callq 0x2200
testl %eax, %eax
je 0x2a7d
movq %rbx, %rdi
leaq 0x6985(%rip), %rsi      # 0x907b
callq 0x2200
testl %eax, %eax
je 0x2a7d
movq %rbx, %rdi
leaq 0x6974(%rip), %rsi      # 0x9081
callq 0x2200
testl %eax, %eax
je 0x2a7d
movq %rbx, %rdi
leaq 0x6960(%rip), %rsi      # 0x9084
callq 0x2200
testl %eax, %eax
je 0x2a7d
movq %rbx, %rdi
leaq 0x69b9(%rip), %rsi      # 0x90f4
callq 0x2200
testl %eax, %eax
je 0x2ad0
movq %rbx, %rdi
leaq 0x69a8(%rip), %rsi      # 0x90fa
callq 0x2200
testl %eax, %eax
je 0x2ad0
movq %rbx, %rdi
leaq 0x6997(%rip), %rsi      # 0x9100
callq 0x2200
testl %eax, %eax
je 0x2ad0
movq %rbx, %rdi
leaq 0x6983(%rip), %rsi      # 0x9103
callq 0x2200
testl %eax, %eax
je 0x2ad0
movq %rbx, %rdi
leaq 0x69ad(%rip), %rsi      # 0x9144
callq 0x2200
testl %eax, %eax
je 0x2b07
movq %rbx, %rdi
leaq 0x699b(%rip), %rsi      # 0x9149
callq 0x2200
testl %eax, %eax
je 0x2b07
movq %rbx, %rdi
leaq 0x6989(%rip), %rsi      # 0x914e
callq 0x2200
testl %eax, %eax
je 0x2b07
movq %rbx, %rdi
leaq 0x6975(%rip), %rsi      # 0x9151
callq 0x2200
testl %eax, %eax
je 0x2b07
movq %rbx, %rdi
leaq 0x69c5(%rip), %rsi      # 0x91b8
callq 0x2200
testl %eax, %eax
je 0x2b2c
movq %rbx, %rdi
leaq 0x69b6(%rip), %rsi      # 0x91c0
callq 0x2200
testl %eax, %eax
je 0x2b2c
movq %rbx, %rdi
leaq 0x69a7(%rip), %rsi      # 0x91c8
callq 0x2200
testl %eax, %eax
je 0x2b2c
movq %rbx, %rdi
leaq 0x6993(%rip), %rsi      # 0x91cb
callq 0x2200
testl %eax, %eax
je 0x2b2c
movq %rbx, %rdi
leaq 0x69cb(%rip), %rsi      # 0x921a
callq 0x2200
testl %eax, %eax
je 0x2b58
movq %rbx, %rdi
leaq 0x69ba(%rip), %rsi      # 0x9220
callq 0x2200
testl %eax, %eax
je 0x2b58
movq %rbx, %rdi
leaq 0x69a9(%rip), %rsi      # 0x9226
callq 0x2200
testl %eax, %eax
je 0x2b58
movq %rbx, %rdi
leaq 0x6995(%rip), %rsi      # 0x9229
callq 0x2200
testl %eax, %eax
je 0x2b58
movq %rbx, %rdi
leaq 0x6981(%rip), %rsi      # 0x922c
callq 0x2200
testl %eax, %eax
je 0x2b73
movq %rbx, %rdi
leaq 0x696d(%rip), %rsi      # 0x922f
callq 0x2200
testl %eax, %eax
je 0x2b73
movq %rbx, %rdi
leaq 0x6959(%rip), %rsi      # 0x9232
callq 0x2200
testl %eax, %eax
je 0x2b73
movq %rbx, %rdi
leaq 0x6949(%rip), %rsi      # 0x9239
callq 0x2200
testl %eax, %eax
je 0x2b73
movq %rbx, %rdi
leaq 0x6989(%rip), %rsi      # 0x9290
callq 0x2200
testl %eax, %eax
je 0x2b9c
movq %rbx, %rdi
leaq 0x6977(%rip), %rsi      # 0x9295
callq 0x2200
testl %eax, %eax
je 0x2b9c
movq %rbx, %rdi
leaq 0x6965(%rip), %rsi      # 0x929a
callq 0x2200
testl %eax, %eax
je 0x2b9c
movq %rbx, %rdi
leaq 0x6955(%rip), %rsi      # 0x92a1
callq 0x2200
testl %eax, %eax
je 0x2b9c
movq %rbx, %rdi
leaq 0x6945(%rip), %rsi      # 0x92a8
callq 0x2200
testl %eax, %eax
je 0x2ba5
movq %rbx, %rdi
leaq 0x6931(%rip), %rsi      # 0x92ab
callq 0x2200
testl %eax, %eax
je 0x2ba5
movq %rbx, %rdi
leaq 0x691d(%rip), %rsi      # 0x92ae
callq 0x2200
testl %eax, %eax
je 0x31e8
movq %rbx, %rdi
leaq 0x6909(%rip), %rsi      # 0x92b1
callq 0x2200
testl %eax, %eax
je 0x31e8
movq %rbx, %rdi
leaq 0x68f0(%rip), %rsi      # 0x92af
callq 0x2200
testl %eax, %eax
je 0x31e8
movq %rbx, %rdi
leaq 0x68de(%rip), %rsi      # 0x92b4
callq 0x2200
testl %eax, %eax
je 0x31e8
movq %rbx, %rdi
leaq 0x68cd(%rip), %rsi      # 0x92ba
callq 0x2200
testl %eax, %eax
je 0x31e8
testb $0x1, %r13b
jne 0x3185
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
pushq $0xc
popq %rdx
callq 0x2320
movq 0x68(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x88(%rsp,%rax), %ebx
testb $0x5, %bl
je 0x2bae
movq 0xb5a4(%rip), %rdi      # 0xdfd8
leaq 0x6d29(%rip), %rsi      # 0x9764
callq 0x21c0
jmp 0x2bff
incl %ebp
cmpl %r15d, %ebp
jge 0x313f
movslq %ebp, %rax
movq (%r14,%rax,8), %rdi
callq 0x2290
leal -0x1(%rax), %ecx
cmpl $0xc, %ecx
jae 0x3154
movq %r12, %rdi
movl %eax, %esi
callq 0x6e7c
movl 0xc(%rsp), %eax
incl %ebp
jmp 0x2665
incl %ebp
cmpl %r15d, %ebp
jge 0x318e
testb $0x1, %r13b
jne 0x3185
movslq %ebp, %rax
movq (%r14,%rax,8), %rsi
leaq 0x68(%rsp), %r13
movq %r13, %rdi
leaq 0x1c(%rsp), %rdx
callq 0x33e0
movq %r12, %rdi
movq %r13, %rsi
callq 0x68e2
movl %eax, %ebx
movq %r13, %rdi
callq 0x20c0
movb $0x1, %r13b
testb %bl, %bl
movl 0xc(%rsp), %eax
jne 0x2a76
jmp 0x3197
incl %ebp
cmpl %r15d, %ebp
jge 0x31a0
testb $0x1, %r13b
jne 0x3185
movslq %ebp, %rax
movq (%r14,%rax,8), %rdi
callq 0x2290
movb $0x1, %r13b
movq %r12, %rdi
movl %eax, %esi
callq 0x6642
movl 0xc(%rsp), %eax
jmp 0x2a76
incl %ebp
cmpl %r15d, %ebp
jge 0x31a9
movslq %ebp, %rax
movq (%r14,%rax,8), %rdi
callq 0x2290
cmpl $0x2, %eax
jbe 0x2a76
jmp 0x31b2
incl %ebp
cmpl %r15d, %ebp
jge 0x31bb
movslq %ebp, %rax
movq (%r14,%rax,8), %rdi
callq 0x2290
movl %eax, 0x10(%rsp)
testl %eax, %eax
js 0x31c4
movl 0xc(%rsp), %eax
jmp 0x2a76
movl 0x10(%rsp), %ecx
testl %ecx, %ecx
movl $0x30d40, %eax          # imm = 0x30D40
cmovel %eax, %ecx
movl %ecx, 0x10(%rsp)
movb $0x1, %al
movq %rax, 0x38(%rsp)
jmp 0x2b4f
incl %ebp
cmpl %r15d, %ebp
jge 0x31d0
movslq %ebp, %rax
movq (%r14,%rax,8), %rdi
callq 0x2290
movq %rax, 0x30(%rsp)
addl $-0x64, %eax
cmpl $-0x62, %eax
jae 0x2b4f
jmp 0x31dc
movb $0x1, %al
movq %rax, 0x20(%rsp)
jmp 0x2b4f
movb $0x1, %al
movq %rax, 0x28(%rsp)
jmp 0x2b4f
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
pushq $0x2
popq %rdx
callq 0x2230
leaq 0x68(%rsp), %rdi
callq 0x22f0
movl %eax, %esi
leaq 0x40(%rsp), %rdi
callq 0x2240
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2230
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
leaq 0x68(%rsp), %rdi
callq 0x2220
leaq 0x68(%rsp), %rdi
callq 0x2050
leaq 0x68(%rsp), %rdi
callq 0x2060
movb $0x1, %r13b
testb $0x5, %bl
movl 0xc(%rsp), %eax
je 0x2a76
jmp 0x3167
movl 0x10(%rsp), %ecx
testl %ecx, %ecx
movl $0x4c4b40, %eax         # imm = 0x4C4B40
cmovnel %ecx, %eax
movl %eax, 0x18(%rsp)
leaq 0x1c(%rsp), %rax
andl $0x0, (%rax)
movq 0x28(%rsp), %rax
xorb $0x1, %al
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rax
xorb $0x1, %al
movb %al, 0x17(%rsp)
xorl %ecx, %ecx
leaq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
leaq 0x1980(%rsp), %r13
leaq 0x68(%rsp), %r15
movq 0xb36a(%rip), %r12      # 0xdfd8
leaq 0x67c4(%rip), %rbx      # 0x9439
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x2c96
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
leaq 0x1c(%rsp), %rdx
callq 0x246c
testb %al, %al
je 0x312b
movq %r13, %rdi
callq 0x3e72
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x2cce
cmpl $0x1, %eax
jne 0x2cf7
movq %r15, %rdi
movq %r13, %rsi
callq 0x75b2
movq %r12, %rdi
movq %r15, %rsi
callq 0x2190
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
jmp 0x2cef
movq %r15, %rdi
movq %r13, %rsi
callq 0x73d4
movq %r12, %rdi
movq %r15, %rsi
callq 0x2190
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
movq %r15, %rdi
callq 0x20c0
callq 0x2100
movq %rax, 0x60(%rsp)
testb $0x1, 0x38(%rsp)
je 0x2e6f
movq %r13, %rdi
movl 0x18(%rsp), %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5532
cmpl $0x1, %eax
je 0x2d2e
movl $0x200, 0x10(%rsp)      # imm = 0x200
cmpl $-0x1, %eax
jne 0x2d3a
movq %r13, %rdi
callq 0x46cc
movl %eax, 0x10(%rsp)
movq %r13, %rdi
callq 0x4766
movl %eax, %r14d
movl $0x1918, %edx           # imm = 0x1918
movq %r15, %rdi
movq %r13, %rsi
callq 0x2170
movq %r13, %rdi
callq 0x3e72
movq %r13, %rdi
movl 0x18(%rsp), %esi
xorl %edx, %edx
pushq $0x4
popq %rcx
callq 0x5532
cmpl $0x1, %eax
je 0x2d78
cmpl $-0x1, %eax
jne 0x2dad
movq %r13, %rdi
callq 0x46cc
cmpl 0x10(%rsp), %eax
jge 0x2dad
movl $0x1918, %edx           # imm = 0x1918
movq %r15, %rdi
movq %r13, %rsi
callq 0x2170
movq %r13, %rdi
callq 0x46cc
movl %eax, 0x10(%rsp)
movq %r13, %rdi
callq 0x4766
movl %eax, %r14d
movq %r13, %rdi
callq 0x4766
cmpl %r14d, %eax
jle 0x2dd5
movl $0x1918, %edx           # imm = 0x1918
movq %r15, %rdi
movq %r13, %rsi
callq 0x2170
movq %r13, %rdi
callq 0x4766
movl %eax, %r14d
movq %r13, %rdi
callq 0x3e72
movq %r13, %rdi
movl 0x18(%rsp), %esi
pushq $0x1
popq %rdx
pushq $0x4
popq %rcx
callq 0x5532
movl %eax, %ebp
cmpl $0x1, %eax
je 0x2dfb
cmpl $-0x1, %ebp
jne 0x2e2c
movq %r13, %rdi
callq 0x46cc
cmpl 0x10(%rsp), %eax
jge 0x2e2c
movl $0x1918, %edx           # imm = 0x1918
movq %r15, %rdi
movq %r13, %rsi
callq 0x2170
movq %r13, %rdi
callq 0x46cc
movq %r13, %rdi
callq 0x4766
movl %eax, %r14d
movq %r13, %rdi
callq 0x4766
cmpl %r14d, %eax
jle 0x2e54
movl $0x1918, %edx           # imm = 0x1918
movq %r15, %rdi
movq %r13, %rsi
callq 0x2170
movq %r13, %rdi
callq 0x4766
movl %eax, %r14d
movl $0x1918, %edx           # imm = 0x1918
movq %r13, %rdi
movq %r15, %rsi
callq 0x2170
cmpl $0x34, %r14d
jne 0x2e95
jmp 0x2ef7
movq 0x30(%rsp), %rsi
cmpl $0x2, %esi
jl 0x2e87
movq %r13, %rdi
movl 0x18(%rsp), %edx
callq 0x5de8
jmp 0x2e93
movq %r13, %rdi
movl 0x18(%rsp), %esi
callq 0x5e36
movl %eax, %ebp
movb $0x1, %al
movl %eax, 0x10(%rsp)
addl $0x2, %ebp
cmpl $0x3, %ebp
ja 0x2fa7
leaq 0x6156(%rip), %rcx      # 0x9004
movslq (%rcx,%rbp,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r12, %rdi
leaq 0x6923(%rip), %rsi      # 0x97e4
callq 0x21c0
movq %rax, %r14
movq %r13, %rdi
callq 0x4766
movq %r14, %rdi
movl %eax, %esi
callq 0x22e0
movq %rax, %rdi
leaq 0x68fa(%rip), %rsi      # 0x97df
callq 0x21c0
movq %rax, %r14
movq %r13, %rdi
callq 0x46cc
jmp 0x2f51
movq %r12, %rdi
leaq 0x68ae(%rip), %rsi      # 0x97af
callq 0x21c0
movq %rax, %r14
movq %r13, %rdi
callq 0x46cc
jmp 0x2f86
movq %r12, %rdi
leaq 0x689d(%rip), %rsi      # 0x97ba
callq 0x21c0
movq %rax, %r14
movq %r13, %rdi
callq 0x4766
movq %r14, %rdi
movl %eax, %esi
callq 0x22e0
movq %rax, %rdi
leaq 0x689e(%rip), %rsi      # 0x97df
callq 0x21c0
movq %rax, %r14
movq %r13, %rdi
callq 0x46cc
movq %r14, %rdi
movl %eax, %esi
callq 0x22e0
movq %rax, %rdi
leaq 0x6842(%rip), %rsi      # 0x97a7
callq 0x21c0
jmp 0x2fa7
movq %r12, %rdi
leaq 0x681c(%rip), %rsi      # 0x9792
callq 0x21c0
movq %rax, %r14
movq %r13, %rdi
callq 0x46cc
movq %r14, %rdi
movl %eax, %esi
callq 0x22e0
movq %rax, %rdi
leaq 0x680d(%rip), %rsi      # 0x97a7
callq 0x21c0
movl $0x0, 0x10(%rsp)
movq %r12, %rdi
leaq 0x6855(%rip), %rsi      # 0x9806
callq 0x21c0
movq %rax, %r14
callq 0x2100
subq 0x60(%rsp), %rax
movq %r14, %rdi
movq %rax, %rsi
callq 0x21b0
movq %rax, %rdi
leaq 0x6835(%rip), %rsi      # 0x980d
callq 0x21c0
cmpl $0x2, 0xc(%rsp)
setge %al
movl 0x10(%rsp), %ecx
orb 0x28(%rsp), %cl
orb %al, %cl
testb $0x1, %cl
jne 0x30de
movq %r13, %rdi
callq 0x476e
movl %eax, %r14d
movq %r13, %rdi
callq 0x3e72
xorl %ebp, %ebp
testl %r14d, %r14d
cmovlel %ebp, %r14d
cmpl %ebp, %r14d
je 0x30cf
movq %r12, %rdi
leaq 0x67ec(%rip), %rsi      # 0x9813
callq 0x21c0
movq %r13, %rdi
movl %ebp, %esi
callq 0x4776
movq %r15, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x6e84
movq %r12, %rdi
movq %r15, %rsi
callq 0x2190
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
movq %r15, %rdi
callq 0x20c0
movq %r13, %rdi
movl %ebp, %esi
callq 0x4776
movq %r13, %rdi
movl %eax, %esi
callq 0x3e7e
cmpl $0x0, 0xc(%rsp)
je 0x309f
movq %r15, %rdi
movq %r13, %rsi
callq 0x75b2
movq %r12, %rdi
movq %r15, %rsi
callq 0x2190
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
jmp 0x30c0
movq %r15, %rdi
movq %r13, %rsi
callq 0x73d4
movq %r12, %rdi
movq %r15, %rsi
callq 0x2190
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
movq %r15, %rdi
callq 0x20c0
incl %ebp
jmp 0x3014
movq %r12, %rdi
leaq 0x673a(%rip), %rsi      # 0x9813
callq 0x21c0
movl 0x10(%rsp), %eax
orb 0x17(%rsp), %al
testb $0x1, %al
je 0x3102
testb $0x1, 0x20(%rsp)
je 0x312b
movq %r12, %rdi
leaq 0x633f(%rip), %rsi      # 0x943a
callq 0x21c0
jmp 0x312b
movq %r15, %rdi
movq %r13, %rsi
callq 0x7dc8
movq %r12, %rdi
movq %r15, %rsi
callq 0x2190
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21c0
movq %r15, %rdi
callq 0x20c0
movq 0x48(%rsp), %rax
movl 0x1c(%rsp), %ecx
cmpq %rcx, %rax
ja 0x2c75
jmp 0x3167
leaq 0x5ee2(%rip), %rsi      # 0x9028
movq 0xae8b(%rip), %rdi      # 0xdfd8
callq 0x21c0
jmp 0x3167
movq 0xae7d(%rip), %rdi      # 0xdfd8
leaq 0x5ee3(%rip), %rsi      # 0x9045
callq 0x21c0
leaq 0x40(%rsp), %rdi
callq 0x20c0
xorl %eax, %eax
addq $0x3298, %rsp           # imm = 0x3298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5f1a(%rip), %rsi      # 0x90a6
jmp 0x3146
leaq 0x5ef2(%rip), %rsi      # 0x9087
jmp 0x3146
leaq 0x5f3b(%rip), %rsi      # 0x90d9
jmp 0x3146
leaq 0x5f5f(%rip), %rsi      # 0x9106
jmp 0x3146
leaq 0x5fa4(%rip), %rsi      # 0x9154
jmp 0x3146
leaq 0x5fcb(%rip), %rsi      # 0x9184
jmp 0x3146
leaq 0x600c(%rip), %rsi      # 0x91ce
jmp 0x3146
leaq 0x6020(%rip), %rsi      # 0x91eb
jmp 0x3146
leaq 0x6069(%rip), %rsi      # 0x9240
jmp 0x3146
leaq 0x6081(%rip), %rsi      # 0x9264
jmp 0x3146
movq 0xade9(%rip), %rdi      # 0xdfd8
leaq 0x60ca(%rip), %rsi      # 0x92c0
callq 0x21c0
movq 0xadd6(%rip), %rdi      # 0xdfd8
leaq 0x611c(%rip), %rsi      # 0x9325
callq 0x21c0
movq 0xadc3(%rip), %rdi      # 0xdfd8
leaq 0x6151(%rip), %rsi      # 0x936d
callq 0x21c0
movq 0xadb0(%rip), %rdi      # 0xdfd8
leaq 0x6190(%rip), %rsi      # 0x93bf
callq 0x21c0
movq 0xad9d(%rip), %rdi      # 0xdfd8
leaq 0x61bf(%rip), %rsi      # 0x9401
callq 0x21c0
movq 0xad8a(%rip), %rdi      # 0xdfd8
leaq 0x61e7(%rip), %rsi      # 0x943c
callq 0x21c0
movq 0xad77(%rip), %rdi      # 0xdfd8
leaq 0x6212(%rip), %rsi      # 0x947a
callq 0x21c0
movq 0xad64(%rip), %rdi      # 0xdfd8
leaq 0x6245(%rip), %rsi      # 0x94c0
callq 0x21c0
movq 0xad51(%rip), %rdi      # 0xdfd8
leaq 0x626a(%rip), %rsi      # 0x94f8
callq 0x21c0
movq 0xad3e(%rip), %rdi      # 0xdfd8
leaq 0x6294(%rip), %rsi      # 0x9535
callq 0x21c0
movq 0xad2b(%rip), %rdi      # 0xdfd8
leaq 0x62c0(%rip), %rsi      # 0x9574
callq 0x21c0
movq 0xad18(%rip), %rdi      # 0xdfd8
leaq 0x62fc(%rip), %rsi      # 0x95c3
callq 0x21c0
movq 0xad05(%rip), %rdi      # 0xdfd8
leaq 0x6337(%rip), %rsi      # 0x9611
callq 0x21c0
movq 0xacf2(%rip), %rdi      # 0xdfd8
leaq 0x634f(%rip), %rsi      # 0x963c
callq 0x21c0
movq 0xacdf(%rip), %rdi      # 0xdfd8
leaq 0x6388(%rip), %rsi      # 0x9688
callq 0x21c0
movq 0xaccc(%rip), %rdi      # 0xdfd8
leaq 0x63ba(%rip), %rsi      # 0x96cd
callq 0x21c0
leaq 0x63f7(%rip), %rsi      # 0x9716
jmp 0x3146
jmp 0x3326
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x2060
jmp 0x3377
jmp 0x3374
jmp 0x3374
jmp 0x3374
jmp 0x3374
jmp 0x3365
jmp 0x3374
jmp 0x3374
jmp 0x3374
jmp 0x3374
jmp 0x3374
jmp 0x3365
jmp 0x3365
jmp 0x3365
jmp 0x3374
jmp 0x3374
jmp 0x3374
jmp 0x3374
jmp 0x3374
jmp 0x3374
jmp 0x3374
jmp 0x3374
jmp 0x3365
jmp 0x3365
jmp 0x3374
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x20c0
jmp 0x3377
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2300
nop