// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
movq (%rdi), %rdi
movq 0x8(%rsi), %r8
movl (%rdx), %r9d
movabsq $0x100000600, %rax      # imm = 0x100000600
movl %r9d, %r9d
cmpq %r9, %r8
jbe 0x248c
cmpb $0xd, (%rdi,%r9)
je 0x249d
movzbl (%rdi,%r9), %ecx
cmpq $0x20, %rcx
ja 0x24a5
btq %rcx, %rax
jae 0x24a5
incl %r9d
movl %r9d, (%rdx)
jmp 0x247d
cmpq %r9, %r8
jbe 0x2500
cmpl $0x23, %ecx
setne %al
je 0x2507
cmpl $0x66, %ecx
jg 0x2524
cmpl $0x47, %ecx
je 0x2579
cmpl $0x54, %ecx
je 0x252e
movl (%rdx), %eax
movl %eax, %ecx
cmpq %rcx, %r8
jbe 0x24d9
leal 0x1(%rcx), %eax
movl %eax, (%rdx)
cmpb $0xa, (%rdi,%rcx)
jne 0x24c7
movslq %r9d, %rax
movl (%rdx), %ecx
subl %eax, %ecx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rax, %rdx
callq 0x21e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x747a
jmp 0x25cd
xorl %eax, %eax
jmp 0x25ea
movl (%rdx), %esi
movl %esi, %ecx
cmpq %rcx, %r8
jbe 0x25ea
leal 0x1(%rcx), %esi
movl %esi, (%rdx)
cmpb $0xa, (%rdi,%rcx)
jne 0x2509
jmp 0x25ea
cmpl $0x67, %ecx
je 0x2579
cmpl $0x74, %ecx
jne 0x24c5
movl (%rdx), %ecx
cmpq %rcx, %r8
jbe 0x255a
xorl %eax, %eax
movq %rcx, %r11
incl %ecx
movl %ecx, (%rdx)
xorl %r10d, %r10d
cmpb $0xa, (%rdi,%r11)
sete %r11b
cmpq %rcx, %r8
jbe 0x255a
movb %r11b, %r10b
addl %r10d, %eax
cmpl $0x8, %eax
jb 0x2537
movslq %r9d, %rdx
subl %edx, %ecx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x21e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x76e2
jmp 0x25cd
movl (%rdx), %ecx
movl %ecx, %eax
cmpq %rax, %r8
jbe 0x258d
leal 0x1(%rax), %ecx
movl %ecx, (%rdx)
cmpb $0x20, (%rdi,%rax)
jne 0x257b
movl (%rdx), %ecx
movslq %ecx, %rax
movl %ecx, %r9d
cmpq %r9, %r8
jbe 0x25a7
leal 0x1(%r9), %ecx
movl %ecx, (%rdx)
cmpb $0xa, (%rdi,%r9)
jne 0x2592
movl (%rdx), %ecx
subl %eax, %ecx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rax, %rdx
callq 0x21e0
movq (%r14), %rdi
callq 0x2270
movq %rbx, %rdi
movl %eax, %esi
callq 0x71a8
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25e8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x25f6
jmp 0x25f6
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2614
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x22e0