// File: /workspace/github_cpp_makefile_star2_O1/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 $0x3278, %rsp           # imm = 0x3278
movq %rsi, %rbx
movl %edi, %r15d
xorl %r14d, %r14d
leaq (%rsp,%r14), %rdi
addq $0x1960, %rdi           # imm = 0x1960
callq 0x373c
addq $0x4, %r14
cmpq $0x800, %r14            # imm = 0x800
jne 0x2636
movl $0x1874, %r14d          # imm = 0x1874
leaq (%rsp,%r14), %rdi
addq $0x1960, %rdi           # imm = 0x1960
callq 0x373c
addq $0x4, %r14
cmpq $0x18f4, %r14           # imm = 0x18F4
jne 0x2659
leaq 0x3254(%rsp), %rdi
callq 0x9c06
leaq 0x1960(%rsp), %rdi
callq 0x741c
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
cmpl $0x2, %r15d
setge %r14b
jl 0x2d1b
movl $0x1, 0x20(%rsp)
movq $0x0, 0x10(%rsp)
leaq 0x48(%rsp), %rbp
movl $0x0, 0x18(%rsp)
movl $0x0, 0x8(%rsp)
movl $0x1, %r13d
movl $0x0, 0x4(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x24(%rsp)
movslq %r13d, %rax
movq (%rbx,%rax,8), %r12
movq %r12, %rdi
leaq 0x790d(%rip), %rsi      # 0xa014
callq 0x21f0
testl %eax, %eax
je 0x2acf
movq %r12, %rdi
leaq 0x78fc(%rip), %rsi      # 0xa01a
callq 0x21f0
testl %eax, %eax
je 0x2acf
movq %r12, %rdi
leaq 0x78eb(%rip), %rsi      # 0xa020
callq 0x21f0
testl %eax, %eax
je 0x2acf
movq %r12, %rdi
leaq 0x78d8(%rip), %rsi      # 0xa024
callq 0x21f0
testl %eax, %eax
je 0x2acf
movq %r12, %rdi
leaq 0x7912(%rip), %rsi      # 0xa075
callq 0x21f0
testl %eax, %eax
je 0x2b3f
movq %r12, %rdi
leaq 0x7901(%rip), %rsi      # 0xa07b
callq 0x21f0
testl %eax, %eax
je 0x2b3f
movq %r12, %rdi
leaq 0x78f0(%rip), %rsi      # 0xa081
callq 0x21f0
testl %eax, %eax
je 0x2b3f
movq %r12, %rdi
leaq 0x78dc(%rip), %rsi      # 0xa084
callq 0x21f0
testl %eax, %eax
je 0x2b3f
movq %r12, %rdi
leaq 0x7935(%rip), %rsi      # 0xa0f4
callq 0x21f0
testl %eax, %eax
je 0x2bb2
movq %r12, %rdi
leaq 0x7924(%rip), %rsi      # 0xa0fa
callq 0x21f0
testl %eax, %eax
je 0x2bb2
movq %r12, %rdi
leaq 0x7913(%rip), %rsi      # 0xa100
callq 0x21f0
testl %eax, %eax
je 0x2bb2
movq %r12, %rdi
leaq 0x78ff(%rip), %rsi      # 0xa103
callq 0x21f0
testl %eax, %eax
je 0x2bb2
movq %r12, %rdi
leaq 0x7929(%rip), %rsi      # 0xa144
callq 0x21f0
testl %eax, %eax
je 0x2bf0
movq %r12, %rdi
leaq 0x7917(%rip), %rsi      # 0xa149
callq 0x21f0
testl %eax, %eax
je 0x2bf0
movq %r12, %rdi
leaq 0x7905(%rip), %rsi      # 0xa14e
callq 0x21f0
testl %eax, %eax
je 0x2bf0
movq %r12, %rdi
leaq 0x78f1(%rip), %rsi      # 0xa151
callq 0x21f0
testl %eax, %eax
je 0x2bf0
movq %r12, %rdi
leaq 0x7941(%rip), %rsi      # 0xa1b8
callq 0x21f0
testl %eax, %eax
je 0x2c1a
movq %r12, %rdi
leaq 0x7932(%rip), %rsi      # 0xa1c0
callq 0x21f0
testl %eax, %eax
je 0x2c1a
movq %r12, %rdi
leaq 0x7923(%rip), %rsi      # 0xa1c8
callq 0x21f0
testl %eax, %eax
je 0x2c1a
movq %r12, %rdi
leaq 0x790f(%rip), %rsi      # 0xa1cb
callq 0x21f0
testl %eax, %eax
je 0x2c1a
movq %r12, %rdi
leaq 0x7947(%rip), %rsi      # 0xa21a
callq 0x21f0
testl %eax, %eax
je 0x2c43
movq %r12, %rdi
leaq 0x7936(%rip), %rsi      # 0xa220
callq 0x21f0
testl %eax, %eax
je 0x2c43
movq %r12, %rdi
leaq 0x7925(%rip), %rsi      # 0xa226
callq 0x21f0
testl %eax, %eax
je 0x2c43
movq %r12, %rdi
leaq 0x7911(%rip), %rsi      # 0xa229
callq 0x21f0
testl %eax, %eax
je 0x2c43
movq %r12, %rdi
leaq 0x78fd(%rip), %rsi      # 0xa22c
callq 0x21f0
testl %eax, %eax
je 0x2c60
movq %r12, %rdi
leaq 0x78e9(%rip), %rsi      # 0xa22f
callq 0x21f0
testl %eax, %eax
je 0x2c60
movq %r12, %rdi
leaq 0x78d5(%rip), %rsi      # 0xa232
callq 0x21f0
testl %eax, %eax
je 0x2c60
movq %r12, %rdi
leaq 0x78c5(%rip), %rsi      # 0xa239
callq 0x21f0
testl %eax, %eax
je 0x2c60
movq %r12, %rdi
leaq 0x7905(%rip), %rsi      # 0xa290
callq 0x21f0
testl %eax, %eax
je 0x2c8d
movq %r12, %rdi
leaq 0x78f3(%rip), %rsi      # 0xa295
callq 0x21f0
testl %eax, %eax
je 0x2c8d
movq %r12, %rdi
leaq 0x78e1(%rip), %rsi      # 0xa29a
callq 0x21f0
testl %eax, %eax
je 0x2c8d
movq %r12, %rdi
leaq 0x78d1(%rip), %rsi      # 0xa2a1
callq 0x21f0
testl %eax, %eax
je 0x2c8d
movq %r12, %rdi
leaq 0x78c1(%rip), %rsi      # 0xa2a8
callq 0x21f0
testl %eax, %eax
je 0x2c98
movq %r12, %rdi
leaq 0x78ad(%rip), %rsi      # 0xa2ab
callq 0x21f0
testl %eax, %eax
je 0x2c98
movq %r12, %rdi
leaq 0x7899(%rip), %rsi      # 0xa2ae
callq 0x21f0
testl %eax, %eax
je 0x3453
movq %r12, %rdi
leaq 0x7885(%rip), %rsi      # 0xa2b1
callq 0x21f0
testl %eax, %eax
je 0x3453
movq %r12, %rdi
leaq 0x786c(%rip), %rsi      # 0xa2af
callq 0x21f0
testl %eax, %eax
je 0x3453
movq %r12, %rdi
leaq 0x785a(%rip), %rsi      # 0xa2b4
callq 0x21f0
testl %eax, %eax
je 0x3453
movq %r12, %rdi
leaq 0x7849(%rip), %rsi      # 0xa2ba
callq 0x21f0
testl %eax, %eax
je 0x3453
testb $0x1, 0x10(%rsp)
jne 0x3385
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
movl $0xc, %edx
callq 0x2300
movq 0x48(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x68(%rsp,%rax), %ebp
testb $0x5, %bpl
je 0x2ca3
movl $0x2d, %edx
movq 0xb51a(%rip), %rdi      # 0xdfd8
leaq 0x7c9f(%rip), %rsi      # 0xa764
callq 0x2200
jmp 0x2cf8
leal 0x1(%r13), %r12d
cmpl %r15d, %r12d
jge 0x2d4d
movslq %r12d, %rax
movq (%rbx,%rax,8), %rdi
callq 0x2270
leal -0x1(%rax), %ebp
cmpl $0xc, %ebp
jae 0x2b04
leaq 0x1960(%rsp), %rdi
movl %eax, %esi
callq 0x7bca
movl %r12d, %r13d
jmp 0x2b1c
movl $0x2f, %edx
movq 0xb4c8(%rip), %rdi      # 0xdfd8
leaq 0x752e(%rip), %rsi      # 0xa045
callq 0x2200
cmpl $0xc, %ebp
leaq 0x48(%rsp), %rbp
jae 0x2d65
incl %r13d
cmpl %r15d, %r13d
setl %r14b
jl 0x26f6
jmp 0x2d65
incl %r13d
cmpl %r15d, %r13d
jge 0x3396
testb $0x1, 0x10(%rsp)
jne 0x3385
movslq %r13d, %rax
movq (%rbx,%rax,8), %rsi
movq %rbp, %rdi
leaq 0x1c(%rsp), %rdx
callq 0x366c
leaq 0x1960(%rsp), %rdi
movq %rbp, %rsi
callq 0x747a
movl %eax, %ebp
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2b98
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21d0
movb $0x1, %al
movq %rax, 0x10(%rsp)
testb %bpl, %bpl
je 0x33a7
leaq 0x48(%rsp), %rbp
jmp 0x2b2a
incl %r13d
cmpl %r15d, %r13d
jge 0x33b8
testb $0x1, 0x10(%rsp)
jne 0x3385
movslq %r13d, %rax
movq (%rbx,%rax,8), %rdi
callq 0x2270
movb $0x1, %cl
movq %rcx, 0x10(%rsp)
leaq 0x1960(%rsp), %rdi
movl %eax, %esi
callq 0x71a8
jmp 0x2b2a
incl %r13d
cmpl %r15d, %r13d
jge 0x33c9
movslq %r13d, %rax
movq (%rbx,%rax,8), %rdi
callq 0x2270
movl %eax, 0x18(%rsp)
cmpl $0x3, %eax
jb 0x2b2a
jmp 0x33da
incl %r13d
cmpl %r15d, %r13d
jge 0x33f7
movslq %r13d, %rax
movq (%rbx,%rax,8), %rdi
callq 0x2270
movl %eax, 0x8(%rsp)
testl %eax, %eax
jns 0x2b2a
jmp 0x3408
movl 0x8(%rsp), %eax
testl %eax, %eax
movl $0x30d40, %ecx          # imm = 0x30D40
cmovel %ecx, %eax
movl %eax, 0x8(%rsp)
movb $0x1, %al
movl %eax, 0x24(%rsp)
jmp 0x2b2a
incl %r13d
cmpl %r15d, %r13d
jge 0x3425
movslq %r13d, %rax
movq (%rbx,%rax,8), %rdi
callq 0x2270
movl %eax, 0x20(%rsp)
addl $-0x64, %eax
cmpl $-0x63, %eax
ja 0x2ba8
jmp 0x3436
movb $0x1, %al
movl %eax, 0x4(%rsp)
jmp 0x2ba8
movb $0x1, %al
movl %eax, 0xc(%rsp)
jmp 0x2ba8
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2220
leaq 0x48(%rsp), %rdi
callq 0x22d0
movl %eax, %esi
leaq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0x2090
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2220
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x2210
leaq 0x48(%rsp), %rdi
callq 0x2050
leaq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0x2060
movb $0x1, %al
movq %rax, 0x10(%rsp)
testb $0x5, %bpl
movq %r12, %rbp
je 0x2b2a
jmp 0x2d65
movl $0x0, 0x24(%rsp)
movl $0x1, 0x20(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x4(%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x18(%rsp)
jmp 0x2d65
movl $0x1c, %edx
leaq 0x72cf(%rip), %rsi      # 0xa028
movq 0xb278(%rip), %rdi      # 0xdfd8
callq 0x2200
testb $0x1, %r14b
jne 0x3355
movl 0x8(%rsp), %eax
testl %eax, %eax
movl $0x4c4b40, %ecx         # imm = 0x4C4B40
cmovnel %eax, %ecx
movl %ecx, 0x10(%rsp)
leaq 0x1c(%rsp), %rax
movl $0x0, (%rax)
movl 0xc(%rsp), %eax
xorb $0x1, %al
movl %eax, 0xc(%rsp)
movl 0x4(%rsp), %eax
xorb $0x1, %al
movb %al, 0x8(%rsp)
leaq 0x1960(%rsp), %r13
movq 0xb229(%rip), %r14      # 0xdfd8
movl 0x1c(%rsp), %eax
cmpq %rax, 0x30(%rsp)
jbe 0x2dd4
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
leaq 0x1c(%rsp), %rdx
callq 0x245c
testb %al, %al
je 0x3346
movq %r13, %rdi
callq 0x4298
movl 0x18(%rsp), %eax
testl %eax, %eax
je 0x2e22
cmpl $0x1, %eax
jne 0x2e71
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x84c0
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r14, %rdi
callq 0x2200
movl $0x2, %edx
movq %rax, %rdi
leaq 0x761e(%rip), %rsi      # 0xa439
callq 0x2200
jmp 0x2e55
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x8236
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r14, %rdi
callq 0x2200
movl $0x2, %edx
movq %rax, %rdi
leaq 0x75e9(%rip), %rsi      # 0xa439
callq 0x2200
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2e71
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21d0
callq 0x2110
movq %rax, %r12
testb $0x1, 0x24(%rsp)
je 0x2ff1
movq %r13, %rdi
movl 0x10(%rsp), %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5bfe
cmpl $0x1, %eax
je 0x2ea4
movl $0x200, %r15d           # imm = 0x200
cmpl $-0x1, %eax
jne 0x2eaf
movq %r13, %rdi
callq 0x4bfc
movl %eax, %r15d
movq %r13, %rdi
callq 0x4c9c
movl %eax, %ebp
movl $0x1918, %edx           # imm = 0x1918
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x2180
movq %r13, %rdi
callq 0x4298
movq %r13, %rdi
movl 0x10(%rsp), %esi
xorl %edx, %edx
movl $0x4, %ecx
callq 0x5bfe
cmpl $0x1, %eax
je 0x2ef0
cmpl $-0x1, %eax
jne 0x2f24
movq %r13, %rdi
callq 0x4bfc
cmpl %r15d, %eax
jge 0x2f24
movl $0x1918, %edx           # imm = 0x1918
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x2180
movq %r13, %rdi
callq 0x4bfc
movl %eax, %r15d
movq %r13, %rdi
callq 0x4c9c
movl %eax, %ebp
movq %r13, %rdi
callq 0x4c9c
cmpl %ebp, %eax
jle 0x2f4c
movl $0x1918, %edx           # imm = 0x1918
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x2180
movq %r13, %rdi
callq 0x4c9c
movl %eax, %ebp
movq %r13, %rdi
callq 0x4298
movq %r13, %rdi
movl 0x10(%rsp), %esi
movl $0x1, %edx
movl $0x4, %ecx
callq 0x5bfe
movl %eax, %ebx
cmpl $0x1, %eax
je 0x2f76
cmpl $-0x1, %ebx
jne 0x2fa7
movq %r13, %rdi
callq 0x4bfc
cmpl %r15d, %eax
jge 0x2fa7
movl $0x1918, %edx           # imm = 0x1918
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x2180
movq %r13, %rdi
callq 0x4bfc
movq %r13, %rdi
callq 0x4c9c
movl %eax, %ebp
movq %r13, %rdi
callq 0x4c9c
cmpl %ebp, %eax
jle 0x2fcf
movl $0x1918, %edx           # imm = 0x1918
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x2180
movq %r13, %rdi
callq 0x4c9c
movl %eax, %ebp
movq %r12, %r15
movl $0x1918, %edx           # imm = 0x1918
movq %r13, %rdi
leaq 0x48(%rsp), %rsi
callq 0x2180
cmpl $0x34, %ebp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovel %eax, %ebx
jmp 0x3019
movl 0x20(%rsp), %esi
cmpl $0x2, %esi
jl 0x3008
movq %r13, %rdi
movl 0x10(%rsp), %edx
callq 0x66f2
jmp 0x3014
movq %r13, %rdi
movl 0x10(%rsp), %esi
callq 0x6762
movl %eax, %ebx
movq %r12, %r15
movb $0x1, %r12b
addl $0x2, %ebx
cmpl $0x3, %ebx
ja 0x312f
leaq 0x6fd5(%rip), %rcx      # 0xa004
movslq (%rcx,%rbx,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x21, %edx
movq %r14, %rdi
leaq 0x779d(%rip), %rsi      # 0xa7e4
callq 0x2200
movq %r13, %rdi
callq 0x4c9c
movq %r14, %rdi
movl %eax, %esi
callq 0x22c0
movq %rax, %rbx
movl $0x4, %edx
movq %rax, %rdi
leaq 0x776f(%rip), %rsi      # 0xa7df
callq 0x2200
movq %r13, %rdi
callq 0x4bfc
jmp 0x30c4
movl $0x24, %edx
movq %r14, %rdi
leaq 0x772c(%rip), %rsi      # 0xa7ba
callq 0x2200
movq %r13, %rdi
callq 0x4c9c
movq %r14, %rdi
movl %eax, %esi
callq 0x22c0
movq %rax, %rbx
movl $0x4, %edx
movq %rax, %rdi
leaq 0x7728(%rip), %rsi      # 0xa7df
callq 0x2200
movq %r13, %rdi
callq 0x4bfc
movq %rbx, %rdi
movl %eax, %esi
callq 0x22c0
movl $0x7, %edx
movq %rax, %rdi
leaq 0x76ca(%rip), %rsi      # 0xa7a7
callq 0x2200
jmp 0x312f
movl $0x14, %edx
leaq 0x76a2(%rip), %rsi      # 0xa792
jmp 0x30fe
movl $0xa, %edx
leaq 0x76b1(%rip), %rsi      # 0xa7af
movq %r14, %rdi
callq 0x2200
movq %r13, %rdi
callq 0x4bfc
movq %r14, %rdi
movl %eax, %esi
callq 0x22c0
movl $0x7, %edx
movq %rax, %rdi
leaq 0x7680(%rip), %rsi      # 0xa7a7
callq 0x2200
xorl %r12d, %r12d
movl $0x6, %edx
movq %r14, %rdi
leaq 0x76c8(%rip), %rsi      # 0xa806
callq 0x2200
callq 0x2110
subq %r15, %rax
movq %r14, %rdi
movq %rax, %rsi
callq 0x21b0
movl $0x5, %edx
movq %rax, %rdi
leaq 0x76a8(%rip), %rsi      # 0xa80d
callq 0x2200
cmpl $0x1, 0x18(%rsp)
jg 0x32cf
movl %r12d, %eax
orb 0xc(%rsp), %al
testb $0x1, %al
jne 0x32cf
movq %r13, %rdi
callq 0x4ca4
movl %eax, %r15d
movq %r13, %rdi
callq 0x4298
testl %r15d, %r15d
jle 0x32bb
xorl %ebp, %ebp
movl $0x29, %edx
movq %r14, %rdi
leaq 0x7662(%rip), %rsi      # 0xa813
callq 0x2200
movq %r13, %rdi
movl %ebp, %esi
callq 0x4cac
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x7bd2
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r14, %rdi
callq 0x2200
movl $0x2, %edx
movq %rax, %rdi
leaq 0x7249(%rip), %rsi      # 0xa439
callq 0x2200
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3211
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21d0
movq %r13, %rdi
movl %ebp, %esi
callq 0x4cac
movq %r13, %rdi
movl %eax, %esi
callq 0x42a4
cmpl $0x0, 0x18(%rsp)
je 0x3261
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x84c0
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r14, %rdi
callq 0x2200
movl $0x2, %edx
movq %rax, %rdi
leaq 0x71df(%rip), %rsi      # 0xa439
callq 0x2200
jmp 0x3294
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x8236
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r14, %rdi
callq 0x2200
movl $0x2, %edx
movq %rax, %rdi
leaq 0x71aa(%rip), %rsi      # 0xa439
callq 0x2200
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x32b0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21d0
incl %ebp
cmpl %ebp, %r15d
jne 0x31a2
movl $0x29, %edx
movq %r14, %rdi
leaq 0x7549(%rip), %rsi      # 0xa813
callq 0x2200
orb 0x8(%rsp), %r12b
testb $0x1, %r12b
je 0x32f7
testb $0x1, 0x4(%rsp)
je 0x3346
movl $0x1, %edx
movq %r14, %rdi
leaq 0x714a(%rip), %rsi      # 0xa43a
callq 0x2200
jmp 0x3346
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x900c
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r14, %rdi
callq 0x2200
movl $0x2, %edx
movq %rax, %rdi
leaq 0x7114(%rip), %rsi      # 0xa439
callq 0x2200
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3346
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21d0
movl 0x1c(%rsp), %eax
cmpq %rax, 0x30(%rsp)
ja 0x2daf
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3371
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21d0
xorl %eax, %eax
addq $0x3278, %rsp           # imm = 0x3278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x32, %edx
leaq 0x6d15(%rip), %rsi      # 0xa0a6
jmp 0x2d59
movl $0x1e, %edx
leaq 0x6ce5(%rip), %rsi      # 0xa087
jmp 0x2d59
movl $0x1a, %edx
leaq 0x6d26(%rip), %rsi      # 0xa0d9
jmp 0x2d59
movl $0x3d, %edx
leaq 0x6d42(%rip), %rsi      # 0xa106
jmp 0x2d59
movl $0x2f, %edx
leaq 0x6d7f(%rip), %rsi      # 0xa154
jmp 0x2d59
movq 0xabf7(%rip), %rdi      # 0xdfd8
leaq 0x6d9c(%rip), %rsi      # 0xa184
movl $0x33, %edx
callq 0x2200
jmp 0x2d65
movl $0x1c, %edx
leaq 0x6dcb(%rip), %rsi      # 0xa1ce
jmp 0x2d59
movq 0xabc9(%rip), %rdi      # 0xdfd8
leaq 0x6dd5(%rip), %rsi      # 0xa1eb
movl $0x2e, %edx
callq 0x2200
jmp 0x2d65
movl $0x23, %edx
leaq 0x6e0f(%rip), %rsi      # 0xa240
jmp 0x2d59
movq 0xab9b(%rip), %rdi      # 0xdfd8
leaq 0x6e20(%rip), %rsi      # 0xa264
movl $0x2b, %edx
callq 0x2200
jmp 0x2d65
movq 0xab7e(%rip), %rdi      # 0xdfd8
leaq 0x6e5f(%rip), %rsi      # 0xa2c0
movl $0x64, %edx
callq 0x2200
movq 0xab66(%rip), %rdi      # 0xdfd8
leaq 0x6eac(%rip), %rsi      # 0xa325
movl $0x47, %edx
callq 0x2200
movq 0xab4e(%rip), %rdi      # 0xdfd8
leaq 0x6edc(%rip), %rsi      # 0xa36d
movl $0x51, %edx
callq 0x2200
movq 0xab36(%rip), %rdi      # 0xdfd8
leaq 0x6f16(%rip), %rsi      # 0xa3bf
movl $0x41, %edx
callq 0x2200
movq 0xab1e(%rip), %rdi      # 0xdfd8
leaq 0x6f40(%rip), %rsi      # 0xa401
movl $0x3a, %edx
callq 0x2200
movq 0xab06(%rip), %rdi      # 0xdfd8
leaq 0x6f63(%rip), %rsi      # 0xa43c
movl $0x3d, %edx
callq 0x2200
movq 0xaaee(%rip), %rdi      # 0xdfd8
leaq 0x6f89(%rip), %rsi      # 0xa47a
movl $0x45, %edx
callq 0x2200
movq 0xaad6(%rip), %rdi      # 0xdfd8
leaq 0x6fb7(%rip), %rsi      # 0xa4c0
movl $0x37, %edx
callq 0x2200
movq 0xaabe(%rip), %rdi      # 0xdfd8
leaq 0x6fd7(%rip), %rsi      # 0xa4f8
movl $0x3c, %edx
callq 0x2200
movq 0xaaa6(%rip), %rdi      # 0xdfd8
leaq 0x6ffc(%rip), %rsi      # 0xa535
movl $0x3e, %edx
callq 0x2200
movq 0xaa8e(%rip), %rdi      # 0xdfd8
leaq 0x7023(%rip), %rsi      # 0xa574
movl $0x4e, %edx
callq 0x2200
movq 0xaa76(%rip), %rdi      # 0xdfd8
leaq 0x705a(%rip), %rsi      # 0xa5c3
movl $0x4d, %edx
callq 0x2200
movq 0xaa5e(%rip), %rdi      # 0xdfd8
leaq 0x7090(%rip), %rsi      # 0xa611
movl $0x2a, %edx
callq 0x2200
movq 0xaa46(%rip), %rdi      # 0xdfd8
leaq 0x70a3(%rip), %rsi      # 0xa63c
movl $0x4b, %edx
callq 0x2200
movq 0xaa2e(%rip), %rdi      # 0xdfd8
leaq 0x70d7(%rip), %rsi      # 0xa688
movl $0x44, %edx
callq 0x2200
movq 0xaa16(%rip), %rdi      # 0xdfd8
leaq 0x7104(%rip), %rsi      # 0xa6cd
movl $0x48, %edx
callq 0x2200
movl $0x4d, %edx
leaq 0x7137(%rip), %rsi      # 0xa716
jmp 0x2d59
jmp 0x35e6
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2060
jmp 0x3647
jmp 0x3644
jmp 0x3644
jmp 0x3644
jmp 0x3623
jmp 0x3644
jmp 0x3644
jmp 0x3644
jmp 0x3644
jmp 0x3644
jmp 0x3644
jmp 0x3623
jmp 0x3623
jmp 0x3623
jmp 0x3644
jmp 0x3644
jmp 0x3644
jmp 0x3644
jmp 0x3644
jmp 0x3644
jmp 0x3623
jmp 0x3644
jmp 0x3623
jmp 0x3644
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3647
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x3647
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3663
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x22e0
nop