LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/ADAPTLab[P]MuDBSCAN/main.cpp
// Function: createDebugCSV(dataHdr*, int)
void createDebugCSV(DataHdr dataList, int rank)
{
	FILE* debug1;
	string currFile1("");

	currFile1 = debugFileName + patch::to_string(rank);

	debug1 = fopen(currFile1.c_str(), "w");

	printf("Before Remote Points Procedure %d \n",rank);
	for(int i = 0; i < dataList->localCnt; i++)
	{
		Data datai = dataList->dataClstElem + i;
		if(debug1!=NULL){
			fprintf(debug1, "%lf\t%lf\t%lf\t%d\n",datai->iData[0],datai->iData[1],datai->iData[2],(int)datai->core_tag); 

		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq -0x2c(%rbp), %r14
movl %esi, (%r14)
leaq 0x1675(%rip), %rsi      # 0xf00d
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x20f0
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x934d
leaq 0x68f5(%rip), %rsi      # 0x142b0
leaq -0x90(%rbp), %rdi
leaq -0x50(%rbp), %rdx
callq 0xd69b
leaq -0x70(%rbp), %r14
leaq -0x90(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x22b0
movq %r15, %rdi
callq 0x2110
leaq -0x50(%rbp), %rdi
callq 0x2110
movq (%r14), %rdi
leaq 0x1828(%rip), %rsi      # 0xf224
callq 0x2270
movq %rax, %r14
movl -0x2c(%rbp), %esi
leaq 0x1852(%rip), %rdi      # 0xf260
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x2040
leaq 0x1865(%rip), %r15      # 0xf284
xorl %r13d, %r13d
movslq 0x4(%rbx), %rax
cmpq %rax, %r13
jge 0xda61
testq %r14, %r14
je 0xda58
movq 0x8(%rbx), %rax
movq (%rax,%r12), %rcx
movsd (%rcx), %xmm0
movsd 0x8(%rcx), %xmm1
movsd 0x10(%rcx), %xmm2
movl 0x28(%rax,%r12), %edx
movq %r14, %rdi
movq %r15, %rsi
movb $0x3, %al
callq 0x2390
incq %r13
addq $0x40, %r12
jmp 0xda22
leaq -0x70(%rbp), %rdi
callq 0x2110
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2110
jmp 0xda8a
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2460
// File: /workspace/github_cpp_makefile_star2_O2/Gilaverbuch[P]FD_2D_WAVE/wave.cpp
// Function: main
int main()
{	

	model_parameters model;
	model.print_parameters();
	Field displacement(model);
	displacement.Propagator();

	// std::cout << "number of elements" << " " << elements_ << std::endl;
	// int n=10;
	// int a[n] = {};

	// std::cout << a[0] << " " << a[5] << std::endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
leaq -0xa0(%rbp), %rbx
movq %rbx, %rdi
callq 0x257c
movq %rbx, %rdi
callq 0x2a36
leaq -0x130(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x30b8
leaq -0x130(%rbp), %rdi
callq 0x348a
leaq -0xa0(%rbp), %rdi
callq 0x24c0
xorl %eax, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %rbp
retq
jmp 0x24a8
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x24c0
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O2/Gilaverbuch[P]FD_2D_WAVE/model_parameters.cpp
// Function: model_parameters::extractNumbersWords(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
double model_parameters::extractNumbersWords(std::string str){ 
    std::stringstream ss;     
  
    /* Storing the whole string into string stream */
    ss << str; 
  
    /* Running loop till the end of the stream */
    std::string temp; 
    double found, val; 
    while (!ss.eof()) { 
  
        // extracting word by word from stream 
        ss >> temp; 
  
        /* Checking the given word is integer or not */
        if (std::stringstream(temp) >> found) 
            // std::cout << found << std::endl;
  			val=found;
        /* To save from space at the end of string */
        temp = ""; 
    } 
   	return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
movq %rsi, %rbx
leaq -0x1e0(%rbp), %rdi
callq 0x2110
leaq -0x1d0(%rbp), %rdi
movq %rbx, %rsi
callq 0x2160
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x58(%rbp), %r14
leaq -0x368(%rbp), %r15
leaq -0x38(%rbp), %r13
leaq 0x19e7(%rip), %rbx      # 0x41e7
movq -0x1e0(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x1c0(%rbp,%rax)
jne 0x2875
leaq -0x1e0(%rbp), %rdi
movq %r14, %rsi
callq 0x21c0
movq %r15, %rdi
movq %r14, %rsi
pushq $0x18
popq %rdx
callq 0x2220
movq %r15, %rdi
movq %r13, %rsi
callq 0x2100
movq -0x368(%rbp), %rax
movq -0x18(%rax), %rax
movb -0x348(%rbp,%rax), %r12b
movq %r15, %rdi
callq 0x2120
testb $0x5, %r12b
jne 0x2868
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22a0
jmp 0x2800
leaq -0x58(%rbp), %rdi
callq 0x20a0
leaq -0x1e0(%rbp), %rdi
callq 0x2120
movsd -0x30(%rbp), %xmm0
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x28c5
jmp 0x28b9
movq %rax, %rbx
leaq -0x368(%rbp), %rdi
callq 0x2120
jmp 0x28bc
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x20a0
leaq -0x1e0(%rbp), %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O2/Gilaverbuch[P]FD_2D_WAVE/model_parameters.cpp
// Function: model_parameters::read_vel_profile()
void model_parameters::read_vel_profile(){

	std::ifstream inFile;

	inFile.open("vel_profile.txt");

	while(!inFile.eof())
	{
	    int  a;
	    double b, c;
	    inFile >> a >> b >> c; // extracts 3 values for layer


	    x_range.push_back(a);
		density_range.push_back(b);
		velocity_range.push_back(c);
	}
	layers = x_range.size();

	std::cout << layers << " " << velocity_range[0] << " " << velocity_range[1] << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rdi, %r14
leaq -0x258(%rbp), %rbx
movq %rbx, %rdi
callq 0x21a0
leaq 0x1804(%rip), %rsi      # 0x410b
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x20f0
leaq 0x50(%r14), %r15
leaq 0x68(%r14), %r12
movq %r14, -0x38(%rbp)
leaq 0x80(%r14), %rax
movq %rax, -0x30(%rbp)
leaq -0x3c(%rbp), %r14
leaq -0x50(%rbp), %r13
leaq -0x48(%rbp), %rbx
movq -0x258(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x238(%rbp,%rax)
jne 0x2993
leaq -0x258(%rbp), %rdi
movq %r14, %rsi
callq 0x20e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x2100
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2100
movq %r15, %rdi
movq %r14, %rsi
callq 0x2db0
movq %r12, %rdi
movq %r13, %rsi
callq 0x2dd6
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x2dd6
jmp 0x2935
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rsi
subq 0x50(%rax), %rsi
shrq $0x2, %rsi
movl %esi, 0x18(%rax)
movq 0x362b(%rip), %rdi      # 0x5fd8
callq 0x2260
leaq 0x182d(%rip), %rsi      # 0x41e6
movq %rax, %rdi
callq 0x2170
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movsd (%rcx), %xmm0
movq %rax, %rdi
callq 0x2230
leaq 0x180b(%rip), %rsi      # 0x41e6
movq %rax, %rdi
callq 0x2170
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movsd 0x8(%rcx), %xmm0
movq %rax, %rdi
callq 0x2230
movq %rax, %rdi
callq 0x20c0
leaq -0x258(%rbp), %rdi
callq 0x2060
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2a1f
movq %rax, %rbx
leaq -0x258(%rbp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O2/Gilaverbuch[P]FD_2D_WAVE/Field.cpp
// Function: Field::initialize(int, int, double**, std::vector<int, std::allocator<int>>, std::vector<double, std::allocator<double>>)
void Field::initialize(int size_y, int size_x, double **A, std::vector<int>  x_range, std::vector<double> val){

	int i, k, j, pos1, pos2;
	pos1 = 0;

	for (k=0; k<int(x_range.size()); k++){

		pos2 = int(x_range[k]/dx);

		for (i=pos1; i<pos2; i++){

			for (j=0; j<size_x; j++){

				A[i][j] = val[k];

			}
		}
		pos1 = pos2; 
	}
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %esi
movq (%r8), %r10
movq 0x8(%r8), %r8
subq %r10, %r8
shrq $0x2, %r8
movl 0x70(%rdi), %edi
xorl %r11d, %r11d
testl %edx, %edx
cmovlel %r11d, %esi
testl %r8d, %r8d
cmovlel %r11d, %r8d
xorl %ebx, %ebx
cmpq %r8, %r11
je 0x3483
movl (%r10,%r11,4), %eax
cltd
idivl %edi
movslq %ebx, %rdx
movslq %eax, %rbx
cmpq %rbx, %rdx
jge 0x347c
xorl %r14d, %r14d
cmpq %r14, %rsi
je 0x3477
movq (%r9), %r15
movsd (%r15,%r11,8), %xmm0
movq (%rcx,%rdx,8), %r15
movsd %xmm0, (%r15,%r14,8)
incq %r14
jmp 0x345a
incq %rdx
jmp 0x3452
incq %r11
movl %eax, %ebx
jmp 0x3440
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Gilaverbuch[P]FD_2D_WAVE/Field.cpp
// Function: Field::print_to_file(int, int, double**, double*, double*, int)
void Field::print_to_file(int size_x, int size_y, double **A, double *pos_x, double *pos_y, int itteration){

	int ii, jj;
    std::ofstream ofile;

    std::cout << " printing results " << std::endl;

    ofile.open("wave_signal"+std::to_string(itteration)+".txt"); 


    for (ii=0; ii<size_y; ii=ii+5){
    	for (jj=0; jj<size_x; jj=jj+5){

         	// std::cout << ii << " " << jj << " " <<  pos_x[jj] << " " << pos_y[ii] << std::endl;
         	ofile << pos_x[jj] << " " << pos_y[ii] << " " << A[ii][jj] << std::endl;
       }
   }
   // j=20;
   // for (i=0; i<size_y; i++){

   //   ofile << pos_y[i] << " " << A[i][j] << std::endl;
   // }
    ofile.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %r9, -0x38(%rbp)
movq %r8, -0x40(%rbp)
movq %rcx, %r15
movl %edx, %ebx
movl %esi, %r13d
leaq -0x2a0(%rbp), %rdi
callq 0x2250
movq 0x2779(%rip), %rdi      # 0x5fd8
leaq 0x99f(%rip), %rsi       # 0x4205
callq 0x2170
movq %rax, %rdi
callq 0x20c0
movl 0x10(%rbp), %esi
leaq -0x60(%rbp), %rdi
callq 0x3ada
leaq 0x992(%rip), %rsi       # 0x4218
leaq -0x80(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x3aac
leaq 0x940(%rip), %rdx       # 0x41da
leaq -0xa0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x3a83
leaq -0x2a0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
pushq $0x10
popq %rdx
callq 0x20b0
leaq -0xa0(%rbp), %rdi
callq 0x20a0
leaq -0x80(%rbp), %rdi
callq 0x20a0
leaq -0x60(%rbp), %rdi
callq 0x20a0
movslq %r13d, %r12
movslq %ebx, %rax
movq %rax, -0x30(%rbp)
xorl %ebx, %ebx
leaq 0x8f5(%rip), %r13       # 0x41e6
cmpq -0x30(%rbp), %rbx
jge 0x3962
xorl %r14d, %r14d
cmpq %r12, %r14
jge 0x395c
movq -0x40(%rbp), %rax
movsd (%rax,%r14,8), %xmm0
leaq -0x2a0(%rbp), %rdi
callq 0x2230
movq %rax, %rdi
movq %r13, %rsi
callq 0x2170
movq -0x38(%rbp), %rcx
movsd (%rcx,%rbx,8), %xmm0
movq %rax, %rdi
callq 0x2230
movq %rax, %rdi
movq %r13, %rsi
callq 0x2170
movq (%r15,%rbx,8), %rcx
movsd (%rcx,%r14,8), %xmm0
movq %rax, %rdi
callq 0x2230
movq %rax, %rdi
callq 0x20c0
addq $0x5, %r14
jmp 0x38fa
addq $0x5, %rbx
jmp 0x38f1
leaq -0x2a0(%rbp), %rdi
callq 0x21f0
leaq -0x2a0(%rbp), %rdi
callq 0x2200
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x20a0
jmp 0x39a0
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x20a0
jmp 0x39ae
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x20a0
jmp 0x39c0
jmp 0x39bd
jmp 0x39bd
movq %rax, %rbx
leaq -0x2a0(%rbp), %rdi
callq 0x2200
movq %rbx, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O2/vividvilla[P]hackerrank/src/candies.cpp
// Function: getMinimumCandies(std::vector<int, std::allocator<int>>)
int getMinimumCandies(vector<int> c) {
    int N = c.size();
    vector<int> minR = vector<int>(N, 1);
    vector<int> minL = vector<int>(N, 1);

    for (int i = N - 2; i >= 0; i--) {
        if (c[i + 1] < c[i])
            minR[i] = 1 + minR[i + 1];
    }

    for (int i = 1; i < N; i++) {
        if (c[i - 1] < c[i])
            minL[i] = 1 + minL[i - 1];
    }

    int t = 0;
    for (int i = 0; i < N; i++)
        t += max(minR[i], minL[i]);

    return t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %r12
subq (%rdi), %r12
shrq $0x2, %r12
movslq %r12d, %r14
pushq $0x1
popq %rbp
leaq 0x10(%rsp), %rdx
movl %ebp, (%rdx)
leaq 0x28(%rsp), %rdi
leaq 0xc(%rsp), %r15
movq %r14, %rsi
movq %r15, %rcx
callq 0x142c
movl %ebp, (%r15)
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
leaq 0xb(%rsp), %rcx
movq %r14, %rsi
callq 0x142c
leal -0x2(%r12), %eax
movq 0x28(%rsp), %rcx
leal -0x1(%r12), %edx
shlq $0x2, %rdx
testl %eax, %eax
js 0x12c8
movq (%rbx), %rdi
movl (%rdi,%rdx), %r8d
movl %eax, %esi
cmpl (%rdi,%rsi,4), %r8d
jge 0x12c0
movl (%rcx,%rdx), %edi
incl %edi
movl %edi, (%rcx,%rsi,4)
decl %eax
addq $-0x4, %rdx
jmp 0x12a5
movq 0x10(%rsp), %rax
movslq %r12d, %rcx
pushq $0x1
popq %rdx
cmpq %rcx, %rdx
jge 0x12f2
movq (%rbx), %rsi
movl -0x4(%rsi,%rdx,4), %edi
cmpl (%rsi,%rdx,4), %edi
jge 0x12ed
movl -0x4(%rax,%rdx,4), %esi
incl %esi
movl %esi, (%rax,%rdx,4)
incq %rdx
jmp 0x12d3
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
xorl %edx, %edx
testl %r12d, %r12d
movl $0x0, %esi
cmovgl %r12d, %esi
xorl %ebx, %ebx
cmpq %rdx, %rsi
je 0x1327
movl (%rax,%rdx,4), %edi
movl (%rcx,%rdx,4), %r8d
cmpl %r8d, %edi
cmovgl %edi, %r8d
addl %r8d, %ebx
incq %rdx
jmp 0x130c
leaq 0x10(%rsp), %rdi
callq 0x151a
leaq 0x28(%rsp), %rdi
callq 0x151a
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x151a
movq %rbx, %rdi
callq 0x1100
// File: /workspace/github_cpp_makefile_star2_O2/vividvilla[P]hackerrank/src/candies.cpp
// Function: main
int main() {
    int N, x;
    cin >> N;

    vector<int> c;
    for (int i = 0; i < N; i++) {
        cin >> x;
        c.push_back(x);
    }

    cout << getMinimumCandies(c) << endl;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq 0x2c70(%rip), %rbx      # 0x3fe0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1080
leaq 0x10(%rsp), %r14
andq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
xorl %ebp, %ebp
leaq 0xc(%rsp), %r15
cmpl 0x8(%rsp), %ebp
jge 0x13b5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1080
movq %r14, %rdi
movq %r15, %rsi
callq 0x1482
incl %ebp
jmp 0x1395
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x14a0
leaq 0x30(%rsp), %rdi
callq 0x123c
movq 0x2bfb(%rip), %rdi      # 0x3fd0
movl %eax, %esi
callq 0x10f0
movq %rax, %rdi
callq 0x1060
leaq 0x30(%rsp), %rdi
callq 0x151a
leaq 0x10(%rsp), %rdi
callq 0x151a
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1416
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x151a
jmp 0x1419
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x151a
movq %rbx, %rdi
callq 0x1100
nop
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH12_DynamicMemory/examples/release.cc
// Function: main
int main()
{
	unique_ptr<string> p1(new string("Stegosaurus"));

	// transfers ownership from p1
	// (which points to the string Stegosaurus) to p2
	unique_ptr<string> p2(p1.release()); // release makes p1 null
	cout << *p2 << endl; // prints Stegosaurus

	unique_ptr<string> p3(new string("Trex"));

	// reset deletes the memory to which p2 had pointed
	// and transfers ownership from p3 to p2
	p2.reset(p3.release());
	cout << *p2 << endl; // prints Trex

	// p1 is null, p2 is steg, and p3 is trex
	if (p1)
		cout << "p1 not null?" << endl;
	if (p3)
		cout << "p2 not null?" << endl;
	cout << *p2 << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
pushq $0x20
popq %rdi
callq 0x1090
movq %rax, %r14
leaq 0xddb(%rip), %rsi       # 0x2004
leaq -0x20(%rbp), %rdx
movq %rax, %rdi
callq 0x1030
andq $0x0, -0x30(%rbp)
movq %r14, -0x20(%rbp)
movq 0x2d93(%rip), %rdi      # 0x3fd8
movq %r14, %rsi
callq 0x1070
movq %rax, %rdi
callq 0x1050
pushq $0x20
popq %rdi
callq 0x1090
movq %rax, %r14
leaq 0xda9(%rip), %rsi       # 0x2010
leaq -0x11(%rbp), %rdx
movq %rax, %rdi
callq 0x1030
andq $0x0, -0x28(%rbp)
leaq -0x20(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13ba
movq (%rbx), %rsi
movq 0x2d47(%rip), %rdi      # 0x3fd8
callq 0x1070
movq %rax, %rdi
callq 0x1050
cmpq $0x0, -0x30(%rbp)
je 0x12c0
movq 0x2d2c(%rip), %rdi      # 0x3fd8
leaq 0xd62(%rip), %rsi       # 0x2015
callq 0x1080
movq %rax, %rdi
callq 0x1050
cmpq $0x0, -0x28(%rbp)
je 0x12e2
movq 0x2d0a(%rip), %rdi      # 0x3fd8
leaq 0xd4d(%rip), %rsi       # 0x2022
callq 0x1080
movq %rax, %rdi
callq 0x1050
movq -0x20(%rbp), %rsi
movq 0x2ceb(%rip), %rdi      # 0x3fd8
callq 0x1070
movq %rax, %rdi
callq 0x1050
leaq -0x28(%rbp), %rdi
callq 0x136e
leaq -0x20(%rbp), %rdi
callq 0x136e
leaq -0x30(%rbp), %rdi
callq 0x136e
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x10a0
jmp 0x1353
jmp 0x1342
movq %rax, %rbx
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x10a0
jmp 0x1365
movq %rax, %rbx
jmp 0x1353
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x136e
leaq -0x20(%rbp), %rdi
callq 0x136e
leaq -0x30(%rbp), %rdi
callq 0x136e
movq %rbx, %rdi
callq 0x10c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/bonetblai[P]mdp-engine/tree/./tree.h
// Function: problem_t::fill_noisy_states()
void fill_noisy_states() {
        if( r_ > 0.0 ) {
            Problem::hash_t<state_t> hash(*this);
            Algorithm::state_space_t<state_t> state_space(*this);
            state_space.generate_space(init_, hash);
            for( Problem::hash_t<state_t>::const_iterator hi = hash.begin(); hi != hash.end(); ++hi ) {
                if( Random::real() < r_ ) noisy_.insert((*hi).first);
            }
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
xorps %xmm0, %xmm0
ucomiss 0x24(%rdi), %xmm0
jae 0x765e
movq %rdi, %rbx
leaq 0x40(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
andq $0x0, 0x8(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x25a56(%rip), %rcx     # 0x2d060
movq %rcx, -0x38(%rax)
movq %rdi, 0x10(%rax)
andl $0x0, 0x18(%rax)
movq %rsp, %rdi
movq %rbx, (%rdi)
leaq 0x28(%rbx), %rsi
leaq 0x8(%rsp), %rdx
callq 0x78fc
movq 0x20(%rsp), %r15
leaq 0x30(%rbx), %r14
testq %r15, %r15
je 0x7654
callq 0x8244
ucomiss 0x24(%rbx), %xmm0
jae 0x764f
leaq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0x8250
movq (%r15), %r15
jmp 0x7633
leaq 0x8(%rsp), %rdi
callq 0xed04
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x766a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xed04
movq %rbx, %rdi
callq 0x5380
nop
// File: /workspace/github_cpp_makefile_star2_O2/bonetblai[P]mdp-engine/tree/./tree.h
// Function: state_t::onebits() const
unsigned onebits() const {
        unsigned count = 0;
        std::pair<unsigned, unsigned> b = branch();
        for( unsigned i = 0; i < 8 * sizeof(unsigned); ++i ) {
            count += b.first % 2;
            b.first = b.first >> 1;
            count += b.second % 2;
            b.second = b.second >> 1;
        }
        return count;
    }

// Assembly:
movl $0x3ffffff, %ecx        # imm = 0x3FFFFFF
andl (%rdi), %ecx
movl 0x4(%rdi), %edx
xorl %eax, %eax
pushq $0x20
popq %rsi
subl $0x1, %esi
jb 0x86fd
movl %ecx, %edi
andl $0x1, %edi
shrl %ecx
movl %edx, %r8d
andl $0x1, %r8d
addl %eax, %r8d
addl %edi, %r8d
shrl %edx
movl %r8d, %eax
jmp 0x86dd
retq
// File: /workspace/github_cpp_makefile_star2_O2/bonetblai[P]mdp-engine/tree/./tree.h
// Function: state_t::print(std::ostream&) const
void print(std::ostream &os) const {
        bits_t b1(branch1()), b2(data2_);
        os << "( " << depth()
           << " , [" << branch1()
           << "|" << data2_
           << "]:" << b1
           << "|" << b2 << " )";
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %r15
movl $0x3ffffff, %ecx        # imm = 0x3FFFFFF
andl (%rdi), %ecx
leaq 0x4(%rsp), %r14
movl %ecx, (%r14)
movl 0x4(%rdi), %ecx
movq %rsp, %rbx
movl %ecx, (%rbx)
leaq 0xd9e2(%rip), %rsi      # 0x1cb94
movq %rax, %rdi
callq 0x5220
movl (%r15), %esi
shrl $0x1a, %esi
movq %rax, %rdi
callq 0x5150
leaq 0xd9c8(%rip), %rsi      # 0x1cb97
movq %rax, %rdi
callq 0x5220
movl (%r15), %esi
andl $0x3ffffff, %esi        # imm = 0x3FFFFFF
movq %rax, %rdi
callq 0x5150
leaq 0xd9ad(%rip), %r12      # 0x1cb9c
movq %rax, %rdi
movq %r12, %rsi
callq 0x5220
movl 0x4(%r15), %esi
movq %rax, %rdi
callq 0x5150
leaq 0xd991(%rip), %rsi      # 0x1cb9e
movq %rax, %rdi
callq 0x5220
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0xf258
movq %r15, %rdi
movq %r12, %rsi
callq 0x5220
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0xf258
leaq 0xd95e(%rip), %rsi      # 0x1cba1
movq %r14, %rdi
callq 0x5220
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]optimal-seed-solver/getReference.cc
// Function: main
int main(int argc, const char* argv[]) {
	RefDB refDB;
	if (argc != 2) {
		cerr << "Please also put the reference file name" << endl;
		exit(1);
	}

	refDB.loadRefFile(argv[1]);

	int chromo_number = -1;
	int location;
	int length;

	cout << "Num of chromosomes: " << refDB.getNumOfChromo() << endl;

	while (1) {
		cout << "please input chromo number: " << endl;
		int tempChromoNum;
		cin >> tempChromoNum;
		if (tempChromoNum != chromo_number) {
			chromo_number = tempChromoNum;
			refDB.loadChromo(chromo_number);
		}

		cout << "please input location: " << endl;
		cin >> location;
		cout << "please input length: " << endl;
		cin >> length;

		cout << refDB.getRefSeq(location, length) << endl;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x50(%rsp), %rdi
callq 0x26d4
cmpl $0x2, %ebp
jne 0x25a6
movq 0x8(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x2602
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2764
leaq 0x10(%rsp), %rdi
callq 0x20e0
movq 0x3b20(%rip), %rdi      # 0x5fc8
leaq 0x1b7d(%rip), %rsi      # 0x402c
callq 0x21b0
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x2b72
movl %eax, %esi
movq %rbx, %rdi
callq 0x2140
movq %rax, %rdi
callq 0x20f0
pushq $-0x1
popq %r12
movq 0x3aea(%rip), %rbx      # 0x5fc8
movq 0x3af3(%rip), %r15      # 0x5fd8
leaq 0x30(%rsp), %r13
leaq 0x50(%rsp), %rbp
movq %rbx, %rdi
leaq 0x1b48(%rip), %rsi      # 0x4041
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
callq 0x2120
movl 0x4(%rsp), %r14d
cmpl %r12d, %r14d
je 0x252b
movq %rbp, %rdi
movl %r14d, %esi
callq 0x29d8
movl %r14d, %r12d
movq %rbx, %rdi
leaq 0x1b29(%rip), %rsi      # 0x405e
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
movq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0x2120
movq %rbx, %rdi
leaq 0x1b1d(%rip), %rsi      # 0x4076
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2120
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %ecx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2b9c
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2190
movq %rax, %rdi
callq 0x20f0
movq %r13, %rdi
callq 0x20e0
jmp 0x24ef
movq 0x3a43(%rip), %rdi      # 0x5ff0
leaq 0x1a50(%rip), %rsi      # 0x4004
callq 0x21b0
movq %rax, %rdi
callq 0x20f0
pushq $0x1
popq %rdi
callq 0x2210
jmp 0x25ec
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x25e3
jmp 0x25ec
jmp 0x25ec
jmp 0x25ec
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20e0
jmp 0x25ef
jmp 0x25ec
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x2732
movq %rbx, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/smuething[P]dune-cxx11/09-initializer_list.cc
// Function: foo(std::initializer_list<int>)
int foo(std::initializer_list<int> il)
{
  int res = 0;
  for (const int* it = il.begin(); it != il.end(); ++it)
    res += *it;
  return res;
}

// Assembly:
shlq $0x2, %rsi
xorl %ecx, %ecx
xorl %eax, %eax
cmpq %rcx, %rsi
je 0x1152
addl (%rdi,%rcx), %eax
addq $0x4, %rcx
jmp 0x1144
retq
// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/Cerebron.cc
// Function: CerebronPredictor::initFeatures()
void
CerebronPredictor::initFeatures()
{
	vector<string>* criterias_name = &m_criterias_names;
	vector<params_hash>* features_hash = &m_features_hash;
	vector<FeatureTable*>* features = &m_features;		

	for(auto feature : *criterias_name)
	{
		features->push_back( new FeatureTable(m_tableSize, feature, false));
		features_hash->push_back( parseFeatureName(feature) );
		/*
		if(feature == "CallStack" || feature == "CallStack1")
			m_need_callee_file = true;
		*/
	}	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
leaq 0x288(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x270(%rdi), %rax
movq %rax, 0x10(%rsp)
movq 0x2a0(%rdi), %rsi
movq %rdi, 0x18(%rsp)
movq 0x2a8(%rdi), %rax
movq %rax, 0x20(%rsp)
leaq 0x98(%rsp), %r14
leaq 0x78(%rsp), %r15
leaq 0x30(%rsp), %r12
leaq 0x58(%rsp), %r13
cmpq 0x20(%rsp), %rsi
je 0x6655
movq %r14, %rdi
movq %rsi, 0x28(%rsp)
callq 0x5410
movl $0xa8, %edi
callq 0x52e0
movq %rax, %rbx
movq %r14, %rsi
movq 0x18(%rsp), %rax
movl 0x2f0(%rax), %ebp
movq %r15, %rdi
callq 0x5410
movq %r15, %rdx
movb $0x1, %r15b
movq %rbx, %rdi
movl %ebp, %esi
movq %rdx, %rbp
xorl %ecx, %ecx
callq 0x10b8c
movq %rbx, 0x30(%rsp)
xorl %r15d, %r15d
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0xae24
movq %rbp, %r15
movq %rbp, %rdi
callq 0x5618
movq %r13, %rdi
movq %r14, %rsi
callq 0x5410
movq %r12, %rdi
movq %r13, %rdx
callq 0x69fa
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0xaf84
movq %r12, %rdi
callq 0x5618
movq %r13, %rdi
callq 0x5618
movq %r14, %rdi
callq 0x5618
movq 0x28(%rsp), %rsi
addq $0x20, %rsi
jmp 0x659c
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6687
movq %rax, %r14
jmp 0x667b
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x5618
leaq 0x58(%rsp), %rdi
callq 0x5618
jmp 0x66ab
movq %rax, %r14
jmp 0x66ab
movq %rax, %r14
jmp 0x66a3
movq %rax, %r14
leaq 0x78(%rsp), %rdi
callq 0x5618
testb %r15b, %r15b
je 0x66ab
movq %rbx, %rdi
callq 0x52a0
leaq 0x98(%rsp), %rdi
callq 0x5618
movq %r14, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/Cerebron.cc
// Function: CerebronPredictor::load_callee_file()
void 
CerebronPredictor::load_callee_file()
{

	string mem_trace = simu_parameters.memory_traces[0];
	string dir_name = splitFilename(mem_trace);
	string callee_filename = dir_name + "/callee_recap.txt"; 
	
	ifstream file(callee_filename);
	
	assert(file && "Callee file not found\n");
	string line;
	
	while( getline(file, line))
	{		
		m_callee_map.insert(pair<uint64_t,int>( hexToInt(line) , 0));		
	};
		
	file.close();	
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e0, %rsp            # imm = 0x2E0
movq %rdi, %rbx
leaq 0x37876(%rip), %rax     # 0x3df50
movq 0x50(%rax), %rsi
leaq 0x98(%rsp), %r14
movq %r14, %rdi
callq 0x5410
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0x5410
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x25127
leaq 0x58(%rsp), %rdi
callq 0x5618
leaq 0x22fd6(%rip), %rdx     # 0x296f1
leaq 0x38(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x9fc4
leaq 0xd8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x5500
movq 0xd8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xf8(%rsp,%rax)
jne 0x682c
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x308, %rbx            # imm = 0x308
leaq 0xd8(%rsp), %r14
leaq 0x18(%rsp), %r15
leaq 0xb8(%rsp), %r12
leaq 0x8(%rsp), %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x50a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x67d6
movq %r12, %rdi
movq %r15, %rsi
callq 0x5410
movq %r12, %rdi
callq 0x24fc9
movq %rax, 0x8(%rsp)
andl $0x0, 0x10(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0xb52c
movq %r12, %rdi
callq 0x5618
jmp 0x678b
leaq 0xd8(%rsp), %rdi
callq 0x50b0
leaq 0x18(%rsp), %rdi
callq 0x5618
leaq 0xd8(%rsp), %rdi
callq 0x50e0
leaq 0x38(%rsp), %rdi
callq 0x5618
leaq 0x78(%rsp), %rdi
callq 0x5618
leaq 0x98(%rsp), %rdi
callq 0x5618
addq $0x2e0, %rsp            # imm = 0x2E0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x22ed0(%rip), %rdi     # 0x29703
leaq 0x22845(%rip), %rsi     # 0x2907f
leaq 0x22ee4(%rip), %rcx     # 0x29725
movl $0x36b, %edx            # imm = 0x36B
callq 0x51e0
jmp 0x687c
movq %rax, %rbx
jmp 0x6896
movq %rax, %rbx
jmp 0x68a0
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
jmp 0x68a5
movq %rax, %rbx
jmp 0x68aa
jmp 0x6868
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x5618
jmp 0x687f
jmp 0x687c
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x5618
leaq 0xd8(%rsp), %rdi
callq 0x50e0
leaq 0x38(%rsp), %rdi
callq 0x5618
leaq 0x78(%rsp), %rdi
callq 0x5618
leaq 0x98(%rsp), %rdi
callq 0x5618
movq %rbx, %rdi
callq 0x5570
nop
// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/Cerebron.cc
// Function: CerebronPredictor::parseFeatureName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
params_hash
CerebronPredictor::parseFeatureName(string feature_name)
{
	params_hash result;

	vector<string> split_line = split(feature_name , '_');
	result.index = split_line[0];
	result.nbBlock = atoi(split_line[1].c_str());
	
	if(split_line.size() == 3)
		result.xorWithPC = split_line[2] == "1" ? true : false;
	else
		result.xorWithPC = false;
		
	return result;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rdi, %rbx
callq 0xa136
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x5410
movq %rsp, %rdi
leaq 0x18(%rsp), %rsi
pushq $0x5f
popq %rdx
callq 0x24e58
leaq 0x18(%rsp), %rdi
callq 0x5618
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0x51b0
movq (%rsp), %r14
movq 0x20(%r14), %rdi
callq 0x5490
movl %eax, 0x24(%rbx)
movq 0x8(%rsp), %rax
subq %r14, %rax
cmpq $0x60, %rax
jne 0x6a72
addq $0x40, %r14
leaq 0x23bbe(%rip), %rsi     # 0x2a626
movq %r14, %rdi
callq 0x9f59
jmp 0x6a74
xorl %eax, %eax
movb %al, 0x20(%rbx)
movq %rsp, %rdi
callq 0x9ef6
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x9ef6
jmp 0x6aa9
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x5618
jmp 0x6aa9
movq %rax, %r14
movq %rbx, %rdi
callq 0x5618
movq %r14, %rdi
callq 0x5570
nop
// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/Cerebron.cc
// Function: CerebronPredictor::allocateInNVM(unsigned long, Access)
allocDecision
CerebronPredictor::allocateInNVM(uint64_t set, Access element)
{
//	if(element.isInstFetch())
//		return ALLOCATE_IN_NVM;
	
	update_globalPChistory(element.m_pc);
	if( hitInSRAMMissingTags( element.block_addr, set) )
		element.m_pc = missingTagMissPC( element.block_addr , set);
		
	return activationFunction(element.isWrite() , element.block_addr , element.m_pc);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x30(%rsp), %r13
movq 0x10(%r13), %r15
movq %r15, %rsi
callq 0x20054
movq 0x30(%r13), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x1fd06
testb %al, %al
je 0x6b01
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x1fa36
movq %rax, %r15
movl 0x1c(%r13), %eax
cmpl $0x3, %eax
sete %cl
cmpl $0x6, %eax
sete %al
orb %cl, %al
movzbl %al, %esi
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x6b2e
nop
// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/Cerebron.cc
// Function: CerebronPredictor::classifyRD(int, int, bool)
RD_TYPE
CerebronPredictor::classifyRD(int set , int index, bool inNVM)
{
	vector<CacheEntry*> line;
	int64_t ref_rd = 0;
	if(inNVM)
	{
		ref_rd = m_tableNVM[set][index]->policyInfo;
		line = m_tableNVM[set];
	}
	else
	{
		line = m_tableSRAM[set];
		ref_rd = m_tableSRAM[set][index]->policyInfo;
	}
	
	int position = 0;
	/* Determine the position of the cache line in the LRU stack */
//	debug_file << "classifyRD, cpt_time =  " << cpt_time << ", set = " << set << " col = " << index << ", ref_rd = " << ref_rd << endl;
	for(unsigned i = 0 ; i < line.size() ; i ++)
	{
//		debug_file << "\tPolicy[" << i << "] = " << line[i]->policyInfo << endl;
		if(line[i]->policyInfo > ref_rd && line[i]->isValid)
			position++;
	}	
//	debug_file << "Position = " << position << endl;

	if(simu_parameters.nvm_assoc > simu_parameters.sram_assoc)
	{
		if(position < simu_parameters.mediumrd_def)
			return RD_SHORT;
		else
			return RD_MEDIUM;	
	}
	else
	{
		if(position < simu_parameters.mediumrd_def)
			return RD_SHORT;
		else
			return RD_MEDIUM;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebx
movq %rdi, %r14
andq $0x0, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movslq %esi, %rax
testl %ecx, %ecx
je 0x7ef5
movq 0x10(%r14), %rcx
movq (%rcx), %rcx
imulq $0x18, %rax, %rax
leaq (%rcx,%rax), %rsi
movslq %ebx, %rdx
movq (%rcx,%rax), %rax
movq (%rax,%rdx,8), %rax
movl 0x38(%rax), %ebx
movq %rsp, %rdi
callq 0x9ffc
jmp 0x7f20
movq 0x8(%r14), %rcx
imulq $0x18, %rax, %r15
movq (%rcx), %rsi
addq %r15, %rsi
movq %rsp, %rdi
callq 0x9ffc
movq 0x8(%r14), %rax
movq (%rax), %rax
movslq %ebx, %rcx
movq (%rax,%r15), %rax
movq (%rax,%rcx,8), %rax
movl 0x38(%rax), %ebx
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
xorl %edx, %edx
xorl %esi, %esi
movl %esi, %esi
cmpq %rsi, %rcx
jbe 0x7f4d
movq (%rax,%rsi,8), %rdi
cmpl %ebx, 0x38(%rdi)
jle 0x7f49
movzbl (%rdi), %edi
addl %edi, %edx
incl %esi
jmp 0x7f34
leaq 0x35ffc(%rip), %rax     # 0x3df50
xorl %ebx, %ebx
cmpl 0x1fc(%rax), %edx
setge %bl
movq %rsp, %rdi
callq 0xb6b2
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb6b2
movq %rbx, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/Cerebron.cc
// Function: CerebronPredictor::openNewTimeFrame()
void
CerebronPredictor::openNewTimeFrame()
{
	stats_nbBPrequests.push_back(0);
	stats_nbDeadLine.push_back(0);
	
	stats_missCounter.push_back( miss_counter );
	stats_nbHits = 0, stats_nbMiss = 0;
	
	if(simu_parameters.perceptron_compute_variance)
	{
		if(stats_variances_buffer.size() != 0)
		{
			double avg = 0;
			for(unsigned i = 0 ; i < stats_variances_buffer.size() ; i++)
				avg += stats_variances_buffer[i];
			avg /= (double)stats_variances_buffer.size();

			stats_variances.push_back(avg);	
			stats_variances_buffer.clear();
		}
	}

	for(auto feature : m_features)
		feature->openNewTimeFrame();
	
	
	Predictor::openNewTimeFrame();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
addq $0x388, %rdi            # imm = 0x388
leaq 0x8(%rsp), %r14
andq $0x0, (%r14)
movq %r14, %rsi
callq 0xb1ba
leaq 0x3a0(%rbx), %rdi
andq $0x0, (%r14)
leaq 0x8(%rsp), %rsi
callq 0xb1ba
leaq 0x3b8(%rbx), %rdi
leaq 0x349a5(%rip), %rsi     # 0x3e1a0
callq 0x9f84
xorpd %xmm0, %xmm0
movupd %xmm0, 0x3d0(%rbx)
leaq 0x3473d(%rip), %rax     # 0x3df50
cmpb $0x1, 0x1cd(%rax)
jne 0x9884
movq 0x3e0(%rbx), %rcx
movq 0x3e8(%rbx), %rax
subq %rcx, %rax
je 0x9884
sarq $0x3, %rax
xorl %edx, %edx
xorpd %xmm0, %xmm0
movl %edx, %edx
cmpq %rdx, %rax
jbe 0x984f
addsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, 0x8(%rsp)
incl %edx
jmp 0x9839
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
leaq 0x8(%rsp), %rsi
movsd %xmm0, (%rsi)
leaq 0x3f8(%rbx), %rdi
callq 0x9fa2
movq 0x3e0(%rbx), %rax
cmpq %rax, 0x3e8(%rbx)
je 0x9884
movq %rax, 0x3e8(%rbx)
movq 0x270(%rbx), %r14
movq 0x278(%rbx), %r15
cmpq %r15, %r14
je 0x98a5
movq (%r14), %rdi
callq 0x111d4
addq $0x8, %r14
jmp 0x9892
movq %rbx, %rdi
callq 0x1fdb6
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/Cerebron.cc
// Function: CerebronPredictor::finishSimu()
void 
CerebronPredictor::finishSimu()
{
	if(simu_parameters.perceptron_drawFeatureMaps)
	{
		drawFeatureMaps();
	}

	CacheEntry* entry = NULL;
	for(int i = 0 ; i < m_nb_set ; i++)
	{
		for(int j = 0 ; j < m_nbNVMways ; j++)
		{
			entry = m_tableNVM[i][j];		

			if(!entry->isValid)
				continue;
				
			allocDecision des = getDecision(entry);
			if(des != ALLOCATE_IN_NVM)				
				stats_wrong_alloc++;
			else
				stats_good_alloc++;
		}
		for(int j = 0 ; j < m_nbSRAMways ; j++)
		{
			entry = m_tableSRAM[i][j];		

			if(!entry->isValid)
				continue;

			allocDecision des = getDecision(entry);
			if(des != ALLOCATE_IN_SRAM)				
				stats_wrong_alloc++;
			else
				stats_good_alloc++;
		}
	}
	
	
	for(auto feature : m_features)
		feature->finishSimu();

	Predictor::finishSimu();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x34685(%rip), %r14     # 0x3df50
cmpb $0x1, 0x1cc(%r14)
jne 0x98dd
movq %rbx, %rdi
callq 0x9a18
movl 0x18(%rbx), %eax
movl 0x20(%rbx), %ecx
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rsi
movb 0x226(%r14), %dil
movl 0x24(%rbx), %r8d
movq 0x430(%rbx), %r9
xorl %r10d, %r10d
testl %ecx, %ecx
cmovlel %r10d, %ecx
movq 0x438(%rbx), %r11
testl %r8d, %r8d
cmovlel %r10d, %r8d
testl %eax, %eax
cmovlel %r10d, %eax
xorpd %xmm0, %xmm0
cmpq %rax, %r10
je 0x99ed
xorl %r14d, %r14d
cmpq %r14, %rcx
je 0x9984
movq (%rsi), %r15
imulq $0x18, %r10, %r12
movq (%r15,%r12), %r15
movq (%r15,%r14,8), %r15
cmpb $0x1, (%r15)
jne 0x997f
testb $0x1, %dil
je 0x9966
movq 0x138(%r15), %r12
cmpq 0x140(%r15), %r12
ja 0x9975
incq %r11
movq %r11, 0x438(%rbx)
jmp 0x997f
movsd 0x130(%r15), %xmm1
ucomisd %xmm0, %xmm1
ja 0x995a
incq %r9
movq %r9, 0x430(%rbx)
incq %r14
jmp 0x992a
imulq $0x18, %r10, %r14
xorl %r15d, %r15d
cmpq %r15, %r8
je 0x99e5
movq (%rdx), %r12
movq (%r12,%r14), %r12
movq (%r12,%r15,8), %r12
cmpb $0x1, (%r12)
jne 0x99e0
testb $0x1, %dil
je 0x99c6
movq 0x138(%r12), %r13
cmpq 0x140(%r12), %r13
ja 0x99d6
incq %r9
movq %r9, 0x430(%rbx)
jmp 0x99e0
movsd 0x130(%r12), %xmm1
ucomisd %xmm0, %xmm1
ja 0x99ba
incq %r11
movq %r11, 0x438(%rbx)
incq %r15
jmp 0x998b
incq %r10
jmp 0x991e
movq 0x270(%rbx), %r14
movq 0x278(%rbx), %rbx
cmpq %rbx, %r14
je 0x9a0e
movq (%r14), %rdi
callq 0x11344
addq $0x8, %r14
jmp 0x99fb
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/Cerebron.cc
// Function: CerebronPredictor::drawFeatureMaps()
void
CerebronPredictor::drawFeatureMaps()
{

	ofstream file("output_PHC.out");
	for(unsigned i = 0 ; i < stats_global_error.size() ; i++)
	{
		for(unsigned j =  0 ; j < stats_global_error[i].size() ; j++)
		{
			double a = stats_global_error[i][j].first;
//			double b = stats_global_error[i][j].second;
//			double dummy = 0;
//			if( !(a == 0 && b == 0) )
//				dummy = a / (a + b);

			file << a << ",";
		}
		file << endl;
	}
	file.close();

	ofstream file1("output_PHC1.out");
	for(unsigned i = 0 ; i < stats_local_error.size() ; i++)
	{
		for(unsigned j =  0 ; j < stats_local_error[i].size() ; j++)
		{
			double a = stats_local_error[i][j].first;
//			double b = stats_local_error[i][j].second;
//			double dummy = a / (a + b);
			file1 << a << ",";
		}
		file1 << endl;
	}
	file1.close();

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdi, %rbx
leaq 0x1fc9f(%rip), %rsi     # 0x296d2
leaq 0x208(%rsp), %r14
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0x5310
xorl %r13d, %r13d
leaq 0x1f5e2(%rip), %r15     # 0x29032
movl %r13d, %r13d
movq 0x490(%rbx), %rcx
movq 0x498(%rbx), %rax
subq %rcx, %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
cmpq %r13, %rax
jbe 0x9abe
xorl %ebp, %ebp
imulq $0x18, %r13, %r12
movl %ebp, %ebp
movq (%rcx,%r12), %rax
movq 0x8(%rcx,%r12), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbp, %rcx
jbe 0x9ab1
cvtsi2sdl (%rax,%rbp,8), %xmm0
movq %r14, %rdi
callq 0x54f0
movq %rax, %rdi
movq %r15, %rsi
callq 0x52c0
incl %ebp
movq 0x490(%rbx), %rcx
jmp 0x9a77
movq %r14, %rdi
callq 0x5190
incl %r13d
jmp 0x9a50
leaq 0x208(%rsp), %rdi
callq 0x5420
leaq 0x1fc0f(%rip), %rsi     # 0x296e1
leaq 0x8(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x5310
xorl %r13d, %r13d
leaq 0x8(%rsp), %r14
leaq 0x1f544(%rip), %r15     # 0x29032
movl %r13d, %r13d
movq 0x478(%rbx), %rcx
movq 0x480(%rbx), %rax
subq %rcx, %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
cmpq %r13, %rax
jbe 0x9b5c
xorl %ebp, %ebp
imulq $0x18, %r13, %r12
movl %ebp, %ebp
movq (%rcx,%r12), %rax
movq 0x8(%rcx,%r12), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbp, %rcx
jbe 0x9b4f
cvtsi2sdl (%rax,%rbp,8), %xmm0
movq %r14, %rdi
callq 0x54f0
movq %rax, %rdi
movq %r15, %rsi
callq 0x52c0
incl %ebp
movq 0x478(%rbx), %rcx
jmp 0x9b15
movq %r14, %rdi
callq 0x5190
incl %r13d
jmp 0x9aee
leaq 0x8(%rsp), %rdi
callq 0x5420
leaq 0x8(%rsp), %rdi
callq 0x5620
leaq 0x208(%rsp), %rdi
callq 0x5620
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9b99
jmp 0x9ba8
jmp 0x9ba8
jmp 0x9b99
jmp 0x9ba8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5620
jmp 0x9bab
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
callq 0x5620
movq %rbx, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/DBAMBPredictor.cc
// Function: DBAMBPredictor::~DBAMBPredictor()
DBAMBPredictor::~DBAMBPredictor()
{
//	myFile.close();
	
	for(auto sets : m_DHPTable)
		for(auto entry : sets)
			delete entry;
	if(simu_parameters.printDebug)
		dataset_file.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x30a17(%rip), %rax     # 0x3c688
movq %rax, (%rdi)
leaq 0x2e8(%rdi), %rax
movq %rax, (%rsp)
movq 0x2e8(%rdi), %r15
movq %rdi, 0x8(%rsp)
movq 0x2f0(%rdi), %rbp
leaq 0x10(%rsp), %r12
cmpq %rbp, %r15
je 0xbce2
movq %r12, %rdi
movq %r15, %rsi
callq 0xe812
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rbx
cmpq %rbx, %r14
je 0xbcd4
movq (%r14), %r13
testq %r13, %r13
je 0xbcc6
movq %r13, %rdi
callq 0xe860
movq %r13, %rdi
callq 0x52a0
addq $0x8, %r14
jmp 0xbcb1
movq %r12, %rdi
callq 0xf1a4
addq $0x18, %r15
jmp 0xbc97
leaq 0x32267(%rip), %rax     # 0x3df50
cmpb $0x0, (%rax)
je 0xbcfa
leaq 0x31973(%rip), %rdi     # 0x3d668
callq 0x5420
movq 0x8(%rsp), %rbx
leaq 0x3d0(%rbx), %rdi
callq 0xe7ce
leaq 0x3b8(%rbx), %rdi
callq 0x9d36
leaq 0x3a0(%rbx), %rdi
callq 0x9d36
leaq 0x388(%rbx), %rdi
callq 0xa7d8
leaq 0x340(%rbx), %rdi
callq 0xa49a
leaq 0x308(%rbx), %rdi
callq 0xea0a
movq (%rsp), %rdi
callq 0xe7f0
leaq 0x2a0(%rbx), %rdi
callq 0x9ed6
leaq 0x280(%rbx), %rdi
callq 0x5618
movq %rbx, %rdi
callq 0x2087a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbd81
movq %rax, %rdi
callq 0xa18f
nop
// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/DBAMBPredictor.cc
// Function: DBAMBPredictor::lookup(unsigned long)
DHPEntry*
DBAMBPredictor::lookup(uint64_t signature)
{
	uint64_t set = indexFunction(signature);
	for(unsigned i = 0 ; i < m_RAP_assoc ; i++)
	{
		if(m_DHPTable[set][i]->signature == signature)
			return m_DHPTable[set][i];
	}
	return NULL;
}

// Assembly:
movl 0x338(%rdi), %ecx
movl 0x33c(%rdi), %r9d
xorl %r8d, %r8d
movq %rsi, %rax
xorl %edx, %edx
divq %r9
imulq $0x18, %rdx, %rdx
addq 0x2e8(%rdi), %rdx
cmpq %r8, %rcx
je 0xc211
movq (%rdx), %rax
movq (%rax,%r8,8), %rax
incq %r8
cmpq %rsi, 0x20(%rax)
jne 0xc1fb
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/DBAMBPredictor.cc
// Function: DBAMBPredictor::reportSpilling(DHPEntry*, unsigned long, bool, bool)
void 
DBAMBPredictor::reportSpilling(DHPEntry* rap_current, uint64_t addr, bool isAlloc,  bool inNVM)
{
	string cl_location = inNVM ? "NVM" : "SRAM";
	string a = isAlloc ? "ALLOC" : "MIGRATION";
	
	dataset_file << "SPILLING:Dataset n°" << rap_current->id << ": DEFLECT " <<  a \
		<< ", Cl 0x" << std::hex << addr << std::dec <<  " cl alloc=" \
		<< cl_location << ", Dataset alloc=" << str_allocDecision[rap_current->des] << endl;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x1d5bf(%rip), %rax     # 0x297fc
leaq 0x1d5c1(%rip), %rsi     # 0x29805
testl %r8d, %r8d
cmovneq %rax, %rsi
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x5140
leaq 0x1d868(%rip), %rax     # 0x29ac9
leaq 0x1d867(%rip), %rsi     # 0x29acf
testl %ebp, %ebp
cmovneq %rax, %rsi
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x5140
leaq 0x313e4(%rip), %rdi     # 0x3d668
leaq 0x1d84e(%rip), %rsi     # 0x29ad9
callq 0x52c0
movl 0x18(%rbx), %esi
movq %rax, %rdi
callq 0x5560
leaq 0x1d84c(%rip), %rsi     # 0x29aee
movq %rax, %rdi
callq 0x52c0
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x5290
leaq 0x1d83b(%rip), %rsi     # 0x29af9
movq %rax, %rdi
callq 0x52c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movq %r14, %rsi
callq 0x5200
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x1d7ff(%rip), %rsi     # 0x29b01
movq %rax, %rdi
callq 0x52c0
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x5290
leaq 0x1d7ee(%rip), %rsi     # 0x29b0c
movq %rax, %rdi
callq 0x52c0
movl 0x28(%rbx), %ecx
leaq 0x31060(%rip), %rdx     # 0x3d390
movq (%rdx,%rcx,8), %rsi
movq %rax, %rdi
callq 0x52c0
movq %rax, %rdi
callq 0x5190
leaq 0x10(%rsp), %rdi
callq 0x5618
leaq 0x30(%rsp), %rdi
callq 0x5618
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
jmp 0xc373
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5618
leaq 0x30(%rsp), %rdi
callq 0x5618
movq %rbx, %rdi
callq 0x5570
nop
// File: /workspace/github_cpp_makefile_star2_O2/gvaumour[P]cache-simulator/src/DBAMBPredictor.cc
// Function: DBAMBPredictor::computeRd(unsigned long, unsigned long, bool)
int
DBAMBPredictor::computeRd(uint64_t set, uint64_t  index , bool inNVM)
{
	vector<CacheEntry*> line;
	int ref_rd;
	
	if(inNVM){
		line = m_tableNVM[set];
		ref_rd = m_tableNVM[set][index]->policyInfo;
	}
	else{
		line = m_tableSRAM[set];
		ref_rd = m_tableSRAM[set][index]->policyInfo;
	}
	
	int position = 0;
	
	/* Determine the position of the cachel line in the LRU stack, the policyInfo is not enough */
	for(unsigned i = 0 ; i < line.size() ; i ++)
	{
		if(ref_rd < line[i]->policyInfo  && line[i]->isValid)
			position++;
	}
	return position;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
testl %ecx, %ecx
je 0xcf86
movq 0x10(%r15), %rax
imulq $0x18, %r14, %rsi
addq (%rax), %rsi
movq %rsp, %rdi
callq 0x9ffc
addq $0x10, %r15
jmp 0xcf9d
movq 0x8(%r15), %rax
imulq $0x18, %r14, %rsi
addq (%rax), %rsi
movq %rsp, %rdi
callq 0x9ffc
addq $0x8, %r15
movq (%r15), %rax
movq (%rax), %rax
imulq $0x18, %r14, %rcx
movq (%rax,%rcx), %rax
movq (%rax,%rbx,8), %rax
movl 0x38(%rax), %eax
movq (%rsp), %rcx
movq 0x8(%rsp), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
xorl %ebx, %ebx
xorl %esi, %esi
movl %esi, %esi
cmpq %rsi, %rdx
jbe 0xcfdf
movq (%rcx,%rsi,8), %rdi
cmpl 0x38(%rdi), %eax
jge 0xcfdb
movzbl (%rdi), %edi
addl %edi, %ebx
incl %esi
jmp 0xcfc6
movq %rsp, %rdi
callq 0xb6b2
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb6b2
movq %rbx, %rdi
callq 0x5570