// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, %r15d
shrl $0x8, %r15d
movl %esi, %ebp
shrl $0x10, %ebp
cmpl $0x1000000, %esi        # imm = 0x1000000
jae 0x79d9
addq $0x10, %rbx
movl $0xff, %r12d
movl %r14d, %eax
andl %r12d, %eax
leaq 0x1fb1(%rip), %r13      # 0x994b
movsbl (%rax,%r13), %esi
movq %rbx, %rdi
callq 0x2210
andl %r12d, %r15d
movsbl (%r15,%r13), %esi
movq %rax, %rdi
callq 0x2210
cmpl $0x20000, %r14d         # imm = 0x20000
jb 0x7c0d
pushq $0x2d
popq %rsi
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
movl %ebp, %esi
jmp 0x7c08
movzbl %r14b, %eax
testl %eax, %eax
je 0x7a47
movzbl %bpl, %ebp
addq $0x10, %rbx
cmpl $0x2, %ebp
jb 0x7aa8
testb %r9b, %r9b
je 0x7b8c
movq %rax, %r14
pushq $0x5b
popq %rsi
movq %rbx, %rdi
callq 0x2210
leaq 0x1f3b(%rip), %rbx      # 0x994b
movsbl (%r14,%rbx), %esi
movq %rax, %rdi
callq 0x2210
movzbl %r15b, %ecx
movsbl (%rcx,%rbx), %esi
movq %rax, %rdi
callq 0x2210
pushq $0x2d
popq %rsi
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
movl %ebp, %esi
callq 0x22e0
jmp 0x7ae3
movl %ecx, %r13d
movl %edx, %r12d
shrl $0x18, %r14d
testb %r9b, %r9b
je 0x7b02
cmpl %r12d, %r14d
jle 0x7c26
leal (%r13,%r12,2), %eax
subl %eax, %r14d
movl %r14d, %eax
cltd
idivl %r8d
movl %edx, %ecx
movl %eax, %ebp
movl %r12d, %eax
cltd
idivl %r8d
addl %eax, %ebp
cmpl $0x1, %ecx
sbbl $-0x1, %ebp
cmpl $0x1, %edx
sbbl $-0x1, %ebp
addq $0x10, %rbx
leaq 0x1ece(%rip), %rsi      # 0x9964
movq %rbx, %rdi
callq 0x21c0
movq %rax, %rdi
movl %ebp, %esi
jmp 0x7c4e
testb %r9b, %r9b
je 0x7bcb
movq %rax, %r14
pushq $0x5b
popq %rsi
movq %rbx, %rdi
callq 0x2210
leaq 0x1e85(%rip), %rbx      # 0x994b
movsbl (%r14,%rbx), %esi
movq %rax, %rdi
callq 0x2210
movzbl %r15b, %ecx
movsbl (%rcx,%rbx), %esi
movq %rax, %rdi
callq 0x2210
leaq 0x1e6f(%rip), %rsi      # 0x9959
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
movl %r14d, %esi
callq 0x22e0
jmp 0x7c80
cmpl %r12d, %r14d
jle 0x7c9d
movl %r12d, %eax
cltd
movl %r8d, 0x4(%rsp)
idivl %r8d
xorl %ebp, %ebp
testl %edx, %edx
setne %bpl
addl %eax, %ebp
je 0x7b48
leaq 0x10(%rbx), %rdi
leaq 0x1e37(%rip), %rsi      # 0x9965
callq 0x21c0
movq %rax, %rdi
movl %ebp, %esi
callq 0x22e0
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x2210
addq $0x10, %rbx
leaq 0x1e0c(%rip), %rsi      # 0x995f
movq %rbx, %rdi
callq 0x21c0
leal (%r13,%r12,2), %eax
subl %eax, %r14d
movl %r14d, %eax
cltd
idivl 0x4(%rsp)
movl %eax, %ebp
cmpl $0x1, %edx
sbbl $-0x1, %ebp
leaq 0x1deb(%rip), %rsi      # 0x9965
movq %rbx, %rdi
callq 0x21c0
movq %rax, %rdi
movl %ebp, %esi
jmp 0x7cc5
leaq 0x1db8(%rip), %r14      # 0x994b
movq %rax, %r12
movsbl (%rax,%r14), %esi
movq %rbx, %rdi
callq 0x2210
movzbl %r15b, %ecx
movsbl (%rcx,%r14), %esi
movq %rax, %rdi
callq 0x2210
pushq $0x2d
popq %rsi
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
movl %ebp, %esi
callq 0x22e0
jmp 0x7bf3
leaq 0x1d79(%rip), %r14      # 0x994b
movq %rax, %r12
movsbl (%rax,%r14), %esi
movq %rbx, %rdi
callq 0x2210
movzbl %r15b, %ecx
movsbl (%rcx,%r14), %esi
movq %rax, %rdi
callq 0x2210
leaq 0x1d5f(%rip), %rsi      # 0x9959
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
movl %r12d, %esi
callq 0x22e0
pushq $0x20
popq %rsi
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2210
addq $0x10, %rbx
leaq 0x1d33(%rip), %rsi      # 0x9964
movq %rbx, %rdi
movl %r8d, %ebx
callq 0x21c0
movq %rax, %rdi
movl %r14d, %eax
xorl %edx, %edx
idivl %ebx
cmpl $0x1, %edx
sbbl $-0x1, %eax
movl %eax, %esi
callq 0x22e0
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x2210
pushq $0x57
popq %rsi
movq %rax, %rdi
callq 0x2210
movzbl %r15b, %ecx
leaq 0x1cd7(%rip), %rdx      # 0x994b
movsbl (%rcx,%rdx), %esi
movq %rax, %rdi
callq 0x2210
leaq 0x1cd5(%rip), %rsi      # 0x995c
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21c0
addq $0x10, %rbx
leaq 0x1cbd(%rip), %rsi      # 0x9965
movq %rbx, %rdi
movl %r8d, %ebx
callq 0x21c0
movq %rax, %rdi
movl %r14d, %eax
xorl %edx, %edx
idivl %ebx
cmpl $0x1, %edx
sbbl $-0x1, %eax
movl %eax, %esi
callq 0x22e0
pushq $0x20
popq %rbx
movq %rax, %rdi
movl %ebx, %esi
callq 0x2210
pushq $0x57
popq %rsi
movq %rax, %rdi
callq 0x2210
movzbl %r15b, %ecx
leaq 0x1c5e(%rip), %rdx      # 0x994b
movsbl (%rcx,%rdx), %esi
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
movl %ebx, %esi
jmp 0x7c13
nop