// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::GameDiagramPysol[abi:cxx11]()
string Solitaire::GameDiagramPysol() {
	stringstream ss;
	ss << "Foundations: H-" << RANKS[piles[FOUNDATION4H].Size()] << " C-" << RANKS[piles[FOUNDATION1C].Size()] << " D-" << RANKS[piles[FOUNDATION2D].Size()] << " S-" << RANKS[piles[FOUNDATION3S].Size()];
	ss << "\nTalon: ";

	Pile & waste = piles[WASTE];
	int size = waste.UpSize();
	for (int j = size - 1; j >= 0; j--) {
		Card c = waste.Up(j);
		char rank = RANKS[c.Rank];
		char suit = c.Suit != NONE ? SUITS[c.Suit] : 'X';
		ss << rank << suit << ' ';
	}
	ss << "==> ";

	Pile & stock = piles[STOCK];
	size = stock.UpSize();
	for (int j = size - 1; j >= 0; j--) {
		Card c = stock.Up(j);
		char rank = RANKS[c.Rank];
		char suit = c.Suit != NONE ? SUITS[c.Suit] : 'X';
		ss << rank << suit << ' ';
	}
	ss << "<==";

	for (int i = TABLEAU1; i <= TABLEAU7; i++) {
		ss << "\n:";
		Pile & p = piles[i];
		size = p.DownSize();
		for (int j = 0; j < size; j++) {
			Card c = p.Down(j);
			char rank = RANKS[c.Rank];
			char suit = c.Suit != NONE ? SUITS[c.Suit] : 'X';
			ss << " <" << rank << suit << ">";
		}
		size = p.UpSize();
		for (int j = 0; j < size; j++) {
			Card c = p.Up(j);
			char rank = RANKS[c.Rank];
			char suit = c.Suit != NONE ? SUITS[c.Suit] : 'X';
			ss << ' ' << rank << suit;
		}
	}

	return ss.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %r12
movq %rdi, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x2120
leaq 0x30(%rsp), %rdi
leaq 0x2334(%rip), %rsi      # 0x9915
callq 0x21c0
movq %rax, %rbx
leaq 0x1610(%r12), %rdi
callq 0x3874
cltq
leaq 0x2268(%rip), %rcx      # 0x9867
movsbl (%rax,%rcx), %esi
movq %rbx, %rdi
callq 0x2210
leaq 0x2313(%rip), %rsi      # 0x9925
movq %rax, %rdi
callq 0x21c0
movq %rax, %rbx
leaq 0x128c(%r12), %rdi
callq 0x3874
cltq
leaq 0x2234(%rip), %rcx      # 0x9867
movsbl (%rax,%rcx), %esi
movq %rbx, %rdi
callq 0x2210
leaq 0x22e3(%rip), %rsi      # 0x9929
movq %rax, %rdi
callq 0x21c0
movq %rax, %rbx
leaq 0x13b8(%r12), %rdi
callq 0x3874
cltq
leaq 0x2200(%rip), %rcx      # 0x9867
movsbl (%rax,%rcx), %esi
movq %rbx, %rdi
callq 0x2210
leaq 0x22b3(%rip), %rsi      # 0x992d
movq %rax, %rdi
callq 0x21c0
movq %rax, %rbx
leaq 0x14e4(%r12), %rdi
callq 0x3874
cltq
leaq 0x21cc(%rip), %rcx      # 0x9867
movsbl (%rax,%rcx), %esi
movq %rbx, %rdi
callq 0x2210
leaq 0x2283(%rip), %rsi      # 0x9931
leaq 0x30(%rsp), %rdi
callq 0x21c0
leaq 0x800(%r12), %rdi
movq %rdi, 0x10(%rsp)
callq 0x3884
movl %eax, %ebx
movl $0xff, %r14d
pushq $0x20
popq %rbp
testl %ebx, %ebx
jle 0x7730
decl %ebx
movq 0x10(%rsp), %rdi
movl %ebx, %esi
callq 0x38c2
movq %rax, %rcx
andq %r14, %rcx
movb $0x58, %r15b
cmpq %r14, %rcx
je 0x7700
leaq 0x2258(%rip), %rdx      # 0x9954
movb (%rcx,%rdx), %r15b
movzbl %ah, %eax
leaq 0x215d(%rip), %rcx      # 0x9867
movsbl (%rax,%rcx), %esi
leaq 0x30(%rsp), %rdi
callq 0x2210
movsbl %r15b, %esi
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
movl %ebp, %esi
callq 0x2210
jmp 0x76d5
leaq 0x2203(%rip), %rsi      # 0x993a
leaq 0x30(%rsp), %rdi
callq 0x21c0
addq $0x1160, %r12           # imm = 0x1160
movq %r12, %rdi
callq 0x3884
movl %eax, %ebx
movl $0xff, %r14d
pushq $0x20
popq %rbp
testl %ebx, %ebx
jle 0x77b4
decl %ebx
movq %r12, %rdi
movl %ebx, %esi
callq 0x38c2
movq %rax, %rcx
andq %r14, %rcx
movb $0x58, %r15b
cmpq %r14, %rcx
je 0x7784
leaq 0x21d4(%rip), %rdx      # 0x9954
movb (%rcx,%rdx), %r15b
movzbl %ah, %eax
leaq 0x20d9(%rip), %rcx      # 0x9867
movsbl (%rax,%rcx), %esi
leaq 0x30(%rsp), %rdi
callq 0x2210
movsbl %r15b, %esi
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
movl %ebp, %esi
callq 0x2210
jmp 0x775b
leaq 0x2184(%rip), %rsi      # 0x993f
leaq 0x30(%rsp), %rdi
callq 0x21c0
pushq $0x1
popq %rax
movl $0xff, %ebp
movq %rax, 0x18(%rsp)
cmpq $0x8, %rax
je 0x7901
leaq 0x30(%rsp), %rdi
leaq 0x215b(%rip), %rsi      # 0x9943
callq 0x21c0
imulq $0x12c, 0x18(%rsp), %r12 # imm = 0x12C
addq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x387c
movl %eax, %r15d
xorl %r14d, %r14d
testl %eax, %eax
cmovlel %r14d, %r15d
cmpl %r14d, %r15d
je 0x7881
movq %r12, %rdi
movl %r14d, %esi
callq 0x38aa
movq %rax, %rcx
andq %rbp, %rcx
movb $0x58, %r13b
cmpq %rbp, %rcx
je 0x7838
leaq 0x2120(%rip), %rdx      # 0x9954
movb (%rcx,%rdx), %r13b
movzbl %ah, %eax
leaq 0x2025(%rip), %rcx      # 0x9867
movb (%rax,%rcx), %bl
leaq 0x30(%rsp), %rdi
leaq 0x20f5(%rip), %rsi      # 0x9946
callq 0x21c0
movsbl %bl, %esi
movq %rax, %rdi
callq 0x2210
movsbl %r13b, %esi
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
leaq 0x20d2(%rip), %rsi      # 0x9949
callq 0x21c0
incl %r14d
jmp 0x780f
movq %r12, %rdi
callq 0x3884
movl %eax, %r14d
xorl %r15d, %r15d
testl %eax, %eax
cmovlel %r15d, %r14d
cmpl %r15d, %r14d
je 0x78f4
movq %r12, %rdi
movl %r15d, %esi
callq 0x38c2
movq %rax, %rcx
andq %rbp, %rcx
movb $0x58, %r13b
cmpq %rbp, %rcx
je 0x78be
leaq 0x209a(%rip), %rdx      # 0x9954
movb (%rcx,%rdx), %r13b
movzbl %ah, %eax
leaq 0x1f9f(%rip), %rcx      # 0x9867
movb (%rax,%rcx), %bl
leaq 0x30(%rsp), %rdi
pushq $0x20
popq %rsi
callq 0x2210
movsbl %bl, %esi
movq %rax, %rdi
callq 0x2210
movsbl %r13b, %esi
movq %rax, %rdi
callq 0x2210
incl %r15d
jmp 0x7895
movq 0x18(%rsp), %rax
incq %rax
jmp 0x77cd
leaq 0x38(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x22a0
leaq 0x20(%rsp), %rdi
callq 0x2140
movq 0x8(%rsp), %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7949
jmp 0x7949
jmp 0x7949
jmp 0x7949
jmp 0x7949
jmp 0x7949
jmp 0x7949
jmp 0x7949
jmp 0x7949
jmp 0x7949
jmp 0x7949
jmp 0x7949
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x2300