LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/DanielWochnik[P]CombOptWS2018/randomgraph.cpp
// Function: DHBW::create_random_graph(DHBW::Graph&, unsigned long, double, double)
void create_random_graph(Graph & g, VertexId n, double p_edge, double directed)
	{
		assert(g.num_vertices() == 0);
		
		// Add vertices
		for (VertexId i = 0; i < n; ++i)
		{
			g.add_vertex();
		}
		
		// add random edges
		for (VertexId i = 0; i < n; ++i)
		{
			for (VertexId j = 0; j < i or (directed and j < n); ++j)
			{
				// Random number in [0,1]
				double const r = ((double) rand() / (RAND_MAX));
				if (p_edge >= r)
				{
					g.add_edge(j,i);
				}
			}
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
callq 0x25ce
testq %rax, %rax
jne 0x36eb
testq %rbx, %rbx
je 0x36df
movq %rbx, %r15
movq %r14, %rdi
callq 0x26c6
decq %r15
jne 0x3657
xorl %r15d, %r15d
testq %r15, %r15
jne 0x367e
movsd 0x8(%rsp), %xmm0
ucomisd 0xc6e(%rip), %xmm0      # 0x42e8
jne 0x367e
jnp 0x36d7
xorl %r12d, %r12d
callq 0x2050
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0xc4b(%rip), %xmm0      # 0x42e0
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x36af
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x270e
movsd 0x8(%rsp), %xmm0
ucomisd 0xc2b(%rip), %xmm0      # 0x42e8
setp %cl
setne %al
incq %r12
cmpq %rbx, %r12
setb %dl
cmpq %r15, %r12
jb 0x3681
orb %cl, %al
andb %dl, %al
jne 0x3681
incq %r15
cmpq %rbx, %r15
jne 0x3667
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xc1e(%rip), %rdi       # 0x4310
leaq 0xc2d(%rip), %rsi       # 0x4326
leaq 0xc36(%rip), %rcx       # 0x4336
movl $0x9, %edx
callq 0x20a0
// File: /workspace/github_cpp_makefile_star2_O1/DanielWochnik[P]CombOptWS2018/randomgraph.cpp
// Function: DHBW::write_random_graph_to_file(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, double)
void write_random_graph_to_file(VertexId n, std::string const & filename, double directed)
	{
		// Thats a sharp treshhold for connectivity, i.e. the probability that 
		// a random graph with n vertices and p is 
		// 		1, if p > for all p > log(n)/n
		// 		0, if p > for all p < log(n)/n
		// for n -> infinity (that's pretty cool btw!)
		// see also: https://www.math.cmu.edu/~af1p/MAA2005/L2.pdf
		double const p = std::log(n)/n;
		Graph g;
		create_random_graph(g,n,p,directed);
		g.write_to_file(filename);
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movsd %xmm0, 0x18(%rsp)
movq %rdi, %r14
movq %rdi, %xmm1
punpckldq 0xbc7(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xbcf(%rip), %xmm1      # 0x4300
movq %rsi, %rbx
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movapd %xmm0, (%rsp)
callq 0x20f0
divsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x27f6
movq %r15, %rdi
movq %r14, %rsi
movsd (%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x3620
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2b60
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x379d
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2150
leaq 0x20(%rsp), %rdi
callq 0x2d04
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x356c
movq %rbx, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/examples/qm.cc
// Function: main
int main() {

	Blob<string> sa1, sa2; // instantiation will appear elsewhere

	// Blob<int> and its initializer_list constructor 
	// are instantiated in this file
	Blob<int> a1 = {0,1,2,3,4,5,6,7,8,9}; 
	Blob<int> a2(a1);  // copy constructor instantiated in this file

	int i = compare(a1[0], a2[0]); // instantiation will appear elsewhere

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
leaq -0x40(%rbp), %rdi
callq 0x28aa
leaq -0x30(%rbp), %rdi
callq 0x28aa
movups 0x2cc6(%rip), %xmm0     # 0x5014
leaq -0x70(%rbp), %rax
movaps %xmm0, 0x10(%rax)
movups 0x2ca7(%rip), %xmm0     # 0x5004
movaps %xmm0, (%rax)
movabsq $0x900000008, %rcx      # imm = 0x900000008
movq %rcx, 0x20(%rax)
leaq -0x80(%rbp), %rcx
movq %rax, (%rcx)
movq $0xa, 0x8(%rcx)
leaq -0x18(%rbp), %rdi
movq $0x0, -0x8(%rdi)
leaq -0x20(%rbp), %rsi
leaq -0x9(%rbp), %rdx
callq 0x2574
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, -0x70(%rbp)
movq %rax, -0x68(%rbp)
testq %rax, %rax
je 0x23c0
movq 0x5c16(%rip), %rcx      # 0x7fc8
cmpb $0x0, (%rcx)
je 0x23bc
incl 0x8(%rax)
jmp 0x23c0
lock
incl 0x8(%rax)
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x2472
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
callq 0x2472
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2890
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x23f2
callq 0x2508
movq -0x18(%rbp), %rdi
testq %rdi, %rdi
je 0x2400
callq 0x2508
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0x240e
callq 0x2508
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x241c
callq 0x2508
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
jmp 0x244e
movq %rax, %rbx
jmp 0x245c
movq %rax, %rbx
movq -0x68(%rbp), %rdi
testq %rdi, %rdi
je 0x2440
callq 0x2508
movq -0x18(%rbp), %rdi
testq %rdi, %rdi
je 0x244e
callq 0x2508
movq -0x28(%rbp), %rdi
testq %rdi, %rdi
je 0x245c
callq 0x2508
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x246a
callq 0x2508
movq %rbx, %rdi
callq 0x2160
// File: /workspace/github_cpp_makefile_star2_O1/liujan[P]multi_thread_randomforest/RandomForest.cpp
// Function: RandomForest::buildTree(int)
bool RandomForest::buildTree(int num){
	if (all_samples.empty()){
		cout << "[Error] all sample is empty" << endl;
		return false;
	}

	memset(result, 0, sizeof(result));
	memset(r, 0, sizeof(r));

	for (int i = 0; i < num; i+=numOfThread){
		pthread_t thread[numOfThread];
		M *m = new M[numOfThread];
		//memset(flag, false, sizeof(flag));
		for (int j = 0; j < numOfThread; j++){
			m[j].rf = this;
			m[j].i = j;
			pthread_create(&thread[j], NULL, build, &(m[j]));
		}
		for (int j = 0; j < numOfThread; j++)
			pthread_join(thread[j], NULL);
		
		delete[] m;
	}
	

	for (int i = 0; i < numOfTest; i++){
		for (int j = 0; j < numOfTypes + 1; j++){
			for (int k = 0; k < numOfThread; k++){
				r[i][j] += result[k][i][j];
			}
		}
	}
	
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq (%rdi), %r14
movq 0x8(%rdi), %r15
cmpq %r15, %r14
je 0x5117
movl %esi, %ebx
movq %rdi, %r12
movq %r15, -0x40(%rbp)
movq %r14, -0x48(%rbp)
leaq 0x51c9(%rip), %rdi      # 0xa1d0
xorl %r14d, %r14d
movl $0x148da0, %edx         # imm = 0x148DA0
xorl %esi, %esi
callq 0x2100
leaq 0x30(%r12), %rdi
movl $0x291b4, %edx          # imm = 0x291B4
movq %rdi, -0x38(%rbp)
xorl %esi, %esi
callq 0x2100
testl %ebx, %ebx
jle 0x50b6
leaq -0x234(%rip), %r13      # 0x4e06
movl %ebx, -0x2c(%rbp)
movq %r14, -0x58(%rbp)
movl $0x80, %edi
callq 0x2030
movq %rax, %r15
movq %rax, -0x50(%rbp)
leaq -0xa0(%rbp), %r14
xorl %ebx, %ebx
movq %r12, (%r15)
movl %ebx, 0x8(%r15)
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r15, %rcx
callq 0x2300
incq %rbx
addq $0x8, %r14
addq $0x10, %r15
cmpq $0x8, %rbx
jne 0x505b
xorl %ebx, %ebx
movq -0xa0(%rbp,%rbx,8), %rdi
xorl %esi, %esi
callq 0x21b0
incq %rbx
cmpq $0x8, %rbx
jne 0x5085
movq -0x50(%rbp), %rdi
callq 0x2250
movq -0x58(%rbp), %r14
addl $0x8, %r14d
movl -0x2c(%rbp), %ebx
cmpl %ebx, %r14d
jl 0x503d
xorl %eax, %eax
movq -0x48(%rbp), %r14
movq -0x40(%rbp), %r15
leaq 0x5109(%rip), %r10      # 0xa1d0
movq -0x38(%rbp), %r11
imulq $0x6c, %rax, %rcx
addq %r11, %rcx
movq %r10, %rdx
xorl %esi, %esi
leaq (%rcx,%rsi,4), %rdi
movl (%rdi), %r8d
movq $-0x148da0, %r9         # imm = 0xFFEB7260
addl 0x148da0(%rdx,%r9), %r8d
movl %r8d, (%rdi)
addq $0x291b4, %r9           # imm = 0x291B4
jne 0x50e5
incq %rsi
addq $0x4, %rdx
cmpq $0x1b, %rsi
jne 0x50d7
incq %rax
addq $0x6c, %r10
cmpq $0x617, %rax            # imm = 0x617
jne 0x50cb
jmp 0x5159
movq 0x4eba(%rip), %rbx      # 0x9fd8
leaq 0x201b(%rip), %rsi      # 0x7140
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2220
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
cmpq %r15, %r14
setne %al
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/liujan[P]multi_thread_randomforest/main.cpp
// Function: fun()
void fun(){
	ifstream in("train.csv");
	ofstream out("train1.csv");

	string s;
	getline(in, s);
	out << s << endl;
	while (1){
		if (in.eof())
			break;
		getline(in, s);
		double p = rand() * 1.0 / RAND_MAX;
		if (p <= 0.1)
			out << s << endl;
		if (in.peek() == '\n')
			in.get();
	}
	in.close();
	out.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
leaq 0x13d9(%rip), %rsi      # 0x71b4
leaq -0x250(%rbp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x2310
leaq 0x1462(%rip), %rsi      # 0x7258
leaq -0x450(%rbp), %rdi
movl $0x10, %edx
callq 0x2210
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movq -0x250(%rbp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %edx
leaq -0x250(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2320
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x450(%rbp), %rdi
callq 0x2220
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq -0x250(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x230(%rbp,%rax)
jne 0x5f64
leaq (%rax,%rbp), %rdi
addq $-0x250, %rdi           # imm = 0xFDB0
leaq -0x250(%rbp), %rbx
leaq -0x48(%rbp), %r14
leaq -0x450(%rbp), %r15
movl $0xa, %esi
callq 0x21d0
movsbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2320
callq 0x2090
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x1121(%rip), %xmm0     # 0x7008
movsd 0x1361(%rip), %xmm1     # 0x7250
ucomisd %xmm0, %xmm1
jb 0x5f2f
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r15, %rdi
callq 0x2220
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x20d0
cmpl $0xa, %eax
jne 0x5f44
movq %rbx, %rdi
callq 0x2240
movq -0x250(%rbp), %rax
movq -0x18(%rax), %rax
leaq (%rax,%rbp), %rdi
addq $-0x250, %rdi           # imm = 0xFDB0
testb $0x2, 0x20(%rdi)
je 0x5ebb
leaq -0x250(%rbp), %rdi
callq 0x2060
leaq -0x450(%rbp), %rdi
callq 0x2270
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x5f91
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
movq 0x4038(%rip), %rax      # 0x9fd0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x448(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x450(%rbp,%rcx)
callq 0x2190
leaq -0x358(%rbp), %rdi
callq 0x20b0
leaq -0x250(%rbp), %rdi
callq 0x2080
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x6012
jmp 0x5fee
jmp 0x5fee
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x6006
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21f0
leaq -0x450(%rbp), %rdi
callq 0x2290
leaq -0x250(%rbp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O1/liujan[P]multi_thread_randomforest/main.cpp
// Function: main
int main(int argc,  char * argv[]) {
	// insert code here...
	
	clock_t start, end;
	start = clock();

	RandomForest forest;
	forest.readTrainSample("train.csv");
	forest.readTestSample("test.csv");
	forest.buildTree(120);
	forest.predict();
	end = clock();
	cout << "runint time is " << (end - start) / CLOCKS_PER_SEC << " second" <<  endl;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x29230, %rsp          # imm = 0x29230
callq 0x2130
movq %rax, %rbx
leaq -0x29238(%rbp), %rdi
callq 0x4de0
leaq -0x40(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x115d(%rip), %rsi      # 0x71b4
leaq 0x115f(%rip), %rdx      # 0x71bd
leaq -0x50(%rbp), %rdi
callq 0x61da
leaq -0x29238(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x53c8
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x608c
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21f0
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x116f(%rip), %rsi      # 0x720a
leaq 0x1170(%rip), %rdx      # 0x7212
leaq -0x30(%rbp), %rdi
callq 0x61da
leaq -0x29238(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x571c
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x60d0
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x21f0
leaq -0x29238(%rbp), %rdi
movl $0x78, %esi
callq 0x4fd2
leaq -0x29238(%rbp), %rdi
callq 0x516e
callq 0x2130
movq %rax, %r14
movq 0x3edc(%rip), %rdi      # 0x9fd8
leaq 0x1160(%rip), %rsi      # 0x7263
movl $0xf, %edx
callq 0x2220
subq %rbx, %r14
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
movq %r14, %rax
imulq %rcx
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x12, %rdx
addq %rdx, %rsi
movq 0x3ea3(%rip), %rdi      # 0x9fd8
callq 0x21c0
movq %rax, %rbx
leaq 0x112f(%rip), %rsi      # 0x7273
movl $0x7, %edx
movq %rax, %rdi
callq 0x2220
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
leaq -0x29238(%rbp), %rdi
callq 0x5a6a
xorl %eax, %eax
addq $0x29230, %rsp          # imm = 0x29230
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x61c5
movq -0x20(%rbp), %rsi
jmp 0x61b6
jmp 0x61c2
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x61c5
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21f0
jmp 0x61c5
jmp 0x61c2
movq %rax, %rbx
leaq -0x29238(%rbp), %rdi
callq 0x5a6a
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/ariannagavioli[P]ALU/AluModule.cpp
// Function: AluModule::AluModule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
AluModule::AluModule(string name, int priority):module(name, priority) {
	string Alu = "Alu";
	
	//This module is the one which triggers the whole system, so it creates a message in its constructor
	if(getName() == Alu){
		message* myMessage = new message();
		myMessage->valid = 1;
		myMessage->timestamp = getTime();
		strcpy(myMessage->source, getName().c_str());
		strcpy(myMessage->dest, "Fetch");
		myMessage->magic_struct = NULL;
		
		sendWithDelay(myMessage, 10);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x33c6
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x44ec
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x23ee
callq 0x2120
leaq 0x594b(%rip), %rax      # 0x7d40
movq %rax, (%rbx)
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2cf6(%rip), %rsi      # 0x50ff
leaq 0x2cf2(%rip), %rdx      # 0x5102
leaq 0x28(%rsp), %rdi
callq 0x3456
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x456c
movq 0x10(%rsp), %rdx
cmpq 0x30(%rsp), %rdx
jne 0x244f
testq %rdx, %rdx
je 0x2453
movq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x2150
testl %eax, %eax
sete %bpl
jmp 0x2456
xorl %ebp, %ebp
jmp 0x2456
movb $0x1, %bpl
leaq 0x18(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x2469
callq 0x2120
testb %bpl, %bpl
je 0x24f2
movl $0x30, %edi
callq 0x2140
movq %rax, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x10(%rax)
movb $0x1, 0x4(%rax)
movq %rbx, %rdi
callq 0x4600
movl %eax, 0x8(%r14)
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x456c
movq %r14, %rdi
addq $0xc, %rdi
movq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x2110
cmpq %r13, %r15
je 0x24cb
movq %r15, %rdi
callq 0x2120
movw $0x68, 0x1a(%r14)
movl $0x63746546, 0x16(%r14) # imm = 0x63746546
movq $0x0, 0x20(%r14)
movq %rbx, %rdi
movq %r14, %rsi
movl $0xa, %edx
callq 0x4604
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x2501
callq 0x2120
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x252d
jmp 0x252d
movq %rax, %r14
jmp 0x253f
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x2547
callq 0x2120
jmp 0x2547
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x253f
callq 0x2120
movq %rbx, %rdi
callq 0x327c
movq %r14, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/ariannagavioli[P]ALU/ExampleModule.cpp
// Function: ExampleModule::ExampleModule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
ExampleModule::ExampleModule(string name, int priority):module(name, priority) {
	string Fetch = "Fetch";
	
	//This module is the one which triggers the whole system, so it creates a message in its constructor
	if(getName() == Fetch){
		message* myMessage = new message();
		myMessage->valid = 1;
		myMessage->timestamp = getTime();
		strcpy(myMessage->source, getName().c_str());
		strcpy(myMessage->dest, "Alu");
		myMessage->magic_struct = NULL;
		
		sendWithDelay(myMessage, 10);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x33c6
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x44ec
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x358e
callq 0x2120
leaq 0x4803(%rip), %rax      # 0x7d98
movq %rax, (%rbx)
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1b5a(%rip), %rsi      # 0x5103
leaq 0x1b58(%rip), %rdx      # 0x5108
leaq 0x28(%rsp), %rdi
callq 0x3456
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x456c
movq 0x10(%rsp), %rdx
cmpq 0x30(%rsp), %rdx
jne 0x35ef
testq %rdx, %rdx
je 0x35f3
movq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x2150
testl %eax, %eax
sete %bpl
jmp 0x35f6
xorl %ebp, %ebp
jmp 0x35f6
movb $0x1, %bpl
leaq 0x18(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x3609
callq 0x2120
testb %bpl, %bpl
je 0x3687
movl $0x30, %edi
callq 0x2140
movq %rax, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x10(%rax)
movb $0x1, 0x4(%rax)
movq %rbx, %rdi
callq 0x4600
movl %eax, 0x8(%r14)
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x456c
movq %r14, %rdi
addq $0xc, %rdi
movq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x2110
cmpq %r13, %r15
je 0x3667
movq %r15, %rdi
callq 0x2120
movl $0x756c41, 0x16(%r14)   # imm = 0x756C41
movq $0x0, 0x20(%r14)
movq %rbx, %rdi
movq %r14, %rsi
movl $0xa, %edx
callq 0x4604
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3696
callq 0x2120
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x36c2
jmp 0x36c2
movq %rax, %r14
jmp 0x36d4
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x36dc
callq 0x2120
jmp 0x36dc
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x36d4
callq 0x2120
movq %rbx, %rdi
callq 0x327c
movq %r14, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/ariannagavioli[P]ALU/System.cpp
// Function: System::notify_all(event*)
vector<event*> System::notify_all(event* e) {
	vector<event*> tempEvents;
	vector<event*> newEvents;
	
	//Notify all the modules while the message is valid (A message can become invalid if it was intercepted and digested. E.g.: A message from CPU to MEMORY intercepted by the CACHE)
	for(int i=0; i<modules.size() && e->m != NULL && e->m->valid; i++){
		tempEvents = modules[i]->notify(e);
		while(tempEvents.size() > 0){
			newEvents.push_back(tempEvents.back());//back() because std::vector does not support front pop
			tempEvents.pop_back();
		}
	}
	
	return newEvents;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rax
movq %rsi, 0x20(%rsp)
cmpq %rax, 0x8(%rsi)
je 0x3aa5
xorl %r14d, %r14d
xorl %ebp, %ebp
movq 0x8(%rdx), %rcx
testq %rcx, %rcx
je 0x3aa0
cmpb $0x1, 0x4(%rcx)
jne 0x3aa0
movq (%rax,%r14,8), %rsi
movq %rsp, %rdi
movq %rdx, %r15
callq 0x45c0
movq (%rsp), %r13
movq 0x8(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rbp, %rbp
je 0x3a32
movq %rbp, %rdi
callq 0x2120
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3a40
callq 0x2120
cmpq %r13, %r12
je 0x3a79
addq $-0x8, %r12
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3a61
movq (%r12), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x3a6c
movq %rbx, %rdi
movq %r12, %rdx
callq 0x4306
leaq -0x8(%r12), %rax
cmpq %r13, %r12
movq %rax, %r12
jne 0x3a49
incq %r14
movq 0x20(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq %r13, %rbp
cmpq %r14, %rcx
movq %r15, %rdx
ja 0x39e6
jmp 0x3aa8
movq %rbp, %r13
jmp 0x3aa8
xorl %r13d, %r13d
testq %r13, %r13
je 0x3ab5
movq %r13, %rdi
callq 0x2120
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x3ad2
movq %rax, %r14
movq %r13, %rbp
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3adf
callq 0x2120
testq %rbp, %rbp
je 0x3aec
movq %rbp, %rdi
callq 0x2120
movq %r14, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/ariannagavioli[P]ALU/System.cpp
// Function: System::run()
void System::run() {
	vector<event*> tempEvents;
	for(int i=0; i<modules.size(); i++){
		tempEvents = modules[i]->initialize();
		while(tempEvents.size() > 0){
			insert(tempEvents.back());//back() because std::vector does not support front pop
			tempEvents.pop_back();
		}
	}
	
	while(!this->queue.empty()){
		tick();
	}
	//If there are no more events, the program terminates
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x3ba6
leaq 0x18(%rbx), %r15
xorl %ebp, %ebp
xorl %r13d, %r13d
movq (%rax,%rbp,8), %rsi
movq %rsp, %rdi
callq 0x4594
movq (%rsp), %r14
movq 0x8(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %r13, %r13
je 0x3b4d
movq %r13, %rdi
callq 0x2120
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3b5b
callq 0x2120
cmpq %r14, %r12
movq %rsp, %r13
je 0x3b87
movq -0x8(%r12), %rax
movq %rax, (%rsp)
movl (%rax), %eax
cmpl 0x38(%rbx), %eax
jl 0x3b7e
movq %r15, %rdi
movq %r13, %rsi
callq 0x411e
addq $-0x8, %r12
cmpq %r14, %r12
jne 0x3b63
incq %rbp
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq %r14, %r13
cmpq %rbp, %rcx
ja 0x3b1b
jmp 0x3ba9
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
cmpq 0x20(%rbx), %rax
je 0x3bbd
movq %rbx, %rdi
callq 0x3bfc
jmp 0x3ba9
testq %r14, %r14
je 0x3bca
movq %r14, %rdi
callq 0x2120
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3be6
jmp 0x3be0
movq %rax, %rbx
movq %r14, %r13
testq %r13, %r13
je 0x3bf3
movq %r13, %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/ariannagavioli[P]ALU/System.cpp
// Function: System::tick()
void System::tick() {
	this->currentTime = this->queue.top()->time;
	//Notify all the modules about the next event and remove it from the queue
	vector<event*> result = notify_all(this->queue.top());
	//Deallocate the message and the event
	delete this->queue.top()->m;
	delete this->queue.top();
	this->queue.pop();
	
	//Schedule all the events generated in this tick
	while (result.size() > 0) {
		this->insert(result.back());//back() because std::vector does not support front pop
		result.pop_back();
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
movq 0x18(%rdi), %rax
movq (%rax), %rcx
movl (%rcx), %ecx
movl %ecx, 0x38(%rdi)
movq (%rax), %rdx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x39b0
movq 0x18(%rbx), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x3c3b
callq 0x2120
movq (%r14), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3c4b
callq 0x2120
movq %r14, %rdi
callq 0x4194
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
cmpq %rdi, %rax
je 0x3c98
leaq 0x18(%rsp), %r15
movq -0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movl (%rax), %eax
cmpl 0x38(%rbx), %eax
jl 0x3c81
movq %r14, %rdi
movq %r15, %rsi
callq 0x411e
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
addq $-0x8, %rax
movq %rax, 0x8(%rsp)
cmpq %rdi, %rax
jne 0x3c66
testq %rdi, %rdi
je 0x3ca2
callq 0x2120
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x3cae
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3cbf
callq 0x2120
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/ariannagavioli[P]ALU/module.cpp
// Function: module::module(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
module::module(string name, int priority){//Default priority is 0. Higher the value, higher the priority. Negative values are allowed. Modules with higher priority are notified first.
	_name = name;
	_priority = priority;
	_currentTime = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rdi, %r14
leaq 0x3880(%rip), %rax      # 0x7d80
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x18(%rdi), %r15
movq %r15, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
leaq 0x30(%rdi), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movq %rax, 0x40(%rdi)
movq %rbx, %rdi
callq 0x2080
movl %ebp, 0x28(%r14)
movl $0x0, 0x2c(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r12), %rdi
testq %rdi, %rdi
je 0x4556
callq 0x2120
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x4563
callq 0x2120
movq %r14, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/ariannagavioli[P]ALU/module.cpp
// Function: module::notify(event*)
vector<event*> module::notify(event* e){
	_currentTime = e->time;
	onNotify(e->m);
	vector<event*> result = events;
	events.clear();
	return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdx), %eax
movl %eax, 0x2c(%rsi)
movq 0x8(%rdx), %rsi
movq (%r14), %rax
movq %r14, %rdi
callq *(%rax)
leaq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x4674
movq 0x30(%r14), %rax
cmpq %rax, 0x38(%r14)
je 0x45f5
movq %rax, 0x38(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/ariannagavioli[P]ALU/module.cpp
// Function: module::sendWithDelay(message*, int)
void module::sendWithDelay(message* m, int delay){
	if(delay < 0)
		return;
	
	m->id = ++_messageId;
	event* e = new event();
	e->time = getTime() + delay;
	e->m = m;
	events.push_back(e);
}

// Assembly:
testl %edx, %edx
js 0x4673
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x3b0e(%rip), %eax      # 0x812c
incl %eax
movl %eax, 0x3b06(%rip)      # 0x812c
movl %eax, (%rsi)
movl $0x10, %edi
callq 0x2140
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq %rax, 0x8(%rsp)
addl 0x2c(%rbx), %ebp
movl %ebp, (%rax)
movq %r14, 0x8(%rax)
movq 0x38(%rbx), %rsi
cmpq 0x40(%rbx), %rsi
je 0x465a
movq %rax, (%rsi)
addq $0x8, 0x38(%rbx)
jmp 0x466b
addq $0x30, %rbx
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x4306
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ruippeixotog[P]algo-lib/segment-tree.cpp
// Function: SegTree<Node, Op>::SegTree(int)
SegTree(int n) {
    size = n;
    tree.resize(4 * n + 1);
    hasPending.resize(4 * n + 1);
    pending.resize(4 * n + 1);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x8(%rdi), %rbx
leaq 0x20(%rdi), %r14
movq $0x0, 0x30(%rdi)
xorl %eax, %eax
movl %eax, 0x38(%rdi)
leaq 0x48(%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movl %eax, 0x28(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movl %esi, (%rdi)
leal 0x1(,%rsi,4), %eax
movslq %eax, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1678
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x16aa
movq %r15, %rdi
movq %r12, %rsi
callq 0x1718
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r12
movq (%r15), %rdi
testq %rdi, %rdi
je 0x1652
callq 0x10d0
movq %r14, %rdi
callq 0x15aa
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1667
callq 0x10d0
movq %r12, %rdi
callq 0x1150
movq %rax, %rdi
callq 0x159e
nop
// File: /workspace/github_cpp_makefile_star2_O1/ruippeixotog[P]algo-lib/segment-tree.cpp
// Function: SegTree<Node, Op>::build(int*, int, int, int)
void build(int* arr, int node, int st, int end) {
    if (st == end) { tree[node] = Node(st, arr[st]); return; }

    build(arr, left(node), st, (st + end) / 2);
    build(arr, right(node), (st + end) / 2 + 1, end);
    tree[node] = tree[left(node)].join(tree[right(node)]);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, %r14
cmpl %r8d, %ecx
jne 0x1fce
movslq %ecx, %rax
movl (%r12,%rax,4), %eax
movslq %ebx, %rcx
movq 0x8(%r14), %rdx
movq %rax, %rsi
shlq $0x20, %rsi
orq %rax, %rsi
movq %rsi, (%rdx,%rcx,8)
jmp 0x2046
movl %r8d, %r15d
leal (%rbx,%rbx), %edx
movl %edx, 0x4(%rsp)
leal (%r15,%rcx), %eax
movl %eax, %r13d
shrl $0x1f, %r13d
addl %eax, %r13d
sarl %r13d
movq %r14, %rdi
movq %r12, %rsi
movl %r13d, %r8d
callq 0x1f98
leal 0x1(,%rbx,2), %ebp
incl %r13d
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
movl %r13d, %ecx
movl %r15d, %r8d
callq 0x1f98
movslq 0x4(%rsp), %rax
movq 0x8(%r14), %rcx
movslq %ebp, %rdx
movl (%rcx,%rax,8), %esi
movl 0x4(%rcx,%rax,8), %eax
movl (%rcx,%rdx,8), %edi
cmpl %esi, %edi
cmovll %edi, %esi
movl 0x4(%rcx,%rdx,8), %edx
cmpl %edx, %eax
cmovgl %eax, %edx
shlq $0x20, %rdx
orq %rdx, %rsi
movslq %ebx, %rax
movq %rsi, (%rcx,%rax,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ruippeixotog[P]algo-lib/segment-tree.cpp
// Function: SegTree<Node, Op>::applyPending(int, int, int)
void applyPending(int node, int st, int end) {
    if(hasPending[node]) {
      update(left(node), st, (st + end) / 2, st, end, pending[node]);
      update(right(node), (st + end) / 2 + 1, end, st, end, pending[node]);
      hasPending[node] = false;
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movslq %esi, %r15
leaq 0x3f(%r15), %r13
testq %r15, %r15
cmovnsq %r15, %r13
sarq $0x6, %r13
shlq $0x3, %r13
movq 0x20(%rdi), %rsi
addq %r13, %rsi
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
leaq 0x3f(%rcx), %r8
andq %r15, %r8
xorl %eax, %eax
cmpq %rcx, %r8
setbe %al
movl $0x1, %r14d
movl %r15d, %ecx
shlq %cl, %r14
movq -0x8(%rsi,%rax,8), %rcx
btq %r15, %rcx
jae 0x235b
movl %edx, %r12d
leaq -0x8(,%rax,8), %rax
movq %rax, 0x10(%rsp)
leal (%r15,%r15), %esi
leal (%rbx,%r12), %eax
movl %eax, %ebp
shrl $0x1f, %ebp
addl %eax, %ebp
sarl %ebp
movq 0x48(%rdi), %rax
movq (%rax,%r15,8), %rax
movq %rax, (%rsp)
movl %ebp, %ecx
movq %rdi, 0x8(%rsp)
movl %edx, %r8d
movl %ebx, %r9d
callq 0x2056
leal 0x1(,%r15,2), %esi
incl %ebp
movq 0x8(%rsp), %rdi
movq 0x48(%rdi), %rax
movq (%rax,%r15,8), %rax
movq %rax, (%rsp)
movq %rdi, %r15
movl %ebp, %edx
movl %ebx, %ecx
movl %r12d, %r8d
movl %ebx, %r9d
callq 0x2056
addq 0x20(%r15), %r13
notq %r14
movq 0x10(%rsp), %rax
andq %r14, (%rax,%r13)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ruippeixotog[P]algo-lib/segment-tree.cpp
// Function: SegTree<Node, Op>::query(int, int, int, int, int)
Node query(int node, int st, int end, int i, int j) {
    if (j < st || i > end) return Node();
    if (st >= i && end <= j) return tree[node];

    applyPending(node, st, end);
    Node p1 = query(left(node), st, (st + end) / 2, i, j);
    Node p2 = query(right(node), (st + end) / 2 + 1, end, i, j);
    return p1.join(p2);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r14d
cmpl %edx, %r9d
setl %al
cmpl %ecx, %r8d
setg %cl
orb %al, %cl
je 0x239b
movl $0xc4653600, %ecx       # imm = 0xC4653600
movl $0x3b9aca00, %r13d      # imm = 0x3B9ACA00
jmp 0x2452
movl %r9d, %ebx
movl %r8d, %ebp
movl %edx, %r13d
movl %esi, %r12d
cmpl %r8d, %edx
setl %al
cmpl %r9d, %r14d
setg %cl
orb %al, %cl
je 0x2440
movq %rdi, 0x8(%rsp)
movl %r12d, %esi
movl %r13d, %edx
movl %r14d, %ecx
callq 0x2282
leal (%r12,%r12), %esi
leal (%r14,%r13), %eax
movl %eax, %r15d
shrl $0x1f, %r15d
addl %eax, %r15d
sarl %r15d
movq 0x8(%rsp), %rdi
movl %r13d, %edx
movl %r15d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
callq 0x236a
movq %rax, %r13
shrq $0x20, %rax
movq %rax, 0x10(%rsp)
leal 0x1(,%r12,2), %esi
incl %r15d
movq 0x8(%rsp), %rdi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
callq 0x236a
movq %rax, %rcx
shrq $0x20, %rcx
cmpl %r13d, %eax
cmovll %eax, %r13d
movq 0x10(%rsp), %rax
cmpl %ecx, %eax
cmovgl %eax, %ecx
jmp 0x2452
movslq %r12d, %rax
movq 0x8(%rdi), %rcx
movq (%rcx,%rax,8), %r13
movq %r13, %rcx
shrq $0x20, %rcx
shlq $0x20, %rcx
movl %r13d, %eax
orq %rcx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/wichtounet[P]articles/src/threads/part3/timed_mutex.cpp
// Function: work()
void work(){
    std::chrono::milliseconds timeout(100);

    while(true){
        if(mutex.try_lock_for(timeout)){
            std::cout << std::this_thread::get_id() << ": do work with the mutex" << std::endl;

            std::chrono::milliseconds sleepDuration(250);
            std::this_thread::sleep_for(sleepDuration);

            mutex.unlock();

            std::this_thread::sleep_for(sleepDuration);
        } else {
            std::cout << std::this_thread::get_id() << ": do work without mutex" << std::endl;

            std::chrono::milliseconds sleepDuration(100);
            std::this_thread::sleep_for(sleepDuration);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x10(%rsp), %rbx
movq $0x64, (%rbx)
leaq 0x2e23(%rip), %r14      # 0x40e0
movq 0x2d14(%rip), %r13      # 0x3fd8
movq %rsp, %rbp
leaq 0xd4f(%rip), %r12       # 0x201d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1538
movl %eax, %r15d
callq 0x10c0
testb %r15b, %r15b
je 0x12fb
testq %rax, %rax
je 0x1317
movq %r13, %rdi
movq %rax, %rsi
callq 0x1080
movq %rax, %r15
jmp 0x132e
testq %rax, %rax
je 0x13d0
movq %r13, %rdi
movq %rax, %rsi
callq 0x1080
movq %rax, %r15
jmp 0x13e7
movl $0x24, %edx
movq %r13, %rdi
leaq 0xd0f(%rip), %rsi       # 0x2035
callq 0x1110
movq %r13, %r15
movl $0x18, %edx
movq %r15, %rdi
leaq 0xcc7(%rip), %rsi       # 0x2004
callq 0x1110
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
movq $0x0, (%rsp)
movq $0xee6b280, 0x8(%rsp)   # imm = 0xEE6B280
movq %rbp, %rdi
movq %rbp, %rsi
callq 0x1060
cmpl $-0x1, %eax
jne 0x1394
callq 0x1040
cmpl $0x4, (%rax)
je 0x137a
movq %r14, %rdi
callq 0x10a0
movq $0x0, (%rsp)
movq $0xee6b280, 0x8(%rsp)   # imm = 0xEE6B280
movq %rbp, %rdi
movq %rbp, %rsi
callq 0x1060
cmpl $-0x1, %eax
jne 0x12ce
callq 0x1040
cmpl $0x4, (%rax)
je 0x13ad
jmp 0x12ce
movl $0x24, %edx
movq %r13, %rdi
leaq 0xc56(%rip), %rsi       # 0x2035
callq 0x1110
movq %r13, %r15
movl $0x17, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1110
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1090
movq $0x0, (%rsp)
movq $0x5f5e100, 0x8(%rsp)   # imm = 0x5F5E100
movq %rbp, %rdi
movq %rbp, %rsi
callq 0x1060
cmpl $-0x1, %eax
jne 0x12ce
callq 0x1040
cmpl $0x4, (%rax)
je 0x142f
jmp 0x12ce
// File: /workspace/github_cpp_makefile_star2_O1/wichtounet[P]articles/src/threads/part3/timed_mutex.cpp
// Function: main
int main(){
    std::thread t1(work);
    std::thread t2(work);

    t1.join();
    t2.join();

    return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq -0x1c2(%rip), %rbx      # 0x129c
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x14be
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x14be
leaq 0x8(%rsp), %rdi
callq 0x1150
movq %rsp, %rdi
callq 0x1150
cmpq $0x0, (%rsp)
jne 0x14b8
cmpq $0x0, 0x8(%rsp)
jne 0x14b8
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
jmp 0x14a8
cmpq $0x0, (%rsp)
jne 0x14b8
cmpq $0x0, 0x8(%rsp)
jne 0x14b8
movq %rax, %rdi
callq 0x1160
callq 0x1050
nop
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/text_editor.cc
// Function: get_file(text_ed&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool get_file(text_ed & T, string cl) { //load file to be edited
 string filename;
 string::size_type start,end;
 start = cl.find_first_not_of(' ',1); //find start of filename substring starting after the 'g' command
 if (start == string::npos) { //if string not found return false
   return false;
 }
 end = cl.find(' ',start);
 if ( end == string::npos ) { //if end of filename substring cant be found, set it equal to the end of the string
   end = cl.size();
 }
 filename = cl.substr(start,end-start);
 return T.load_file(filename); //load the file 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movl $0x1, %edx
movq %rsi, %rdi
movl $0x20, %esi
callq 0x2120
cmpq $-0x1, %rax
je 0x2811
movq %rax, %r15
movq %r14, %rdi
movl $0x20, %esi
movq %rax, %rdx
callq 0x21a0
cmpq $-0x1, %rax
jne 0x2793
movq 0x8(%r14), %rax
subq %r15, %rax
leaq -0x80(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rax, %rcx
callq 0x2160
leaq -0x40(%rbp), %rdi
leaq -0x80(%rbp), %r14
movq %r14, %rsi
callq 0x2190
movq (%r14), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x27d0
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2140
leaq -0x50(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x5f86
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x66be
movl %eax, %ebx
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x2813
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2140
jmp 0x2813
xorl %ebx, %ebx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x2828
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2140
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x2856
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2140
jmp 0x2856
jmp 0x2853
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x286b
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/text_editor.cc
// Function: main
int main (int argc, char** argv) {
 bool toggle=true;  //initiate with line numbering on
 text_ed T;
 if (argc > 1) {
   if (!T.load_file(argv[1]))
     cerr << "Could not open file \"" << argv[1] << "\"." << endl;
 }
 bool keep_going;
 do {
   keep_going = Do_Command(T,toggle);
 } while (keep_going);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rsi, %rbx
movl %edi, %r14d
movb $0x1, -0x11(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x63b6
cmpl $0x1, %r14d
jle 0x5eed
movq 0x8(%rbx), %rsi
leaq -0x38(%rbp), %rdi
leaq -0x12(%rbp), %rdx
callq 0x5f48
leaq -0x78(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x66be
movl %eax, %r14d
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5e46
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2140
testb %r14b, %r14b
jne 0x5eed
movq 0x419a(%rip), %r14      # 0x9ff0
leaq 0x15f5(%rip), %rsi      # 0x7452
movl $0x15, %edx
movq %r14, %rdi
callq 0x2180
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x5e8f
movq %rbx, %rdi
callq 0x2090
movq 0x416e(%rip), %rdi      # 0x9ff0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2180
jmp 0x5ea7
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x2220
movq 0x4142(%rip), %rbx      # 0x9ff0
leaq 0x14e4(%rip), %rsi      # 0x7399
movl $0x2, %edx
movq %rbx, %rdi
callq 0x2180
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq 0x4110(%rip), %rdi      # 0x9ff0
callq 0x2040
movq %rax, %rdi
callq 0x20d0
leaq -0x78(%rbp), %rdi
leaq -0x11(%rbp), %rsi
callq 0x56dd
testb %al, %al
jne 0x5eed
leaq -0x78(%rbp), %rdi
callq 0x6596
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5f37
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2140
jmp 0x5f37
jmp 0x5f34
jmp 0x5f34
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x6596
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::copy_to_buffer(int, int)
bool text_ed::copy_to_buffer(int start, int end) {  // Copy lines start through end to the buffer.
  int buff_capacity=end-start+1;
  int i,j,k;
  buffer= new string [buff_capacity+1]; 
  for (i=start,j=0; i<=end; i++,j++) { //copy document contents into buffer
    buffer[j]=document[i];
  }
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
movl %edx, %eax
subl %esi, %eax
leal 0x2(%rax), %ecx
movslq %ecx, %r13
movq %r13, %r12
shlq $0x5, %r12
leaq 0x8(%r12), %rcx
cmpl $-0x2, %eax
movq $-0x1, %rdi
cmovgeq %rcx, %rdi
callq 0x2030
movq %r13, (%rax)
leaq 0x8(%rax), %rcx
testl %r13d, %r13d
je 0x6124
addq $0x18, %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %r12
jne 0x610b
movq %rcx, 0x8(%r14)
subl %r15d, %ebx
jl 0x6157
movslq %r15d, %r15
incl %ebx
shlq $0x5, %r15
xorl %r12d, %r12d
movq (%r14), %rsi
addq %r15, %rsi
addq %r12, %rsi
movq 0x8(%r14), %rdi
addq %r12, %rdi
callq 0x20b0
addq $0x20, %r12
decq %rbx
jne 0x6139
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::copy_to_document(int, int, int)
bool text_ed::copy_to_document(int start, int end, int location) { // Copy the entire buffer to the document starting at line start.
  int buff_capacity=end-start+1;
  int i,j;
  for (i=location+1,j=0; j<buff_capacity; i++,j++) {
    document[i]=buffer[j]; //copy buffer contents to document
  }
  delete [] buffer;
  buffer = NULL; //set buffer pointer to null so destructor function works properly
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rdi, %rbx
subl %esi, %r14d
jl 0x61b0
movslq %ecx, %r15
incl %r14d
shlq $0x5, %r15
addq $0x20, %r15
xorl %r12d, %r12d
movq 0x8(%rbx), %rsi
addq %r12, %rsi
movq (%rbx), %rdi
addq %r15, %rdi
addq %r12, %rdi
callq 0x20b0
addq $0x20, %r12
decq %r14
jne 0x6192
movq 0x8(%rbx), %r12
testq %r12, %r12
je 0x6205
leaq -0x8(%r12), %r14
movq -0x8(%r12), %r15
testq %r15, %r15
je 0x61f2
addq $-0x10, %r12
movq %r15, %r13
shlq $0x5, %r13
leaq (%r12,%r13), %rax
movq -0x10(%r12,%r13), %rdi
cmpq %rdi, %rax
je 0x61ec
movq (%rax), %rsi
incq %rsi
callq 0x2140
addq $-0x20, %r13
jne 0x61d3
shlq $0x5, %r15
orq $0x8, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x22a0
movq $0x0, 0x8(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::open_up(int, int)
bool text_ed::open_up(int start, int num_lines) { // Create num_lines empty lines following start.
 int space_left;
 int i;
 space_left = capacity-last_line;
 while (space_left <=num_lines) {
   expand_document();
   space_left = capacity - last_line;
 }
 for (i=last_line; i>start; i--) {
   document[i+num_lines] = document[i];
 }
 last_line += num_lines;
 return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
movl 0x18(%rdi), %eax
subl 0x10(%rdi), %eax
cmpl %edx, %eax
jg 0x6252
movq %r14, %rdi
callq 0x62a4
movl 0x18(%r14), %eax
subl 0x10(%r14), %eax
cmpl %ebx, %eax
jle 0x623e
movl %ebx, -0x2c(%rbp)
movslq 0x10(%r14), %rbx
cmpl %r15d, %ebx
jle 0x628b
movslq -0x2c(%rbp), %r13
movslq %r15d, %r15
shlq $0x5, %r13
movq %rbx, %r12
shlq $0x5, %r12
movq (%r14), %rsi
addq %r12, %rsi
leaq (%rsi,%r13), %rdi
callq 0x20b0
decq %rbx
addq $-0x20, %r12
cmpq %r15, %rbx
jg 0x6270
movl -0x2c(%rbp), %eax
addl %eax, 0x10(%r14)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::expand_document()
void text_ed::expand_document() { // Add more lines to the document array, e.g., double capacity.
 int i;
 capacity *= 2; //double document capacity
   string* temp = new string[capacity+1];
   for (i=0; i<capacity/2; i++) { //copy contents of document into temp
     temp[i]=document[i];
   }
   delete [] document; //delete contents of original document
   document = temp; //set document equal to temp contents of temp
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x18(%rdi), %eax
leal (%rax,%rax), %r14d
movl %r14d, 0x18(%rdi)
leal 0x1(,%rax,2), %ecx
movslq %ecx, %r15
movq %r15, %rcx
shlq $0x5, %rcx
orq $0x8, %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2030
movq %r15, (%rax)
leaq 0x8(%rax), %r12
addq $0x18, %rax
movslq %r14d, %rcx
shlq $0x5, %rcx
orq $0x20, %rcx
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %rcx
jne 0x62fd
cmpl $0x2, 0x18(%rbx)
jl 0x634c
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rsi
addq %r14, %rsi
leaq (%r12,%r14), %rdi
callq 0x20b0
incq %r15
movl 0x18(%rbx), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movslq %ecx, %rax
addq $0x20, %r14
cmpq %rax, %r15
jl 0x6322
movq (%rbx), %r13
testq %r13, %r13
je 0x63a3
leaq -0x8(%r13), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%r13), %r14
testq %r14, %r14
je 0x638f
addq $-0x10, %r13
movq %r14, %r15
shlq $0x5, %r15
leaq (%r15,%r13), %rax
movq -0x10(%r13,%r15), %rdi
cmpq %rdi, %rax
je 0x6389
movq (%rax), %rsi
incq %rsi
callq 0x2140
addq $-0x20, %r15
jne 0x6370
shlq $0x5, %r14
orq $0x8, %r14
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x22a0
movq %r12, (%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/craigbarstow[P]cmd-line-text-editor/document.cc
// Function: text_ed::text_ed()
text_ed::text_ed() { //constructor function
 capacity = DEFCAP;
 last_line = 0;
 document = new string[capacity+1];
 buffer = NULL;
 buffer_size = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x30(%rdi), %rax
movq %rax, 0x20(%rdi)
movq $0x0, 0x28(%rdi)
movb $0x0, 0x30(%rdi)
movl $0x5, 0x18(%rdi)
movl $0x0, 0x10(%rdi)
movl $0xc8, %edi
callq 0x2030
movq $0x6, (%rax)
movl $0x18, %ecx
leaq (%rax,%rcx), %rdx
movq %rdx, -0x10(%rax,%rcx)
movq $0x0, -0x8(%rax,%rcx)
movb $0x0, (%rax,%rcx)
addq $0x20, %rcx
cmpq $0xd8, %rcx
jne 0x63f7
addq $0x8, %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movl $0x0, 0x14(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop