LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/./testdata.hpp
// Function: TestData::readFromRawFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Data&)
void readFromRawFile(std::string filename, Data& traindata) {
		std::ifstream fin;

		fin.open(filename);
		std::string t0, t1, t2;
		while (fin >> t0 >> t1 >> t2) {
			int subj = addEntity(t0, traindata);
			int obj = addEntity(t2, traindata);
			int relation = addRelation(t1, traindata);
			triples.emplace_back(subj, relation, obj);
			if (subj == -1 || obj == -1 || relation == -1) triples.back().flag = true;
		}
		fin.close();
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0xd0(%rsp), %r12
movq %r12, %rdi
callq 0x21f0
pushq $0x8
popq %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2180
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq 0x20(%rsp), %rdx
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb %cl, (%rax)
movb %cl, (%rdx)
leaq 0xb0(%rsp), %r15
leaq 0x90(%rsp), %r12
leaq 0x70(%rsp), %r13
leaq 0xd0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x2230
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x2230
movq %rax, %rdi
leaq 0x10(%rsp), %rsi
callq 0x2230
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x432f
movq %r15, %rdi
leaq 0x50(%rsp), %rsi
callq 0x2240
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x529e
movl %eax, %ebp
movq %r15, %rdi
callq 0x20d0
movl %ebp, 0xc(%rsp)
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
callq 0x2240
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x529e
movl %eax, %ebp
movq %r12, %rdi
callq 0x20d0
movl %ebp, 0x8(%rsp)
movq %r13, %rdi
leaq 0x30(%rsp), %rsi
callq 0x2240
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x52d6
movl %eax, %ebp
movq %r13, %rdi
callq 0x20d0
movl %ebp, 0x4(%rsp)
movq %r14, %rdi
leaq 0xc(%rsp), %rsi
leaq 0x4(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0x4840
cmpl $-0x1, 0xc(%rsp)
je 0x4322
cmpl $-0x1, 0x8(%rsp)
je 0x4322
cmpl $-0x1, 0x4(%rsp)
jne 0x4239
movq 0x8(%r14), %rax
movb $0x1, -0x4(%rax)
jmp 0x4239
leaq 0xd0(%rsp), %rdi
callq 0x2060
leaq 0x10(%rsp), %rdi
callq 0x20d0
leaq 0x30(%rsp), %rdi
callq 0x20d0
leaq 0x50(%rsp), %rdi
callq 0x20d0
leaq 0xd0(%rsp), %rdi
callq 0x2070
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x43af
movq %rax, %rbx
jmp 0x43d0
jmp 0x43af
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
jmp 0x43a4
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
jmp 0x43a4
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x20d0
jmp 0x43b2
jmp 0x43af
jmp 0x43af
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20d0
leaq 0x30(%rsp), %rdi
callq 0x20d0
leaq 0x50(%rsp), %rdi
callq 0x20d0
leaq 0xd0(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/./testdata.hpp
// Function: TestData::addEntity(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Data&)
int addEntity(std::string entity, Data& data) {
		if (data.entity_dict.find(entity) == data.entity_dict.end()) {
			return -1;
		} else {
			return data.entity_dict[entity];
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
leaq 0x8(%rdx), %r14
movq %r14, %rdi
callq 0x493e
addq $0x10, %r15
cmpq %r15, %rax
je 0x52cd
movq %r14, %rdi
movq %rbx, %rsi
callq 0x488a
movl (%rax), %eax
jmp 0x52d0
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/./testdata.hpp
// Function: TestData::addRelation(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Data&)
int addRelation(std::string relation, Data& data) {
		if (data.relation_dict.find(relation) == data.relation_dict.end()) {
			return -1;
		} else {
			return data.relation_dict[relation];
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
leaq 0x38(%rdx), %r14
movq %r14, %rdi
callq 0x493e
addq $0x40, %r15
cmpq %r15, %rax
je 0x5305
movq %r14, %rdi
movq %rbx, %rsi
callq 0x488a
movl (%rax), %eax
jmp 0x5308
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/testcp.cpp
// Function: TestCP::pre_score_inv(int, int, int, int)
void pre_score_inv(int subj, int relation, int relation_inv, int obj) {
		const std::vector<double>& obj_v = objVec[obj];
		const std::vector<double>& obj_v_inv = subjVec[obj];
		const std::vector<double>& relation_v = relationVec[relation];
		const std::vector<double>& relation_v_inv = relationVec[relation_inv];
		const std::vector<double>& subj_v = subjVec[subj];
		const std::vector<double>& subj_v_inv = objVec[subj];

		op.product(subj_v, obj_v, relation_v, outVec1, outVec2, outVec3);
		op.product(obj_v_inv, subj_v_inv, relation_v_inv, outVec1_inv, outVec2_inv, outVec3_inv);
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movslq %r8d, %rdi
movq 0x238(%rbx), %rax
movq 0x250(%rbx), %r14
imulq $0x18, %rdi, %r15
leaq (%r14,%r15), %rdi
movq %rdi, (%rsp)
addq %rax, %r15
movslq %edx, %rdx
movq 0x268(%rbx), %rdi
imulq $0x18, %rdx, %r8
addq %rdi, %r8
movslq %ecx, %rcx
imulq $0x18, %rcx, %r12
addq %rdi, %r12
movslq %esi, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addq %rcx, %r14
leaq 0x310(%rbx), %r13
leaq 0x280(%rbx), %r9
leaq 0x298(%rbx), %r11
leaq 0x2b0(%rbx), %r10
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq (%rsp), %rcx
pushq %r10
pushq %r11
callq 0x6872
addq $0x10, %rsp
movq %rbp, %rdi
callq 0x5b78
leaq 0x2c8(%rbx), %r9
leaq 0x2e0(%rbx), %rax
addq $0x2f8, %rbx            # imm = 0x2F8
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %r12, %r8
pushq %rbx
pushq %rax
callq 0x6872
addq $0x10, %rsp
movq %rbp, %rdi
callq 0x5b78
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/testcp.cpp
// Function: TestCP::generate_rank(std::vector<RankScore, std::allocator<RankScore>>&, int, int, int, std::map<std::pair<int, int>, std::set<int, std::less<int>, std::allocator<int>>, std::less<std::pair<int, int>>, std::allocator<std::pair<std::pair<int, int> const, std::set<int, std::less<int>, std::allocator<int>>>>>&, std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&)
void generate_rank(std::vector<RankScore>& scores_ent, int relation, int ent1, int ent2, std::map<Key, std::set<int> >& entSet, std::vector<double>& rank, std::vector<double>& rank_filter){
		std::sort(scores_ent.begin(), scores_ent.end());
		Key k_e(relation, ent2);
		const std::set<int>& hypo_e = entSet[k_e];
		int k = 0;
		for (int i=0; i<scores_ent.size(); ++i) {
			RankScore& re = scores_ent[i];
			if (re.id == ent1) {
				rank.push_back(i);
				rank_filter.push_back(k);
				std::cout << i << ' ' << k << std::endl;
				break;
			}
			if (hypo_e.find(re.id) == hypo_e.end()) {
				++k;
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movl %r8d, %ebp
movl %ecx, 0x4(%rsp)
movl %edx, %r13d
movq %rsi, %r12
movq (%rsi), %rdi
movq 0x8(%rsi), %rsi
callq 0x6920
leaq 0x10(%rsp), %rsi
movl %r13d, (%rsi)
movl %ebp, 0x4(%rsi)
movq %rbx, %rdi
callq 0x5faa
movq %rax, %r14
movq %rax, %rbx
addq $0x8, %rbx
xorl %r13d, %r13d
pushq $0x8
popq %r15
xorl %ebp, %ebp
movq (%r12), %rsi
movq 0x8(%r12), %rax
subq %rsi, %rax
sarq $0x4, %rax
cmpq %r13, %rax
jbe 0x67ad
movl 0x4(%rsp), %eax
cmpl %eax, (%rsi,%r15)
je 0x674f
addq %r15, %rsi
movq %r14, %rdi
callq 0x6f74
xorl %ecx, %ecx
cmpq %rbx, %rax
sete %cl
addl %ecx, %ebp
incq %r13
addq $0x10, %r15
jmp 0x670e
cvtsi2sd %r13d, %xmm0
leaq 0x8(%rsp), %rbx
movsd %xmm0, (%rbx)
movq 0x50(%rsp), %rdi
movq %rbx, %rsi
callq 0x6e76
cvtsi2sd %ebp, %xmm0
movsd %xmm0, (%rbx)
leaq 0x8(%rsp), %rsi
movq 0x58(%rsp), %rdi
callq 0x6e76
movq 0x5850(%rip), %rdi      # 0xbfd8
movl %r13d, %esi
callq 0x22b0
pushq $0x20
popq %rsi
movq %rax, %rdi
callq 0x2200
movq %rax, %rdi
movl %ebp, %esi
callq 0x22b0
movq %rax, %rdi
callq 0x20e0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/testcp.cpp
// Function: TestCP::calculate_ranking(std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&, int)
double calculate_ranking(std::vector<double>& a, std::vector<double>& b, int rank){
		double rank_num = 0.0;
		for(int i=0; i<a.size(); i++){
			if(a[i]<rank){
				rank_num++;       
			}
			if(b[i]<rank){
				rank_num++;       
			}
		}
		return rank_num;
	}

// Assembly:
movq (%rsi), %rax
movq 0x8(%rsi), %rsi
subq %rax, %rsi
sarq $0x3, %rsi
cvtsi2sd %ecx, %xmm1
movq (%rdx), %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
movsd 0x1869(%rip), %xmm2     # 0x8048
cmpq %rdx, %rsi
je 0x6825
movsd (%rax,%rdx,8), %xmm3
movapd %xmm0, %xmm4
addsd %xmm2, %xmm4
cmpltsd %xmm1, %xmm3
andpd %xmm3, %xmm4
andnpd %xmm0, %xmm3
orpd %xmm4, %xmm3
movsd (%rcx,%rdx,8), %xmm0
cmpltsd %xmm1, %xmm0
movapd %xmm0, %xmm4
andnpd %xmm3, %xmm4
addsd %xmm2, %xmm3
andpd %xmm3, %xmm0
orpd %xmm4, %xmm0
incq %rdx
jmp 0x67df
retq
// File: /workspace/github_cpp_makefile_star2_O2/KokiKishimoto[P]cp_decomposition/testcp.cpp
// Function: TestCP::calate_mrr(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&)
double calate_mrr(const std::vector<double>& a, const std::vector<double>& b){
		double sum = 0.0;
		double mrr_value = 0.0;
		for(int i=0; i<a.size(); i++){
			sum = sum + 1/(a[i]+1) + 1/(b[i]+1);
		}
		mrr_value = sum;
		return mrr_value;
	}

// Assembly:
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq (%rdx), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movapd 0x17eb(%rip), %xmm1     # 0x8030
cmpq %rsi, %rcx
je 0x6871
movsd (%rax,%rsi,8), %xmm2
movhpd (%rdx,%rsi,8), %xmm2    # xmm2 = xmm2[0],mem[0]
addpd %xmm1, %xmm2
movapd %xmm1, %xmm3
divpd %xmm2, %xmm3
addsd %xmm3, %xmm0
unpckhpd %xmm3, %xmm3            # xmm3 = xmm3[1,1]
addsd %xmm3, %xmm0
incq %rsi
jmp 0x6845
retq
// File: /workspace/github_cpp_makefile_star2_O2/jaycelq[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree::innerNode::getLower(int)
int BPlusTree::innerNode::getLower(int k)
{
    if(keyNum == 0) return 0;
    int lo = 0, hi = keyNum;

    while(lo < hi) {
        int mid = (lo + hi) / 2;
        if(key[mid] > k) hi = mid;
        else lo = mid + 1;
    }

    return hi;
}

// Assembly:
movl 0xc(%rdi), %eax
testl %eax, %eax
je 0x235e
xorl %ecx, %ecx
cmpl %eax, %ecx
jge 0x2360
leal (%rax,%rcx), %edx
shrl %edx
cmpl %esi, 0x30(%rdi,%rdx,4)
jg 0x235a
incl %edx
movl %edx, %ecx
jmp 0x2345
movl %edx, %eax
jmp 0x2345
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jaycelq[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree::innerNode::insert(int, BPlusTree::Node*)
void BPlusTree::innerNode::insert(int k, Node *p)
{
    int i = 0;
    for(i = keyNum-1; i >= 0 && key[i] > k; i--) {
        key[i+1] = key[i];
        child[i+2] = child[i+1];
    }
    key[i+1] = k;
    child[i+2] = p;
    keyNum++;
}

// Assembly:
movl 0xc(%rdi), %ecx
movl %ecx, %eax
sarl $0x1f, %eax
andl %ecx, %eax
testl %ecx, %ecx
jle 0x2390
movl 0x2c(%rdi,%rcx,4), %r8d
cmpl %esi, %r8d
jle 0x238e
movl %r8d, 0x30(%rdi,%rcx,4)
movq 0x10(%rdi,%rcx,8), %r8
movq %r8, 0x18(%rdi,%rcx,8)
decq %rcx
jmp 0x236c
movl %ecx, %eax
cltq
movl %esi, 0x30(%rdi,%rax,4)
movq %rdx, 0x18(%rdi,%rax,8)
incl 0xc(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jaycelq[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree::innerNode::split(BPlusTree::Node*, int)
int BPlusTree::innerNode::split(Node*  newNode, int k)
{
    if(k > key[minKeyNum] && k < key[minKeyNum+1]) {
        for(int i = 0; i < minKeyNum; i++) {
            ((innerNode *)newNode)->key[i] = key[i+minKeyNum+1];
            ((innerNode *)newNode)->child[i+1] = child[i+minKeyNum+2];
        }
        newNode->keyNum = minKeyNum;
        keyNum = minKeyNum + 1;
        return k;
    }
    else {
        int retkey = 0;
        if(k > key[minKeyNum + 1]) {
            retkey = key[minKeyNum + 1];
            for(int i = 0; i < minKeyNum - 1; i++) {
                ((innerNode *)newNode)->key[i] = key[i + minKeyNum + 2];
                ((innerNode *)newNode)->child[i+1] = child[i+minKeyNum+3];
            }
            ((innerNode *)newNode)->child[0] = child[minKeyNum + 2];
            newNode->keyNum = minKeyNum - 1;
            keyNum = minKeyNum + 1;
            return retkey;
        }
        else {
            retkey = key[minKeyNum];
            for(int i = 0; i < minKeyNum; i++) {
                ((innerNode *)newNode)->key[i] = key[i + minKeyNum + 1];
                ((innerNode *)newNode)->child[i+1] = child[i+minKeyNum+2];
            }
            ((innerNode *)newNode)->child[0] = child[minKeyNum + 1];
            newNode->keyNum = minKeyNum;
            keyNum = minKeyNum;
            return retkey;
        }
    }
}

// Assembly:
movl %edx, %eax
movl 0x34(%rdi), %r9d
movl 0x38(%rdi), %r11d
cmpl %edx, %r9d
setl %cl
cmpl %edx, %r11d
setg %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x23d1
movl %r11d, 0x30(%rsi)
pushq $0x2
popq %r8
pushq $0x1
popq %rdx
pushq $0x18
popq %rcx
pushq $0x28
popq %r10
jmp 0x2401
pushq $0x10
popq %rcx
cmpl %eax, %r11d
jge 0x23e8
pushq $0x2
popq %r8
xorl %edx, %edx
pushq $0x28
popq %r10
movl %r11d, %eax
jmp 0x2401
movl %r11d, 0x30(%rsi)
movq 0x28(%rdi), %rax
movq %rax, 0x18(%rsi)
pushq $0x1
popq %rdx
pushq $0x20
popq %r10
movl %edx, %r8d
movl %r9d, %eax
movq (%rdi,%r10), %r9
movq %r9, (%rsi,%rcx)
movl %edx, 0xc(%rsi)
movl %r8d, 0xc(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jaycelq[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree::leafNode::insert(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void BPlusTree::leafNode::insert(int k, string v)
{
    int i = 0;
    for(i = keyNum-1; i >= 0 && key[i] > k; i--) {
        key[i+1] = key[i];
        value[i+1] = value[i];
    }
    key[i+1] = k;
    value[i+1] = v;
    keyNum++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
movl %esi, %ebp
movq %rdi, %rbx
movl 0xc(%rdi), %r13d
leaq 0x10(%rdi), %r15
movl %r13d, %r14d
sarl $0x1f, %r14d
andl %r13d, %r14d
movq %r13, %rax
shlq $0x5, %rax
addq %rax, %rdi
addq $0x10, %rdi
testl %r13d, %r13d
jle 0x2496
movl 0x6c(%rbx,%r13,4), %eax
cmpl %ebp, %eax
jle 0x2493
movl %eax, 0x70(%rbx,%r13,4)
leaq -0x20(%rdi), %r12
movq %r12, %rsi
callq 0x20b0
decq %r13
movq %r12, %rdi
jmp 0x246c
movl %r13d, %r14d
movslq %r14d, %rax
movl %ebp, 0x70(%rbx,%rax,4)
shlq $0x5, %rax
addq %rax, %r15
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x20b0
incl 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jaycelq[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree::leafNode::split(BPlusTree::leafNode*)
int BPlusTree::leafNode::split(leafNode* newNode)
{
    for(int i = 0; i < minKeyNum; i++) {
        newNode->key[i] = key[i+minKeyNum+1];
        newNode->value[i] = value[i + minKeyNum+1];
    }
    keyNum = minKeyNum + 1;
    newNode->keyNum = minKeyNum;

    newNode->right = right;
    newNode->left = this;
    if(right != NULL) {
        right->left = newNode;
    }
    right = newNode;

    return newNode->key[0];
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x78(%rdi), %eax
movl %eax, 0x70(%rsi)
leaq 0x50(%rdi), %rsi
leaq 0x10(%rbx), %rdi
callq 0x20b0
movl $0x2, 0xc(%r14)
movl $0x1, 0xc(%rbx)
movq 0x88(%r14), %rax
movq %rax, 0x88(%rbx)
movq %r14, 0x80(%rbx)
testq %rax, %rax
je 0x250f
movq %rbx, 0x80(%rax)
movq %rbx, 0x88(%r14)
movl 0x70(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jaycelq[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree::get(BPlusTree::Node*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool BPlusTree::get(Node* node, int key, string & v)
{
    if(node == NULL) return false;

    if(node->isLeaf) {
        int slot = node->getLower(key) - 1;
        if(((leafNode*)node)->key[slot] == key) {
            v = ((leafNode*)node)->value[slot];
            return true;
        }
    }
    else {
        int slot = node->getLower(key);
        return get(((innerNode*)node)->child[slot], key, v);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %rbx
testq %rbx, %rbx
je 0x2570
movb 0x8(%rbx), %r15b
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *(%rax)
cltq
cmpb $0x1, %r15b
je 0x2553
movq 0x10(%rbx,%rax,8), %rbx
jmp 0x2531
cmpl %ebp, 0x6c(%rbx,%rax,4)
jne 0x2570
decq %rax
shlq $0x5, %rax
leaq (%rbx,%rax), %rsi
addq $0x10, %rsi
movq %r14, %rdi
callq 0x20b0
testq %rbx, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jaycelq[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree::put(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void BPlusTree::put(int key, string value)
{
    stack<Node *> parent;
    Node *n = root;
    if(root == NULL) {
        root = new leafNode();
        insertNode(root , key, value, NULL , &parent);
        return;
    }

    while(n->isLeaf == false) {
        innerNode *inner = (innerNode*) n;
        int slot = inner->getLower(key);
        parent.push(n);
        n = inner->child[slot];
    }

    leafNode *leaf = (leafNode *)n;

    int slot = leaf->getLower(key);
    if(slot > 0) slot -= 1; 
    if(leaf->key[slot] == key) leaf->value[slot] = value;
    else insertNode(leaf , key, value, NULL , &parent);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
leaq 0x18(%rsp), %rdi
callq 0x2a7e
movq (%r14), %r12
movq %r12, 0x10(%rsp)
testq %r12, %r12
je 0x286b
movq %r15, 0x8(%rsp)
leaq 0x18(%rsp), %r13
leaq 0x10(%rsp), %rbp
movq (%r12), %rax
movq (%rax), %rax
cmpb $0x0, 0x8(%r12)
jne 0x283a
movq %r12, %rdi
movl %ebx, %esi
callq *%rax
movl %eax, %r15d
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2de4
movslq %r15d, %rax
movq 0x10(%r12,%rax,8), %r12
movq %r12, 0x10(%rsp)
jmp 0x2807
movq %r12, %rdi
movl %ebx, %esi
callq *%rax
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
subl %ecx, %eax
cltq
cmpl %ebx, 0x70(%r12,%rax,4)
jne 0x28b0
shlq $0x5, %rax
leaq (%r12,%rax), %rdi
addq $0x10, %rdi
movq 0x8(%rsp), %rsi
callq 0x20b0
jmp 0x28e2
movl $0x90, %edi
callq 0x2130
movq %rax, %r12
movq %rax, %rdi
callq 0x2a3e
movq %r12, (%r14)
leaq 0x88(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x2170
leaq 0x18(%rsp), %r9
movq %r14, %rdi
movq %r12, %rsi
movl %ebx, %edx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x2590
jmp 0x28da
leaq 0x68(%rsp), %r13
movq %r13, %rdi
movq 0x8(%rsp), %rsi
callq 0x2170
leaq 0x18(%rsp), %r9
movq %r14, %rdi
movq %r12, %rsi
movl %ebx, %edx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x2590
movq %r13, %rdi
callq 0x2080
leaq 0x18(%rsp), %rdi
callq 0x2af4
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x2913
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x2080
jmp 0x2933
movq %rax, %rbx
movl $0x90, %esi
movq %r12, %rdi
callq 0x2140
jmp 0x2933
jmp 0x2930
jmp 0x2930
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x2af4
movq %rbx, %rdi
callq 0x21d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jaycelq[P]BPlusTree/BPlusTree.cpp
// Function: BPlusTree::getrange[abi:cxx11](int, int)
map<int, string> BPlusTree::getrange(int key1, int key2)
{
    Node *n = root;
    int i = 0;
    map<int, string> res;
    if(root == NULL) return res;
    while(n->isLeaf == false) {
        innerNode *inner = (innerNode*) n;
        int slot = inner->getLower(key1);
        n = inner->child[slot];
    }

    leafNode *leaf = (leafNode *)n;

    int slot = leaf->getLower(key1)-1;
	
    if(leaf->key[slot] != key1) slot++;

    i = slot;
    while(true) {
        for(; i < leaf->keyNum && leaf->key[i] >= key1 && leaf->key[i] <= key2; i++) {
            res[leaf->key[i]] = leaf->value[i];
        }
        if(i >= leaf->keyNum) {
            i = 0;
            leaf = leaf -> right;
        } 
        else break;
    }
    return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %r14
andl $0x0, 0x8(%rdi)
movl %ecx, 0x4(%rsp)
andq $0x0, 0x10(%rdi)
leaq 0x8(%rdi), %rax
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
testq %r14, %r14
je 0x2a14
movl %edx, %r15d
movq (%r14), %rax
movq (%rax), %rax
cmpb $0x0, 0x8(%r14)
jne 0x299f
movq %r14, %rdi
movl %r15d, %esi
callq *%rax
cltq
movq 0x10(%r14,%rax,8), %r14
jmp 0x2981
movq %r14, %rdi
movl %r15d, %esi
callq *%rax
movslq %eax, %rcx
decl %eax
cmpl %r15d, 0x6c(%r14,%rcx,4)
cmovel %eax, %ecx
movslq %ecx, %rbp
leaq (%r14,%rbp,4), %r12
addq $0x70, %r12
movq %rbp, %rax
shlq $0x5, %rax
leaq (%r14,%rax), %r13
addq $0x10, %r13
movslq 0xc(%r14), %rax
cmpq %rax, %rbp
jge 0x2a09
movl (%r12), %eax
cmpl %r15d, %eax
jl 0x2a14
cmpl 0x4(%rsp), %eax
jg 0x2a14
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2a9a
movq %rax, %rdi
movq %r13, %rsi
callq 0x20b0
incq %rbp
addq $0x4, %r12
addq $0x20, %r13
jmp 0x29ce
movq 0x88(%r14), %r14
xorl %ebp, %ebp
jmp 0x29b7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2a2a
jmp 0x2a2a
movq %rax, %r14
movq %rbx, %rdi
callq 0x2b4c
movq %r14, %rdi
callq 0x21d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/Config.h
// Function: ramulator::Config::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
std::string operator [] (const std::string& name) const {
      if (options.find(name) != options.end()) {
        return (options.find(name))->second;
      } else {
        return "";
      }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x1385e
leaq 0x8(%r15), %rcx
cmpq %rcx, %rax
je 0x10f65
movq %r15, %rdi
movq %r14, %rsi
callq 0x1385e
leaq 0x40(%rax), %rsi
movq %rbx, %rdi
callq 0xb370
jmp 0x10f79
leaq 0xc65ec(%rip), %rsi     # 0xd7558
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x10eea
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/Config.h
// Function: ramulator::Config::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void add (const std::string& name, const std::string& value) {
      if (!contains(name)) {
        options.insert(make_pair(name, value));
      } else {
        printf("ramulator::Config::add options[%s] already set.\n", name.c_str());
      }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x138f2
testb %al, %al
je 0x10fc9
movq (%r15), %rsi
leaq 0xc0480(%rip), %rdi     # 0xd1437
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xb050
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x13b46
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1391e
leaq 0x8(%rsp), %rdi
callq 0x13908
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x13908
movq %rbx, %rdi
callq 0xb4d0
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/Config.h
// Function: ramulator::Config::contains(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
bool contains(const std::string& name) const {
      if (options.find(name) != options.end()) {
        return true;
      } else {
        return false;
      }
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x1385e
addq $0x8, %rbx
cmpq %rbx, %rax
setne %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/StatType.h
// Function: Stats::ScalarBase<Stats::Scalar>::print(std::basic_ofstream<char, std::char_traits<char>>&)
virtual void print(std::ofstream& file) {
    Stat<ScalarType>::printname(file);
    // TODO deal with flag
    file.precision(Stat<ScalarType>::_precision);
    file.width(20);
    Result res = Stat<ScalarType>::self().result();
    file << std::fixed << res;
    Stat<ScalarType>::printdesc(file);
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x18828
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movslq 0x48(%r14), %rdx
movq %rdx, 0x8(%rbx,%rcx)
movq -0x18(%rax), %rax
movq $0x14, 0x10(%rbx,%rax)
movq (%r14), %rax
movq %r14, %rdi
callq *0x60(%rax)
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl $0xfffffefb, %ecx       # imm = 0xFFFFFEFB
andl 0x18(%rbx,%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq %rbx, %rdi
callq 0xb440
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x18848
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/Refresh.h
// Function: ramulator::Refresh<ramulator::DDR3>::Refresh(ramulator::Controller<ramulator::DDR3>*)
Refresh(Controller<T>* ctrl) : ctrl(ctrl) {
    clk = refreshed = 0;
    max_rank_count = ctrl->channel->children.size();
    max_bank_count = ctrl->channel->spec->org_entry.count[(int)T::Level::Bank];

    // Init refresh counters
    for (int r = 0; r < max_rank_count; r++) {
      bank_ref_counters.push_back(0);
      bank_refresh_backlog.push_back(new vector<int>(max_bank_count, 0));
    }

    level_chan = (int)T::Level::Channel;
    level_rank = (int)T::Level::Rank;
    level_bank = (int)T::Level::Bank;
    level_sa   = -1; // Most DRAM doesn't have subarray level
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0x11895e(%rip), %rax    # 0x1334b8
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
leaq 0x20(%rdi), %rbx
andq $0x0, 0x30(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
leaq 0x50(%rdi), %r15
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
andl $0x0, 0x80(%rdi)
movups %xmm0, 0x70(%rdi)
movabsq $-0x7fffffff8, %rax     # imm = 0xFFFFFFF800000008
movq %rax, 0x84(%rdi)
movl $0xfffffffa, 0x8c(%rdi) # imm = 0xFFFFFFFA
movb $0x0, 0x90(%rdi)
movups %xmm0, 0x10(%rdi)
movq 0x1098(%rsi), %rcx
movq 0x3b8(%rcx), %rax
subq 0x3b0(%rcx), %rax
shrq $0x3, %rax
movl %eax, 0x38(%rdi)
movq 0x390(%rcx), %rcx
movl 0x2734(%rcx), %ecx
movl %ecx, 0x3c(%rdi)
xorl %r13d, %r13d
leaq 0x10(%rsp), %r12
cmpl %eax, %r13d
jge 0x1ac36
andl $0x0, 0x10(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1bfb0
pushq $0x18
popq %rdi
callq 0xb2d0
movq %rax, %rbp
movslq 0x3c(%r14), %rsi
andl $0x0, 0xc(%rsp)
movq %rax, %rdi
leaq 0xc(%rsp), %rdx
leaq 0xb(%rsp), %rcx
callq 0x1bea0
movq %rbp, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x1c0ea
incl %r13d
movl 0x38(%r14), %eax
jmp 0x1abe2
movaps 0xb63f3(%rip), %xmm0    # 0xd1030
movups %xmm0, 0x40(%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1ac65
movq %rax, %r12
pushq $0x18
popq %rsi
movq %rbp, %rdi
callq 0xb2e0
jmp 0x1ac68
jmp 0x1ac65
movq %rax, %r12
addq $0x68, %r14
movq %r14, %rdi
callq 0x1bef6
movq %r15, %rdi
callq 0x1c316
movq %rbx, %rdi
callq 0x1b7dc
movq %r12, %rdi
callq 0xb4d0
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/Config.h
// Function: ramulator::Config::record_cmd_trace() const
bool record_cmd_trace() const {
      // the default value is false
      if (options.find("record_cmd_trace") != options.end()) {
        if ((options.find("record_cmd_trace"))->second == "on") {
          return true;
        }
        return false;
      }
      return false;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0xb745e(%rip), %rsi     # 0xd214f
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x10eea
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1385e
movq %rax, %r14
leaq 0x8(%rbx), %r15
leaq 0x10(%rsp), %rdi
callq 0xb568
cmpq %r15, %r14
je 0x1ad67
leaq 0xb7425(%rip), %rsi     # 0xd214f
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x10eea
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1385e
addq $0x40, %rax
leaq 0xb7575(%rip), %rsi     # 0xd22c6
movq %rax, %rdi
callq 0x110e2
movl %eax, %ebx
leaq 0x10(%rsp), %rdi
callq 0xb568
jmp 0x1ad69
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x1ad79
jmp 0x1ad88
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb568
jmp 0x1ad8b
movq %rax, %rbx
movq %rbx, %rdi
callq 0xb4d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/Config.h
// Function: ramulator::Config::print_cmd_trace() const
bool print_cmd_trace() const {
      // the default value is false
      if (options.find("print_cmd_trace") != options.end()) {
        if ((options.find("print_cmd_trace"))->second == "on") {
          return true;
        }
        return false;
      }
      return false;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0xb73b9(%rip), %rsi     # 0xd2160
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x10eea
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1385e
movq %rax, %r14
leaq 0x8(%rbx), %r15
leaq 0x10(%rsp), %rdi
callq 0xb568
cmpq %r15, %r14
je 0x1ae1d
leaq 0xb7380(%rip), %rsi     # 0xd2160
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x10eea
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1385e
addq $0x40, %rax
leaq 0xb74bf(%rip), %rsi     # 0xd22c6
movq %rax, %rdi
callq 0x110e2
movl %eax, %ebx
leaq 0x10(%rsp), %rdi
callq 0xb568
jmp 0x1ae1f
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x1ae2f
jmp 0x1ae3e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb568
jmp 0x1ae41
movq %rax, %rbx
movq %rbx, %rdi
callq 0xb4d0
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/StatType.h
// Function: Stats::VectorBase<Stats::Vector, Stats::Scalar>::print(std::basic_ofstream<char, std::char_traits<char>>&)
void print(std::ofstream& file) {
    Stat<Derived>::printname(file);
    file.precision(Stat<Derived>::_precision);
    file.width(20);
    file << std::fixed << total();
    Stat<Derived>::printdesc(file);
    for (off_type i = 0 ; i < size() ; ++i) {
      data[i].print(file);
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1b230
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movslq 0x48(%r14), %rdx
movq %rdx, 0x8(%rbx,%rcx)
movq -0x18(%rax), %rcx
movq $0x14, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rax
movl $0xfffffefb, %ecx       # imm = 0xFFFFFEFB
andl 0x18(%rbx,%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq (%r14), %rax
movq %r14, %rdi
callq *0x30(%rax)
movq %rbx, %rdi
callq 0xb440
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1b250
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movl %eax, %eax
cmpq %rax, %r12
jae 0x1b0ad
movq 0x78(%r14), %rdi
movq (%rdi,%r15), %rax
addq %r15, %rdi
movq %rbx, %rsi
callq *(%rax)
incq %r12
addq $0x78, %r15
jmp 0x1b084
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/StatType.h
// Function: Stats::VectorBase<Stats::Vector, Stats::Scalar>::vresult() const
VResult vresult() const {
    VResult vres;
    for (off_type i = 0 ; i < size() ; ++i) {
      vres[i] = data[i].result();
    }
    return vres;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movl %eax, %eax
cmpq %rax, %r12
jae 0x1b19c
movq 0x78(%r14), %rdi
movq (%rdi,%r15), %rax
addq %r15, %rdi
callq *0x60(%rax)
incq %r12
addq $0x78, %r15
jmp 0x1b175
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x18c78
movq %r14, %rdi
callq 0xb4d0
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/StatType.h
// Function: Stats::VectorBase<Stats::Vector, Stats::Scalar>::total() const
Result total() const {
    Result sum = 0.0;
    for (off_type i = 0 ; i < size() ; ++i) {
      sum += data[i].result();
    }
    return sum;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movl %eax, %eax
cmpq %rax, %r15
jae 0x1b211
movq 0x78(%rbx), %rdi
movq (%rdi,%r14), %rax
addq %r14, %rdi
callq *0x60(%rax)
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
incq %r15
addq $0x78, %r14
jmp 0x1b1da
movsd 0x8(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/DRAM.h
// Function: ramulator::DRAM<ramulator::DDR3>::check(ramulator::DDR3::Command, int const*, long)
bool DRAM<T>::check(typename T::Command cmd, const int* addr, long clk)
{
    if (next[int(cmd)] != -1 && clk < next[int(cmd)])
        return false; // stop recursion: the check failed at this level

    int child_id = addr[int(level)+1];
    if (child_id < 0 || level == spec->scope[int(cmd)] || !children.size())
        return true; // stop recursion: the check passed at all levels

    // recursively check my child
    return children[child_id]->check(cmd, addr, clk);
}

// Assembly:
movslq %esi, %rsi
movq 0x450(%rdi,%rsi,8), %rax
cmpq $-0x1, %rax
sete %r8b
cmpq %rcx, %rax
setle %al
orb %r8b, %al
cmpb $0x1, %al
jne 0x1b4ec
movslq 0x398(%rdi), %r9
movslq 0x4(%rdx,%r9,4), %r8
testq %r8, %r8
js 0x1b4ec
movq 0x390(%rdi), %r10
cmpl 0x180(%r10,%rsi,4), %r9d
je 0x1b4ec
movq 0x3b0(%rdi), %r9
cmpq %r9, 0x3b8(%rdi)
je 0x1b4ec
movq (%r9,%r8,8), %rdi
jmp 0x1b497
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/DRAM.h
// Function: ramulator::DRAM<ramulator::DDR3>::decode(ramulator::DDR3::Command, int const*)
typename T::Command DRAM<T>::decode(typename T::Command cmd, const int* addr)
{
    int child_id = addr[int(level)+1];
    if (prereq[int(cmd)]) {
        typename T::Command prereq_cmd = prereq[int(cmd)](this, cmd, child_id);
        if (prereq_cmd != T::Command::MAX)
            return prereq_cmd; // stop recursion: there is a prerequisite at this level
    }

    if (child_id < 0 || !children.size())
        return cmd; // stop recursion: there were no prequisites at any level

    // recursively decode at my child
    return children[child_id]->decode(cmd, addr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
movslq %esi, %r13
shlq $0x5, %r13
movslq 0x398(%r15), %rax
movl 0x4(%r14,%rax,4), %r12d
movq 0x870(%r15), %rdi
cmpq $0x0, 0x10(%rdi,%r13)
je 0x1b536
addq %r13, %rdi
movq %r15, %rsi
movl %ebx, %edx
movl %r12d, %ecx
callq 0x1b560
cmpl $0xc, %eax
jne 0x1b551
testl %r12d, %r12d
js 0x1b553
movq 0x3b0(%r15), %rax
cmpq %rax, 0x3b8(%r15)
je 0x1b553
movq (%rax,%r12,8), %r15
jmp 0x1b506
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/Scheduler.h
// Function: ramulator::RowTable<ramulator::DDR3>::get_hits(std::vector<int, std::allocator<int>> const&, bool)
int get_hits(const vector<int>& addr_vec, const bool to_opened_row = false)
    {
        auto begin = addr_vec.begin();
        auto end = begin + int(T::Level::Row);

        vector<int> rowgroup(begin, end);
        int row = *end;

        auto itr = table.find(rowgroup);
        if (itr == table.end())
            return 0;

        if(!to_opened_row && (itr->second.row != row))
            return 0;

        return itr->second.hits;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebx
movq %rdi, %r14
movq (%rsi), %r15
leaq 0xc(%r15), %rdx
leaq 0x8(%rsp), %r12
leaq 0x7(%rsp), %rcx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1b74e
movl 0xc(%r15), %r15d
leaq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0x1b866
addq $0x10, %r14
xorl %ebp, %ebp
cmpq %r14, %rax
je 0x1b71f
testb %bl, %bl
jne 0x1b71c
cmpl %r15d, 0x38(%rax)
jne 0x1b71f
movl 0x3c(%rax), %ebp
leaq 0x8(%rsp), %rdi
callq 0x1b7dc
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1b7dc
movq %rbx, %rdi
callq 0xb4d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/DRAM.h
// Function: ramulator::DRAM<ramulator::DDR3>::check_row_hit(ramulator::DDR3::Command, int const*)
bool DRAM<T>::check_row_hit(typename T::Command cmd, const int* addr)
{
    int child_id = addr[int(level)+1];
    if (rowhit[int(cmd)]) {
        return rowhit[int(cmd)](this, cmd, child_id);  // stop recursion: there is a row hit at this level
    }

    if (child_id < 0 || !children.size())
        return false; // stop recursion: there were no row hits at any level

    // recursively check for row hits at my child
    return children[child_id]->check_row_hit(cmd, addr);
}

// Assembly:
movl %esi, %eax
movq %rdi, %rsi
movslq %eax, %r8
shlq $0x5, %r8
movslq 0x398(%rsi), %rcx
movl 0x4(%rdx,%rcx,4), %ecx
movq 0x878(%rsi), %rdi
cmpq $0x0, 0x10(%rdi,%r8)
jne 0x1ba91
testl %ecx, %ecx
js 0x1ba8e
movq 0x3b0(%rsi), %rdi
cmpq %rdi, 0x3b8(%rsi)
je 0x1ba8e
movq (%rdi,%rcx,8), %rsi
jmp 0x1ba5a
xorl %eax, %eax
retq
addq %r8, %rdi
movl %eax, %edx
jmp 0x1ba9c
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/StatType.h
// Function: Stats::VectorBase<Stats::Vector, Stats::Scalar>::init(unsigned int)
void init(size_type __size) {
    _size = __size;
    data.resize(size());
    for (off_type i = 0 ; i < size() ; ++i) {
      data[i].flags(0)
             .name("[" + std::string(1, char(i + '0')) + "]");
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %esi, 0x70(%rdi)
leaq 0x78(%rdi), %r14
movq (%rdi), %rax
movq %rdi, 0x10(%rsp)
callq *0x8(%rax)
movl %eax, %esi
movq %r14, 0x8(%rsp)
movq %r14, %rdi
callq 0x1c7ba
pushq $0x4c
popq %r12
xorl %r14d, %r14d
leaq 0x38(%rsp), %r13
leaq 0x58(%rsp), %r15
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl %eax, %eax
cmpq %rax, %r14
jae 0x1c777
movq 0x8(%rsp), %rax
movq (%rax), %rbx
andw $0x0, (%rbx,%r12)
leal 0x30(%r14), %eax
leaq 0x28(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movsbl %al, %edx
leaq 0x18(%rsp), %rbp
movq %rbp, %rdi
pushq $0x1
popq %rsi
callq 0xb310
movq %r13, %rdi
leaq 0xb6194(%rip), %rsi     # 0xd28bb
movq %rbp, %rdx
callq 0x1aea7
movq %r15, %rdi
movq %r13, %rsi
leaq 0xb61ad(%rip), %rdx     # 0xd28e9
callq 0x1a88e
leaq (%rbx,%r12), %rdi
addq $-0x44, %rdi
movq %r15, %rsi
callq 0xb1c0
movq %r15, %rdi
callq 0xb568
movq %r13, %rdi
callq 0xb568
leaq 0x18(%rsp), %rdi
callq 0xb568
incq %r14
addq $0x78, %r12
jmp 0x1c6d8
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xb568
jmp 0x1c798
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0xb568
jmp 0x1c7a7
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xb568
movq %rbx, %rdi
callq 0xb4d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/Memory.h
// Function: ramulator::Memory<ramulator::DDR3, ramulator::Controller>::calc_log2(int)
int calc_log2(int val){
        int n = 0;
        while ((val >>= 1))
            n ++;
        return n;
    }

// Assembly:
xorl %eax, %eax
cmpl $0x2, %esi
jb 0x1cf8d
sarl %esi
incl %eax
jmp 0x1cf82
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/Memory.h
// Function: ramulator::Memory<ramulator::DDR3, ramulator::Controller>::finish()
void finish(void) {
      dram_capacity = max_address;
      int *sz = spec->org_entry.count;
      maximum_bandwidth = spec->speed_entry.rate * 1e6 * spec->channel_width * sz[int(T::Level::Channel)] / 8;
      long dram_cycles = num_dram_cycles.value();
      for (auto ctrl : ctrls) {
        long read_req = long(incoming_read_reqs_per_channel[ctrl->channel->id].value());
        ctrl->finish(read_req, dram_cycles);
      }

      // finalize average queueing requests
      in_queue_req_num_avg = in_queue_req_num_sum.value() / dram_cycles;
      in_queue_read_req_num_avg = in_queue_read_req_num_sum.value() / dram_cycles;
      in_queue_write_req_num_avg = in_queue_write_req_num_sum.value() / dram_cycles;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cvtsi2sdq 0xb48(%rdi), %xmm0
movsd %xmm0, 0x78(%rdi)
movq 0xc20(%rdi), %rax
cvtsi2sdl 0x2d68(%rax), %xmm0
mulsd 0xb376f(%rip), %xmm0    # 0xd1080
cvtsi2sdl 0x2744(%rax), %xmm1
cvtsi2sdl 0x272c(%rax), %xmm2
mulsd %xmm0, %xmm1
mulsd %xmm1, %xmm2
mulsd 0xb3757(%rip), %xmm2    # 0xd1088
movsd %xmm2, 0x630(%rdi)
cvttsd2si 0x110(%rdi), %r14
movq 0xc08(%rdi), %r13
movq 0xc10(%rdi), %rbp
leaq 0x478(%rdi), %r15
cmpq %rbp, %r13
je 0x1d995
movq (%r13), %r12
movq 0x1098(%r12), %rax
movl 0x39c(%rax), %esi
movq %r15, %rdi
callq 0x21130
movq (%rax), %rcx
movq %rax, %rdi
callq *0x58(%rcx)
cvttsd2si %xmm0, %rsi
movq %r12, %rdi
movq %r14, %rdx
callq 0x218fe
addq $0x8, %r13
jmp 0x1d957
cvtsi2sd %r14, %xmm0
movsd 0x6c8(%rbx), %xmm1
movsd 0x760(%rbx), %xmm2
divsd %xmm0, %xmm1
movsd %xmm1, 0x890(%rbx)
divsd %xmm0, %xmm2
movsd %xmm2, 0x928(%rbx)
movsd 0x7f8(%rbx), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x9c0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/Memory.h
// Function: ramulator::Memory<ramulator::DDR3, ramulator::Controller>::record_core(int)
void record_core(int coreid) {
#ifndef INTEGRATED_WITH_GEM5
      record_read_requests[coreid] = num_read_requests[coreid];
      record_write_requests[coreid] = num_write_requests[coreid];
#endif
      for (auto ctrl : ctrls) {
        ctrl->record_core(coreid);
      }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0x21130
movq %rax, %r15
leaq 0x9e8(%r14), %rdi
movl %ebx, %esi
callq 0x21130
movq %rax, %rdi
movq %r15, %rsi
callq 0x21db4
leaq 0x280(%r14), %rdi
movl %ebx, %esi
callq 0x21130
movq %rax, %r15
leaq 0xa98(%r14), %rdi
movl %ebx, %esi
callq 0x21130
movq %rax, %rdi
movq %r15, %rsi
callq 0x21db4
movq 0xc08(%r14), %r15
movq 0xc10(%r14), %r14
cmpq %r14, %r15
je 0x1dc17
movq (%r15), %rdi
movl %ebx, %esi
callq 0x21dda
addq $0x8, %r15
jmp 0x1dc02
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/Memory.h
// Function: ramulator::Memory<ramulator::DDR3, ramulator::Controller>::dump_mapping_scheme()
void dump_mapping_scheme(){
        cout << "Mapping Scheme: " << endl;
        for (MapScheme::iterator mapit = mapping_scheme.begin(); mapit != mapping_scheme.end(); mapit++)
        {
            int level = mapit->first;
            for (MapSchemeEntry::iterator entit = mapit->second.begin(); entit != mapit->second.end(); entit++){
                cout << T::level_str[level] << "[" << entit->first << "] := ";
                cout << "PhysicalAddress[" << *(entit->second.begin()) << "]";
                entit->second.erase(entit->second.begin());
                for (MapSrcVector::iterator it = entit->second.begin() ; it != entit->second.end(); it ++)
                    cout << " xor PhysicalAddress[" << *it << "]";
                cout << endl;
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x117e74(%rip), %r14    # 0x135f90
leaq 0xb476d(%rip), %rsi     # 0xd2890
movq %r14, %rdi
callq 0xb2c0
movq %rax, %rdi
callq 0xb190
movq 0xb68(%rbx), %rax
addq $0xb58, %rbx            # imm = 0xB58
movq %rbx, (%rsp)
leaq 0xb479d(%rip), %rbx     # 0xd28e9
leaq 0xb4754(%rip), %r15     # 0xd28a7
cmpq (%rsp), %rax
je 0x1e24e
movslq 0x20(%rax), %r12
movq 0x40(%rax), %r13
movq %rax, 0x8(%rsp)
addq $0x30, %rax
movq %rax, 0x10(%rsp)
shlq $0x5, %r12
addq 0x117df2(%rip), %r12    # 0x135f70
cmpq 0x10(%rsp), %r13
je 0x1e23f
movq %r14, %rdi
movq %r12, %rsi
callq 0xb290
movq %rax, %rdi
leaq 0xb471d(%rip), %rsi     # 0xd28bb
callq 0xb2c0
movl 0x20(%r13), %esi
movq %rax, %rdi
callq 0xb220
movq %rax, %rdi
leaq 0xb46e8(%rip), %rsi     # 0xd28a1
callq 0xb2c0
movq %r14, %rdi
leaq 0xb46e4(%rip), %rsi     # 0xd28ac
callq 0xb2c0
leaq 0x28(%r13), %rbp
movq 0x28(%r13), %rcx
movl (%rcx), %esi
movq %rax, %rdi
callq 0xb220
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb2c0
movq 0x28(%r13), %rsi
movq %rbp, %rdi
callq 0x1ea38
movq 0x28(%r13), %rbp
cmpq 0x30(%r13), %rbp
je 0x1e227
movq %r14, %rdi
movq %r15, %rsi
callq 0xb2c0
movl (%rbp), %esi
movq %rax, %rdi
callq 0xb220
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb2c0
addq $0x4, %rbp
jmp 0x1e1fa
movq %r14, %rdi
callq 0xb190
movq %r13, %rdi
callq 0xb230
movq %rax, %r13
jmp 0x1e17e
movq 0x8(%rsp), %rdi
callq 0xb230
jmp 0x1e153
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/Refresh.h
// Function: ramulator::Refresh<ramulator::ALDRAM>::tick_ref()
void tick_ref() {
    clk++;

    int refresh_interval = ctrl->channel->spec->speed_entry.nREFI;

    // Time to schedule a refresh
    if ((clk - refreshed) >= refresh_interval) {
      inject_refresh(true);
      // ALDRAM: update timing parameters based on temperatures
      ALDRAM::Temp current_temperature = ALDRAM::Temp::COLD;
      ctrl->update_temp(current_temperature);
    }
  }

// Assembly:
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
incq %rcx
movq %rcx, 0x10(%rdi)
movq 0x1098(%rax), %rax
movq 0x390(%rax), %rax
movslq 0x33e4(%rax), %rax
subq 0x18(%rdi), %rcx
cmpq %rax, %rcx
jge 0x8d5d8
retq
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x8dabe
movq 0x8(%rbx), %rdi
xorl %esi, %esi
popq %rbx
jmp 0x9cfec
// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/Refresh.h
// Function: ramulator::Refresh<ramulator::DDR3>::inject_refresh(bool)
void inject_refresh(bool b_ref_rank) {
    // Rank-level refresh
    if (b_ref_rank) {
      for (auto rank : ctrl->channel->children)
        refresh_target(ctrl, rank->id, -1, -1);
    }
    // Bank-level refresh. Simultaneously issue to all ranks (better performance than staggered refreshes).
    else {
      for (auto rank : ctrl->channel->children)
        refresh_target(ctrl, rank->id, bank_ref_counters[rank->id], -1);
    }
    refreshed = clk;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x1098(%rax), %rax
movq 0x3b0(%rax), %r14
movq 0x3b8(%rax), %r15
pushq $-0x1
popq %rbp
testl %esi, %esi
je 0x1fca7
cmpq %r15, %r14
je 0x1fcd2
movq (%r14), %rax
movq 0x8(%rbx), %rsi
movl 0x39c(%rax), %edx
movq %rbx, %rdi
movl %ebp, %ecx
movl %ebp, %r8d
callq 0x1fce6
addq $0x8, %r14
jmp 0x1fc82
cmpq %r15, %r14
je 0x1fcd2
movq (%r14), %rax
movslq 0x39c(%rax), %rdx
movq 0x8(%rbx), %rsi
movq 0x20(%rbx), %rax
movl (%rax,%rdx,4), %ecx
movq %rbx, %rdi
movl %ebp, %r8d
callq 0x1fce6
addq $0x8, %r14
jmp 0x1fca7
movq 0x10(%rbx), %rax
movq %rax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop