LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/KokiKishimoto[P]cp_decomposition/./model_file_load.hpp
// Function: ModelFileLoad::model_load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void model_load(std::string modelfile){
		std::ifstream fin;
		
		fin.open(modelfile);
		fin >> Size >> vecDim;
		Vec.resize(Size);
		for (int i = 0; i < Size; i++) {
			std::string tmp;
			fin >> tmp;
			Vec[i].resize(vecDim);
			for (int j = 0; j < vecDim; j++) {
				fin >> Vec[i][j];
			}
		}
		fin.close();
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x2220
movq %r15, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x21a0
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x2130
leaq 0x4(%rbx), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x2130
leaq 0x8(%rbx), %r15
movslq (%rbx), %rsi
movq %r15, %rdi
callq 0x6a84
cmpl $0x0, (%rbx)
jle 0x52b7
leaq 0x10(%rsp), %r13
xorl %ebp, %ebp
leaq 0x30(%rsp), %r12
movq %rbx, 0x20(%rsp)
movq %r13, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %r12, %rdi
movq %rsp, %rsi
callq 0x2260
leaq (,%rbp,2), %rbx
addq %rbp, %rbx
leaq (,%rbx,8), %rdi
addq (%r15), %rdi
movslq (%r14), %rsi
callq 0x548c
movq %rbp, 0x28(%rsp)
cmpl $0x0, (%r14)
jle 0x5283
xorl %ebp, %ebp
xorl %r13d, %r13d
movq (%r15), %rax
movq (%rax,%rbx,8), %rsi
addq %rbp, %rsi
movq %r12, %rdi
callq 0x2140
incq %r13
movslq (%r14), %rax
addq $0x8, %rbp
cmpq %rax, %r13
jl 0x5262
movq (%rsp), %rdi
leaq 0x10(%rsp), %r13
cmpq %r13, %rdi
je 0x529e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x28(%rsp), %rbp
incq %rbp
movq 0x20(%rsp), %rbx
movslq (%rbx), %rax
cmpq %rax, %rbp
jl 0x5217
leaq 0x30(%rsp), %rdi
callq 0x2070
leaq 0x30(%rsp), %rdi
callq 0x2080
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x5302
jmp 0x52e4
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x5302
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
leaq 0x30(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5d36
addq $0x10, %r15
cmpq %r15, %rax
je 0x65d3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5c56
movl (%rax), %eax
jmp 0x65d8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5d36
addq $0x40, %r15
cmpq %r15, %rax
je 0x660d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5c56
movl (%rax), %eax
jmp 0x6612
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movl %edx, %eax
movq %rdi, %rbx
movslq %r8d, %rdi
movq 0x238(%rbx), %rdx
movq 0x250(%rbx), %r14
shlq $0x3, %rdi
leaq (%rdi,%rdi,2), %r15
leaq (%r14,%r15), %r10
addq %rdx, %r15
cltq
movq 0x268(%rbx), %rdi
leaq (%rax,%rax,2), %rax
leaq (%rdi,%rax,8), %r8
movslq %ecx, %rax
leaq (%rax,%rax,2), %rax
leaq (%rdi,%rax,8), %r12
movslq %esi, %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
addq %rax, %rdx
addq %rax, %r14
leaq 0x310(%rbx), %r13
leaq 0x280(%rbx), %r9
leaq 0x298(%rbx), %rax
leaq 0x2b0(%rbx), %r11
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
movq %r10, %rcx
pushq %r11
pushq %rax
callq 0x7992
addq $0x10, %rsp
movq (%rbp), %rdi
testq %rdi, %rdi
je 0x76e0
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
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 0x7992
addq $0x10, %rsp
movq (%rbp), %rdi
testq %rdi, %rdi
je 0x772a
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2200
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
je 0x798e
sarq $0x3, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
movq (%rdx), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movsd 0x16dd(%rip), %xmm1     # 0x9038
movsd (%rax,%rsi,8), %xmm2
addsd %xmm1, %xmm2
movapd %xmm1, %xmm3
divsd %xmm2, %xmm3
addsd %xmm0, %xmm3
movsd (%rdx,%rsi,8), %xmm2
addsd %xmm1, %xmm2
movapd %xmm1, %xmm0
divsd %xmm2, %xmm0
addsd %xmm3, %xmm0
incq %rsi
cmpq %rsi, %rcx
jne 0x795b
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x233f
jle 0x233e
xorl %ecx, %ecx
leal (%rax,%rcx), %edx
shrl %edx
cmpl %esi, 0x30(%rdi,%rdx,4)
jg 0x2338
incl %edx
movl %edx, %ecx
jmp 0x233a
movl %edx, %eax
cmpl %eax, %ecx
jl 0x2327
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movslq 0xc(%rdi), %rax
testq %rax, %rax
jle 0x2370
movl 0x2c(%rdi,%rax,4), %ecx
cmpl %esi, %ecx
jle 0x2370
movl %ecx, 0x30(%rdi,%rax,4)
movq 0x10(%rdi,%rax,8), %rcx
movq %rcx, 0x18(%rdi,%rax,8)
decq %rax
leaq 0x1(%rax), %rcx
cmpq $0x1, %rcx
jg 0x234b
xorl %eax, %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_O1/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 0x23b9
movl %r11d, 0x30(%rsi)
movl $0x2, %r8d
movl $0x1, %edx
movl $0x18, %ecx
movl $0x28, %r10d
jmp 0x23f6
movl $0x10, %ecx
cmpl %eax, %r11d
jge 0x23d6
movl $0x2, %r8d
xorl %edx, %edx
movl $0x28, %r10d
movl %r11d, %eax
jmp 0x23f6
movl %r11d, 0x30(%rsi)
movq 0x28(%rdi), %rax
movq %rax, 0x18(%rsi)
movl $0x1, %edx
movl $0x20, %r10d
movl $0x1, %r8d
movl %r9d, %eax
movq (%rdi,%r10), %r9
movq %r9, (%rsi,%rcx)
movl %edx, 0xc(%rsi)
movl %r8d, 0xc(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movslq 0xc(%rdi), %r12
testq %r12, %r12
jle 0x2482
movq %r12, %rax
shlq $0x5, %rax
leaq (%rax,%rbx), %rdi
addq $0x10, %rdi
movl 0x6c(%rbx,%r12,4), %eax
cmpl %ebp, %eax
jle 0x2482
movl %eax, 0x70(%rbx,%r12,4)
decq %r12
leaq -0x20(%rdi), %r15
movq %r15, %rsi
callq 0x2090
leaq 0x1(%r12), %rax
movq %r15, %rdi
cmpq $0x1, %rax
jg 0x2454
xorl %r12d, %r12d
movslq %r12d, %rax
movl %ebp, 0x70(%rbx,%rax,4)
shlq $0x5, %rax
leaq (%rbx,%rax), %rdi
addq $0x10, %rdi
movq %r14, %rsi
callq 0x2090
incl 0xc(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2090
movl $0x2, 0xc(%r14)
movl $0x1, 0xc(%rbx)
movq 0x88(%r14), %rax
movq %rax, 0x88(%rbx)
movq %r14, 0x80(%rbx)
movq 0x88(%r14), %rax
testq %rax, %rax
je 0x24fe
movq %rbx, 0x80(%rax)
movq %rbx, 0x88(%r14)
movl 0x70(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %rbx
movl %edx, %ebp
movq %rsi, %r14
testq %r14, %r14
je 0x2541
movb 0x8(%r14), %r15b
movq (%r14), %rax
movq %r14, %rdi
movl %ebp, %esi
callq *(%rax)
cltq
cmpb $0x1, %r15b
je 0x2546
movq 0x10(%r14,%rax,8), %r14
jmp 0x251f
xorl %r15d, %r15d
jmp 0x2567
movb $0x1, %r15b
cmpl %ebp, 0x6c(%r14,%rax,4)
jne 0x2567
decq %rax
shlq $0x5, %rax
leaq (%r14,%rax), %rsi
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x2090
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movl %ecx, %ebp
movq (%rsi), %r15
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rdi, (%rsp)
movq %rcx, 0x28(%rdi)
testq %r15, %r15
je 0x2bcf
movl %edx, %r14d
cmpb $0x0, 0x8(%r15)
jne 0x2b30
movq (%r15), %rax
movq %r15, %rdi
movl %r14d, %esi
callq *(%rax)
cltq
movq 0x10(%r15,%rax,8), %r15
jmp 0x2b15
movq (%r15), %rax
movq %r15, %rdi
movl %r14d, %esi
callq *(%rax)
movslq %eax, %rcx
decl %eax
cmpl %r14d, 0x6c(%r15,%rcx,4)
cmovel %eax, %ecx
cmpl 0xc(%r15), %ecx
setl %al
jge 0x2b6e
movslq %ecx, %rcx
movl 0x70(%r15,%rcx,4), %edx
cmpl %r14d, %edx
setl %sil
cmpl %ebp, %edx
setg %dl
orb %sil, %dl
je 0x2b79
testb %al, %al
jne 0x2bcf
movq 0x88(%r15), %r15
xorl %ecx, %ecx
jmp 0x2b48
leaq (%r15,%rcx,4), %r12
addq $0x70, %r12
leaq 0x1(%rcx), %rbx
shlq $0x5, %rcx
leaq (%r15,%rcx), %r13
addq $0x10, %r13
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x2bfa
movq %rax, %rdi
movq %r13, %rsi
callq 0x2090
movslq 0xc(%r15), %rax
cmpq %rax, %rbx
setl %al
jge 0x2b6e
movl 0x4(%r12), %ecx
cmpl %r14d, %ecx
jl 0x2b6a
addq $0x4, %r12
incq %rbx
addq $0x20, %r13
cmpl %ebp, %ecx
jle 0x2b91
jmp 0x2b6a
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2be6
jmp 0x2be6
movq %rax, %r14
movq (%rsp), %rdi
callq 0x2cba
movq %r14, %rdi
callq 0x21a0
// File: /workspace/github_cpp_makefile_star2_O1/CDISC2020[P]Projet_satellite_agile/src/ARINC/kernel_arinc.c
// Function: update_pids
void update_pids(int sig)
{
	FILE* file=NULL;
	file=fopen("listpid", "r");
	if(!file)
		printf("Failed to read listpid");
	else
	{
		int tab[N] = {0};
		fscanf(file,"%d\n%d\n%d\n", pid, pid+1, pid+2); // En fonction de N
		printf("New pids:\n%d\n%d\n%d\n", pid[0], pid[1], pid[2]); // fct N
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xe0e(%rip), %rdi       # 0x2015
leaq 0xdf6(%rip), %rsi       # 0x2004
callq 0x10b0
testq %rax, %rax
je 0x125f
leaq 0xe08(%rip), %rsi       # 0x2027
leaq 0x2e6e(%rip), %rdx      # 0x4094
leaq 0x2e6b(%rip), %rcx      # 0x4098
leaq 0x2e68(%rip), %r8       # 0x409c
movq %rax, %rdi
xorl %eax, %eax
callq 0x1030
movl 0x2e50(%rip), %esi      # 0x4094
movl 0x2e4e(%rip), %edx      # 0x4098
movl 0x2e4c(%rip), %ecx      # 0x409c
leaq 0xdc6(%rip), %rdi       # 0x201d
xorl %eax, %eax
popq %rbp
jmp 0x1070
leaq 0xda0(%rip), %rdi       # 0x2006
xorl %eax, %eax
popq %rbp
jmp 0x1070
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]ramulator/src/StatType.cpp
// Function: Stats::Histogram::add(Stats::Histogram&)
void
Histogram::add(Histogram &hs)
{
    size_type b_size = hs.size();
    assert(size() == b_size);
    assert(min_bucket == hs.min_bucket);

    sum += hs.sum;
    logs += hs.logs;
    squares += hs.squares;
    samples += hs.samples;

    while(bucket_size > hs.bucket_size)
        hs.grow_up();
    while(bucket_size < hs.bucket_size)
        grow_up();

    for (uint32_t i = 0; i < b_size; i++)
        cvec[i] += hs.cvec[i];
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x8(%rax)
movl %eax, %ebp
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
cmpl %ebp, %eax
jne 0x13edef
movsd 0x78(%rbx), %xmm0
ucomisd 0x78(%r14), %xmm0
jne 0x13ee0e
jp 0x13ee0e
movsd 0x90(%r14), %xmm0
addsd 0x90(%rbx), %xmm0
movsd %xmm0, 0x90(%rbx)
movsd 0x98(%r14), %xmm0
addsd 0x98(%rbx), %xmm0
movsd %xmm0, 0x98(%rbx)
movsd 0xa0(%r14), %xmm0
addsd 0xa0(%rbx), %xmm0
movsd %xmm0, 0xa0(%rbx)
movsd 0xa8(%r14), %xmm0
addsd 0xa8(%rbx), %xmm0
movsd %xmm0, 0xa8(%rbx)
movsd 0x88(%rbx), %xmm0
ucomisd 0x88(%r14), %xmm0
jbe 0x13edaa
movq %r14, %rdi
callq 0x13ebf4
jmp 0x13ed85
movq %rbx, %rdi
callq 0x13ebf4
movsd 0x88(%r14), %xmm0
ucomisd 0x88(%rbx), %xmm0
ja 0x13eda2
testl %ebp, %ebp
je 0x13edea
movq 0xb0(%r14), %rax
movq 0xb0(%rbx), %rcx
movl %ebp, %edx
xorl %esi, %esi
movsd (%rax,%rsi,8), %xmm0
addsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x13edd3
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2125c(%rip), %rdi     # 0x160052
leaq 0x211b5(%rip), %rsi     # 0x15ffb2
leaq 0x2125f(%rip), %rcx     # 0x160063
movl $0x68, %edx
callq 0xb200
leaq 0x21276(%rip), %rdi     # 0x16008b
leaq 0x21196(%rip), %rsi     # 0x15ffb2
leaq 0x21240(%rip), %rcx     # 0x160063
movl $0x69, %edx
callq 0xb200
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x17106
leaq 0x8(%r15), %rcx
cmpq %rcx, %rax
je 0x13b7b
movq %r15, %rdi
movq %r14, %rsi
callq 0x17106
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x1719a
jmp 0x13b94
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x13fa13(%rip), %rdx    # 0x15359c
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x17586
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x17106
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x13bdc
movq (%r15), %rsi
leaq 0x13986d(%rip), %rdi    # 0x14d437
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xb060
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x174c6
movq %rbx, %rdi
movq %r12, %rsi
callq 0x17260
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13c15
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb2f0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13c30
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1722a
movq %rbx, %rdi
callq 0xb510
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movq (%rsi), %rax
movq -0x18(%rax), %rax
movq $0x28, 0x10(%rsi,%rax)
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdx
movq %rbx, %rdi
callq 0xb340
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 0xb460
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21b66
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 $0x28, %rsp
movq %rdi, %rbx
leaq 0x17da8a(%rip), %rax    # 0x1a1488
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movq $0x0, 0x30(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movl $0x0, 0x80(%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), %rax
movq 0x3b8(%rax), %rcx
subq 0x3b0(%rax), %rcx
shrq $0x3, %rcx
movl %ecx, 0x38(%rdi)
movq 0x390(%rax), %rax
movl 0x2734(%rax), %eax
movl %eax, 0x3c(%rdi)
testl %ecx, %ecx
jle 0x23b18
leaq 0x20(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x50(%rbx), %r12
leaq 0x68(%rbx), %rax
movq %rax, 0x20(%rsp)
xorl %ebp, %ebp
leaq 0x18(%rsp), %r13
movl $0x0, 0x18(%rsp)
movq 0x28(%rbx), %rsi
cmpq 0x30(%rbx), %rsi
je 0x23ac3
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x28(%rbx)
jmp 0x23ad0
movq 0x10(%rsp), %rdi
movq %r13, %rdx
callq 0x24f52
movl $0x18, %edi
callq 0xb2e0
movq %rax, %r14
movslq 0x3c(%rbx), %rsi
movl $0x0, 0xc(%rsp)
movb $0x1, %r15b
movq %rax, %rdi
leaq 0xc(%rsp), %rdx
leaq 0xb(%rsp), %rcx
callq 0x24dce
movq %r14, 0x18(%rsp)
xorl %r15d, %r15d
movq %r12, %rdi
movq %r13, %rsi
callq 0x25072
incl %ebp
cmpl 0x38(%rbx), %ebp
jl 0x23aa1
movaps 0x129511(%rip), %xmm0   # 0x14d030
movups %xmm0, 0x40(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x23b34
movq %rax, %r12
jmp 0x23b4e
movq %rax, %r12
testb %r15b, %r15b
je 0x23b4e
movl $0x18, %esi
movq %r14, %rdi
callq 0xb2f0
movq 0x20(%rsp), %rdi
callq 0x24e4c
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x23b6d
movq 0x60(%rbx), %rsi
subq %rdi, %rsi
callq 0xb2f0
movq 0x10(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x23b86
movq 0x30(%rbx), %rsi
subq %rdi, %rsi
callq 0xb2f0
movq %r12, %rdi
callq 0xb510
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x12a515(%rip), %rsi    # 0x14e14f
leaq 0x12a51e(%rip), %rdx    # 0x14e15f
leaq 0x8(%rsp), %rdi
callq 0x17586
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x17106
movq %rax, %r14
leaq 0x8(%rbx), %r12
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x23c76
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
cmpq %r12, %r14
je 0x23cd4
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x12a4c5(%rip), %rsi    # 0x14e14f
leaq 0x12a4ce(%rip), %rdx    # 0x14e15f
callq 0x17586
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x17106
addq $0x40, %rax
leaq 0x12a618(%rip), %rsi    # 0x14e2c6
movq %rax, %rdi
callq 0xb100
testl %eax, %eax
sete %bl
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x23cd6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
jmp 0x23cd6
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x23ce8
jmp 0x23d04
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x23d07
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
jmp 0x23d07
movq %rax, %rbx
movq %rbx, %rdi
callq 0xb510
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x12a432(%rip), %rsi    # 0x14e160
leaq 0x12a43a(%rip), %rdx    # 0x14e16f
leaq 0x8(%rsp), %rdi
callq 0x17586
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x17106
movq %rax, %r14
leaq 0x8(%rbx), %r12
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x23d6a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
cmpq %r12, %r14
je 0x23dc8
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x12a3e2(%rip), %rsi    # 0x14e160
leaq 0x12a3ea(%rip), %rdx    # 0x14e16f
callq 0x17586
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x17106
addq $0x40, %rax
leaq 0x12a524(%rip), %rsi    # 0x14e2c6
movq %rax, %rdi
callq 0xb100
testl %eax, %eax
sete %bl
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x23dca
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
jmp 0x23dca
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x23ddc
jmp 0x23df8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x23dfb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
jmp 0x23dfb
movq %rax, %rbx
movq %rbx, %rdi
callq 0xb510
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movq (%rsi), %rax
movq -0x18(%rax), %rax
movq $0x28, 0x10(%rsi,%rax)
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdx
movq %rbx, %rdi
callq 0xb340
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 0xb460
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24232
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
testl %eax, %eax
je 0x2405b
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x78(%r14), %rdi
movq (%rdi,%r15), %rax
addq %r15, %rdi
movq %rbx, %rsi
callq *(%rax)
incq %r12
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movl %eax, %eax
addq $0x78, %r15
cmpq %rax, %r12
jb 0x24034
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movl %eax, %eax
cmpq %rax, %r12
jae 0x2415d
movq 0x78(%r14), %rdi
movq (%rdi,%r15), %rax
addq %r15, %rdi
callq *0x60(%rax)
incq %r12
addq $0x78, %r15
jmp 0x24136
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x24183
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0xb2f0
movq %r14, %rdi
callq 0xb510
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movq (%rdi), %rax
callq *0x8(%rax)
xorpd %xmm0, %xmm0
testl %eax, %eax
je 0x241e9
movsd %xmm0, 0x8(%rsp)
xorl %r14d, %r14d
xorl %r15d, %r15d
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
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movl %eax, %eax
addq $0x78, %r14
cmpq %rax, %r15
jb 0x241b2
jmp 0x241ef
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
setne %r8b
cmpq %rcx, %rax
setg %al
testb %al, %r8b
jne 0x244f8
movslq 0x398(%rdi), %r9
movslq 0x4(%rdx,%r9,4), %r8
movb $0x1, %al
testq %r8, %r8
js 0x244fa
movq 0x390(%rdi), %r10
cmpl 0x180(%r10,%rsi,4), %r9d
je 0x244fa
movq 0x3b0(%rdi), %r9
cmpq %r9, 0x3b8(%rdi)
je 0x244fa
movq (%r9,%r8,8), %rdi
jmp 0x244a3
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x24544
addq %r13, %rdi
movq %r15, %rsi
movl %ebx, %edx
movl %r12d, %ecx
callq 0x2456e
cmpl $0xc, %eax
jne 0x2455f
testl %r12d, %r12d
js 0x24561
movq 0x3b0(%r15), %rax
cmpq %rax, 0x3b8(%r15)
je 0x24561
movq (%rax,%r12,8), %r15
jmp 0x24514
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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, %ebp
movq %rdi, %r14
movq (%rsi), %rbx
leaq 0xc(%rbx), %rdx
leaq 0x8(%rsp), %r15
leaq 0x7(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x24746
movl 0xc(%rbx), %r12d
leaq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x2482e
addq $0x10, %r14
xorl %ebx, %ebx
cmpq %r14, %rax
je 0x246fe
testb %bpl, %bpl
jne 0x246fb
cmpl %r12d, 0x38(%rax)
jne 0x246fe
movl 0x3c(%rax), %ebx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x24715
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0xb2f0
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2473e
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0xb2f0
movq %rbx, %rdi
callq 0xb510
// File: /workspace/github_cpp_makefile_star2_O1/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 0x24a63
testl %ecx, %ecx
js 0x24a60
movq 0x3b0(%rsi), %rdi
cmpq %rdi, 0x3b8(%rsi)
je 0x24a60
movq (%rdi,%rcx,8), %rsi
jmp 0x24a2c
xorl %eax, %eax
retq
addq %r8, %rdi
movl %eax, %edx
jmp 0x24a6e
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 $0x68, %rsp
movq %rdi, %rbx
movl %esi, 0x70(%rdi)
leaq 0x78(%rdi), %r14
movq (%rdi), %rax
callq *0x8(%rax)
movl %eax, %esi
movq %r14, 0x60(%rsp)
movq %r14, %rdi
callq 0x2562a
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
testl %eax, %eax
je 0x255b8
movl $0x4c, %r13d
leaq 0x30(%rsp), %r12
xorl %r14d, %r14d
leaq 0x40(%rsp), %r15
movq 0x60(%rsp), %rax
movq (%rax), %rbp
movw $0x0, (%rbp,%r13)
leal 0x30(%r14), %eax
leaq 0x50(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movsbl %al, %edx
movl $0x1, %esi
movq %r15, %rdi
callq 0xb350
movl $0x1, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x129460(%rip), %rcx    # 0x14e8ff
callq 0xb330
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x254ca
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x254d0
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rsp, %rdi
leaq 0x12943b(%rip), %rsi    # 0x14e92d
callq 0xb550
movq %r12, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2551a
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x25522
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x44(,%r13), %rdi
addq %rbp, %rdi
leaq 0x20(%rsp), %rsi
callq 0xb1c0
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x25566
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x25581
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x2559d
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb2f0
incq %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movl %eax, %eax
addq $0x78, %r13
cmpq %rax, %r14
jb 0x2545d
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x25606
movq %rax, %rbx
jmp 0x255eb
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x255eb
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x25606
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x25622
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq %rbx, %rdi
callq 0xb510
// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]ramulator/src/Memory.h
// Function: ramulator::Memory<ramulator::DDR3, ramulator::Controller>::tick()
void tick()
    {
        ++num_dram_cycles;
        int cur_que_req_num = 0;
        int cur_que_readreq_num = 0;
        int cur_que_writereq_num = 0;
        for (auto ctrl : ctrls) {
          cur_que_req_num += ctrl->readq.size() + ctrl->writeq.size() + ctrl->pending.size();
          cur_que_readreq_num += ctrl->readq.size() + ctrl->pending.size();
          cur_que_writereq_num += ctrl->writeq.size();
        }
        in_queue_req_num_sum += cur_que_req_num;
        in_queue_read_req_num_sum += cur_que_readreq_num;
        in_queue_write_req_num_sum += cur_que_writereq_num;

        bool is_active = false;
        for (auto ctrl : ctrls) {
          is_active = is_active || ctrl->is_active();
          ctrl->tick();
        }
        if (is_active) {
          ramulator_active_cycles++;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsd 0x110(%rdi), %xmm0
addsd 0x1267b6(%rip), %xmm0   # 0x14d078
movsd %xmm0, 0x110(%rdi)
movq 0xc08(%rdi), %r14
movq 0xc10(%rdi), %r15
cmpq %r15, %r14
je 0x2697a
xorl %eax, %eax
xorl %ecx, %ecx
movq %r14, %rsi
xorl %edx, %edx
movq (%rsi), %rdi
movq 0x1188(%rdi), %r8
movq %r8, %r9
subq 0x1168(%rdi), %r9
shrq $0x3, %r9
cmpq $0x1, %r8
adcl $-0x1, %r9d
leal (%r9,%r9,4), %r8d
movq 0x1170(%rdi), %r9
subq 0x1178(%rdi), %r9
shrq $0x5, %r9
imull $0xaaaaaaab, %r9d, %r9d # imm = 0xAAAAAAAB
addl %r8d, %r9d
movq 0x1160(%rdi), %r8
subq 0x1150(%rdi), %r8
movl 0x10f0(%rdi), %r10d
shrq $0x5, %r8
imull $0xaaaaaaab, %r8d, %r8d # imm = 0xAAAAAAAB
addl %r9d, %r8d
addl 0x10d0(%rdi), %r8d
addl %r10d, %eax
addl %r8d, %eax
addl %r8d, %ecx
addl %r10d, %edx
addq $0x8, %rsi
cmpq %r15, %rsi
jne 0x268ea
cvtsi2sd %eax, %xmm2
cvtsi2sd %ecx, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
jmp 0x26986
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
addsd 0x6c8(%rbx), %xmm2
movsd %xmm2, 0x6c8(%rbx)
addsd 0x760(%rbx), %xmm1
movsd %xmm1, 0x760(%rbx)
addsd 0x7f8(%rbx), %xmm0
movsd %xmm0, 0x7f8(%rbx)
cmpq %r15, %r14
je 0x26a06
xorl %ebp, %ebp
movq (%r14), %rdi
testb $0x1, %bpl
movb $0x1, %bpl
jne 0x269db
movq 0x1098(%rdi), %rax
cmpl $0x0, 0x400(%rax)
setg %bpl
callq 0x28160
addq $0x8, %r14
cmpq %r15, %r14
jne 0x269bd
testb %bpl, %bpl
je 0x26a06
movsd 0x3a0(%rbx), %xmm0
addsd 0x12667a(%rip), %xmm0   # 0x14d078
movsd %xmm0, 0x3a0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
xorps %xmm0, %xmm0
cvtsi2sdl 0x2d68(%rax), %xmm0
mulsd 0x126380(%rip), %xmm0   # 0x14d080
cvtsi2sdl 0x2744(%rax), %xmm1
cvtsi2sdl 0x272c(%rax), %xmm2
mulsd %xmm0, %xmm1
mulsd %xmm1, %xmm2
mulsd 0x126368(%rip), %xmm2   # 0x14d088
movsd %xmm2, 0x630(%rdi)
cvttsd2si 0x110(%rdi), %r14
movq 0xc08(%rdi), %r12
movq 0xc10(%rdi), %r13
cmpq %r13, %r12
je 0x26dfc
leaq 0x478(%rbx), %r15
xorps %xmm0, %xmm0
cvtsi2sd %r14, %xmm0
movsd %xmm0, (%rsp)
movq (%r12), %rbp
movq 0x1098(%rbp), %rax
movl 0x39c(%rax), %esi
movq %r15, %rdi
callq 0x2aa1c
movq (%rax), %rcx
movq %rax, %rdi
callq *0x58(%rcx)
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd 0x8b8(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd 0x9e8(%rbp), %xmm0
movsd %xmm1, 0x820(%rbp)
movsd (%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x950(%rbp)
movsd 0xb18(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0xa80(%rbp)
movsd 0xc48(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0xbb0(%rbp)
movq 0x1098(%rbp), %rdi
movq %r14, %rsi
callq 0x2b326
addq $0x8, %r12
cmpq %r13, %r12
jne 0x26d5c
xorps %xmm0, %xmm0
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_O1/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 %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0x2aa1c
movq %rax, %r15
leaq 0x9e8(%r14), %rdi
movl %ebx, %esi
callq 0x2aa1c
movq %rax, %r12
leaq 0x8(%rax), %rdi
leaq 0x8(%r15), %rsi
callq 0xb1c0
leaq 0x28(%r12), %rdi
leaq 0x28(%r15), %rsi
callq 0xb1c0
movzwl 0x4c(%r15), %eax
movw %ax, 0x4c(%r12)
movl 0x48(%r15), %eax
movl %eax, 0x48(%r12)
leaq 0x50(%r12), %rdi
leaq 0x50(%r15), %rsi
callq 0xb1c0
movsd 0x70(%r15), %xmm0
movsd %xmm0, 0x70(%r12)
leaq 0x280(%r14), %rdi
movl %ebx, %esi
callq 0x2aa1c
movq %rax, %r15
leaq 0xa98(%r14), %rdi
movl %ebx, %esi
callq 0x2aa1c
movq %rax, %r12
leaq 0x8(%rax), %rdi
leaq 0x8(%r15), %rsi
callq 0xb1c0
leaq 0x28(%r12), %rdi
leaq 0x28(%r15), %rsi
callq 0xb1c0
movzwl 0x4c(%r15), %eax
movw %ax, 0x4c(%r12)
movl 0x48(%r15), %eax
movl %eax, 0x48(%r12)
leaq 0x50(%r12), %rdi
leaq 0x50(%r15), %rsi
callq 0xb1c0
movsd 0x70(%r15), %xmm0
movsd %xmm0, 0x70(%r12)
movq 0xc08(%r14), %r15
movq 0xc10(%r14), %r14
cmpq %r14, %r15
je 0x2712a
movq (%r15), %rdi
movl %ebx, %esi
callq 0x2b738
addq $0x8, %r15
jmp 0x27115
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq