LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Game.cpp
// Function: Game::printMonsterArray()
void Game::printMonsterArray()
{
    std::cout << "\nThe monsters:\n";
    for (int i=0; i<num_monsters; i++)
    {
        std::cout << "INDEX #" << i << std::endl;
        monster_database[i].print();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x3a8d(%rip), %rdi      # 0x7fc8
leaq 0x10d5(%rip), %rsi      # 0x5617
movl $0xf, %edx
callq 0x2180
cmpl $0x0, 0x4(%rbx)
jle 0x45c7
leaq 0x130(%rbx), %r14
xorl %r15d, %r15d
movq 0x3a65(%rip), %r12      # 0x7fc8
leaq 0x10a5(%rip), %r13      # 0x560f
movl $0x7, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x2180
movq %r12, %rdi
movl %r15d, %esi
callq 0x2220
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x3264
incq %r15
movslq 0x4(%rbx), %rax
addq $0x68, %r14
cmpq %rax, %r15
jl 0x456a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Game.cpp
// Function: Game::createHeroParty()
void Game::createHeroParty()
{
    int index;

    for (int i=0; i<hero_party_size; i++)
    {
        std::cout << "Enter index of hero (from the database): ";
        std::cin >> index;

        the_heros->setMember(i, &hero_database[index]);
    }
}

// Assembly:
cmpl $0x0, 0x8(%rdi)
jle 0x4789
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
xorl %ebp, %ebp
leaq 0xefc(%rip), %r15       # 0x5627
movq 0x38a6(%rip), %r12      # 0x7fd8
leaq 0x4(%rsp), %r13
movl $0x29, %edx
movq 0x3885(%rip), %rdi      # 0x7fc8
movq %r15, %rsi
callq 0x2180
movq %r12, %rdi
movq %r13, %rsi
callq 0x20a0
movq 0x2d8(%rbx), %rdi
movslq 0x4(%rsp), %rax
leaq (%rax,%rax,2), %rdx
shlq $0x5, %rdx
addq %r14, %rdx
movl %ebp, %esi
callq 0x359e
incl %ebp
cmpl 0x8(%rbx), %ebp
jl 0x4737
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/Game.cpp
// Function: Game::createMonsterParty()
void Game::createMonsterParty()
{
    int index;

    for (int i=0; i<monster_party_size; i++)
    {
        std::cout << "Enter index of the monster (from the database): ";
        std::cin >> index;

        //the_monsters->setMember(i, &monster_database[index]);
        the_monsters->setMember(i, new Monster(monster_database[index]));
    }
}

// Assembly:
cmpl $0x0, 0xc(%rdi)
jle 0x4824
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x130(%rdi), %r15
xorl %ebp, %ebp
movq 0x3826(%rip), %r12      # 0x7fd8
leaq 0x4(%rsp), %r13
movl $0x30, %edx
movq 0x3805(%rip), %rdi      # 0x7fc8
leaq 0xe87(%rip), %rsi       # 0x5651
callq 0x2180
movq %r12, %rdi
movq %r13, %rsi
callq 0x20a0
movq 0x2e0(%rbx), %r14
movl $0x68, %edi
callq 0x2160
movslq 0x4(%rsp), %rcx
imulq $0x68, %rcx, %rsi
addq %r15, %rsi
movl $0xd, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x359e
incl %ebp
cmpl 0xc(%rbx), %ebp
jl 0x47b7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/./FileIOTemplate.hpp
// Function: FileIOTemplate<Hero>::readData(Hero*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int FileIOTemplate<T>::readData(T data_array[], size_t items, std::string file_name)
{
    FILE * file_ptr = fopen(file_name.c_str(), "rb");
    size_t items_read = 0;

    if (file_ptr)
    {
        // Read up to the maximum size of the array of elements
        items_read = fread(data_array, sizeof (T), items, file_ptr);
        fclose(file_ptr);
    }
    return items_read;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdx), %rdi
leaq 0xe47(%rip), %rsi       # 0x5682
callq 0x2190
testq %rax, %rax
je 0x4868
movq %rax, %r15
movl $0x60, %esi
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x21e0
movq %rax, %rbx
movq %r15, %rdi
callq 0x2150
jmp 0x486a
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/./FileIOTemplate.hpp
// Function: FileIOTemplate<Hero>::writeNewData(Hero&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void FileIOTemplate<T>::writeNewData(T & data_object, std::string file_name)
{
    FILE * file_ptr = nullptr;

    data_object.inputData();
    file_ptr = openAndCheck(file_name, "ab");
    fwrite(&data_object, sizeof (T), 1, file_ptr);
    fclose(file_ptr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2f84
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x3468
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xd83(%rip), %rsi       # 0x5685
leaq 0xd7e(%rip), %rdx       # 0x5687
leaq 0x8(%rsp), %rdi
callq 0x2dba
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4ab6
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x493c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2170
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x4953
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2170
movl $0x60, %esi
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rcx
callq 0x2250
movq %r14, %rdi
callq 0x2150
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x499b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x499b
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x49b2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/./FileIOTemplate.hpp
// Function: FileIOTemplate<Hero>::openAndCheck(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
FILE * FileIOTemplate<T>::openAndCheck(std::string file_name, std::string mode)
{
    FILE * file_ptr = nullptr;

    // Open the file. Convert C++ strings to C arrays of characters for the parameters
    file_ptr = fopen(file_name.c_str(), mode.c_str());
    if (file_ptr == nullptr)
    {
        std::cout << "Error: Unable to open file '" << file_name << "'!\n";
        exit(1);
    }
    return file_ptr;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq (%rsi), %rsi
callq 0x2190
testq %rax, %rax
je 0x4acc
popq %rbx
retq
movq 0x34f5(%rip), %rdi      # 0x7fc8
leaq 0xbae(%rip), %rsi       # 0x5688
callq 0x2140
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2100
leaq 0xbb4(%rip), %rsi       # 0x56a5
movq %rax, %rdi
callq 0x2140
movl $0x1, %edi
callq 0x21a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/gilecheverria[P]UP_Battle_Project/battle_game.cpp
// Function: main
int main()
{
    Game test_game;

    std::cout << "=== RPG BATTLE GAME PROGRAM ===" << std::endl;
    test_game.gameMenu();

    return 0;
}

// Assembly:
pushq %rbx
subq $0x2f0, %rsp            # imm = 0x2F0
leaq 0x8(%rsp), %rdi
callq 0x3ef4
movq 0x345b(%rip), %rbx      # 0x7fc8
leaq 0xb35(%rip), %rsi       # 0x56a9
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x2180
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq 0x3429(%rip), %rdi      # 0x7fc8
callq 0x2040
movq %rax, %rdi
callq 0x20b0
leaq 0x8(%rsp), %rdi
callq 0x41be
leaq 0x8(%rsp), %rdi
callq 0x413c
xorl %eax, %eax
addq $0x2f0, %rsp            # imm = 0x2F0
popq %rbx
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x413c
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O1/shreyas-gopalakrishna[P]Concurrent-Skip-list/benchmark.cpp
// Function: show_usage()
void show_usage(){
	cout << "Usage: \n\n" ;
	cout << "./benchmark [--name] -i <max_number> -t <num_threads> --benchmark=<insert, delete, search, range, all_operations, high_contention, low_contention> [--help] \n" ;
	cout << "--name                         Prints full name \n" ;
	cout << "-i <max_number>                Numbers from 0 to max_number are inserted into skip list, subset is chosen for get, delete, and range \n" ;
	cout << "-t <num_threads>               Max number of threads to use \n" ;
	cout << "--benchmark=<insert>           Performs multithreaded insert based on input \n" ;
	cout << "--benchmark=<delete>           Performs multithreaded delete based on input \n" ;
	cout << "--benchmark=<search>           Performs multithreaded search based on input \n" ;
	cout << "--benchmark=<range>            Performs multithreaded range based on input \n" ;
	cout << "--benchmark=<all_operations>   Performs multithreaded all operations \n" ;
	cout << "--benchmark=<high_contention>  Simulates high contention \n" ;
	cout << "--benchmark=<low_contention>   Simulates low contention \n" ;
    cout << "--help                         Prints the usage of the program \n"; 
    cout << "\n[ max_number must be between INT_MIN and INT_MAX and exclusive of INT_MIN and INT_MAX ]\n";
	exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbx
movq 0x8a0c(%rip), %rbx      # 0xafd0
leaq 0x4a81(%rip), %rsi      # 0x704c
movq %rbx, %rdi
callq 0x2200
leaq 0x4a7c(%rip), %rsi      # 0x7056
movq %rbx, %rdi
callq 0x2200
leaq 0x4b0b(%rip), %rsi      # 0x70f4
movq %rbx, %rdi
callq 0x2200
leaq 0x4b2e(%rip), %rsi      # 0x7126
movq %rbx, %rdi
callq 0x2200
leaq 0x4ba6(%rip), %rsi      # 0x71ad
movq %rbx, %rdi
callq 0x2200
leaq 0x4bd5(%rip), %rsi      # 0x71eb
movq %rbx, %rdi
callq 0x2200
leaq 0x4c14(%rip), %rsi      # 0x7239
movq %rbx, %rdi
callq 0x2200
leaq 0x4c53(%rip), %rsi      # 0x7287
movq %rbx, %rdi
callq 0x2200
leaq 0x4c92(%rip), %rsi      # 0x72d5
movq %rbx, %rdi
callq 0x2200
leaq 0x4cd0(%rip), %rsi      # 0x7322
movq %rbx, %rdi
callq 0x2200
leaq 0x4d08(%rip), %rsi      # 0x7369
movq %rbx, %rdi
callq 0x2200
leaq 0x4d34(%rip), %rsi      # 0x73a4
movq %rbx, %rdi
callq 0x2200
leaq 0x4d5f(%rip), %rsi      # 0x73de
movq %rbx, %rdi
callq 0x2200
leaq 0x4d91(%rip), %rsi      # 0x741f
movq %rbx, %rdi
callq 0x2200
movl $0x1, %edi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O1/shreyas-gopalakrishna[P]Concurrent-Skip-list/benchmark.cpp
// Function: show_elapsed_time()
void show_elapsed_time(){
    unsigned long long elapsed_ns;
	elapsed_ns = (end_time.tv_sec-start_time.tv_sec)*1000000000 + (end_time.tv_nsec-start_time.tv_nsec);
	printf("Elapsed (ns): %llu\n",elapsed_ns);
	double elapsed_s = ((double)elapsed_ns)/1000000000.0;
	printf("Elapsed (s): %lf\n",elapsed_s);
}

// Assembly:
pushq %rbx
movq 0x8be8(%rip), %rax      # 0xb290
subq 0x8bd1(%rip), %rax      # 0xb280
imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00
movq 0x8bdb(%rip), %rbx      # 0xb298
subq 0x8bc4(%rip), %rbx      # 0xb288
addq %rax, %rbx
leaq 0x4dab(%rip), %rdi      # 0x7479
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2050
movq %rbx, %xmm1
punpckldq 0x492b(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x4933(%rip), %xmm1     # 0x7020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
divsd 0x493f(%rip), %xmm0     # 0x7040
leaq 0x4d85(%rip), %rdi      # 0x748d
movb $0x1, %al
popq %rbx
jmp 0x2050
// File: /workspace/github_cpp_makefile_star2_O1/shreyas-gopalakrishna[P]Concurrent-Skip-list/benchmark.cpp
// Function: generate_input(int)
void generate_input(int max_number){
    // generating insert data
    for(int i = 1; i <= max_number; i++){
        numbers_insert.push_back(i);
    }

    // generating delete data
    for(size_t i = 0; i < numbers_insert.size(); i++){
        numbers_delete.push_back(numbers_insert[i]);
    }

    // generating search data
    for(size_t i = 0; i < numbers_insert.size(); i++){
        numbers_get.push_back(numbers_insert[i]);
    }

    // generating range data
    for(size_t i = 0; i < num_threads; i++){
        int a = (rand() % static_cast<int>(max_number + 1));
        int b = a + (rand() % static_cast<int>(max_number - a + 1));
        numbers_range.push_back(make_pair(a,b));
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movl $0x1, 0x4(%rsp)
testl %edi, %edi
jle 0x2775
movl $0x1, %eax
leaq 0x8b69(%rip), %r14      # 0xb2a0
leaq 0x4(%rsp), %r15
movq 0x8b65(%rip), %rsi      # 0xb2a8
cmpq 0x8b66(%rip), %rsi      # 0xb2b0
je 0x275b
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8b4f(%rip)      # 0xb2a8
jmp 0x2766
movq %r14, %rdi
movq %r15, %rdx
callq 0x41f8
movl 0x4(%rsp), %ecx
leal 0x1(%rcx), %eax
movl %eax, 0x4(%rsp)
cmpl %ebx, %ecx
jl 0x273c
movq 0x8b24(%rip), %rdx      # 0xb2a0
cmpq %rdx, 0x8b25(%rip)      # 0xb2a8
je 0x27df
xorl %r15d, %r15d
leaq 0x8b29(%rip), %r14      # 0xb2b8
xorl %r12d, %r12d
addq %r15, %rdx
movq 0x8b24(%rip), %rsi      # 0xb2c0
cmpq 0x8b25(%rip), %rsi      # 0xb2c8
je 0x27b6
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8b0c(%rip)      # 0xb2c0
jmp 0x27be
movq %r14, %rdi
callq 0x41f8
incq %r12
movq 0x8ae0(%rip), %rax      # 0xb2a8
movq 0x8ad1(%rip), %rdx      # 0xb2a0
subq %rdx, %rax
sarq $0x2, %rax
addq $0x4, %r15
cmpq %rax, %r12
jb 0x2792
movq 0x8aba(%rip), %rdx      # 0xb2a0
cmpq %rdx, 0x8abb(%rip)      # 0xb2a8
je 0x2849
xorl %r15d, %r15d
leaq 0x8ad7(%rip), %r14      # 0xb2d0
xorl %r12d, %r12d
addq %r15, %rdx
movq 0x8ad2(%rip), %rsi      # 0xb2d8
cmpq 0x8ad3(%rip), %rsi      # 0xb2e0
je 0x2820
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8aba(%rip)      # 0xb2d8
jmp 0x2828
movq %r14, %rdi
callq 0x41f8
incq %r12
movq 0x8a76(%rip), %rax      # 0xb2a8
movq 0x8a67(%rip), %rdx      # 0xb2a0
subq %rdx, %rax
sarq $0x2, %rax
addq $0x4, %r15
cmpq %rax, %r12
jb 0x27fc
cmpq $0x0, 0x896f(%rip)      # 0xb1c0
je 0x28a2
incl %ebx
xorl %r13d, %r13d
leaq 0x8a89(%rip), %r14      # 0xb2e8
leaq 0x8(%rsp), %r15
callq 0x2070
cltd
idivl %ebx
movl %edx, %r12d
callq 0x2070
movl %ebx, %ecx
subl %r12d, %ecx
cltd
idivl %ecx
addl %r12d, %edx
shlq $0x20, %rdx
orq %rdx, %r12
movq %r12, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x4334
incq %r13
cmpq 0x8920(%rip), %r13      # 0xb1c0
jb 0x2864
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/shreyas-gopalakrishna[P]Concurrent-Skip-list/benchmark.cpp
// Function: low_contention_benchmark()
void skiplist_remove(size_t start, size_t end){
    if(end >= numbers_delete.size()) end = numbers_delete.size();
    if(start == end) skiplist.remove(numbers_delete[start]);
    for(size_t i = start; i < end; i++){
        skiplist.remove(numbers_delete[i]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpq $0x0, 0x7b7f(%rip)      # 0xb1c8
je 0x3696
movl $0x1, %r15d
leaq 0x7c48(%rip), %rbx      # 0xb2a0
movq %rsp, %r14
movl %r15d, (%rsp)
movq 0x7c42(%rip), %rsi      # 0xb2a8
cmpq 0x7c43(%rip), %rsi      # 0xb2b0
je 0x367f
movl %r15d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x7c2b(%rip)      # 0xb2a8
jmp 0x368a
movq %rbx, %rdi
movq %r14, %rdx
callq 0x473e
incq %r15
cmpq 0x7b34(%rip), %r15      # 0xb1c8
jbe 0x365b
movq 0x7c0b(%rip), %rsi      # 0xb2a8
subq 0x7bfc(%rip), %rsi      # 0xb2a0
shrq $0x2, %rsi
movq %rsp, %rdi
movss 0x3995(%rip), %xmm0     # 0x7048
callq 0x4ddc
movq %rsp, %rbx
movups (%rbx), %xmm0
movups %xmm0, 0x7bab(%rip)     # 0xb270
movq %rbx, %rdi
callq 0x5dca
movq 0x7bd4(%rip), %rcx      # 0xb2a8
movq 0x7bc5(%rip), %rdx      # 0xb2a0
movq 0x7ade(%rip), %rax      # 0xb1c0
movq $0x0, (%rbx)
subq %rdx, %rcx
je 0x37b8
sarq $0x2, %rcx
js 0x3702
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
jmp 0x371a
movq %rcx, %rdx
shrq %rdx
andl $0x1, %ecx
orq %rdx, %rcx
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
testq %rax, %rax
js 0x3726
cvtsi2ss %rax, %xmm1
jmp 0x373b
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
divss %xmm1, %xmm0
callq 0x2120
cvttss2si %xmm0, %eax
movslq %eax, %rbp
xorl %eax, %eax
leaq -0xea4(%rip), %rbx      # 0x28b0
leaq 0x28(%rsp), %r14
movq %rsp, %r15
leaq 0x30(%rsp), %r12
leaq 0x10(%rsp), %r13
addq %rbp, %rax
movq %rax, 0x30(%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x3eec
movq %r13, %rdi
movq %r14, %rsi
callq 0x44d0
cmpq $0x0, 0x28(%rsp)
jne 0x3822
movq (%rsp), %rax
addq %rbp, %rax
movq %rax, (%rsp)
movq 0x7b00(%rip), %rcx      # 0xb2a8
subq 0x7af1(%rip), %rcx      # 0xb2a0
sarq $0x2, %rcx
cmpq %rcx, %rax
jb 0x3766
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r14
cmpq %r14, %rbx
je 0x37d5
movq %rbx, %rdi
callq 0x2310
addq $0x8, %rbx
jmp 0x37c2
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpq %rax, %rcx
je 0x37fb
movq %rax, %rdx
cmpq $0x0, (%rdx)
jne 0x3822
addq $0x8, %rdx
cmpq %rcx, %rdx
jne 0x37e7
movq %rax, 0x18(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x3f82
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3827
jmp 0x3827
jmp 0x3827
cmpq $0x0, 0x28(%rsp)
je 0x3827
callq 0x2080
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3f82
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O1/shreyas-gopalakrishna[P]Concurrent-Skip-list/benchmark.cpp
// Function: skiplist_combined_operations()
void skiplist_combined_operations(){

    int start = (rand() % static_cast<int>(numbers_insert.size() + 1));
    int end = start + (rand() % static_cast<int>(numbers_insert.size() - start + 1));
    skiplist_add(start, end);

    start = (rand() % static_cast<int>(numbers_delete.size() + 1));
    end = start + (rand() % static_cast<int>(numbers_delete.size() - start + 1));
    skiplist_remove(start, end);

    start = (rand() % static_cast<int>(numbers_get.size() + 1));
    end = start + (rand() % static_cast<int>(numbers_get.size() - start + 1));
    skiplist_search(start, end);

    start = (rand() % static_cast<int>(numbers_insert.size() + 1));
    end = start + (rand() % static_cast<int>(numbers_insert.size() - start + 1));
    skiplist_range(start, end);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
callq 0x2070
movq 0x80ef(%rip), %rcx      # 0xb2a8
subq 0x80e0(%rip), %rcx      # 0xb2a0
shrq $0x2, %rcx
incl %ecx
cltd
idivl %ecx
movl %edx, %ebx
callq 0x2070
movq 0x80d1(%rip), %rcx      # 0xb2a8
subq 0x80c2(%rip), %rcx      # 0xb2a0
shrq $0x2, %rcx
movslq %ebx, %rdi
subl %edi, %ecx
incl %ecx
cltd
idivl %ecx
addl %edi, %edx
movslq %edx, %rsi
callq 0x28b0
callq 0x2070
movq 0x80be(%rip), %rcx      # 0xb2c0
subq 0x80af(%rip), %rcx      # 0xb2b8
shrq $0x2, %rcx
incl %ecx
cltd
idivl %ecx
movl %edx, %ebx
callq 0x2070
movq 0x80a0(%rip), %rcx      # 0xb2c0
subq 0x8091(%rip), %rcx      # 0xb2b8
shrq $0x2, %rcx
movslq %ebx, %rdi
subl %edi, %ecx
incl %ecx
cltd
idivl %ecx
addl %edi, %edx
movslq %edx, %rsi
callq 0x2af8
callq 0x2070
movq 0x808d(%rip), %rcx      # 0xb2d8
subq 0x807e(%rip), %rcx      # 0xb2d0
shrq $0x2, %rcx
incl %ecx
cltd
idivl %ecx
movl %edx, %ebx
callq 0x2070
movq 0x806f(%rip), %rcx      # 0xb2d8
subq 0x8060(%rip), %rcx      # 0xb2d0
shrq $0x2, %rcx
movslq %ebx, %rdi
subl %edi, %ecx
incl %ecx
cltd
idivl %ecx
addl %edi, %edx
movslq %edx, %rsi
callq 0x2b5c
callq 0x2070
movq 0x8014(%rip), %rcx      # 0xb2a8
subq 0x8005(%rip), %rcx      # 0xb2a0
shrq $0x2, %rcx
incl %ecx
cltd
idivl %ecx
movl %edx, %ebx
callq 0x2070
movq 0x7ff6(%rip), %rcx      # 0xb2a8
subq 0x7fe7(%rip), %rcx      # 0xb2a0
shrq $0x2, %rcx
subl %ebx, %ecx
incl %ecx
cltd
idivl %ecx
leal (%rdx,%rbx), %ecx
leaq 0x7fa2(%rip), %rsi      # 0xb270
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl %ebx, %edx
callq 0x5a02
movq %r14, %rdi
callq 0x4176
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/shreyas-gopalakrishna[P]Concurrent-Skip-list/benchmark.cpp
// Function: high_contention_benchmark()
void high_contention_benchmark(){   
    skiplist = SkipList(3, 0.5);

    skiplist.add(1, "1");
    skiplist.add(2, "2");

    vector<thread> threads;

    for(size_t i = 0; i < num_threads; i++){
        threads.push_back(thread(high_contention_benchmark_thread));
    }
    for (auto &th : threads) {
        th.join();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
leaq 0x10(%rsp), %rbx
movss 0x3bc6(%rip), %xmm0     # 0x7048
movq %rbx, %rdi
movl $0x3, %esi
callq 0x4ddc
movups (%rbx), %xmm0
movups %xmm0, 0x7dd7(%rip)     # 0xb270
leaq 0x7dd0(%rip), %r14      # 0xb270
movq %rbx, %rdi
callq 0x5dca
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x3fe9(%rip), %rsi      # 0x74a1
leaq 0x3fe3(%rip), %rdx      # 0x74a2
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0x46ae
movq %r14, %rdi
movl $0x1, %esi
movq %rbx, %rdx
callq 0x4f94
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x34f3
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2220
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x3fa0(%rip), %rsi      # 0x74a3
leaq 0x3f9a(%rip), %rdx      # 0x74a4
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x46ae
leaq 0x7d52(%rip), %rdi      # 0xb270
movl $0x2, %esi
movq %rbx, %rdx
callq 0x4f94
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x3542
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2220
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpq $0x0, 0x7c65(%rip)      # 0xb1c0
je 0x359b
xorl %r12d, %r12d
leaq -0x1ba(%rip), %rbx      # 0x33ad
leaq 0x8(%rsp), %r14
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4052
movq %r15, %rdi
movq %r14, %rsi
callq 0x44d0
cmpq $0x0, 0x8(%rsp)
jne 0x3608
incq %r12
cmpq 0x7c27(%rip), %r12      # 0xb1c0
jb 0x3571
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r14
cmpq %r14, %rbx
je 0x35b8
movq %rbx, %rdi
callq 0x2310
addq $0x8, %rbx
jmp 0x35a5
leaq 0x10(%rsp), %rdi
callq 0x3f82
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x361a
movq 0x38(%rsp), %rsi
jmp 0x35f4
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x361a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2220
jmp 0x361a
jmp 0x360d
cmpq $0x0, 0x8(%rsp)
je 0x360d
callq 0x2080
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3f82
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O1/shreyas-gopalakrishna[P]Concurrent-Skip-list/node.cpp
// Function: Node::Node(int, int)
Node::Node(int key, int level){
    key_value_pair = KeyValuePair(key, "");
    next.resize(level + 1);
    for (size_t i = 0; i < next.size(); i++){
        next[i] = NULL;
    }
    top_level = level;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %rbx
callq 0x481c
leaq 0x28(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x28(%rbx)
movw $0x0, 0x68(%rbx)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2696(%rip), %rdx      # 0x7055
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x46ae
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl %ebp, %esi
callq 0x4832
leaq 0x30(%rsp), %rsi
movl -0x8(%rsi), %eax
movl %eax, (%rbx)
leaq 0x8(%rbx), %rdi
callq 0x2100
leaq 0x28(%rsp), %rdi
callq 0x48a8
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4a11
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2220
leal 0x1(%r15), %eax
movslq %eax, %rsi
movq %r14, %rdi
callq 0x4c42
movq 0x28(%rbx), %rax
cmpq %rax, 0x30(%rbx)
je 0x4a4b
xorl %ecx, %ecx
movq $0x0, (%rax,%rcx,8)
incq %rcx
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rdx, %rcx
jb 0x4a2c
movl %r15d, 0x6c(%rbx)
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4a89
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0x48a8
jmp 0x4a70
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4a8c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2220
jmp 0x4a8c
movq %rax, %r15
movq (%r14), %rdi
testq %rdi, %rdi
je 0x4aa0
movq 0x38(%rbx), %rsi
subq %rdi, %rsi
callq 0x2220
movq %rbx, %rdi
callq 0x48a8
movq %r15, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O1/shreyas-gopalakrishna[P]Concurrent-Skip-list/node.cpp
// Function: Node::Node(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
Node::Node(int key, string value, int level){
    key_value_pair = KeyValuePair(key, value);
    next.resize(level + 1);
    for (size_t i = 0; i < next.size(); i++){
        next[i] = NULL;
    }
    top_level = level;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %r15d
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %rbx
callq 0x481c
leaq 0x28(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x28(%rbx)
movw $0x0, 0x68(%rbx)
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x48c4
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movl %ebp, %esi
callq 0x4832
leaq 0x28(%rsp), %rsi
movl -0x8(%rsi), %eax
movl %eax, (%rbx)
leaq 0x8(%rbx), %rdi
callq 0x2100
leaq 0x20(%rsp), %rdi
callq 0x48a8
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x4b4a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2220
leal 0x1(%r15), %eax
movslq %eax, %rsi
movq %r14, %rdi
callq 0x4c42
movq 0x28(%rbx), %rax
cmpq %rax, 0x30(%rbx)
je 0x4b84
xorl %ecx, %ecx
movq $0x0, (%rax,%rcx,8)
incq %rcx
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rdx, %rcx
jb 0x4b65
movl %r15d, 0x6c(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4bc3
movq %rax, %r15
leaq 0x20(%rsp), %rdi
callq 0x48a8
jmp 0x4bab
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x4bc6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2220
jmp 0x4bc6
movq %rax, %r15
movq (%r14), %rdi
testq %rdi, %rdi
je 0x4bda
movq 0x38(%rbx), %rsi
subq %rdi, %rsi
callq 0x2220
movq %rbx, %rdi
callq 0x48a8
movq %r15, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O1/shreyas-gopalakrishna[P]Concurrent-Skip-list/skip_list.cpp
// Function: SkipList::SkipList(int, float)
SkipList::SkipList(int max_elements, float prob){
    max_level = (int) round(log(max_elements) / log(1/prob)) - 1;
    head = new Node(INT_MINI, max_level);
    tail = new Node(INT_MAXI, max_level);

    for (size_t i = 0; i < head->next.size(); i++) {
        head->next[i] = tail;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movss %xmm0, 0x4(%rsp)
movq %rdi, %rbx
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
callq 0x21a0
movsd %xmm0, 0x8(%rsp)
movss 0x2915(%rip), %xmm0     # 0x771c
divss 0x4(%rsp), %xmm0
callq 0x2340
cvtss2sd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x20c0
cvttsd2si %xmm0, %ebp
decl %ebp
movl %ebp, 0x64d3(%rip)      # 0xb304
movl $0x70, %edi
callq 0x2210
movq %rax, %r14
movq %rax, %rdi
movl $0x80000000, %esi       # imm = 0x80000000
movl %ebp, %edx
callq 0x4978
movq %r14, (%rbx)
movl $0x70, %edi
callq 0x2210
movq %rax, %r14
movl 0x64a1(%rip), %edx      # 0xb304
movq %rax, %rdi
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
callq 0x4978
movq %r14, 0x8(%rbx)
movq (%rbx), %rcx
movq 0x28(%rcx), %rax
cmpq %rax, 0x30(%rcx)
je 0x4ea5
xorl %ecx, %ecx
movq 0x8(%rbx), %rdx
movq %rdx, (%rax,%rcx,8)
incq %rcx
movq (%rbx), %rdx
movq 0x28(%rdx), %rax
movq 0x30(%rdx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rdx, %rcx
jb 0x4e83
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x4eb0
movq %rax, %rbx
movl $0x70, %esi
movq %r14, %rdi
callq 0x2220
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O1/shreyas-gopalakrishna[P]Concurrent-Skip-list/skip_list.cpp
// Function: SkipList::find(int, std::vector<Node*, std::allocator<Node*>>&, std::vector<Node*, std::allocator<Node*>>&)
int SkipList::find(int key, vector<Node*> &predecessors, vector<Node*> &successors) {
    int found = -1;
    Node *prev = head; 

    for (int level = max_level; level >= 0; level--){
        Node *curr = prev->next[level];

        while (key > curr->get_key()){
            prev = curr;
            curr = prev->next[level];
        }
        
        if(found == -1 && key == curr->get_key()){
            found = level;
        }

        predecessors[level] = prev;
        successors[level] = curr;
    }
    return found;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movslq 0x6426(%rip), %r13      # 0xb304
testq %r13, %r13
js 0x4f46
movq %rdx, %r14
movl %esi, %ebp
movq (%rdi), %rbx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq %rbx, %r12
movq %r12, %rbx
movq 0x28(%r12), %rax
movq (%rax,%r13,8), %r12
movq %r12, %rdi
callq 0x4bea
cmpl %ebp, %eax
jl 0x4ef4
cmpl $-0x1, %r15d
jne 0x4f26
movq %r12, %rdi
callq 0x4bea
cmpl %ebp, %eax
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmovel %r13d, %r15d
movq (%r14), %rax
movq %rbx, (%rax,%r13,8)
movq (%rsp), %rax
movq (%rax), %rax
movq %r12, (%rax,%r13,8)
leaq -0x1(%r13), %rax
testq %r13, %r13
movq %rax, %r13
jg 0x4ef1
jmp 0x4f4c
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/shreyas-gopalakrishna[P]Concurrent-Skip-list/skip_list.cpp
// Function: SkipList::display()
void SkipList::display(){
    for (int i = 0; i <= max_level; i++) {
        Node *temp = head;
        int count = 0;
        if(!(temp->get_key() == INT_MINI && temp->next[i]->get_key() == INT_MAXI)){
            printf("Level %d  ", i);
            while (temp != NULL){
                printf("%d -> ", temp->get_key());
                temp = temp->next[i];
                count++;
            }
            cout<<endl;
        }
        if(count == 3) break;
    }
    printf("---------- Display done! ----------\n\n");
}

// Assembly:
cmpl $0x0, 0x561d(%rip)      # 0xb304
js 0x5dbc
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1a2d(%rip), %r15      # 0x772f
movq 0x52c7(%rip), %r12      # 0xafd0
xorl %r13d, %r13d
movq (%rbx), %rbp
movq %rbp, %rdi
callq 0x4bea
negl %eax
jno 0x5d2f
movq 0x28(%rbp), %rax
movq (%rax,%r13,8), %rdi
callq 0x4bea
cmpl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
je 0x5d97
leaq 0x19ee(%rip), %rdi      # 0x7724
movl %r13d, %esi
xorl %eax, %eax
callq 0x2050
movl $0x3, %r14d
movq %rbp, %rdi
callq 0x4bea
movq %r15, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x2050
movq 0x28(%rbp), %rax
movq (%rax,%r13,8), %rbp
decl %r14d
testq %rbp, %rbp
jne 0x5d46
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
testl %r14d, %r14d
je 0x5dae
leaq 0x1(%r13), %rax
movslq 0x5562(%rip), %rcx      # 0xb304
cmpq %rcx, %r13
movq %rax, %r13
jl 0x5d0c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
leaq 0x19a4(%rip), %rdi      # 0x7767
jmp 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/iPapatsoris[P]Paging-Simulator/Simulator.cpp
// Function: Simulator::Simulator(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int const&, int const&, int const&, int const&, int const&)
Simulator::Simulator(const std::string& replacementAlgorithm, const int& frames, const int& frameSize,
		const int& quantum, const int& workingSetSize, const int& maxReferences) : invertedPageTable(frames) {
	this->replacementAlgorithm = replacementAlgorithm;
	this->frames = frames;
	this->frameSize = frameSize;
	this->quantum = quantum;
	this->workingSetSize = workingSetSize;
	this->maxReferences = maxReferences;
	if (! replacementAlgorithm.compare("lru")) {
		lru = new LRU();
	}
	else if (! replacementAlgorithm.compare("ws")) {
		workingSetManager = new WorkingSetManager(workingSetSize);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, -0x30(%rbp)
movq %r8, %r13
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x40(%rbp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
addq $0x38, %rdi
movq %rdi, -0x38(%rbp)
movq %rdx, %rsi
callq 0x3b9c
movq $0x0, 0x58(%rbx)
movl $0x0, 0x60(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x20e0
movq 0x10(%rbp), %rax
movl (%r15), %ecx
movl %ecx, 0x20(%rbx)
movl (%r14), %ecx
movl %ecx, 0x24(%rbx)
movl (%r13), %ecx
movl %ecx, 0x28(%rbx)
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x2c(%rbx)
movl (%rax), %eax
movl %eax, 0x30(%rbx)
leaq 0x265e(%rip), %rsi      # 0x503f
movq %r12, %rdi
callq 0x2080
testl %eax, %eax
je 0x2a21
leaq 0x267a(%rip), %rsi      # 0x506e
movq %r12, %rdi
callq 0x2080
testl %eax, %eax
jne 0x2a47
movl $0x8, %edi
callq 0x2190
movq %rax, %r12
movl $0x50, %r14d
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0x404c
jmp 0x2a43
movl $0x18, %edi
callq 0x2190
movq %rax, %r12
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
movl $0x48, %r14d
movq %r12, (%rbx,%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r12, %rdi
callq 0x2160
jmp 0x2a6b
movq %rax, %r15
jmp 0x2a74
movq %rax, %r15
movq -0x38(%rbp), %rdi
callq 0x3bec
movq (%rbx), %rdi
cmpq -0x40(%rbp), %rdi
je 0x2a82
callq 0x2160
movq %r15, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O1/iPapatsoris[P]Paging-Simulator/Simulator.cpp
// Function: Simulator::~Simulator()
Simulator::~Simulator() {
	if (! replacementAlgorithm.compare("lru")) {
		delete lru;
	}
	else if (! replacementAlgorithm.compare("ws")) {
		delete workingSetManager;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x25a1(%rip), %rsi      # 0x503f
callq 0x2080
testl %eax, %eax
je 0x2acd
leaq 0x25c0(%rip), %rsi      # 0x506e
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
jne 0x2af6
movq 0x50(%rbx), %r14
testq %r14, %r14
je 0x2af6
movq %r14, %rdi
callq 0x40b6
jmp 0x2aee
movq 0x48(%rbx), %r14
testq %r14, %r14
je 0x2af6
movq (%r14), %rdi
cmpq %r14, %rdi
je 0x2aee
movq (%rdi), %r15
callq 0x2160
movq %r15, %rdi
cmpq %r14, %r15
jne 0x2ade
movq %r14, %rdi
callq 0x2160
leaq 0x38(%rbx), %rdi
callq 0x3bec
movq (%rbx), %rdi
addq $0x10, %rbx
addq $0x8, %rsp
cmpq %rbx, %rdi
je 0x2b1a
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2160
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/iPapatsoris[P]Paging-Simulator/Simulator.cpp
// Function: Simulator::run()
void Simulator::run() {
	ifstream trace1;
	ifstream trace2;
	trace1.open("bzip.trace", ios::in);
	trace2.open("gcc.trace", ios::in);

	bool processSwitch = false;

	/* Receive page requests */
	Address *address;
	while ((address = this->getTrace(trace1, trace2, processSwitch)) != NULL) {
		statistics.pageRequests++;
		//invertedPageTable.print();
		//cout << "Trace: " << address->toString() << endl;
		address->print();
		if (! replacementAlgorithm.compare("lru")) {
			this->runLRU(address);
		}
		else if (! replacementAlgorithm.compare("ws")) {
			this->runWorkingSet(address, processSwitch);
		}
	}
	cout << "\nFrames: " << frames << statistics.toString() << endl;
	trace1.close();
	trace2.close();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
movq %rdi, %rbx
leaq -0x460(%rbp), %rdi
callq 0x21b0
leaq -0x258(%rbp), %rdi
callq 0x21b0
leaq 0x25d4(%rip), %rsi      # 0x512c
leaq -0x460(%rbp), %rdi
movl $0x8, %edx
callq 0x20f0
leaq 0x25c7(%rip), %rsi      # 0x5137
leaq -0x258(%rbp), %rdi
movl $0x8, %edx
callq 0x20f0
leaq -0x29(%rbp), %r14
movb $0x0, (%r14)
leaq -0x460(%rbp), %r15
leaq -0x258(%rbp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2d0c
movq %rax, %r13
testq %rax, %rax
je 0x2bfe
incl 0x58(%rbx)
movq %r13, %rdi
callq 0x3a70
movq %rbx, %rdi
leaq 0x247a(%rip), %rsi      # 0x503f
callq 0x2080
testl %eax, %eax
je 0x2bf1
movq %rbx, %rdi
leaq 0x2496(%rip), %rsi      # 0x506e
callq 0x2080
testl %eax, %eax
jne 0x2b97
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x306e
jmp 0x2b97
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2f0a
jmp 0x2b97
movq 0x53d3(%rip), %rdi      # 0x7fd8
leaq 0x2535(%rip), %rsi      # 0x5141
movl $0x9, %edx
callq 0x21c0
movl 0x20(%rbx), %esi
movq 0x53b8(%rip), %rdi      # 0x7fd8
callq 0x2260
movq %rax, %r14
addq $0x58, %rbx
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x455c
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %r14, %rdi
callq 0x21c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2c84
callq 0x2160
leaq -0x460(%rbp), %rdi
callq 0x2060
leaq -0x258(%rbp), %rdi
callq 0x2060
leaq -0x258(%rbp), %rdi
callq 0x2070
leaq -0x460(%rbp), %rdi
callq 0x2070
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2ce8
movq %rax, %rbx
jmp 0x2cf7
jmp 0x2ce8
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ceb
callq 0x2160
jmp 0x2ceb
jmp 0x2ce8
movq %rax, %rbx
leaq -0x258(%rbp), %rdi
callq 0x2070
leaq -0x460(%rbp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O1/iPapatsoris[P]Paging-Simulator/Simulator.cpp
// Function: Simulator::runLRU(Address*)
void Simulator::runLRU(Address *address) {
	//lru->print();
	Address **mappingFrame = invertedPageTable.getFrameByAddress(*address);
	if (mappingFrame != NULL) {
		/* Page already in memory */
		lru->prioritize(*mappingFrame);
		this->checkWrite(address, *mappingFrame);
		delete address;
	}
	else {
		/* Page not in memory */
		statistics.pageFaults++;
		Address **freeFrame = invertedPageTable.getFreeFrame();
		if (freeFrame != NULL) {
			invertedPageTable.occupyFrame(freeFrame, address);
			lru->getRecentList().push_front(address);
			printPageFault(NULL, address);
		}
		else {
			Address *victim;
			victim = lru->getVictim();
			Address **victimFrame = invertedPageTable.getFrameByAddress(*victim);
			invertedPageTable.occupyFrame(victimFrame, address);
			lru->getRecentList().push_front(address);
			printPageFault(victim, address);
			if (victim->getDirty()) {
				cout << " Saving victim to disk.";
				statistics.diskWrites++;
			}
			delete victim;
		}
		cout << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x38(%rdi), %r12
movq %r12, %rdi
callq 0x3c32
testq %rax, %rax
je 0x2f5f
movq %rax, %r15
movq 0x48(%r14), %rdi
movq (%rax), %rsi
callq 0x3e4c
movq (%r15), %rdx
movq %rbx, %rsi
callq 0x3298
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2160
incl 0x5c(%r14)
movq %r12, %rdi
callq 0x3c8a
testq %rax, %rax
je 0x2fb1
movq %r12, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x3cb0
movq 0x48(%r14), %r15
movq (%r15), %r14
movl $0x18, %edi
callq 0x2190
movq %rbx, 0x10(%rax)
movq %rax, %rdi
movq %r14, %rsi
callq 0x2050
incq 0x10(%r15)
xorl %edi, %edi
movq %rbx, %rsi
callq 0x333c
jmp 0x3031
movq 0x48(%r14), %rdi
callq 0x3e96
movq %rax, %r15
movq %r12, %rdi
movq %rax, %rsi
callq 0x3c32
movq %r12, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x3cb0
movq 0x48(%r14), %r13
movq (%r13), %r12
movl $0x18, %edi
callq 0x2190
movq %rbx, 0x10(%rax)
movq %rax, %rdi
movq %r12, %rsi
callq 0x2050
incq 0x10(%r13)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x333c
cmpb $0x1, 0x8(%r15)
jne 0x3029
movq 0x4fc4(%rip), %rdi      # 0x7fd8
leaq 0x2130(%rip), %rsi      # 0x514b
movl $0x17, %edx
callq 0x21c0
incl 0x60(%r14)
movq %r15, %rdi
callq 0x2160
movq 0x4fa0(%rip), %rbx      # 0x7fd8
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2110
nop
// File: /workspace/github_cpp_makefile_star2_O1/iPapatsoris[P]Paging-Simulator/Simulator.cpp
// Function: Simulator::checkWrite(Address*, Address*)
void Simulator::checkWrite(Address *address, Address *mappingAddress) {
	if (address->getDirty() == true && mappingAddress->getDirty() == false) {
		mappingAddress->setDirty(true);
		cout << "Page " << address->getPageNumber() << " from process " << address->getProcessId()
		     << " changed to dirty" << endl;
	}
}

// Assembly:
cmpb $0x1, 0x8(%rsi)
jne 0x32a4
cmpb $0x0, 0x8(%rdx)
je 0x32a5
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movb $0x1, 0x8(%rdx)
movq 0x4d1e(%rip), %r14      # 0x7fd8
leaq 0x1ee5(%rip), %rsi      # 0x51a6
movl $0x5, %edx
movq %r14, %rdi
callq 0x21c0
movl 0x4(%rbx), %esi
movq %r14, %rdi
callq 0x2260
movq %rax, %r14
leaq 0x1ec9(%rip), %rsi      # 0x51ac
movl $0xe, %edx
movq %rax, %rdi
callq 0x21c0
movl (%rbx), %esi
movq %r14, %rdi
callq 0x2260
movq %rax, %rbx
leaq 0x1eb7(%rip), %rsi      # 0x51bb
movl $0x11, %edx
movq %rax, %rdi
callq 0x21c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/iPapatsoris[P]Paging-Simulator/Simulator.cpp
// Function: Simulator::printPageFault(Address*, Address*)
void Simulator::printPageFault(Address *victim, Address *address) {
	cout << "Page fault on requesting page " << address->getPageNumber() << " from process "
			<< address->getProcessId() << ".";
	if (victim != NULL) {
		cout << " Memory full, replacing page " << victim->getPageNumber() << " from process "
				<< victim->getProcessId() << ".";
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x4c85(%rip), %r15      # 0x7fd8
leaq 0x1e75(%rip), %rsi      # 0x51cf
movl $0x1e, %edx
movq %r15, %rdi
callq 0x21c0
movl 0x4(%r14), %esi
movq %r15, %rdi
callq 0x2260
movq %rax, %r15
leaq 0x1e2f(%rip), %rsi      # 0x51ac
movl $0xe, %edx
movq %rax, %rdi
callq 0x21c0
movl (%r14), %esi
movq %r15, %rdi
callq 0x2260
leaq 0x1e96(%rip), %rsi      # 0x5232
movl $0x1, %edx
movq %rax, %rdi
callq 0x21c0
testq %rbx, %rbx
je 0x3413
movq 0x4c23(%rip), %r14      # 0x7fd8
leaq 0x1e32(%rip), %rsi      # 0x51ee
movl $0x1d, %edx
movq %r14, %rdi
callq 0x21c0
movl 0x4(%rbx), %esi
movq %r14, %rdi
callq 0x2260
movq %rax, %r14
leaq 0x1dce(%rip), %rsi      # 0x51ac
movl $0xe, %edx
movq %rax, %rdi
callq 0x21c0
movl (%rbx), %esi
movq %r14, %rdi
callq 0x2260
leaq 0x1e36(%rip), %rsi      # 0x5232
movl $0x1, %edx
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21c0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/iPapatsoris[P]Paging-Simulator/Simulator.cpp
// Function: Simulator::restoreWorkingSetMemory(std::__cxx11::list<Address, std::allocator<Address>>&, bool&)
void Simulator::restoreWorkingSetMemory(std::list<Address>& workingSet, bool& change) {
	for (list<Address>::iterator it = workingSet.begin() ; it != workingSet.end() ; it++) {
		Address **mappingFrame = invertedPageTable.getFrameByAddress(*it);
		if (mappingFrame == NULL) {
			statistics.pageFaults++;
			if (! change) {
				change = true;
			}
			Address **victimFrame = invertedPageTable.getVictimFrameNotInSet(workingSet);
			Address *toDelete = *victimFrame;
			*victimFrame = new Address(*it);
			cout << "\t";
			printPageFault(toDelete, &(*it));
			if (toDelete->getDirty()) {
				cout << " Saving victim to disk.";
				statistics.diskWrites++;
			}
			cout << endl;
			delete toDelete;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
movq (%rsi), %r12
movq %rsi, -0x40(%rbp)
cmpq %rsi, %r12
je 0x3538
movq -0x30(%rbp), %rax
leaq 0x38(%rax), %rbx
movq 0x4b82(%rip), %r14      # 0x7fd8
movq %rbx, -0x48(%rbp)
leaq 0x10(%r12), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3c32
testq %rax, %rax
jne 0x352a
movq -0x30(%rbp), %rax
incl 0x5c(%rax)
movq -0x38(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x348a
movq -0x38(%rbp), %rax
movb $0x1, (%rax)
movq %rbx, %rdi
movq -0x40(%rbp), %rsi
callq 0x3cba
movq %rax, %r13
movq (%rax), %rbx
movl $0xc, %edi
callq 0x2190
movq (%r15), %rcx
movq %rcx, (%rax)
movl 0x8(%r15), %ecx
movl %ecx, 0x8(%rax)
movq %rax, (%r13)
movl $0x1, %edx
movq %r14, %rdi
leaq 0x1d07(%rip), %rsi      # 0x51cd
callq 0x21c0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x333c
cmpb $0x1, 0x8(%rbx)
jne 0x34f7
movl $0x17, %edx
movq %r14, %rdi
leaq 0x1c60(%rip), %rsi      # 0x514b
callq 0x21c0
movq -0x30(%rbp), %rax
incl 0x60(%rax)
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2160
movq -0x48(%rbp), %rbx
movq (%r12), %r12
cmpq -0x40(%rbp), %r12
jne 0x345a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/iPapatsoris[P]Paging-Simulator/InvertedPageTable.cpp
// Function: InvertedPageTable::InvertedPageTable(int const&)
InvertedPageTable::InvertedPageTable(const int& frames) {
	invertedPageTableSize = frames;
	invertedPageTable = new Address *[frames];
	for (int frame = 0 ; frame < frames ; frame++) {
		invertedPageTable[frame] = NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rsi), %eax
movl %eax, 0x8(%rdi)
movslq (%rsi), %r14
leaq (,%r14,8), %rax
testq %r14, %r14
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x2030
movq %rax, (%rbx)
testq %r14, %r14
jle 0x3be6
xorl %eax, %eax
movq (%rbx), %rcx
movq $0x0, (%rcx,%rax,8)
incq %rax
cmpq %rax, %r14
jne 0x3bd3
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/iPapatsoris[P]Paging-Simulator/InvertedPageTable.cpp
// Function: InvertedPageTable::~InvertedPageTable()
InvertedPageTable::~InvertedPageTable() {
	for (int frame = 0 ; frame < invertedPageTableSize ; frame++ ) {
		if (invertedPageTable[frame] != NULL) {
			delete invertedPageTable[frame];
		}
	}
	delete[] invertedPageTable;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
jle 0x3c1c
xorl %r14d, %r14d
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x3c10
callq 0x2160
incq %r14
movslq 0x8(%rbx), %rax
cmpq %rax, %r14
jl 0x3bff
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3c2d
popq %rbx
popq %r14
popq %rbp
jmp 0x21f0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/iPapatsoris[P]Paging-Simulator/InvertedPageTable.cpp
// Function: InvertedPageTable::getFrameByAddress(Address const&)
Address **InvertedPageTable::getFrameByAddress(const Address& address) {
	for (int frame = 0 ; frame < invertedPageTableSize ; frame++ ) {
		if (invertedPageTable[frame] != NULL && invertedPageTable[frame]->equals(address)) {
			return &invertedPageTable[frame];
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $0x0, 0x8(%rdi)
jle 0x3c76
movq %rsi, %r15
movq %rdi, %r14
xorl %ebx, %ebx
xorl %r12d, %r12d
movq (%r14), %rax
movq (%rax,%rbx), %rdi
testq %rdi, %rdi
je 0x3c66
movq %r15, %rsi
callq 0x3580
testb %al, %al
jne 0x3c7a
incq %r12
movslq 0x8(%r14), %rax
addq $0x8, %rbx
cmpq %rax, %r12
jl 0x3c4e
xorl %ebx, %ebx
jmp 0x3c7d
addq (%r14), %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/iPapatsoris[P]Paging-Simulator/InvertedPageTable.cpp
// Function: InvertedPageTable::getFreeFrame()
Address **InvertedPageTable::getFreeFrame() {
	for (int frame = 0 ; frame < invertedPageTableSize ; frame++ ) {
		if (invertedPageTable[frame] == NULL) {
			return &invertedPageTable[frame];
		}
	}
	return NULL;
}

// Assembly:
movslq 0x8(%rdi), %rcx
testq %rcx, %rcx
jle 0x3cad
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
cmpq $0x0, (%rax)
je 0x3cab
addq $0x8, %rax
decq %rcx
jne 0x3c9a
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq