LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/shuimu[P]logistic-regression/lr.cpp
// Function: bdg()
void bdg() {
    for(int j = 0; j < D; j++) {
        J_sita_dev[j] = 0;
        for(int i = 0; i < M; i++) {
            J_sita_dev[j] += func(i)*train_features[i][j];
        }
    }
    J_sita_0_dev = 0;
    for(int i = 0; i < M; i++) J_sita_0_dev += func(i); 
    
    for(int j = 0; j < D; j++) J_sita_dev[j] /= M;
    J_sita_0_dev /= M;
    
    for(int j = 0; j < D; j++) J_sita[j] -= ALPHA*J_sita_dev[j];
    J_sita_0 -= ALPHA*J_sita_0_dev;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x3900(%rip)      # 0x5104
jle 0x1873
xorl %r14d, %r14d
movq 0x39c0(%rip), %rax      # 0x51d0
movq $0x0, (%rax,%r14,8)
cmpl $0x0, 0x38e1(%rip)      # 0x5100
jle 0x1864
xorl %r15d, %r15d
xorl %ebx, %ebx
movl %ebx, %edi
callq 0x176a
movq 0x390c(%rip), %rax      # 0x5140
movq (%rax,%r15), %rax
mulsd (%rax,%r14,8), %xmm0
movq 0x398b(%rip), %rax      # 0x51d0
addsd (%rax,%r14,8), %xmm0
movsd %xmm0, (%rax,%r14,8)
incq %rbx
movslq 0x38a5(%rip), %rax      # 0x5100
addq $0x18, %r15
cmpq %rax, %rbx
jl 0x1826
incq %r14
movslq 0x3896(%rip), %rax      # 0x5104
cmpq %rax, %r14
jl 0x1809
movq $0x0, 0x3972(%rip) # 0x51f0
movl 0x387c(%rip), %ecx      # 0x5100
testl %ecx, %ecx
jle 0x18ad
xorl %ebx, %ebx
movl %ebx, %edi
callq 0x176a
addsd 0x3957(%rip), %xmm0     # 0x51f0
movsd %xmm0, 0x394f(%rip)     # 0x51f0
incl %ebx
movl 0x3857(%rip), %ecx      # 0x5100
cmpl %ecx, %ebx
jl 0x188a
movslq 0x3850(%rip), %rax      # 0x5104
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
testq %rax, %rax
jle 0x18df
movq 0x3909(%rip), %rcx      # 0x51d0
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x18c9
movsd 0x3909(%rip), %xmm1     # 0x51f0
divsd %xmm0, %xmm1
movsd %xmm1, 0x38fd(%rip)     # 0x51f0
testl %eax, %eax
jle 0x192a
movq 0x38d2(%rip), %rcx      # 0x51d0
movq 0x38b3(%rip), %rdx      # 0x51b8
xorl %esi, %esi
movsd 0x37e9(%rip), %xmm0     # 0x50f8
movsd (%rdx,%rsi,8), %xmm1
mulsd (%rcx,%rsi,8), %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x1907
movsd 0x37c6(%rip), %xmm0     # 0x50f8
movsd 0x38ae(%rip), %xmm1     # 0x51e8
mulsd 0x38ae(%rip), %xmm0     # 0x51f0
subsd %xmm0, %xmm1
movsd %xmm1, 0x389a(%rip)     # 0x51e8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/shuimu[P]logistic-regression/lr.cpp
// Function: sgd(int)
void sgd(int k) {
    for(int j = 0; j < D; j++) {
        J_sita_dev[j] = func(k)*train_features[k][j];
    }
    J_sita_0_dev = func(k);

    for(int j = 0; j < D; j++) J_sita[j] -= ALPHA*J_sita_dev[j];
    J_sita_0 -= ALPHA*J_sita_0_dev;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpl $0x0, 0x3798(%rip)      # 0x5104
jle 0x19ac
movslq %ebx, %rax
xorl %r14d, %r14d
leaq (%rax,%rax,2), %r15
movl %ebx, %edi
callq 0x176a
movq 0x37ba(%rip), %rax      # 0x5140
movq (%rax,%r15,8), %rax
mulsd (%rax,%r14,8), %xmm0
movq 0x3839(%rip), %rax      # 0x51d0
movsd %xmm0, (%rax,%r14,8)
incq %r14
movslq 0x375d(%rip), %rax      # 0x5104
cmpq %rax, %r14
jl 0x1978
movl %ebx, %edi
callq 0x176a
movsd %xmm0, 0x3835(%rip)     # 0x51f0
movslq 0x3742(%rip), %rax      # 0x5104
testq %rax, %rax
jle 0x19fa
movq 0x3802(%rip), %rcx      # 0x51d0
movq 0x37e3(%rip), %rdx      # 0x51b8
xorl %esi, %esi
movsd 0x3719(%rip), %xmm0     # 0x50f8
movsd (%rdx,%rsi,8), %xmm1
mulsd (%rcx,%rsi,8), %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x19d7
movsd 0x36f6(%rip), %xmm0     # 0x50f8
movsd 0x37de(%rip), %xmm1     # 0x51e8
mulsd 0x37de(%rip), %xmm0     # 0x51f0
subsd %xmm0, %xmm1
movsd %xmm1, 0x37ca(%rip)     # 0x51e8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/shuimu[P]logistic-regression/lr.cpp
// Function: split(char const*, char, int*)
char ** split(const char * string, char delim, int * count) {
    if( !string )
        return 0;
    int i, j, c;
    i = 0; j = c = 1;
    int length = strlen(string);
    char * copy_str = (char *) malloc(length+1);
    memmove(copy_str, string, length);
    copy_str[length] = '\0';
    for(; i < length; i++) {
        if(copy_str[i] == delim) {
            c += 1;
        }
    }
    (*count) = c;
    char** str_array = (char**)malloc(sizeof(char*) * c);
    str_array[0] = copy_str;
    for(i = 0; i < length; i++) {
        if(copy_str[i] == delim) {
            copy_str[i] = '\0';
            str_array[j++] = copy_str + i + 1;
        }
    }
    return str_array;
}

// Assembly:
testq %rdi, %rdi
je 0x1a9b
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r13
movq %rdx, -0x30(%rbp)
callq 0x1060
movq %rax, %r14
incl %eax
movslq %eax, %rdi
callq 0x1110
movq %rax, %r15
movslq %r14d, %r12
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1090
movb $0x0, (%r15,%r12)
testl %r12d, %r12d
jle 0x1a9e
movl %r14d, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl $0x1, %eax
xorl %edx, %edx
xorl %esi, %esi
cmpb %bl, (%r15,%rdx)
sete %sil
addl %esi, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x1a85
jmp 0x1aa3
xorl %eax, %eax
retq
movl $0x1, %eax
movq -0x30(%rbp), %rcx
movl %eax, (%rcx)
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x1110
movq %r15, (%rax)
testl %r14d, %r14d
jle 0x1ae8
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
incq %r15
movl $0x1, %ecx
cmpb %bl, -0x1(%r15)
jne 0x1ae0
movb $0x0, -0x1(%r15)
movslq %ecx, %rdx
incl %ecx
movq %r15, (%rax,%rdx,8)
incq %r15
decq %r14
jne 0x1acc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/shuimu[P]logistic-regression/lr.cpp
// Function: pfunc(int)
double pfunc(int k) {
    double ret = 0.0;
    for(int i = 0; i < D; i++) {
        ret += J_sita[i]*predict_features[k][i];
    }
    return logistic_func(ret+J_sita_0) > 0.5 ? 1.0 : 0.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x31a7(%rip), %rax      # 0x5104
testq %rax, %rax
jle 0x1f99
movq 0x324f(%rip), %rcx      # 0x51b8
movslq %edi, %rdx
movq 0x31e5(%rip), %rsi      # 0x5158
leaq (%rdx,%rdx,2), %rdx
movq (%rsi,%rdx,8), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm1
mulsd (%rdx,%rsi,8), %xmm1
addsd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rax
jne 0x1f81
jmp 0x1f9d
xorpd %xmm0, %xmm0
addsd 0x3243(%rip), %xmm0     # 0x51e8
xorpd 0x1063(%rip), %xmm0     # 0x3010
callq 0x11b0
movsd 0x1076(%rip), %xmm1     # 0x3030
addsd %xmm1, %xmm0
movapd %xmm1, %xmm2
divsd %xmm0, %xmm2
movsd 0x106a(%rip), %xmm0     # 0x3038
cmpltsd %xmm2, %xmm0
andpd %xmm1, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/shuimu[P]logistic-regression/lr.cpp
// Function: predict()
void predict() {
    FILE * ofp;
    if((ofp = fopen(output_file, "w")) == NULL) {
        fprintf(stderr, "ERROR: Can't open output file");
    }
    for(int i = 0; i < predict_features.size(); i++) {
        fprintf(ofp, "%s", predict_instances[i]);
        for(int j = 0; j < D; j++) {
            fprintf(ofp, "\t%.3f", predict_features[i][j]);
        }
        fprintf(ofp, "\t%.3f\n", pfunc(i));
    }
    fclose(ofp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x314a(%rip), %rdi      # 0x5138
leaq 0x1238(%rip), %rsi      # 0x322d
callq 0x10f0
movq %rax, %rbx
testq %rax, %rax
je 0x20cf
movq 0x3153(%rip), %rax      # 0x5160
cmpq 0x3144(%rip), %rax      # 0x5158
je 0x20b9
xorl %r14d, %r14d
leaq 0x1229(%rip), %r15      # 0x324d
movq 0x3175(%rip), %rax      # 0x51a0
movq (%rax,%r14,8), %rdi
movq %rbx, %rsi
callq 0x10e0
cmpl $0x0, 0x30c6(%rip)      # 0x5104
jle 0x2074
leaq (%r14,%r14,2), %r12
xorl %r13d, %r13d
movq 0x310a(%rip), %rax      # 0x5158
movq (%rax,%r12,8), %rax
movsd (%rax,%r13,8), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x1130
incq %r13
movslq 0x3095(%rip), %rax      # 0x5104
cmpq %rax, %r13
jl 0x2047
movl %r14d, %edi
callq 0x1f52
movq %rbx, %rdi
leaq 0x11cd(%rip), %rsi      # 0x3253
movb $0x1, %al
callq 0x1130
movq 0x30cc(%rip), %rax      # 0x5160
subq 0x30bd(%rip), %rax      # 0x5158
incq %r14
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %r14, %rax
ja 0x2024
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
callq 0x1335
jmp 0x2006
// File: /workspace/github_cpp_makefile_star2_O1/shuimu[P]logistic-regression/lr.cpp
// Function: main
int main(int argc, char * argv[]) {
    if (command_line_parse(argc, argv) != 0) { print_help(); return -1; }
    if (load_data() != 0) { print_help(); return -1; }
    init_alldata();
    if(ALGO == 1) bgd_train_model();
    else sgd_train_model();
    predict();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x1613
testl %eax, %eax
jne 0x212e
callq 0x1af7
testl %eax, %eax
jne 0x212e
callq 0x1e36
cmpl $0x1, 0x300f(%rip)      # 0x510c
jne 0x211b
cmpl $0x0, 0x3002(%rip)      # 0x5108
jle 0x2120
xorl %ebx, %ebx
callq 0x17f3
incl %ebx
cmpl 0x2ff1(%rip), %ebx      # 0x5108
jl 0x210a
jmp 0x2120
callq 0x1ef9
callq 0x1fd9
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x11e0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2127
// File: /workspace/github_cpp_makefile_star2_O1/corecodec[P]coremake/corerc.c
// Function: truncfilename
void truncfilename(char* path)
{
	char* i = getfilename(path);
	memmove(path,i,strlen(i)+1);
	i = strrchr(path,'.');
	if (i) *i=0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2f, %esi
callq 0x1070
leaq 0x1(%rax), %r14
testq %rax, %rax
cmoveq %rbx, %r14
movq %r14, %rdi
callq 0x1050
leaq 0x1(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10e0
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x1070
testq %rax, %rax
je 0x12a9
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/nmmmnu[P]asyncore_cpp/net/worker/keyvalueworker_impl.h
// Function: net::WorkerStatus net::worker::KeyValueWorker<net::protocol::RedisProtocol>::operator()<net::ClientBuffer<1024ul>>(net::ClientBuffer<1024ul>&)
WorkerStatus KeyValueWorker<PROTOCOL>::operator()(CONNECTION &buffer){
	if (buffer.size() == 0)
		return WorkerStatus::PASS;

	using ProtocolStatus = net::protocol::ProtocolStatus;

	auto status = protocol_( StringRef{ buffer.data(), buffer.size() } );

	switch(status){
		case ProtocolStatus::BUFFER_NOT_READ :
			return WorkerStatus::PASS;

		case ProtocolStatus::OK : {
			protocol_.print();

			return process_request_(buffer);
		}

		case ProtocolStatus::ERROR : {
			buffer.clear();
			buffer.push( PROTOCOL::RESPONSE_ERROR );
			return WorkerStatus::WRITE;
		}
	}

	return WorkerStatus::WRITE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movzwl 0x2(%rsi), %eax
movzwl (%rsi), %ecx
xorl %r14d, %r14d
cmpw %cx, %ax
jne 0x32a0
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movq %rdi, %r15
subq %rcx, %rax
addq %rsi, %rcx
addq $0x4, %rcx
leaq -0x28(%rbp), %rsi
movq %rax, (%rsi)
movq %rcx, 0x8(%rsi)
callq 0x3956
cmpl $0x2, %eax
je 0x32e6
cmpl $0x1, %eax
je 0x3292
testl %eax, %eax
jne 0x332b
movq %r15, %rdi
callq 0x38ec
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3336
movl %eax, %r14d
jmp 0x3292
movl $0x0, (%rbx)
leaq 0x4ea5(%rip), %rax      # 0x8198
movq (%rax), %r15
leaq -0x401(%r15), %rcx
movl $0x2, %r14d
cmpq $-0x400, %rcx           # imm = 0xFC00
jb 0x3292
movq 0x8(%rax), %rsi
testq %rsi, %rsi
je 0x3321
leaq 0x4(%rbx), %rdi
movq %r15, %rdx
callq 0x2270
movw %r15w, 0x2(%rbx)
jmp 0x3292
movl $0x2, %r14d
jmp 0x3292
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rax
movq 0x8(%rax), %rdi
leaq 0x4e57(%rip), %rcx      # 0x81a8
movq 0x8(%rcx), %rsi
cmpq %rsi, %rdi
jne 0x3368
movq (%rax), %rdx
movl $0x5, %r14d
cmpq (%rcx), %rdx
je 0x33df
movq %rdi, %r8
xorq %rsi, %r8
movq (%rcx), %rdx
movq (%rax), %rax
movq %rax, %rcx
xorq %rdx, %rcx
movl $0x5, %r14d
orq %r8, %rcx
je 0x33df
cmpq %rdx, %rax
sete %r15b
cmovaq %rax, %rdx
callq 0x21d0
testl %eax, %eax
sete %al
testb %r15b, %al
jne 0x33df
movl $0x0, (%rbx)
leaq 0x4ddc(%rip), %rax      # 0x8188
movq (%rax), %r15
leaq -0x401(%r15), %rcx
movl $0x2, %r14d
cmpq $-0x400, %rcx           # imm = 0xFC00
jb 0x33df
movq 0x8(%rax), %rsi
testq %rsi, %rsi
je 0x33da
leaq 0x4(%rbx), %rdi
movq %r15, %rdx
callq 0x2270
movw %r15w, 0x2(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x38d2
decl %eax
movl %eax, 0x128(%rdi)
leaq (%rax,%rax,2), %rax
leaq (%rdi,%rax,2), %rdx
addq $0x90, %rdx
leaq 0x124(%rdi), %rcx
movl 0x124(%rdi), %eax
jmp 0x38f8
leaq 0x128(%rdi), %rcx
movslq 0x124(%rdi), %rdx
decq %rdx
movl %edx, 0x124(%rdi)
leaq (%rdx,%rdx,2), %rdx
leaq (%rdi,%rdx,2), %rdx
addq $0x90, %rdi
leal 0x1(%rax), %esi
movl %esi, (%rcx)
cltq
leaq (%rax,%rax,2), %rax
movzwl 0x4(%rdx), %ecx
movw %cx, 0x4(%rdi,%rax,2)
movl (%rdx), %ecx
movl %ecx, (%rdi,%rax,2)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movl 0x128(%rdi), %r9d
testl %edx, %edx
jle 0x39d0
pushq %rbx
subl %edx, %r9d
movl $0x90, %r10d
leaq (%rsi,%r10), %rax
movslq %r9d, %rcx
leaq (%rcx,%rcx,2), %r8
leaq (%rdi,%r8,2), %r8
addq %r10, %r8
movl (%r8), %r9d
movzwl 0x4(%r8), %r10d
movslq 0x128(%rsi), %r11
leal 0x1(%r11), %ebx
movl %ebx, 0x128(%rsi)
leaq (%r11,%r11,2), %r11
movw %r10w, 0x4(%rax,%r11,2)
movl %r9d, (%rax,%r11,2)
incl 0x120(%rsi)
incq %rcx
movslq 0x128(%rdi), %r9
addq $0x6, %r8
cmpq %r9, %rcx
jl 0x398f
popq %rbx
subl %edx, %r9d
movl %r9d, 0x128(%rdi)
subl %edx, 0x120(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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), %eax
subl %edx, %eax
movl $0x90, %ecx
leaq (%rdi,%rcx), %rdx
addq %rsi, %rcx
movslq 0x120(%rdi), %r8
decq %r8
movl %r8d, 0x120(%rdi)
leaq (%r8,%r8,2), %r8
movl (%rdx,%r8,2), %r9d
movzwl 0x4(%rdx,%r8,2), %r8d
movslq 0x128(%rsi), %r10
leal 0x1(%r10), %r11d
movl %r11d, 0x128(%rsi)
leaq (%r10,%r10,2), %r10
movw %r8w, 0x4(%rcx,%r10,2)
movl %r9d, (%rcx,%r10,2)
incl 0x120(%rsi)
movl 0x120(%rdi), %r8d
cmpl %eax, %r8d
jg 0x39f6
movl %r8d, 0x128(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movq $0x0, 0x120(%rdi)
movl $0x0, 0x128(%rdi)
movl $0x18, %r14d
leaq 0x90(%rbx), %rdi
callq 0x9d88
movq %rbx, %rdi
callq 0x9d88
addq $0x6, %rbx
decq %r14
jne 0x3a88
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
movslq 0x1914(%rdi), %r9
testq %r9, %r9
jle 0x4c96
pushq %rbp
pushq %rbx
movl 0x1904(%rdi), %r10d
movl $0x18, %ecx
xorl %r11d, %r11d
xorl %eax, %eax
xorl %ebx, %ebx
movb (%rdi,%r11,4), %dl
movzbl 0x3(%rdi,%r11,4), %r8d
leal 0x1(%rax), %esi
testl %r8d, %r8d
je 0x4c3e
testb %dl, %dl
je 0x4c46
addl $0x2, %eax
movl %eax, %esi
jmp 0x4c88
cmpb $0x1, %dl
sbbl $0x0, %ebx
jmp 0x4c88
movl %ecx, %ebp
subl %r8d, %ebp
jge 0x4c70
movl %ecx, %eax
cltd
idivl %r10d
addl %esi, %eax
cmpl $0x1, %edx
sbbl $-0x1, %eax
leal (%rbx,%rcx,2), %edx
subl %edx, %r8d
addl %ebx, %ecx
subl %r8d, %ecx
leal -0x1(%r8), %ebx
movl %ecx, %ebp
movl %eax, %esi
jmp 0x4c75
addl %r8d, %ebx
decl %ebx
movl %r8d, %eax
cltd
idivl %r10d
addl %esi, %eax
cmpl $0x1, %edx
sbbl $-0x1, %eax
movl %ebp, %ecx
movl %eax, %esi
incq %r11
movl %esi, %eax
cmpq %r11, %r9
jne 0x4c21
popq %rbx
popq %rbp
jmp 0x4c98
xorl %esi, %esi
movl %esi, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3aae
movl %eax, %ebx
leaq 0x1160(%r14), %rdi
callq 0x3aae
movzbl 0x3(%r15), %ecx
testl %ecx, %ecx
je 0x4eb9
movl %eax, %esi
movl $0x2, %eax
cmpb $0x0, (%r15)
jne 0x4ecf
movl 0x1904(%r14), %r9d
cmpl %ecx, %esi
jge 0x4ec0
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 0x4ec7
movl $0x1, %eax
jmp 0x4ecf
movl %ecx, %eax
xorl %edx, %edx
idivl %r9d
cmpl $0x1, %edx
sbbl $-0x1, %eax
incl %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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), %r15d
movzbl -0x2(%rdi,%rax,4), %ebp
movb -0x1(%rdi,%rax,4), %r12b
testb %r12b, %r12b
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0x513f
imulq $0x12c, %r14, %rax      # imm = 0x12C
leaq (%rbx,%rax), %rdi
addq $0x800, %rdi            # imm = 0x800
callq 0x38a2
cmpl $0x1, %ebp
jne 0x51e0
movzbl %r12b, %ebp
imulq $0x12c, %r15, %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 0x3912
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x8, %r15b
ja 0x518b
movl $0x1, %eax
cmpb $0x9, %r14b
jb 0x5191
addl %eax, 0x190c(%rbx)
testb %bpl, %bpl
setne %al
testq %r14, %r14
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x5213
leaq 0x800(%rbx), %r14
movq %r14, %rdi
callq 0x3aae
cmpl %ebp, %eax
jge 0x521c
movl %eax, %r15d
decl 0x1908(%rbx)
addq $0x1160, %rbx           # imm = 0x1160
movq %rbx, %rdi
callq 0x3aae
addl %r15d, %eax
addl %eax, %eax
subl %ebp, %eax
jle 0x522d
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x5235
imulq $0x12c, %r15, %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 0x3968
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 0x5237
negl %eax
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x39e2
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4456
cmpl $0x1, 0x1910(%rbx)
jne 0x567d
movl 0x1874(%rbx), %esi
movq %rbx, %rdi
callq 0x42a4
movq %rbx, %rdi
jmp 0x565c
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 $0x28, %rsp
movq %rdi, %r14
movl %esi, 0x1904(%rdi)
leaq 0x800(%rdi), %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x1908(%rdi)
xorl %ebx, %ebx
leaq (%rbx,%rbp), %rdi
callq 0x3a50
addq $0x12c, %rbx            # imm = 0x12C
cmpq $0xf3c, %rbx            # imm = 0xF3C
jne 0x5ad8
leaq 0x173c(%r14), %rbx
movq %r14, 0x8(%rsp)
leaq 0xa58(%r14), %r13
xorl %r14d, %r14d
movl $0x1, %r15d
movq $-0x6, %r12
movq %rbp, 0x18(%rsp)
movq %rbx, 0x10(%rsp)
imulq $0x12c, %r15, %rdi      # imm = 0x12C
addq %rbp, %rdi
movslq %r14d, %r14
leaq (%r14,%r14,2), %rax
movl (%rbx,%rax,2), %ecx
movzwl 0x4(%rbx,%rax,2), %esi
shlq $0x20, %rsi
orq %rcx, %rsi
callq 0x3874
incl %r14d
cmpq $0x6, %r15
ja 0x5b9c
movq %r14, 0x20(%rsp)
movslq %r14d, %rax
leaq (%rax,%rax,2), %rax
leaq (%rbx,%rax,2), %rbp
xorl %ebx, %ebx
movq %r13, %r14
movl (%rbp), %eax
movzwl 0x4(%rbp), %esi
shlq $0x20, %rsi
orq %rax, %rsi
movq %r14, %rdi
callq 0x384c
addq $0x12c, %r14            # imm = 0x12C
decq %rbx
addq $0x6, %rbp
cmpq %rbx, %r12
jne 0x5b61
movq 0x20(%rsp), %r14
subl %ebx, %r14d
movq 0x18(%rsp), %rbp
movq 0x10(%rsp), %rbx
incq %r15
addq $0x12c, %r13            # imm = 0x12C
incq %r12
cmpq $0x8, %r15
jne 0x5b1e
movq 0x8(%rsp), %r15
leaq 0x1160(%r15), %r14
addq $0x186e, %r15           # imm = 0x186E
movl $0x34, %ebx
movl (%r15), %eax
movzwl 0x4(%r15), %esi
shlq $0x20, %rsi
orq %rax, %rsi
movq %r14, %rdi
callq 0x3874
decq %rbx
addq $-0x6, %r15
cmpq $0x1c, %rbx
ja 0x5bcb
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3aae
movl %eax, %ebp
leaq 0x1610(%rbx), %rdi
callq 0x3aae
movl %eax, %r14d
cmpl %eax, %ebp
cmovll %ebp, %r14d
leaq 0x128c(%rbx), %rdi
callq 0x3aae
movl %eax, %ebp
addq $0x14e4, %rbx           # imm = 0x14E4
movq %rbx, %rdi
callq 0x3aae
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_O1/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 %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x18f4(%rdi), %r14
cmpl $-0x1, %esi
jne 0x71cf
movq %r14, %rdi
callq 0x9cf2
movl %eax, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x9c10
leaq 0x173c(%rbx), %r15
xorl %r12d, %r12d
movzbl %r12b, %esi
movq %r15, %rdi
callq 0x9d8e
incq %r12
addq $0x6, %r15
cmpq $0x34, %r12
jne 0x71e3
addq $0x173c, %rbx           # imm = 0x173C
movl $0x10d, %r15d           # imm = 0x10D
movq %r14, %rdi
callq 0x9cf2
movslq %eax, %r12
imulq $0x4ec4ec4f, %r12, %rax # imm = 0x4EC4EC4F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x24, %rax
addl %ecx, %eax
imull $0x34, %eax, %eax
subl %eax, %r12d
movq %r14, %rdi
callq 0x9cf2
cltq
imulq $0x4ec4ec4f, %rax, %rcx # imm = 0x4EC4EC4F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x24, %rcx
addl %edx, %ecx
imull $0x34, %ecx, %ecx
subl %ecx, %eax
movslq %r12d, %rcx
leaq (%rcx,%rcx,2), %rcx
movzwl 0x4(%rbx,%rcx,2), %edx
movw %dx, 0xc(%rsp)
movl (%rbx,%rcx,2), %edx
movl %edx, 0x8(%rsp)
cltq
leaq (%rax,%rax,2), %rax
movzwl 0x4(%rbx,%rax,2), %edx
movw %dx, 0x4(%rbx,%rcx,2)
movl (%rbx,%rax,2), %edx
movl %edx, (%rbx,%rcx,2)
movzwl 0xc(%rsp), %ecx
movw %cx, 0x4(%rbx,%rax,2)
movl 0x8(%rsp), %ecx
movl %ecx, (%rbx,%rax,2)
decl %r15d
jne 0x7209
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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), %r14
xorl %r15d, %r15d
movzbl %r15b, %esi
movq %r14, %rdi
callq 0x9d8e
incq %r15
addq $0x6, %r14
cmpq $0x1a, %r15
jne 0x72c5
leaq 0x1826(%rbx), %r14
movq $-0xd, %r15
leal 0x27(%r15), %eax
movzbl %al, %esi
movq %r14, %rdi
callq 0x9d8e
addq $0x6, %r14
incq %r15
jne 0x72ec
leaq 0x17d8(%rbx), %r14
movq $-0xd, %r15
leal 0x34(%r15), %eax
movzbl %al, %esi
movq %r14, %rdi
callq 0x9d8e
addq $0x6, %r14
incq %r15
jne 0x7312
leaq 0x18f4(%rbx), %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x9c10
leaq 0x173c(%rbx), %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x9d36
cltq
imulq $0x4ec4ec4f, %rax, %rcx # imm = 0x4EC4EC4F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x24, %rcx
addl %edx, %ecx
imull $0x34, %ecx, %ecx
subl %ecx, %eax
movzwl 0x4(%r15,%r13), %ecx
movw %cx, 0x14(%rsp)
movl (%r15,%r13), %ecx
movl %ecx, 0x10(%rsp)
cltq
leaq (%rax,%rax,2), %rax
movzwl 0x4(%r15,%rax,2), %ecx
movw %cx, 0x4(%r15,%r13)
movl (%r15,%rax,2), %ecx
movl %ecx, (%r15,%r13)
movzwl 0x14(%rsp), %ecx
movw %cx, 0x4(%r15,%rax,2)
movl 0x10(%rsp), %ecx
movl %ecx, (%r15,%rax,2)
addq $0x6, %r13
cmpq $0x138, %r13            # imm = 0x138
jne 0x7348
incl %r12d
cmpl $0x7, %r12d
jne 0x7345
addq $0x186e, %rbx           # imm = 0x186E
xorl %eax, %eax
movzwl 0x4(%rbx,%rax), %ecx
movw %cx, 0xc(%rsp)
movl (%rbx,%rax), %ecx
movl %ecx, 0x8(%rsp)
movzwl 0x4(%r15), %ecx
movw %cx, 0x4(%rbx,%rax)
movl (%r15), %ecx
movl %ecx, (%rbx,%rax)
movzwl 0xc(%rsp), %ecx
movw %cx, 0x4(%r15)
movl 0x8(%rsp), %ecx
movl %ecx, (%r15)
addq $0x6, %r15
addq $-0x6, %rax
cmpq $-0x9c, %rax
jne 0x73ca
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movzbl %r15b, %esi
movq %r14, %rdi
callq 0x9d8e
incq %r15
addq $0x6, %r14
cmpq $0x34, %r15
jne 0x7438
addq $0x800, %rbx            # imm = 0x800
xorl %r14d, %r14d
leaq (%rbx,%r14), %rdi
callq 0x3a66
addq $0x12c, %r14            # imm = 0x12C
cmpq $0xf3c, %r14            # imm = 0xF3C
jne 0x745b
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %rdi
xorl %ebp, %ebp
movl $0xd0, %edx
xorl %esi, %esi
callq 0x2100
cmpq $0x9c, 0x8(%rbx)
jb 0x74bc
movq (%rbx), %rcx
movb 0x2(%rcx), %al
xorb $0x30, %al
leal -0x5(%rax), %edx
cmpb $-0x4, %dl
jae 0x74d2
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addq $0x173c, %r14           # imm = 0x173C
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %r12d, %r12d
movsbl (%rcx,%r15), %edx
xorl $0x30, %edx
leal (%rdx,%rdx,4), %edx
movsbl 0x1(%rcx,%r15), %ecx
xorl $0x30, %ecx
leal (%rcx,%rdx,2), %esi
addl $-0xe, %esi
cmpl $-0xd, %esi
jb 0x74bc
leal (%rcx,%rdx,2), %ecx
leal -0x1(%rax), %edx
xorl %esi, %esi
cmpb $0x2, %dl
sete %sil
orl $0x2, %esi
cmpb $0x3, %al
movsbl %dl, %eax
cmovgel %esi, %eax
leal (%rax,%rax,2), %edx
leal (%rax,%rdx,4), %eax
addl %ecx, %eax
decl %eax
cmpl $0x1, (%rsp,%rax,4)
je 0x74bc
movl $0x1, (%rsp,%rax,4)
movzbl %al, %esi
movq %r14, %rdi
callq 0x9d8e
cmpq $0x33, %r12
setae %bpl
cmpq $0x99, %r15
je 0x74bc
movq (%rbx), %rcx
movb 0x5(%rcx,%r15), %al
xorb $0x30, %al
leal -0x5(%rax), %edx
addq $0x3, %r15
addq $0x6, %r14
incq %r12
cmpb $-0x4, %dl
jae 0x74e1
jmp 0x74bc
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2130
leaq 0x20(%rsp), %r15
xorl %r13d, %r13d
leaq 0x7(%rsp), %r12
movzbl 0x173c(%r14,%r13), %eax
cmpb $0x2, %al
sete %cl
orb $0x2, %cl
cmpb $0x2, %al
movb 0x173d(%r14,%r13), %bl
movzbl %cl, %ebp
cmovbl %eax, %ebp
incb %bpl
cmpb $0x9, %bl
ja 0x7618
movb $0x30, 0x7(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2200
orb $0x30, %bl
movb %bl, 0x7(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2200
orb $0x30, %bpl
movb %bpl, 0x7(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2200
jmp 0x7660
movb $0x31, 0x7(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2200
addb $-0xa, %bl
xorb $0x30, %bl
movb %bl, 0x7(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2200
orb $0x30, %bpl
movb %bpl, 0x7(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2200
addq $0x6, %r13
cmpq $0x138, %r13            # imm = 0x138
jne 0x75a8
leaq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2280
movq 0x692e(%rip), %rsi      # 0xdfb8
leaq 0x10(%rsp), %rdi
callq 0x2150
leaq 0x90(%rsp), %rdi
callq 0x20a0
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x76b8
movq %rax, %rbx
movq 0x68f6(%rip), %rsi      # 0xdfb8
leaq 0x10(%rsp), %rdi
callq 0x2150
leaq 0x90(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2130
cmpl $0x0, 0x1910(%r14)
jle 0x8f9c
leaq 0x1160(%r14), %r15
leaq 0x800(%r14), %r12
xorl %r13d, %r13d
movl 0x1874(%r14,%r13,4), %ebp
movq %r15, %rdi
callq 0x3aae
movl %eax, %ebx
movq %r12, %rdi
callq 0x3aae
movl 0x1904(%r14), %r8d
leaq 0x10(%rsp), %rdi
movl %ebp, %esi
movl %ebx, %edx
movl %eax, %ecx
movl $0x1, %r9d
callq 0x8987
incq %r13
movslq 0x1910(%r14), %rax
cmpq %rax, %r13
jl 0x8f56
leaq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2280
movq 0x5003(%rip), %rsi      # 0xdfb8
leaq 0x10(%rsp), %rdi
callq 0x2150
leaq 0x90(%rsp), %rdi
callq 0x20a0
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8fe3
movq %rax, %rbx
movq 0x4fcb(%rip), %rsi      # 0xdfb8
leaq 0x10(%rsp), %rdi
callq 0x2150
leaq 0x90(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2130
movl 0x1904(%r14), %esi
movl 0x1914(%r14), %r15d
movq %r14, %rdi
callq 0x5aae
movq %rbx, (%rsp)
movq %r15, 0x8(%rsp)
testl %r15d, %r15d
jle 0x90a6
leaq 0x1160(%r14), %r15
leaq 0x800(%r14), %r12
xorl %r13d, %r13d
movl (%r14,%r13,4), %ebp
movq %r15, %rdi
callq 0x3aae
movl %eax, %ebx
movq %r12, %rdi
callq 0x3aae
movl 0x1904(%r14), %r8d
leaq 0x10(%rsp), %rdi
movl %ebp, %esi
movl %ebx, %edx
movl %eax, %ecx
xorl %r9d, %r9d
callq 0x8987
movq %r14, %rdi
movl %ebp, %esi
callq 0x42a4
incq %r13
cmpq %r13, 0x8(%rsp)
jne 0x9062
leaq 0x28(%rsp), %rsi
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x2280
movq 0x4efa(%rip), %rsi      # 0xdfb8
leaq 0x10(%rsp), %rdi
callq 0x2150
leaq 0x90(%rsp), %rdi
callq 0x20a0
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x90ec
movq %rax, %rbx
movq 0x4ec2(%rip), %rsi      # 0xdfb8
leaq 0x10(%rsp), %rdi
callq 0x2150
leaq 0x90(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
xorl %eax, %eax
xorl %r12d, %r12d
movsbq (%r15,%rax), %rcx
incq %rax
imulq $0x1007f, %r12, %r12    # imm = 0x1007F
addq %rcx, %r12
cmpq $0x15, %rax
jne 0x9134
movl %r12d, %eax
sarl $0x10, %eax
xorl %r12d, %eax
andl 0xc(%rdi), %eax
cltq
movq (%rdi), %rcx
leaq (%rax,%rax,4), %rax
leaq (%rcx,%rax,8), %r13
movl $0x1, %ebp
testq %rcx, %rcx
je 0x91b4
movq %r13, %rax
cmpb $0x0, 0x8(%rax)
je 0x91b4
cmpl %r12d, 0x24(%rax)
jne 0x91aa
xorl %ecx, %ecx
movb (%r15,%rcx), %sil
cmpb 0x8(%rax,%rcx), %sil
jne 0x9199
incq %rcx
cmpq $0x14, %rcx
jne 0x9180
movl $0x14, %ecx
movl %ecx, %ecx
movb (%r15,%rcx), %sil
cmpb 0x8(%rax,%rcx), %sil
je 0x9238
movq (%rax), %rax
incl %ebp
testq %rax, %rax
jne 0x9172
incl 0x8(%rdi)
leaq 0x8(%r13), %r14
cmpb $0x0, 0x8(%r13)
je 0x920c
movq %rdi, (%rsp)
movl $0x28, %edi
callq 0x21c0
movq (%rsp), %rdi
movl 0x24(%r13), %ecx
movq (%r13), %rsi
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq $0x0, 0x15(%rax)
movq %rsi, (%rax)
movq 0xd(%r14), %rsi
movq %rsi, 0x15(%rax)
movups (%r14), %xmm0
movups %xmm0, 0x8(%rax)
movl %ecx, 0x24(%rax)
movl 0x20(%r13), %ecx
movl %ecx, 0x20(%rax)
movq %rax, (%r13)
movl %r12d, 0x24(%r13)
movq 0xd(%r15), %rax
movq %rax, 0xd(%r14)
movups (%r15), %xmm0
movups %xmm0, (%r14)
movl (%rbx), %eax
movl %eax, 0x20(%r13)
cmpl 0x14(%rdi), %ebp
jle 0x922e
movl %ebp, 0x14(%rdi)
cmpl $0x1, %ebp
jne 0x9236
incl 0x18(%rdi)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movl %esi, %ecx
movl $0x1, %eax
shll %cl, %eax
movq %rdi, %rbx
movslq %eax, %r14
movl $0x28, %edx
movq %r14, %rax
mulq %rdx
seto %dl
addq $0x8, %rax
movq $-0x1, %rdi
cmovbq %rdi, %rax
movl %esi, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movq $0x0, 0x14(%rbx)
testb %dl, %dl
cmoveq %rax, %rdi
leal -0x1(%r14), %eax
movl %eax, 0xc(%rbx)
callq 0x2030
movq %r14, (%rax)
addq $0x8, %rax
shlq $0x3, %r14
leaq (%r14,%r14,4), %rcx
xorl %edx, %edx
xorps %xmm0, %xmm0
movups %xmm0, 0xd(%rax,%rdx)
movups %xmm0, (%rax,%rdx)
addq $0x28, %rdx
cmpq %rdx, %rcx
jne 0x92b0
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ShootMe[P]Klondike-Solver/Random.cpp
// Function: Random::CalculateNext()
void Random::CalculateNext() {
	int y = value ^ twist - mix ^ value;
	y ^= twist ^ value ^ mix;
	mix ^= twist ^ value;
	value ^= twist - mix;
	twist ^= value ^ y;
	value ^= (twist << 7) ^ (mix >> 16) ^ (y << 8);
}

// Assembly:
movl 0x8(%rdi), %eax
movl (%rdi), %ecx
movl 0x4(%rdi), %edx
movl %eax, %esi
subl %edx, %esi
movl %eax, %r8d
xorl %ecx, %r8d
xorl %edx, %r8d
xorl %r8d, %esi
movl %r8d, 0x4(%rdi)
movl %esi, %edx
xorl %eax, %edx
subl %r8d, %eax
xorl %ecx, %eax
xorl %eax, %edx
movl %edx, 0x8(%rdi)
shll $0x7, %edx
sarl $0x10, %r8d
shll $0x8, %esi
xorl %r8d, %esi
xorl %eax, %esi
xorl %edx, %esi
movl %esi, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movl %esi, 0xc(%rdi)
movabsq $0x355bded4031422a5, %rax # imm = 0x355BDED4031422A5
movq %rax, 0x4(%rdi)
movl %esi, (%rdi)
movl $0x31422a5, %ecx        # imm = 0x31422A5
movl $0x355bded4, %eax       # imm = 0x355BDED4
movl $0x32, %edx
movl %esi, %r9d
movl %ecx, %r10d
movl %eax, %r8d
subl %ecx, %r8d
movl %eax, %ecx
xorl %r9d, %ecx
xorl %r10d, %ecx
xorl %ecx, %r8d
movl %r8d, %r10d
xorl %eax, %r10d
subl %ecx, %eax
movl %eax, %r11d
xorl %r9d, %r11d
movl %r10d, %eax
xorl %r11d, %eax
movl %eax, %r9d
shll $0x7, %r9d
movl %ecx, %r10d
sarl $0x10, %r10d
shll $0x8, %r8d
xorl %r10d, %r8d
xorl %r11d, %r8d
xorl %r9d, %r8d
movl %r8d, %r9d
decl %edx
jne 0x9c35
movl %eax, 0x8(%rdi)
movl %ecx, 0x4(%rdi)
movl %esi, %r8d
sarl $0xf, %r8d
xorl %esi, %r8d
xorl $0x9417b3af, %r8d       # imm = 0x9417B3AF
movl %r8d, (%rdi)
movl $0x3b6, %edx            # imm = 0x3B6
movl %ecx, %esi
movl %eax, %r9d
subl %ecx, %r9d
movl %eax, %ecx
xorl %r8d, %ecx
xorl %esi, %ecx
xorl %ecx, %r9d
movl %r9d, %esi
xorl %eax, %esi
subl %ecx, %eax
movl %eax, %r10d
xorl %r8d, %r10d
movl %esi, %eax
xorl %r10d, %eax
movl %eax, %esi
shll $0x7, %esi
movl %ecx, %r8d
sarl $0x10, %r8d
shll $0x8, %r9d
xorl %r8d, %r9d
xorl %r10d, %r9d
movl %r9d, %r8d
xorl %esi, %r8d
decl %edx
jne 0x9c9e
movl %r8d, (%rdi)
movl %eax, 0x8(%rdi)
movl %ecx, 0x4(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
cmpl $0x0, 0xc(%rdi)
jne 0x9d43
movl $0x12345987, 0xc(%rdi)  # imm = 0x12345987
movl 0xc(%rdi), %eax
imulq $0x69c16bd, %rax, %rcx  # imm = 0x69C16BD
shrq $0x20, %rcx
movl %eax, %edx
subl %ecx, %edx
shrl %edx
addl %ecx, %edx
shrl $0x10, %edx
imull $0xfffe0ce3, %edx, %ecx # imm = 0xFFFE0CE3
addl %eax, %ecx
imull $0x41a7, %ecx, %eax     # imm = 0x41A7
imull $0xfffff4ec, %edx, %ecx # imm = 0xFFFFF4EC
addl %eax, %ecx
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leal (%rcx,%rdx), %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
movl %eax, 0xc(%rdi)
andl %edx, %eax
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/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)
imull $0x4f, %esi, %eax
shrl $0xa, %eax
leal (%rax,%rax,2), %ecx
leal (%rax,%rcx,4), %ecx
subb %cl, %sil
incb %sil
movb %sil, 0x1(%rdi)
movb %al, (%rdi)
movl %eax, %ecx
andb $0x1, %cl
movb %cl, 0x3(%rdi)
andb $0x1, %sil
movb %sil, 0x2(%rdi)
addb $0x9, %al
movb %al, 0x4(%rdi)
retq