// File: ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: AddMove(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&, Move, int, int, int, bool)
void AddMove(stringstream & ss, Move m, int stockSize, int wasteSize, int drawCount, bool combine) {
	if (m.Extra > 0) {
		if (m.From != WASTE) {
			if (m.Count > 1) {
				if (!combine) {
					ss << PILES[m.From] << PILES[m.To] << '-' << (int)m.Count << " F" << (int)m.From << ' ';
				} else {
					ss << '[' << PILES[m.From] << PILES[m.To] << '-' << (int)m.Count << " F" << (int)m.From << "] ";
				}
			} else if (!combine) {
				ss << PILES[m.From] << PILES[m.To] << " F" << (int)m.From << ' ';
			} else {
				ss << '[' << PILES[m.From] << PILES[m.To] << " F" << (int)m.From << "] ";
			}
		} else if (!combine) {
			if (m.Extra <= stockSize) {
				ss << "DR" << (m.Extra / drawCount + ((m.Extra % drawCount) == 0 ? 0 : 1)) << ' ' << PILES[m.From] << PILES[m.To] << ' ';
			} else {
				int temp = stockSize / drawCount + ((stockSize % drawCount) == 0 ? 0 : 1);
				if (temp != 0) { ss << "DR" << temp << ' '; }
				ss << "NEW ";
				temp = m.Extra - stockSize - stockSize - wasteSize;
				temp = temp / drawCount + ((temp % drawCount) == 0 ? 0 : 1);
				ss << "DR" << temp << ' ' << PILES[m.From] << PILES[m.To] << ' ';
			}
		} else if (m.Extra <= stockSize) {
			ss << "[DR" << (m.Extra / drawCount + ((m.Extra % drawCount) == 0 ? 0 : 1)) << ' ' << PILES[m.From] << PILES[m.To] << "] ";
		} else {
			int temp = m.Extra - stockSize - stockSize - wasteSize;
			temp = temp / drawCount + ((temp % drawCount) == 0 ? 0 : 1);
			temp += stockSize / drawCount + ((stockSize % drawCount) == 0 ? 0 : 1);
			ss << "[DR" << temp << ' ' << PILES[m.From] << PILES[m.To] << "] ";
		}
	} else if (m.Count > 1) {
		ss << PILES[m.From] << PILES[m.To] << '-' << (int)m.Count << ' ';
	} else {
		ss << PILES[m.From] << PILES[m.To] << ' ';
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %r9b, %al
movl %esi, -0x4(%rbp)
movq %rdi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
andb $0x1, %al
movb %al, -0x1d(%rbp)
movzbl -0x1(%rbp), %eax
cmpl $0x0, %eax
jle 0xe984
movzbl -0x4(%rbp), %eax
cmpl $0x0, %eax
je 0xe653
movzbl -0x2(%rbp), %eax
cmpl $0x1, %eax
jle 0xe577
testb $0x1, -0x1d(%rbp)
jne 0xe4eb
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movzbl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x64f9(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x3(%rbp), %eax
movl %eax, %ecx
leaq 0x64e0(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movl $0x2d, %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x2(%rbp), %esi
callq 0x33b0
movq %rax, %rdi
leaq 0x6597(%rip), %rsi      # 0x14a5f
callq 0x3230
movq %rax, %rdi
movzbl -0x4(%rbp), %esi
callq 0x33b0
movq %rax, %rdi
movl $0x20, %esi
callq 0x32d0
jmp 0xe572
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movl $0x5b, %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x646f(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x3(%rbp), %eax
movl %eax, %ecx
leaq 0x6456(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movl $0x2d, %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x2(%rbp), %esi
callq 0x33b0
movq %rax, %rdi
leaq 0x650d(%rip), %rsi      # 0x14a5f
callq 0x3230
movq %rax, %rdi
movzbl -0x4(%rbp), %esi
callq 0x33b0
movq %rax, %rdi
leaq 0x64f5(%rip), %rsi      # 0x14a62
callq 0x3230
jmp 0xe64e
testb $0x1, -0x1d(%rbp)
jne 0xe5de
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movzbl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x63ea(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x3(%rbp), %eax
movl %eax, %ecx
leaq 0x63d1(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0x64a1(%rip), %rsi      # 0x14a5f
callq 0x3230
movq %rax, %rdi
movzbl -0x4(%rbp), %esi
callq 0x33b0
movq %rax, %rdi
movl $0x20, %esi
callq 0x32d0
jmp 0xe64c
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movl $0x5b, %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x637c(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x3(%rbp), %eax
movl %eax, %ecx
leaq 0x6363(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0x6433(%rip), %rsi      # 0x14a5f
callq 0x3230
movq %rax, %rdi
movzbl -0x4(%rbp), %esi
callq 0x33b0
movq %rax, %rdi
leaq 0x641b(%rip), %rsi      # 0x14a62
callq 0x3230
jmp 0xe64e
jmp 0xe97f
testb $0x1, -0x1d(%rbp)
jne 0xe80e
movzbl -0x1(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0xe6f8
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
leaq 0x63f2(%rip), %rsi      # 0x14a6b
callq 0x3230
movq %rax, %rdi
movzbl -0x1(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl %eax, %esi
movzbl -0x1(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
addl %eax, %esi
callq 0x33b0
movq %rax, %rdi
movl $0x20, %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x62b8(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x3(%rbp), %eax
movl %eax, %ecx
leaq 0x629f(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movl $0x20, %esi
callq 0x32d0
jmp 0xe809
movl -0x14(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl %eax, -0x2c(%rbp)
movl -0x14(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl -0x2c(%rbp), %eax
movl %edx, %esi
movl $0x1, %ecx
xorl %edx, %edx
cmpl $0x0, %esi
cmovel %edx, %ecx
addl %ecx, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xe752
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
leaq 0x6336(%rip), %rsi      # 0x14a6b
callq 0x3230
movq %rax, %rdi
movl -0x24(%rbp), %esi
callq 0x33b0
movq %rax, %rdi
movl $0x20, %esi
callq 0x32d0
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
leaq 0x6304(%rip), %rsi      # 0x14a65
callq 0x3230
movzbl -0x1(%rbp), %eax
subl -0x14(%rbp), %eax
subl -0x14(%rbp), %eax
subl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl %eax, -0x30(%rbp)
movl -0x24(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl -0x30(%rbp), %eax
movl %edx, %esi
movl $0x1, %ecx
xorl %edx, %edx
cmpl $0x0, %esi
cmovel %edx, %ecx
addl %ecx, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
leaq 0x62be(%rip), %rsi      # 0x14a6b
callq 0x3230
movq %rax, %rdi
movl -0x24(%rbp), %esi
callq 0x33b0
movq %rax, %rdi
movl $0x20, %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x61a2(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x3(%rbp), %eax
movl %eax, %ecx
leaq 0x6189(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movl $0x20, %esi
callq 0x32d0
jmp 0xe97d
movzbl -0x1(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0xe8ab
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
leaq 0x6240(%rip), %rsi      # 0x14a6a
callq 0x3230
movq %rax, %rdi
movzbl -0x1(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl %eax, %esi
movzbl -0x1(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
addl %eax, %esi
callq 0x33b0
movq %rax, %rdi
movl $0x20, %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x6107(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x3(%rbp), %eax
movl %eax, %ecx
leaq 0x60ee(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0x61c1(%rip), %rsi      # 0x14a62
callq 0x3230
jmp 0xe97b
movzbl -0x1(%rbp), %eax
subl -0x14(%rbp), %eax
subl -0x14(%rbp), %eax
subl -0x18(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl %eax, -0x38(%rbp)
movl -0x28(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl -0x38(%rbp), %eax
movl %edx, %esi
movl $0x1, %ecx
xorl %edx, %edx
cmpl $0x0, %esi
cmovel %edx, %ecx
addl %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl %eax, -0x34(%rbp)
movl -0x14(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl -0x34(%rbp), %eax
movl %edx, %esi
movl $0x1, %ecx
xorl %edx, %edx
cmpl $0x0, %esi
cmovel %edx, %ecx
addl %ecx, %eax
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
leaq 0x614d(%rip), %rsi      # 0x14a6a
callq 0x3230
movq %rax, %rdi
movl -0x28(%rbp), %esi
callq 0x33b0
movq %rax, %rdi
movl $0x20, %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x6032(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x3(%rbp), %eax
movl %eax, %ecx
leaq 0x6019(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0x60ec(%rip), %rsi      # 0x14a62
callq 0x3230
jmp 0xe97d
jmp 0xe97f
jmp 0xea32
movzbl -0x2(%rbp), %eax
cmpl $0x1, %eax
jle 0xe9ec
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movzbl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x5fda(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x3(%rbp), %eax
movl %eax, %ecx
leaq 0x5fc1(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movl $0x2d, %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x2(%rbp), %esi
callq 0x33b0
movq %rax, %rdi
movl $0x20, %esi
callq 0x32d0
jmp 0xea30
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movzbl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x5f7b(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movzbl -0x3(%rbp), %eax
movl %eax, %ecx
leaq 0x5f62(%rip), %rax      # 0x1497c
movsbl (%rax,%rcx), %esi
callq 0x32d0
movq %rax, %rdi
movl $0x20, %esi
callq 0x32d0
jmp 0xea32
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)