LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/net/worker/keyvalueworker_impl.h
// Function: net::WorkerStatus net::worker::KeyValueWorker<net::protocol::RedisProtocol>::process_request_<net::ClientBuffer<1024ul>>(net::ClientBuffer<1024ul>&)
WorkerStatus KeyValueWorker<PROTOCOL>::process_request_(CONNECTION &buffer){
	const auto &p = protocol_.getParams();

	if (p[0] == PROTOCOL::CMD_SHUTDOWN){
		return WorkerStatus::SHUTDOWN;
	}

	buffer.clear();
	buffer.push( PROTOCOL::RESPONSE_OK );
	return WorkerStatus::WRITE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rdi
leaq 0x4ded(%rip), %rsi      # 0x8198
callq 0x33e8
testb %al, %al
je 0x33b8
pushq $0x5
jmp 0x33cc
andl $0x0, (%rbx)
leaq 0x4db6(%rip), %rsi      # 0x8178
movq %rbx, %rdi
callq 0x33d4
pushq $0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]asyncore_cpp/include/stringref.h
// Function: StringRef::compare(StringRef const&) const
inline int StringRef::compare(const StringRef &sr) const noexcept{
	if (COMPARE_MICRO_OPTIMIZATIONS){
		if (_data == sr.data() && _size == sr.size())
			return 0;
	}

	return compare(sr.data(), sr.size() );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %rdx
movq 0x8(%rsi), %rsi
cmpq %rsi, 0x8(%rdi)
jne 0x3412
cmpq %rdx, (%rdi)
jne 0x3412
xorl %eax, %eax
popq %rbp
retq
popq %rbp
jmp 0x3418
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
movq (%rdi), %rdi
movq 0x8(%rsi), %r8
movl (%rdx), %eax
movabsq $0x100000600, %rcx      # imm = 0x100000600
movl %eax, %r10d
cmpq %r10, %r8
seta %r11b
movb (%rdi,%r10), %r9b
cmpb $0xd, %r9b
sete %bpl
testb %bpl, %r11b
jne 0x24bb
movzbl %r9b, %r9d
cmpl $0x20, %r9d
ja 0x24c1
movl %r9d, %r11d
btq %r11, %rcx
jae 0x24c1
incl %eax
movl %eax, (%rdx)
jmp 0x248d
cmpq %r10, %r8
jbe 0x24fa
cmpl $0x74, %r9d
je 0x254b
cmpl $0x47, %r9d
je 0x250b
cmpl $0x54, %r9d
je 0x254b
cmpl $0x67, %r9d
je 0x250b
cmpl $0x23, %r9d
jne 0x2599
movl %eax, %ecx
cmpq %rcx, %r8
jbe 0x24fa
leal 0x1(%rcx), %eax
movl %eax, (%rdx)
cmpb $0xa, (%rdi,%rcx)
jne 0x24e8
xorl %eax, %eax
jmp 0x25d3
incl %eax
movl %eax, (%rdx)
cmpb $0x20, (%rdi,%rcx)
je 0x2512
movl %eax, %ecx
cmpq %rcx, %r8
ja 0x2501
movl %eax, %ecx
movl %ecx, %r9d
cmpq %r9, %r8
jbe 0x2527
incl %ecx
movl %ecx, (%rdx)
cmpb $0xa, (%rdi,%r9)
jne 0x2514
movslq %eax, %rdx
subl %edx, %ecx
movq %rsp, %r14
movq %r14, %rdi
callq 0x21f0
movq (%r14), %rdi
callq 0x2290
movq %rbx, %rdi
movl %eax, %esi
callq 0x6642
jmp 0x25c9
xorl %ecx, %ecx
xorl %r9d, %r9d
leal (%rax,%rcx), %r10d
cmpq %r10, %r8
jbe 0x257c
cmpl $0x7, %r9d
ja 0x257c
leal (%rax,%rcx), %r11d
incl %r11d
movl %r11d, (%rdx)
xorl %r11d, %r11d
cmpb $0xa, (%rdi,%r10)
sete %r11b
addl %r11d, %r9d
incl %ecx
jmp 0x2550
movslq %eax, %rdx
movl %ecx, %ecx
movq %rsp, %r14
movq %r14, %rdi
callq 0x21f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6a9a
jmp 0x25c9
movl %eax, %ecx
movl %ecx, %r9d
cmpq %r9, %r8
jbe 0x25ae
incl %ecx
movl %ecx, (%rdx)
cmpb $0xa, (%rdi,%r9)
jne 0x259b
movslq %eax, %rdx
subl %eax, %ecx
movq %rsp, %r14
movq %r14, %rdi
callq 0x21f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x68e2
movq %rsp, %rdi
callq 0x20c0
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x25e0
jmp 0x25e0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2300
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Pile.cpp
// Function: Pile::Flip()
void Pile::Flip() {
	if (upSize > 0) {
		down[downSize++] = up[--upSize];
	} else {
		up[upSize++] = down[--downSize];
	}
}

// Assembly:
movl 0x128(%rdi), %eax
testl %eax, %eax
jle 0x36a2
decl %eax
movl %eax, 0x128(%rdi)
imulq $0x6, %rax, %rax
leaq (%rdi,%rax), %rdx
addq $0x90, %rdx
leaq 0x124(%rdi), %rcx
movl 0x124(%rdi), %eax
jmp 0x36c7
leaq 0x128(%rdi), %rcx
movslq 0x124(%rdi), %rdx
decq %rdx
movl %edx, 0x124(%rdi)
imulq $0x6, %rdx, %rdx
addq %rdi, %rdx
addq $0x90, %rdi
leal 0x1(%rax), %esi
movl %esi, (%rcx)
cltq
imulq $0x6, %rax, %rax
movzwl 0x4(%rdx), %ecx
movw %cx, 0x4(%rdi,%rax)
movl (%rdx), %ecx
movl %ecx, (%rdi,%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Pile.cpp
// Function: Pile::Remove(Pile&, int)
void Pile::Remove(Pile & to, int count) {
	for (int i = upSize - count; i < upSize; ++i) {
		to.AddUp(up[i]);
	}

	upSize -= count;
	size -= count;
}

// Assembly:
pushq %rbx
movl 0x128(%rdi), %r9d
movl %r9d, %r8d
subl %edx, %r8d
movl $0x90, %eax
leaq (%rsi,%rax), %rcx
movslq %r8d, %r8
imulq $0x6, %r8, %r10
addq %rdi, %rax
addq %r10, %rax
movslq %r9d, %r10
cmpq %r10, %r8
jge 0x37a1
movl (%rax), %r9d
movzwl 0x4(%rax), %r10d
movslq 0x128(%rsi), %r11
leal 0x1(%r11), %ebx
movl %ebx, 0x128(%rsi)
imulq $0x6, %r11, %r11
movw %r10w, 0x4(%rcx,%r11)
movl %r9d, (%rcx,%r11)
incl 0x120(%rsi)
incq %r8
movl 0x128(%rdi), %r9d
addq $0x6, %rax
jmp 0x375c
subl %edx, %r9d
movl %r9d, 0x128(%rdi)
subl %edx, 0x120(%rdi)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Pile.cpp
// Function: Pile::RemoveTalon(Pile&, int)
void Pile::RemoveTalon(Pile & to, int count) {
	int i = size - count;
	do {
		to.AddUp(up[--size]);
	} while (size > i);

	upSize = size;
}

// Assembly:
movl 0x120(%rdi), %r8d
movl %r8d, %eax
subl %edx, %eax
movl $0x90, %ecx
leaq (%rdi,%rcx), %rdx
addq %rsi, %rcx
decl %r8d
movl %r8d, 0x120(%rdi)
movslq %r8d, %r8
imulq $0x6, %r8, %r8
movl (%rdx,%r8), %r9d
movzwl 0x4(%rdx,%r8), %r8d
movslq 0x128(%rsi), %r10
leal 0x1(%r10), %r11d
movl %r11d, 0x128(%rsi)
imulq $0x6, %r10, %r10
movw %r8w, 0x4(%rcx,%r10)
movl %r9d, (%rcx,%r10)
incl 0x120(%rsi)
movl 0x120(%rdi), %r8d
cmpl %eax, %r8d
jg 0x37cc
movl %r8d, 0x128(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Pile.cpp
// Function: Pile::Initialize()
void Pile::Initialize() {
	size = 0;
	upSize = 0;
	downSize = 0;
	for (int i = 0; i < 24; i++) {
		up[i].Clear();
		down[i].Clear();
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
andq $0x0, 0x120(%rdi)
andl $0x0, 0x128(%rdi)
pushq $0x18
popq %r14
subq $0x1, %r14
jb 0x386c
leaq 0x90(%rbx), %rdi
callq 0x8e04
movq %rbx, %rdi
callq 0x8e04
addq $0x6, %rbx
jmp 0x384c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::MovesMadeNormalizedCount()
int Solitaire::MovesMadeNormalizedCount() {
	int movesTotal = 0;
	int stockSize = 24;
	int wasteSize = 0;
	for (int i = 0; i < movesMadeCount; i++) {
		Move m = movesMade[i];
		movesTotal++;
		if (m.Extra > 0) {
			if (m.From == WASTE) {
				int temp = stockSize;
				if (m.Extra <= stockSize) {
					temp = m.Extra;
					stockSize -= temp;
					wasteSize += temp - 1;
				} else {
					movesTotal += temp / drawCount;
					movesTotal += (temp % drawCount) == 0 ? 0 : 1;
					temp = m.Extra;
					temp -= wasteSize;
					temp -= stockSize;
					temp -= stockSize;
					stockSize += wasteSize - temp;
					wasteSize = temp - 1;
				}
				movesTotal += temp / drawCount;
				movesTotal += (temp % drawCount) == 0 ? 0 : 1;
			} else {
				movesTotal++;
			}
		} else if (m.From == WASTE) {
			wasteSize--;
		}
	}
	return movesTotal;
}

// Assembly:
pushq %rbp
pushq %rbx
movl 0x1914(%rdi), %r8d
xorl %r9d, %r9d
testl %r8d, %r8d
cmovlel %r9d, %r8d
movl 0x1904(%rdi), %r10d
movl $0x18, %ecx
xorl %r11d, %r11d
xorl %eax, %eax
cmpq %r9, %r8
je 0x4762
movb (%rdi,%r9,4), %dl
movzbl 0x3(%rdi,%r9,4), %esi
leal 0x1(%rax), %ebx
testl %esi, %esi
je 0x4711
testb %dl, %dl
je 0x471a
addl $0x2, %eax
movl %eax, %ebx
jmp 0x475b
cmpb $0x1, %dl
sbbl $0x0, %r11d
jmp 0x475b
movl %ecx, %ebp
subl %esi, %ebp
jge 0x4743
movl %ecx, %eax
cltd
idivl %r10d
addl %ebx, %eax
cmpl $0x1, %edx
sbbl $-0x1, %eax
leal (%r11,%rcx,2), %edx
subl %edx, %esi
addl %r11d, %ecx
subl %esi, %ecx
leal -0x1(%rsi), %r11d
movl %ecx, %ebp
movl %eax, %ebx
jmp 0x4749
addl %esi, %r11d
decl %r11d
movl %esi, %eax
cltd
idivl %r10d
addl %ebx, %eax
cmpl $0x1, %edx
sbbl $-0x1, %eax
movl %ebp, %ecx
movl %eax, %ebx
incq %r9
movl %ebx, %eax
jmp 0x46f0
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::MovesAdded(Move const&)
int Solitaire::MovesAdded(Move const& move) {
	int movesAdded = 1;
	int wasteSize = piles[WASTE].Size();
	int stockSize = piles[STOCK].Size();
	if (move.Extra > 0) {
		if (move.From == WASTE) {
			if (move.Extra <= stockSize) {
				movesAdded += move.Extra / drawCount;
				movesAdded += (move.Extra % drawCount) == 0 ? 0 : 1;
			} else {
				movesAdded += stockSize / drawCount;
				movesAdded += (stockSize % drawCount) == 0 ? 0 : 1;
				int temp = move.Extra;
				temp -= wasteSize;
				temp -= stockSize;
				temp -= stockSize;
				movesAdded += temp / drawCount;
				movesAdded += (temp % drawCount) == 0 ? 0 : 1;
			}
		} else {
			movesAdded++;
		}
	}
	return movesAdded;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
addq $0x800, %rdi            # imm = 0x800
callq 0x3874
movl %eax, %ebx
leaq 0x1160(%r14), %rdi
callq 0x3874
movzbl 0x3(%r15), %ecx
testl %ecx, %ecx
je 0x4936
cmpb $0x0, (%r15)
je 0x493b
pushq $0x2
jmp 0x4938
pushq $0x1
popq %rax
jmp 0x4978
movl %eax, %esi
movl 0x1904(%r14), %r9d
cmpl %ecx, %eax
jge 0x4969
movl %esi, %eax
cltd
idivl %r9d
movl %eax, %edi
movl %edx, %r8d
leal (%rbx,%rsi,2), %eax
subl %eax, %ecx
movl %ecx, %eax
cltd
idivl %r9d
addl %edi, %eax
cmpl $0x1, %r8d
sbbl $-0x1, %eax
jmp 0x4970
movl %ecx, %eax
xorl %edx, %edx
idivl %r9d
cmpl $0x1, %edx
sbbl $-0x1, %eax
incl %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::UndoMove()
void Solitaire::UndoMove() {
	Move move = movesMade[--movesMadeCount];

	if (move.From != WASTE && move.Extra > 0) {
		piles[move.From].Flip();
	}

	if (move.Count == 1) {
		piles[move.To].Remove(piles[move.From]);

		if (move.To >= FOUNDATION1C) {
			--foundationCount;
		} else if (move.From >= FOUNDATION1C) {
			++foundationCount;
		}

		if (move.From == WASTE && move.Extra > 0) {
			int wasteSize = piles[WASTE].Size();
			if (move.Extra <= wasteSize) {
				piles[WASTE].RemoveTalon(piles[STOCK], move.Extra);
			} else {
				roundCount--;
				wasteSize += wasteSize;
				int stockSize = piles[STOCK].Size();
				wasteSize += stockSize;
				wasteSize += stockSize;
				wasteSize -= move.Extra;
				if (wasteSize > 0) {
					piles[STOCK].RemoveTalon(piles[WASTE], wasteSize);
				} else {
					piles[WASTE].RemoveTalon(piles[STOCK], -wasteSize);
				}
			}
		}
	} else {
		piles[move.To].Remove(piles[move.From], move.Count);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movslq 0x1914(%rdi), %rax
leaq -0x1(%rax), %rcx
movl %ecx, 0x1914(%rdi)
movzbl -0x4(%rdi,%rax,4), %r14d
testq %r14, %r14
setne %cl
movzbl -0x3(%rdi,%rax,4), %r12d
movzbl -0x2(%rdi,%rax,4), %ebp
movb -0x1(%rdi,%rax,4), %r15b
testb %r15b, %r15b
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0x4bcd
imulq $0x12c, %r14, %rax      # imm = 0x12C
leaq (%rbx,%rax), %rdi
addq $0x800, %rdi            # imm = 0x800
callq 0x3672
cmpl $0x1, %ebp
jne 0x4c09
imulq $0x12c, %r12, %rax      # imm = 0x12C
leaq (%rbx,%rax), %rdi
addq $0x800, %rdi            # imm = 0x800
imulq $0x12c, %r14, %rax      # imm = 0x12C
leaq (%rbx,%rax), %rsi
addq $0x800, %rsi            # imm = 0x800
callq 0x36e2
cmpb $0x9, %r12b
jb 0x4c3c
decl 0x190c(%rbx)
jmp 0x4c4a
imulq $0x12c, %r12, %rax      # imm = 0x12C
leaq (%rbx,%rax), %rdi
addq $0x800, %rdi            # imm = 0x800
imulq $0x12c, %r14, %rax      # imm = 0x12C
leaq (%rbx,%rax), %rsi
addq $0x800, %rsi            # imm = 0x800
movl %ebp, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3738
cmpb $0x9, %r14b
jb 0x4c4a
incl 0x190c(%rbx)
jmp 0x4c9d
movzbl %r15b, %ebp
testb %bpl, %bpl
setne %al
testq %r14, %r14
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x4c9d
leaq 0x800(%rbx), %r14
movq %r14, %rdi
callq 0x3874
cmpl %ebp, %eax
jge 0x4ca6
movl %eax, %r15d
decl 0x1908(%rbx)
addq $0x1160, %rbx           # imm = 0x1160
movq %rbx, %rdi
callq 0x3874
addl %r15d, %eax
addl %eax, %eax
subl %ebp, %eax
jle 0x4cb7
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x4cbf
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addq $0x1160, %rbx           # imm = 0x1160
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
jmp 0x4cc1
negl %eax
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x37b4
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::MakeAutoMoves()
void Solitaire::MakeAutoMoves() {
	UpdateAvailableMoves();
	while (movesAvailableCount == 1) {
		MakeMove(movesAvailable[0]);
		UpdateAvailableMoves();
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x4030
cmpl $0x1, 0x1910(%rbx)
jne 0x505b
movl 0x1874(%rbx), %esi
movq %rbx, %rdi
callq 0x3e7e
movq %rbx, %rdi
jmp 0x503a
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::ResetGame(int)
void Solitaire::ResetGame(int drawCount) {
	this->drawCount = drawCount;
	roundCount = 0;
	foundationCount = 0;
	movesMadeCount = 0;
	movesAvailableCount = 0;

	for (int i = 0; i < 13; ++i) {
		piles[i].Reset();
	}

	for (int j = TABLEAU1, i = 0; j <= TABLEAU7; ++j) {
		piles[j].AddUp(cards[i++]);
		for (int k = j + 1; k <= TABLEAU7; ++k, ++i) {
			piles[k].AddDown(cards[i]);
		}
	}

	for (int i = 51; i >= 28; --i) {
		piles[STOCK].AddUp(cards[i]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
movl %esi, 0x1904(%rdi)
leaq 0x800(%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x1908(%rdi)
xorl %ebx, %ebx
cmpq $0xf3c, %rbx            # imm = 0xF3C
je 0x540b
leaq (%r15,%rbx), %rdi
callq 0x3822
addq $0x12c, %rbx            # imm = 0x12C
jmp 0x53f0
leaq 0x173c(%r14), %rax
movq %rax, 0x20(%rsp)
leaq 0x1742(%r14), %rax
movq %rax, 0x18(%rsp)
movq %r14, 0x10(%rsp)
addq $0xa58, %r14            # imm = 0xA58
xorl %r13d, %r13d
pushq $0x6
popq %rax
movq %rax, 0x8(%rsp)
pushq $0x1
popq %r12
movq %r15, 0x28(%rsp)
cmpq $0x8, %r12
je 0x54e7
imulq $0x12c, %r12, %rdi      # imm = 0x12C
addq %r15, %rdi
movslq %r13d, %rbx
imulq $0x6, %rbx, %rbp
movq 0x20(%rsp), %rcx
movl (%rcx,%rbp), %eax
movzwl 0x4(%rcx,%rbp), %esi
shlq $0x20, %rsi
orq %rax, %rsi
callq 0x3644
movq 0x8(%rsp), %rax
addl %r13d, %eax
cltq
subq %rax, %rbx
addq 0x18(%rsp), %rbp
movq %r14, 0x30(%rsp)
xorl %r15d, %r15d
cmpq %r15, %rbx
je 0x54bc
movl (%rbp), %eax
movzwl 0x4(%rbp), %esi
shlq $0x20, %rsi
orq %rax, %rsi
movq %r14, %rdi
callq 0x361c
decq %r15
addq $0x6, %rbp
addq $0x12c, %r14            # imm = 0x12C
jmp 0x5491
incq %r12
subl %r15d, %r13d
incl %r13d
movq 0x8(%rsp), %rax
decl %eax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %r14
addq $0x12c, %r14            # imm = 0x12C
movq 0x28(%rsp), %r15
jmp 0x5443
movq 0x10(%rsp), %r15
leaq 0x1160(%r15), %r14
addq $0x186e, %r15           # imm = 0x186E
pushq $0x33
popq %rbx
cmpq $0x1b, %rbx
jbe 0x5523
movl (%r15), %eax
movzwl 0x4(%r15), %esi
shlq $0x20, %rsi
orq %rax, %rsi
movq %r14, %rdi
callq 0x3644
decq %rbx
addq $-0x6, %r15
jmp 0x54fd
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::FoundationMin()
int Solitaire::FoundationMin() {
	int one = piles[FOUNDATION2D].Size();
	int two = piles[FOUNDATION4H].Size();
	int redFoundationMin = one <= two ? one : two;
	one = piles[FOUNDATION1C].Size();
	two = piles[FOUNDATION3S].Size();
	int blackFoundationMin = one <= two ? one : two;
	return 2 + (blackFoundationMin <= redFoundationMin ? blackFoundationMin : redFoundationMin);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x13b8, %rdi           # imm = 0x13B8
callq 0x3874
movl %eax, %ebp
leaq 0x1610(%rbx), %rdi
callq 0x3874
movl %eax, %r14d
cmpl %eax, %ebp
cmovll %ebp, %r14d
leaq 0x128c(%rbx), %rdi
callq 0x3874
movl %eax, %ebp
addq $0x14e4, %rbx           # imm = 0x14E4
movq %rbx, %rdi
callq 0x3874
cmpl %eax, %ebp
cmovll %ebp, %eax
cmpl %r14d, %eax
cmovgel %r14d, %eax
addl $0x2, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::Shuffle1(int)
int Solitaire::Shuffle1(int dealNumber) {
	if (dealNumber != -1) {
		random.SetSeed(dealNumber);
	} else {
		dealNumber = random.Next1();
		random.SetSeed(dealNumber);
	}

	for (int i = 0; i < 52; i++) { cards[i].Set(i); }

	for (int x = 0; x < 269; ++x) {
		int k = random.Next1() % 52;
		int j = random.Next1() % 52;
		Card temp = cards[k];
		cards[k] = cards[j];
		cards[j] = temp;
	}

	return dealNumber;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x18f4(%rdi), %r14
cmpl $-0x1, %esi
jne 0x6668
movq %r14, %rdi
callq 0x8db0
movl %eax, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x8d52
addq $0x173c, %rbx           # imm = 0x173C
xorl %r12d, %r12d
movq %rbx, %r15
cmpq $0x34, %r12
je 0x669a
movzbl %r12b, %esi
movq %r15, %rdi
callq 0x8e0a
incq %r12
addq $0x6, %r15
jmp 0x667f
movl $0x10d, %r12d           # imm = 0x10D
pushq $0x34
popq %r13
subl $0x1, %r12d
jb 0x6705
movq %r14, %rdi
callq 0x8db0
cltd
idivl %r13d
movl %edx, %r15d
movq %r14, %rdi
callq 0x8db0
cltd
idivl %r13d
movslq %r15d, %rax
imulq $0x6, %rax, %rax
movzwl 0x4(%rbx,%rax), %ecx
movw %cx, 0x4(%rsp)
movl (%rbx,%rax), %ecx
movl %ecx, (%rsp)
movslq %edx, %rcx
imulq $0x6, %rcx, %rcx
movzwl 0x4(%rbx,%rcx), %edx
movw %dx, 0x4(%rbx,%rax)
movl (%rbx,%rcx), %edx
movl %edx, (%rbx,%rax)
movzwl 0x4(%rsp), %eax
movw %ax, 0x4(%rbx,%rcx)
movl (%rsp), %eax
movl %eax, (%rbx,%rcx)
jmp 0x66a4
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::Shuffle2(int)
void Solitaire::Shuffle2(int dealNumber) {
	for (int i = 0; i < 26; i++) { cards[i].Set(i); }
	for (int i = 39; i < 52; i++) { cards[i].Set(i - 13); }
	for (int i = 26; i < 39; i++) { cards[i].Set(i + 13); }

	random.SetSeed(dealNumber);
	for (int i = 0; i < 7; i++) {
		for (int j = 0; j < 52; j++) {
			int r = random.Next2() % 52;
			Card temp = cards[j];
			cards[j] = cards[r];
			cards[r] = temp;
		}
	}

	for (int i = 0, j = 51; i < 26; i++, j--) {
		Card temp = cards[j];
		cards[j] = cards[i];
		cards[i] = temp;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x173c(%rdi), %r15
xorl %r12d, %r12d
movq %r15, %r14
cmpq $0x1a, %r12
je 0x6751
movzbl %r12b, %esi
movq %r14, %rdi
callq 0x8e0a
incq %r12
addq $0x6, %r14
jmp 0x6736
leaq 0x1826(%rbx), %r14
pushq $-0xd
popq %r12
testq %r12, %r12
je 0x677a
leal 0x27(%r12), %eax
movzbl %al, %esi
movq %r14, %rdi
callq 0x8e0a
incq %r12
addq $0x6, %r14
jmp 0x675c
leaq 0x17d8(%rbx), %r14
pushq $-0xd
popq %r12
testq %r12, %r12
je 0x67a3
leal 0x34(%r12), %eax
movzbl %al, %esi
movq %r14, %rdi
callq 0x8e0a
incq %r12
addq $0x6, %r14
jmp 0x6785
leaq 0x18f4(%rbx), %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x8d52
xorl %r12d, %r12d
pushq $0x34
popq %rbp
cmpl $0x7, %r12d
je 0x6823
xorl %r13d, %r13d
cmpq $0x138, %r13            # imm = 0x138
je 0x681e
movq %r14, %rdi
callq 0x8dc2
cltd
idivl %ebp
movzwl 0x4(%r15,%r13), %eax
movw %ax, 0x14(%rsp)
movl (%r15,%r13), %eax
movl %eax, 0x10(%rsp)
movslq %edx, %rax
imulq $0x6, %rax, %rax
movzwl 0x4(%r15,%rax), %ecx
movw %cx, 0x4(%r15,%r13)
movl (%r15,%rax), %ecx
movl %ecx, (%r15,%r13)
movzwl 0x14(%rsp), %ecx
movw %cx, 0x4(%r15,%rax)
movl 0x10(%rsp), %ecx
movl %ecx, (%r15,%rax)
addq $0x6, %r13
jmp 0x67c3
incl %r12d
jmp 0x67ba
addq $0x186e, %rbx           # imm = 0x186E
xorl %eax, %eax
cmpq $0x9c, %rax
je 0x6870
movzwl 0x4(%rbx), %ecx
movw %cx, 0xc(%rsp)
movl (%rbx), %ecx
movl %ecx, 0x8(%rsp)
movzwl 0x4(%r15,%rax), %ecx
movw %cx, 0x4(%rbx)
movl (%r15,%rax), %ecx
movl %ecx, (%rbx)
movzwl 0xc(%rsp), %ecx
movw %cx, 0x4(%r15,%rax)
movl 0x8(%rsp), %ecx
movl %ecx, (%r15,%rax)
addq $-0x6, %rbx
addq $0x6, %rax
jmp 0x682c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::Initialize()
void Solitaire::Initialize() {
	drawCount = 1;
	for (int i = 0; i < 52; i++) {
		cards[i].Set(i);
	}
	for (int i = 0; i < 13; ++i) {
		piles[i].Initialize();
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, 0x1904(%rdi)
leaq 0x173c(%rdi), %r14
xorl %r15d, %r15d
cmpq $0x34, %r15
je 0x68b7
movzbl %r15b, %esi
movq %r14, %rdi
callq 0x8e0a
incq %r15
addq $0x6, %r14
jmp 0x689c
addq $0x800, %rbx            # imm = 0x800
xorl %r14d, %r14d
cmpq $0xf3c, %r14            # imm = 0xF3C
je 0x68dc
leaq (%rbx,%r14), %rdi
callq 0x3832
addq $0x12c, %r14            # imm = 0x12C
jmp 0x68c1
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::LoadSolitaire(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool Solitaire::LoadSolitaire(string const& cardSet) {
	int used[52] = {};
	if (cardSet.size() < 156) { return false; }
	for (int i = 0; i < 52; i++) {
		int suit = (cardSet[i * 3 + 2] ^ 0x30) - 1;
		if (suit < CLUBS || suit > HEARTS) { return false; }

		if (suit >= SPADES) {
			suit = (suit == SPADES) ? HEARTS : SPADES;
		}

		int rank = (cardSet[i * 3] ^ 0x30) * 10 + (cardSet[i * 3 + 1] ^ 0x30);
		if (rank < ACE || rank > KING) { return false; }

		int value = suit * 13 + rank - 1;
		if (used[value] == 1) { return false; }
		used[value] = 1;
		cards[i].Set(value);
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %rdi
xorl %ebp, %ebp
movl $0xd0, %edx
xorl %esi, %esi
callq 0x20f0
cmpq $0x9c, 0x8(%rbx)
jae 0x6920
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
addq $0x173c, %r14           # imm = 0x173C
pushq $0x2
popq %r15
cmpq $0x9e, %r15
sete %bpl
je 0x6910
movq (%rbx), %rdx
movb (%rdx,%r15), %al
xorb $0x30, %al
leal -0x5(%rax), %ecx
cmpb $-0x4, %cl
jb 0x6910
movsbl -0x2(%rdx,%r15), %ecx
xorl $0x30, %ecx
imull $0xa, %ecx, %ecx
movsbl -0x1(%rdx,%r15), %edx
xorl $0x30, %edx
leal (%rcx,%rdx), %esi
addl $-0xe, %esi
cmpl $-0xd, %esi
jb 0x6910
addl %edx, %ecx
leal -0x1(%rax), %edx
xorl %esi, %esi
cmpb $0x2, %dl
sete %sil
orl $0x2, %esi
cmpb $0x3, %al
movzbl %dl, %eax
cmovael %esi, %eax
imull $0xd, %eax, %eax
addl %ecx, %eax
decl %eax
cmpl $0x1, (%rsp,%rax,4)
je 0x6910
movl $0x1, (%rsp,%rax,4)
movzbl %al, %esi
movq %r14, %rdi
callq 0x8e0a
addq $0x3, %r15
addq $0x6, %r14
jmp 0x692b
nop
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::GetSolitaire[abi:cxx11]()
string Solitaire::GetSolitaire() {
	stringstream cardSet;
	for (int i = 0; i < 52; i++) {
		Card c = cards[i];
		unsigned char suit = c.Suit;

		if (suit >= 2) {
			suit = (suit == 2) ? 3 : 2;
		}
		suit++;

		if (c.Rank < 10) {
			cardSet << '0' << (char)(c.Rank ^ 0x30) << (char)(suit ^ 0x30);
		} else {
			cardSet << '1' << (char)((c.Rank - 10) ^ 0x30) << (char)(suit ^ 0x30);
		}
	}
	return cardSet.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x2120
leaq 0x20(%rsp), %r15
xorl %r13d, %r13d
pushq $0x31
popq %r12
cmpq $0x138, %r13            # imm = 0x138
je 0x6a51
movzbl 0x173c(%r14,%r13), %eax
cmpb $0x2, %al
sete %cl
orb $0x2, %cl
cmpb $0x2, %al
movb 0x173d(%r14,%r13), %bpl
movzbl %cl, %ebx
cmovbl %eax, %ebx
cmpb $0x9, %bpl
ja 0x6a1c
movq %r15, %rdi
pushq $0x30
popq %rsi
callq 0x2210
orb $0x30, %bpl
jmp 0x6a2f
movq %r15, %rdi
movl %r12d, %esi
callq 0x2210
addb $-0xa, %bpl
xorb $0x30, %bpl
movsbl %bpl, %esi
movq %rax, %rdi
callq 0x2210
incb %bl
orb $0x30, %bl
movsbl %bl, %esi
movq %rax, %rdi
callq 0x2210
addq $0x6, %r13
jmp 0x69db
leaq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x22a0
leaq 0x10(%rsp), %rdi
callq 0x2140
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6a84
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x2300
nop
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::GetPysol[abi:cxx11]()
string Solitaire::GetPysol() {
	stringstream cardSet;
	cardSet << "Talon: ";
	for (int i = 28; i < 52; i++) {
		Card c = cards[i];

		cardSet << RANKS[c.Rank] << SUITS[c.Suit];
		if (i < 51) { cardSet << " "; }
	}

	const int order[28] = { 0, 1, 7, 2, 8, 13, 3, 9, 14, 18, 4, 10, 15, 19, 22, 5, 11, 16, 20, 23, 25, 6, 12, 17, 21, 24, 26, 27 };
	for (int i = 0, j = 0; j < 7; j++) {
		cardSet << '\n';
		for (int k = 0; k <= j; k++, i++) {
			Card c = cards[order[i]];

			if (k < j) {
				cardSet << '<' << RANKS[c.Rank] << SUITS[c.Suit] << "> ";
			} else {
				cardSet << RANKS[c.Rank] << SUITS[c.Suit];
			}
		}
	}
	return cardSet.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %r15
movq %rdi, %rbp
leaq 0x20(%rsp), %rdi
callq 0x2120
leaq 0x30(%rsp), %rdi
leaq 0x2c79(%rip), %rsi      # 0x9932
callq 0x21c0
leaq 0x173c(%r15), %r13
xorl %ebx, %ebx
leaq 0x2c45(%rip), %r12      # 0x9913
cmpq $0x90, %rbx
je 0x6d2e
movzbl 0x17e4(%r15,%rbx), %r14d
movzbl 0x17e5(%r15,%rbx), %eax
leaq 0x2b77(%rip), %rcx      # 0x9867
movsbl (%rax,%rcx), %esi
leaq 0x30(%rsp), %rdi
callq 0x2210
leaq 0x2c4f(%rip), %rcx      # 0x9954
movsbl (%r14,%rcx), %esi
movq %rax, %rdi
callq 0x2210
cmpq $0x8a, %rbx
je 0x6d28
leaq 0x30(%rsp), %rdi
movq %r12, %rsi
callq 0x21c0
addq $0x6, %rbx
jmp 0x6cce
xorl %ebx, %ebx
pushq $0x1
popq %rax
movq %rax, 0x8(%rsp)
xorl %r14d, %r14d
movq %rbp, 0x10(%rsp)
cmpl $0x7, %r14d
je 0x6e33
leaq 0x30(%rsp), %rdi
pushq $0xa
popq %rsi
callq 0x2210
movslq %ebx, %rbx
movq %rbx, 0x18(%rsp)
leaq (,%rbx,4), %rbp
xorl %ebx, %ebx
cmpl %ebx, 0x8(%rsp)
je 0x6e16
leaq (,%rbx,4), %rax
addq %rbp, %rax
leaq 0x2c1b(%rip), %rcx      # 0x99a0
movslq (%rcx,%rax), %rax
imulq $0x6, %rax, %rax
movzbl (%r13,%rax), %r12d
movzbl 0x1(%r13,%rax), %r15d
cmpl %r14d, %ebx
jae 0x6de4
leaq 0x30(%rsp), %rdi
pushq $0x3c
popq %rsi
callq 0x2210
leaq 0x2ab5(%rip), %rcx      # 0x9867
movsbl (%r15,%rcx), %esi
movq %rax, %rdi
callq 0x2210
leaq 0x2b8e(%rip), %rcx      # 0x9954
movsbl (%r12,%rcx), %esi
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
leaq 0x2b5f(%rip), %rsi      # 0x993c
callq 0x21c0
jmp 0x6e0e
leaq 0x2a7c(%rip), %rax      # 0x9867
movsbl (%r15,%rax), %esi
leaq 0x30(%rsp), %rdi
callq 0x2210
leaq 0x2b53(%rip), %rcx      # 0x9954
movsbl (%r12,%rcx), %esi
movq %rax, %rdi
callq 0x2210
incq %rbx
jmp 0x6d69
incl %r14d
movq 0x18(%rsp), %rax
addq %rbx, %rax
movq %rax, %rbx
incq 0x8(%rsp)
movq 0x10(%rsp), %rbp
jmp 0x6d40
leaq 0x38(%rsp), %rsi
movq %rbp, %rdi
callq 0x22a0
leaq 0x20(%rsp), %rdi
callq 0x2140
movq %rbp, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6e67
jmp 0x6e67
jmp 0x6e67
jmp 0x6e67
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x2300
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x2120
leaq 0x30(%rsp), %r15
movq %rbx, (%rsp)
leaq 0x800(%rbx), %rax
movq %rax, 0x10(%rsp)
xorl %ebx, %ebx
movl $0xff, %ebp
cmpq $0xd, %rbx
je 0x753a
cmpq $0x9, %rbx
ja 0x742e
movq %r15, %rdi
pushq $0x20
popq %rsi
callq 0x2210
movq %r15, %rdi
movl %ebx, %esi
callq 0x22e0
movq %rax, %rdi
leaq 0x24d0(%rip), %rsi      # 0x9912
callq 0x21c0
movq %rbx, 0x18(%rsp)
imulq $0x12c, %rbx, %r13      # imm = 0x12C
addq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x3884
movl %eax, %r14d
testl %r14d, %r14d
jle 0x74bb
decl %r14d
movq %r13, %rdi
movl %r14d, %esi
callq 0x38c2
movq %rax, %rcx
andq %rbp, %rcx
movb $0x58, %bl
cmpq %rbp, %rcx
je 0x748d
leaq 0x24ca(%rip), %rdx      # 0x9954
movb (%rcx,%rdx), %bl
movzbl %ah, %eax
leaq 0x23d0(%rip), %rcx      # 0x9867
movsbl (%rax,%rcx), %esi
movq %r15, %rdi
callq 0x2210
movsbl %bl, %esi
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
pushq $0x20
popq %rsi
callq 0x2210
jmp 0x7463
movq %r13, %rdi
callq 0x387c
movl %eax, %r14d
testl %r14d, %r14d
jle 0x7522
decl %r14d
movq %r13, %rdi
movl %r14d, %esi
callq 0x38aa
movq %rax, %rcx
andq %rbp, %rcx
movb $0x58, %bl
cmpq %rbp, %rcx
je 0x74f0
leaq 0x2467(%rip), %rdx      # 0x9954
movb (%rcx,%rdx), %bl
movzbl %ah, %eax
leaq 0x236d(%rip), %rcx      # 0x9867
movb (%rax,%rcx), %r12b
movq %r15, %rdi
pushq $0x2d
popq %rsi
callq 0x2210
movsbl %r12b, %esi
movq %rax, %rdi
callq 0x2210
movsbl %bl, %esi
movq %rax, %rdi
callq 0x2210
jmp 0x74c6
movq %r15, %rdi
pushq $0xa
popq %rsi
callq 0x2210
movq 0x18(%rsp), %rbx
incq %rbx
jmp 0x7413
leaq 0x23bd(%rip), %rsi      # 0x98fe
movq %r15, %rdi
callq 0x21c0
movq 0x8(%rsp), %r14
movq %rax, %rbx
movq (%rsp), %rdi
callq 0x477e
movq %rbx, %rdi
movl %eax, %esi
callq 0x22e0
leaq 0x38(%rsp), %rsi
movq %r14, %rdi
callq 0x22a0
leaq 0x20(%rsp), %rdi
callq 0x2140
movq %r14, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x759c
jmp 0x759c
jmp 0x759c
jmp 0x759c
jmp 0x759c
jmp 0x759c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x2300
nop
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::MovesAvailable[abi:cxx11]()
string Solitaire::MovesAvailable() {
	//Returns moves available for the current state. Flip moves are combined with the move that caused it in []. See below for move representation.
	stringstream ss;
	for (int i = 0; i < movesAvailableCount; i++) {
		Move m = movesAvailable[i];
		AddMove(ss, m, piles[STOCK].Size(), piles[WASTE].Size(), drawCount, true);
	}
	return ss.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x2120
leaq 0x1160(%r14), %r12
leaq 0x800(%r14), %r13
xorl %ebp, %ebp
movslq 0x1910(%r14), %rax
cmpq %rax, %rbp
jge 0x7d7f
movl 0x1874(%r14,%rbp,4), %ebx
movq %r12, %rdi
callq 0x3874
movl %eax, %r15d
movq %r13, %rdi
callq 0x3874
movl 0x1904(%r14), %r8d
leaq 0x10(%rsp), %rdi
movl %ebx, %esi
movl %r15d, %edx
movl %eax, %ecx
pushq $0x1
popq %r9
callq 0x795e
incq %rbp
jmp 0x7d37
leaq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x22a0
leaq 0x10(%rsp), %rdi
callq 0x2140
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7db2
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x2300
nop
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::MovesMade[abi:cxx11]()
string Solitaire::MovesMade() {
	//Returns moves made so far in the current game.
	//DR# is a draw move that is done # number of times. ie) DR2 means draw twice, if draw count > 1 it is still DR2.
	//NEW is to represent the moving of cards from the Waste pile back to the stock pile. A New round.
	//F# means to flip the card on tableau pile #. 
	//XY means to move the top card from pile X to pile Y.
	//X will be 1 through 7, W for Waste, or a foundation suit character. 'C'lubs, 'D'iamonds, 'S'pades, 'H'earts
	//Y will be 1 through 7 or the foundation suit character.
	//XY-# is the same as above except you are moving # number of cards from X to Y.
	stringstream ss;
	int moves = movesMadeCount;
	ResetGame(drawCount);
	for (int i = 0; i < moves; i++) {
		Move m = movesMade[i];
		AddMove(ss, m, piles[STOCK].Size(), piles[WASTE].Size(), drawCount, false);
		MakeMove(m);
	}
	return ss.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2120
movl 0x1904(%r14), %esi
movl 0x1914(%r14), %r15d
movq %r14, %rdi
callq 0x53c6
movq %rbx, (%rsp)
leaq 0x1160(%r14), %rax
movq %rax, 0x8(%rsp)
leaq 0x800(%r14), %r12
xorl %r13d, %r13d
testl %r15d, %r15d
cmovlel %r13d, %r15d
cmpq %r13, %r15
je 0x7e66
movl (%r14,%r13,4), %ebp
movq 0x8(%rsp), %rdi
callq 0x3874
movl %eax, %ebx
movq %r12, %rdi
callq 0x3874
movl 0x1904(%r14), %r8d
leaq 0x10(%rsp), %rdi
movl %ebp, %esi
movl %ebx, %edx
movl %eax, %ecx
xorl %r9d, %r9d
callq 0x795e
movq %r14, %rdi
movl %ebp, %esi
callq 0x3e7e
incq %r13
jmp 0x7e20
leaq 0x28(%rsp), %rsi
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x22a0
leaq 0x10(%rsp), %rdi
callq 0x2140
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7e98
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x2300
nop
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/./HashMap.h
// Function: HashMap<int>::Add(HashKey const&, int const&)
KeyValue<T> * HashMap<T>::Add(HashKey const& key, T const& value) {
	int hash = key.ComputeHash();
	int i = hash;
	i ^= (hash >> 16);
	i &= capacity;
	KeyValue<T> * node = &table[i];

	int length = 1;
	while (node != NULL && node->Key[0] != 0) {
		if (node->Hash == hash && key == node->Key) { return node; }
		node = node->Next;
		length++;
	}

	++size;
	node = &table[i];
	if (node->Key[0] != 0) {
		node->Next = new KeyValue<T>(node->Hash, node->Key, node->Value, node->Next);
	}
	node->Hash = hash;
	node->Key = key;
	node->Value = value;

	if (length > maxLength) { maxLength = length; }
	if (length == 1) { slotsUsed++; }
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x8896
movl %eax, %ebp
sarl $0x10, %eax
xorl %ebp, %eax
andl 0xc(%rbx), %eax
cltq
imulq $0x28, %rax, %r13
movq (%rbx), %r12
addq %r13, %r12
pushq $0x1
popq %r14
testq %r12, %r12
je 0x7fc9
cmpb $0x0, 0x8(%r12)
je 0x7fc9
cmpl %ebp, 0x24(%r12)
jne 0x7fc0
leaq 0x8(%r12), %rsi
movq %r15, %rdi
callq 0x88b2
testb %al, %al
jne 0x8044
movq (%r12), %r12
incl %r14d
jmp 0x7f97
incl 0x8(%rbx)
movq %rbx, 0x8(%rsp)
movq (%rbx), %rax
leaq (%rax,%r13), %rbx
leaq (%rax,%r13), %r12
addq $0x8, %r12
cmpb $0x0, (%r12)
je 0x800a
pushq $0x28
popq %rdi
callq 0x21d0
movq %rax, %r13
movl 0x24(%rbx), %esi
leaq 0x20(%rbx), %rcx
movq (%rbx), %r8
movq %rax, %rdi
movq %r12, %rdx
callq 0x88d2
movq %r13, (%rbx)
movl %ebp, 0x24(%rbx)
movq 0xd(%r15), %rax
movq %rax, 0xd(%r12)
movups (%r15), %xmm0
movups %xmm0, (%r12)
movq 0x10(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x20(%rbx)
movq 0x8(%rsp), %rax
cmpl 0x14(%rax), %r14d
jle 0x8038
movl %r14d, 0x14(%rax)
cmpl $0x1, %r14d
jne 0x8041
incl 0x18(%rax)
xorl %r12d, %r12d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r13, %rdi
callq 0x21e0
movq %rbx, %rdi
callq 0x2300
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/./HashMap.h
// Function: HashMap<int>::HashMap(int)
HashMap<T>::HashMap(int powerOf2) {
	this->powerOf2 = powerOf2;
	size = 0;
	slotsUsed = 0;
	maxLength = 0;
	capacity = (1 << powerOf2) - 1;
	table = new KeyValue<T>[capacity + 1];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ecx
pushq $0x1
popq %rax
shll %cl, %eax
movslq %eax, %r13
pushq $0x28
popq %rdx
movq %r13, %rax
mulq %rdx
movq %rax, %rbx
seto %al
addq $0x8, %rbx
pushq $-0x1
popq %rdx
cmovbq %rdx, %rbx
movq %rdi, %r12
testb %al, %al
cmovneq %rdx, %rbx
movl %esi, 0x10(%rdi)
andl $0x0, 0x8(%rdi)
andq $0x0, 0x14(%rdi)
leal -0x1(%r13), %eax
movl %eax, 0xc(%rdi)
movq %rbx, %rdi
callq 0x2030
movq %rax, %r15
movq %rax, 0x8(%rsp)
movq %r13, (%rax)
addq $0x8, %rax
imulq $-0x28, %r13, %r14
xorl %ebp, %ebp
movq %rax, 0x10(%rsp)
movq %rax, %r13
movq %r13, %rdi
callq 0x8b14
addq $-0x28, %rbp
addq $0x28, %r13
cmpq %rbp, %r14
jne 0x80df
movq 0x10(%rsp), %rax
movq %rax, (%r12)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
testq %rbp, %rbp
je 0x812a
negq %rbp
addq $-0x20, %r15
leaq (%r15,%rbp), %rdi
callq 0x8b28
addq $-0x28, %rbp
jne 0x811b
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x2330
movq %r12, %rdi
callq 0x2300
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/./HashMap.h
// Function: HashKey::ComputeHash() const
int ComputeHash() const {
		unsigned long hash = 0;
		int i = 0;

		while (i < KEYSIZE) {
			hash = (int)Key[i++] + (hash << 7) + (hash << 16) - hash;
		}

		return hash;
	}

// Assembly:
xorl %ecx, %ecx
xorl %eax, %eax
cmpq $0x15, %rcx
je 0x88b1
movsbl (%rdi,%rcx), %edx
incq %rcx
imull $0x1007f, %eax, %eax    # imm = 0x1007F
addl %edx, %eax
jmp 0x889a
retq
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/./HashMap.h
// Function: KeyValue<int>::KeyValue(int, HashKey const&, int const&, KeyValue<int>*)
KeyValue<T>::KeyValue(int hash, HashKey const& key, T const& value, KeyValue<T> * next) {
	Next = next;
	Key = key;
	Hash = hash;
	Value = value;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r12
addq $0x8, %rdi
callq 0x82ae
movq %rbx, (%r12)
movups (%r15), %xmm0
movups %xmm0, 0x8(%r12)
movq 0xd(%r15), %rax
movq %rax, 0x15(%r12)
movl %ebp, 0x24(%r12)
movl (%r14), %eax
movl %eax, 0x20(%r12)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Random.cpp
// Function: Random::SetSeed(int)
void Random::SetSeed(int seed) {
	this->seed = seed;
	mix = 51651237;
	twist = 895213268;
	value = seed;

	for (int i = 0; i < 50; ++i) {
		CalculateNext();
	}

	seed ^= (seed >> 15);
	value = 0x9417B3AF ^ seed;

	for (int i = 0; i < 950; ++i) {
		CalculateNext();
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, 0xc(%rdi)
movabsq $0x355bded4031422a5, %rax # imm = 0x355BDED4031422A5
movq %rax, 0x4(%rdi)
movl %esi, (%rdi)
pushq $0x32
popq %r14
subl $0x1, %r14d
jb 0x8d82
movq %rbx, %rdi
callq 0x8d0c
jmp 0x8d72
movl %ebp, %eax
sarl $0xf, %eax
xorl %ebp, %eax
xorl $0x9417b3af, %eax       # imm = 0x9417B3AF
movl %eax, (%rbx)
movl $0x3b6, %ebp            # imm = 0x3B6
subl $0x1, %ebp
jb 0x8da4
movq %rbx, %rdi
callq 0x8d0c
jmp 0x8d95
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Random.cpp
// Function: Random::Next2()
int Random::Next2() {
	if (seed == 0) { seed = 0x12345987; }
	int k = seed / 127773;
	seed = 16807 * (seed - k * 127773) - 2836 * k;
	if ((int)seed < 0) { seed += 2147483647; }
	return seed & 0x7fffffff;
}

// Assembly:
movl 0xc(%rdi), %eax
testl %eax, %eax
movl $0x12345987, %ecx       # imm = 0x12345987
cmovnel %eax, %ecx
movl $0x1f31d, %esi          # imm = 0x1F31D
movl %ecx, %eax
xorl %edx, %edx
divl %esi
imull $0xfffe0ce3, %eax, %edx # imm = 0xFFFE0CE3
addl %ecx, %edx
imull $0x41a7, %edx, %ecx     # imm = 0x41A7
imull $0xfffff4ec, %eax, %edx # imm = 0xFFFFF4EC
addl %ecx, %edx
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
leal (%rdx,%rcx), %eax
testl %edx, %edx
cmovnsl %edx, %eax
movl %eax, 0xc(%rdi)
andl %ecx, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ShootMe[P]Klondike-Solver/Card.cpp
// Function: Card::Set(unsigned char)
void Card::Set(unsigned char value) {
	Value = value;
	Rank = (value % 13) + 1;
	Suit = value / 13;
	IsRed = Suit & 1;
	IsOdd = Rank & 1;
	Foundation = Suit + 9;
}

// Assembly:
movb %sil, 0x5(%rdi)
movzbl %sil, %eax
movb $0xd, %cl
divb %cl
movzbl %ah, %ecx
incb %cl
movb %cl, 0x1(%rdi)
movb %al, (%rdi)
movl %eax, %edx
andb $0x1, %dl
movb %dl, 0x3(%rdi)
andb $0x1, %cl
movb %cl, 0x2(%rdi)
addb $0x9, %al
movb %al, 0x4(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/zimpha[P]MiniSQL/API.cc
// Function: API::createTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<AttrType, std::allocator<AttrType>>&, int)
Response API::createTable(const std::string &tableName, std::vector<AttrType> &data, int pk) {
    if (cm.hasTable(tableName + ".table")) {
        return Response("This table already exists");
    }
    
    Table nt = cm.createTable(tableName + ".table", data);
    nt.attributes[pk].unique = true;
    nt.write();

    std::string dbName = tableName + ".db";
    // Record Manager creat database
    // 传入数据库文件名(dbName)
    rm.RecordManagerTableCreate(dbName);

    return createIndex(tableName + ".PrimaryKeyDefault", tableName, nt.attributes[pk].name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %r8d, %r12d
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, -0x30(%rbp)
leaq 0xd0ce(%rip), %rdx      # 0x11051
leaq -0xd8(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5d7d
movq %r15, %rdi
movq %rbx, %rsi
callq 0xb838
movl %eax, %ebx
leaq -0xd8(%rbp), %rdi
callq 0x34f8
testb %bl, %bl
je 0x3ff0
leaq 0xd18b(%rip), %rsi      # 0x11144
leaq -0xf8(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x30e0
leaq -0xf8(%rbp), %rsi
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0xfde4
leaq -0xf8(%rbp), %rdi
callq 0x34f8
jmp 0x40d1
leaq 0xd05a(%rip), %rdx      # 0x11051
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5d7d
leaq -0xd8(%rbp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0xb8f2
leaq -0x50(%rbp), %rdi
callq 0x34f8
movslq %r12d, %rax
leaq -0xd8(%rbp), %rdi
movq 0x28(%rdi), %rcx
imulq $0x60, %rax, %r12
movb $0x1, 0x28(%rcx,%r12)
callq 0xf884
leaq 0xd076(%rip), %rdx      # 0x110be
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x5d7d
movq -0x30(%rbp), %rbx
leaq -0x90(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3380
leaq 0x30(%r15), %rdi
leaq -0x90(%rbp), %rsi
callq 0xeb28
leaq -0x90(%rbp), %rdi
callq 0x34f8
leaq 0xd0d3(%rip), %rdx      # 0x1115e
leaq -0x70(%rbp), %rdi
movq %r14, %rsi
callq 0x5d7d
addq -0xb0(%rbp), %r12
leaq -0x70(%rbp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rcx
movq %r12, %r8
callq 0x3942
leaq -0x70(%rbp), %rdi
callq 0x34f8
leaq -0x50(%rbp), %rdi
callq 0x34f8
leaq -0xd8(%rbp), %rdi
callq 0x5e26
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
jmp 0x40fb
jmp 0x4102
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x34f8
jmp 0x4105
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x34f8
jmp 0x4115
jmp 0x4112
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x5e26
jmp 0x414c
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
jmp 0x4147
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
jmp 0x4147
movq %rax, %rbx
jmp 0x414c
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x34f8
movq %rbx, %rdi
callq 0x3450
// File: /workspace/github_cpp_makefile_star2_O2/zimpha[P]MiniSQL/API.cc
// Function: API::dropTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Response API::dropTable(const std::string &tableName) {
    if (!cm.hasTable(tableName + ".table")) {
        return Response("Table does not exist");
    }
    cm.dropTable(tableName+".table");

    std::string dbName = tableName + ".db";
    // Record Manager clear database
    // 传入数据库文件名(dbName)
    rm.RecordManagerTableDetete(dbName);
    return Response();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xcede(%rip), %rdx      # 0x11051
leaq -0x40(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x5d7d
movq %r14, %rdi
movq %r12, %rsi
callq 0xb838
movl %eax, %r12d
leaq -0x40(%rbp), %rdi
callq 0x34f8
testb %r12b, %r12b
je 0x420d
leaq 0xceac(%rip), %rdx      # 0x11051
leaq -0x40(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x5d7d
movq %r14, %rdi
movq %r12, %rsi
callq 0xbb7e
leaq -0x40(%rbp), %rdi
callq 0x34f8
leaq 0xceef(%rip), %rdx      # 0x110be
movq %r12, %rdi
movq %r15, %rsi
callq 0x5d7d
leaq -0x60(%rbp), %rdi
movq %r12, %rsi
callq 0x3380
addq $0x30, %r14
leaq -0x60(%rbp), %rsi
movq %r14, %rdi
callq 0xebbc
leaq -0x60(%rbp), %rdi
callq 0x34f8
movq %rbx, %rdi
callq 0xfdbe
leaq -0x40(%rbp), %rdi
jmp 0x4231
leaq 0xce44(%rip), %rsi      # 0x11058
leaq -0x80(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x30e0
leaq -0x80(%rbp), %rsi
movq %rbx, %rdi
callq 0xfde4
leaq -0x80(%rbp), %rdi
callq 0x34f8
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x34f8
jmp 0x4269
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
jmp 0x426d
movq %rax, %rbx
jmp 0x4272
jmp 0x4266
jmp 0x4266
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x34f8
movq %rbx, %rdi
callq 0x3450