// File: ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::GameDiagram[abi:cxx11]()
string Solitaire::GameDiagram() {
	stringstream ss;
	for (int i = 0; i < 13; i++) {
		if (i < 10) {
			ss << ' ';
		}
		ss << i << ": ";
		Pile & p = piles[i];
		int size = p.UpSize();
		for (int j = size - 1; j >= 0; j--) {
			Card c = p.Up(j);
			char rank = RANKS[c.Rank];
			char suit = c.Suit != NONE ? SUITS[c.Suit] : 'X';
			ss << rank << suit << ' ';
		}
		size = p.DownSize();
		for (int j = size - 1; j >= 0; j--) {
			Card c = p.Down(j);
			char rank = RANKS[c.Rank];
			char suit = c.Suit != NONE ? SUITS[c.Suit] : 'X';
			ss << '-' << rank << suit;
		}
		ss << '\n';
	}
	ss << "Minimum Moves Needed: " << MinimumMovesLeft();
	return ss.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x1f0(%rbp)
movq %rdi, %rax
movq %rax, -0x1e8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1e0(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x3170
movl $0x0, -0x19c(%rbp)
cmpl $0xd, -0x19c(%rbp)
jge 0xdbe4
cmpl $0xa, -0x19c(%rbp)
jge 0xd913
leaq -0x188(%rbp), %rdi
movl $0x20, %esi
callq 0x32d0
jmp 0xd8ee
jmp 0xd913
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x3190
jmp 0xdc59
leaq -0x188(%rbp), %rdi
movl -0x19c(%rbp), %esi
callq 0x33b0
movq %rax, -0x1f8(%rbp)
jmp 0xd92e
movq -0x1f8(%rbp), %rdi
leaq 0x70ea(%rip), %rsi      # 0x14a26
callq 0x3230
jmp 0xd943
movq -0x1e0(%rbp), %rax
movslq -0x19c(%rbp), %rcx
imulq $0x12c, %rcx, %rcx      # imm = 0x12C
leaq 0x800(%rax,%rcx), %rax
movq %rax, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rdi
callq 0x6440
movl %eax, -0x1fc(%rbp)
jmp 0xd97b
movl -0x1fc(%rbp), %eax
movl %eax, -0x1bc(%rbp)
movl -0x1bc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1c0(%rbp)
cmpl $0x0, -0x1c0(%rbp)
jl 0xda91
movq -0x1b8(%rbp), %rdi
movl -0x1c0(%rbp), %esi
callq 0x6500
movq %rax, -0x208(%rbp)
jmp 0xd9be
movq -0x208(%rbp), %rax
movl %eax, %ecx
movl %ecx, -0x1c6(%rbp)
shrq $0x20, %rax
movw %ax, -0x1c2(%rbp)
movzbl -0x1c5(%rbp), %eax
movl %eax, %ecx
leaq 0x6ee8(%rip), %rax      # 0x148d0
movb (%rax,%rcx), %al
movb %al, -0x1c7(%rbp)
movzbl -0x1c6(%rbp), %eax
cmpl $0xff, %eax
je 0xda1a
movzbl -0x1c6(%rbp), %eax
movl %eax, %ecx
leaq 0x6ed0(%rip), %rax      # 0x148df
movb (%rax,%rcx), %al
movb %al, -0x209(%rbp)
jmp 0xda24
movb $0x58, %al
movb %al, -0x209(%rbp)
jmp 0xda24
movb -0x209(%rbp), %al
movb %al, -0x1c8(%rbp)
leaq -0x188(%rbp), %rdi
movsbl -0x1c7(%rbp), %esi
callq 0x32d0
movq %rax, -0x218(%rbp)
jmp 0xda4c
movq -0x218(%rbp), %rdi
movsbl -0x1c8(%rbp), %esi
callq 0x32d0
movq %rax, -0x220(%rbp)
jmp 0xda68
movq -0x220(%rbp), %rdi
movl $0x20, %esi
callq 0x32d0
jmp 0xda7b
jmp 0xda7d
movl -0x1c0(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c0(%rbp)
jmp 0xd996
movq -0x1b8(%rbp), %rdi
callq 0x6420
movl %eax, -0x224(%rbp)
jmp 0xdaa5
movl -0x224(%rbp), %eax
movl %eax, -0x1bc(%rbp)
movl -0x1bc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1cc(%rbp)
cmpl $0x0, -0x1cc(%rbp)
jl 0xdbbb
movq -0x1b8(%rbp), %rdi
movl -0x1cc(%rbp), %esi
callq 0x64b0
movq %rax, -0x230(%rbp)
jmp 0xdae8
movq -0x230(%rbp), %rax
movl %eax, %ecx
movl %ecx, -0x1d2(%rbp)
shrq $0x20, %rax
movw %ax, -0x1ce(%rbp)
movzbl -0x1d1(%rbp), %eax
movl %eax, %ecx
leaq 0x6dbe(%rip), %rax      # 0x148d0
movb (%rax,%rcx), %al
movb %al, -0x1d3(%rbp)
movzbl -0x1d2(%rbp), %eax
cmpl $0xff, %eax
je 0xdb44
movzbl -0x1d2(%rbp), %eax
movl %eax, %ecx
leaq 0x6da6(%rip), %rax      # 0x148df
movb (%rax,%rcx), %al
movb %al, -0x231(%rbp)
jmp 0xdb4e
movb $0x58, %al
movb %al, -0x231(%rbp)
jmp 0xdb4e
movb -0x231(%rbp), %al
movb %al, -0x1d4(%rbp)
leaq -0x188(%rbp), %rdi
movl $0x2d, %esi
callq 0x32d0
movq %rax, -0x240(%rbp)
jmp 0xdb74
movq -0x240(%rbp), %rdi
movsbl -0x1d3(%rbp), %esi
callq 0x32d0
movq %rax, -0x248(%rbp)
jmp 0xdb90
movq -0x248(%rbp), %rdi
movsbl -0x1d4(%rbp), %esi
callq 0x32d0
jmp 0xdba5
jmp 0xdba7
movl -0x1cc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1cc(%rbp)
jmp 0xdac0
leaq -0x188(%rbp), %rdi
movl $0xa, %esi
callq 0x32d0
jmp 0xdbce
jmp 0xdbd0
movl -0x19c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x19c(%rbp)
jmp 0xd8c5
leaq -0x188(%rbp), %rdi
leaq 0x6e20(%rip), %rsi      # 0x14a12
callq 0x3230
movq %rax, -0x250(%rbp)
jmp 0xdc00
movq -0x1e0(%rbp), %rdi
callq 0x8130
movl %eax, -0x254(%rbp)
jmp 0xdc14
movl -0x254(%rbp), %esi
movq -0x250(%rbp), %rdi
callq 0x33b0
jmp 0xdc28
movq -0x1f0(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x3220
jmp 0xdc3d
leaq -0x198(%rbp), %rdi
callq 0x3190
movq -0x1e8(%rbp), %rax
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq -0x1a8(%rbp), %rdi
callq 0x33d0
nopw %cs:(%rax,%rax)