LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/FalconUA[P]vfs/./utility/rm.h
// Function: virt::util::rm::launch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string launch(std::string param){
			virt::util::shell* sh;
			if ((sh = dynamic_cast<virt::util::shell*>(working_os->app("shell"))) == NULL)
				return "ERROR: No module named \"shell\" found!\n";

			while (param[0] == ' ')
				param.erase(0, 1);
			while (param[param.length()-1] == ' ')
				param.erase(param.length()-1, 1);

			sh->shell_iterator.get_working_dir()->remove_file(param);
			sh->shell_iterator.get_working_dir()->remove_subdir(param);
			return "";
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r15
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x109b(%rip), %rsi      # 0xb1ef
leaq 0x1099(%rip), %rdx      # 0xb1f4
leaq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0x4718
movq %r15, %rdi
movq %r12, %rsi
callq 0x5e54
testq %rax, %rax
je 0xa195
leaq 0x6a09(%rip), %rsi      # 0x10b88
leaq 0x6a12(%rip), %rdx      # 0x10b98
movq %rax, %rdi
xorl %ecx, %ecx
callq 0x31f0
movq %rax, %r15
jmp 0xa198
xorl %r15d, %r15d
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa1af
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x31c0
testq %r15, %r15
jne 0xa1e0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x1412(%rip), %rsi      # 0xb5d4
leaq 0x1431(%rip), %rdx      # 0xb5fa
movq %rbx, %rdi
jmp 0xa2c7
movl $0x1, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3070
movq (%r14), %rax
cmpb $0x20, (%rax)
je 0xa1d1
movq 0x8(%r14), %rsi
cmpb $0x20, -0x1(%rax,%rsi)
jne 0xa215
decq %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0x3070
movq (%r14), %rax
movq 0x8(%r14), %rcx
leaq -0x1(%rcx), %rsi
cmpb $0x20, -0x1(%rax,%rcx)
je 0xa1f6
addq $0x50, %r15
movq %r15, %rdi
callq 0x5d56
movq %rax, %r12
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r13
movq %r13, %rdi
callq 0x4ace
movq %r12, %rdi
movq %r13, %rsi
callq 0x4186
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa266
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x31c0
movq %r15, %rdi
callq 0x5d56
movq %rax, %r15
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x4ace
movq %r15, %rdi
movq %r14, %rsi
callq 0x3cba
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa2b3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31c0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x1b0c(%rip), %rdx      # 0xbdcd
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x4718
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
jmp 0xa2fa
movq %rax, %rbx
movq 0x28(%rsp), %rdi
jmp 0xa2fa
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa30b
movq (%rbp), %rsi
incq %rsi
callq 0x31c0
movq %rbx, %rdi
callq 0x32d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/apps/scn2scn/scn2scn.cpp
// Function: ReadMatrix(gaps::R4Matrix&, char const*)
static int
ReadMatrix(R4Matrix& m, const char *filename)
{
  // Open file
  FILE *fp = fopen(filename, "r");
  if (!fp) {
    RNFail("Unable to open matrix file: %s\n", filename);
    return 0;
  }

  // Read matrix from file
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      double value;
      fscanf(fp, "%lf", &value);
      m[i][j] = value;
    }
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xda641(%rip), %rsi     # 0x101a83
movq %r15, %rdi
callq 0x22a50
testq %rax, %rax
je 0x274a0
movq %rax, %r14
leaq 0xd6cf9(%rip), %r15     # 0xfe152
movq %rsp, %r12
xorl %r13d, %r13d
xorl %ebp, %ebp
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x23110
movsd (%rsp), %xmm0
movsd %xmm0, (%rbx,%rbp,8)
incq %rbp
cmpq $0x4, %rbp
jne 0x27461
incq %r13
addq $0x20, %rbx
cmpq $0x4, %r13
jne 0x2745f
movq %r14, %rdi
callq 0x22860
movl $0x1, %ebx
jmp 0x274b3
leaq 0xcdcae(%rip), %rdi     # 0xf5155
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0xa52c2
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/canzarlab[P]Trajan/src/newick.cpp
// Function: get_nodes(newick_node*, std::vector<newick_node*, std::allocator<newick_node*>>&)
static void get_nodes(newick_node* node, vn& N)
{
    N[node->taxoni] = node;
    for (newick_child* child = node->child; child; child = child->next)
        if (!N[child->node->taxoni])
            get_nodes(child->node, N);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movslq 0x28(%rdi), %rax
movq (%rsi), %rcx
movq %rdi, (%rcx,%rax,8)
movq (%rdi), %r14
testq %r14, %r14
je 0x4048
movq %rsi, %rbx
movq (%rsi), %rax
movq (%r14), %rdi
movslq 0x28(%rdi), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x403f
movq %rbx, %rsi
callq 0x4009
movq (%rbx), %rax
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x4026
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/canzarlab[P]Trajan/src/newick.cpp
// Function: load_tree(char const*)
newick_node* load_tree(const char* filename)
{
    ifstream File(filename);
    if (!File)
    {
        cout << "Cannot read " << filename << endl;
        return nullptr;
    }

    int Size;
    File.seekg(0, ios::end);
    Size = File.tellg();
    File.seekg(0, ios::beg);

    string str(Size, 0);
    File.read(&str[0], Size);

    size_t itr = 0;
    return parse_tree(str, itr);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rdi, %r14
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x2390
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x50(%rsp,%rax)
je 0x414e
movq 0x5ebe(%rip), %rbx      # 0x9fd0
leaq 0x3090(%rip), %rsi      # 0x71a9
movl $0xc, %edx
movq %rbx, %rdi
callq 0x2250
testq %r14, %r14
je 0x41d9
movq %r14, %rdi
callq 0x2100
movq 0x5e92(%rip), %rdi      # 0x9fd0
movq %r14, %rsi
movq %rax, %rdx
callq 0x2250
jmp 0x41f0
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x22c0
leaq 0x30(%rsp), %rdi
callq 0x2360
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22c0
movslq %ebx, %rbx
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2260
movq 0x8(%rsp), %rsi
leaq 0x30(%rsp), %rdi
movq %rbx, %rdx
callq 0x2280
leaq 0x28(%rsp), %rsi
movq $0x0, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x426e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x421d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x421d
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x2350
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x5dc2(%rip), %rdi      # 0x9fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
xorl %ebx, %ebx
leaq 0x30(%rsp), %rdi
callq 0x2080
movq %rbx, %rax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r14
retq
jmp 0x4237
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x425c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x425c
jmp 0x4259
jmp 0x4259
jmp 0x4259
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2370
// File: /workspace/github_cpp_makefile_star2_O3/canzarlab[P]Trajan/src/newick.cpp
// Function: parse_tree(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&)
static newick_node* parse_tree(string& str, size_t& itr)
{
    newick_child* child = nullptr;
    newick_child** childptr = &child;
    for (itr += 1; itr < str.size() && str[itr - 1] != ')'; ++itr)
    {
        newick_node* new_child = nullptr;
        if (str[itr] == '(')
            new_child = parse_tree(str, itr);
        else
            new_child = parse_node(str, itr, nullptr);

        *childptr = new newick_child(new_child);
        childptr = &(*childptr)->next;
    }
    return parse_node(str, itr, child);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq $0x0, (%rsp)
movq (%rsi), %rcx
leaq 0x1(%rcx), %rax
movq %rax, (%rsi)
cmpq 0x8(%rdi), %rax
jae 0x42f6
movq %rsp, %r12
movq (%r14), %rdx
cmpb $0x29, (%rdx,%rcx)
je 0x42f0
cmpb $0x28, (%rdx,%rax)
jne 0x42b3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x426e
jmp 0x42c0
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x49a7
movq %rax, %r15
movl $0x10, %edi
callq 0x2200
movq %r15, (%rax)
movq $0x0, 0x8(%rax)
movq %rax, (%r12)
leaq 0x8(%rax), %r12
movq (%rbx), %rcx
leaq 0x1(%rcx), %rax
movq %rax, (%rbx)
cmpq 0x8(%r14), %rax
jb 0x4297
movq (%rsp), %rdx
jmp 0x42f8
xorl %edx, %edx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x49a7
// File: /workspace/github_cpp_makefile_star2_O3/canzarlab[P]Trajan/src/newick.cpp
// Function: load_dag_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, newick_node*, std::less<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, newick_node*>>>&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::less<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, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>>&)
static newick_node* load_dag_internal(const string& r, msn& M, msvs& C)
{
    if (newick_node* node = M[r])
        return node;

    newick_child* child = nullptr;
    newick_child** childptr = &child;
    for (const string& i : C[r])
    {
        *childptr = new newick_child(load_dag_internal(i, M, C));
        childptr = &(*childptr)->next;
    }
    return M[r] = new newick_node(r, 0, child);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x4daa
movq (%rax), %r12
testq %r12, %r12
jne 0x48a4
movq $0x0, 0x8(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4c48
movq (%rax), %r12
movq 0x8(%rax), %rbp
cmpq %rbp, %r12
je 0x4875
movq %rbx, 0x10(%rsp)
leaq 0x8(%rsp), %rbx
movl $0x10, %edi
callq 0x2200
movq %rax, %r13
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x47d7
movq %rax, (%r13)
movq $0x0, 0x8(%r13)
movq %r13, (%rbx)
movq %r13, %rbx
addq $0x8, %rbx
addq $0x20, %r12
cmpq %rbp, %r12
jne 0x482f
movq 0x8(%rsp), %r15
movq 0x10(%rsp), %rbx
jmp 0x4878
xorl %r15d, %r15d
movl $0x38, %edi
callq 0x2200
movq %rax, %r12
xorps %xmm0, %xmm0
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3e48
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4daa
movq %r12, (%rax)
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x38, %esi
movq %r12, %rdi
jmp 0x48ce
movq %rax, %rbx
movl $0x10, %esi
movq %r13, %rdi
callq 0x2210
movq %rbx, %rdi
callq 0x2370
// File: /workspace/github_cpp_makefile_star2_O3/canzarlab[P]Trajan/src/newick.cpp
// Function: print_tree(newick_node*, std::ostream&)
void print_tree(newick_node* root, ostream& file)
{
    file << fixed << setprecision(6);
    if (root->child)
    {
        file << "(";
        for (newick_child* child = root->child; child; child = child->next)
        {
            print_tree(child->node, file);
            if (child->next)
                file << ",";
        }
        file << ")" << root->taxon << ":" /*<< root->dist*/;
    }
    else
        file << root->taxon << ":" /*<< root->dist*/;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x18(%rsi,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x18(%rsi,%rcx)
movq -0x18(%rax), %rax
movq $0x6, 0x8(%rsi,%rax)
cmpq $0x0, (%rdi)
je 0x4978
leaq 0x28c6(%rip), %rsi      # 0x71e0
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2250
movq (%r14), %r12
testq %r12, %r12
je 0x4964
leaq 0x28ac(%rip), %r15      # 0x71e2
movq (%r12), %rdi
movq %rbx, %rsi
callq 0x48db
cmpq $0x0, 0x8(%r12)
je 0x4964
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2250
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x4936
leaq 0x28af(%rip), %rsi      # 0x721a
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2250
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x2250
leaq 0x2855(%rip), %rsi      # 0x71e4
movl $0x1, %edx
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2250
// File: /workspace/github_cpp_makefile_star2_O3/canzarlab[P]Trajan/src/newick.cpp
// Function: parse_node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long&, newick_child*)
static newick_node* parse_node(string& str, size_t& itr, newick_child* child)
{
    size_t index = str.find_first_of(",);\r\n\0", itr);
    string data = str.substr(itr, index - itr);
    itr = index;

    size_t index2 = data.find_first_of(':');
    string taxon = data.substr(0, index2);
    float dist = 0;
    if (index2 != string::npos && data.back() != ':')
        dist = stof(data.substr(index2 + 1));

    return new newick_node(taxon, dist, child);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rdx
leaq 0x2854(%rip), %rsi      # 0x721c
movl $0x5, %ecx
callq 0x2310
movq %rax, %r12
movq (%r14), %rdx
movq %rax, %rcx
subq %rdx, %rcx
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x2220
movq %r12, (%r14)
movq %r13, %rdi
movl $0x3a, %esi
xorl %edx, %edx
callq 0x22a0
movq %rax, %r14
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x2220
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
cmpq $-0x1, %r14
je 0x4ac4
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpb $0x3a, -0x1(%rax,%rcx)
je 0x4ac4
incq %r14
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %r14, %rdx
movq $-0x1, %rcx
callq 0x2220
movq 0x30(%rsp), %r15
callq 0x2050
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x70(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x22b0
movss %xmm0, 0xc(%rsp)
cmpq %r15, (%r12)
je 0x4b2f
movl (%r14), %eax
testl %eax, %eax
je 0x4aa6
cmpl $0x22, %eax
jne 0x4aa9
leaq 0x2745(%rip), %rdi      # 0x71e6
callq 0x22e0
movl %ebp, (%r14)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4ac4
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2210
movl $0x38, %edi
callq 0x2200
movq %rax, %r14
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
movss 0xc(%rsp), %xmm0
movq %rbx, %rdx
callq 0x3e48
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4b02
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2210
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4b1d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2210
movq %r14, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x26b0(%rip), %rdi      # 0x71e6
callq 0x2130
jmp 0x4b73
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x4b49
movl %ebp, (%r14)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4b76
movq 0x40(%rsp), %rsi
incq %rsi
jmp 0x4b6c
movq %rax, %rbx
movl $0x38, %esi
movq %r14, %rdi
callq 0x2210
jmp 0x4b76
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4b96
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2210
jmp 0x4b96
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4bb1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2370
nop
// File: /workspace/github_cpp_makefile_star2_O3/bolongz[P]Systematic-Alias-Sampling/./sas.h
// Function: SystematicAliasSampling::simple_sas(int, std::vector<double, std::allocator<double>>&, int)
void simple_sas(int samplecount, Table &samples, int from = 0){
                
                double steps = double(bincount) / samplecount;
                //double r = _random(0.0, steps);
                double r = steps * (1.0 - __random(gen));
                double x =  bincount - r;
                int i = from;

                int to = from + samplecount;
                while(i < to){
                  //  int ri = int(x);
                   // int rf  = x  -ri;
                    samples[i] = aliassample(int(x), x- int(x));
                    x -= steps;
                    i++;
                }
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %r15
movl %esi, %r14d
movq %rdi, %rbx
movsd 0x78(%rdi), %xmm0
movapd %xmm0, (%rsp)
leaq 0x6526(%rip), %rdi      # 0xa4f0
callq 0x4eae
testl %r14d, %r14d
jle 0x40af
movapd (%rsp), %xmm2
unpcklps 0x209c(%rip), %xmm2     # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x20a4(%rip), %xmm2     # 0x6090
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
addsd %xmm2, %xmm1
xorps %xmm2, %xmm2
cvtsi2sd %r14d, %xmm2
divsd %xmm2, %xmm1
addl %ebp, %r14d
movsd 0x78(%rbx), %xmm3
unpcklps 0x206d(%rip), %xmm3     # xmm3 = xmm3[0],mem[0],xmm3[1],mem[1]
subpd 0x2075(%rip), %xmm3     # 0x6090
movapd %xmm3, %xmm2
unpckhpd %xmm3, %xmm2            # xmm2 = xmm2[1],xmm3[1]
addsd %xmm3, %xmm2
movsd 0x7859(%rip), %xmm3     # 0xb888
movsd 0x7849(%rip), %xmm4     # 0xb880
subsd %xmm4, %xmm3
mulsd %xmm3, %xmm0
addsd %xmm4, %xmm0
movsd 0x1fc5(%rip), %xmm3     # 0x6010
subsd %xmm0, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm3, %xmm2
movq 0x60(%rbx), %rax
movq (%r15), %rcx
movslq %ebp, %rdx
movslq %r14d, %rsi
leaq 0x30(%rbx), %rdi
addq $0x18, %rbx
cvttsd2si %xmm2, %r8d
cvttpd2dq %xmm2, %xmm0
cvtdq2pd %xmm0, %xmm0
movapd %xmm2, %xmm3
subsd %xmm0, %xmm3
movslq %r8d, %r8
movsd (%rax,%r8,8), %xmm0
ucomisd %xmm3, %xmm0
movq %rdi, %r9
cmovbq %rbx, %r9
movq (%r9), %r9
movsd (%r9,%r8,8), %xmm0
movsd %xmm0, (%rcx,%rdx,8)
subsd %xmm1, %xmm2
incq %rdx
cmpq %rsi, %rdx
jl 0x406c
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/gibsjose[P]VirtualMemorySimulation/Simulation.cpp
// Function: main
int main(int argc, char **argv) {
    Simulation simulation;

    std::cout << "Virtual Memory Simulation" << std::endl;

    //Get the input file from the user
    std::string filepath;
    std::cout << "Input file: ";
    std::cin >> filepath;

    //Remove whitespace/newlines
    StringUtilities::Trim(filepath);

    simulation.SetInputFilepath(filepath);
    simulation.Run();

    std::cout << std::endl << "Simulation Complete:" << std::endl;

    simulation.DisplayStatistics();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
leaq 0x60(%rsp), %rdi
callq 0x338a
movq 0x95bf(%rip), %rbx      # 0xbfc8
leaq 0x564e(%rip), %rsi      # 0x805e
movl $0x19, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq 0x958d(%rip), %rdi      # 0xbfc8
callq 0x2030
movq %rax, %rdi
callq 0x2140
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movq 0x9564(%rip), %rbx      # 0xbfc8
leaq 0x560d(%rip), %rsi      # 0x8078
movl $0xc, %edx
movq %rbx, %rdi
callq 0x2200
movq 0x9559(%rip), %rdi      # 0xbfd8
movq %rsp, %rsi
callq 0x2240
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x4d1e
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x33f4
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ad0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x2ae7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21d0
leaq 0x60(%rsp), %rdi
movq %rsp, %rsi
callq 0x20f0
leaq 0x60(%rsp), %rdi
callq 0x2c4a
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq 0x94ac(%rip), %rdi      # 0xbfc8
callq 0x2030
movq %rax, %rdi
callq 0x2140
movq %rax, %rbx
leaq 0x5552(%rip), %rsi      # 0x8085
movl $0x14, %edx
movq %rax, %rdi
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
leaq 0x60(%rsp), %rdi
callq 0x334e
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x2b87
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
leaq 0xb0(%rsp), %rbx
leaq 0x140(%rsp), %rdi
callq 0x3d36
leaq 0x110(%rsp), %rdi
callq 0x3d8e
leaq 0xe0(%rsp), %rdi
callq 0x3d8e
movq %rbx, %rdi
callq 0x3d8e
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x3da2
movq -0x20(%rbx), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2be9
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x21d0
xorl %eax, %eax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x2c1c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x2c1c
movq %rax, %rbx
jmp 0x2c32
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x2c32
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
leaq 0x60(%rsp), %rdi
callq 0x34ba
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O3/gibsjose[P]VirtualMemorySimulation/./StringUtilities.h
// Function: StringUtilities::SplitString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static std::vector<std::string> SplitString(std::string s, const std::string &delimiter) {
        size_t pos = 0;
        std::vector<std::string> tokens;

        bool debug = false;

        if(debug) std::cout << "s = " << s << ", delimiter = " << delimiter;

        while((pos = s.find(delimiter)) != std::string::npos) {
            if(debug) std::cout << "Found delimiter at pos = " << pos << std::endl;
            tokens.push_back(s.substr(0, pos));
            if(debug) std::cout << "Added token to vector: " << s.substr(0, pos) << std::endl;
            s.erase(0, pos + delimiter.length());
            if(debug) std::cout << "Erased token and delimiter" << std::endl;
        }

        if(debug) std::cout << "Adding last token to vector: " << s << std::endl;
        tokens.push_back(s);

        return tokens;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %r12
movq (%r15), %rsi
movq 0x8(%r15), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x22e0
cmpq $-0x1, %rax
je 0x35ae
movq %rax, %r13
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x21e0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4180
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x359b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
addq 0x8(%r15), %r13
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x2060
jmp 0x354f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4142
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x35eb
jmp 0x35eb
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x35ee
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x35ee
movq %rax, %r14
movq %rbx, %rdi
callq 0x35fe
movq %r14, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O3/gibsjose[P]VirtualMemorySimulation/./Memory.h
// Function: Memory::Memory()
Memory(void) {
        ram.clear();
        available.clear();
        free.clear();
        lru.clear();

        //Generate 16 available frames
        for(int i = 0; i < (MEM_SIZE / FRAME_SIZE); i++) {
            available.insert(i);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
xorl %ebp, %ebp
movl %ebp, 0x8(%rdi)
movq %rbp, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rbp, 0x28(%rdi)
leaq 0x30(%rdi), %r14
leaq 0x38(%rdi), %rax
movl %ebp, 0x38(%rdi)
movq %rbp, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movq %rbp, 0x58(%rdi)
leaq 0x60(%rdi), %r15
leaq 0x68(%rdi), %rax
movl %ebp, 0x68(%rdi)
movq %rbp, 0x70(%rdi)
movq %rax, 0x78(%rdi)
movq %rax, 0x80(%rdi)
leaq 0x90(%rdi), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%rdi)
movups %xmm0, 0x98(%rdi)
movups %xmm0, 0xa8(%rdi)
movups %xmm0, 0xb8(%rdi)
movups %xmm0, 0xc8(%rdi)
movq %rbp, 0xd8(%rdi)
movq %r12, %rdi
xorl %esi, %esi
callq 0x3a3c
movq %rbx, %rdi
callq 0x3bb4
movq %r14, %rdi
callq 0x3bb4
movq %r15, %rdi
callq 0x3bb4
movq %r12, %rdi
callq 0x39da
leaq 0x6(%rsp), %r13
movw %bp, 0x6(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x3c1e
incl %ebp
cmpl $0x10, %ebp
jne 0x3983
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
jmp 0x39b9
movq %rax, %r13
movq %r12, %rdi
callq 0x3d36
movq %r15, %rdi
callq 0x3d8e
movq %r14, %rdi
callq 0x3d8e
movq %rbx, %rdi
callq 0x3d8e
movq %r13, %rdi
callq 0x22f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/gibsjose[P]VirtualMemorySimulation/Memory.cpp
// Function: Memory::AvailableToRAM(unsigned short)
void Memory::AvailableToRAM(const uint16_t frame) {
    //Make sure it does not exist in the available list
    if(available.count(frame)) {
        available.erase(available.find(frame));
    }

    ram.insert(frame);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %esi, %eax
movq %rdi, %rbx
movw %ax, 0xe(%rsp)
movq 0x40(%rdi), %rcx
testq %rcx, %rcx
je 0x610d
leaq 0x30(%rbx), %rdi
leaq 0x38(%rbx), %rsi
movq %rcx, %r8
movq %rsi, %rdx
xorl %r9d, %r9d
cmpw %ax, 0x20(%r8)
setb %r9b
cmovaeq %r8, %rdx
movq 0x10(%r8,%r9,8), %r8
testq %r8, %r8
jne 0x60ba
cmpq %rsi, %rdx
je 0x610d
cmpw %ax, 0x20(%rdx)
ja 0x610d
movq %rsi, %rdx
xorl %r8d, %r8d
cmpw %ax, 0x20(%rcx)
setb %r8b
cmovaeq %rcx, %rdx
movq 0x10(%rcx,%r8,8), %rcx
testq %rcx, %rcx
jne 0x60e2
cmpq %rsi, %rdx
je 0x6108
cmpw %ax, 0x20(%rdx)
cmovbeq %rdx, %rsi
callq 0x65fa
leaq 0xe(%rsp), %rsi
movq %rbx, %rdi
callq 0x6636
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/gibsjose[P]VirtualMemorySimulation/Process.cpp
// Function: Process::Process()
Process::Process(void) {
    name.clear();
    references = 0;
    pageFaults = 0;
    size = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
addq $0x28, %rdi
callq 0x6c40
leaq 0x70(%rbx), %rax
xorl %ecx, %ecx
movl %ecx, 0x70(%rbx)
movq %rcx, 0x78(%rbx)
movq %rax, 0x80(%rbx)
movq %rax, 0x88(%rbx)
movq %rcx, 0x90(%rbx)
movq %rcx, 0x8(%rbx)
movq (%rbx), %rax
movb $0x0, (%rax)
movl %ecx, 0x20(%rbx)
movw $0x0, 0x24(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x6759
movq (%r15), %rsi
incq %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x22f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/gibsjose[P]VirtualMemorySimulation/Process.cpp
// Function: Process::Process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Process::Process(const std::string & name) {
    this->name = name;
    references = 0;
    pageFaults = 0;
    size = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x28(%rdi), %r14
movq %r14, %rdi
callq 0x6c40
leaq 0x70(%rbx), %rax
movl $0x0, 0x70(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x78(%rbx)
movq %rax, 0x80(%rbx)
movq %rax, 0x88(%rbx)
movq %rcx, 0x90(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20f0
movl $0x0, 0x20(%rbx)
movw $0x0, 0x24(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r15
leaq 0x68(%rbx), %rdi
callq 0x3d8e
movq %r14, %rdi
callq 0x4cf8
jmp 0x67f2
movq %rax, %r15
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x6806
movq (%r12), %rsi
incq %rsi
callq 0x21d0
movq %r15, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O3/gibsjose[P]VirtualMemorySimulation/Process.cpp
// Function: Process::PageAccess(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
uint16_t Process::PageAccess(const std::string & string) {
    //Decode the string into the page number
    uint16_t page = DecodePageNumber(string);

    //Add the referenced page number to the set
    pages.insert(page);

    //Determine the range of the page set (this is the size...)
    size = ComputeSize();

    //Increment number of references
    references++;

    return page;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x6b18
movzwl (%r14), %eax
leaq 0xe(%rsp), %r14
movw %ax, (%r14)
leaq 0x68(%rbx), %rdi
movq %r14, %rsi
callq 0x6636
movq 0x80(%rbx), %rdi
leaq 0x70(%rbx), %rsi
callq 0x6b93
movzwl 0x20(%rax), %eax
movw %ax, 0x24(%rbx)
incw 0x20(%rbx)
movzwl (%r14), %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/gibsjose[P]VirtualMemorySimulation/Process.cpp
// Function: Process::DecodePageNumber(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
uint16_t Process::DecodePageNumber(const std::string & string) {
    //Create a bitset from the string
    std::bitset<6> bitset(string);

    //Return and cast the integer representation of the bitset
    return (uint16_t)bitset.to_ulong();
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x6b18
movzwl (%rbx), %eax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gibsjose[P]VirtualMemorySimulation/PageTable.cpp
// Function: PageTable::EntryExists(unsigned short)
bool PageTable::EntryExists(const uint16_t page) {
    //Return true if the page entry exists AND is valid
    if(table.count(page)) {
        if(table[page].valid) {
            return true;
        }
    }

    return false;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xe(%rsp), %rax
movw %si, (%rax)
movq %rax, %rsi
callq 0x6dce
testq %rax, %rax
je 0x6d49
leaq 0xe(%rsp), %rsi
movq %rbx, %rdi
callq 0x6e30
movq %rax, %rcx
movb $0x1, %al
cmpb $0x0, 0x4(%rcx)
jne 0x6d4b
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/gibsjose[P]VirtualMemorySimulation/PageTable.cpp
// Function: PageTable::GetEntry(unsigned short)
PageTableEntry & PageTable::GetEntry(const uint16_t page) {
    //Returns the entry associated with the page, if it exists
    if(table.count(page)) {
        return table[page];
    } else {
        return invalid;
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xe(%rsp), %rax
movw %si, (%rax)
movq %rax, %rsi
callq 0x6dce
testq %rax, %rax
je 0x6dc1
leaq 0xe(%rsp), %rsi
movq %rbx, %rdi
callq 0x6e30
movq %rax, %rbx
jmp 0x6dc5
addq $0x38, %rbx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/Slexis-Works[P]texture-packing/texture-packing.cpp
// Function: showUsage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void showUsage(const std::string name) {
	std::cerr << "Utilisation : " << std::endl
			<< name << " --help" << std::endl
			<< "Affiche plus de détails" << std::endl
			<< name << " [--seed nombre] [--tmin tailleMin] [--tmax tailleMax] [--lt largeurTexture] [--ht hauteurTexture] [--sortie nomDossier] [--tests nombre] [algorithme(s)]" << std::endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x9b6c(%rip), %r14      # 0xeff0
leaq 0x5276(%rip), %rsi      # 0xa701
movl $0xe, %edx
movq %r14, %rdi
callq 0x2270
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rax, %rdi
callq 0x2270
movq %rax, %r14
leaq 0x5238(%rip), %rsi      # 0xa710
movl $0x7, %edx
movq %rax, %rdi
callq 0x2270
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq %rax, %r14
leaq 0x5202(%rip), %rsi      # 0xa718
movl $0x18, %edx
movq %rax, %rdi
callq 0x2270
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rax, %rdi
callq 0x2270
movq %rax, %rbx
leaq 0x51ce(%rip), %rsi      # 0xa731
movl $0x99, %edx
movq %rax, %rdi
callq 0x2270
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/samuel500[P]NEAT/population.cpp
// Function: Population::speciate()
void Population::speciate(){

	vector<Individual*>::iterator curInd;
	vector<Species*>::iterator spePtr;

	bool accepted;

	for(curInd=individuals.begin(); curInd!=individuals.end(); ++curInd){
		// cout << "spe1" << endl;

		accepted = false;
		if(species.size()==0){
			Species *new_species = new Species(*curInd);
			// cout << "spe2" << endl;

			species.push_back(new_species);
		}
		else{
			// cout << "spe3" << endl;

			for(spePtr=species.begin(); spePtr!=species.end(); ++spePtr){
				// cout << "spe4" << endl;

				accepted = (*spePtr)->add_member(*curInd);
				// cout << "spe5" << endl;

				if(accepted) break;
			}
			if(!accepted){
				// cout << "spe6" << endl;

				Species *new_species = new Species(*curInd);
				species.push_back(new_species);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r13
cmpq 0x8(%rdi), %r13
je 0x28bc
movq %rdi, %rbx
leaq 0x50(%rdi), %r14
leaq -0x30(%rbp), %r15
movq 0x50(%rbx), %r12
cmpq %r12, 0x58(%rbx)
je 0x2857
movq (%r12), %rdi
movq (%r13), %rsi
callq 0x463e
testb %al, %al
jne 0x28ae
addq $0x8, %r12
cmpq 0x58(%rbx), %r12
jne 0x2802
movl $0x48, %edi
callq 0x1100
movq %rax, %r12
movq (%r13), %rsi
movq %rax, %rdi
movsd 0x481b(%rip), %xmm0     # 0x7058
movaps %xmm0, %xmm1
movsd 0x4818(%rip), %xmm2     # 0x7060
movsd 0x4818(%rip), %xmm3     # 0x7068
callq 0x3e2e
jmp 0x288b
movl $0x48, %edi
callq 0x1100
movq %rax, %r12
movq (%r13), %rsi
movq %rax, %rdi
movsd 0x47e5(%rip), %xmm0     # 0x7058
movaps %xmm0, %xmm1
movsd 0x47e2(%rip), %xmm2     # 0x7060
movsd 0x47e2(%rip), %xmm3     # 0x7068
callq 0x3e2e
movq %r12, -0x30(%rbp)
movq 0x58(%rbx), %rsi
cmpq 0x60(%rbx), %rsi
je 0x28a3
movq %r12, (%rsi)
addq $0x8, 0x58(%rbx)
jmp 0x28ae
movq %r14, %rdi
movq %r15, %rdx
callq 0x3cce
addq $0x8, %r13
cmpq 0x8(%rbx), %r13
jne 0x27f8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28cd
movq %rax, %rbx
movl $0x48, %esi
movq %r12, %rdi
callq 0x1110
movq %rbx, %rdi
callq 0x11a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/samuel500[P]NEAT/population.cpp
// Function: Population::~Population()
Population::~Population(){
	// vector<Individual*>::iterator curInd;

	// for(curInd=individuals.begin(); curInd!=individuals.end(); ++curInd){
	// 	delete *curInd;
	// }
	// delete innov_num;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
testq %rdi, %rdi
je 0x2904
movq 0x60(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x2919
movq 0x40(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x292e
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2948
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1110
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/samuel500[P]NEAT/species.cpp
// Function: Species::calc_n_offspring()
int Species::calc_n_offspring(){
	vector<Individual*>::iterator indPtr;

	n_offspring = 0;

	double double_offspring = 0.;

	for(indPtr=members.begin(); indPtr!=members.end(); indPtr++){

		double_offspring += (*indPtr)->est_n_offspring;
	}

	n_offspring = (int) floor(double_offspring);

	return n_offspring;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
xorpd %xmm0, %xmm0
cmpq %rcx, %rax
je 0x46b1
movq (%rax), %rdx
addsd 0x10(%rdx), %xmm0
addq $0x8, %rax
jmp 0x469e
callq 0x1180
cvttsd2si %xmm0, %eax
movl %eax, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/samuel500[P]NEAT/species.cpp
// Function: Species::~Species()
Species::~Species(){

	vector<Individual*>::iterator indPtr;

	rep = NULL;

	for(indPtr=members.begin(); indPtr!=members.end(); indPtr++){

	 	*indPtr = NULL;
	}
}

// Assembly:
movq $0x0, 0x18(%rdi)
movq (%rdi), %rax
cmpq 0x8(%rdi), %rax
je 0x4a5a
pushq %rbp
movq %rsp, %rbp
movq $0x0, (%rax)
addq $0x8, %rax
cmpq 0x8(%rdi), %rax
jne 0x4a45
movq (%rdi), %rax
popq %rbp
testq %rax, %rax
je 0x4a6e
movq 0x10(%rdi), %rsi
subq %rax, %rsi
movq %rax, %rdi
jmp 0x1110
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/samuel500[P]NEAT/individual.cpp
// Function: Individual::activate(std::vector<double, std::allocator<double>>)
bool Individual::activate(vector<double> input){

	if(input.size() != inputs.size()){
		cout << "invalid input size" << endl;
		return false;
	}

	for(int i=0; i<inputs.size(); i++){
		inputs[i]->firing = input[i];
		inputs[i]->activated = true;
	}

	// messy, but it looks like it's the way to go 
	// (see FAQ: https://www.cs.ucf.edu/~kstanley/neat.html#FAQ1)
	int max_loops = 20; 
	int loops = 0;
	bool outputs_activated = false;
	while(!outputs_activated || loops<max_loops){
		outputs_activated = true;
		for(int i=*in_size; i<nodes.size(); i++){
			nodes[i]->activate();
			
			if(nodes[i]->node_type==OUTPUT && !nodes[i]->activated){
				outputs_activated = false;
			}
		}
		loops++;

	}

	if(!outputs_activated) {
		cout<<"activation pb" << endl;
		return false;
	}
	else return true;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %rax
movq 0x8(%rsi), %rsi
subq %rax, %rsi
movq 0x30(%rdi), %rcx
movq 0x38(%rdi), %rdx
movq %rdx, %r15
subq %rcx, %r15
movq %rsi, -0x30(%rbp)
cmpq %r15, %rsi
jne 0x5b4f
movq %rdi, %rbx
cmpq %rcx, %rdx
je 0x5ae4
movq %r15, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %esi, %esi
movsd (%rax,%rsi,8), %xmm0
movq (%rcx,%rsi,8), %rdi
movsd %xmm0, 0x10(%rdi)
movb $0x1, 0xc(%rdi)
incq %rsi
cmpq %rsi, %rdx
jne 0x5aca
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
xorl %r12d, %r12d
movq 0x80(%rbx), %rdx
movslq (%rdx), %r14
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movb $0x1, %r13b
cmpq %r14, %rdx
jbe 0x5b38
movq (%rax,%r14,8), %rdi
callq 0x654a
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rcx
cmpl $0x1, (%rcx)
jne 0x5b25
andb 0xc(%rcx), %r13b
incq %r14
movq 0x20(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
jmp 0x5b06
cmpl $0x13, %r12d
leal 0x1(%r12), %edx
setae %sil
movl %edx, %r12d
testb %sil, %r13b
je 0x5aef
jmp 0x5b91
movq 0x4482(%rip), %rbx      # 0x9fd8
leaq 0x16bb(%rip), %rsi      # 0x7218
movl $0x12, %edx
movq %rbx, %rdi
callq 0x1120
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
cmpq %r15, -0x30(%rbp)
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/samuel500[P]NEAT/individual.cpp
// Function: Individual::get_outputs()
vector<double> Individual::get_outputs(){
	
	vector<double> out;

	vector<Node*>::iterator nodePtr;
	for(nodePtr=outputs.begin(); nodePtr != outputs.end(); ++nodePtr){

		out.push_back((*nodePtr)->firing);

	}
	return out;


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x48(%rsi), %r15
movq 0x50(%rsi), %rax
cmpq %rax, %r15
je 0x5c0b
movq %rsi, %r14
movq (%r15), %rdx
addq $0x10, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x5bf6
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x5c02
movq %rbx, %rdi
callq 0x63ae
movq 0x50(%r14), %rax
addq $0x8, %r15
cmpq %rax, %r15
jne 0x5bd3
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x5c30
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq %r14, %rdi
callq 0x11a0
// File: /workspace/github_cpp_makefile_star2_O3/samuel500[P]NEAT/individual.cpp
// Function: Individual::mutate(std::vector<Node*, std::allocator<Node*>>*, std::vector<Connection*, std::allocator<Connection*>>*)
void Individual::mutate(vector<Node*> *all_nodes, vector<Connection*> *all_connections){

	if(randdouble(0.,1.)<0.8){
		// cout << "mu1" <<endl;
		mutate_weights();
	}
	if(randdouble(0.,1.)<0.03){
		// cout << "mu2" <<endl;

		mutate_add_node(all_nodes, all_connections);
	}
	if(randdouble(0.,1.)<0.05){
		// cout << "mu3" <<endl;

		mutate_add_connection(all_nodes, all_connections);
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x1040
cvtsi2sd %eax, %xmm0
divsd 0x1568(%rip), %xmm0     # 0x71f0
movsd 0x1568(%rip), %xmm1     # 0x71f8
ucomisd %xmm0, %xmm1
jbe 0x5c9e
movq %r14, %rdi
callq 0x5d0e
callq 0x1040
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x153e(%rip), %xmm0     # 0x71f0
movsd 0x1546(%rip), %xmm1     # 0x7200
ucomisd %xmm0, %xmm1
jbe 0x5ccb
movq %r14, %rdi
movq %r15, %rsi
callq 0x5d5e
callq 0x1040
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x1511(%rip), %xmm0     # 0x71f0
movsd 0x1521(%rip), %xmm1     # 0x7208
ucomisd %xmm0, %xmm1
jbe 0x5d02
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6022
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/samuel500[P]NEAT/individual.cpp
// Function: Individual::mutate_weights()
void Individual::mutate_weights(){
	vector<Connection*>::iterator conPtr;

	for(conPtr=connections.begin(); conPtr != connections.end(); ++conPtr){

		// uniform perturbation
		if(randdouble(0.,1.)>0.1){
			(*conPtr)->perturb_weight();
		}
		// assign new random value
		else{
			(*conPtr)->reset_weight();
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x60(%rdi), %r14
cmpq 0x68(%rdi), %r14
je 0x5d59
movq %rdi, %rbx
callq 0x1040
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x14ba(%rip), %xmm0     # 0x71f0
ucomisd 0x14d2(%rip), %xmm0     # 0x7210
movq (%r14), %rdi
jbe 0x5d4a
callq 0x6778
jmp 0x5d4f
callq 0x6742
addq $0x8, %r14
cmpq 0x68(%rbx), %r14
jne 0x5d22
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/samuel500[P]NEAT/individual.cpp
// Function: Individual::~Individual()
Individual::~Individual(){

	vector<Node*>::iterator curNode;
	vector<Connection*>::iterator curCon;

	for(curNode=nodes.begin(); curNode!=nodes.end(); ++curNode){
		delete *curNode;
	}

	for(curCon=connections.begin(); curCon!=connections.end(); ++curCon){
		delete *curCon;
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %r15
cmpq 0x20(%rdi), %r15
je 0x627c
movq (%r15), %r14
testq %r14, %r14
je 0x6265
movq %r14, %rdi
callq 0x6622
movl $0x48, %esi
movq %r14, %rdi
callq 0x1110
addq $0x8, %r15
cmpq 0x20(%rbx), %r15
jne 0x6255
movq 0x60(%rbx), %r14
cmpq 0x68(%rbx), %r14
je 0x62b1
movq (%r14), %r15
testq %r15, %r15
je 0x6296
movq %r15, %rdi
callq 0x67d4
movl $0x28, %esi
movq %r15, %rdi
callq 0x1110
addq $0x8, %r14
cmpq 0x68(%rbx), %r14
jne 0x6286
movq 0x60(%rbx), %r14
testq %r14, %r14
je 0x62c5
movq 0x70(%rbx), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x1110
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x62da
movq 0x58(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x62ef
movq 0x40(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x630e
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1110
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/samuel500[P]NEAT/node.cpp
// Function: Node::activate()
bool Node::activate(){

	firing = 0.;

	vector<Connection*>::iterator conPtr;

	bool any_active_input_con = false;
	bool any_active_input_node = false;
	for(conPtr=in_connections.begin(); conPtr != in_connections.end(); ++conPtr){

		if((*conPtr)->is_active){
			any_active_input_con = true;
			if(((*conPtr)->in_node->activated)){
				any_active_input_node = true;
			// 	return false;
			}
		}
	}
	if(!any_active_input_con){
		// cout << "node not activated" <<endl;
		return false; 
	}

	for(conPtr=in_connections.begin(); conPtr != in_connections.end(); ++conPtr){

		firing += (*conPtr)->in_node->firing * (*conPtr)->weight;
	}
	
	if(any_active_input_node){
		firing = sigmoid(firing);
		activated = true;

	}


	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq $0x0, 0x10(%rdi)
movq 0x18(%rdi), %rcx
movq 0x20(%rdi), %rdx
cmpq %rdx, %rcx
je 0x65c5
movq %rdi, %r14
xorl %ebx, %ebx
xorl %eax, %eax
movq %rcx, %rsi
movq (%rsi), %rdi
cmpb $0x1, 0x18(%rdi)
jne 0x6581
movq (%rdi), %rdi
orb 0xc(%rdi), %al
movb $0x1, %bl
addq $0x8, %rsi
cmpq %rdx, %rsi
jne 0x6570
testb $0x1, %bl
je 0x65c5
cmpq %rdx, %rcx
je 0x65d1
xorpd %xmm0, %xmm0
movq (%rcx), %rsi
movq (%rsi), %rdi
movsd 0x10(%rdi), %xmm1
mulsd 0x10(%rsi), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%r14)
addq $0x8, %rcx
cmpq %rdx, %rcx
jne 0x6598
mulsd 0xc85(%rip), %xmm0      # 0x7248
jmp 0x65d9
xorl %ebx, %ebx
andb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movsd 0xc77(%rip), %xmm0      # 0x7250
testb $0x1, %al
je 0x65c7
callq 0x11b0
movsd 0xa6e(%rip), %xmm1      # 0x7058
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%r14)
movb $0x1, 0xc(%r14)
jmp 0x65c7
nop
// File: /workspace/github_cpp_makefile_star2_O3/samuel500[P]NEAT/connection.cpp
// Function: Connection::Connection(Node*, Node*, int, int)
Connection::Connection(Node *inode, Node *onode, int hist_marking, int creation_gen): hist_marking(hist_marking), creation_gen(creation_gen){

	in_node = new Node;
	in_node = inode;

	out_node = new Node;
	out_node = onode;

	is_active = true;

	in_node->out_connections.push_back(this);
	out_node->in_connections.push_back(this);

	weight = randdouble(-1., 1.);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movl %ecx, 0x1c(%rdi)
movl %r8d, 0x20(%rdi)
movl $0x48, %edi
callq 0x1100
movq %rax, %r14
movq %rax, %rdi
callq 0x64fc
movq %r12, (%rbx)
movl $0x48, %edi
callq 0x1100
movq %rax, %r14
movq %rax, %rdi
callq 0x64fc
movq %r15, 0x8(%rbx)
movb $0x1, 0x18(%rbx)
movq (%rbx), %rdi
addq $0x30, %rdi
leaq -0x28(%rbp), %r14
movq %rbx, (%r14)
movq %r14, %rsi
callq 0x67e0
movq 0x8(%rbx), %rdi
addq $0x18, %rdi
movq %rbx, (%r14)
leaq -0x28(%rbp), %rsi
callq 0x67e0
callq 0x1040
cvtsi2sd %eax, %xmm0
divsd 0xaf7(%rip), %xmm0      # 0x71f0
addsd %xmm0, %xmm0
addsd 0xb53(%rip), %xmm0      # 0x7258
movsd %xmm0, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6719
movq %rax, %rbx
movl $0x48, %esi
movq %r14, %rdi
callq 0x1110
movq %rbx, %rdi
callq 0x11a0
nop