LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: FakePsyho[P]halite2/hlt/hlt_in.hpp
// Function: hlt::in::parse_ship(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&, int)
static std::pair<EntityId, Ship> parse_ship(std::stringstream& iss, const PlayerId owner_id) {
            Ship ship;

            iss >> ship.entity_id;
            iss >> ship.location.pos_x;
            iss >> ship.location.pos_y;
            iss >> ship.health;

            // No longer in the game, but still part of protocol.
            double vel_x_deprecated, vel_y_deprecated;
            iss >> vel_x_deprecated;
            iss >> vel_y_deprecated;

            int docking_status;
            iss >> docking_status;
            ship.docking_status = static_cast<ShipDockingStatus>(docking_status);

            iss >> ship.docked_planet;
            iss >> ship.docking_progress;
            iss >> ship.weapon_cooldown;

            ship.owner_id = owner_id;
            ship.radius = constants::SHIP_RADIUS;

            return std::make_pair(ship.entity_id, ship);
        }

// Assembly:
subq $0xc8, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movq %rsi, 0xc0(%rsp)
movl %edx, 0xbc(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x39b30
movq 0xc0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x3060
movq 0xc0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
addq $0x8, %rsi
callq 0x3210
movq 0xc0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
addq $0x8, %rsi
addq $0x8, %rsi
callq 0x3210
movq 0xc0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
addq $0x68, %rsi
callq 0x3170
movq 0xc0(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x3210
movq 0xc0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x3210
movq 0xc0(%rsp), %rdi
leaq 0x1c(%rsp), %rsi
callq 0x3170
movl 0x1c(%rsp), %eax
movl %eax, 0xac(%rsp)
movq 0xc0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
addq $0x84, %rsi
callq 0x3060
movq 0xc0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
addq $0x80, %rsi
callq 0x3170
movq 0xc0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
addq $0x78, %rsi
callq 0x3170
movq 0x8(%rsp), %rdi
movl 0xbc(%rsp), %eax
movl %eax, 0x34(%rsp)
movsd 0x1b95(%rip), %xmm0     # 0x3b1a8
movsd %xmm0, 0xa0(%rsp)
leaq 0x30(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x39b40
movq 0x10(%rsp), %rax
addq $0xc8, %rsp
retq
nopl (%rax,%rax)
// File: bonetblai[P]mdp-engine/sailing/./sailing.h
// Function: state_t::operator=(state_t const&)
const state_t& operator=( const state_t &s) {
        x_ = s.x_;
        y_ = s.y_;
        wind_ = s.wind_;
        return *this;
    }

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rcx
movw (%rcx), %cx
movw %cx, (%rax)
movq -0x10(%rsp), %rcx
movw 0x2(%rcx), %cx
movw %cx, 0x2(%rax)
movq -0x10(%rsp), %rcx
movw 0x4(%rcx), %cx
movw %cx, 0x4(%rax)
retq
nopw %cs:(%rax,%rax)
nop
// File: 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:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movl %edx, 0x64(%rsp)
movq %rcx, 0x58(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0x58(%rsp), %rdi
callq 0xe000
movq 0x68(%rsp), %rsi
movl 0x64(%rsp), %edx
leaq 0x52(%rsp), %rdi
callq 0xdce0
movq 0x18(%rsp), %rax
movl 0x18(%rax), %ecx
movl 0x1c(%rax), %eax
leaq 0x52(%rsp), %rdi
movswl %cx, %esi
movswl %ax, %edx
callq 0xdd50
testb $0x1, %al
jne 0xbebb
jmp 0xbebd
jmp 0xbedc
leaq 0x4648e(%rip), %rdi     # 0x52352
leaq 0x464a4(%rip), %rsi     # 0x5236f
movl $0x9d, %edx
leaq 0x464a4(%rip), %rcx     # 0x5237b
callq 0x61a0
movq 0x18(%rsp), %rdi
addq $0x140, %rdi            # imm = 0x140
movq 0x68(%rsp), %rax
movswq 0x4(%rax), %rsi
callq 0xe020
movq %rax, 0x48(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rdi
callq 0xccc0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0xe040
jmp 0xbf1f
movl $0x0, 0x38(%rsp)
movl 0x38(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x48(%rsp), %rdi
callq 0xccc0
movq %rax, %rcx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0xbfe0
movq 0x48(%rsp), %rdi
movslq 0x38(%rsp), %rsi
callq 0xe180
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movw (%rax), %ax
movw %ax, 0x56(%rsp)
movq 0x58(%rsp), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rdx
addq $0x4, %rdx
leaq 0x24(%rsp), %rdi
leaq 0x52(%rsp), %rsi
callq 0xe1d0
jmp 0xbf8c
movq (%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0xe1a0
jmp 0xbf9c
leaq 0x24(%rsp), %rdi
callq 0xe210
movl 0x38(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38(%rsp)
jmp 0xbf27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
jmp 0xbfef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x24(%rsp), %rdi
callq 0xe210
jmp 0xbfef
leaq 0x52(%rsp), %rdi
callq 0xb950
addq $0x78, %rsp
retq
leaq 0x52(%rsp), %rdi
callq 0xb950
movq 0x40(%rsp), %rdi
callq 0x64a0
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: bonetblai[P]mdp-engine/sailing/./sailing.h
// Function: state_t::direction(int) const
std::pair<int, int> direction(Problem::action_t a) const {
        switch( a ) {
            case 0: return std::make_pair(0, 1);
            case 1: return std::make_pair(1, 1);
            case 2: return std::make_pair(1, 0);
            case 3: return std::make_pair(1, -1);
            case 4: return std::make_pair(0, -1);
            case 5: return std::make_pair(-1, -1);
            case 6: return std::make_pair(-1, 0);
            case 7: return std::make_pair(-1, 1);
            default: return std::make_pair(-1, -1);
        }
    }

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movl %esi, 0x54(%rsp)
movl 0x54(%rsp), %eax
movq %rax, (%rsp)
subq $0x7, %rax
ja 0xdf72
movq (%rsp), %rax
leaq 0x441fa(%rip), %rcx     # 0x52024
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, 0x50(%rsp)
movl $0x1, 0x4c(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x4c(%rsp), %rsi
callq 0xdfa0
movq %rax, 0x60(%rsp)
jmp 0xdf96
movl $0x1, 0x48(%rsp)
movl $0x1, 0x44(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x44(%rsp), %rsi
callq 0xdfa0
movq %rax, 0x60(%rsp)
jmp 0xdf96
movl $0x1, 0x40(%rsp)
movl $0x0, 0x3c(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x3c(%rsp), %rsi
callq 0xdfa0
movq %rax, 0x60(%rsp)
jmp 0xdf96
movl $0x1, 0x38(%rsp)
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
leaq 0x38(%rsp), %rdi
leaq 0x34(%rsp), %rsi
callq 0xdfa0
movq %rax, 0x60(%rsp)
jmp 0xdf96
movl $0x0, 0x30(%rsp)
movl $0xffffffff, 0x2c(%rsp) # imm = 0xFFFFFFFF
leaq 0x30(%rsp), %rdi
leaq 0x2c(%rsp), %rsi
callq 0xdfa0
movq %rax, 0x60(%rsp)
jmp 0xdf96
movl $0xffffffff, 0x28(%rsp) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
leaq 0x28(%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0xdfa0
movq %rax, 0x60(%rsp)
jmp 0xdf96
movl $0xffffffff, 0x20(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0x1c(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x1c(%rsp), %rsi
callq 0xdfa0
movq %rax, 0x60(%rsp)
jmp 0xdf96
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
movl $0x1, 0x14(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0xdfa0
movq %rax, 0x60(%rsp)
jmp 0xdf96
movl $0xffffffff, 0x10(%rsp) # imm = 0xFFFFFFFF
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0xdfa0
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x68, %rsp
retq
// File: 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:
subq $0x58, %rsp
movl %edi, 0x54(%rsp)
movl %esi, 0x50(%rsp)
movl $0x0, 0x44(%rsp)
movq $0x0, 0x38(%rsp)
movl $0x20, %edi
callq 0x1060
movq %rax, 0x30(%rsp)
movl $0x0, 0x4c(%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0x48(%rsp)
movl 0x4c(%rsp), %eax
cmpl 0x54(%rsp), %eax
jae 0x1652
movl 0x48(%rsp), %edi
callq 0x1220
movl %eax, 0x48(%rsp)
movl 0x54(%rsp), %edi
movl 0x48(%rsp), %esi
callq 0x1290
movl %eax, %ecx
movq 0x30(%rsp), %rax
movl %ecx, (%rax)
movq 0x30(%rsp), %rax
movl $0x0, 0x4(%rax)
movq 0x30(%rsp), %rsi
leaq 0x38(%rsp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x1840
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
jne 0x162c
movl $0x20, %edi
callq 0x1060
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rcx
movl 0x4(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x4(%rcx)
addl 0x44(%rsp), %eax
movl %eax, 0x44(%rsp)
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x15bc
movq 0x30(%rsp), %rdi
callq 0x1030
movq 0x3995(%rip), %rax      # 0x4ff8
movq (%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x1681
movq 0x38(%rsp), %rax
movl 0x1c(%rax), %eax
movl %eax, 0xc(%rsp)
jmp 0x1689
xorl %eax, %eax
movl %eax, 0xc(%rsp)
jmp 0x1689
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %edx
movl 0x44(%rsp), %ecx
leaq 0x19d8(%rip), %rsi      # 0x3075
movb $0x0, %al
callq 0x1050
cmpq $0x0, 0x38(%rsp)
je 0x16ba
movq 0x38(%rsp), %rax
movl 0x1c(%rax), %eax
movl %eax, 0x8(%rsp)
jmp 0x16c2
xorl %eax, %eax
movl %eax, 0x8(%rsp)
jmp 0x16c2
movl 0x8(%rsp), %eax
movl %eax, 0x48(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x173e
movq 0x20(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1702
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x1030
jmp 0x1730
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x1732
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x16d4
jmp 0x1740
movl 0x48(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)
// File: 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
movq 0x794d(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
leaq 0x39bd(%rip), %rsi      # 0x5052
movb $0x0, %al
callq 0x1110
movq 0x7935(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
leaq 0x39d2(%rip), %rsi      # 0x507f
movb $0x0, %al
callq 0x1110
movq 0x791d(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
leaq 0x3a08(%rip), %rsi      # 0x50cd
movb $0x0, %al
callq 0x1110
movq 0x7905(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
leaq 0x3a1b(%rip), %rsi      # 0x50f8
movb $0x0, %al
callq 0x1110
movq 0x78ed(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
leaq 0x3a2e(%rip), %rsi      # 0x5123
movb $0x0, %al
callq 0x1110
movq 0x78d5(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
leaq 0x3a41(%rip), %rsi      # 0x514e
movb $0x0, %al
callq 0x1110
movq 0x78bd(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
leaq 0x3a54(%rip), %rsi      # 0x5179
movb $0x0, %al
callq 0x1110
movq 0x78a5(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
leaq 0x3a67(%rip), %rsi      # 0x51a4
movb $0x0, %al
callq 0x1110
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x7691(%rip), %eax      # 0x90ec
jge 0x1ab8
movl -0x4(%rbp), %edi
callq 0x1750
movsd %xmm0, -0x20(%rbp)
movslq -0x4(%rbp), %rsi
leaq 0x76b3(%rip), %rdi      # 0x9128
callq 0x2510
movq %rax, %rdi
movslq -0x8(%rbp), %rsi
callq 0x2530
movsd -0x20(%rbp), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
movslq -0x8(%rbp), %rsi
leaq 0x7719(%rip), %rdi      # 0x91b8
callq 0x2530
movsd -0x18(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1a52
movl -0x4(%rbp), %edi
callq 0x1750
movsd %xmm0, 0x7710(%rip)     # 0x91d8
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x7614(%rip), %eax      # 0x90ec
jge 0x1b4c
movsd 0x75fe(%rip), %xmm0     # 0x90e0
movsd %xmm0, -0x30(%rbp)
movslq -0xc(%rbp), %rsi
leaq 0x76c6(%rip), %rdi      # 0x91b8
callq 0x2530
movsd (%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
movslq -0xc(%rbp), %rsi
leaq 0x7695(%rip), %rdi      # 0x91a0
callq 0x2530
movsd -0x30(%rbp), %xmm0
movsd -0x28(%rbp), %xmm2
movsd (%rax), %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1acf
movsd 0x758c(%rip), %xmm0     # 0x90e0
movsd 0x767c(%rip), %xmm2     # 0x91d8
movsd 0x766c(%rip), %xmm1     # 0x91d0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x7645(%rip)     # 0x91d0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1bca
movq $0x0, -0x8(%rbp)
jmp 0x1cda
movl $0x0, -0x24(%rbp)
movl $0x1, -0x2c(%rbp)
movl $0x1, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1060
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x10f0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x30(%rbp), %rdx
callq 0x1160
movq -0x38(%rbp), %rax
movslq -0x30(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x24(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x1c4c
movq -0x38(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
jne 0x1c3f
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1c41
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1c1a
movl -0x2c(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movslq -0x2c(%rbp), %rdi
shlq $0x3, %rdi
callq 0x10f0
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x1cd2
movq -0x38(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
jne 0x1cc5
movq -0x38(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rdx
movslq -0x24(%rbp), %rax
addq %rax, %rdx
addq $0x1, %rdx
movq -0x40(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x28(%rbp)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x1cc7
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1c78
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x6fb9(%rip), %eax      # 0x90ec
jge 0x2190
movslq -0x14(%rbp), %rsi
leaq 0x7060(%rip), %rdi      # 0x91a0
callq 0x2530
movsd (%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
movslq -0x4(%rbp), %rsi
leaq 0x6fe7(%rip), %rdi      # 0x9140
callq 0x2510
movq %rax, %rdi
movslq -0x14(%rbp), %rsi
callq 0x2530
movsd -0x20(%rbp), %xmm0
movsd (%rax), %xmm2
movsd -0x10(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x212a
movsd -0x10(%rbp), %xmm0
addsd 0x7033(%rip), %xmm0     # 0x91d0
callq 0x1450
movaps %xmm0, %xmm1
movsd 0x2e5b(%rip), %xmm3     # 0x5008
xorps %xmm2, %xmm2
movsd 0x2e58(%rip), %xmm0     # 0x5010
cmpltsd %xmm1, %xmm0
movaps %xmm0, %xmm1
andpd %xmm3, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x30, %rsp
movq 0x6f31(%rip), %rdi      # 0x9120
leaq 0x300f(%rip), %rsi      # 0x5205
callq 0x10d0
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
jne 0x221d
movq 0x6dcc(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
leaq 0x2ff1(%rip), %rsi      # 0x5207
movb $0x0, %al
callq 0x1110
movl $0x0, -0xc(%rbp)
movslq -0xc(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x6f0d(%rip), %rdi      # 0x9140
callq 0x2660
movq %rax, %rcx
movq -0x18(%rbp), %rax
cmpq %rcx, %rax
jae 0x22fc
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movslq -0xc(%rbp), %rsi
leaq 0x6f2d(%rip), %rdi      # 0x9188
callq 0x2690
movq -0x20(%rbp), %rdi
movq (%rax), %rdx
leaq 0x2fb7(%rip), %rsi      # 0x5225
movb $0x0, %al
callq 0x1110
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl 0x6e67(%rip), %eax      # 0x90ec
jge 0x22cc
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movslq -0xc(%rbp), %rsi
leaq 0x6ea6(%rip), %rdi      # 0x9140
callq 0x2510
movq %rax, %rdi
movslq -0x10(%rbp), %rsi
callq 0x2530
movq -0x28(%rbp), %rdi
movsd (%rax), %xmm0
leaq 0x2f6e(%rip), %rsi      # 0x5228
movb $0x1, %al
callq 0x1110
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x227c
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %edi
callq 0x2110
movq -0x30(%rbp), %rdi
leaq 0x2f47(%rip), %rsi      # 0x522e
movb $0x1, %al
callq 0x1110
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2224
movq -0x8(%rbp), %rdi
callq 0x10a0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x14a0
cmpl $0x0, %eax
je 0x2345
callq 0x1680
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2383
callq 0x1cf0
cmpl $0x0, %eax
je 0x235d
callq 0x1680
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2383
callq 0x2030
cmpl $0x1, 0x6d8b(%rip)      # 0x90f4
jne 0x2372
callq 0x20e0
jmp 0x2377
callq 0x20a0
callq 0x21e0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: corecodec[P]coremake/corerc.c
// Function: pathunix
void pathunix(char* path)
{
	int i;
	for (i=0;path[i];++i)
		if (path[i]=='\\')
			path[i]='/';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x1257
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5c, %eax
jne 0x124a
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movb $0x2f, (%rax,%rcx)
jmp 0x124c
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x121f
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1260
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1050
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq %rax, %rdx
addq $0x1, %rdx
callq 0x10d0
movq -0x8(%rbp), %rdi
movl $0x2e, %esi
callq 0x1070
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1316
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6390
cmpq $0x0, %rax
jne 0x62d3
movl $0x0, -0x4(%rbp)
jmp 0x637a
movq -0x18(%rbp), %rdi
callq 0x63b0
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6390
movq -0x50(%rbp), %rsi
movq %rax, %rdx
leaq -0x30(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x63d0
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x8180
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x3c(%rbp)
testl %eax, %eax
je 0x6336
jmp 0x6319
movl -0x3c(%rbp), %eax
subl $0x1, %eax
je 0x632d
jmp 0x6323
movl -0x3c(%rbp), %eax
subl $0x2, %eax
je 0x6351
jmp 0x6373
movl $0x0, -0x4(%rbp)
jmp 0x637a
movq -0x38(%rbp), %rdi
callq 0x8100
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6410
movl %eax, -0x4(%rbp)
jmp 0x637a
movq -0x18(%rbp), %rdi
callq 0x6490
movq -0x18(%rbp), %rdi
leaq 0x9e2b(%rip), %rsi      # 0x10190
callq 0x64b0
movl $0x2, -0x4(%rbp)
jmp 0x637a
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6530
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6540
movq %rax, %rdi
leaq 0x9d5c(%rip), %rsi      # 0x101a0
callq 0x6560
testb $0x1, %al
jne 0x644f
jmp 0x6458
movl $0x5, -0x4(%rbp)
jmp 0x6478
movq -0x18(%rbp), %rdi
callq 0x6490
movq -0x18(%rbp), %rdi
leaq 0x9d14(%rip), %rsi      # 0x10180
callq 0x64b0
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: nmmmnu[P]asyncore_cpp/include/stringref.h
// Function: StringRef::compare(StringRef const&) const
inline int StringRef::compare(const StringRef &sr) const noexcept{
	if (COMPARE_MICRO_OPTIMIZATIONS){
		if (_data == sr.data() && _size == sr.size())
			return 0;
	}

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6620
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jne 0x65ee
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6640
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jne 0x65ee
movl $0x0, -0x4(%rbp)
jmp 0x6617
movq -0x18(%rbp), %rdi
callq 0x6620
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6640
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %rax, %rdx
callq 0x6660
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, 0x128(%rax)
jle 0x60f9
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x90, %rcx
movl 0x128(%rax), %edx
addl $-0x1, %edx
movl %edx, 0x128(%rax)
movslq %edx, %rdx
imulq $0x6, %rdx, %rdx
addq %rdx, %rcx
movl 0x124(%rax), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, 0x124(%rax)
movslq %edx, %rdx
imulq $0x6, %rdx, %rdx
addq %rdx, %rax
movl (%rcx), %edx
movl %edx, (%rax)
movw 0x4(%rcx), %cx
movw %cx, 0x4(%rax)
jmp 0x6148
movq -0x10(%rbp), %rsi
movl 0x124(%rsi), %eax
addl $-0x1, %eax
movl %eax, 0x124(%rsi)
cltq
imulq $0x6, %rax, %rax
movq %rsi, %rcx
addq %rax, %rcx
movq %rsi, %rax
addq $0x90, %rax
movl 0x128(%rsi), %edx
movl %edx, %edi
addl $0x1, %edi
movl %edi, 0x128(%rsi)
movslq %edx, %rdx
imulq $0x6, %rdx, %rdx
addq %rdx, %rax
movl (%rcx), %edx
movl %edx, (%rax)
movw 0x4(%rcx), %cx
movw %cx, 0x4(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: ShootMe[P]Klondike-Solver/Pile.cpp
// Function: Pile::Remove(Pile&, int)
void Pile::Remove(Pile & to, int count) {
	for (int i = upSize - count; i < upSize; ++i) {
		to.AddUp(up[i]);
	}

	upSize -= count;
	size -= count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl 0x128(%rax), %eax
subl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0x128(%rcx), %eax
jge 0x6269
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rdi
movslq -0x18(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movw 0x94(%rax,%rcx,2), %dx
movw %dx, -0x1c(%rbp)
movl 0x90(%rax,%rcx,2), %eax
movl %eax, -0x20(%rbp)
movw -0x1c(%rbp), %ax
movw %ax, -0x24(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
movl -0x24(%rbp), %eax
movl %ecx, %esi
shlq $0x20, %rax
orq %rax, %rsi
callq 0x6030
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x6207
movq -0x30(%rbp), %rax
movl -0x14(%rbp), %edx
movl 0x128(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x128(%rax)
movl -0x14(%rbp), %edx
movl 0x120(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x120(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl 0x120(%rax), %eax
subl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rdi
movl 0x120(%rax), %ecx
decl %ecx
movl %ecx, 0x120(%rax)
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movw 0x94(%rax,%rcx,2), %dx
movw %dx, -0x1c(%rbp)
movl 0x90(%rax,%rcx,2), %eax
movl %eax, -0x20(%rbp)
movw -0x1c(%rbp), %ax
movw %ax, -0x24(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
movl -0x24(%rbp), %eax
movl %ecx, %esi
shlq $0x20, %rax
orq %rax, %rsi
callq 0x6030
movq -0x30(%rbp), %rax
movl 0x120(%rax), %eax
cmpl -0x18(%rbp), %eax
jg 0x62c7
movq -0x30(%rbp), %rax
movl 0x120(%rax), %ecx
movl %ecx, 0x128(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, 0x120(%rax)
movl $0x0, 0x128(%rax)
movl $0x0, 0x124(%rax)
movl $0x0, -0xc(%rbp)
cmpl $0x18, -0xc(%rbp)
jge 0x63f9
movq -0x18(%rbp), %rdi
addq $0x90, %rdi
movslq -0xc(%rbp), %rax
imulq $0x6, %rax, %rax
addq %rax, %rdi
callq 0x13200
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rax
imulq $0x6, %rax, %rax
addq %rax, %rdi
callq 0x13200
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x63b9
addq $0x20, %rsp
popq %rbp
retq
nop
// File: ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::MovesMadeNormalizedCount()
int Solitaire::MovesMadeNormalizedCount() {
	int movesTotal = 0;
	int stockSize = 24;
	int wasteSize = 0;
	for (int i = 0; i < movesMadeCount; i++) {
		Move m = movesMade[i];
		movesTotal++;
		if (m.Extra > 0) {
			if (m.From == WASTE) {
				int temp = stockSize;
				if (m.Extra <= stockSize) {
					temp = m.Extra;
					stockSize -= temp;
					wasteSize += temp - 1;
				} else {
					movesTotal += temp / drawCount;
					movesTotal += (temp % drawCount) == 0 ? 0 : 1;
					temp = m.Extra;
					temp -= wasteSize;
					temp -= stockSize;
					temp -= stockSize;
					stockSize += wasteSize - temp;
					wasteSize = temp - 1;
				}
				movesTotal += temp / drawCount;
				movesTotal += (temp % drawCount) == 0 ? 0 : 1;
			} else {
				movesTotal++;
			}
		} else if (m.From == WASTE) {
			wasteSize--;
		}
	}
	return movesTotal;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x18, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0x1914(%rcx), %eax
jge 0x80bf
movq -0x28(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jle 0x809b
movzbl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jne 0x8090
movl -0x10(%rbp), %eax
movl %eax, -0x20(%rbp)
movzbl -0x19(%rbp), %eax
cmpl -0x10(%rbp), %eax
jg 0x7fef
movzbl -0x19(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %ecx
movl -0x10(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0x20(%rbp), %eax
subl $0x1, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x805d
movq -0x28(%rbp), %rcx
movl -0x20(%rbp), %eax
cltd
idivl 0x1904(%rcx)
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
cltd
idivl 0x1904(%rcx)
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movzbl -0x19(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x14(%rbp), %ecx
movl -0x20(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x10(%rbp), %ecx
movl -0x20(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x10(%rbp), %ecx
movl -0x20(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x14(%rbp), %eax
subl -0x20(%rbp), %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x20(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x28(%rbp), %rcx
movl -0x20(%rbp), %eax
cltd
idivl 0x1904(%rcx)
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x20(%rbp), %eax
cltd
idivl 0x1904(%rcx)
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x8099
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x80af
movzbl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jne 0x80ad
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x80af
jmp 0x80b1
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7f7c
movl -0xc(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movl $0x1, -0x14(%rbp)
addq $0x800, %rdi            # imm = 0x800
callq 0x6400
movq -0x28(%rbp), %rdi
movl %eax, -0x18(%rbp)
addq $0x800, %rdi            # imm = 0x800
addq $0x960, %rdi            # imm = 0x960
callq 0x6400
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x0, %eax
jle 0x85cf
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x85c4
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl -0x1c(%rbp), %eax
jg 0x8536
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %eax
cltd
idivl 0x1904(%rcx)
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %eax
cltd
idivl 0x1904(%rcx)
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x85c2
movq -0x28(%rbp), %rcx
movl -0x1c(%rbp), %eax
cltd
idivl 0x1904(%rcx)
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x1c(%rbp), %eax
cltd
idivl 0x1904(%rcx)
movl %edx, %esi
movl $0x1, %eax
xorl %edx, %edx
cmpl $0x0, %esi
cmovel %edx, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x18(%rbp), %edx
movl -0x20(%rbp), %eax
subl %edx, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %eax
subl %edx, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %eax
subl %edx, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cltd
idivl 0x1904(%rcx)
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x20(%rbp), %eax
cltd
idivl 0x1904(%rcx)
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x85cd
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x85cf
movl -0x14(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: ShootMe[P]Klondike-Solver/Solitaire.cpp
// Function: Solitaire::MakeAutoMoves()
void Solitaire::MakeAutoMoves() {
	UpdateAvailableMoves();
	while (movesAvailableCount == 1) {
		MakeMove(movesAvailable[0]);
		UpdateAvailableMoves();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x7380
movq -0x18(%rbp), %rax
cmpl $0x1, 0x1910(%rax)
jne 0x92a6
movq -0x18(%rbp), %rdi
movl 0x1874(%rdi), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %esi
callq 0x7150
movq -0x18(%rbp), %rdi
callq 0x7380
jmp 0x9279
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0xc(%rbp), %ecx
movl %ecx, 0x1904(%rax)
movl $0x0, 0x1908(%rax)
movl $0x0, 0x190c(%rax)
movl $0x0, 0x1914(%rax)
movl $0x0, 0x1910(%rax)
movl $0x0, -0x10(%rbp)
cmpl $0xd, -0x10(%rbp)
jge 0x9a5e
movq -0x60(%rbp), %rdi
addq $0x800, %rdi            # imm = 0x800
movslq -0x10(%rbp), %rax
imulq $0x12c, %rax, %rax      # imm = 0x12C
addq %rax, %rdi
callq 0x6350
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x9a2f
movl $0x1, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x7, -0x14(%rbp)
jg 0x9b5e
movq -0x60(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x12c, %rcx, %rcx      # imm = 0x12C
leaq 0x800(%rax,%rcx), %rdi
movslq -0x18(%rbp), %rcx
movl %ecx, %edx
incl %edx
movl %edx, -0x18(%rbp)
leaq (%rcx,%rcx,2), %rcx
movw 0x1740(%rax,%rcx,2), %dx
movw %dx, -0x1c(%rbp)
movl 0x173c(%rax,%rcx,2), %eax
movl %eax, -0x20(%rbp)
movw -0x1c(%rbp), %ax
movw %ax, -0x24(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
movl -0x24(%rbp), %eax
movl %ecx, %esi
shlq $0x20, %rax
orq %rax, %rsi
callq 0x6030
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x7, -0x2c(%rbp)
jg 0x9b4e
movq -0x60(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x12c, %rcx, %rcx      # imm = 0x12C
leaq 0x800(%rax,%rcx), %rdi
movslq -0x18(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movw 0x1740(%rax,%rcx,2), %dx
movw %dx, -0x30(%rbp)
movl 0x173c(%rax,%rcx,2), %eax
movl %eax, -0x34(%rbp)
movw -0x30(%rbp), %ax
movw %ax, -0x3c(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %ecx
movl -0x3c(%rbp), %eax
movl %ecx, %esi
shlq $0x20, %rax
orq %rax, %rsi
callq 0x5fd0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x9add
jmp 0x9b50
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x9a6c
movl $0x33, -0x44(%rbp)
cmpl $0x1c, -0x44(%rbp)
jl 0x9bc4
movq -0x60(%rbp), %rax
movq %rax, %rdi
addq $0x1160, %rdi           # imm = 0x1160
movslq -0x44(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
movw 0x1740(%rax,%rcx,2), %dx
movw %dx, -0x48(%rbp)
movl 0x173c(%rax,%rcx,2), %eax
movl %eax, -0x4c(%rbp)
movw -0x48(%rbp), %ax
movw %ax, -0x54(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %ecx
movl -0x54(%rbp), %eax
movl %ecx, %esi
shlq $0x20, %rax
orq %rax, %rsi
callq 0x6030
movl -0x44(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x9b65
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
addq $0x800, %rdi            # imm = 0x800
addq $0xbb8, %rdi            # imm = 0xBB8
callq 0x6400
movq -0x20(%rbp), %rdi
movl %eax, -0xc(%rbp)
addq $0x800, %rdi            # imm = 0x800
addq $0xe10, %rdi            # imm = 0xE10
callq 0x6400
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jg 0xba54
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0xba5a
movl -0x10(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, -0x14(%rbp)
addq $0x800, %rdi            # imm = 0x800
addq $0xa8c, %rdi            # imm = 0xA8C
callq 0x6400
movq -0x20(%rbp), %rdi
movl %eax, -0xc(%rbp)
addq $0x800, %rdi            # imm = 0x800
addq $0xce4, %rdi            # imm = 0xCE4
callq 0x6400
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jg 0xbaa4
movl -0xc(%rbp), %eax
movl %eax, -0x28(%rbp)
jmp 0xbaaa
movl -0x10(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0xbac0
movl -0x18(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0xbac6
movl -0x14(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addl $0x2, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $-0x1, -0xc(%rbp)
je 0xbb12
movq -0x30(%rbp), %rdi
addq $0x18f4, %rdi           # imm = 0x18F4
movl -0xc(%rbp), %esi
callq 0x13080
jmp 0xbb38
movq -0x30(%rbp), %rdi
addq $0x18f4, %rdi           # imm = 0x18F4
callq 0x13150
movq -0x30(%rbp), %rdi
movl %eax, -0xc(%rbp)
addq $0x18f4, %rdi           # imm = 0x18F4
movl -0xc(%rbp), %esi
callq 0x13080
movl $0x0, -0x10(%rbp)
cmpl $0x34, -0x10(%rbp)
jge 0xbb71
movq -0x30(%rbp), %rdi
addq $0x173c, %rdi           # imm = 0x173C
movslq -0x10(%rbp), %rax
imulq $0x6, %rax, %rax
addq %rax, %rdi
movl -0x10(%rbp), %eax
movzbl %al, %esi
callq 0x13220
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xbb3f
movl $0x0, -0x14(%rbp)
cmpl $0x10d, -0x14(%rbp)     # imm = 0x10D
jge 0xbc43
movq -0x30(%rbp), %rdi
addq $0x18f4, %rdi           # imm = 0x18F4
callq 0x13150
movq -0x30(%rbp), %rdi
movl $0x34, %ecx
cltd
idivl %ecx
movl %edx, -0x18(%rbp)
addq $0x18f4, %rdi           # imm = 0x18F4
callq 0x13150
movl $0x34, %ecx
cltd
idivl %ecx
movq -0x30(%rbp), %rax
movl %edx, -0x1c(%rbp)
movq %rax, %rcx
addq $0x173c, %rcx           # imm = 0x173C
movslq -0x18(%rbp), %rdx
imulq $0x6, %rdx, %rdx
addq %rdx, %rcx
movl (%rcx), %edx
movl %edx, -0x22(%rbp)
movw 0x4(%rcx), %cx
movw %cx, -0x1e(%rbp)
movq %rax, %rdx
addq $0x173c, %rdx           # imm = 0x173C
movslq -0x1c(%rbp), %rcx
imulq $0x6, %rcx, %rcx
addq %rcx, %rdx
movq %rax, %rcx
addq $0x173c, %rcx           # imm = 0x173C
movslq -0x18(%rbp), %rsi
imulq $0x6, %rsi, %rsi
addq %rsi, %rcx
movl (%rdx), %esi
movl %esi, (%rcx)
movw 0x4(%rdx), %dx
movw %dx, 0x4(%rcx)
addq $0x173c, %rax           # imm = 0x173C
movslq -0x1c(%rbp), %rcx
imulq $0x6, %rcx, %rcx
addq %rcx, %rax
movl -0x22(%rbp), %ecx
movl %ecx, (%rax)
movw -0x1e(%rbp), %cx
movw %cx, 0x4(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xbb78
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x1, 0x1904(%rax)
movl $0x0, -0xc(%rbp)
cmpl $0x34, -0xc(%rbp)
jge 0xbf07
movq -0x18(%rbp), %rdi
addq $0x173c, %rdi           # imm = 0x173C
movslq -0xc(%rbp), %rax
imulq $0x6, %rax, %rax
addq %rax, %rdi
movl -0xc(%rbp), %eax
movzbl %al, %esi
callq 0x13220
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xbed5
movl $0x0, -0x10(%rbp)
cmpl $0xd, -0x10(%rbp)
jge 0xbf3d
movq -0x18(%rbp), %rdi
addq $0x800, %rdi            # imm = 0x800
movslq -0x10(%rbp), %rax
imulq $0x12c, %rax, %rax      # imm = 0x12C
addq %rax, %rdi
callq 0x6380
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xbf0e
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0xf0(%rbp), %rdi
xorl %esi, %esi
movl $0xd0, %edx
callq 0x3110
movq -0x18(%rbp), %rdi
callq 0x3160
cmpq $0x9c, %rax
jae 0xbf9b
movb $0x0, -0x1(%rbp)
jmp 0xc102
movl $0x0, -0xf4(%rbp)
cmpl $0x34, -0xf4(%rbp)
jge 0xc0fe
movq -0x18(%rbp), %rdi
imull $0x3, -0xf4(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rsi
callq 0x32b0
movsbl (%rax), %eax
xorl $0x30, %eax
subl $0x1, %eax
movl %eax, -0xf8(%rbp)
cmpl $0x0, -0xf8(%rbp)
jl 0xbfe9
cmpl $0x3, -0xf8(%rbp)
jle 0xbff2
movb $0x0, -0x1(%rbp)
jmp 0xc102
cmpl $0x2, -0xf8(%rbp)
jl 0xc017
movl -0xf8(%rbp), %edx
movl $0x2, %eax
movl $0x3, %ecx
cmpl $0x2, %edx
cmovel %ecx, %eax
movl %eax, -0xf8(%rbp)
movq -0x18(%rbp), %rdi
imull $0x3, -0xf4(%rbp), %eax
movslq %eax, %rsi
callq 0x32b0
movsbl (%rax), %eax
xorl $0x30, %eax
imull $0xa, %eax, %eax
movl %eax, -0x10c(%rbp)
movq -0x18(%rbp), %rdi
imull $0x3, -0xf4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x32b0
movq %rax, %rcx
movl -0x10c(%rbp), %eax
movsbl (%rcx), %ecx
xorl $0x30, %ecx
addl %ecx, %eax
movl %eax, -0xfc(%rbp)
cmpl $0x1, -0xfc(%rbp)
jl 0xc078
cmpl $0xd, -0xfc(%rbp)
jle 0xc081
movb $0x0, -0x1(%rbp)
jmp 0xc102
imull $0xd, -0xf8(%rbp), %eax
addl -0xfc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x100(%rbp)
movslq -0x100(%rbp), %rax
cmpl $0x1, -0xf0(%rbp,%rax,4)
jne 0xc0ae
movb $0x0, -0x1(%rbp)
jmp 0xc102
movq -0x108(%rbp), %rdi
movslq -0x100(%rbp), %rax
movl $0x1, -0xf0(%rbp,%rax,4)
addq $0x173c, %rdi           # imm = 0x173C
movslq -0xf4(%rbp), %rax
imulq $0x6, %rax, %rax
addq %rax, %rdi
movl -0x100(%rbp), %eax
movzbl %al, %esi
callq 0x13220
movl -0xf4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xf4(%rbp)
jmp 0xbfa5
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq