LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/bonetblai[P]mdp-engine/sailing/./sailing.h
// Function: problem_t::next(state_t const&, int, std::vector<std::pair<state_t, float>, std::allocator<std::pair<state_t, float>>>&) const
virtual void next(const state_t &s, Problem::action_t a, std::vector<std::pair<state_t,float> > &outcomes) const {
        ++expansions_;
        outcomes.clear();
        //outcomes.reserve(8);
        state_t next_s = s.apply(a);
        assert(next_s.in_lake(rows_, cols_));
#if 0
        for( int nwind = 0; nwind < 8; ++nwind ) {
            float p = wind_transition_[s.wind_ * 8 + nwind];
            if( p > 0 ) {
                next_s.wind_ = nwind;
                outcomes.push_back(std::make_pair(next_s, p));
            }
        }
#endif
        const std::vector<std::pair<int, float> > &sparse_transition = sparse_wind_transition_[s.wind_];
        outcomes.reserve(sparse_transition.size());
        for( int i = 0; i < int(sparse_transition.size()); ++i ) {
            const std::pair<int, float> &p = sparse_transition[i];
            next_s.wind_ = p.first;
            outcomes.push_back(std::make_pair(next_s, p.second));
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
incq 0x10(%rdi)
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x8d04
movq %rax, 0x8(%rbx)
movq $-0x1, %r15
cmpl $0x7, %edx
ja 0x8d1d
movl %edx, %eax
leaq 0x1c4df(%rip), %rcx     # 0x251f8
movq (%rcx,%rax,8), %r15
movzwl (%rsi), %ebp
addw %r15w, %bp
js 0x8dea
cmpw 0x18(%rdi), %bp
jge 0x8dea
shrq $0x20, %r15
addw 0x2(%rsi), %r15w
js 0x8dea
cmpw 0x1c(%rdi), %r15w
jge 0x8dea
movswq 0x4(%rsi), %rax
movq 0x140(%rdi), %r14
leaq (%rax,%rax,2), %r12
movq 0x8(%r14,%r12,8), %rsi
subq (%r14,%r12,8), %rsi
sarq $0x3, %rsi
movq %rbx, %rdi
callq 0x919e
movq (%r14,%r12,8), %rax
movq 0x8(%r14,%r12,8), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
testl %ecx, %ecx
jle 0x8ddb
leaq (%r14,%r12,8), %r12
xorl %r13d, %r13d
leaq 0xc(%rsp), %r14
movzwl (%rax,%r13,8), %ecx
movw %bp, 0xc(%rsp)
movw %r15w, 0xe(%rsp)
movw %cx, 0x10(%rsp)
movss 0x4(%rax,%r13,8), %xmm0
movss %xmm0, 0x14(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x92aa
incq %r13
movq (%r12), %rax
movq 0x8(%r12), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r13
jl 0x8d93
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c5f5(%rip), %rdi     # 0x253e6
leaq 0x1c60b(%rip), %rsi     # 0x25403
leaq 0x1c610(%rip), %rcx     # 0x2540f
movl $0x9d, %edx
callq 0x5150
nop
// File: /workspace/github_cpp_makefile_star2_O3/attractivechaos[P]udb2/kavl/test.c
// Function: test_int
uint32_t test_int(uint32_t n, uint32_t x0)
{
	uint32_t i, x, z = 0;
	aux_t *root = 0, *p, *q;
	p = (aux_t*)malloc(sizeof(aux_t));
	for (i = 0, x = x0; i < n; ++i) {
		x = hash32(x);
		p->key = get_key(n, x), p->cnt = 0;
		q = kavl_insert(32, &root, p, 0);
		if (p == q) p = (aux_t*)malloc(sizeof(aux_t));
		z += ++q->cnt;
	}
	free(p);
	fprintf(stderr, "# unique keys: %d; checksum: %u\n", kavl_size(head, root), z);
	x = kavl_size(head, root);
	kavl_free(aux_t, head, root, free);
	return x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r12d
movl %edi, %ebp
movq $0x0, 0x8(%rsp)
movl $0x20, %edi
callq 0x1060
movq %rax, %r14
testl %ebp, %ebp
jne 0x15b9
movq %r14, %rdi
callq 0x1030
movq 0x2a49(%rip), %rax      # 0x3ff8
movq (%rax), %rax
xorl %ebx, %ebx
jmp 0x1685
movl %ebp, %r15d
shrl $0x2, %r15d
xorl %ebx, %ebx
movl %r12d, %eax
shll $0xf, %eax
notl %eax
addl %r12d, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xb, %eax
notl %eax
addl %ecx, %eax
movl %eax, %r12d
shrl $0x10, %r12d
xorl %eax, %r12d
movl %r12d, %eax
xorl %edx, %edx
divl %r15d
movl %edx, %eax
shll $0xf, %eax
notl %eax
addl %edx, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xb, %eax
notl %eax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x10, %ecx
xorl %eax, %ecx
movl %ecx, (%r14)
movl $0x0, 0x4(%r14)
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1721
movq %rax, %r13
cmpq %rax, %r14
jne 0x1652
movl $0x20, %edi
callq 0x1060
movq %rax, %r14
movl 0x4(%r13), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x4(%r13)
addl %eax, %ebx
incl %ebx
decl %ebp
jne 0x15c2
movq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x1030
movq 0x297b(%rip), %rax      # 0x3ff8
movq (%rax), %rax
testq %r15, %r15
jne 0x169e
leaq 0x9e9(%rip), %rsi       # 0x2075
xorl %ebp, %ebp
movq %rax, %rdi
xorl %edx, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x1050
jmp 0x16b6
leaq 0x14(%rsp), %r14
movq %r15, %rdi
movq %rax, %rsi
movl %ebx, %edx
movq %r14, %rcx
callq 0x13a8
movl (%r14), %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/shuimu[P]logistic-regression/lr.cpp
// Function: print_help()
void print_help() {
    fprintf(stderr, "\n\n     Linear Regression Command Usage:    \n");
    fprintf(stderr, "\n     ./lr -n <int> -a <double> -k <int> -t <string> -i <string> -o <string>\n");
    fprintf(stderr, "\n     -n maximum iterators                ");
    fprintf(stderr, "\n     -a alpha parameter                  ");
    fprintf(stderr, "\n     -k [1,2] bgd or sgd algorithm       ");
    fprintf(stderr, "\n     -t train file                       ");
    fprintf(stderr, "\n     -p predict file                     ");
    fprintf(stderr, "\n     -o output file                      \n\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x3df6(%rip), %r12      # 0x4fd8
movq (%r12), %rcx
leaq 0x1e7b(%rip), %rdi      # 0x3068
pushq $0x2c
popq %rbx
pushq $0x1
popq %r14
movq %rbx, %rsi
movq %r14, %rdx
callq 0x11b0
movq (%r12), %rcx
leaq 0x1e8b(%rip), %rdi      # 0x3095
pushq $0x4d
popq %rsi
movq %r14, %rdx
callq 0x11b0
movq (%r12), %rcx
leaq 0x1ec3(%rip), %rdi      # 0x30e3
pushq $0x2a
popq %r15
movq %r15, %rsi
movq %r14, %rdx
callq 0x11b0
movq (%r12), %rcx
leaq 0x1ed4(%rip), %rdi      # 0x310e
movq %r15, %rsi
movq %r14, %rdx
callq 0x11b0
movq (%r12), %rcx
leaq 0x1ee9(%rip), %rdi      # 0x3139
movq %r15, %rsi
movq %r14, %rdx
callq 0x11b0
movq (%r12), %rcx
leaq 0x1efe(%rip), %rdi      # 0x3164
movq %r15, %rsi
movq %r14, %rdx
callq 0x11b0
movq (%r12), %rcx
leaq 0x1f13(%rip), %rdi      # 0x318f
movq %r15, %rsi
movq %r14, %rdx
callq 0x11b0
movq (%r12), %rcx
leaq 0x1f28(%rip), %rdi      # 0x31ba
movq %rbx, %rsi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11b0
// File: /workspace/github_cpp_makefile_star2_O3/shuimu[P]logistic-regression/lr.cpp
// Function: command_line_parse(int, char**)
int command_line_parse(int argc, char * argv[]) {
    int i = 0;
    while (i < argc) {
        char * arg = argv[i];
        if (strcmp(arg,"-n") == 0) { MAX_ITERS = atoi(argv[++i]); }
        else if (strcmp(arg, "-t") == 0) { train_file = argv[++i]; }
        else if (strcmp(arg, "-p") == 0) { predict_file = argv[++i]; }
        else if (strcmp(arg, "-o") == 0) { output_file= argv[++i]; }
        else if (strcmp(arg, "-a") == 0) { ALPHA = atof(argv[++i]); }
        else if (strcmp(arg, "-k") == 0) { ALGO  = atoi(argv[++i]); } 
        i++;
    }
    if (predict_file == NULL || train_file == NULL || output_file == NULL) {
        fprintf(stderr, "ERROR: command line not well formatted!");
        return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %edi, %edi
jle 0x170a
movq %rsi, %rbx
movl %edi, %r14d
xorl %r15d, %r15d
movslq %r15d, %rax
movq (%rbx,%rax,8), %rcx
cmpb $0x2d, (%rcx)
jne 0x16fe
cmpb $0x6e, 0x1(%rcx)
jne 0x164a
cmpb $0x0, 0x2(%rcx)
je 0x169c
cmpb $0x74, 0x1(%rcx)
jne 0x1656
cmpb $0x0, 0x2(%rcx)
je 0x16b2
cmpb $0x70, 0x1(%rcx)
jne 0x1662
cmpb $0x0, 0x2(%rcx)
je 0x16c4
cmpb $0x6f, 0x1(%rcx)
jne 0x166e
cmpb $0x0, 0x2(%rcx)
je 0x16d6
cmpb $0x61, 0x1(%rcx)
jne 0x167a
cmpb $0x0, 0x2(%rcx)
je 0x16e8
cmpb $0x6b, 0x1(%rcx)
jne 0x16fe
cmpb $0x0, 0x2(%rcx)
jne 0x16fe
leal 0x1(%rax), %r15d
movq 0x8(%rbx,%rax,8), %rdi
callq 0x1150
movl %eax, 0x3a6a(%rip)      # 0x5104
jmp 0x16fe
leal 0x1(%rax), %r15d
movq 0x8(%rbx,%rax,8), %rdi
callq 0x1150
movl %eax, 0x3a50(%rip)      # 0x5100
jmp 0x16fe
leal 0x1(%rax), %r15d
movq 0x8(%rbx,%rax,8), %rax
movq %rax, 0x3a5e(%rip)      # 0x5120
jmp 0x16fe
leal 0x1(%rax), %r15d
movq 0x8(%rbx,%rax,8), %rax
movq %rax, 0x3a54(%rip)      # 0x5128
jmp 0x16fe
leal 0x1(%rax), %r15d
movq 0x8(%rbx,%rax,8), %rax
movq %rax, 0x3a4a(%rip)      # 0x5130
jmp 0x16fe
leal 0x1(%rax), %r15d
movq 0x8(%rbx,%rax,8), %rdi
callq 0x1100
movsd %xmm0, 0x39f2(%rip)     # 0x50f0
incl %r15d
cmpl %r14d, %r15d
jl 0x162e
cmpq $0x0, 0x3a16(%rip)      # 0x5128
je 0x1735
cmpq $0x0, 0x3a04(%rip)      # 0x5120
je 0x1735
xorl %eax, %eax
cmpq $0x0, 0x3a08(%rip)      # 0x5130
je 0x1735
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x12a5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x172a
// File: /workspace/github_cpp_makefile_star2_O3/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
movl 0x3922(%rip), %eax      # 0x50fc
movl 0x3918(%rip), %ecx      # 0x50f8
testl %eax, %eax
jle 0x184e
movq 0x39dd(%rip), %rdx      # 0x51c8
xorl %r14d, %r14d
movq $0x0, (%rdx,%r14,8)
testl %ecx, %ecx
jle 0x1843
xorl %r15d, %r15d
xorl %ebx, %ebx
movl %ebx, %edi
callq 0x1741
movq 0x392b(%rip), %rax      # 0x5138
movq (%rax,%r15), %rax
mulsd (%rax,%r14,8), %xmm0
movq 0x39aa(%rip), %rdx      # 0x51c8
addsd (%rdx,%r14,8), %xmm0
movsd %xmm0, (%rdx,%r14,8)
incq %rbx
movslq 0x38c4(%rip), %rcx      # 0x50f8
addq $0x18, %r15
cmpq %rcx, %rbx
jl 0x17ff
movl 0x38b9(%rip), %eax      # 0x50fc
incq %r14
movslq %eax, %rsi
cmpq %rsi, %r14
jl 0x17ee
movq $0x0, 0x398f(%rip) # 0x51e8
testl %ecx, %ecx
jle 0x188a
xorl %ebx, %ebx
movl %ebx, %edi
callq 0x1741
addsd 0x397a(%rip), %xmm0     # 0x51e8
movsd %xmm0, 0x3972(%rip)     # 0x51e8
incl %ebx
movl 0x387a(%rip), %ecx      # 0x50f8
cmpl %ecx, %ebx
jl 0x185f
movl 0x3874(%rip), %eax      # 0x50fc
jmp 0x188e
xorpd %xmm0, %xmm0
cvtsi2sd %ecx, %xmm1
testl %eax, %eax
jle 0x190c
movq 0x392b(%rip), %rdx      # 0x51c8
movl %eax, %ecx
xorl %esi, %esi
movsd (%rdx,%rsi,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x18a1
movsd 0x3929(%rip), %xmm0     # 0x51e8
divsd %xmm1, %xmm0
movsd %xmm0, 0x391d(%rip)     # 0x51e8
testl %eax, %eax
jle 0x1918
movq 0x38f2(%rip), %rax      # 0x51c8
movq 0x38d3(%rip), %rdx      # 0x51b0
xorl %esi, %esi
movsd 0x3809(%rip), %xmm0     # 0x50f0
movsd (%rdx,%rsi,8), %xmm1
mulsd (%rax,%rsi,8), %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x18df
movsd 0x38de(%rip), %xmm0     # 0x51e8
jmp 0x1918
divsd %xmm1, %xmm0
movsd %xmm0, 0x38d0(%rip)     # 0x51e8
movsd 0x38c0(%rip), %xmm1     # 0x51e0
mulsd 0x37c8(%rip), %xmm0     # 0x50f0
subsd %xmm0, %xmm1
movsd %xmm1, 0x38ac(%rip)     # 0x51e0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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, 0x37aa(%rip)      # 0x50fc
jle 0x1992
movslq %ebx, %rax
xorl %r14d, %r14d
leaq (%rax,%rax,2), %r15
movl %ebx, %edi
callq 0x1741
movq 0x37cc(%rip), %rax      # 0x5138
movq (%rax,%r15,8), %rax
mulsd (%rax,%r14,8), %xmm0
movq 0x384b(%rip), %rax      # 0x51c8
movsd %xmm0, (%rax,%r14,8)
incq %r14
movslq 0x376f(%rip), %rax      # 0x50fc
cmpq %rax, %r14
jl 0x195e
movl %ebx, %edi
callq 0x1741
movsd %xmm0, 0x3847(%rip)     # 0x51e8
movslq 0x3754(%rip), %rax      # 0x50fc
testq %rax, %rax
jle 0x19e8
movq 0x3814(%rip), %rcx      # 0x51c8
movq 0x37f5(%rip), %rdx      # 0x51b0
xorl %esi, %esi
movsd 0x372b(%rip), %xmm0     # 0x50f0
movsd (%rdx,%rsi,8), %xmm1
mulsd (%rcx,%rsi,8), %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x19bd
movsd 0x3800(%rip), %xmm0     # 0x51e8
movsd 0x37f0(%rip), %xmm1     # 0x51e0
mulsd 0x36f8(%rip), %xmm0     # 0x50f0
subsd %xmm0, %xmm1
movsd %xmm1, 0x37dc(%rip)     # 0x51e0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1a81
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 0x1a84
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 0x1a6b
jmp 0x1a89
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 0x1ace
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
incq %r15
movl $0x1, %ecx
cmpb %bl, -0x1(%r15)
jne 0x1ac6
movb $0x0, -0x1(%r15)
movslq %ecx, %rdx
incl %ecx
movq %r15, (%rax,%rdx,8)
incq %r15
decq %r14
jne 0x1ab2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x31b9(%rip), %rax      # 0x50fc
testq %rax, %rax
jle 0x1f7f
movq 0x3261(%rip), %rcx      # 0x51b0
movslq %edi, %rdx
movq 0x31f7(%rip), %rsi      # 0x5150
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 0x1f67
jmp 0x1f83
xorpd %xmm0, %xmm0
addsd 0x3255(%rip), %xmm0     # 0x51e0
xorpd 0x107d(%rip), %xmm0     # 0x3010
callq 0x11a0
movsd 0x1090(%rip), %xmm1     # 0x3030
addsd %xmm1, %xmm0
movapd %xmm1, %xmm2
divsd %xmm0, %xmm2
movsd 0x1084(%rip), %xmm0     # 0x3038
cmpltsd %xmm2, %xmm0
andpd %xmm1, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x315c(%rip), %rdi      # 0x5130
leaq 0x1240(%rip), %rsi      # 0x321b
callq 0x10f0
movq %rax, %rbx
testq %rax, %rax
je 0x20b5
movq 0x3165(%rip), %rax      # 0x5158
cmpq 0x3156(%rip), %rax      # 0x5150
je 0x209f
xorl %r14d, %r14d
leaq 0x1231(%rip), %r15      # 0x323b
movq 0x3187(%rip), %rax      # 0x5198
movq (%rax,%r14,8), %rdi
movq %rbx, %rsi
callq 0x10e0
cmpl $0x0, 0x30d8(%rip)      # 0x50fc
jle 0x205a
leaq (%r14,%r14,2), %r12
xorl %r13d, %r13d
movq 0x311c(%rip), %rax      # 0x5150
movq (%rax,%r12,8), %rax
movsd (%rax,%r13,8), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x1120
incq %r13
movslq 0x30a7(%rip), %rax      # 0x50fc
cmpq %rax, %r13
jl 0x202d
movl %r14d, %edi
callq 0x1f38
movq %rbx, %rdi
leaq 0x11d5(%rip), %rsi      # 0x3241
movb $0x1, %al
callq 0x1120
movq 0x30de(%rip), %rax      # 0x5158
subq 0x30cf(%rip), %rax      # 0x5150
incq %r14
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %r14, %rax
ja 0x200a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
callq 0x1325
jmp 0x1fec
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2114
callq 0x1add
testl %eax, %eax
jne 0x2114
callq 0x1e1c
cmpl $0x1, 0x3021(%rip)      # 0x5104
jne 0x2101
cmpl $0x0, 0x3014(%rip)      # 0x5100
jle 0x2106
xorl %ebx, %ebx
callq 0x17ca
incl %ebx
cmpl 0x3003(%rip), %ebx      # 0x5100
jl 0x20f0
jmp 0x2106
callq 0x1edf
callq 0x1fbf
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x11d0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x210d
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3282
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 0x391e
cmpl $0x2, %eax
je 0x32c8
cmpl $0x1, %eax
je 0x3274
testl %eax, %eax
jne 0x330d
movq %r15, %rdi
callq 0x38b4
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3318
movl %eax, %r14d
jmp 0x3274
movl $0x0, (%rbx)
leaq 0x3ec3(%rip), %rax      # 0x7198
movq (%rax), %r15
leaq -0x401(%r15), %rcx
movl $0x2, %r14d
cmpq $-0x400, %rcx           # imm = 0xFC00
jb 0x3274
movq 0x8(%rax), %rsi
testq %rsi, %rsi
je 0x3303
leaq 0x4(%rbx), %rdi
movq %r15, %rdx
callq 0x2270
movw %r15w, 0x2(%rbx)
jmp 0x3274
movl $0x2, %r14d
jmp 0x3274
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3e75(%rip), %rcx      # 0x71a8
movq 0x8(%rcx), %rsi
cmpq %rsi, %rdi
je 0x334b
movq (%rcx), %rdx
movq (%rax), %rax
cmpq %rdx, %rax
sete %r15b
jmp 0x335f
movq (%rax), %rax
movq (%rcx), %rdx
movl $0x5, %r14d
cmpq %rdx, %rax
je 0x33bb
xorl %r15d, %r15d
cmpq %rdx, %rax
cmovaq %rax, %rdx
callq 0x21d0
testl %eax, %eax
sete %al
movl $0x5, %r14d
testb %r15b, %al
jne 0x33bb
movl $0x0, (%rbx)
leaq 0x3e00(%rip), %rax      # 0x7188
movq (%rax), %r15
leaq -0x401(%r15), %rcx
movl $0x2, %r14d
cmpq $-0x400, %rcx           # imm = 0xFC00
jb 0x33bb
movq 0x8(%rax), %rsi
testq %rsi, %rsi
je 0x33b6
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_O3/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 0x388a
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 0x38b0
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_O3/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 0x3988
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 0x3947
popq %rbx
subl %edx, %r9d
movl %r9d, 0x128(%rdi)
subl %edx, 0x120(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
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 0x39b2
movl %r8d, 0x128(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x9c80
movq %rbx, %rdi
callq 0x9c80
addq $0x6, %rbx
decq %r14
jne 0x3a40
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4b18
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 0x4ac0
testb %dl, %dl
je 0x4ac8
addl $0x2, %eax
movl %eax, %esi
jmp 0x4b0a
cmpb $0x1, %dl
sbbl $0x0, %ebx
jmp 0x4b0a
movl %ecx, %ebp
subl %r8d, %ebp
jge 0x4af2
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 0x4af7
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 0x4aa3
popq %rbx
popq %rbp
jmp 0x4b1a
xorl %esi, %esi
movl %esi, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3a66
movl %eax, %ebx
leaq 0x1160(%r14), %rdi
callq 0x3a66
movzbl 0x3(%r15), %ecx
testl %ecx, %ecx
je 0x4d25
movl %eax, %esi
movl $0x2, %eax
cmpb $0x0, (%r15)
jne 0x4d3b
movl 0x1904(%r14), %r9d
cmpl %ecx, %esi
jge 0x4d2c
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 0x4d33
movl $0x1, %eax
jmp 0x4d3b
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_O3/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 0x4fc9
imulq $0x12c, %r14, %rax      # imm = 0x12C
leaq (%rbx,%rax), %rdi
addq $0x800, %rdi            # imm = 0x800
callq 0x385a
cmpl $0x1, %ebp
jne 0x5005
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 0x38ca
cmpb $0x9, %r12b
jb 0x5038
decl 0x190c(%rbx)
jmp 0x5046
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 0x3920
cmpb $0x9, %r14b
jb 0x5046
incl 0x190c(%rbx)
jmp 0x5099
movzbl %r15b, %ebp
testb %bpl, %bpl
setne %al
testq %r14, %r14
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x5099
leaq 0x800(%rbx), %r14
movq %r14, %rdi
callq 0x3a66
cmpl %ebp, %eax
jge 0x50a2
movl %eax, %r15d
decl 0x1908(%rbx)
addq $0x1160, %rbx           # imm = 0x1160
movq %rbx, %rdi
callq 0x3a66
addl %r15d, %eax
addl %eax, %eax
subl %ebp, %eax
jle 0x50b3
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x50bb
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 0x50bd
negl %eax
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x399a
// File: /workspace/github_cpp_makefile_star2_O3/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 0x43e4
cmpl $0x1, 0x1910(%rbx)
jne 0x5511
movl 0x1874(%rbx), %esi
movq %rbx, %rdi
callq 0x4232
movq %rbx, %rdi
jmp 0x54f0
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3a08
addq $0x12c, %rbx            # imm = 0x12C
cmpq $0xf3c, %rbx            # imm = 0xF3C
jne 0x5982
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 0x382c
incl %r14d
cmpq $0x6, %r15
ja 0x5a46
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 0x3804
addq $0x12c, %r14            # imm = 0x12C
decq %rbx
addq $0x6, %rbp
cmpq %rbx, %r12
jne 0x5a0b
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 0x59c8
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 0x382c
decq %rbx
addq $-0x6, %r15
cmpq $0x1c, %rbx
ja 0x5a75
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3a66
movl %eax, %ebp
leaq 0x1610(%rbx), %rdi
callq 0x3a66
movl %eax, %r14d
cmpl %eax, %ebp
cmovll %ebp, %r14d
leaq 0x128c(%rbx), %rdi
callq 0x3a66
movl %eax, %ebp
addq $0x14e4, %rbx           # imm = 0x14E4
movq %rbx, %rdi
callq 0x3a66
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_O3/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 0x717f
movq %r14, %rdi
callq 0x9bee
movl %eax, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x9b24
addq $0x173c, %rbx           # imm = 0x173C
xorl %r12d, %r12d
movq %rbx, %r15
movzbl %r12b, %esi
movq %r15, %rdi
callq 0x9c86
incq %r12
addq $0x6, %r15
cmpq $0x34, %r12
jne 0x7196
movl $0x10d, %r15d           # imm = 0x10D
movq %r14, %rdi
callq 0x9bee
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 0x9bee
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 0x71b5
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movzbl %r12b, %esi
movq %r14, %rdi
callq 0x9c86
incq %r12
addq $0x6, %r14
cmpq $0x1a, %r12
jne 0x7274
leaq 0x1826(%rbx), %r14
movq $-0xd, %r12
leal 0x27(%r12), %eax
movzbl %al, %esi
movq %r14, %rdi
callq 0x9c86
addq $0x6, %r14
incq %r12
jne 0x729b
leaq 0x17d8(%rbx), %r14
movq $-0xd, %r12
leal 0x34(%r12), %eax
movzbl %al, %esi
movq %r14, %rdi
callq 0x9c86
addq $0x6, %r14
incq %r12
jne 0x72c2
leaq 0x18f4(%rbx), %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x9b24
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x9c32
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 0x72f2
incl %r12d
cmpl $0x7, %r12d
jne 0x72ef
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 0x7374
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x9c86
incq %r15
addq $0x6, %r14
cmpq $0x34, %r15
jne 0x73e2
addq $0x800, %rbx            # imm = 0x800
xorl %r14d, %r14d
leaq (%rbx,%r14), %rdi
callq 0x3a1e
addq $0x12c, %r14            # imm = 0x12C
cmpq $0xf3c, %r14            # imm = 0xF3C
jne 0x7405
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2100
cmpq $0x9c, 0x8(%rbx)
jb 0x74e8
addq $0x173c, %r14           # imm = 0x173C
movl $0x2, %r15d
movq (%rbx), %rcx
movb (%rcx,%r15), %al
xorb $0x30, %al
leal -0x5(%rax), %edx
cmpb $-0x4, %dl
jb 0x74e6
movsbl -0x2(%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 0x74e6
leal (%rcx,%rdx,2), %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
leal (%rax,%rax,2), %edx
leal (%rax,%rdx,4), %eax
addl %ecx, %eax
decl %eax
cmpl $0x1, (%rsp,%rax,4)
je 0x74e6
movl $0x1, (%rsp,%rax,4)
movzbl %al, %esi
movq %r14, %rdi
callq 0x9c86
addq $0x3, %r15
addq $0x6, %r14
cmpq $0x9e, %r15
jne 0x7463
movb $0x1, %bpl
jmp 0x74e8
xorl %ebp, %ebp
movl %ebp, %eax
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7598
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 0x75e0
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 0x7528
leaq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2280
movq 0x69ae(%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 0x7638
movq %rax, %rbx
movq 0x6976(%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_O3/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 0x8ece
leaq 0x1160(%r14), %r15
leaq 0x800(%r14), %r12
xorl %r13d, %r13d
movl 0x1874(%r14,%r13,4), %ebp
movq %r15, %rdi
callq 0x3a66
movl %eax, %ebx
movq %r12, %rdi
callq 0x3a66
movl 0x1904(%r14), %r8d
leaq 0x10(%rsp), %rdi
movl %ebp, %esi
movl %ebx, %edx
movl %eax, %ecx
movl $0x1, %r9d
callq 0x88b9
incq %r13
movslq 0x1910(%r14), %rax
cmpq %rax, %r13
jl 0x8e88
leaq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2280
movq 0x50d1(%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 0x8f15
movq %rax, %rbx
movq 0x5099(%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_O3/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 0x5958
movq %rbx, (%rsp)
movq %r15, 0x8(%rsp)
testl %r15d, %r15d
jle 0x8fd8
leaq 0x1160(%r14), %r15
leaq 0x800(%r14), %r12
xorl %r13d, %r13d
movl (%r14,%r13,4), %ebp
movq %r15, %rdi
callq 0x3a66
movl %eax, %ebx
movq %r12, %rdi
callq 0x3a66
movl 0x1904(%r14), %r8d
leaq 0x10(%rsp), %rdi
movl %ebp, %esi
movl %ebx, %edx
movl %eax, %ecx
xorl %r9d, %r9d
callq 0x88b9
movq %r14, %rdi
movl %ebp, %esi
callq 0x4232
incq %r13
cmpq %r13, 0x8(%rsp)
jne 0x8f94
leaq 0x28(%rsp), %rsi
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x2280
movq 0x4fc8(%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 0x901e
movq %rax, %rbx
movq 0x4f90(%rip), %rsi      # 0xdfb8
leaq 0x10(%rsp), %rdi
callq 0x2150
leaq 0x90(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x22e0
nop