LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/dragazo[P]cpp-gc/./GarbageCollection.h
// Function: _gc_unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, GC::ptr<TreeNode>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, GC::ptr<TreeNode>>>, std::recursive_mutex>::operator=(__gc_unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, GC::ptr<TreeNode>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, GC::ptr<TreeNode>>>, std::recursive_mutex>&&)
__gc_unordered_map &operator=(__gc_unordered_map &&other)
	{
		if (this != &other)
		{
			std::scoped_lock locks(this->mutex, other.mutex);
			wrapped() = std::move(other.wrapped());
		}
		return *this;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x1ad45
movq %rsi, %r12
leaq 0x38(%rbx), %r15
leaq 0x38(%rsi), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x1ae32
movq %rbx, %rdi
movq %r12, %rsi
callq 0x471a
movq %r15, %rdi
callq 0x4200
movq %r14, %rdi
callq 0x4200
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x8024
// File: /workspace/github_cpp_makefile_star2_O3/dragazo[P]cpp-gc/test.cpp
// Function: void GC::router<SymbolTable>::route<GC::router_fn>(SymbolTable const&, GC::router_fn)
static void route(const SymbolTable &table, F func)
    {
		{
			// modification of the mutable collection of GC::ptr and router must be mutually exclusive
			std::lock_guard<std::mutex> lock(table.symbols_mutex);
			GC::route(table.symbols, func);
		}
		GC::route(table.better_symbols, func);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x38(%rdi), %r15
movq %r15, %rdi
callq 0x4380
testl %eax, %eax
jne 0x1b198
movq 0x10(%r14), %r12
testq %r12, %r12
je 0x1b176
leaq 0x30(%r12), %rdi
callq *%rbx
movq (%r12), %r12
jmp 0x1b164
movq %r15, %rdi
callq 0x4200
addq $0x60, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1b1b2
movl %eax, %edi
callq 0x41a0
movq %rax, %rbx
movq %r15, %rdi
callq 0x4200
movq %rbx, %rdi
callq 0x4430
// File: /workspace/github_cpp_makefile_star2_O3/dragazo[P]cpp-gc/test.cpp
// Function: void GC::router<MaybeTreeNode>::route<GC::router_fn>(MaybeTreeNode const&, GC::router_fn)
static void route(const MaybeTreeNode &maybe, F func)
    {
        // this must be synchronized with constructing/destucting the buffer object.
        std::lock_guard<std::mutex> lock(maybe.buf_mutex);
        
        // because TreeNode contains GC::ptr objects, we need to route to it,
        // but only if the MaybeTreeNode actually has it constructed in the buffer.
        if (maybe.contains_tree_node) GC::route(*reinterpret_cast<const TreeNode*>(maybe.buf), func);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x48(%rdi), %rbx
movq %rbx, %rdi
callq 0x4380
testl %eax, %eax
jne 0x1cade
cmpb $0x1, 0x40(%r15)
jne 0x1cad1
leaq 0x8(%r15), %rdi
callq *%r14
addq $0x20, %r15
movq %r15, %rdi
callq *%r14
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4200
movl %eax, %edi
callq 0x41a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x4200
movq %r14, %rdi
callq 0x4430
// File: /workspace/github_cpp_makefile_star2_O3/chrischute[P]are-you-the-one/src/ayto.cpp
// Function: getRandomPerfectMatching[abi:cxx11]()
Pm getRandomPerfectMatching() {
    Pm p = DIGITS;
    int last = (int) p.size();
    while (--last > 0) {
        int i = rand() % last;
        char tmp = p[last];
        p[last] = p[i];
        p[i] = tmp;
    }
    return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
leaq 0x3093(%rip), %rsi      # 0x7025
leaq 0x3096(%rip), %rdx      # 0x702f
callq 0x5256
movq 0x8(%rbx), %r14
cmpl $0x2, %r14d
jl 0x3fe3
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
decq %r14
callq 0x2090
cltd
idivl %r14d
movq (%rbx), %rax
movb (%rax,%r14), %cl
movslq %edx, %rdx
movb (%rax,%rdx), %sil
movb %sil, (%rax,%r14)
movq (%rbx), %rax
movb %cl, (%rax,%rdx)
leaq -0x1(%r14), %rax
incq %r14
cmpq $0x2, %r14
movq %rax, %r14
ja 0x3fb2
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/chrischute[P]are-you-the-one/src/ayto.cpp
// Function: getNextPerfectMatchingGuess[abi:cxx11](PerfectMatchingSet const*, PerfectMatchingSet const*)
Pm getNextPerfectMatchingGuess(const PmSet* possibleAnswers, const PmSet* guessesAlreadyMade)
{
    if (possibleAnswers->size() == 1) {
        return possibleAnswers->get(0);
    }

    switch (guessesAlreadyMade->size()) {
        case 0:
            return DIGITS;
        case 1:
            return GUESS;
        default:
            return getNextGuessUsingMinimax(possibleAnswers, guessesAlreadyMade);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x63ea
cmpq $0x1, %rax
jne 0x402f
movq %r14, %rdi
xorl %esi, %esi
callq 0x6258
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x52ec
jmp 0x4086
movq %r15, %rdi
callq 0x63ea
cmpq $0x1, %rax
je 0x4059
testq %rax, %rax
jne 0x4078
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x2fd5(%rip), %rsi      # 0x7025
leaq 0x2fd8(%rip), %rdx      # 0x702f
jmp 0x406e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x3179(%rip), %rsi      # 0x71e0
leaq 0x317c(%rip), %rdx      # 0x71ea
movq %rbx, %rdi
callq 0x5256
jmp 0x4086
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x408f
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/chrischute[P]are-you-the-one/src/ayto.cpp
// Function: getPrintableNames(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const*, std::map<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<char>, std::allocator<std::pair<char const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const*)
string getPrintableNames(const PerfectMatching& p,
                         const map<int, string>* femaleNames,
                         const map<char, string>* maleNames) {
    stringstream printableNamesBuilder;

    int i = 0;
    for (PerfectMatching::const_iterator it = p.begin(); it != p.end(); it++) {
        printableNamesBuilder << "    " <<  femaleNames->at(i++)
                              << " + " << maleNames->at(*it);
        if (it != p.end() - 1)
            printableNamesBuilder << endl;
    }

    return printableNamesBuilder.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rcx, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %r12
movq %rdi, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x2180
cmpq $0x0, 0x8(%r12)
je 0x4a45
movq (%r12), %r14
leaq 0x30(%rsp), %r13
xorl %r15d, %r15d
movl $0x4, %edx
movq %r13, %rdi
leaq 0x28a2(%rip), %rsi      # 0x722b
callq 0x2270
movl %r15d, 0x4(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x4f7c
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r13, %rdi
callq 0x2270
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x286d(%rip), %rsi      # 0x7230
callq 0x2270
leaq (%r14,%r15), %rbp
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x4fc2
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x2270
movq (%r12), %rcx
movq 0x8(%r12), %rax
leaq (%rcx,%rax), %rdx
decq %rdx
cmpq %rdx, %rbp
je 0x4a2f
movq 0x30(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r13, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq (%r12), %rcx
movq 0x8(%r12), %rax
addq %rcx, %rax
leaq (%r14,%r15), %rcx
incq %rcx
incq %r15
cmpq %rax, %rcx
jne 0x497a
leaq 0x38(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2300
movq 0x655a(%rip), %rsi      # 0xafb8
leaq 0x20(%rsp), %rdi
callq 0x21a0
leaq 0xa0(%rsp), %rdi
callq 0x20b0
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4a8e
jmp 0x4a8e
movq %rax, %rbx
movq 0x6520(%rip), %rsi      # 0xafb8
leaq 0x20(%rsp), %rdi
callq 0x21a0
leaq 0xa0(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O3/chrischute[P]are-you-the-one/src/ayto.cpp
// Function: getPrintableNames(TruthBooth const&, std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const*, std::map<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<char>, std::allocator<std::pair<char const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const*)
string getPrintableNames(const TruthBooth& truthBooth,
                         const map<int, string>* femaleNames,
                         const map<char, string>* maleNames) {
    stringstream printableNamesBuilder;

    printableNamesBuilder << "(" << femaleNames->at(truthBooth.index) << ", "
                          << maleNames->at(truthBooth.charAtIndex) << ")";

    return printableNamesBuilder.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2180
leaq 0x18(%rsp), %r12
leaq 0x274b(%rip), %rsi      # 0x7234
movl $0x1, %edx
movq %r12, %rdi
callq 0x2270
movq %r13, %rdi
movq %r15, %rsi
callq 0x4f7c
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r12, %rdi
callq 0x2270
movq %rax, %r12
leaq 0x271c(%rip), %rsi      # 0x7236
movl $0x2, %edx
movq %rax, %rdi
callq 0x2270
addq $0x4, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4fc2
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r12, %rdi
callq 0x2270
leaq 0x29ce(%rip), %rsi      # 0x751a
movl $0x1, %edx
movq %rax, %rdi
callq 0x2270
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x2300
movq 0x644b(%rip), %rsi      # 0xafb8
leaq 0x8(%rsp), %rdi
callq 0x21a0
leaq 0x88(%rsp), %rdi
callq 0x20b0
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x6416(%rip), %rsi      # 0xafb8
leaq 0x8(%rsp), %rdi
callq 0x21a0
leaq 0x88(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O3/chrischute[P]are-you-the-one/src/ayto.cpp
// Function: getPrintableNumbers(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string getPrintableNumbers(const PerfectMatching& p) {
    stringstream printableNumbersBuilder;

    printableNumbersBuilder << "(";
    for (PerfectMatching::const_iterator i = p.begin(); i != p.end(); i++) {
        printableNumbersBuilder << *i;
        if (i != p.end() - 1)
            printableNumbersBuilder << ", ";
    }
    printableNumbersBuilder << ")";

    return printableNumbersBuilder.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2180
leaq 0x20(%rsp), %r14
leaq 0x2646(%rip), %rsi      # 0x7234
movl $0x1, %edx
movq %r14, %rdi
callq 0x2270
cmpq $0x0, 0x8(%r15)
je 0x4c5d
movq (%r15), %rbp
leaq 0xf(%rsp), %r12
leaq 0x2625(%rip), %r13      # 0x7236
movb (%rbp), %al
movb %al, 0xf(%rsp)
movl $0x1, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x2270
movq (%r15), %rcx
movq 0x8(%r15), %rax
leaq (%rcx,%rax), %rdx
decq %rdx
cmpq %rdx, %rbp
je 0x4c52
movl $0x2, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x2270
movq (%r15), %rcx
movq 0x8(%r15), %rax
addq %rcx, %rax
incq %rbp
cmpq %rax, %rbp
jne 0x4c11
leaq 0x28b6(%rip), %rsi      # 0x751a
movl $0x1, %edx
movq %r14, %rdi
callq 0x2270
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x2300
movq 0x6333(%rip), %rsi      # 0xafb8
leaq 0x10(%rsp), %rdi
callq 0x21a0
leaq 0x90(%rsp), %rdi
callq 0x20b0
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4cb3
movq %rax, %rbx
movq 0x62fb(%rip), %rsi      # 0xafb8
leaq 0x10(%rsp), %rdi
callq 0x21a0
leaq 0x90(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O3/chrischute[P]are-you-the-one/src/PerfectMatching.cpp
// Function: numInCommon(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int numInCommon(PerfectMatching const& pm1, PerfectMatching const& pm2) {
    int numInCommon = 0;
    for (unsigned int i = 0; i < pm1.size() && i < pm2.size(); ++i)
        if (pm1[i] == pm2[i])
            ++numInCommon;
    return numInCommon;
}

// Assembly:
movq 0x8(%rdi), %rax
movq 0x8(%rsi), %rcx
cmpq %rcx, %rax
cmovbq %rax, %rcx
testq %rcx, %rcx
je 0x606c
movq (%rdi), %rdx
movq (%rsi), %rsi
xorl %edi, %edi
xorl %eax, %eax
movb (%rdx,%rdi), %r8b
xorl %r9d, %r9d
cmpb (%rsi,%rdi), %r8b
sete %r9b
addl %r9d, %eax
incq %rdi
movl %edi, %r8d
cmpq %r8, %rcx
ja 0x604e
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/chrischute[P]are-you-the-one/src/PerfectMatchingSet.cpp
// Function: PerfectMatchingSet::filter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
void PerfectMatchingSet::filter(const PerfectMatching& p, int n) {
    vector<Pm>* newData = new vector<Pm>();
    for (PerfectMatchingSet::iterator it = this->begin(); it != this->end(); ++it) {
        if (numInCommon(p, *it) == n) {
            newData->push_back(*it);
        }
    }

    delete this->data;
    this->data = newData;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x18, %edi
callq 0x2230
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq (%rbx), %r13
movq (%r13), %r12
cmpq 0x8(%r13), %r12
je 0x61a2
movq %r15, %rdi
movq %r12, %rsi
callq 0x6030
cmpl %ebp, %eax
jne 0x6199
movq %r14, %rdi
movq %r12, %rsi
callq 0x65ae
addq $0x20, %r12
movq (%rbx), %r13
jmp 0x6179
movq %r13, %rdi
callq 0x6550
movl $0x18, %esi
movq %r13, %rdi
callq 0x2240
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/chrischute[P]are-you-the-one/src/PerfectMatchingSet.cpp
// Function: PerfectMatchingSet::filter(TruthBooth const&, bool)
void PerfectMatchingSet::filter(const Tb& m, bool isMatch) {
    vector<Pm>* newData = new vector<Pm>();
    for (PerfectMatchingSet::iterator it = this->begin(); it != this->end(); ++it) {
        if (isMatch == ((*it)[m.index] == m.charAtIndex)) {
            newData->push_back(*it);
        }
    }

    delete this->data;
    this->data = newData;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x18, %edi
callq 0x2230
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq (%rbx), %r12
movq (%r12), %r13
cmpq 0x8(%r12), %r13
je 0x6230
movslq (%r15), %rax
movq (%r13), %rcx
movb (%rcx,%rax), %al
cmpb 0x4(%r15), %al
setne %al
cmpb %bpl, %al
je 0x622a
movq %r14, %rdi
movq %r13, %rsi
callq 0x65ae
movq (%rbx), %r12
addq $0x20, %r13
jmp 0x61ff
movq %r12, %rdi
callq 0x6550
movl $0x18, %esi
movq %r12, %rdi
callq 0x2240
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/chrischute[P]are-you-the-one/src/PerfectMatchingSet.cpp
// Function: PerfectMatchingSet::populateAll()
void PerfectMatchingSet::populateAll() {
    Pm p = "0123456789";
    do {
        this->add(p);
    } while (next_permutation(p.begin(), p.end()));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xd81(%rip), %rsi       # 0x7025
leaq 0xd84(%rip), %rdx       # 0x702f
movq %rsp, %r14
movq %r14, %rdi
callq 0x5256
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x65ae
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
addq %rdi, %rsi
callq 0x5381
testb %al, %al
jne 0x62b6
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x62ec
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2240
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x630f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2240
movq %rbx, %rdi
callq 0x2360
nop
// File: /workspace/github_cpp_makefile_star2_O3/chrischute[P]are-you-the-one/src/PerfectMatchingSet.cpp
// Function: PerfectMatchingSet::populateFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void PerfectMatchingSet::populateFromFile(string filename) {
    Pm s;
    ifstream inputFile(filename);

    while (inputFile >> s) {
        this->add(s);
    }

    inputFile.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x20(%rsp), %rdi
movl $0x8, %edx
callq 0x2310
leaq 0x20(%rsp), %r14
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2290
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x637e
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x65ae
jmp 0x6358
leaq 0x20(%rsp), %rdi
callq 0x2070
leaq 0x20(%rsp), %rdi
callq 0x2080
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x63a8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2240
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x63be
movq %rax, %rbx
jmp 0x63cb
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2080
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x63e1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2240
movq %rbx, %rdi
callq 0x2360
nop
// File: /workspace/github_cpp_makefile_star2_O3/chrischute[P]are-you-the-one/src/PerfectMatchingSet.cpp
// Function: PerfectMatchingSet::copyIntoChunks(int) const
PerfectMatchingSet** PerfectMatchingSet::copyIntoChunks(int numChunks) const {
    PerfectMatchingSet** chunks = new PerfectMatchingSet*[numChunks];
    long chunkSize = this->size() / numChunks;
    long numChunksWithOneExtra = this->size() % numChunks;

    int i = 0;
    for (PerfectMatchingSet::iterator beginChunk = this->begin(), endChunk = this->begin();
         beginChunk != this->end();
         beginChunk = endChunk) {
        endChunk += chunkSize;
        if (numChunksWithOneExtra-- > 0) {
            ++endChunk;
        }

        chunks[i++] = new PerfectMatchingSet(beginChunk, endChunk);
    }
    assert(i == numChunks);

    return chunks;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %r15
movslq %esi, %rbx
leaq (,%rbx,8), %rax
testl %ebx, %ebx
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x2030
movq %rax, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movq (%r15), %rax
movq (%rax), %r12
movq 0x8(%rax), %rcx
movq %rcx, %rax
subq %r12, %rax
sarq $0x5, %rax
xorl %edx, %edx
divq %rbx
xorl %r15d, %r15d
cmpq %r12, %rcx
je 0x64bd
movq %rax, %r13
movq %rdx, %rbp
movl %r14d, 0x4(%rsp)
xorl %r15d, %r15d
shlq $0x5, %r13
movq %r12, %r14
leaq (%r12,%r13), %rax
xorl %r12d, %r12d
testq %rbp, %rbp
setg %r12b
shll $0x5, %r12d
addq %rax, %r12
movl $0x8, %edi
callq 0x2230
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x6092
decq %rbp
movq 0x8(%rsp), %rax
movq %rbx, (%rax,%r15,8)
incq %r15
movq 0x10(%rsp), %rax
movq (%rax), %rax
cmpq 0x8(%rax), %r12
jne 0x6468
movl 0x4(%rsp), %r14d
cmpl %r14d, %r15d
jne 0x64d6
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xfa5(%rip), %rdi       # 0x7482
leaq 0xfad(%rip), %rsi       # 0x7491
leaq 0xfbd(%rip), %rcx       # 0x74a8
movl $0x72, %edx
callq 0x2130
movq %rax, %r14
movl $0x8, %esi
movq %rbx, %rdi
callq 0x2240
movq %r14, %rdi
callq 0x2360
nop
// File: /workspace/github_cpp_makefile_star2_O3/lionell[P]huffman-rle/main.cc
// Function: build(std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int>>> const&)
Node *build(const map<char, int> &fs) {
  set<Node*, Cmp> s;
  for (auto const& p : fs) {
    s.insert(new Node{nullptr, nullptr, p.first, p.second});
  }
  while (s.size() > 1) {
    Node *left = *s.begin();
    s.erase(s.begin());
    Node *right = *s.begin();
    s.erase(s.begin());
    s.insert(new Node{left, right, 0, left->freq + right->freq});
  }
  return *s.begin();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0x18(%rdi), %r14
addq $0x8, %rbx
cmpq %rbx, %r14
je 0x2684
leaq 0x8(%rsp), %r15
movq %rsp, %r12
movl $0x18, %edi
callq 0x2170
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movb 0x20(%r14), %cl
movb %cl, 0x10(%rax)
movl 0x24(%r14), %ecx
movl %ecx, 0x14(%rax)
movq %rax, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x3486
movq %r14, %rdi
callq 0x21a0
movq %rax, %r14
cmpq %rbx, %rax
jne 0x25d5
cmpq $0x2, 0x30(%rsp)
jb 0x2684
leaq 0x8(%rsp), %rbx
movq %rsp, %r14
movq 0x20(%rsp), %rsi
movq 0x20(%rsi), %r15
movq %rbx, %rdi
callq 0x35a8
movq 0x20(%rsp), %rsi
movq 0x20(%rsi), %r12
movq %rbx, %rdi
callq 0x35a8
movl $0x18, %edi
callq 0x2170
movq %r15, (%rax)
movq %r12, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x14(%r12), %ecx
addl 0x14(%r15), %ecx
movl %ecx, 0x14(%rax)
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3486
cmpq $0x1, 0x30(%rsp)
ja 0x262a
leaq 0x8(%rsp), %rdi
movq 0x18(%rdi), %rax
movq 0x20(%rax), %rbx
callq 0x3096
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x26ab
jmp 0x26ab
jmp 0x26ab
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3096
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/lionell[P]huffman-rle/main.cc
// Function: optimize(Node*, bool)
void optimize(Node *root, bool zero = true) {
  if (root->val) return;
  if (zero && root->zero->freq < root->one->freq) swap(root->zero, root->one);
  if (!zero && root->zero->freq > root->one->freq) swap(root->zero, root->one);
  optimize(root->zero, true);
  optimize(root->one, false);
}

// Assembly:
cmpb $0x0, 0x10(%rdi)
je 0x26c7
retq
pushq %rbx
movq %rdi, %rbx
movq (%rbx), %rax
movq 0x8(%rbx), %rdi
movl 0x14(%rax), %ecx
movl 0x14(%rdi), %edx
testb $0x1, %sil
je 0x26e7
cmpl %edx, %ecx
jl 0x26eb
movq %rax, %rdi
jmp 0x26f2
cmpl %edx, %ecx
jle 0x26e2
movq %rdi, (%rbx)
movq %rax, 0x8(%rbx)
movl $0x1, %esi
callq 0x26c0
movq 0x8(%rbx), %rbx
xorl %esi, %esi
cmpb $0x0, 0x10(%rbx)
je 0x26cb
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/lionell[P]huffman-rle/main.cc
// Function: convolute[abi:cxx11](Node const*)
map<char, string> convolute(const Node *root) {
  map<char, string> res;
  if (root->val != 0) {
    res[root->val] = "";
    return res;
  }
  map<char, string> zero = convolute(root->zero);
  for (auto const& p : zero) {
    res[p.first] = "0" + p.second;
  }
  map<char, string> one = convolute(root->one);
  for (auto const& p : one) {
    res[p.first] = "1" + p.second;
  }
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
cmpb $0x0, 0x10(%rsi)
je 0x276a
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x2f5a
movq 0x8(%rax), %rdx
leaq 0x18f1(%rip), %rcx      # 0x4049
movq %rax, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x21f0
jmp 0x2869
movq %rsi, (%rsp)
movq (%rsi), %rsi
leaq 0x58(%rsp), %rdi
callq 0x270a
leaq 0x60(%rsp), %rbp
movq 0x10(%rbp), %r15
cmpq %rbp, %r15
je 0x27df
leaq 0x18(%rsp), %r14
leaq 0x18b3(%rip), %r12      # 0x4048
leaq 0x8(%rsp), %r13
leaq 0x28(%r15), %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x2fbf
leaq 0x20(%r15), %rsi
movq %rbx, %rdi
callq 0x2f5a
movq %rax, %rdi
movq %r13, %rsi
callq 0x21b0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x27cf
callq 0x2150
movq %r15, %rdi
callq 0x20e0
movq %rax, %r15
cmpq %rbp, %rax
jne 0x279a
movq (%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x8(%rsp), %rdi
callq 0x270a
leaq 0x10(%rsp), %r13
movq 0x10(%r13), %r14
cmpq %r13, %r14
je 0x2855
leaq 0x48(%rsp), %rbp
leaq 0x183f(%rip), %r15      # 0x404a
leaq 0x38(%rsp), %r12
leaq 0x28(%r14), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2fbf
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x2f5a
movq %rax, %rdi
movq %r12, %rsi
callq 0x21b0
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2845
callq 0x2150
movq %r14, %rdi
callq 0x20e0
movq %rax, %r14
cmpq %r13, %rax
jne 0x2810
leaq 0x8(%rsp), %rdi
callq 0x30e0
leaq 0x58(%rsp), %rdi
callq 0x30e0
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28aa
jmp 0x2882
movq %rax, %r15
jmp 0x28cb
movq %rax, %r15
jmp 0x289e
movq %rax, %r15
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x289e
callq 0x2150
leaq 0x8(%rsp), %rdi
callq 0x30e0
jmp 0x28c1
movq %rax, %r15
jmp 0x28c1
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x28c1
callq 0x2150
leaq 0x58(%rsp), %rdi
callq 0x30e0
movq %rbx, %rdi
callq 0x30e0
movq %r15, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/lionell[P]huffman-rle/main.cc
// Function: huffman(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::map<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<char>, std::allocator<std::pair<char const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
string huffman(const string &text, map<char, string> &mapping) {
  string res = "";
  for (char c : text) {
    res += mapping[c];
  }
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rax, (%rdi)
leaq 0x1744(%rip), %rdx      # 0x4049
movq %rdx, %rsi
callq 0x315c
movq 0x8(%r15), %r13
testq %r13, %r13
je 0x294c
movq (%r15), %rbp
xorl %r12d, %r12d
leaq 0xf(%rsp), %r15
movb (%rbp,%r12), %al
movb %al, 0xf(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2f5a
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x2070
incq %r12
cmpq %r12, %r13
jne 0x2921
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq 0x10(%rsp), %rdi
je 0x2970
callq 0x2150
movq %r14, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/lionell[P]huffman-rle/main.cc
// Function: flush(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>&, char, int)
void flush(stringstream &out, char c, int cnt) {
  if (cnt > 3) {
    out << cnt << "@" << c;
  } else {
    for (int j = 0; j < cnt; j++) out << c;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x3, %edx
jle 0x29c6
addq $0x10, %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x2240
movq %rax, %r14
leaq 0x16a9(%rip), %rsi      # 0x404c
movl $0x1, %edx
movq %rax, %rdi
callq 0x2190
leaq 0x7(%rsp), %rsi
movb %bl, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x2190
jmp 0x29eb
testl %ebp, %ebp
jle 0x29eb
addq $0x10, %r14
leaq 0x6(%rsp), %r15
movb %bl, 0x6(%rsp)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2190
decl %ebp
jne 0x29d3
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lionell[P]huffman-rle/main.cc
// Function: rle(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string rle(const string &s) {
  stringstream out;
  char c = s[0];
  int cnt = 1;
  for (int i = 1; i < s.length(); i++) {
    if (s[i] != c) {
      flush(out, c, cnt);
      c = s[i];
      cnt = 1;
    } else cnt++;
  }
  flush(out, c, cnt);
  return out.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x20f0
movq (%r14), %rcx
movq 0x8(%r14), %rsi
movb (%rcx), %al
movl $0x1, %edx
cmpq $0x2, %rsi
jb 0x2a5c
movl $0x1, %r12d
movq %rsp, %r15
cmpb %al, (%rcx,%r12)
jne 0x2a39
incl %edx
jmp 0x2a54
movsbl %al, %esi
movq %r15, %rdi
callq 0x2978
movq (%r14), %rcx
movq 0x8(%r14), %rsi
movb (%rcx,%r12), %al
movl $0x1, %edx
incq %r12
cmpq %r12, %rsi
ja 0x2a2f
movsbl %al, %esi
movq %rsp, %rdi
callq 0x2978
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x2210
movq 0x3535(%rip), %rsi      # 0x5fb0
movq %rsp, %rdi
callq 0x2110
leaq 0x80(%rsp), %rdi
callq 0x2080
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x2aa4
movq %rax, %rbx
movq 0x3502(%rip), %rsi      # 0x5fb0
movq %rsp, %rdi
callq 0x2110
leaq 0x80(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/lionell[P]huffman-rle/main.cc
// Function: dispose(Node*)
void dispose(Node *root) {
  if (!root->val) {
    dispose(root->zero);
    dispose(root->one);
  }
  delete root;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x10(%rdi)
jne 0x2ae6
movq (%rbx), %rdi
callq 0x2acb
movq 0x8(%rbx), %rdi
callq 0x2acb
movq %rbx, %rdi
popq %rbx
jmp 0x2150
// File: /workspace/github_cpp_makefile_star2_O3/lionell[P]huffman-rle/main.cc
// Function: run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
string run(const string &text, bool opt) {
  Node *root = build(count(text));
  if (opt) optimize(root);
  map<char, string> mapping = convolute(root);
  dispose(root);
  return rle(huffman(text, mapping));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x250f
movq %r15, %rdi
callq 0x2591
movq %rax, %r15
leaq 0x20(%rsp), %rdi
callq 0x304c
testb %bpl, %bpl
je 0x2b37
movq %r15, %rdi
movl $0x1, %esi
callq 0x26c0
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x270a
movq %r15, %rdi
callq 0x2acb
movq %rsp, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x28db
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x29f6
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b7b
callq 0x2150
leaq 0x20(%rsp), %rdi
callq 0x30e0
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bb0
callq 0x2150
jmp 0x2bb0
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x30e0
jmp 0x2bc9
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x304c
movq %rbx, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/mattcha[P]sgd-svm/sgd_svm_train.cpp
// Function: step_train(Instance const&, Weight&, Param&)
int step_train(const Instance &instance, Weight &weight, Param &param)
{
    uint32_t fea_size = instance.f_vec.size();
    // update eta
    param.eta = 1.0 / (param.lambda * sqrt(param.step));
    
    double y_score = inner_product(instance, weight);
    double y_label = instance.y_label;

    double loss = 1 - y_label * y_score;

    for (uint32_t fi=0; fi<fea_size; ++fi) {
        const Feature &fea = instance.f_vec[fi];
        double w_i = weight.w_vec[fea.idx];

        // compute l2 loss
        param.loss_l2 += param.lambda * w_i * w_i;

        // wrong classfy
        // iterate all instance feature
        // w = w - eta*(lambda*w - y_label*x)
        if (loss > 0) {
            w_i = w_i - param.eta*(param.lambda*w_i - y_label*fea.val);
        }
        // right classfy
        // as loss > 0
        // w = w - eta*lambda*w
        if (loss < 0) {
            w_i = w_i - param.eta*param.lambda*w_i;
        }

        weight.w_vec[fea.idx] = w_i;
    }

    if (loss > 0) {
        param.loss_hinge += loss;
    }

    if (loss <= 0) 
        return 1;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x10(%rdi), %r12
subq 0x8(%rdi), %r12
movq %rdx, %rbx
movl 0x18(%rdx), %eax
cvtsi2sd %rax, %xmm0
movq %rsi, %r15
sqrtsd %xmm0, %xmm0
mulsd 0x8(%rdx), %xmm0
movsd 0x185f(%rip), %xmm1     # 0x4030
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rdx)
callq 0x318c
movsd 0x1849(%rip), %xmm6     # 0x4030
movsd (%r14), %xmm1
mulsd %xmm1, %xmm0
subsd %xmm0, %xmm6
shrq $0x4, %r12
testl %r12d, %r12d
je 0x287a
xorpd 0x181b(%rip), %xmm1     # 0x4020
movq 0x8(%r14), %rax
movq (%r15), %rcx
movl %r12d, %edx
addq $0x8, %rax
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm6
movl -0x8(%rax), %esi
movsd (%rcx,%rsi,8), %xmm2
movsd 0x8(%rbx), %xmm3
movapd %xmm2, %xmm4
mulsd %xmm3, %xmm4
movapd %xmm4, %xmm5
mulsd %xmm2, %xmm5
addsd 0x28(%rbx), %xmm5
movsd %xmm5, 0x28(%rbx)
jbe 0x2859
movsd (%rax), %xmm5
mulsd %xmm1, %xmm5
addsd %xmm5, %xmm4
mulsd 0x10(%rbx), %xmm4
subsd %xmm4, %xmm2
ucomisd %xmm6, %xmm0
jbe 0x286c
mulsd 0x10(%rbx), %xmm3
mulsd %xmm2, %xmm3
subsd %xmm3, %xmm2
movsd %xmm2, (%rcx,%rsi,8)
addq $0x10, %rax
decq %rdx
jne 0x2817
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm6
jbe 0x2892
movsd 0x20(%rbx), %xmm1
addsd %xmm6, %xmm1
movsd %xmm1, 0x20(%rbx)
xorl %eax, %eax
ucomisd %xmm6, %xmm0
setae %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mattcha[P]sgd-svm/sgd_svm_train.cpp
// Function: save_model(char const*, Weight const&, Param const&)
int save_model(const char* modelname, const Weight &weight, const Param &param)
{
    if (modelname == NULL) {
        fprintf(stderr, "model name is null\n");
        return -1;
    }

    FILE *fp = fopen(modelname, "w");
    if (fp == NULL) {
        fprintf(stderr, "open model file fail [%s]\n", modelname);
        return -1;
    }

    uint32_t w_size = weight.w_vec.size();
    fprintf(fp, "%f %u %u\n", param.lambda, param.iteration, w_size);

    for (uint32_t i=0; i<w_size; ++i) {
        if (weight.w_vec[i]==0) {
            continue;
        }
        fprintf(fp, "%u\t%f\n", i, weight.w_vec[i]);
    }

    fprintf(stderr, "save model succ\n");
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
jne 0x2aa6
callq 0x232c
jmp 0x2adb
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x165b(%rip), %rsi      # 0x4111
callq 0x2120
testq %rax, %rax
jne 0x2ae2
movq 0x3511(%rip), %rax      # 0x5fd8
movq (%rax), %rdi
leaq 0x1642(%rip), %rsi      # 0x4113
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2160
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2af2
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2285
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mattcha[P]sgd-svm/sgd_svm_train.cpp
// Function: main
int main(int argc, char** argv)
{
    Dataset dataset;
    Weight weight;
    Param param;

    if (argc != 5) {
        fprintf(stderr, 
                "Usage : %s iteration lambda trainname modelname\n", argv[0]);
        return 1;
    }

    param.iteration = atoi(argv[1]);
    param.lambda = atof(argv[2]);

    char *trainname = argv[3];
    char *modelname = argv[4];

    param.step = 0;

    int ret = load_data(trainname, dataset, weight);
    if (ret != 0) {
        fprintf(stderr, "load data [%s] fail\n", argv[1]);
        return -1;
    }

    ret = train(dataset, weight, param);
    if (ret != 0) {
        fprintf(stderr, "train fail\n");
        return -1;
    }

    ret = save_model(modelname, weight, param);
    if (ret != 0) {
        fprintf(stderr, "save model fail\n");
        return -1;
    }
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
xorl %eax, %eax
movq %rax, -0x40(%rbp)
movq %rax, -0x20(%rbp)
movaps %xmm0, -0x30(%rbp)
cmpl $0x5, %edi
jne 0x2bc2
movq 0x8(%rbx), %rdi
callq 0x2190
movl %eax, -0x88(%rbp)
movq 0x10(%rbx), %rdi
callq 0x2140
movsd %xmm0, -0x80(%rbp)
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %r14
movl $0x0, -0x70(%rbp)
leaq -0x50(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x258c
testl %eax, %eax
jne 0x2bd1
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x28a4
leaq -0x30(%rbp), %rsi
leaq -0x88(%rbp), %rdx
movq %r14, %rdi
callq 0x2a90
xorl %ebx, %ebx
testl %eax, %eax
jne 0x2bdf
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x2bab
movq -0x20(%rbp), %rsi
subq %rdi, %rsi
callq 0x2110
leaq -0x50(%rbp), %rdi
callq 0x2dfe
movl %ebx, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0x235b
movl $0x1, %ebx
jmp 0x2b96
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x237e
jmp 0x2be4
callq 0x23a2
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x2b96
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x2c03
movq -0x20(%rbp), %rsi
subq %rdi, %rsi
callq 0x2110
leaq -0x50(%rbp), %rdi
callq 0x2dfe
movq %rbx, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O3/kube[P]gradius/AGameEntity.cpp
// Function: AGameEntity::refreshPhysics()
void  AGameEntity::refreshPhysics() {
  int didBounce = false;

  _world.setEntityAt((int)_posX, (int)_posY, NULL);

  _posX += _dirX * _acceleration;
  _posY += _dirY * _acceleration;

  _dirX *= _deceleration;
  _dirY *= _deceleration;

  if (_posX < 1) {
    _posX = 1;
    _dirX = -_dirX * _bounce;
    didBounce = true;
  }
  else if (_posX >= _world.getWidth()) {
    _posX = _world.getWidth() - 1;
    _dirX = -_dirX * _bounce;
    didBounce = true;
  }

  if (_posY < 1) {
    _posY = 1;
    _dirY = -_dirY * _bounce;
    didBounce = true;
  }
  else if (_posY >= _world.getHeight()) {
    _posY = _world.getHeight() - 1;
    _dirY = -_dirY * _bounce;
    didBounce = true;
  }
  _world.setEntityAt((int)_posX, (int)_posY, this);

  if (didBounce)
    bounce();
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cvttss2si 0x8(%rdi), %esi
movq 0x30(%rdi), %rdi
cvttss2si 0xc(%rbx), %edx
xorl %ecx, %ecx
callq 0x375c
movups 0x18(%rbx), %xmm3
movups 0x1c(%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movsd 0x10(%rbx), %xmm2
shufps $0x0, %xmm3, %xmm3      # xmm3 = xmm3[0,0,0,0]
mulps %xmm2, %xmm3
addps %xmm1, %xmm3
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
mulps %xmm2, %xmm0
movaps %xmm3, %xmm1
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movups %xmm1, 0x8(%rbx)
movss 0x1a45(%rip), %xmm1     # 0x4004
ucomiss %xmm3, %xmm1
jbe 0x25cd
movl $0x3f800000, 0x8(%rbx)  # imm = 0x3F800000
jmp 0x2619
movq 0x30(%rbx), %rdi
movaps %xmm3, (%rsp)
callq 0x34c6
movss 0x1a22(%rip), %xmm1     # 0x4004
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movb $0x1, %bpl
movaps (%rsp), %xmm2
ucomiss %xmm0, %xmm2
jb 0x262c
movq 0x30(%rbx), %rdi
callq 0x34c6
movss 0x19fe(%rip), %xmm1     # 0x4004
decl %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x8(%rbx)
movss 0x10(%rbx), %xmm0
xorps 0x19f0(%rip), %xmm0     # 0x4010
mulss 0x20(%rbx), %xmm0
movss %xmm0, 0x10(%rbx)
xorl %ebp, %ebp
movss 0xc(%rbx), %xmm0
ucomiss %xmm0, %xmm1
ja 0x2689
movq 0x30(%rbx), %rdi
movss %xmm0, (%rsp)
callq 0x34c2
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss (%rsp), %xmm1
ucomiss %xmm0, %xmm1
jae 0x2677
cvttss2si 0x8(%rbx), %esi
movq 0x30(%rbx), %rdi
cvttss2si 0xc(%rbx), %edx
movq %rbx, %rcx
callq 0x375c
testb %bpl, %bpl
je 0x26b9
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movq 0x30(%rbx), %rdi
callq 0x34c2
decl %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
movss %xmm1, 0xc(%rbx)
movss 0x14(%rbx), %xmm0
xorps 0x1976(%rip), %xmm0     # 0x4010
mulss 0x20(%rbx), %xmm0
movss %xmm0, 0x14(%rbx)
cvttss2si 0x8(%rbx), %esi
movq 0x30(%rbx), %rdi
cvttss2si %xmm1, %edx
movq %rbx, %rcx
callq 0x375c
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %rbp
jmpq *0x18(%rax)
// File: /workspace/github_cpp_makefile_star2_O3/kube[P]gradius/BasicMissile.cpp
// Function: BasicMissile::BasicMissile(AShip const&, float)
BasicMissile::BasicMissile(const AShip& sender, float power) :
  AMissile(sender, power)
{
  _deceleration = 1.0001;
  _acceleration = 0.1;
  _bounce = 0.0;
  _maxSpeed = 0.7;
  _skin = ACS_BULLET;

  _posX = _sender.getPosX() + _sender.getShootX();
  _posY = _sender.getPosY() + _sender.getShootY();

  _dirX = _sender.getShootX() * power * _acceleration;
  _dirY = _sender.getShootY() * power * _acceleration;

  _world.setEntityAt((int)_posX, (int)_posY, this);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movss %xmm0, 0x4(%rsp)
callq 0x27b4
leaq 0x43eb(%rip), %rax      # 0x6c28
movq %rax, (%rbx)
movaps 0x17f9(%rip), %xmm0     # 0x4040
movups %xmm0, 0x18(%rbx)
movq 0x475e(%rip), %rax      # 0x6fb0
movl 0x1f8(%rax), %eax
movl %eax, 0x2c(%rbx)
movq 0x38(%rbx), %rdi
callq 0x26d2
movss %xmm0, (%rsp)
movq 0x38(%rbx), %rdi
callq 0x279c
movss (%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0x8(%rbx)
movq 0x38(%rbx), %rdi
callq 0x26d8
movss %xmm0, (%rsp)
movq 0x38(%rbx), %rdi
callq 0x27a2
movss (%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0xc(%rbx)
movq 0x38(%rbx), %rdi
callq 0x279c
mulss 0x4(%rsp), %xmm0
mulss 0x18(%rbx), %xmm0
movss %xmm0, 0x10(%rbx)
movq 0x38(%rbx), %rdi
callq 0x27a2
mulss 0x4(%rsp), %xmm0
mulss 0x18(%rbx), %xmm0
movss %xmm0, 0x14(%rbx)
cvttss2si 0x8(%rbx), %esi
movq 0x30(%rbx), %rdi
cvttss2si 0xc(%rbx), %edx
movq %rbx, %rcx
callq 0x375c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2816
movq %r14, %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O3/kube[P]gradius/BasicMissile.cpp
// Function: BasicMissile::BasicMissile(AShip const&, float, float, float, float, float)
BasicMissile::BasicMissile(const AShip& sender, float power,
              float offsetX, float offsetY, float dirX, float dirY) :
  AMissile(sender, power)
{
  _deceleration = 1.0001;
  _acceleration = 0.1;
  _bounce = 0.0;
  _maxSpeed = 0.7;
  _skin = ACS_BULLET;

  _posX = _sender.getPosX() + _sender.getShootX() + offsetX;
  _posY = _sender.getPosY() + _sender.getShootY() + offsetY;

  _dirX = (_sender.getShootX() + dirX) * power * _acceleration;
  _dirY = (_sender.getShootY() + dirY) * power * _acceleration;

  _world.setEntityAt((int)_posX, (int)_posY, this);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movss %xmm4, 0x8(%rsp)
movss %xmm3, 0xc(%rsp)
movss %xmm2, 0x10(%rsp)
movss %xmm1, (%rsp)
movq %rdi, %rbx
movss %xmm0, 0x4(%rsp)
callq 0x27b4
leaq 0x42ed(%rip), %rax      # 0x6c28
movq %rax, (%rbx)
movaps 0x16fb(%rip), %xmm0     # 0x4040
movups %xmm0, 0x18(%rbx)
movq 0x4660(%rip), %rax      # 0x6fb0
movl 0x1f8(%rax), %eax
movl %eax, 0x2c(%rbx)
movq 0x38(%rbx), %rdi
callq 0x26d2
movss %xmm0, 0x14(%rsp)
movq 0x38(%rbx), %rdi
callq 0x279c
movss 0x14(%rsp), %xmm1
addss %xmm0, %xmm1
addss (%rsp), %xmm1
movss %xmm1, 0x8(%rbx)
movq 0x38(%rbx), %rdi
callq 0x26d8
movss %xmm0, (%rsp)
movq 0x38(%rbx), %rdi
callq 0x27a2
movss (%rsp), %xmm1
addss %xmm0, %xmm1
addss 0x10(%rsp), %xmm1
movss %xmm1, 0xc(%rbx)
movq 0x38(%rbx), %rdi
callq 0x279c
addss 0xc(%rsp), %xmm0
mulss 0x4(%rsp), %xmm0
mulss 0x18(%rbx), %xmm0
movss %xmm0, 0x10(%rbx)
movq 0x38(%rbx), %rdi
callq 0x27a2
addss 0x8(%rsp), %xmm0
mulss 0x4(%rsp), %xmm0
mulss 0x18(%rbx), %xmm0
movss %xmm0, 0x14(%rbx)
cvttss2si 0x8(%rbx), %esi
movq 0x30(%rbx), %rdi
cvttss2si 0xc(%rbx), %edx
movq %rbx, %rcx
callq 0x375c
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2816
movq %r14, %rdi
callq 0x2210
nop
// File: /workspace/github_cpp_makefile_star2_O3/kube[P]gradius/BasicMissile.cpp
// Function: BasicMissile::draw()
void BasicMissile::draw() {
  int offsetX = (COLS - _world.getWidth()) / 2;
  int offsetY = (LINES - _world.getHeight()) / 2;

  move(offsetY + _posY, offsetX + _posX);
  addch(_skin);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x4566(%rip), %rax      # 0x6fb8
movl (%rax), %ebp
movq 0x30(%rdi), %rdi
callq 0x34c6
subl %eax, %ebp
movl %ebp, %r14d
shrl $0x1f, %r14d
addl %ebp, %r14d
sarl %r14d
movq 0x4535(%rip), %rax      # 0x6fa8
movl (%rax), %ebp
movq 0x30(%rbx), %rdi
callq 0x34c2
subl %eax, %ebp
movl %ebp, %eax
shrl $0x1f, %eax
addl %ebp, %eax
sarl %eax
cvtsi2ss %eax, %xmm0
addss 0xc(%rbx), %xmm0
cvttss2si %xmm0, %edi
xorps %xmm0, %xmm0
cvtsi2ss %r14d, %xmm0
addss 0x8(%rbx), %xmm0
cvttss2si %xmm0, %esi
callq 0x20d0
movq 0x4525(%rip), %rax      # 0x6fd8
movq (%rax), %rdi
movl 0x2c(%rbx), %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x2070
// File: /workspace/github_cpp_makefile_star2_O3/kube[P]gradius/BasicEnemy.cpp
// Function: BasicEnemy::BasicEnemy(int, int)
BasicEnemy::BasicEnemy(int x, int y) :
  AEnemy(x, y)
{
  _posX = x;
  _posY = y;

  _dirX = 0.2;
  _dirY = 1;
  _acceleration = 0.001 + (float)(Game::getInstance()->getElapsedTime()) / 100000000;
  _deceleration = 1.00001 + (float)(Game::getInstance()->getElapsedTime()) / 100000000;
  _skin = ACS_DARROW;

  _bounce = 0.4;
  _maxSpeed = 0.1;
  _lastShootTimestamp = 0;

  _world.setEntityAt((int)_posX, (int)_posY, this);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
callq 0x2b0c
leaq 0x410c(%rip), %rax      # 0x6cd8
movq %rax, (%rbx)
movd %ebp, %xmm0
movd %r14d, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtdq2ps %xmm1, %xmm0
unpcklpd 0x1489(%rip), %xmm0     # xmm0 = xmm0[0],mem[0]
movups %xmm0, 0x8(%rbx)
callq 0x3408
movq %rax, %rdi
callq 0x3404
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x1499(%rip), %xmm0     # 0x40a0
cvtss2sd %xmm0, %xmm0
addsd 0x149d(%rip), %xmm0     # 0x40b0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x18(%rbx)
callq 0x3408
movq %rax, %rdi
callq 0x3404
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x1468(%rip), %xmm0     # 0x40a0
cvtss2sd %xmm0, %xmm0
addsd 0x1474(%rip), %xmm0     # 0x40b8
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1c(%rbx)
movq 0x435c(%rip), %rax      # 0x6fb0
movl 0xb8(%rax), %eax
movl %eax, 0x2c(%rbx)
movsd 0x141b(%rip), %xmm0     # 0x4080
movsd %xmm0, 0x20(%rbx)
movl $0x0, 0x54(%rbx)
cvttss2si 0x8(%rbx), %esi
movq 0x30(%rbx), %rdi
cvttss2si 0xc(%rbx), %edx
movq %rbx, %rcx
callq 0x375c
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2b78
movq %r14, %rdi
callq 0x2210
nop
// File: /workspace/github_cpp_makefile_star2_O3/kube[P]gradius/BasicEnemy.cpp
// Function: BasicEnemy::BasicEnemy(BasicEnemy const&)
BasicEnemy::BasicEnemy(const BasicEnemy& game) :
  AEnemy(game)
{
  *this = game;

  _dirX = 0;
  _dirY = 1;
  _acceleration = 0.001 + (float)(Game::getInstance()->getElapsedTime()) / 10000000;
  _deceleration = 1.00001 + (float)(Game::getInstance()->getElapsedTime()) / 10000000;
  _skin = ACS_DARROW;

  _bounce = 0.4;
  _maxSpeed = 0.1;
  _lastShootTimestamp = 0;

  _world.setEntityAt((int)_posX, (int)_posY, this);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2b5e
leaq 0x4025(%rip), %rax      # 0x6cd8
movq %rax, (%rbx)
movsd 0x13d2(%rip), %xmm0     # 0x4090
movsd %xmm0, 0x10(%rbx)
callq 0x3408
movq %rax, %rdi
callq 0x3404
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x13c5(%rip), %xmm0     # 0x40a4
cvtss2sd %xmm0, %xmm0
addsd 0x13c5(%rip), %xmm0     # 0x40b0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x18(%rbx)
callq 0x3408
movq %rax, %rdi
callq 0x3404
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x1394(%rip), %xmm0     # 0x40a4
cvtss2sd %xmm0, %xmm0
addsd 0x139c(%rip), %xmm0     # 0x40b8
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1c(%rbx)
movq 0x4284(%rip), %rax      # 0x6fb0
movl 0xb8(%rax), %eax
movl %eax, 0x2c(%rbx)
movsd 0x1343(%rip), %xmm0     # 0x4080
movsd %xmm0, 0x20(%rbx)
movl $0x0, 0x54(%rbx)
cvttss2si 0x8(%rbx), %esi
movq 0x30(%rbx), %rdi
cvttss2si 0xc(%rbx), %edx
movq %rbx, %rcx
callq 0x375c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2b78
movq %r14, %rdi
callq 0x2210