// File: ShootMe[P]Klondike-Solver/KlondikeSolver.cpp
// Function: LoadGame(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Solitaire&, unsigned int&)
bool LoadGame(string const& f, Solitaire & s, unsigned int & index) {
	while (index < f.size() && f[index] == '\r' || f[index] == '\n' || f[index] == '\t' || f[index] == ' ') { index++; }
	if (index >= f.size()) { return false; }
	int gameType = 0;
	int startIndex = index;
	if (f[index] == '#') {
		while (index < f.size() && f[index++] != '\n') {}
		return false;
	} else if (f[index] == 'T' || f[index] == 't') {
		int lineCount = 0;
		while (index < f.size() && lineCount < 8) {
			if (f[index++] == '\n') { lineCount++; }
		}
		s.LoadPysol(f.substr(startIndex, index - startIndex));
	} else if (f[index] == 'G' || f[index] == 'g') {
		while (index < f.size() && f[index++] != ' ') {}
		startIndex = index;
		while (index < f.size() && f[index++] != '\n') {}
		s.Shuffle1(atoi(f.substr(startIndex, index - startIndex).c_str()));
	} else {
		while (index < f.size() && f[index++] != '\n') {}
		s.LoadSolitaire(f.substr(startIndex, index - startIndex));
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3160
movq %rax, %rcx
movq -0xa8(%rbp), %rax
cmpq %rcx, %rax
jae 0x35ed
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x32b0
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0xd, %ecx
movb %al, -0xa9(%rbp)
je 0x364f
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x32b0
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0xa, %ecx
movb %al, -0xa9(%rbp)
je 0x364f
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x32b0
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x9, %ecx
movb %al, -0xa9(%rbp)
je 0x364f
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x32b0
movsbl (%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0xa9(%rbp)
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x365b
jmp 0x366b
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x35a7
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3160
movq %rax, %rcx
movq -0xb8(%rbp), %rax
cmpq %rcx, %rax
jb 0x3699
movb $0x0, -0x1(%rbp)
jmp 0x3aae
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x32b0
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x3731
jmp 0x36c4
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0xc8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3160
movq -0xc8(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0xb9(%rbp)
jae 0x371a
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl (%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, (%rcx)
movl %eax, %eax
movl %eax, %esi
callq 0x32b0
movsbl (%rax), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0xb9(%rbp)
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0x3726
jmp 0x3728
jmp 0x36c4
movb $0x0, -0x1(%rbp)
jmp 0x3aae
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x32b0
movsbl (%rax), %eax
cmpl $0x54, %eax
je 0x3767
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x32b0
movsbl (%rax), %eax
cmpl $0x74, %eax
jne 0x384d
movl $0x0, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3160
movq -0xd8(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0xc9(%rbp)
jae 0x37a8
cmpl $0x8, -0x2c(%rbp)
setl %al
movb %al, -0xc9(%rbp)
movb -0xc9(%rbp), %al
testb $0x1, %al
jne 0x37b4
jmp 0x37e1
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl (%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, (%rcx)
movl %eax, %eax
movl %eax, %esi
callq 0x32b0
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x37df
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x376e
movq -0x18(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x10(%rbp), %rsi
movslq -0x28(%rbp), %rdx
movl %edx, %ecx
movq -0x20(%rbp), %rax
movl (%rax), %eax
subl %ecx, %eax
movl %eax, %ecx
leaq -0x50(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x3260
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rsi
callq 0xc310
jmp 0x3825
leaq -0x50(%rbp), %rdi
callq 0x3120
jmp 0x3aa8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3120
jmp 0x3abc
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x32b0
movsbl (%rax), %eax
cmpl $0x47, %eax
je 0x3883
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x32b0
movsbl (%rax), %eax
cmpl $0x67, %eax
jne 0x39d1
jmp 0x3885
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3160
movq -0xf8(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0xe9(%rbp)
jae 0x38db
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl (%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, (%rcx)
movl %eax, %eax
movl %eax, %esi
callq 0x32b0
movsbl (%rax), %eax
cmpl $0x20, %eax
setne %al
movb %al, -0xe9(%rbp)
movb -0xe9(%rbp), %al
testb $0x1, %al
jne 0x38e7
jmp 0x38e9
jmp 0x3885
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x108(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3160
movq -0x108(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0xf9(%rbp)
jae 0x3948
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl (%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, (%rcx)
movl %eax, %eax
movl %eax, %esi
callq 0x32b0
movsbl (%rax), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0xf9(%rbp)
movb -0xf9(%rbp), %al
testb $0x1, %al
jne 0x3954
jmp 0x3956
jmp 0x38f2
movq -0x18(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rsi
movslq -0x28(%rbp), %rdx
movl %edx, %ecx
movq -0x20(%rbp), %rax
movl (%rax), %eax
subl %ecx, %eax
movl %eax, %ecx
leaq -0x80(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x3260
movq -0x118(%rbp), %rdi
callq 0x30c0
movq %rax, %rdi
callq 0x3370
movq -0x110(%rbp), %rdi
movl %eax, %esi
callq 0xbae0
jmp 0x39a9
leaq -0x80(%rbp), %rdi
callq 0x3120
jmp 0x3aa6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x3120
jmp 0x3abc
jmp 0x39d3
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x128(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3160
movq -0x128(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x119(%rbp)
jae 0x3a29
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl (%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, (%rcx)
movl %eax, %eax
movl %eax, %esi
callq 0x32b0
movsbl (%rax), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0x119(%rbp)
movb -0x119(%rbp), %al
testb $0x1, %al
jne 0x3a35
jmp 0x3a37
jmp 0x39d3
movq -0x18(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x10(%rbp), %rsi
movslq -0x28(%rbp), %rdx
movl %edx, %ecx
movq -0x20(%rbp), %rax
movl (%rax), %eax
subl %ecx, %eax
movl %eax, %ecx
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x3260
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rsi
callq 0xbf50
jmp 0x3a7e
leaq -0xa0(%rbp), %rdi
callq 0x3120
jmp 0x3aa6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x3120
jmp 0x3abc
jmp 0x3aa8
jmp 0x3aaa
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x33d0
nopw %cs:(%rax,%rax)