LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/JoshCplusplus[P]Chemistry-Atom-Simulator-/main.cc
// Function: print_atoms()
void print_atoms(){
	cout << "\nAvailable Atoms:" << endl;
	for(string s: atomlist){
		cout << s << endl;
	}
	cout << "\nAvailable Molecules:" << endl;
	if(avmol.size() == 0) cout << "NONE" << endl;
	else{
		for(int i = 0; i < avmol.size(); i++){
			cout << (*(&avmol.top() + i)).get_name() << endl;
		}
	}
	cout << "\nAll Moleclues:" << endl;
	for(auto i : allmol){
		cout << i.second.get_name() << endl;
	}
	cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq 0x5e0f(%rip), %rbx      # 0x8fd0
leaq 0x2f59(%rip), %rsi      # 0x6121
movq %rbx, %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20b0
leaq 0x9e89(%rip), %r15      # 0xd068
leaq -0x110(%rbp), %r14
movq (%r15), %r15
testq %r15, %r15
je 0x3217
leaq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0x21d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2140
movq %rax, %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x20a0
jmp 0x31e6
movq 0x5db2(%rip), %rdi      # 0x8fd0
leaq 0x2f0e(%rip), %rsi      # 0x6133
callq 0x2160
movq %rax, %rdi
callq 0x20b0
movq 0x9e97(%rip), %rax      # 0xd0d0
movq 0x9e88(%rip), %rsi      # 0xd0c8
cmpq %rsi, %rax
je 0x32ac
xorl %r15d, %r15d
movl $0x88, %r12d
leaq -0x110(%rbp), %rbx
movq 0x5d74(%rip), %r14      # 0x8fd0
xorl %r13d, %r13d
subq %rsi, %rax
cqto
idivq %r12
cmpq %r13, %rax
jbe 0x32c7
addq %r15, %rsi
movq %rbx, %rdi
callq 0x21d0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2140
movq %rax, %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x20a0
incq %r13
movq 0x9e34(%rip), %rax      # 0xd0d0
movq 0x9e25(%rip), %rsi      # 0xd0c8
addq $0x88, %r15
jmp 0x325f
movq 0x5d1d(%rip), %rdi      # 0x8fd0
leaq 0x2e8f(%rip), %rsi      # 0x6149
callq 0x2160
movq %rax, %rdi
callq 0x20b0
movq 0x5d02(%rip), %rbx      # 0x8fd0
leaq 0x2e79(%rip), %rsi      # 0x614e
movq %rbx, %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20b0
leaq 0x9db4(%rip), %r13      # 0xd0a0
leaq -0xd0(%rbp), %r14
leaq -0x110(%rbp), %r15
leaq -0x48(%rbp), %r12
movq (%r13), %r13
testq %r13, %r13
je 0x3343
leaq 0x8(%r13), %rsi
movq %r15, %rdi
callq 0x3e56
movq %r12, %rdi
movq %r14, %rsi
callq 0x21d0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2140
movq %rax, %rdi
callq 0x20b0
movq %r12, %rdi
callq 0x20a0
movq %r15, %rdi
callq 0x3e02
jmp 0x32fe
movq 0x5c86(%rip), %rdi      # 0x8fd0
callq 0x20b0
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3374
jmp 0x3382
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x20a0
leaq -0x110(%rbp), %rdi
callq 0x3e02
jmp 0x3391
movq %rax, %rbx
leaq -0x110(%rbp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/JoshCplusplus[P]Chemistry-Atom-Simulator-/main.cc
// Function: print_board()
void print_board(){
	for(int i = 0; i < x_size*y_size; i++){
		if(i % 31 == 0 && i > 0) cout << endl;
		cout << board[i];
	}
	cout << endl;
	usleep(300000);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
movw $0x1f, %r15w
movq 0x5c1b(%rip), %r14      # 0x8fd0
xorl %r13d, %r13d
xorl %r12d, %r12d
movl %ebx, %eax
xorl %edx, %edx
divw %r15w
cmpq $0x3a20, %r13           # imm = 0x3A20
je 0x3402
testq %r13, %r13
je 0x33e4
imull $0x1f, %eax, %eax
addl %r12d, %eax
testw %ax, %ax
jne 0x33e4
movq %r14, %rdi
callq 0x20b0
leaq 0x6245(%rip), %rax      # 0x9630
leaq (%rax,%r13), %rsi
movq %r14, %rdi
callq 0x2140
decl %r12d
incl %ebx
addq $0x20, %r13
jmp 0x33bb
movq 0x5bc7(%rip), %rdi      # 0x8fd0
callq 0x20b0
movl $0x493e0, %edi          # imm = 0x493E0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/JoshCplusplus[P]Chemistry-Atom-Simulator-/main.cc
// Function: find_mol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
molecule find_mol(string x, string y){
	molecule temp;
	auto i = allmol.find(make_pair(x,y));
	auto j = allmol.find(make_pair(y,x));
	if(i != allmol.end()) return i->second;
	else if(j != allmol.end()) return i->second;
	else return temp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x3e90
leaq -0x60(%rbp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x42ee
leaq 0x9c2d(%rip), %rdi      # 0xd090
leaq -0x60(%rbp), %rsi
callq 0x4eae
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0x3e22
leaq -0x60(%rbp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x42ee
leaq 0x9c02(%rip), %rdi      # 0xd090
leaq -0x60(%rbp), %rsi
callq 0x4eae
movq %rax, %r15
leaq -0x60(%rbp), %rdi
callq 0x3e22
testq %r14, %r14
je 0x34ae
addq $0x48, %r14
jmp 0x34b7
testq %r15, %r15
je 0x34e1
pushq $0x48
popq %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3f20
leaq -0xe8(%rbp), %rdi
callq 0x3d98
movq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq -0xe8(%rbp), %rsi
movq %rbx, %rdi
callq 0x3f8c
jmp 0x34c2
jmp 0x3506
jmp 0x34f8
jmp 0x3506
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x3e22
jmp 0x3509
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x3d98
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/JoshCplusplus[P]Chemistry-Atom-Simulator-/./atom.h
// Function: molecule::molecule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
molecule(string name1, string atom1, string atom2, double energy1,string newmessage){
		name = name1;
		madeof = make_pair(atom1,atom2);
		energy = energy1;
		message = newmessage;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r15
movsd %xmm0, -0x38(%rbp)
movq %rcx, %r13
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rdx, %r14
xorl %eax, %eax
movb %al, 0x10(%rdi)
leaq 0x30(%rdi), %rcx
movq %rcx, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
leaq 0x20(%rdi), %rcx
movq %rcx, -0x30(%rbp)
movb %al, 0x30(%rdi)
leaq 0x50(%rdi), %rcx
movq %rcx, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
movb %al, 0x50(%rdi)
leaq 0x68(%rdi), %r12
leaq 0x78(%rdi), %rcx
movq %rcx, 0x68(%rdi)
andq $0x0, 0x70(%rdi)
movb %al, 0x78(%rdi)
callq 0x20d0
leaq -0x78(%rbp), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x42ee
leaq -0x78(%rbp), %r14
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x4062
movq %r14, %rdi
callq 0x3e22
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x60(%rbx)
movq %r12, %rdi
movq %r15, %rsi
callq 0x20d0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3d73
movq %rax, %r14
movq %r12, %rdi
callq 0x20a0
movq -0x30(%rbp), %rdi
callq 0x3e22
movq %rbx, %rdi
callq 0x20a0
movq %r14, %rdi
callq 0x2230
nop
// File: /workspace/github_cpp_makefile_star2_O2/ivanzamanov[P]kmeans/src/extractor/extractor.cpp
// Function: main
int main(int argc, char** argv) {
	if(argc < 3) {
		printf("Not enough arguments\n");
		printf("Usage: %s <input_file> <output_dir> <output_count_offset>\n", argv[0]);
		return 1;
	}

	char* inputPath = argv[1];
	int inputFD = open(inputPath, O_RDONLY);
	if(inputFD < 0) {
		printf("Cannot open file %s\n", inputPath);
		return 1;
	}

	struct stat fileStat;
	if(fstat(inputFD, &fileStat) != 0) {
		printf("Cannot stat file %s\n", inputPath);
		return 1;
	}

	outputDir = argv[2];
	articleCount = 0;
	articleIndexOffset = strtol(argv[3], NULL, 0);
	
	processFile(inputFD, &fileStat);

	printf("Articles parsed: %d\n", articleCount);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rsi, %rbx
cmpl $0x2, %edi
jg 0x1227
leaq 0xe87(%rip), %rdi       # 0x209d
callq 0x10d0
movq (%rbx), %rsi
leaq 0xddf(%rip), %rdi       # 0x2004
jmp 0x125e
movq 0x8(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x1080
testl %eax, %eax
js 0x1254
movl %eax, %ebp
movq %rsp, %rsi
movl %eax, %edi
callq 0x10e0
testl %eax, %eax
je 0x1276
leaq 0xe02(%rip), %rdi       # 0x2054
jmp 0x125b
leaq 0xde4(%rip), %rdi       # 0x203f
movq %r14, %rsi
xorl %eax, %eax
callq 0x1040
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x10(%rbx), %rax
movq %rax, 0x2e17(%rip)      # 0x4098
andl $0x0, 0x2e20(%rip)      # 0x40a8
movq 0x18(%rbx), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
xorl %edx, %edx
callq 0x10b0
movl %eax, 0x2e0f(%rip)      # 0x40ac
movl %ebp, %edi
callq 0x12ba
movl 0x2dfe(%rip), %esi      # 0x40a8
leaq 0xdb8(%rip), %rdi       # 0x2069
xorl %eax, %eax
callq 0x1040
jmp 0x1268
// File: /workspace/github_cpp_makefile_star2_O2/ivanzamanov[P]kmeans/src/extractor/extractor.cpp
// Function: processFile(int, stat*)
void processFile(int inputFD, struct stat* const fileStat) {
	char* fullData = 0;
	readFullData(inputFD, &fullData);

	matcher* startMarker;
	matcher* endMarker;
	build_matcher("<BODY>", startMarker);
	build_matcher("</BODY>", endMarker);
	article_match* lastArticleMatch = 0;
	int lastArticleEndPos = 0;

	// Read articles while found
	do {
		char* offsetData = fullData + lastArticleEndPos;
		// Try to find an article
		lastArticleMatch = get_match(offsetData, *startMarker, *endMarker);
		if(lastArticleMatch != 0) {
			// Found an article, save it
			save_article(lastArticleMatch, offsetData, articleCount + articleIndexOffset);
			articleCount++;
			// Move offset after the article's end.
			lastArticleEndPos = lastArticleEndPos + lastArticleMatch->end;
			delete lastArticleMatch;
		}
	} while(lastArticleMatch != 0);

	delete fullData;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
callq 0x1751
leaq 0xda7(%rip), %rdi       # 0x207e
leaq 0x18(%rsp), %rsi
callq 0x1478
leaq 0xd9d(%rip), %rdi       # 0x2085
leaq 0x10(%rsp), %rsi
callq 0x1478
xorl %ebp, %ebp
movslq %ebp, %rbx
addq 0x8(%rsp), %rbx
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1354
testq %rax, %rax
je 0x1341
movq %rax, %r14
movl 0x2d90(%rip), %edx      # 0x40ac
addl 0x2d86(%rip), %edx      # 0x40a8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x13ab
incl 0x2d75(%rip)            # 0x40a8
addl 0x4(%r14), %ebp
movq %r14, %rdi
callq 0x1090
jmp 0x12f4
movq 0x8(%rsp), %rdi
callq 0x1090
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ivanzamanov[P]kmeans/src/extractor/extractor.cpp
// Function: get_match(char const*, matcher const&, matcher const&)
article_match* get_match(const char* data, const matcher& startMarker, const matcher& endMarker) {
	// Search for the start marker
	int start = search(data, startMarker);
	int end = -1;
	if(start >= 0) {
			// Search for the end marker after the start
			end = search(data + start, endMarker);
			end = end + start;
			if(end > start) {
				// Found, return a reference
				article_match* result = new article_match(start + startMarker.n, end);
				return result;
			}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
callq 0x15d7
testl %eax, %eax
js 0x139e
movl %eax, %ebp
movl %eax, %eax
addq %rax, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x15d7
testl %eax, %eax
jle 0x139e
movl %eax, %r14d
addl %ebp, %r14d
pushq $0x8
popq %rdi
callq 0x10a0
movl 0x8(%rbx), %ecx
addl %ebp, %ecx
movl %ecx, (%rax)
movl %r14d, 0x4(%rax)
jmp 0x13a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ivanzamanov[P]kmeans/src/extractor/extractor.cpp
// Function: save_article(article_match*, char const*, int)
void save_article(article_match* match, const char* data, int articleIndex) {
	int startPos = match->start;
	int endPos = match->end;
	int length = endPos - startPos;
	char* articleData = new char[length + 1];
	articleData[length] = 0;
	for (int i = 0; i < length; i++) {
		articleData[i] = data[startPos + i];
	}
	
	char* outputFile = new char[strlen(outputDir) + 100];
	int pathLength = sprintf(outputFile, "%s/article-%05d", outputDir, articleIndex);
	outputFile[pathLength] = 0;
	int fd = open(outputFile, O_CREAT | O_WRONLY, 0644);
	write(fd, articleData, length);
	close(fd);
	delete articleData;
	delete outputFile;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r15
movslq (%rdi), %r12
movslq 0x4(%rdi), %rbx
subq %r12, %rbx
leal 0x1(%rbx), %eax
cmpl $-0x1, %ebx
pushq $-0x1
popq %rcx
cmovgel %eax, %ecx
movslq %ecx, %rdi
callq 0x1030
movq %rax, %r14
movb $0x0, (%rax,%rbx)
xorl %eax, %eax
testl %ebx, %ebx
movl $0x0, %ecx
cmovgl %ebx, %ecx
addq %r12, %r15
cmpq %rax, %rcx
je 0x13fe
movb (%r15,%rax), %dl
movb %dl, (%r14,%rax)
incq %rax
jmp 0x13ec
movq 0x2c93(%rip), %r12      # 0x4098
movq %r12, %rdi
callq 0x1070
leaq 0x64(%rax), %rdi
callq 0x1030
movq %rax, %r15
leaq 0xc6d(%rip), %rsi       # 0x208d
movq %rax, %rdi
movq %r12, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1050
cltq
movb $0x0, (%r15,%rax)
pushq $0x41
popq %rsi
movq %r15, %rdi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x1080
movl %eax, %ebp
movl %eax, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1060
movl %ebp, %edi
callq 0x10f0
movq %r14, %rdi
callq 0x1090
movq %r15, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1090
nop
// File: /workspace/github_cpp_makefile_star2_O2/ivanzamanov[P]kmeans/src/common/matcher.cpp
// Function: search(char const*, matcher const&)
int search(char const* string, const matcher& matcher) {
	unsigned int i = 0;
	unsigned int n = 0;
	while(*string != 0) {
		i++;
		int c = (int)*string;
		string++;
		if(c < matcher.min_char || c > matcher.max_char) {
			n = 0;
			continue;
		}
		n = matcher.table[n][c - matcher.min_char];
		if(n == matcher.n) {
			return i - n;
		}
	}
	return -1;
}

// Assembly:
pushq %rbx
movsbq 0xc(%rsi), %rcx
movb 0xd(%rsi), %dl
movq 0x10(%rsi), %r8
movl 0x8(%rsi), %r9d
movl $0x1, %esi
subl %r9d, %esi
xorl %r10d, %r10d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movsbq (%rdi), %rbx
testq %rbx, %rbx
je 0x162b
xorl %r11d, %r11d
cmpb %cl, %bl
jl 0x161f
cmpb %dl, %bl
jg 0x161f
movl %r10d, %r10d
movq (%r8,%r10,8), %r10
subq %rcx, %rbx
movl (%r10,%rbx,4), %r11d
cmpl %r9d, %r11d
je 0x1629
incq %rdi
incl %esi
movl %r11d, %r10d
jmp 0x15f8
movl %esi, %eax
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/j-faria[P]kima/examples/multi_instrument/kima_setup.cpp
// Function: main
int main(int argc, char** argv)
{
    // set the RV data files from multiple instruments
    datafiles = {"HD106252_ELODIE.txt",
                 "HD106252_HET.txt",
                 "HD106252_HJS.txt",
                 "HD106252_Lick.txt"
                };

    // note: all files should have the same structure, and be in the same units
    load_multi(datafiles, "ms", 2);

    // could also do (but not both!)
    //char* datafile = "HD106252_joined.txt";
    // load_multi(datafile, "ms", 1);

    Sampler<RVmodel> sampler = setup<RVmodel>(argc, argv);
    sampler.run(100);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x6c8, %rsp            # imm = 0x6C8
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x26260(%rip), %rsi     # 0x4701d
leaq 0x10(%rsp), %r14
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
callq 0x13fac
leaq 0x30(%rsp), %r15
leaq 0x26256(%rip), %rsi     # 0x47031
leaq 0xe(%rsp), %rdx
movq %r15, %rdi
callq 0x13fac
leaq 0x50(%rsp), %r15
leaq 0x2624e(%rip), %rsi     # 0x47042
leaq 0xd(%rsp), %rdx
movq %r15, %rdi
callq 0x13fac
leaq 0x70(%rsp), %r15
leaq 0x26246(%rip), %rsi     # 0x47053
leaq 0xc(%rsp), %rdx
movq %r15, %rdi
callq 0x13fac
leaq 0x90(%rsp), %rdx
leaq 0x438b7(%rip), %rdi     # 0x646e0
leaq 0x10(%rsp), %rsi
callq 0x33202
pushq $0x60
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x10, %rdi
callq 0x6798
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x20e37
leaq 0x10(%rsp), %rdx
movl $0x2, (%rdx)
leaq 0x43880(%rip), %rdi     # 0x646e0
leaq 0x1b67a(%rip), %rsi     # 0x3c4e1
callq 0x210d9
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x21182
pushq $0x64
popq %rsi
movq %r14, %rdi
callq 0x211ce
leaq 0x10(%rsp), %rdi
callq 0x21394
xorl %eax, %eax
addq $0x6c8, %rsp            # imm = 0x6C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x21394
jmp 0x20eef
movq %rax, %rbx
pushq $0x60
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x10, %rdi
callq 0x6798
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x20eb9
jmp 0x20eef
jmp 0x20ed6
jmp 0x20ed6
movq %rax, %rbx
addq $-0x20, %r15
movq %r15, %rdi
callq 0x6798
cmpq %r14, %r15
jne 0x20ed9
jmp 0x20eef
movq %rax, %rbx
movq %rbx, %rdi
callq 0x66e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/akitsu-sanae[P]adtpp/src/adt.cpp
// Function: convert_to_dtor_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string convert_to_dtor_name(std::string str) {
    // remove template parameter
    // ex) std::vector<double> ==> std::vector
    while (true) {
        int temp_count = 0;
        auto temp_start = std::string::npos;
        auto temp_end = std::string::npos;
        for (auto it=std::begin(str); it!=std::end(str); it++) {
            if (*it == '<') {
                if (temp_count == 0)
                    temp_start = it - std::begin(str);
                temp_count++;
            }
            if (*it == '>') {
                temp_count--;
                if (temp_count == 0)
                    temp_end = it - std::begin(str);
            }
        }
        if (temp_start == std::string::npos)
            break;
        if (temp_end == std::string::npos)
                break;
        str.erase(temp_start, temp_end);
    }

    // remove namespace
    // ex) std::vector ==> vector
    auto found = str.find_last_of(':');
    if (found != std::string::npos)
        str.erase(0, found+1);
    return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
pushq $-0x1
popq %r15
movq (%r14), %rax
movq 0x8(%r14), %rcx
xorl %edi, %edi
movq %r15, %rdx
movq %r15, %rsi
xorl %r8d, %r8d
cmpq %rdi, %rcx
je 0x24d0
movzbl (%rax,%rdi), %r9d
cmpl $0x3e, %r9d
je 0x24c0
cmpl $0x3c, %r9d
jne 0x24cb
testl %r8d, %r8d
cmoveq %rdi, %rsi
incl %r8d
jmp 0x24cb
decl %r8d
jne 0x24cb
xorl %r8d, %r8d
movq %rdi, %rdx
incq %rdi
jmp 0x249e
cmpq $-0x1, %rsi
je 0x24e6
cmpq $-0x1, %rdx
je 0x24e6
movq %r14, %rdi
callq 0x2050
jmp 0x248c
pushq $0x3a
popq %rsi
pushq $-0x1
popq %rdx
movq %r14, %rdi
callq 0x22d0
cmpq $-0x1, %rax
je 0x250a
incq %rax
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x2050
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21f0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/akitsu-sanae[P]adtpp/./include/utility.hpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> format<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&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
inline static std::string format(std::string const& str, Arg&& arg, Args&& ... args) {
    auto pos = str.find("{}");
    if (pos == std::string::npos)
        throw format_too_many_args{};
    std::string after = str.substr(pos+2, str.length());
    std::stringstream ss;
    ss << std::forward<Arg>(arg);
    return str.substr(0, pos) + ss.str() + format(after, args ...);

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2733(%rip), %rsi      # 0x6311
movq %r14, %rdi
xorl %edx, %edx
callq 0x22e0
cmpq $-0x1, %rax
je 0x3cd4
movq %rax, %r15
leaq 0x2(%rax), %rdx
movq 0x8(%r14), %rcx
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
callq 0x21c0
leaq 0xa0(%rsp), %rdi
callq 0x2110
leaq 0xb0(%rsp), %rdi
movq %r12, %rsi
callq 0x2180
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0x21c0
leaq 0xb8(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x2250
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x4466
movq %rsp, %rdi
leaq 0x80(%rsp), %rsi
callq 0x2200
leaq 0x60(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x4466
movq %rsp, %rdi
callq 0x20d0
leaq 0x60(%rsp), %rdi
callq 0x20d0
leaq 0x20(%rsp), %rdi
callq 0x20d0
leaq 0x40(%rsp), %rdi
callq 0x20d0
leaq 0xa0(%rsp), %rdi
callq 0x2140
leaq 0x80(%rsp), %rdi
callq 0x20d0
movq %rbx, %rax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x1
popq %rdi
callq 0x20f0
leaq 0x50a5(%rip), %rsi      # 0x8d88
movq %rax, %rdi
xorl %edx, %edx
callq 0x2280
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20d0
jmp 0x3cfd
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x20d0
jmp 0x3d0c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20d0
jmp 0x3d1b
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x20d0
jmp 0x3d2c
jmp 0x3d29
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2140
leaq 0x80(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2290
movq %rax, %rbx
jmp 0x3d39
// File: /workspace/github_cpp_makefile_star2_O2/akitsu-sanae[P]adtpp/src/main.cpp
// Function: trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void trim(std::string& input) {
    auto start = std::begin(input);
    while (std::isspace(*start))
        start++;
    auto last = std::end(input);
    while (std::isspace(*(last-1)))
        last--;
    input = std::string{start, last};
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rdi), %r15
leaq -0x1(%r15), %r14
movsbl 0x1(%r14), %edi
incq %r14
callq 0x2030
testl %eax, %eax
jne 0x4811
movq 0x8(%rbx), %rax
addq %rax, %r15
incq %r15
movsbl -0x2(%r15), %edi
callq 0x2030
decq %r15
testl %eax, %eax
jne 0x482c
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x50cc
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21d0
movq %r12, %rdi
callq 0x20d0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/akitsu-sanae[P]adtpp/src/main.cpp
// Function: parse(std::istream&)
Adt parse(std::istream& input) {
    std::string buf;
    input >> buf;
    Adt result{buf};
    input >> buf;
    if (buf != "{")
        throw std::logic_error{"parse error: expected '{'"};
    while (true) {
        std::string label;
        std::string type;
        input >> label;
        if (label == "}")
            break;
        input >> buf;
        if (buf != "of")
            throw std::logic_error{"parse error: expected 'of'"};
        std::getline(input, type);
        trim(type);
        result.add(std::make_pair(label, type));
    }
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x21e0
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x4dce
movq %rbx, 0x8(%rsp)
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x21e0
leaq 0x1858(%rip), %rsi      # 0x612b
leaq 0x18(%rsp), %rdi
callq 0x4de5
testb %al, %al
jne 0x4a26
movq 0x8(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x10(%rsp)
xorl %r15d, %r15d
leaq 0x58(%rsp), %r12
leaq 0x18(%rsp), %rbp
leaq 0x38(%rsp), %rbx
leaq 0x78(%rsp), %r13
leaq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
andq $0x0, 0x60(%rsp)
movb %r15b, 0x68(%rsp)
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
andq $0x0, 0x40(%rsp)
movb %r15b, 0x48(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x21e0
movq %r12, %rdi
leaq 0x1892(%rip), %rsi      # 0x61db
callq 0x4def
testb %al, %al
jne 0x49bf
movq %r14, %rdi
movq %rbp, %rsi
callq 0x21e0
movq %rbp, %rdi
leaq 0x1ceb(%rip), %rsi      # 0x6652
callq 0x4de5
testb %al, %al
jne 0x49f4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2040
movq %rbx, %rdi
callq 0x47fc
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x5030
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x4e28
movq %r13, %rdi
callq 0x4dfc
movq %rbx, %rdi
callq 0x20d0
movq %r12, %rdi
callq 0x20d0
jmp 0x490a
leaq 0x38(%rsp), %rdi
callq 0x20d0
leaq 0x58(%rsp), %rdi
callq 0x20d0
leaq 0x18(%rsp), %rdi
callq 0x20d0
movq 0x8(%rsp), %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20f0
movq %rax, %r14
leaq 0x1c4f(%rip), %rsi      # 0x6655
movq %rax, %rdi
callq 0x2210
movq 0x45bb(%rip), %rsi      # 0x8fd0
movq 0x459c(%rip), %rdx      # 0x8fb8
movq %r14, %rdi
callq 0x2280
jmp 0x4a56
pushq $0x10
popq %rdi
callq 0x20f0
movq %rax, %r14
leaq 0x1c00(%rip), %rsi      # 0x6638
movq %rax, %rdi
callq 0x2210
movq 0x4589(%rip), %rsi      # 0x8fd0
movq 0x456a(%rip), %rdx      # 0x8fb8
movq %r14, %rdi
callq 0x2280
movq %rax, %rbx
movq %r14, %rdi
callq 0x2130
jmp 0x4aa4
movq %rax, %rbx
jmp 0x4aae
movq %rax, %rbx
jmp 0x4aa4
jmp 0x4a8d
movq %rax, %rbx
movq %r14, %rdi
callq 0x2130
jmp 0x4a90
jmp 0x4a8d
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x4dfc
jmp 0x4a90
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x20d0
leaq 0x58(%rsp), %rdi
callq 0x20d0
movq 0x8(%rsp), %rdi
callq 0x4e12
leaq 0x18(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: FU_CDB::enQ(memCell*, int)
bool FU_CDB::enQ(memCell *v, int s)
{
    pthread_mutex_lock(&Q_lock);
    if ((rear+1)%Q_LEN == front)
    {
        err_log("The reserv_CDB queue is full");
        pthread_mutex_unlock(&Q_lock);
        return false;
    }
    int index = rear;
    rear = (++rear)%Q_LEN;
    int pos = 0;
    for (; (front + pos)%Q_LEN != index && queue[(front + pos)%Q_LEN].source < s; pos++);
    for (int i = index; (Q_LEN + i)%Q_LEN != (front + pos)%Q_LEN; i--)
        queue[(Q_LEN+i)%Q_LEN] = queue[(Q_LEN+i-1)%Q_LEN];
    index = (front+pos)%Q_LEN;
    queue[index].value = *v;
    queue[index].source = s;
    pthread_mutex_unlock(&Q_lock);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %r15d
movq %rsi, -0x38(%rbp)
movq %rdi, %r12
leaq 0x810(%rdi), %rbx
movq %rbx, %rdi
callq 0x3390
movl 0x808(%r12), %r13d
movl 0x80c(%r12), %ecx
leal 0x1(%rcx), %eax
movl $0x100, %r8d            # imm = 0x100
cltd
idivl %r8d
movl %edx, %r14d
cmpl %r13d, %edx
je 0x3a82
movl %r14d, 0x80c(%r12)
movl %r13d, %edi
movl %edi, %eax
cltd
idivl %r8d
cmpl %ecx, %edx
je 0x3aac
movl %edx, %esi
movslq %edx, %rax
incl %edi
cmpl %r15d, 0x4(%r12,%rax,8)
jl 0x3a68
jmp 0x3aae
leaq 0xb57b(%rip), %rsi      # 0xf004
leaq -0x58(%rbp), %r15
leaq -0x29(%rbp), %rdx
movq %r15, %rdi
callq 0x3100
movq %r15, %rdi
callq 0x7ee9
leaq -0x58(%rbp), %rdi
callq 0x3140
jmp 0x3af1
movl %ecx, %esi
addl $0xff, %ecx
movl $0x100, %r8d            # imm = 0x100
leal 0x1(%rcx), %eax
cltd
idivl %r8d
cmpl %esi, %edx
je 0x3adf
movl %edx, %edi
movl %ecx, %eax
cltd
idivl %r8d
movslq %edx, %rax
movslq %edi, %rdx
movq (%r12,%rax,8), %rax
movq %rax, (%r12,%rdx,8)
decl %ecx
jmp 0x3aba
movslq %esi, %rax
movq -0x38(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, (%r12,%rax,8)
movl %r15d, 0x4(%r12,%rax,8)
movq %rbx, %rdi
callq 0x3210
cmpl %r13d, %r14d
setne %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: FU_CDB::squash(int)
void FU_CDB::squash(int ROB_i)
{
    int R_f = CPU_ROB->get_front();
    int R_r = CPU_ROB->get_rear();
    pthread_mutex_lock(&Q_lock);
    if (front == rear)
    {
        pthread_mutex_unlock(&Q_lock);
        return;
    }
    for (int i = rear; ;)
    {
        int j = (i-1)%Q_LEN;
        if (j == front || !is_prev_index(ROB_i, queue[j].source, R_f, R_r))
            break;
        rear = j;
        i = (--i)%Q_LEN;
    }
    if (is_prev_index(ROB_i, bus.source, R_f, R_r))
        bus.source = -2;
    pthread_mutex_unlock(&Q_lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x12817(%rip), %r15     # 0x16370
movq (%r15), %rdi
callq 0x6cf4
movl %eax, %r12d
movq (%r15), %rdi
callq 0x6cfc
movl %eax, %r13d
leaq 0x810(%rbx), %rdi
movq %rdi, -0x30(%rbp)
callq 0x3390
movl 0x808(%rbx), %ecx
movl 0x80c(%rbx), %r15d
cmpl %r15d, %ecx
je 0x3bf0
decl %r15d
movl %r15d, %eax
cltd
movl $0x100, %esi            # imm = 0x100
idivl %esi
cmpl %ecx, %edx
je 0x3bce
movl %edx, %r15d
movslq %edx, %rax
movl 0x4(%rbx,%rax,8), %esi
movl %r14d, %edi
movl %r12d, %edx
movl %r13d, %ecx
callq 0xc3de
testb %al, %al
je 0x3bce
movl %r15d, 0x80c(%rbx)
movl 0x808(%rbx), %ecx
jmp 0x3b91
movl 0x804(%rbx), %esi
movl %r14d, %edi
movl %r12d, %edx
movl %r13d, %ecx
callq 0xc3de
testb %al, %al
je 0x3bf0
movl $0xfffffffe, 0x804(%rbx) # imm = 0xFFFFFFFE
movq -0x30(%rbp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3210
nop
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: FU_CDB::CDB_automat()
void FU_CDB::CDB_automat()
{
    next_vdd = 0;
    while(true)
    {
        at_rising_edge(next_vdd);
        at_falling_edge(next_vdd);
        pthread_mutex_lock(&Q_lock);
        if (front != rear)
        {
            bus.source = queue[front].source;
            bus.value = queue[front].value;
            msg_log("About to broadcast, source ROB = " + to_string(bus.source), 3);
            front = (++front)%Q_LEN;
        }
        pthread_mutex_unlock(&Q_lock);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
andl $0x0, 0x838(%rdi)
leaq 0x838(%rdi), %r14
leaq 0x810(%rdi), %r15
leaq -0x48(%rbp), %r12
leaq -0x68(%rbp), %r13
movq %r14, %rdi
callq 0x83e0
movq %r14, %rdi
callq 0x8437
movq %r15, %rdi
callq 0x3390
movslq 0x808(%rbx), %rax
cmpl 0x80c(%rbx), %eax
je 0x3cbe
movl 0x4(%rbx,%rax,8), %esi
movl %esi, 0x804(%rbx)
movl (%rbx,%rax,8), %eax
movl %eax, 0x800(%rbx)
movq %r12, %rdi
callq 0x5ab8
movq %r13, %rdi
leaq 0xb39c(%rip), %rsi      # 0xf021
movq %r12, %rdx
callq 0x5a8a
movq %r13, %rdi
pushq $0x3
popq %rsi
callq 0x8343
movq %r13, %rdi
callq 0x3140
movq %r12, %rdi
callq 0x3140
movl 0x808(%rbx), %eax
incl %eax
cltd
movl $0x100, %ecx            # imm = 0x100
idivl %ecx
movl %edx, 0x808(%rbx)
movq %r15, %rdi
callq 0x3210
jmp 0x3c39
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x3140
jmp 0x3cdc
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: FU_Q::enQ(opCode, int, memCell*, memCell*, memCell*, LSQEntry*, int, bool*)
const FU_QEntry* FU_Q::enQ(opCode c, int d, memCell *r, memCell *op1, memCell *op2, LSQEntry *_lsqe, int offst, bool* busy)
{
    pthread_mutex_lock(&Q_lock);
    if ((rear+1)%Q_LEN == front)
    {
        pthread_mutex_unlock(&Q_lock);
        throw -1;
    }
    int index = rear;
    rear = (++rear)%Q_LEN;
    int pos = 0;
    for (; (front + pos)%Q_LEN != index && queue[(front + pos)%Q_LEN].dest < d; pos++);
    for (int i = index; (Q_LEN + i)%Q_LEN != (front + pos)%Q_LEN; i--)
        queue[(Q_LEN+i)%Q_LEN] = queue[(Q_LEN+i-1)%Q_LEN];
    index = (front+pos)%Q_LEN;
    queue[index].code = c;
    queue[index].dest = d;
    queue[index].res = r;
    queue[index].oprnd1 = op1;
    queue[index].oprnd2 = op2;
    queue[index].offset = offst;
    queue[index].lsqe = _lsqe;
    queue[index].busy = busy;
    pthread_mutex_unlock(&Q_lock);
    return &queue[index];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r13
movq %r8, -0x38(%rbp)
movq %rcx, -0x30(%rbp)
movl %edx, %r14d
movl %esi, %r12d
movq %rdi, %r15
leaq 0x3808(%rdi), %rbx
movq %rbx, %rdi
callq 0x3390
movl 0x3800(%r15), %edi
movl 0x3804(%r15), %ecx
leal 0x1(%rcx), %eax
movl $0x100, %r11d           # imm = 0x100
cltd
idivl %r11d
cmpl %edi, %edx
je 0x3eb2
movq 0x20(%rbp), %r8
movl 0x18(%rbp), %r10d
movq 0x10(%rbp), %r9
movl %edx, 0x3804(%r15)
movl %edi, %eax
cltd
idivl %r11d
cmpl %ecx, %edx
je 0x3dfc
movl %edx, %esi
movslq %edx, %rax
imulq $0x38, %rax, %rax
incl %edi
cmpl %r14d, 0x4(%r15,%rax)
jl 0x3dde
jmp 0x3dfe
movl %ecx, %esi
addl $0xff, %ecx
movl $0x100, %r11d           # imm = 0x100
leal 0x1(%rcx), %eax
cltd
idivl %r11d
cmpl %esi, %edx
je 0x3e5b
movl %edx, %edi
movl %ecx, %eax
cltd
idivl %r11d
movslq %edx, %rax
imulq $0x38, %rax, %rax
movslq %edi, %rdx
imulq $0x38, %rdx, %rdx
movq 0x30(%r15,%rax), %rdi
movq %rdi, 0x30(%r15,%rdx)
movups (%r15,%rax), %xmm0
movups 0x10(%r15,%rax), %xmm1
movups 0x20(%r15,%rax), %xmm2
movups %xmm2, 0x20(%r15,%rdx)
movups %xmm1, 0x10(%r15,%rdx)
movups %xmm0, (%r15,%rdx)
decl %ecx
jmp 0x3e0a
movslq %esi, %rax
imulq $0x38, %rax, %rax
movq %r13, %rcx
leaq (%r15,%rax), %r13
movl %r12d, (%r15,%rax)
movl %r14d, 0x4(%r15,%rax)
movq -0x30(%rbp), %rdx
movq %rdx, 0x8(%r15,%rax)
movq -0x38(%rbp), %rdx
movq %rdx, 0x10(%r15,%rax)
movq %rcx, 0x18(%r15,%rax)
movl %r10d, 0x28(%r15,%rax)
movq %r9, 0x20(%r15,%rax)
movq %r8, 0x30(%r15,%rax)
movq %rbx, %rdi
callq 0x3210
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x3210
pushq $0x4
popq %rdi
callq 0x3170
orl $-0x1, (%rax)
movq 0x120c4(%rip), %rsi     # 0x15f90
movq %rax, %rdi
xorl %edx, %edx
callq 0x3420
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: FU_Q::squash(int)
void FU_Q::squash(int ROB_i)
{
    int R_f = CPU_ROB->get_front();
    int R_r = CPU_ROB->get_rear();
    pthread_mutex_lock(&Q_lock);
    if (front == rear)
    {
        pthread_mutex_unlock(&Q_lock);
        return;
    }
    for (int i = rear; ;)
    {
        int j = (i-1)%Q_LEN;
        if (j == front || !is_prev_index(ROB_i, queue[j].dest, R_f, R_r))
            break;
        rear = j;
        i = (--i)%Q_LEN;
    }
    pthread_mutex_unlock(&Q_lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x12480(%rip), %r12     # 0x16370
movq (%r12), %rdi
callq 0x6cf4
movl %eax, %r15d
movq (%r12), %rdi
callq 0x6cfc
movl %eax, %r13d
leaq 0x3808(%r14), %rdi
movq %rdi, -0x30(%rbp)
callq 0x3390
movl 0x3800(%r14), %ecx
movl 0x3804(%r14), %r12d
cmpl %r12d, %ecx
jne 0x3f42
movq -0x30(%rbp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3210
decl %r12d
movl %r12d, %eax
cltd
movl $0x100, %esi            # imm = 0x100
idivl %esi
cmpl %ecx, %edx
je 0x3f2b
movl %edx, %r12d
movslq %edx, %rax
imulq $0x38, %rax, %rax
movl 0x4(%r14,%rax), %esi
movl %ebx, %edi
movl %r15d, %edx
movl %r13d, %ecx
callq 0xc3de
testb %al, %al
je 0x3f2b
movl %r12d, 0x3804(%r14)
movl 0x3800(%r14), %ecx
jmp 0x3f42
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: FU_Q::deQ()
FU_QEntry *FU_Q::deQ()
{
    if (front == rear)
        return nullptr;
    FU_QEntry* ret = &queue[front];
    front = (++front)%Q_LEN;
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x3800(%rdi), %rax
cmpl 0x3804(%rdi), %eax
jne 0x3f9b
xorl %ecx, %ecx
jmp 0x3fb2
imulq $0x38, %rax, %rcx
addq %rdi, %rcx
incl %eax
movl $0x100, %esi            # imm = 0x100
cltd
idivl %esi
movl %edx, 0x3800(%rdi)
movq %rcx, %rax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: functionUnit::squash(int)
void functionUnit::squash(int ROB_i)
{
    for (auto _rs : rs)
        _rs->squash(ROB_i);
    queue.squash(ROB_i);
    squash_p.R_f = CPU_ROB->get_front();
    squash_p.R_r = CPU_ROB->get_rear();
    squash_p.ROB_i = brcUnit.squash_ROB_i();
    squash_p.flag = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movq 0x3870(%rdi), %r15
movq 0x3878(%rdi), %r12
cmpq %r12, %r15
je 0x3fed
movq (%r15), %rdi
movl %r14d, %esi
callq 0xe916
addq $0x8, %r15
jmp 0x3fd7
leaq 0x8(%rbx), %rdi
movl %r14d, %esi
callq 0x3ed6
leaq 0x12370(%rip), %r14     # 0x16370
movq (%r14), %rdi
callq 0x6cf4
movl %eax, 0x3898(%rbx)
movq (%r14), %rdi
callq 0x6cfc
movl %eax, 0x389c(%rbx)
leaq 0x12375(%rip), %rdi     # 0x16398
callq 0x7748
movl %eax, 0x38a0(%rbx)
movb $0x1, 0x38a4(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: intAdder::intAdder()
intAdder::intAdder()
{
    for (int i = 0; i<CPU_cfg->int_add->rs_num; i++)
    {
        auto tmp = new resStation(&queue, INTGR);
        init_resStation(tmp);
        rs.push_back(tmp);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x3870(%rdi), %r14
xorps %xmm0, %xmm0
andq $0x0, 0x3880(%rdi)
movups %xmm0, 0x3870(%rdi)
movb $0x0, 0x38a4(%rdi)
movups %xmm0, 0x3808(%rdi)
movups %xmm0, 0x3818(%rdi)
movups %xmm0, 0x3828(%rdi)
leaq 0x11c1d(%rip), %rax     # 0x15ca8
movq %rax, (%rdi)
movq %rdi, -0x30(%rbp)
leaq 0x8(%rdi), %r15
xorl %r12d, %r12d
leaq -0x38(%rbp), %r13
leaq 0x122bc(%rip), %rax     # 0x16360
movq (%rax), %rax
movq 0x8(%rax), %rax
cmpl (%rax), %r12d
jge 0x40e4
pushq $0x50
popq %rdi
callq 0x3290
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xe704
movq %rbx, -0x38(%rbp)
movq %rbx, %rdi
callq 0xee5d
movq %r14, %rdi
movq %r13, %rsi
callq 0x5b18
incl %r12d
jmp 0x409d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x3270
jmp 0x4103
movq %rax, %r14
movq -0x30(%rbp), %rdi
callq 0x5b3c
movq %r14, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: flpAdder::flpAdder()
flpAdder::flpAdder()
{
    for (int i = 0; i<CPU_cfg->fp_add->rs_num; i++)
    {
        auto tmp = new resStation(&queue, FLTP);
        init_resStation(tmp);
        rs.push_back(tmp);
    }
    int latency = CPU_cfg->fp_add->exe_time - 1;
    pLatency_Q = nullptr;
    if (latency)
    {
        pLatency_Q = new FU_QEntry[latency];
        for (int i = 0; i<latency; i++)
            pLatency_Q[i].res = nullptr;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x3870(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x3870(%rdi)
andq $0x0, 0x3880(%rdi)
movb $0x0, 0x38a4(%rdi)
movups %xmm0, 0x3808(%rdi)
movups %xmm0, 0x3818(%rdi)
movups %xmm0, 0x3828(%rdi)
leaq 0x1159b(%rip), %rax     # 0x15cc0
movq %rax, (%rdi)
movq %rdi, -0x30(%rbp)
leaq 0x8(%rdi), %r15
xorl %r13d, %r13d
leaq -0x38(%rbp), %rbx
leaq 0x11c22(%rip), %rax     # 0x16360
movq (%rax), %rax
movq 0x10(%rax), %rax
cmpl (%rax), %r13d
jge 0x477f
pushq $0x50
popq %rdi
callq 0x3290
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
pushq $0x1
popq %rdx
callq 0xe704
movq %r12, -0x38(%rbp)
movq %r12, %rdi
callq 0xee5d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5b18
incl %r13d
jmp 0x4737
movslq 0x4(%rax), %rbx
decq %rbx
movq -0x30(%rbp), %rax
andq $0x0, 0x38a8(%rax)
testl %ebx, %ebx
je 0x47d7
pushq $0x38
popq %rcx
movq %rbx, %rax
mulq %rcx
pushq $-0x1
popq %rdi
cmovnoq %rax, %rdi
callq 0x3030
movq -0x30(%rbp), %rcx
movq %rax, 0x38a8(%rcx)
xorl %ecx, %ecx
testl %ebx, %ebx
movl $0x0, %edx
cmovgl %ebx, %edx
imulq $0x38, %rdx, %rdx
cmpq %rcx, %rdx
je 0x47d7
andq $0x0, 0x8(%rax,%rcx)
addq $0x38, %rcx
jmp 0x47c6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x47f5
movq %rax, %rbx
movq %r12, %rdi
callq 0x3270
jmp 0x47f8
movq %rax, %rbx
movq -0x30(%rbp), %rdi
callq 0x5b3c
movq %rbx, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: flpAdder::~flpAdder()
flpAdder::~flpAdder()
{
    for (auto &p : rs)
    {
        delete p;
        p = nullptr;
    }
    if (pLatency_Q)
        delete pLatency_Q;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x114a2(%rip), %rax     # 0x15cc0
movq %rax, (%rdi)
movq 0x3870(%rdi), %r14
movq 0x3878(%rdi), %r15
cmpq %r15, %r14
je 0x4846
movq (%r14), %rdi
callq 0x3270
andq $0x0, (%r14)
addq $0x8, %r14
jmp 0x482f
movq 0x38a8(%rbx), %rdi
testq %rdi, %rdi
je 0x4857
callq 0x3270
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5b3c
nop
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: flpAdder::shift(FU_QEntry&, FU_QEntry&)
void flpAdder::shift(FU_QEntry &in, FU_QEntry &out)
{
    int size = CPU_cfg->fp_add->exe_time - 1;
    if (!size)
    {
        out = in;
        return;
    }
    out = pLatency_Q[size-1];
    for (int i = size-1; i>0; i--)
        pLatency_Q[i] = pLatency_Q[i-1];
    pLatency_Q[0] = in;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x11aeb(%rip), %rax     # 0x16360
movq (%rax), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rax), %rax
cmpq $0x1, %rax
jne 0x48a6
movq 0x30(%rsi), %rax
movq %rax, 0x30(%rdx)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups 0x20(%rsi), %xmm2
movups %xmm2, 0x20(%rdx)
movups %xmm1, 0x10(%rdx)
movups %xmm0, (%rdx)
popq %rbp
retq
movq 0x38a8(%rdi), %rcx
addq $-0x2, %rax
imulq $0x38, %rax, %r8
movq 0x30(%rcx,%r8), %r9
movq %r9, 0x30(%rdx)
movups (%rcx,%r8), %xmm0
movups 0x10(%rcx,%r8), %xmm1
movups 0x20(%rcx,%r8), %xmm2
movups %xmm2, 0x20(%rdx)
movups %xmm1, 0x10(%rdx)
movups %xmm0, (%rdx)
movl %eax, %ecx
imulq $0x38, %rcx, %rcx
movq 0x38a8(%rdi), %rdx
testl %eax, %eax
jle 0x4886
movq -0x8(%rdx,%rcx), %r8
movq %r8, 0x30(%rdx,%rcx)
movups -0x38(%rdx,%rcx), %xmm0
movups -0x28(%rdx,%rcx), %xmm1
movups -0x18(%rdx,%rcx), %xmm2
movups %xmm2, 0x20(%rdx,%rcx)
movups %xmm1, 0x10(%rdx,%rcx)
movups %xmm0, (%rdx,%rcx)
addq $-0x38, %rcx
decl %eax
jmp 0x48e0
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: flpMtplr::flpMtplr()
flpMtplr::flpMtplr()
{
    for (int i = 0; i<CPU_cfg->fp_mul->rs_num; i++)
    {
        auto tmp = new resStation(&queue, FLTP);
        init_resStation(tmp);
        rs.push_back(tmp);
    }
    int latency = CPU_cfg->fp_mul->exe_time - 1;
    pLatency_Q = nullptr;
    if (latency)
    {
        pLatency_Q = new FU_QEntry[latency];
        for (int i = 0; i<latency; i++)
            pLatency_Q[i].res = nullptr;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x3870(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x3870(%rdi)
andq $0x0, 0x3880(%rdi)
movb $0x0, 0x38a4(%rdi)
movups %xmm0, 0x3808(%rdi)
movups %xmm0, 0x3818(%rdi)
movups %xmm0, 0x3828(%rdi)
leaq 0x110e3(%rip), %rax     # 0x15cd8
movq %rax, (%rdi)
movq %rdi, -0x30(%rbp)
leaq 0x8(%rdi), %r15
xorl %r13d, %r13d
leaq -0x38(%rbp), %rbx
leaq 0x11752(%rip), %rax     # 0x16360
movq (%rax), %rax
movq 0x18(%rax), %rax
cmpl (%rax), %r13d
jge 0x4c4f
pushq $0x50
popq %rdi
callq 0x3290
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
pushq $0x1
popq %rdx
callq 0xe704
movq %r12, -0x38(%rbp)
movq %r12, %rdi
callq 0xee5d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5b18
incl %r13d
jmp 0x4c07
movslq 0x4(%rax), %rbx
decq %rbx
movq -0x30(%rbp), %rax
andq $0x0, 0x38a8(%rax)
testl %ebx, %ebx
je 0x4ca7
pushq $0x38
popq %rcx
movq %rbx, %rax
mulq %rcx
pushq $-0x1
popq %rdi
cmovnoq %rax, %rdi
callq 0x3030
movq -0x30(%rbp), %rcx
movq %rax, 0x38a8(%rcx)
xorl %ecx, %ecx
testl %ebx, %ebx
movl $0x0, %edx
cmovgl %ebx, %edx
imulq $0x38, %rdx, %rdx
cmpq %rcx, %rdx
je 0x4ca7
andq $0x0, 0x8(%rax,%rcx)
addq $0x38, %rcx
jmp 0x4c96
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4cc5
movq %rax, %rbx
movq %r12, %rdi
callq 0x3270
jmp 0x4cc8
movq %rax, %rbx
movq -0x30(%rbp), %rdi
callq 0x5b3c
movq %rbx, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: flpMtplr::~flpMtplr()
flpMtplr::~flpMtplr()
{
    for (auto &p : rs)
    {
        delete p;
        p = nullptr;
    }
    if (pLatency_Q)
        delete pLatency_Q;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10fea(%rip), %rax     # 0x15cd8
movq %rax, (%rdi)
movq 0x3870(%rdi), %r14
movq 0x3878(%rdi), %r15
cmpq %r15, %r14
je 0x4d16
movq (%r14), %rdi
callq 0x3270
andq $0x0, (%r14)
addq $0x8, %r14
jmp 0x4cff
movq 0x38a8(%rbx), %rdi
testq %rdi, %rdi
je 0x4d27
callq 0x3270
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5b3c
nop
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: flpMtplr::shift(FU_QEntry&, FU_QEntry&)
void flpMtplr::shift(FU_QEntry &in, FU_QEntry &out)
{
    int size = CPU_cfg->fp_mul->exe_time - 1;
    if (!size)
    {
        out = in;
        return;
    }
    out = pLatency_Q[size-1];
    for (int i = size-1; i>0; i--)
        pLatency_Q[i] = pLatency_Q[i-1];
    pLatency_Q[0] = in;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1161b(%rip), %rax     # 0x16360
movq (%rax), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rax
cmpq $0x1, %rax
jne 0x4d76
movq 0x30(%rsi), %rax
movq %rax, 0x30(%rdx)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups 0x20(%rsi), %xmm2
movups %xmm2, 0x20(%rdx)
movups %xmm1, 0x10(%rdx)
movups %xmm0, (%rdx)
popq %rbp
retq
movq 0x38a8(%rdi), %rcx
addq $-0x2, %rax
imulq $0x38, %rax, %r8
movq 0x30(%rcx,%r8), %r9
movq %r9, 0x30(%rdx)
movups (%rcx,%r8), %xmm0
movups 0x10(%rcx,%r8), %xmm1
movups 0x20(%rcx,%r8), %xmm2
movups %xmm2, 0x20(%rdx)
movups %xmm1, 0x10(%rdx)
movups %xmm0, (%rdx)
movl %eax, %ecx
imulq $0x38, %rcx, %rcx
movq 0x38a8(%rdi), %rdx
testl %eax, %eax
jle 0x4d56
movq -0x8(%rdx,%rcx), %r8
movq %r8, 0x30(%rdx,%rcx)
movups -0x38(%rdx,%rcx), %xmm0
movups -0x28(%rdx,%rcx), %xmm1
movups -0x18(%rdx,%rcx), %xmm2
movups %xmm2, 0x20(%rdx,%rcx)
movups %xmm1, 0x10(%rdx,%rcx)
movups %xmm0, (%rdx,%rcx)
addq $-0x38, %rcx
decl %eax
jmp 0x4db0
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: ldsdUnit::ldsdUnit()
ldsdUnit::ldsdUnit()
{
    for (int i = 0; i<CPU_cfg->ld_str->rs_num; i++)
    {
        auto tmp = new resStation(&queue, INTGR);
        init_resStation(tmp);
        rs.push_back(tmp);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x3870(%rdi), %r14
xorps %xmm0, %xmm0
andq $0x0, 0x3880(%rdi)
movups %xmm0, 0x3870(%rdi)
movb $0x0, 0x38a4(%rdi)
movups %xmm0, 0x3808(%rdi)
movups %xmm0, 0x3818(%rdi)
movups %xmm0, 0x3828(%rdi)
leaq 0x10c2b(%rip), %rax     # 0x15cf0
movq %rax, (%rdi)
movq %rdi, -0x30(%rbp)
leaq 0x8(%rdi), %r15
xorl %r12d, %r12d
leaq -0x38(%rbp), %r13
leaq 0x11282(%rip), %rax     # 0x16360
movq (%rax), %rax
movq 0x20(%rax), %rax
cmpl (%rax), %r12d
jge 0x511e
pushq $0x50
popq %rdi
callq 0x3290
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xe704
movq %rbx, -0x38(%rbp)
movq %rbx, %rdi
callq 0xee5d
movq %r14, %rdi
movq %r13, %rsi
callq 0x5b18
incl %r12d
jmp 0x50d7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x3270
jmp 0x513d
movq %rax, %r14
movq -0x30(%rbp), %rdi
callq 0x5b3c
movq %r14, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O2/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: nopBublr::nopBublr()
nopBublr::nopBublr()
{
    bubble.ROB_i = -1;
    bubble.ROB_E = nullptr;
    for (int i = 0; i<3; i++)
    {
        shifter[i].ROB_i = -1;
        shifter[i].ROB_E = nullptr;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
orl $-0x1, (%rdi)
andq $0x0, 0x8(%rdi)
xorl %eax, %eax
cmpq $0x30, %rax
je 0x552d
orl $-0x1, 0x10(%rdi,%rax)
andq $0x0, 0x18(%rdi,%rax)
addq $0x10, %rax
jmp 0x5516
popq %rbp
retq
nop