LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::dump_follow_set()
void xbytes::dump_follow_set()
{
	std::cout << "==============FOLLOW SET============" << std::endl;
	for(int i = 0; i < symbols.size(); ++i)
	{
		symbol* s = symbols[i];
		if(s->type == ST_TERMINAL) continue;

		std::cout << s->name << "[";
		for(int j = 0; j < s->follow_set.size(); ++j)
		{
			std::cout << s->follow_set[j]->name << ",";
		}
		std::cout << "]" << std::endl;
	}
	std::cout << std::endl << std::endl;	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x88e4(%rip), %rbx      # 0x10fd8
leaq 0x4f9f(%rip), %rsi      # 0xd69a
movl $0x24, %edx
movq %rbx, %rdi
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq 0x8(%r14), %rax
movq %r14, -0x30(%rbp)
movq 0x10(%r14), %rcx
cmpq %rax, %rcx
je 0x8839
xorl %r15d, %r15d
leaq 0x50c9(%rip), %r13      # 0xd817
movq (%rax,%r15,8), %r12
cmpl $0x1, 0x48(%r12)
je 0x8823
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
movq %rbx, %rdi
callq 0x32b0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4ef2(%rip), %rsi      # 0xd671
callq 0x32b0
movq 0x88(%r12), %rax
cmpq %rax, 0x90(%r12)
je 0x87dc
xorl %r14d, %r14d
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %rbx, %rdi
callq 0x32b0
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x32b0
incq %r14
movq 0x88(%r12), %rax
movq 0x90(%r12), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
ja 0x8799
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x4ded(%rip), %rsi      # 0xd5d8
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %rcx
incq %r15
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
ja 0x874e
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3170
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::dump_associativity()
void xbytes::dump_associativity()
{
	std::cout << "==============ASSOCIATIVITY============" << std::endl;
	for(int i = 0; i < assoc_precs.size(); ++i)
	{
		std::cout << "precedence=" << i;
		if(assoc_precs[i].associativity == AT_LEFT)
		{
			std::cout << " LEFT<< ";
		}
		else if(assoc_precs[i].associativity == AT_RIGHT)
		{
			std::cout << " RIGHT<< ";
		}
		else
		{
			std::cout << " ERROR<< ";
		}
		for(int m = 0; m < assoc_precs[i].symbol_names.size(); ++m)
		{
			std::cout << assoc_precs[i].symbol_names[m] << " ";
		}
		std::cout << ">>" << std::endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq 0x7e63(%rip), %rbx      # 0x10fd8
leaq 0x45f7(%rip), %rsi      # 0xd773
movl $0x27, %edx
movq %rbx, %rdi
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq 0x6a0(%r14), %rax
cmpq 0x698(%r14), %rax
je 0x9314
xorl %r12d, %r12d
movq %r14, -0x30(%rbp)
movl $0xb, %edx
movq %rbx, %rdi
leaq 0x45c1(%rip), %rsi      # 0xd79b
callq 0x32b0
movq %rbx, %rdi
movl %r12d, %esi
callq 0x33b0
movq 0x698(%r14), %rax
movq %r12, %r15
shlq $0x5, %r15
movl (%rax,%r15), %eax
cmpl $0x2, %eax
movq %r12, -0x38(%rbp)
je 0x921b
cmpl $0x1, %eax
jne 0x922c
movl $0x8, %edx
movq %rbx, %rdi
leaq 0x458e(%rip), %rsi      # 0xd7a7
jmp 0x923b
movl $0x9, %edx
movq %rbx, %rdi
leaq 0x4586(%rip), %rsi      # 0xd7b0
jmp 0x923b
movl $0x9, %edx
movq %rbx, %rdi
leaq 0x457f(%rip), %rsi      # 0xd7ba
callq 0x32b0
movq 0x698(%r14), %rcx
movq 0x8(%rcx,%r15), %rax
cmpq %rax, 0x10(%rcx,%r15)
leaq 0x437d(%rip), %r14      # 0xd5d5
movq 0x7d79(%rip), %rbx      # 0x10fd8
je 0x92b3
movl $0x8, %r13d
xorl %r12d, %r12d
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
movq %rbx, %rdi
callq 0x32b0
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x32b0
incq %r12
movq -0x30(%rbp), %rax
movq 0x698(%rax), %rcx
movq 0x8(%rcx,%r15), %rax
movq 0x10(%rcx,%r15), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r13
cmpq %r12, %rcx
ja 0x926a
movl $0x2, %edx
movq %rbx, %rdi
leaq 0x4502(%rip), %rsi      # 0xd7c4
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq -0x38(%rbp), %r12
incq %r12
movq -0x30(%rbp), %r14
movq 0x6a0(%r14), %rax
subq 0x698(%r14), %rax
sarq $0x5, %rax
cmpq %r12, %rax
ja 0x91cb
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::output_declare_symbol(std::basic_ofstream<char, std::char_traits<char>>&)
void xbytes::output_declare_symbol(std::ofstream& ss)
{
	ss << "#define SYMBOL_COUNT " << symbols.size() << std::endl;
	ss << "enum TERMINAL_SYMBOL" << std::endl;
	ss << "{\n";
	int i = 0;
	for(i = 0; i < symbols.size(); ++i)
	{
		symbol* s = symbols[i];
		if(s->type == ST_NONTERMINAL) break;

		ss << "	" << s->name << " = " << s->index << "," << std::endl;
	}
	ss << "	TERMINAL_SYMBOL_COUNT = " << i << std::endl;
	ss << "};\n";
	ss << std::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 0x4488(%rip), %rsi      # 0xd7c7
movl $0x15, %edx
movq %rbx, %rdi
callq 0x32b0
movq 0x10(%r14), %rsi
subq 0x8(%r14), %rsi
sarq $0x3, %rsi
movq %rbx, %rdi
callq 0x3160
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
leaq 0x444c(%rip), %rsi      # 0xd7dd
movl $0x14, %edx
movq %rbx, %rdi
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
leaq 0x4426(%rip), %rsi      # 0xd7f2
movl $0x2, %edx
movq %rbx, %rdi
callq 0x32b0
movq 0x8(%r14), %rax
cmpq %rax, 0x10(%r14)
je 0x949f
xorl %r15d, %r15d
movq (%rax,%r15,8), %r12
cmpl $0x2, 0x48(%r12)
je 0x94a2
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x4246(%rip), %rsi      # 0xd64f
callq 0x32b0
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
movq %rbx, %rdi
callq 0x32b0
movq %rax, %r13
movl $0x3, %edx
movq %rax, %rdi
leaq 0x43d9(%rip), %rsi      # 0xd80b
callq 0x32b0
movl (%r12), %esi
movq %r13, %rdi
callq 0x33b0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x43c2(%rip), %rsi      # 0xd817
callq 0x32b0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
incq %r15
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
ja 0x93ea
jmp 0x94a2
xorl %r15d, %r15d
leaq 0x434c(%rip), %rsi      # 0xd7f5
movl $0x19, %edx
movq %rbx, %rdi
callq 0x32b0
movq %rbx, %rdi
movl %r15d, %esi
callq 0x33b0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
leaq 0x431d(%rip), %rsi      # 0xd80f
movl $0x3, %edx
movq %rbx, %rdi
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3170
// File: /workspace/github_cpp_makefile_star2_O3/eva23511[P]OS-Virtual-Memory-Management/main.cpp
// Function: ParseRandFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<int> ParseRandFile(string filename) {
    ifstream rand_file(filename);
    
    if (!rand_file.is_open()) {
        printf("Could not open rand file: %s\n", filename.c_str());
        exit (EXIT_FAILURE);
    }
    
    int num;
    vector<int> randoms;
    
    rand_file >> num;
    while (rand_file >> num) {
        randoms.push_back(num);
    }
    
    rand_file.close();
    return randoms;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x228(%rbp), %rdi
movl $0x8, %edx
callq 0x21f0
leaq -0x1b0(%rbp), %rdi
callq 0x2070
testb %al, %al
je 0x2bfe
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
leaq -0x228(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x20e0
leaq -0x228(%rbp), %r14
leaq -0x1c(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x20e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2bd5
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2bc8
movl -0x1c(%rbp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2b96
movq %rbx, %rdi
movq %r15, %rdx
callq 0x4092
jmp 0x2b96
leaq -0x228(%rbp), %rdi
callq 0x2050
leaq -0x228(%rbp), %rdi
callq 0x2080
movq %rbx, %rax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rsi
leaq 0x3463(%rip), %rdi      # 0x606b
xorl %eax, %eax
callq 0x2030
movl $0x1, %edi
callq 0x2160
jmp 0x2c1b
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2c32
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2150
leaq -0x228(%rbp), %rdi
callq 0x2080
movq %r14, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O3/eva23511[P]OS-Virtual-Memory-Management/main.cpp
// Function: GetPager(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<int, std::allocator<int>>, int)
Pager * GetPager(string algo, vector<int> randoms, int num_frames) {
    if (algo == "f") {
        return new FifoPager();
    } else if (algo == "r") {
        return new RandomPager(randoms);
    } else if (algo == "c") {
        return new ClockPager();
    } else if (algo == "e") {
        return new NruPager(a_option);
    } else if (algo == "a") {
        return new AgingPager(a_option, num_frames);
    } else if (algo == "w") {
        return new WorkingSetPager(a_option);
    }
    
    printf("Wrong Pager Specification: %s\n", algo.c_str());
    exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x333a(%rip), %rsi      # 0x6044
callq 0x2090
testl %eax, %eax
je 0x2daa
leaq 0x3328(%rip), %rsi      # 0x6046
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x2dc4
leaq 0x34cb(%rip), %rsi      # 0x6200
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x2e00
leaq 0x3430(%rip), %rsi      # 0x617c
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x2e17
leaq 0x32e5(%rip), %rsi      # 0x6048
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x2e34
leaq 0x32d0(%rip), %rsi      # 0x604a
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
jne 0x2e60
movl $0x18, %edi
callq 0x2140
movq %rax, %rbx
movl 0x63d3(%rip), %esi      # 0x9170
movq %rax, %rdi
callq 0x4d00
jmp 0x2e52
movl $0x10, %edi
callq 0x2140
movq %rax, %rbx
movq %rax, %rdi
callq 0x47e0
jmp 0x2e52
movl $0x28, %edi
callq 0x2140
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x3ab8
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x4830
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x2e52
movq -0x20(%rbp), %rsi
subq %rdi, %rsi
callq 0x2150
jmp 0x2e52
movl $0x10, %edi
callq 0x2140
movq %rax, %rbx
movq %rax, %rdi
callq 0x48be
jmp 0x2e52
movl $0x18, %edi
callq 0x2140
movq %rax, %rbx
movl 0x6346(%rip), %esi      # 0x9170
movq %rax, %rdi
callq 0x495e
jmp 0x2e52
movl $0x28, %edi
callq 0x2140
movq %rax, %rbx
movl 0x6329(%rip), %esi      # 0x9170
movq %rax, %rdi
movl %r14d, %edx
callq 0x4af6
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rsi
leaq 0x31e2(%rip), %rdi      # 0x604c
xorl %eax, %eax
callq 0x2030
movl $0x1, %edi
callq 0x2160
jmp 0x2ea5
jmp 0x2e7f
movq %rax, %r14
movl $0x18, %esi
jmp 0x2eb7
jmp 0x2eaf
movq %rax, %r14
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x2ea8
movq -0x20(%rbp), %rsi
subq %rdi, %rsi
callq 0x2150
jmp 0x2ea8
movq %rax, %r14
movl $0x28, %esi
jmp 0x2eb7
movq %rax, %r14
movl $0x10, %esi
movq %rbx, %rdi
callq 0x2150
movq %r14, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O3/eva23511[P]OS-Virtual-Memory-Management/main.cpp
// Function: PrintFrameTable()
void PrintFrameTable() {
    printf("FT:");
    for (Frame * f : frame_table) {
        if (f->pid != -1) {
            printf(" %d:%d", f->pid, f->vpage);
        } else {
            printf(" *");
        }
    }
    printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x2b71(%rip), %rdi      # 0x60d8
xorl %eax, %eax
callq 0x2030
movq 0x5c03(%rip), %r15      # 0x9178
movq 0x5c04(%rip), %r12      # 0x9180
cmpq %r12, %r15
je 0x35bc
leaq 0x2b5b(%rip), %rbx      # 0x60e3
leaq 0x2b4d(%rip), %r14      # 0x60dc
movq (%r15), %rax
movl 0x4(%rax), %esi
cmpl $-0x1, %esi
je 0x35a9
movl 0x8(%rax), %edx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2030
jmp 0x35b3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2030
addq $0x8, %r15
cmpq %r12, %r15
jne 0x358f
movl $0xa, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2190
// File: /workspace/github_cpp_makefile_star2_O3/eva23511[P]OS-Virtual-Memory-Management/main.cpp
// Function: PrintSummary(std::vector<Process*, std::allocator<Process*>>)
void PrintSummary(vector<Process *> processes) {
    for (Process * p : processes) {
        p->PrintStatistics();
        cost += p->ComputeCost();
    }
    
    cost += (long long)(inst_count - ctx_switches - process_exits) + (long long)(ctx_switches) * 121 + (long long)(process_exits) * 175;
    
    printf("TOTALCOST %lu %lu %lu %llu\n", inst_count, ctx_switches, process_exits, cost);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
movq 0x8(%rdi), %r15
cmpq %r15, %r14
je 0x3610
movq (%r14), %rbx
movq %rbx, %rdi
callq 0x4360
movq %rbx, %rdi
callq 0x43a6
addq 0x5bc2(%rip), %rax      # 0x91c0
movq %rax, 0x5bbb(%rip)      # 0x91c0
addq $0x8, %r14
cmpq %r15, %r14
jne 0x35e4
jmp 0x3617
movq 0x5ba9(%rip), %rax      # 0x91c0
movq 0x5b8a(%rip), %rsi      # 0x91a8
movq 0x5b8b(%rip), %rdx      # 0x91b0
movq 0x5b8c(%rip), %rcx      # 0x91b8
imulq $0x79, %rdx, %rdi
imulq $0xaf, %rcx, %r9
movq %rsi, %r8
subq %rdx, %r8
subq %rcx, %r8
addq %rdi, %r8
addq %r9, %r8
addq %rax, %r8
movq %r8, 0x5b70(%rip)       # 0x91c0
leaq 0x2a65(%rip), %rdi      # 0x60bc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2030
// File: /workspace/github_cpp_makefile_star2_O3/eva23511[P]OS-Virtual-Memory-Management/main.cpp
// Function: GetNextInstruction(std::basic_ifstream<char, std::char_traits<char>>&, char&, int&)
bool GetNextInstruction(ifstream &input_file, char &operation, int &vpage) {
    string line;
    SkipComments(input_file, line);
    
    if (input_file.eof() || line[0] == '#') {
        return false;
    }
    
    istringstream input(line);
    input >> operation >> vpage;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq -0x40(%rbp), %rsi
callq 0x396d
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%r15,%rax)
movq -0x40(%rbp), %rdi
jne 0x36bb
cmpb $0x23, (%rdi)
jne 0x36bf
xorl %ebx, %ebx
jmp 0x3713
leaq -0x1c0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x8, %edx
callq 0x2220
leaq -0x1c0(%rbp), %rdi
movq %r14, %rsi
callq 0x2180
movq %rax, %rdi
movq %rbx, %rsi
callq 0x20e0
movq 0x58d3(%rip), %rsi      # 0x8fc8
leaq -0x1c0(%rbp), %rdi
callq 0x21a0
leaq -0x148(%rbp), %rdi
callq 0x20a0
movb $0x1, %bl
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x3724
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2150
movl %ebx, %eax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x375c
movq %rax, %rbx
movq 0x5886(%rip), %rsi      # 0x8fc8
leaq -0x1c0(%rbp), %rdi
callq 0x21a0
leaq -0x148(%rbp), %rdi
callq 0x20a0
jmp 0x375f
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x3774
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2150
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O3/eva23511[P]OS-Virtual-Memory-Management/main.cpp
// Function: ExitProcess(Process*, Pager*)
void ExitProcess(Process * curr_process, Pager * pager) {
    printf("EXIT current process %d\n", curr_process->pid);
    for (Pte * pte : curr_process->page_table) {
        if (pte->present) {
            // Unmap the page (UNMAP)
            Frame * curr_frame = frame_table[pte->physical_frame];
            curr_process->unmap_count++;
            if (O_option) {
                printf(" UNMAP %d:%d\n", curr_frame->pid, curr_frame->vpage);
            }
                        
            // Save frame to disk (FOUT): FOUT modified filemapped pages
            // Note that dirty non-fmapped (anonymous) pages are not written back (OUT) as the process exits.
            if (pte->modified && pte->file_mapped) {
                curr_process->fout_count++;
                if (O_option) {
                    printf(" FOUT\n");
                }
            }
            // Reset the used frame and Returned it to the free pool
            curr_frame->ResetFrame();
            pager->ResetPager(pte->physical_frame);
            free_frames.push_back(curr_frame);
        }
        pte->ResetPte();
    }
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %esi
leaq 0x2892(%rip), %rdi      # 0x602b
xorl %eax, %eax
callq 0x2030
movq 0x20(%r14), %r12
movq %r14, -0x30(%rbp)
movq 0x28(%r14), %r14
cmpq %r14, %r12
je 0x3873
movq (%r12), %r15
movl (%r15), %eax
testb $0x1, %al
je 0x3862
movq 0x59ad(%rip), %rcx      # 0x9178
shrl $0x3, %eax
andl $0x3f8, %eax            # imm = 0x3F8
movq (%rcx,%rax), %r13
movq -0x30(%rbp), %rax
incq 0x48(%rax)
cmpl $0x0, 0x596e(%rip)      # 0x9154
je 0x37fe
movl 0x4(%r13), %esi
movl 0x8(%r13), %edx
leaq 0x281d(%rip), %rdi      # 0x6014
xorl %eax, %eax
callq 0x2030
movl (%r15), %eax
notl %eax
testb $0x14, %al
jne 0x3824
movq -0x30(%rbp), %rax
incq 0x70(%rax)
cmpl $0x0, 0x593e(%rip)      # 0x9154
je 0x3824
leaq 0x2982(%rip), %rdi      # 0x61a1
callq 0x21c0
movq %r13, %rdi
callq 0x47c8
movl (%r15), %esi
shrl $0x6, %esi
andl $0x7f, %esi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movl $0x18, %edi
callq 0x2140
movq %r13, 0x10(%rax)
movq %rax, %rdi
leaq 0x593a(%rip), %rsi      # 0x9190
callq 0x2040
incq 0x593e(%rip)            # 0x91a0
movq %r15, %rdi
callq 0x47a4
addq $0x8, %r12
jmp 0x37ac
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/eva23511[P]OS-Virtual-Memory-Management/main.cpp
// Function: GetFrame(Pager*, std::vector<Process*, std::allocator<Process*>>)
Frame * GetFrame(Pager * pager, vector<Process *> processes) {
    if (free_frames.empty()) {
        return pager->SelectVictimFrame(frame_table, processes, inst_count);
    }
    Frame * frame = free_frames.front();
    free_frames.pop_front();
    return frame;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq 0x58fa(%rip), %r15      # 0x9190
leaq 0x58f3(%rip), %rax      # 0x9190
cmpq %rax, %r15
je 0x38bf
movq 0x10(%r15), %rbx
decq 0x58f3(%rip)            # 0x91a0
movq %r15, %rdi
callq 0x2210
movl $0x18, %esi
movq %r15, %rdi
jmp 0x3920
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x58ac(%rip), %rsi      # 0x9178
leaq -0x48(%rbp), %rdi
callq 0x3bb8
leaq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x3b38
movq 0x58c0(%rip), %rcx      # 0x91a8
movq (%rbx), %rax
leaq -0x48(%rbp), %rsi
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
callq *(%rax)
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x3910
movq -0x20(%rbp), %rsi
subq %rdi, %rsi
callq 0x2150
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x3925
movq -0x38(%rbp), %rsi
subq %rdi, %rsi
callq 0x2150
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x3950
movq -0x20(%rbp), %rsi
subq %rdi, %rsi
callq 0x2150
jmp 0x3950
movq %rax, %rbx
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x3965
movq -0x38(%rbp), %rsi
subq %rdi, %rsi
callq 0x2150
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O3/eva23511[P]OS-Virtual-Memory-Management/main.cpp
// Function: ParseOptions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void ParseOptions(string options) {
    for (int i = 0; options[i]; i++) {
        switch (options[i]) {
            case 'O':
              O_option = 1;
              break;
            case 'P':
              P_option = 1;
              break;
            case 'F':
              F_option = 1;
              break;
            case 'S':
              S_option = 1;
              break;
            case 'x':
              x_option = 1;
              break;
            case 'y':
              y_option = 1;
              break;
            case 'f':
              f_option = 1;
              break;
            case 'a':
              a_option = 1;
              break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rax
leaq 0x578c(%rip), %rcx      # 0x9154
leaq 0x578d(%rip), %rdx      # 0x915c
leaq 0x5782(%rip), %rsi      # 0x9158
leaq 0x5783(%rip), %rdi      # 0x9160
leaq 0x578c(%rip), %r8       # 0x9170
leaq 0x5781(%rip), %r9       # 0x916c
leaq 0x5772(%rip), %r10      # 0x9164
leaq 0x576f(%rip), %r11      # 0x9168
movzbl (%rax), %ebx
cmpl $0x60, %ebx
jg 0x3a19
cmpl $0x4f, %ebx
jg 0x3a2d
cmpl $0x46, %ebx
je 0x3a5a
movq %rcx, %r14
cmpl $0x4f, %ebx
je 0x3a5d
testl %ebx, %ebx
jne 0x3a64
jmp 0x3a69
cmpl $0x77, %ebx
jg 0x3a3c
cmpl $0x61, %ebx
je 0x3a50
cmpl $0x66, %ebx
jne 0x3a64
movq %r9, %r14
jmp 0x3a5d
cmpl $0x50, %ebx
je 0x3a4b
cmpl $0x53, %ebx
jne 0x3a64
movq %rdi, %r14
jmp 0x3a5d
cmpl $0x78, %ebx
je 0x3a55
cmpl $0x79, %ebx
jne 0x3a64
movq %r11, %r14
jmp 0x3a5d
movq %rsi, %r14
jmp 0x3a5d
movq %r8, %r14
jmp 0x3a5d
movq %r10, %r14
jmp 0x3a5d
movq %rdx, %r14
movl $0x1, (%r14)
incq %rax
jmp 0x39f9
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/eva23511[P]OS-Virtual-Memory-Management/process.cpp
// Function: Process::PrintPagetable()
void Process::PrintPagetable() {
    printf("PT[%d]:", pid);
    for(int i = 0; i < kVpageSize; i++) {
        if (!page_table[i]->present) {
            if (page_table[i]->pagedout) {
                printf(" #");
            } else {
                printf(" *");
            }
            continue;
        }
        printf(" %d:%c%c%c", i, page_table[i]->referenced ? 'R' : '-', page_table[i]->modified ? 'M' : '-', page_table[i]->pagedout ? 'S' : '-');
    }
    printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %esi
leaq 0x1dd2(%rip), %rdi      # 0x61ec
xorl %eax, %eax
callq 0x2030
leaq 0x1dcc(%rip), %r15      # 0x61f4
movl $0x2d, %r14d
leaq 0x1dc2(%rip), %r12      # 0x61f7
xorl %r13d, %r13d
movq 0x20(%rbx), %rax
movq (%rax,%r13,8), %rax
movl (%rax), %eax
testb $0x1, %al
jne 0x4453
testb $0x20, %al
jne 0x4485
leaq 0x1c92(%rip), %rdi      # 0x60e3
jmp 0x4488
testb $0x2, %al
movl $0x52, %edx
cmovel %r14d, %edx
movl %eax, %ecx
andl $0x4, %ecx
leal 0x2d(,%rcx,8), %ecx
testb $0x20, %al
movl $0x53, %r8d
cmovel %r14d, %r8d
movq %r12, %rdi
movl %r13d, %esi
xorl %eax, %eax
callq 0x2030
jmp 0x448f
movq %r15, %rdi
xorl %eax, %eax
callq 0x2030
incq %r13
cmpq $0x40, %r13
jne 0x4438
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2190
// File: /workspace/github_cpp_makefile_star2_O3/eva23511[P]OS-Virtual-Memory-Management/pager.cpp
// Function: FifoPager::SelectVictimFrame(std::vector<Frame*, std::allocator<Frame*>>, std::vector<Process*, std::allocator<Process*>>, unsigned long)
Frame * FifoPager::SelectVictimFrame(vector<Frame *> frame_table, vector<Process *> processes, unsigned long timestamp) {
    hand++;
    if (hand >= frame_table.size()) {
        hand = 0;
    }
    return frame_table[hand];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x8(%rdi), %rax
incq %rax
movl %eax, 0x8(%rdi)
movq (%rsi), %rcx
movq 0x8(%rsi), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rax, %rdx
ja 0x4822
movl $0x0, 0x8(%rdi)
xorl %eax, %eax
cltq
movq (%rcx,%rax,8), %rax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/eva23511[P]OS-Virtual-Memory-Management/pager.cpp
// Function: ClockPager::SelectVictimFrame(std::vector<Frame*, std::allocator<Frame*>>, std::vector<Process*, std::allocator<Process*>>, unsigned long)
Frame * ClockPager::SelectVictimFrame(vector<Frame *> frame_table, vector<Process *> processes, unsigned long timestamp) {
    hand++;
    if (hand >= frame_table.size()) {
        hand = 0;
    }
    
    while (processes[frame_table[hand]->pid]->page_table[frame_table[hand]->vpage]->referenced) {
        processes[frame_table[hand]->pid]->page_table[frame_table[hand]->vpage]->referenced = 0;

        hand++;
        if (hand >= frame_table.size()) {
            hand = 0;
        }
    }
    return frame_table[hand];
}

// Assembly:
movslq 0x8(%rdi), %rax
incq %rax
movl %eax, 0x8(%rdi)
movq (%rsi), %rcx
movq 0x8(%rsi), %r8
subq %rcx, %r8
sarq $0x3, %r8
cmpq %rax, %r8
ja 0x48fc
movl $0x0, 0x8(%rdi)
xorl %eax, %eax
pushq %rbp
movq %rsp, %rbp
cltq
movq (%rcx,%rax,8), %rax
movslq 0x4(%rax), %rcx
movq (%rdx), %r8
movq (%r8,%rcx,8), %rcx
movslq 0x8(%rax), %r8
movq 0x20(%rcx), %rcx
movq (%rcx,%r8,8), %rcx
movl (%rcx), %r8d
testb $0x2, %r8b
je 0x4955
andl $-0x3, %r8d
movl %r8d, (%rcx)
movslq 0x8(%rdi), %rax
incq %rax
movl %eax, 0x8(%rdi)
movq (%rsi), %rcx
movq 0x8(%rsi), %r8
subq %rcx, %r8
sarq $0x3, %r8
cmpq %rax, %r8
ja 0x4900
movl $0x0, 0x8(%rdi)
xorl %eax, %eax
jmp 0x4900
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/macfergus[P]baduk/cppsrc/apps/randomplay.cpp
// Function: main
int main() {
    auto game = baduk::newGame(19, 7.5);
    baduk::RandomBot black_bot;
    baduk::RandomBot white_bot;

    while (!game->isOver()) {
        std::cout << game->board() << "\n";
        auto next_agent =
            game->nextPlayer() == baduk::Stone::black ?
                &black_bot :
                &white_bot;
        const auto next_move = next_agent->selectMove(*game);

        game = game->applyMove(next_move);
    }
    std::cout << game->board() << "\n";

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsp, %rdi
movss 0x9bb(%rip), %xmm0      # 0x1160c
movl $0x13, %esi
callq 0x3ba1
leaq 0x50a6(%rip), %rbx      # 0x15d08
addq $0x10, %rbx
leaq 0x48(%rsp), %r13
movq %rbx, (%r13)
callq 0x3040
movabsq $0x20c49ba5e353f7cf, %r14 # imm = 0x20C49BA5E353F7CF
imulq %r14
movq %rdx, %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rcx
addq %rax, %rcx
movabsq $0x200000005, %r15      # imm = 0x200000005
movq %rcx, %rax
mulq %r15
movq %rcx, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0x1e, %rax
movq %rax, %rdx
shlq $0x1f, %rdx
subq %rdx, %rax
leaq (%rcx,%rax), %rdx
cmpq $0x1, %rdx
adcq %rcx, %rax
movq %rax, 0x8(%r13)
leaq 0x38(%rsp), %rbp
movq %rbx, (%rbp)
callq 0x3040
imulq %r14
movq %rdx, %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rcx
addq %rax, %rcx
movq %rcx, %rax
mulq %r15
movq %rcx, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0x1e, %rax
movq %rax, %rdx
shlq $0x1f, %rdx
subq %rdx, %rax
leaq (%rcx,%rax), %rdx
cmpq $0x1, %rdx
adcq %rcx, %rax
movq %rax, 0x8(%rbp)
movq 0x5295(%rip), %rbx      # 0x15fb8
leaq 0x87d(%rip), %r14       # 0x115a7
leaq 0x10(%rsp), %r15
leaq 0x28(%rsp), %r12
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq (%rsp), %rdi
movq (%rdi), %rcx
movq 0x10(%rcx), %rcx
testb %al, %al
jne 0x10de0
callq *%rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x10693
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x31b0
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq %r13, %rdi
testl %eax, %eax
je 0x10d82
movq %rbp, %rdi
movq (%rsp), %rsi
movq (%rdi), %rax
callq *(%rax)
movq %rax, 0x28(%rsp)
movb %dl, 0x30(%rsp)
movq (%rsp), %rsi
movq (%rsi), %rax
movq %r15, %rdi
movq %r12, %rdx
callq *0x28(%rax)
movaps 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x10(%rsp)
movq 0x8(%rsp), %rdi
movaps %xmm0, (%rsp)
testq %rdi, %rdi
je 0x10d34
callq 0x3cc2
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x10d34
callq 0x3cc2
jmp 0x10d34
callq *%rcx
movq 0x51cf(%rip), %rdi      # 0x15fb8
movq %rax, %rsi
callq 0x10693
leaq 0x7af(%rip), %rsi       # 0x115a7
movl $0x1, %edx
movq %rax, %rdi
callq 0x31b0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x10e14
callq 0x3cc2
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10e2d
jmp 0x10e2d
jmp 0x10e2d
jmp 0x10e2d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x10e3f
callq 0x3cc2
movq %rbx, %rdi
callq 0x3290
// File: /workspace/github_cpp_makefile_star2_O3/dramninjasUMD[P]BOBSim/BOBWrapper.cpp
// Function: BOBSim::getPageWalkLogicOp(unsigned long, std::vector<unsigned long, std::allocator<unsigned long>>*)
void *getPageWalkLogicOp(uint64_t baseAddr, vector<uint64_t> *args)
{
	if (!args)
	{
		ERROR(" == Got a logic op without an arguments vector");
	}

	LogicOperation *lo = new LogicOperation(LogicOperation::PAGE_TABLE_WALK, *args);
	return (void*)(lo);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rsi, %rsi
jne 0x9ce6
movq 0xf3a5(%rip), %r14      # 0x18ff0
leaq 0x9576(%rip), %rsi      # 0x131c8
movl $0x8, %edx
movq %r14, %rdi
callq 0x3200
leaq 0x9fd7(%rip), %rsi      # 0x13c3d
movl $0xe, %edx
movq %r14, %rdi
callq 0x3200
leaq 0x94f7(%rip), %rsi      # 0x13171
movl $0x1, %edx
movq %r14, %rdi
callq 0x3200
movq %r14, %rdi
movl $0xc7, %esi
callq 0x3330
movq %rax, %r14
leaq 0x953b(%rip), %rsi      # 0x131d9
movl $0x4, %edx
movq %rax, %rdi
callq 0x3200
leaq 0x9f9a(%rip), %rsi      # 0x13c4c
movl $0x2e, %edx
movq %r14, %rdi
callq 0x3200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movl $0x20, %edi
callq 0x31d0
movq %rax, %r14
movq %rax, %rdi
movl $0x2, %esi
movq %rbx, %rdx
callq 0xeb2c
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movl $0x20, %esi
movq %r14, %rdi
callq 0x31f0
movq %rbx, %rdi
callq 0x3340
// File: /workspace/github_cpp_makefile_star2_O3/dramninjasUMD[P]BOBSim/BOBWrapper.cpp
// Function: BOBSim::BOBWrapper::AddTransaction(unsigned long, bool, int, void*)
bool BOBWrapper::AddTransaction(uint64_t addr, bool isWrite, int coreID, void *logicOperation)
{
	int openPort;
	bool isLogicOp = logicOperation != NULL;
	TransactionType type = isLogicOp ? LOGIC_OPERATION : (isWrite ? DATA_WRITE : DATA_READ) ;
	Transaction *trans;

	if ((openPort = FindOpenPort(coreID)) > -1)
	{
		trans = new Transaction(type, TRANSACTION_SIZE, addr);
		trans->portID = openPort;
		trans->coreID=coreID;
		if (isLogicOp)
		{
			trans->logicOpContents = logicOperation;
		}
		if(currentClockCycle<5000)
		{
			DEBUG("!! "<<*trans<<" to port "<<openPort);
		}
		if (isWrite)
			writesPerCycle++;
		else
			readsPerCycle++;

		AddTransaction(trans, openPort);
	}
	else 
	{
		return false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %r8, %r8
movl $0x3, %ebp
cmovel %edx, %ebp
leaq 0xf48a(%rip), %rax      # 0x191d0
movl (%rax), %eax
testq %rax, %rax
je 0x9d8e
movq %r8, %r13
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, %r14
movq 0x10(%rdi), %r9
movq 0x30(%rdi), %rdx
movl $0x6, %esi
xorl %r15d, %r15d
cmpl $0x0, (%rdx,%r15,4)
jne 0x9d82
movq 0x10(%r9), %rdi
movq (%rdi,%rsi,4), %r8
subq -0x8(%rdi,%rsi,4), %r8
cmpq $0x40, %r8
jb 0x9d9f
incq %r15
addq $0x10, %rsi
cmpq %r15, %rax
jne 0x9d68
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r15d, %r15d
js 0x9d8e
movl %ecx, 0xc(%rsp)
movl $0x90, %edi
callq 0x31d0
movq %rax, 0x10(%rsp)
movq %rax, %rdi
movl %ebp, %esi
movl $0x40, %edx
movq %r12, %rcx
callq 0x122bc
movq 0x10(%rsp), %rbp
movl %r15d, 0x1c(%rbp)
movl 0xc(%rsp), %eax
movl %eax, 0x20(%rbp)
testq %r13, %r13
je 0x9de2
movq %r13, 0x28(%rbp)
cmpq $0x1387, 0x8(%r14)      # imm = 0x1387
ja 0x9e6a
leaq 0xf3e1(%rip), %rax      # 0x191d4
cmpl $0x0, (%rax)
je 0x9e6a
movq 0xf1c9(%rip), %r12      # 0x18fc8
leaq 0x9e75(%rip), %rsi      # 0x13c7b
movl $0x3, %edx
movq %r12, %rdi
callq 0x3200
movq %r12, %rdi
movq %rbp, %rsi
callq 0x12307
movq %rax, %r12
leaq 0x9e57(%rip), %rsi      # 0x13c7f
movl $0x9, %edx
movq %rax, %rdi
callq 0x3200
movq %r12, %rdi
movl %r15d, %esi
callq 0x3330
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movzbl %bl, %eax
incq 0xb8(%r14,%rax,8)
movq %r14, %rdi
movq %rbp, %rsi
movl %r15d, %edx
callq 0x9ea4
movb $0x1, %al
jmp 0x9d90
movq %rax, %rbx
movl $0x90, %esi
movq 0x10(%rsp), %rdi
callq 0x31f0
movq %rbx, %rdi
callq 0x3340
// File: /workspace/github_cpp_makefile_star2_O3/dramninjasUMD[P]BOBSim/BankState.cpp
// Function: BOBSim::BankState::UpdateStateChange()
void BankState::UpdateStateChange()
{
	if(stateChangeCountdown>0)
	{
		stateChangeCountdown--;

		if(stateChangeCountdown==0)
		{
			switch(lastCommand)
			{
			case REFRESH:
				currentBankState = IDLE;
				break;
			case WRITE_P:
			case READ_P:
				currentBankState = PRECHARGING;
				stateChangeCountdown = tRP;
				lastCommand = PRECHARGE;
				break;
			case PRECHARGE:
				currentBankState = IDLE;
				break;
			default:
				ERROR("== WTF STATE? : "<<lastCommand);
				exit(0);
			}
		}
	}
}

// Assembly:
pushq %rbx
movl 0x3c(%rdi), %eax
testl %eax, %eax
je 0xc3d6
movq %rdi, %rbx
decl %eax
movl %eax, 0x3c(%rdi)
jne 0xc3d6
movl 0x38(%rbx), %eax
decl %eax
cmpl $0x5, %eax
ja 0xc3d8
leaq 0x7cff(%rip), %rcx      # 0x140b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x2, (%rbx)
movabsq $0x900000006, %rax      # imm = 0x900000006
movq %rax, 0x38(%rbx)
jmp 0xc3d6
movl $0x0, (%rbx)
popq %rbx
retq
movq 0xcc11(%rip), %rdi      # 0x18ff0
leaq 0x6de2(%rip), %rsi      # 0x131c8
callq 0x31c0
leaq 0x7ce6(%rip), %rsi      # 0x140d8
movq %rax, %rdi
callq 0x31c0
leaq 0x6d70(%rip), %rsi      # 0x13171
movq %rax, %rdi
callq 0x31c0
movq %rax, %rdi
movl $0x4a, %esi
callq 0x3330
leaq 0x6dbc(%rip), %rsi      # 0x131d9
movq %rax, %rdi
callq 0x31c0
leaq 0x7cba(%rip), %rsi      # 0x140e6
movq %rax, %rdi
callq 0x31c0
movl 0x38(%rbx), %esi
movq %rax, %rdi
callq 0x3330
movq %rax, %rdi
callq 0x30d0
xorl %edi, %edi
callq 0x3220
// File: /workspace/github_cpp_makefile_star2_O3/dramninjasUMD[P]BOBSim/BankState.cpp
// Function: BOBSim::operator<<(std::ostream&, BOBSim::BankState const&)
ostream &operator<<(ostream &out, const BankState &bs)
{
	//out << dec <<" == Bank State " <<endl;
	switch(bs.currentBankState)
	{
	case IDLE:
		out<<"    State : Idle" <<endl;
		break;
	case ROW_ACTIVE:
		out<<"    State : Active" <<endl;
		break;
	case PRECHARGING:
		out<<"    State : Precharging" <<endl;
		break;
	case REFRESHING:
		out<<"    State : Refreshing" <<endl;
		break;
	}
	/*
	out<<"    StateChange    : " << bs.stateChangeCountdown<<endl;
	out<<"    OpenRowAddress : " << bs.openRowAddress <<endl;
	out<<"    nextRead       : " << bs.nextRead <<endl;
	out<<"    nextWrite      : " << bs.nextWrite <<endl;
	out<<"    nextActivate   : " << bs.nextActivate <<endl;
	out<<"    nextStrobeMin  : " << bs.nextStrobeMin << endl;
	out<<"    nextStrobeMax  : " << bs.nextStrobeMax << endl;
	*/
	return out;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rsi), %eax
cmpq $0x3, %rax
ja 0xc4cf
leaq 0x7c67(%rip), %rcx      # 0x140c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x7c86(%rip), %rsi      # 0x140f7
movl $0x10, %edx
jmp 0xc4a0
leaq 0x7c9c(%rip), %rsi      # 0x1411b
movl $0x17, %edx
jmp 0xc4a0
leaq 0x7ca6(%rip), %rsi      # 0x14133
movl $0x16, %edx
jmp 0xc4a0
leaq 0x7c6d(%rip), %rsi      # 0x14108
movl $0x12, %edx
movq %rbx, %rdi
callq 0x3200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/dramninjasUMD[P]BOBSim/DRAMChannel.cpp
// Function: BOBSim::DRAMChannel::ReceiveOnCmdBus(BOBSim::BusPacket*, unsigned int)
void DRAMChannel::ReceiveOnCmdBus(BusPacket *busPacket, unsigned id)
{
	if(inFlightCommandPacket!=NULL)
	{
		ERROR("== Error - Bus collision while trying to receive from controller");
		ERROR("   Existing : "<<*inFlightCommandPacket);
		ERROR("   Incoming : "<<*busPacket);
		exit(0);
	}

	if(DEBUG_CHANNEL) DEBUG("     == Putting command on bus : " << *busPacket);

	//Report the time we waited in the queue
	if(busPacket->busPacketType==ACTIVATE)
	{
		(*ReportCallback)(busPacket, 0);
	}
	//Report the WRITE is finally going
	else if(busPacket->busPacketType==WRITE_P)
	{
		(*ReportCallback)(busPacket, 0);
	}

	inFlightCommandPacket = busPacket;
	inFlightCommandCountdown = tCMDS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x260(%rdi)
jne 0xd0dd
movl 0x4(%rbx), %eax
addl $-0x3, %eax
cmpl $0x1, %eax
ja 0xd0bc
movq 0x250(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
xorl %edx, %edx
callq *0x10(%rax)
movq %rbx, 0x260(%r14)
movl $0x1, 0x268(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xbf0c(%rip), %r12      # 0x18ff0
leaq 0x60dd(%rip), %rsi      # 0x131c8
movq %r12, %rdi
callq 0x31c0
leaq 0x71e1(%rip), %r13      # 0x142db
movq %rax, %rdi
movq %r13, %rsi
callq 0x31c0
leaq 0x6065(%rip), %rbp      # 0x13171
movq %rax, %rdi
movq %rbp, %rsi
callq 0x31c0
movq %rax, %rdi
movl $0xd8, %esi
callq 0x3330
leaq 0x60ae(%rip), %r15      # 0x131d9
movq %rax, %rdi
movq %r15, %rsi
callq 0x31c0
leaq 0x722b(%rip), %rsi      # 0x14368
movq %rax, %rdi
callq 0x31c0
movq %rax, %rdi
callq 0x30d0
movq %r12, %rdi
leaq 0x6071(%rip), %rsi      # 0x131c8
callq 0x31c0
movq %rax, %rdi
movq %r13, %rsi
callq 0x31c0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x31c0
movq %rax, %rdi
movl $0xd9, %esi
callq 0x3330
movq %rax, %rdi
movq %r15, %rsi
callq 0x31c0
leaq 0x7218(%rip), %rsi      # 0x143a9
movq %rax, %rdi
callq 0x31c0
movq 0x260(%r14), %rsi
movq %rax, %rdi
callq 0xc7bb
movq %rax, %rdi
callq 0x30d0
movq %r12, %rdi
leaq 0x600e(%rip), %rsi      # 0x131c8
callq 0x31c0
movq %rax, %rdi
movq %r13, %rsi
callq 0x31c0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x31c0
movq %rax, %rdi
movl $0xda, %esi
callq 0x3330
movq %rax, %rdi
movq %r15, %rsi
callq 0x31c0
leaq 0x71c4(%rip), %rsi      # 0x143b8
movq %rax, %rdi
callq 0x31c0
movq %rax, %rdi
movq %rbx, %rsi
callq 0xc7bb
movq %rax, %rdi
callq 0x30d0
xorl %edi, %edi
callq 0x3220
// File: /workspace/github_cpp_makefile_star2_O3/dramninjasUMD[P]BOBSim/DRAMChannel.cpp
// Function: BOBSim::DRAMChannel::AddTransaction(BOBSim::Transaction*, unsigned int)
bool DRAMChannel::AddTransaction(Transaction *trans, unsigned notused)
{
	if(DEBUG_CHANNEL)DEBUG("    In AddTransaction - got : "<<*trans);

	if(trans->transactionType==LOGIC_OPERATION)
	{
		if(SendToLogicLayer!=NULL)
		{
			(*SendToLogicLayer)(trans,0);
		}
		else
		{
			ERROR("== Logic Layers are not registered, yet receiving a logic operation.  Please register");
			exit(0);
		}
	}
	else if(trans->transactionType==LOGIC_RESPONSE)
	{
		if(pendingLogicResponse==NULL)
		{
			if (DEBUG_LOGIC) DEBUG("== Made it back to channel on cycle "<<currentClockCycle<<" : "<<*trans);
			pendingLogicResponse = trans;
		}
		else return false;
	}
	else
	{
		if(simpleController.waitingACTS<CHANNEL_WORK_Q_MAX)
		{
			simpleController.AddTransaction(trans);
		}
		else return false;
	}

	return true;
}

// Assembly:
pushq %rax
movl (%rsi), %eax
cmpl $0x4, %eax
je 0xd239
cmpl $0x3, %eax
jne 0xd24c
movq 0x258(%rdi), %rdi
testq %rdi, %rdi
je 0xd266
movq (%rdi), %rax
xorl %edx, %edx
callq *0x10(%rax)
jmp 0xd25e
cmpq $0x0, 0x1f0(%rdi)
jne 0xd262
movq %rsi, 0x1f0(%rdi)
jmp 0xd25e
cmpl $0xf, 0x104(%rdi)
ja 0xd262
addq $0x10, %rdi
callq 0x11900
movb $0x1, %al
jmp 0xd264
xorl %eax, %eax
popq %rcx
retq
movq 0xbd83(%rip), %rdi      # 0x18ff0
leaq 0x5f54(%rip), %rsi      # 0x131c8
callq 0x31c0
leaq 0x705b(%rip), %rsi      # 0x142db
movq %rax, %rdi
callq 0x31c0
leaq 0x5ee2(%rip), %rsi      # 0x13171
movq %rax, %rdi
callq 0x31c0
movq %rax, %rdi
movl $0xbb, %esi
callq 0x3330
leaq 0x5f2e(%rip), %rsi      # 0x131d9
movq %rax, %rdi
callq 0x31c0
leaq 0x7058(%rip), %rsi      # 0x14312
movq %rax, %rdi
callq 0x31c0
movq %rax, %rdi
callq 0x30d0
xorl %edi, %edi
callq 0x3220
nop
// File: /workspace/github_cpp_makefile_star2_O3/dramninjasUMD[P]BOBSim/LogicLayerInterface.cpp
// Function: BOBSim::LogicLayerInterface::ReceiveLogicOperation(BOBSim::Transaction*, unsigned int)
void LogicLayerInterface::ReceiveLogicOperation(Transaction *trans, unsigned i)
{
	if (DEBUG_LOGIC) DEBUG("== Received in logic layer "<<simpleControllerID<<" on cycle "<<currentClockCycle<<" : "<<*trans);
	if (trans->transactionType == LOGIC_OPERATION)
	{
		pendingLogicOpsQueue.push_back(trans);
	}
	else
	{
		newOperationQueue.push_back(trans);
	}
}

// Assembly:
pushq %rax
movq %rsi, (%rsp)
cmpl $0x3, (%rsi)
jne 0xdf4b
movq 0x58(%rdi), %rax
movq 0x68(%rdi), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0xdf68
movq %rsi, (%rax)
addq $0x8, 0x58(%rdi)
jmp 0xdf85
movq 0x80(%rdi), %rax
cmpq 0x88(%rdi), %rax
je 0xdf76
movq %rsi, (%rax)
addq $0x8, 0x80(%rdi)
jmp 0xdf85
addq $0x28, %rdi
movq %rsp, %rsi
callq 0xe916
jmp 0xdf85
addq $0x78, %rdi
movq %rsp, %rdx
movq %rax, %rsi
callq 0x7b4c
popq %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/dramninjasUMD[P]BOBSim/Rank.cpp
// Function: BOBSim::Rank::Update()
void Rank::Update()
{
	for(unsigned i=0; i<NUM_BANKS; i++)
	{
		bankStates[i].UpdateStateChange();
	}

	for(unsigned i=0; i<readReturnCountdown.size(); i++)
	{
		readReturnCountdown[i]--;
	}
	if(readReturnCountdown.size()>0 && readReturnCountdown[0]==0)
	{
		(*ReadReturnCallback)(readReturnQueue[0],id);
		readReturnCountdown.erase(readReturnCountdown.begin());
		readReturnQueue.erase(readReturnQueue.begin());
	}

	//increment clock cycle
	currentClockCycle++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x50(%rbx), %rdi
addq %r14, %rdi
callq 0xc38e
addq $0x40, %r14
cmpq $0x200, %r14            # imm = 0x200
jne 0xf9d0
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
je 0xfa74
sarq $0x2, %rdx
xorl %esi, %esi
decl (%rax,%rsi,4)
incq %rsi
movl %esi, %edi
cmpq %rdi, %rdx
ja 0xf9ff
cmpq %rax, %rcx
je 0xfa74
cmpl $0x0, (%rax)
jne 0xfa74
movq 0x48(%rbx), %rdi
movq 0x30(%rbx), %rax
movq (%rax), %rsi
movl 0x10(%rbx), %edx
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rdx
leaq 0x4(%rdi), %rsi
cmpq %rdx, %rsi
je 0xfa47
subq %rsi, %rdx
callq 0x32f0
movq 0x20(%rbx), %rdx
addq $-0x4, %rdx
movq %rdx, 0x20(%rbx)
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rdx
leaq 0x8(%rdi), %rsi
cmpq %rdx, %rsi
je 0xfa6c
subq %rsi, %rdx
callq 0x32f0
movq 0x38(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0x38(%rbx)
incq 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/iZhangHui[P]CppPrimer/CH10_GenericAlgorithms/examples/rev-iters.cc
// Function: main
int main()
{
    vector<int> vec = {0,1,2,3,4,5,6,7,8,9};
    // reverse iterator of vector from back to front
    for (auto r_iter = vec.crbegin(); // binds r_iter to the last element
              r_iter != vec.crend();  // one before first element
              ++r_iter)          // decrements the iterator one element
        cout << *r_iter << endl; // prints 9, 8, 7, . . . 0
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movups 0xdb2(%rip), %xmm0      # 0x2014
leaq -0x70(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movups 0xd93(%rip), %xmm0      # 0x2004
movaps %xmm0, (%rsi)
movabsq $0x900000008, %rax      # imm = 0x900000008
movq %rax, 0x20(%rsi)
leaq -0x40(%rbp), %rbx
leaq -0x21(%rbp), %rcx
movl $0xa, %edx
movq %rbx, %rdi
callq 0x1330
movq 0x8(%rbx), %r15
movq 0x2d36(%rip), %rbx      # 0x3fd8
movq %r15, %r12
movq -0x40(%rbp), %rdi
cmpq %rdi, %r12
je 0x12ef
movl -0x4(%r12), %esi
movq %rbx, %rdi
callq 0x10e0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x1090
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
addq $-0x4, %r12
addq $-0x4, %r15
movq %rax, %rdi
callq 0x1060
jmp 0x12a5
testq %r12, %r12
je 0x1300
movq -0x30(%rbp), %rsi
subq %r15, %rsi
callq 0x10b0
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x1327
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x10b0
movq %rbx, %rdi
callq 0x10f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/kingufl[P]Rmapper/src/KDTree.cpp
// Function: KDNode::KDNode(std::vector<int, std::allocator<int>> const&, unsigned long const&, std::shared_ptr<KDNode> const&, std::shared_ptr<KDNode> const&)
KDNode::KDNode(const point_t &pt, const size_t &idx_, const KDNodePtr &left_,
               const KDNodePtr &right_) {
    x = pt;
    index = idx_;
    left = left_;
    right = right_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x38(%rdi)
movq %r15, %rdi
callq 0x4db0
movq (%r13), %rax
movq %rax, (%rbx)
movq (%r12), %rax
movq %rax, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
addq $0x8, %r12
movq %r12, %rsi
callq 0x5074
movq (%r14), %rax
movq %rax, 0x30(%rbx)
addq $0x38, %rbx
addq $0x8, %r14
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5074
movq %rax, %r14
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x37df
callq 0x50cc
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3440
movq %r14, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O3/kingufl[P]Rmapper/src/KDTree.cpp
// Function: KDNode::KDNode(std::pair<std::vector<int, std::allocator<int>>, unsigned long> const&, std::shared_ptr<KDNode> const&, std::shared_ptr<KDNode> const&)
KDNode::KDNode(const pointIndex &pi, const KDNodePtr &left_,
               const KDNodePtr &right_) {
    x = pi.first;
    index = pi.second;
    left = left_;
    right = right_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x38(%rdi)
movq %r15, %rdi
callq 0x4db0
movq 0x18(%r13), %rax
movq %rax, (%rbx)
movq (%r12), %rax
movq %rax, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
addq $0x8, %r12
movq %r12, %rsi
callq 0x5074
movq (%r14), %rax
movq %rax, 0x30(%rbx)
addq $0x38, %rbx
addq $0x8, %r14
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5074
movq %rax, %r14
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x3887
callq 0x50cc
movq %rbx, %rdi
movq %r15, %rsi
callq 0x346d
movq %r14, %rdi
callq 0x33d0