LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/alu.cpp
// Function: ALU1::ALU1(Latch<std::tuple<Instruction, int, int>>*, Latch<std::tuple<Instruction, int>>*, bool*, ALU2*, ALU3*, Flusher*, int*, int*)
ALU1::ALU1(	Latch< std::tuple<Instruction, int, int> >* in, 
			Latch< std::tuple<Instruction, int> >* out, bool* b,
			ALU2 *a, ALU3* a3, Flusher *f, int* p, int* pa){
	this->in = in; this->out = out; this->b = b; this->a = a; this->f = f;
	this->predict = p; this->predict_addr = pa; this->a3 = a3;
	// store latencies of operations
	latencies[FUNCT["add"]] = LATENCY_ADD;
	latencies[FUNCT["sub"]] = LATENCY_SUB;
	latencies[0] = 1;
	// set stall cycles to zero
	stall_cycles = 0;
	read = true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r15
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x193dd(%rip), %rax     # 0x1cbb0
movq %rax, (%rdi)
addq $0x8, %rdi
callq 0x7c0a
leaq 0x80(%rbx), %rax
movq %rax, 0x20(%rsp)
leaq 0x88(%rbx), %rax
movl $0x0, 0x88(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x90(%rbx)
movq %rax, 0x98(%rbx)
movq %rax, 0xa0(%rbx)
movq %rcx, 0xa8(%rbx)
movq %r14, 0xc8(%rbx)
movq %rbp, 0xd0(%rbx)
movq %r13, 0xd8(%rbx)
movq %r12, 0xe0(%rbx)
movaps 0x60(%rsp), %xmm0
movups %xmm0, 0xf0(%rbx)
movq 0x70(%rsp), %rax
movq %rax, 0x100(%rbx)
movq %r15, 0xe8(%rbx)
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1379f(%rip), %rsi     # 0x17004
leaq 0x1379b(%rip), %rdx     # 0x17007
movq %rsp, %rdi
callq 0x5346
leaq 0x199c5(%rip), %rdi     # 0x1d240
movq %rsp, %rsi
movq 0x20(%rsp), %r15
callq 0x517a
movq %r15, %rdi
movq %rax, %rsi
callq 0x5116
movl $0x1, (%rax)
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x38af
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x1374c(%rip), %rsi     # 0x17008
leaq 0x13748(%rip), %rdx     # 0x1700b
callq 0x5346
leaq 0x19971(%rip), %rdi     # 0x1d240
movq %rsp, %rsi
callq 0x517a
movq %r15, %rdi
movq %rax, %rsi
callq 0x5116
movl $0x1, (%rax)
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x38fe
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rsp, %rsi
movl $0x0, (%rsi)
movq %r15, %rdi
callq 0x51f6
movl $0x1, (%rax)
movl $0x0, 0xb0(%rbx)
movb $0x1, 0xc0(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3939
jmp 0x3939
movq %rax, %r15
jmp 0x3959
jmp 0x3940
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3959
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x20(%rsp), %rdi
callq 0x5266
movq 0x58(%rbx), %rdi
addq $0x68, %rbx
cmpq %rbx, %rdi
je 0x397b
movq (%rbx), %rsi
incq %rsi
callq 0x3200
movq %r15, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/alu.cpp
// Function: ALU1::tock()
void ALU1::tock(void){
	if(stall_cycles > 0)
		stall_cycles--;
	else {
		if(i.is_valid()){
			if(out->valid()){
				read = false;	// previous data has not been read; stall
			}else{
				read = true;
				out->write(std::make_tuple(i, res));
				Instruction reset; i = reset;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movl 0xb0(%rdi), %eax
testl %eax, %eax
jle 0x4044
decl %eax
movl %eax, 0xb0(%rbx)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $-0x1, 0xc(%rbx)
je 0x4032
cmpl $-0x1, 0x8(%rbx)
je 0x4032
movq 0xd0(%rbx), %r13
cmpb $0x1, 0x80(%r13)
jne 0x406a
movb $0x0, 0xc0(%rbx)
jmp 0x4032
leaq 0x8(%rbx), %r14
movb $0x1, %al
movb %al, 0xc0(%rbx)
movl 0xbc(%rbx), %eax
leaq 0x10(%rsp), %r15
movl %eax, -0x8(%r15)
movl $0xa, %ecx
movq %r15, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x60(%rsp), %r12
leaq 0x70(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x52b6
movq 0x78(%rbx), %rax
movq %rax, 0x10(%rbp)
movb $0x1, %al
movb %al, 0x80(%r13)
leaq 0x8(%r13), %rdi
movl $0xa, %ecx
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%r13), %rdi
movq %r12, %rsi
callq 0x3140
leaq 0x58(%rbx), %r15
movq 0x80(%rsp), %rax
movq %rax, 0x78(%r13)
movl 0x8(%rsp), %eax
movl %eax, (%r13)
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x410f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7c0a
movl $0xa, %ecx
movq %r14, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%rsp), %rsi
movq %r15, %rdi
callq 0x3140
leaq 0x68(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x78(%rbx)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4032
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x4032
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4195
movq 0x68(%rsp), %rsi
jmp 0x418d
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4195
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/alu.cpp
// Function: ALU2::ALU2(Latch<std::tuple<Instruction, int, int>>*, Latch<std::tuple<Instruction, int, int>>*, bool*)
ALU2::ALU2(	Latch< std::tuple<Instruction, int, int> >* in, 
			Latch< std::tuple<Instruction, int, int> >* out, bool* b){
	this->in = in; this->out = out; this->b = b;
	// store latencies of operations
	latencies[FUNCT["add"]] = LATENCY_ADD;
	latencies[FUNCT["sub"]] = LATENCY_SUB;
	latencies[FUNCT["mult"]] = LATENCY_MULT;
	latencies[FUNCT["div"]] = LATENCY_DIV;
	// set stall cycles to zero
	stall_cycles = 0;
	read = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x18a1a(%rip), %rax     # 0x1cbd8
movq %rax, (%rdi)
addq $0x8, %rdi
callq 0x7c0a
leaq 0x80(%rbx), %r14
leaq 0x88(%rbx), %rax
movl $0x0, 0x88(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x90(%rbx)
movq %rax, 0x98(%rbx)
movq %rax, 0xa0(%rbx)
movq %rcx, 0xa8(%rbx)
movq %r13, 0xc8(%rbx)
movq %r12, 0xd0(%rbx)
movq %r15, 0xd8(%rbx)
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x12dde(%rip), %rsi     # 0x17004
leaq 0x12dda(%rip), %rdx     # 0x17007
movq %rsp, %rdi
callq 0x5346
leaq 0x19004(%rip), %rdi     # 0x1d240
movq %rsp, %rsi
callq 0x517a
movq %r14, %rdi
movq %rax, %rsi
callq 0x5116
movl $0x1, (%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x426b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x12d90(%rip), %rsi     # 0x17008
leaq 0x12d8c(%rip), %rdx     # 0x1700b
callq 0x5346
leaq 0x18fb5(%rip), %rdi     # 0x1d240
movq %rsp, %rsi
callq 0x517a
movq %r14, %rdi
movq %rax, %rsi
callq 0x5116
movl $0x1, (%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x42ba
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x12d4d(%rip), %rsi     # 0x17014
leaq 0x12d4a(%rip), %rdx     # 0x17018
callq 0x5346
leaq 0x18f66(%rip), %rdi     # 0x1d240
movq %rsp, %rsi
callq 0x517a
movq %r14, %rdi
movq %rax, %rsi
callq 0x5116
movl $0x6, (%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4309
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x12d03(%rip), %rsi     # 0x17019
leaq 0x12cff(%rip), %rdx     # 0x1701c
callq 0x5346
leaq 0x18f17(%rip), %rdi     # 0x1d240
movq %rsp, %rsi
callq 0x517a
movq %r14, %rdi
movq %rax, %rsi
callq 0x5116
movl $0x23, (%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4358
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movl $0x0, 0xb0(%rbx)
movb $0x1, 0xc4(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x437d
jmp 0x437d
jmp 0x437d
movq %rax, %r15
jmp 0x43a1
jmp 0x4388
jmp 0x4388
jmp 0x4388
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x43a1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %r14, %rdi
callq 0x5266
movq 0x58(%rbx), %rdi
addq $0x68, %rbx
cmpq %rbx, %rdi
je 0x43c1
movq (%rbx), %rsi
incq %rsi
callq 0x3200
movq %r15, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/alu.cpp
// Function: ALU2::operate()
void ALU2::operate(void){
	int funct = std::get<1>(i.type());
	if(funct == FUNCT["add"]){
		lo = in1 + in2; hi = 0;
	}else if(funct == FUNCT["sub"]){
		lo = in1 - in2; hi = 0;
	}else if(funct == FUNCT["mult"]){
		lo = (long)((long)in1 * (long)in2) % (long)pow(2, 32); 
		hi = (long)(((long)in1 * (long)in2) / (long)pow(2, 32)); 
	}else if(funct == FUNCT["div"]){
		lo = in1 % in2; hi = (long)(in1 / in2);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xac8c
movl (%r14), %ebp
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x12c09(%rip), %rsi     # 0x17004
leaq 0x12c05(%rip), %rdx     # 0x17007
leaq 0x8(%rsp), %rdi
callq 0x5346
leaq 0x18e2d(%rip), %rdi     # 0x1d240
leaq 0x8(%rsp), %rsi
callq 0x517a
movl (%rax), %r15d
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4437
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
cmpl %r15d, %ebp
jne 0x444a
movl 0xb8(%rbx), %eax
addl 0xb4(%rbx), %eax
jmp 0x44a1
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x12baf(%rip), %rsi     # 0x17008
leaq 0x12bab(%rip), %rdx     # 0x1700b
callq 0x5346
leaq 0x18dd4(%rip), %rdi     # 0x1d240
leaq 0x8(%rsp), %rsi
callq 0x517a
movl (%rax), %r15d
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4490
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
cmpl %r15d, %ebp
jne 0x44ba
movl 0xb4(%rbx), %eax
subl 0xb8(%rbx), %eax
movl %eax, 0xc0(%rbx)
xorl %eax, %eax
movl %eax, 0xbc(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x12b4b(%rip), %rsi     # 0x17014
leaq 0x12b48(%rip), %rdx     # 0x17018
callq 0x5346
leaq 0x18d64(%rip), %rdi     # 0x1d240
leaq 0x8(%rsp), %rsi
callq 0x517a
movl (%rax), %r15d
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4500
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
cmpl %r15d, %ebp
jne 0x4535
movslq 0xb4(%rbx), %rax
movslq 0xb8(%rbx), %rcx
imulq %rax, %rcx
movl %ecx, 0xc0(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq %rcx, %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
shrq $0x20, %rax
jmp 0x44a9
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x12ad5(%rip), %rsi     # 0x17019
leaq 0x12ad1(%rip), %rdx     # 0x1701c
callq 0x5346
leaq 0x18ce9(%rip), %rdi     # 0x1d240
leaq 0x8(%rsp), %rsi
callq 0x517a
movl (%rax), %r15d
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x457b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
cmpl %r15d, %ebp
jne 0x44af
movl 0xb4(%rbx), %eax
cltd
idivl 0xb8(%rbx)
movl %edx, 0xc0(%rbx)
jmp 0x44a9
jmp 0x45a8
jmp 0x45c4
jmp 0x45a8
jmp 0x45c4
jmp 0x45a8
jmp 0x45c4
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x45c7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x45c7
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/alu.cpp
// Function: ALU2::tock()
void ALU2::tock(void){
	if(stall_cycles > 0)
		stall_cycles--;
	else {
		if(i.is_valid()){
			if(out->valid()){
				read = false;	// previous data has not been read; stall
			}else{
				read = true;
				out->write(std::make_tuple(i, lo, hi));
				Instruction reset; i = reset;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movl 0xb0(%rdi), %eax
testl %eax, %eax
jle 0x48f0
decl %eax
movl %eax, 0xb0(%rbx)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $-0x1, 0xc(%rbx)
je 0x48de
cmpl $-0x1, 0x8(%rbx)
je 0x48de
movq 0xd0(%rbx), %r13
cmpb $0x1, 0x80(%r13)
jne 0x4916
movb $0x0, 0xc4(%rbx)
jmp 0x48de
leaq 0x8(%rbx), %r14
movb $0x1, %al
movb %al, 0xc4(%rbx)
movl 0xbc(%rbx), %eax
leaq 0x10(%rsp), %r15
movl %eax, -0x8(%r15)
movl 0xc0(%rbx), %eax
movl %eax, -0x4(%r15)
movl $0xa, %ecx
movq %r15, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x60(%rsp), %r12
leaq 0x70(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x52b6
movq 0x78(%rbx), %rax
movq %rax, 0x10(%rbp)
movb $0x1, %al
movb %al, 0x80(%r13)
leaq 0x8(%r13), %rdi
movl $0xa, %ecx
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%r13), %rdi
movq %r12, %rsi
callq 0x3140
leaq 0x58(%rbx), %r15
movq 0x80(%rsp), %rax
movq %rax, 0x78(%r13)
movl 0xc(%rsp), %eax
movl %eax, 0x4(%r13)
movl 0x8(%rsp), %eax
movl %eax, (%r13)
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x49cd
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7c0a
movl $0xa, %ecx
movq %r14, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%rsp), %rsi
movq %r15, %rdi
callq 0x3140
leaq 0x68(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x78(%rbx)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x48de
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x48de
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a53
movq 0x68(%rsp), %rsi
jmp 0x4a4b
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4a53
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/alu.cpp
// Function: ALU2::flush(int)
void ALU2::flush(int id){
	if(i.get_id() > id){
		Instruction reset;
		i = reset;
		stall_cycles = 0;
		read = true;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
cmpl %esi, 0x8(%rdi)
jle 0x4ad1
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x7c0a
movl $0xa, %ecx
movq %r14, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%rbx), %rdi
leaq 0x58(%rsp), %rsi
callq 0x3140
leaq 0x68(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x78(%rbx)
movl $0x0, 0xb0(%rbx)
movb $0x1, 0xc4(%rbx)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4ad1
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3200
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4afc
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3340
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/alu.cpp
// Function: ALU3::ALU3(Latch<std::tuple<Instruction, int, int>>*, Latch<std::tuple<Instruction, int>>*, bool*)
ALU3::ALU3(	Latch< std::tuple<Instruction, int, int> >* in, 
			Latch< std::tuple<Instruction, int> >* out, bool* b){
	this->in = in; this->out = out; this->b = b;
	// store latencies of operations
	latencies[FUNCT["add"]] = LATENCY_ADD;
	latencies[FUNCT["sw"]] = LATENCY_SW;
	// set stall cycles to zero
	stall_cycles = 0;
	read = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x180dc(%rip), %rax     # 0x1cc00
movq %rax, (%rdi)
addq $0x8, %rdi
callq 0x7c0a
leaq 0x80(%rbx), %r14
leaq 0x88(%rbx), %rax
movl $0x0, 0x88(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x90(%rbx)
movq %rax, 0x98(%rbx)
movq %rax, 0xa0(%rbx)
movq %rcx, 0xa8(%rbx)
movq %r13, 0xc8(%rbx)
movq %r12, 0xd0(%rbx)
movq %r15, 0xd8(%rbx)
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x12478(%rip), %rsi     # 0x17004
leaq 0x12474(%rip), %rdx     # 0x17007
movq %rsp, %rdi
callq 0x5346
leaq 0x1869e(%rip), %rdi     # 0x1d240
movq %rsp, %rsi
callq 0x517a
movq %r14, %rdi
movq %rax, %rsi
callq 0x5116
movl $0x1, (%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4bd1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x1243f(%rip), %rsi     # 0x1701d
leaq 0x1243a(%rip), %rdx     # 0x1701f
callq 0x5346
leaq 0x1864f(%rip), %rdi     # 0x1d240
movq %rsp, %rsi
callq 0x517a
movq %r14, %rdi
movq %rax, %rsi
callq 0x5116
movl $0x1, (%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4c20
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movl $0x0, 0xb0(%rbx)
movb $0x1, 0xc0(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x4c41
movq %rax, %r15
jmp 0x4c61
jmp 0x4c48
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4c61
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
movq %r14, %rdi
callq 0x5266
movq 0x58(%rbx), %rdi
addq $0x68, %rbx
cmpq %rbx, %rdi
je 0x4c81
movq (%rbx), %rsi
incq %rsi
callq 0x3200
movq %r15, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/alu.cpp
// Function: ALU3::tick()
void ALU3::tick(void){
	if(in->valid() && read){
		auto inp = in->read();
		in->write(inp);
		i = std::get<0>(inp);
		if(i.is_valid())
			read = false;
		in1 = std::get<1>(inp);
		in2 = std::get<2>(inp);
		i.EXEC = CLOCK;
		i.RF2 = CLOCK + 1;
		if(i.is_valid() && latencies[std::get<1>(i.type())] == 1){
			res = in1 + in2;
			in->read();
		}
		else{
			stall_cycles = latencies[std::get<1>(i.type())] - 1;	
		}
	} 
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq 0xc8(%rdi), %r13
cmpb $0x1, 0x80(%r13)
jne 0x4eb5
movq %rdi, %rbx
cmpb $0x1, 0xc0(%rdi)
jne 0x4eb5
movb $0x0, 0x80(%r13)
movq (%r13), %rax
leaq 0x18(%rsp), %r15
movq %rax, -0x8(%r15)
leaq 0x8(%r13), %rsi
movl $0xa, %ecx
movq %r15, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x68(%rsp), %r14
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x58(%r13), %rsi
movq 0x60(%r13), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x52b6
movq 0x78(%r13), %rax
movq %rax, 0x10(%r12)
movq 0xc8(%rbx), %r13
movb $0x1, 0x80(%r13)
leaq 0x8(%r13), %rdi
movl $0xa, %ecx
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%r13), %rdi
movq %r14, %rsi
callq 0x3140
leaq 0x68(%rsp), %rax
movq 0x20(%rax), %rcx
movq %rcx, 0x78(%r13)
movl -0x54(%rax), %ecx
movl %ecx, 0x4(%r13)
movl -0x58(%rax), %ecx
movl %ecx, (%r13)
leaq 0x8(%rbx), %r14
movl $0xa, %ecx
movq %r14, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%rbx), %rdi
movq %rax, %rsi
callq 0x3140
movq 0x88(%rsp), %rax
movq %rax, 0x78(%rbx)
cmpl $-0x1, 0xc(%rbx)
setne %cl
cmpl $-0x1, 0x8(%rbx)
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0x4d98
movb $0x0, 0xc0(%rbx)
movl 0x14(%rsp), %ecx
movl %ecx, 0xb4(%rbx)
movl 0x10(%rsp), %ecx
movl %ecx, 0xb8(%rbx)
leaq 0x18451(%rip), %rcx     # 0x1d204
movl (%rcx), %ecx
movl %ecx, 0x48(%rbx)
incl %ecx
movl %ecx, 0x4c(%rbx)
testb %al, %al
je 0x4e76
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0xac8c
leaq 0x80(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x51f6
cmpl $0x1, (%rax)
jne 0x4e76
movl 0xb8(%rbx), %eax
addl 0xb4(%rbx), %eax
movl %eax, 0xbc(%rbx)
movq 0xc8(%rbx), %rbx
movb $0x0, 0x80(%rbx)
movq (%rbx), %rax
leaq 0x98(%rsp), %rdi
movq %rax, -0x8(%rdi)
leaq 0x8(%rbx), %rsi
movl $0xa, %ecx
rep  movsq (%rsi), %es:(%rdi)
leaq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdx
addq %rsi, %rdx
callq 0x52b6
movq 0x78(%rbx), %rax
movq %rax, 0x108(%rsp)
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4e9e
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x4e9e
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0xac8c
leaq 0x80(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x51f6
movl (%rax), %eax
decl %eax
movl %eax, 0xb0(%rbx)
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x4eb5
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3200
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x4eca
jmp 0x4eca
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x4ee4
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3340
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/alu.cpp
// Function: ALU3::flush(int)
void ALU3::flush(int id){
	if(i.get_id() > id){
		Instruction reset;
		i = reset;
		stall_cycles = 0;
		read = true;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
cmpl %esi, 0x8(%rdi)
jle 0x50e3
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x7c0a
movl $0xa, %ecx
movq %r14, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%rbx), %rdi
leaq 0x58(%rsp), %rsi
callq 0x3140
leaq 0x68(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x78(%rbx)
movl $0x0, 0xb0(%rbx)
movb $0x1, 0xc0(%rbx)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x50e3
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3200
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x510e
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3340
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/decoder.cpp
// Function: Decoder::Decoder(std::deque<Instruction, std::allocator<Instruction>>*, FreeList*, ActiveList*, int*, bool*, IntegerQueue*, AddressQueue*, int*, int*, Fetcher*)
Decoder::Decoder(Buffer<Instruction>* d, FreeList *f, ActiveList *a, int *r, 
				bool *b, IntegerQueue *iq, AddressQueue *aq, int *p, int *pa,
				Fetcher *ft){
	this->d = d; this->f = f; this->a = a;
	this->r = r; this->b = b; this->iq = iq;
	this->aq = aq; this->predict = p; this->predict_addr = pa;
	this->ft = ft;
	decode_signal = true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
leaq 0x1728c(%rip), %rax     # 0x1cc80
movq %rax, (%rdi)
addq $0x8, %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbp)
movups %xmm0, 0x18(%rbp)
movups %xmm0, 0x28(%rbp)
movups %xmm0, 0x38(%rbp)
movups %xmm0, 0x48(%rbp)
xorl %esi, %esi
callq 0x6538
movq %r13, 0x58(%rbp)
movq %r12, 0x60(%rbp)
movq %r15, 0x68(%rbp)
movq %r14, 0x70(%rbp)
movq %rbx, 0x78(%rbp)
movaps 0x40(%rsp), %xmm0
movups %xmm0, 0x80(%rbp)
movaps 0x50(%rsp), %xmm0
movups %xmm0, 0x98(%rbp)
movq 0x60(%rsp), %rax
movq %rax, 0xa8(%rbp)
movb $0x1, 0x90(%rbp)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/decoder.cpp
// Function: Decoder::flush(int)
void Decoder::flush(int id){
	// clean eveerything, no check needed
	_q.clear();
	d->clear();
	a->flush(id);
	iq->flush(id);
	aq->flush(id);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
addq $0x8, %rdi
callq 0x64fe
movq 0x58(%r14), %rdi
callq 0x64fe
movq 0x68(%r14), %rdi
movl %ebx, %esi
callq 0xd04a
movq 0x80(%r14), %rdi
movl %ebx, %esi
callq 0x1345c
movq 0x88(%r14), %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x14aee
nop
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/fetcher.cpp
// Function: Fetcher::tock()
void Fetcher::tock(void){
	for(int i = 0; i < INSTR_FETCHED_PER_CYCLE; ++i){
		if((unsigned int)_PC < cache->size() && (*cache)[_PC].is_valid() && dest->size() < FETCH_QUEUE_SIZE){
			Instruction temp = (*cache)[_PC++];
			temp.IF = CLOCK;
			dest->push_back(temp);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
movabsq $-0x4000000000000000, %r10 # imm = 0xC000000000000000
movl $0x1, %r14d
leaq 0x60(%rsp), %r15
movabsq $-0x1111111111111111, %r13 # imm = 0xEEEEEEEEEEEEEEEF
movl 0x8(%rbx), %ecx
movq 0x10(%rbx), %rax
movq 0x48(%rax), %rsi
movq 0x28(%rax), %rdx
movq %rsi, %rdi
subq %rdx, %rdi
sarq $0x3, %rdi
cmpq $0x1, %rsi
adcq $-0x1, %rdi
movq 0x30(%rax), %rsi
subq 0x38(%rax), %rsi
sarq $0x3, %rsi
imulq %r13, %rsi
leaq (%rsi,%rdi,4), %rdi
movq 0x10(%rax), %rsi
movq 0x20(%rax), %r8
subq %rsi, %r8
sarq $0x3, %r8
imulq %r13, %r8
addq %rdi, %r8
cmpq %rcx, %r8
jbe 0x7613
movslq %ecx, %rcx
movq %rsi, %rdi
subq 0x18(%rax), %rdi
sarq $0x3, %rdi
imulq %r13, %rdi
addq %rcx, %rdi
cmpq $0x3, %rdi
ja 0x74c6
imulq $0x78, %rcx, %rdx
addq %rdx, %rsi
jmp 0x74ed
movq %rdi, %rsi
shrq $0x2, %rsi
movq %rsi, %r8
orq %r10, %r8
testq %rdi, %rdi
cmovgq %rsi, %r8
leaq (,%r8,4), %rsi
subq %rsi, %rdi
imulq $0x78, %rdi, %rsi
addq (%rdx,%r8,8), %rsi
cmpl $-0x1, 0x4(%rsi)
je 0x7613
cmpl $-0x1, (%rsi)
je 0x7613
movq 0x18(%rbx), %rdx
movq 0x48(%rdx), %rsi
movq %rsi, %rdi
subq 0x28(%rdx), %rdi
sarq $0x3, %rdi
cmpq $0x1, %rsi
adcq $-0x1, %rdi
movq 0x20(%rdx), %rsi
movq 0x30(%rdx), %r8
subq 0x38(%rdx), %r8
sarq $0x3, %r8
imulq %r13, %r8
leaq (%r8,%rdi,4), %rdi
subq 0x10(%rdx), %rsi
sarq $0x3, %rsi
imulq %r13, %rsi
addq %rdi, %rsi
cmpq $0x1f, %rsi
ja 0x7613
leal 0x1(%rcx), %edx
movl %edx, 0x8(%rbx)
movq 0x10(%rax), %r12
movq %r12, %rdx
subq 0x18(%rax), %rdx
sarq $0x3, %rdx
imulq %r13, %rdx
addq %rcx, %rdx
cmpq $0x3, %rdx
ja 0x7577
imulq $0x78, %rcx, %rax
addq %rax, %r12
jmp 0x75a2
movq 0x28(%rax), %rax
movq %rdx, %rcx
shrq $0x2, %rcx
movq %rcx, %rsi
orq %r10, %rsi
testq %rdx, %rdx
cmovgq %rcx, %rsi
leaq (,%rsi,4), %rcx
subq %rcx, %rdx
imulq $0x78, %rdx, %r12
addq (%rax,%rsi,8), %r12
movl $0xa, %ecx
movq %rsp, %rbp
movq %rbp, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r15, 0x50(%rsp)
movq 0x50(%r12), %rsi
movq 0x58(%r12), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x52b6
movq 0x70(%r12), %rax
movq %rax, 0x70(%rsp)
leaq 0x15c24(%rip), %rax     # 0x1d204
movl (%rax), %eax
movl %eax, 0x34(%rsp)
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
callq 0x6456
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x7609
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x3200
movabsq $-0x4000000000000000, %r10 # imm = 0xC000000000000000
decl %r14d
je 0x744e
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x7645
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/flusher.cpp
// Function: Flusher::Flusher(Issuer*, Fetcher*, Decoder*, Writer*)
Flusher::Flusher(Issuer *is, Fetcher *f, Decoder *d, Writer *w){
	this->is = is;
	this->f = f;
	this->d = d;
	this->w = w;
}

// Assembly:
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq %r8, 0x18(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/flusher.cpp
// Function: Flusher::flush(int, int)
void Flusher::flush(int id, int PC){
	is->flush(id);
	d->flush(id);
	f->update_PC(PC);
	w->flush(id);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x10(%r14), %rdi
movq (%rdi), %rax
movl %ebp, %esi
callq *0x10(%rax)
movq 0x8(%r14), %rdi
movl %ebx, %esi
callq 0x764e
movq 0x18(%r14), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
nop
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/instruction.cpp
// Function: Instruction::map(std::tuple<int, int, int, int>)
void Instruction::map(std::tuple<int, int, int, int> t){
	rt_ = std::get<1>(t);
	rd_ = std::get<2>(t);
	_rd = std::get<3>(t);
	rs_ = std::get<0>(t);
}

// Assembly:
movl 0x8(%rsi), %eax
movl %eax, 0x18(%rdi)
movl 0x4(%rsi), %eax
movl %eax, 0x1c(%rdi)
movl (%rsi), %eax
movl %eax, 0x20(%rdi)
movl 0xc(%rsi), %eax
movl %eax, 0x14(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/issuer.cpp
// Function: Issuer::attach_latch(int, Latch<std::tuple<Instruction, int, int>>*, int)
void Issuer::attach_latch(int idx, Latch< std::tuple<Instruction, int, int> > *l,int type){
	this->l[idx] = l;
	if(type == 2)
		addrescal_latch =idx;
	if(type == 3)
		memory_latch = idx;
}

// Assembly:
movslq %esi, %rax
movq %rdx, 0x1e8(%rdi,%rax,8)
cmpl $0x3, %ecx
je 0xb03e
cmpl $0x2, %ecx
jne 0xb044
movl %esi, 0x220(%rdi)
retq
movl %esi, 0x224(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/lists.cpp
// Function: ActiveList::graduate(Instruction&)
void ActiveList::graduate(Instruction& instr){
	for(auto& p : _q){
		if(p.first.get_id() == instr.get_id()){
			p.second = true;
			// update the clock times
			p.first.IF = instr.IF;
			p.first.DE = instr.DE;
			p.first.RF1 = instr.RF1;
			p.first.EXEC = instr.EXEC;
			p.first.RF2 = instr.RF2;
			p.first.MEM = instr.MEM;
			p.first.WB = instr.WB;
			break;
		}
	}

	while(!_q.empty() && _q.front().second){
		Instruction temp = _q.front().first;
		std::tuple<int, int, int, int> t = temp.physical_regs();
		if(std::get<3>(t) != -1){
			f->add(std::get<3>(t));
		}
		o->push_back(temp);
		_q.pop_front();
		if(_q.empty())
			terminate = true;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq 0x30(%rdi), %rcx
cmpq %rcx, %rax
je 0xcf50
movq 0x20(%rbx), %r8
movq 0x28(%rbx), %rdx
movl (%rsi), %edi
cmpl %edi, (%rax)
je 0xcf22
subq $-0x80, %rax
cmpq %r8, %rax
jne 0xcf1b
movq 0x8(%rdx), %rax
addq $0x8, %rdx
leaq 0x200(%rax), %r8
cmpq %rcx, %rax
jne 0xceff
jmp 0xcf50
movb $0x1, 0x78(%rax)
movl 0x34(%rsi), %ecx
movl %ecx, 0x34(%rax)
movl 0x38(%rsi), %ecx
movl %ecx, 0x38(%rax)
movl 0x3c(%rsi), %ecx
movl %ecx, 0x3c(%rax)
movl 0x40(%rsi), %ecx
movl %ecx, 0x40(%rax)
movl 0x44(%rsi), %ecx
movl %ecx, 0x44(%rax)
movl 0x48(%rsi), %ecx
movl %ecx, 0x48(%rax)
movl 0x4c(%rsi), %ecx
movl %ecx, 0x4c(%rax)
movq 0x10(%rbx), %r13
cmpq %r13, 0x30(%rbx)
je 0xd016
leaq 0x60(%rsp), %r14
leaq 0x70(%rsp), %rbp
leaq 0x10(%rsp), %r15
movq %rsp, %r12
cmpb $0x1, 0x78(%r13)
jne 0xd016
movl $0xa, %ecx
movq %r15, %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rbp, 0x60(%rsp)
movq 0x50(%r13), %rsi
movq 0x58(%r13), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x52b6
movq 0x70(%r13), %rax
movq %rax, 0x80(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xac5a
movl (%rsp), %esi
cmpl $-0x1, %esi
je 0xcfc9
movq 0x58(%rbx), %rdi
callq 0xbc6c
movq 0x50(%rbx), %rdi
movq %r15, %rsi
callq 0x6456
movq %rbx, %rdi
callq 0xd27c
movq 0x30(%rbx), %rax
cmpq 0x10(%rbx), %rax
jne 0xcff1
leaq 0x1021a(%rip), %rax     # 0x1d208
movb $0x1, (%rax)
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd008
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x10(%rbx), %r13
cmpq %r13, 0x30(%rbx)
jne 0xcf70
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd042
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3340
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/main.cpp
// Function: print_mem(int*)
void print_mem(int *d){
	std::cout << "Memory (D-cache)\n";
	for(int j=0; j<4; ++j){
		std::cout << "\033[0;36m     Index     Value\033[0m";
	}
	std::cout << "\n";
	for(int i=0; i < DCACHE_SIZE/4; ++i){
		for(int j=0; j < 4; ++j){
				std::cout << "\033[1;36m" <<
				std::setfill(' ') << std::setw(10) << j*DCACHE_SIZE/4 + i << "\033[0m" <<
				std::setfill(' ') << std::setw(10) << *(d + j*DCACHE_SIZE/4 + i);
		}
		std::cout << std::endl;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xe131(%rip), %r14      # 0x1cfd8
leaq 0x84b2(%rip), %rsi      # 0x17360
movl $0x11, %edx
movq %r14, %rdi
callq 0x3240
movl $0x4, %ebp
leaq 0x84ab(%rip), %r15      # 0x17372
movl $0x1f, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3240
decl %ebp
jne 0xeec7
leaq 0x848e(%rip), %rsi      # 0x17370
movl $0x1, %edx
movq %r14, %rdi
callq 0x3240
xorl %r15d, %r15d
xorl %r12d, %r12d
movl $0x7, %edx
movq %r14, %rdi
leaq 0x8454(%rip), %rsi      # 0x17358
callq 0x3240
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r13
cmpb $0x0, 0xe1(%r14,%rax)
jne 0xef3b
movq %r13, %rdi
movl $0x20, %esi
callq 0x31e0
movb %al, 0xe0(%r13)
movb $0x1, 0xe1(%r13)
movb $0x20, 0xe0(%r13)
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0xa, 0x10(%r14,%rax)
leal (%r15,%r12), %esi
movq %r14, %rdi
callq 0x3330
movq %rax, %r13
movl $0x4, %edx
movq %rax, %rdi
leaq 0x84b1(%rip), %rsi      # 0x17422
callq 0x3240
movq (%r13), %rax
movq -0x18(%rax), %rax
leaq (%rax,%r13), %rbp
cmpb $0x0, 0xe1(%r13,%rax)
jne 0xefa7
movq %rbp, %rdi
movl $0x20, %esi
callq 0x31e0
movb %al, 0xe0(%rbp)
movb $0x1, 0xe1(%rbp)
movb $0x20, 0xe0(%rbp)
movq (%r13), %rax
movq -0x18(%rax), %rax
movq $0xa, 0x10(%r13,%rax)
movl (%rbx,%r12,4), %esi
movq %r13, %rdi
callq 0x3330
addq $0x19, %r12
cmpq $0x64, %r12
jne 0xeef5
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3180
incq %r15
addq $0x4, %rbx
cmpq $0x19, %r15
jne 0xeef2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/mem.cpp
// Function: MEM::tick()
void MEM::tick(){
	if(in->valid() && read){
		auto inp = in->read();
		i = std::get<0>(inp);
		in1 = std::get<1>(inp);
		in2 = std::get<2>(inp);
		i.MEM = CLOCK;
	    //std::cout<<CLOCK<<std::endl;
        if(i.is_valid()){
			if(std::get<0>(i.type()) == OPCODE["sw"]){
				DCache[in1] = in2;
				// std::cout<<i.text<<std::endl;
			}
			else{
				res = DCache[in1];
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq 0x80(%rdi), %r14
cmpb $0x1, 0x80(%r14)
jne 0x123a1
movq %rdi, %rbx
cmpb $0x1, 0xb0(%rdi)
jne 0x123a1
movb $0x0, 0x80(%r14)
movq (%r14), %rax
leaq 0x30(%rsp), %r15
movq %rax, -0x8(%r15)
leaq 0x8(%r14), %rsi
movl $0xa, %ecx
movq %r15, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x80(%rsp), %r12
leaq 0x90(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x58(%r14), %rsi
movq 0x60(%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x52b6
movq 0x78(%r14), %rax
movq %rax, 0x10(%r13)
leaq 0x8(%rbx), %r14
movl $0xa, %ecx
movq %r14, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%rbx), %rdi
movq %r12, %rsi
callq 0x3140
movq 0xa0(%rsp), %rax
movq %rax, 0x78(%rbx)
movl 0x2c(%rsp), %eax
movl %eax, 0xa4(%rbx)
movl 0x28(%rsp), %eax
movl %eax, 0xa8(%rbx)
leaq 0xaf29(%rip), %rax      # 0x1d204
movl (%rax), %eax
movl %eax, 0x50(%rbx)
cmpl $-0x1, 0xc(%rbx)
je 0x12384
cmpl $-0x1, 0x8(%rbx)
je 0x12384
movq %rsp, %rdi
movq %r14, %rsi
callq 0xac8c
movl 0x4(%rsp), %ebp
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x4d0a(%rip), %rsi      # 0x1701d
leaq 0x4d05(%rip), %rdx      # 0x1701f
leaq 0x8(%rsp), %rdi
callq 0x5346
leaq 0xaee5(%rip), %rdi      # 0x1d210
leaq 0x8(%rsp), %rsi
callq 0x517a
movl (%rax), %r15d
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1234f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
cmpl %r15d, %ebp
jne 0x1236d
movl 0xa8(%rbx), %eax
movq 0x98(%rbx), %rcx
movslq 0xa4(%rbx), %rdx
movl %eax, (%rcx,%rdx,4)
jmp 0x12384
movq 0x98(%rbx), %rax
movslq 0xa4(%rbx), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0xac(%rbx)
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0x123a1
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3200
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x123d6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x123d6
jmp 0x123d3
jmp 0x123d3
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0x123f3
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/mem.cpp
// Function: MEM::tock()
void MEM::tock(){
	if(i.is_valid()){
		if(out->valid()){
			read = false;	// previous data has not been read; stall
		}else{
			read = true;
			out->write(std::make_tuple(i,res));
			Instruction reset; i = reset;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
cmpl $-0x1, 0xc(%rdi)
je 0x12531
movq %rdi, %rbx
cmpl $-0x1, 0x8(%rdi)
je 0x12531
movq 0x88(%rbx), %r13
cmpb $0x1, 0x80(%r13)
jne 0x12441
movb $0x0, 0xb0(%rbx)
jmp 0x12531
leaq 0x8(%rbx), %r14
movb $0x1, %al
movb %al, 0xb0(%rbx)
movl 0xac(%rbx), %eax
leaq 0x10(%rsp), %r15
movl %eax, -0x8(%r15)
movl $0xa, %ecx
movq %r15, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x60(%rsp), %r12
leaq 0x70(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x58(%rbx), %rsi
movq 0x60(%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x52b6
movq 0x78(%rbx), %rax
movq %rax, 0x10(%rbp)
movb $0x1, %al
movb %al, 0x80(%r13)
leaq 0x8(%r13), %rdi
movl $0xa, %ecx
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%r13), %rdi
movq %r12, %rsi
callq 0x3140
leaq 0x58(%rbx), %r15
movq 0x80(%rsp), %rax
movq %rax, 0x78(%r13)
movl 0x8(%rsp), %eax
movl %eax, (%r13)
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x124e6
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7c0a
movl $0xa, %ecx
movq %r14, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%rsp), %rsi
movq %r15, %rdi
callq 0x3140
leaq 0x68(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x78(%rbx)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12531
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3200
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12575
movq 0x68(%rsp), %rsi
jmp 0x1256d
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x12575
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3340
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/queues.cpp
// Function: IntegerQueue::flush(int)
void IntegerQueue::flush(int id){
	size_t i=0;
	while(i < _q.size()){
		if(_q[i].get_id() > id){
			_q.erase(_q.begin() + i);
		}else{
			i++;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebx
movq %rdi, %r14
xorl %ebp, %ebp
movabsq $-0x1111111111111111, %r13 # imm = 0xEEEEEEEEEEEEEEEF
leaq 0x8(%rsp), %r12
imulq $0x78, %rbp, %r15
movq 0x48(%r14), %rcx
movq 0x28(%r14), %rax
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
movq 0x30(%r14), %rcx
subq 0x38(%r14), %rcx
sarq $0x3, %rcx
imulq %r13, %rcx
leaq (%rcx,%rdx,4), %rdx
movq 0x10(%r14), %rcx
movq 0x20(%r14), %rsi
subq %rcx, %rsi
sarq $0x3, %rsi
imulq %r13, %rsi
addq %rdx, %rsi
cmpq %rsi, %rbp
jae 0x1359d
movq %rcx, %rdx
subq 0x18(%r14), %rdx
sarq $0x3, %rdx
imulq %r13, %rdx
addq %rbp, %rdx
cmpq $0x3, %rdx
ja 0x134ef
leaq (%rcx,%r15), %rsi
jmp 0x13523
movq %rdx, %rsi
shrq $0x2, %rsi
movq %rsi, %rdi
movabsq $-0x4000000000000000, %r8 # imm = 0xC000000000000000
orq %r8, %rdi
testq %rdx, %rdx
cmovgq %rsi, %rdi
leaq (,%rdi,4), %rsi
movq %rdx, %r8
subq %rsi, %r8
imulq $0x78, %r8, %rsi
addq (%rax,%rdi,8), %rsi
cmpl %ebx, (%rsi)
jle 0x13595
cmpq $0x3, %rdx
ja 0x13532
addq %r15, %rcx
jmp 0x13562
movq %rdx, %rcx
shrq $0x2, %rcx
movq %rcx, %rsi
movabsq $-0x4000000000000000, %rdi # imm = 0xC000000000000000
orq %rdi, %rsi
testq %rdx, %rdx
cmovgq %rcx, %rsi
leaq (%rax,%rsi,8), %rax
shlq $0x2, %rsi
subq %rsi, %rdx
imulq $0x78, %rdx, %rcx
addq (%rax), %rcx
movq %rcx, 0x8(%rsp)
movq (%rax), %rcx
movq %rcx, 0x10(%rsp)
addq $0x1e0, %rcx            # imm = 0x1E0
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x6a0a
jmp 0x13484
incq %rbp
jmp 0x13480
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/queues.cpp
// Function: AddressQueue::add(Instruction)
int AddressQueue::add(Instruction instr){
	if(_q.size() < ADDR_QUEUE_SIZE){
		_q.push_back(instr);
		_addr.push_back(-2);
		return 0;
	}else{
		return -1;
	}
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x48(%rdi), %rax
movq %rax, %rcx
subq 0x28(%rdi), %rcx
sarq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
movq 0x30(%rdi), %rax
subq 0x38(%rdi), %rax
movq 0x20(%rdi), %rdx
sarq $0x3, %rax
movabsq $-0x1111111111111111, %rdi # imm = 0xEEEEEEEEEEEEEEEF
imulq %rdi, %rax
leaq (%rax,%rcx,4), %rax
subq 0x10(%rbx), %rdx
sarq $0x3, %rdx
imulq %rdi, %rdx
addq %rax, %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0xf, %rdx
ja 0x136a0
movq %rbx, %rdi
callq 0x6456
addq $0x58, %rbx
leaq 0xc(%rsp), %rsi
movl $0xfffffffe, (%rsi)     # imm = 0xFFFFFFFE
movq %rbx, %rdi
callq 0x14e40
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/queues.cpp
// Function: AddressQueue::no_notcalculated_branch_above(Instruction)
bool AddressQueue::no_notcalculated_branch_above(Instruction i){

	for(Buffer< std::pair<Instruction, bool> >::iterator it = al->_q.begin(); it->first.get_id()!=i.get_id() ; ++it){
			if(std::get<0>(it->first.type())==OPCODE["beq"]||std::get<0>(it->first.type())==OPCODE["bne"])
				if(!it->second){
					return 0;
				}
		}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq 0xa8(%rdi), %rax
movq 0x10(%rax), %r14
movl (%r14), %ecx
movq %rsi, 0x60(%rsp)
cmpl (%rsi), %ecx
sete 0xf(%rsp)
je 0x14650
movq 0x20(%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x28(%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0x20(%rsp), %r13
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0xac8c
movl 0x74(%rsp), %ebp
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2ab1(%rip), %rsi      # 0x1700c
leaq 0x2aad(%rip), %rdx      # 0x1700f
callq 0x5346
leaq 0x8ca2(%rip), %rdi      # 0x1d210
movq %rbx, %rsi
callq 0x517a
movl (%rax), %ebx
movb $0x1, %r15b
cmpl %ebx, %ebp
je 0x145ca
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0xac8c
movl 0x6c(%rsp), %r15d
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %r13, %r12
movq %r13, %rdi
leaq 0x2a68(%rip), %rsi      # 0x17010
leaq 0x2a64(%rip), %rdx      # 0x17013
callq 0x5346
leaq 0x8c55(%rip), %rdi      # 0x1d210
movq %r12, %rsi
callq 0x517a
cmpl (%rax), %r15d
sete %r15b
cmpl %ebx, %ebp
je 0x145ea
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x145ea
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x14606
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3200
testb %r15b, %r15b
je 0x14612
cmpb $0x0, 0x78(%r14)
je 0x14650
subq $-0x80, %r14
cmpq 0x18(%rsp), %r14
jne 0x1463b
movq 0x10(%rsp), %rax
movq 0x8(%rax), %r14
addq $0x8, %rax
movq %rax, 0x10(%rsp)
leaq 0x200(%r14), %rax
movq %rax, 0x18(%rsp)
movl (%r14), %eax
movq 0x60(%rsp), %rcx
cmpl (%rcx), %eax
sete 0xf(%rsp)
jne 0x14531
movb 0xf(%rsp), %al
andb $0x1, %al
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x1468d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x1468d
jmp 0x1468a
jmp 0x1468a
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x146a9
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3200
movq %rbx, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O1/ys1998[P]spsim/src/queues.cpp
// Function: AddressQueue::flush(int)
void AddressQueue::flush(int id){
	size_t i=0;
	while(i < _q.size()){
		if(_q[i].get_id() > id){
			_q.erase(_q.begin() + i);
			_addr.erase(_addr.begin() + i);
		}else{
			i++;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x58(%rdi), %rax
movq %rax, 0x20(%rsp)
xorl %ebp, %ebp
movabsq $-0x1111111111111111, %r15 # imm = 0xEEEEEEEEEEEEEEEF
movq %rsp, %r13
imulq $0x78, %rbp, %r12
movq 0x48(%r14), %rcx
movq 0x28(%r14), %rax
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
movq 0x30(%r14), %rcx
subq 0x38(%r14), %rcx
sarq $0x3, %rcx
imulq %r15, %rcx
leaq (%rcx,%rdx,4), %rdx
movq 0x10(%r14), %rcx
movq 0x20(%r14), %rsi
subq %rcx, %rsi
sarq $0x3, %rsi
imulq %r15, %rsi
addq %rdx, %rsi
cmpq %rsi, %rbp
jae 0x14cba
movq %rcx, %rdx
subq 0x18(%r14), %rdx
sarq $0x3, %rdx
imulq %r15, %rdx
addq %rbp, %rdx
cmpq $0x3, %rdx
ja 0x14b88
leaq (%rcx,%r12), %rsi
jmp 0x14bbc
movq %rdx, %rsi
shrq $0x2, %rsi
movq %rsi, %rdi
movabsq $-0x4000000000000000, %r8 # imm = 0xC000000000000000
orq %r8, %rdi
testq %rdx, %rdx
cmovgq %rsi, %rdi
leaq (,%rdi,4), %rsi
movq %rdx, %r8
subq %rsi, %r8
imulq $0x78, %r8, %rsi
addq (%rax,%rdi,8), %rsi
cmpl %ebx, (%rsi)
jle 0x14cb2
cmpq $0x3, %rdx
ja 0x14bcf
addq %r12, %rcx
jmp 0x14bff
movq %rdx, %rcx
shrq $0x2, %rcx
movq %rcx, %rsi
movabsq $-0x4000000000000000, %rdi # imm = 0xC000000000000000
orq %rdi, %rsi
testq %rdx, %rdx
cmovgq %rcx, %rsi
leaq (%rax,%rsi,8), %rax
shlq $0x2, %rsi
subq %rsi, %rdx
imulq $0x78, %rdx, %rcx
addq (%rax), %rcx
movq %rcx, (%rsp)
movq (%rax), %rcx
movq %rcx, 0x8(%rsp)
addq $0x1e0, %rcx            # imm = 0x1E0
movq %rcx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x6a0a
movq 0x68(%r14), %rdx
movq %rdx, %rcx
subq 0x70(%r14), %rcx
movq 0x80(%r14), %rax
sarq $0x2, %rcx
addq %rbp, %rcx
cmpq $0x7f, %rcx
ja 0x14c51
leaq (%rdx,%rbp,4), %rcx
jmp 0x14c7e
movq %rcx, %rdx
shrq $0x7, %rdx
movabsq $-0x200000000000000, %rsi # imm = 0xFE00000000000000
addq %rdx, %rsi
testq %rcx, %rcx
cmovgq %rdx, %rsi
leaq (%rax,%rsi,8), %rax
shlq $0x7, %rsi
subq %rsi, %rcx
shlq $0x2, %rcx
addq (%rax), %rcx
movq %rcx, (%rsp)
movq (%rax), %rcx
movq %rcx, 0x8(%rsp)
addq $0x200, %rcx            # imm = 0x200
movq %rcx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
leaq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %r13, %rdx
callq 0x15104
jmp 0x14b1d
incq %rbp
jmp 0x14b19
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/eugene87222[P]Game-of-Life/gol.cpp
// Function: randomBoard(int, int)
void randomBoard(int height, int width) {
    emptyBoard(height, width);
    srand(time(NULL));
    for(int i=1; i<height+1; i++) {
        for(int j=1; j<width+1; j++) {
            int score = rand()%100 + 1;
            // 0 for dead
            // 1 for alive
            if(score >= 50) board[i][j] = 0;
            else board[i][j] = 1;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
callq 0x2497
xorl %edi, %edi
callq 0x2150
movl %eax, %edi
callq 0x2160
testl %r14d, %r14d
jle 0x25fb
leal 0x1(%rbx), %r15d
incl %r14d
movl $0x1, %r12d
testl %ebx, %ebx
jle 0x25f3
movl $0x1, %r13d
leaq (%r12,%r12,2), %rbp
callq 0x2040
cltq
imulq $0x51eb851f, %rax, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x64, %ecx, %ecx
subl %ecx, %eax
xorl %ecx, %ecx
cmpl $0x31, %eax
setl %cl
movq 0x3b95(%rip), %rax      # 0x6178
movq (%rax,%rbp,8), %rax
movl %ecx, (%rax,%r13,4)
incq %r13
cmpq %r13, %r15
jne 0x25b4
incq %r12
cmpq %r14, %r12
jne 0x25a6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/eugene87222[P]Game-of-Life/gol.cpp
// Function: Gosperglidergun(int, int)
void Gosperglidergun(int height, int width) {
    emptyBoard(height, width);

    board[4][2] = 1;
    board[5][2] = 1;
    board[4][3] = 1;
    board[5][3] = 1;

    board[2][13] = 1;
    board[3][13] = 1;
    board[7][13] = 1;
    board[8][13] = 1;
    board[3][15] = 1;
    board[7][15] = 1;
    board[4][16] = 1;
    board[5][16] = 1;
    board[6][16] = 1;
    board[4][17] = 1;
    board[5][17] = 1;
    board[6][17] = 1;

    board[7][20] = 1;
    board[6][21] = 1;
    board[7][21] = 1;
    board[8][21] = 1;
    board[5][22] = 1;
    board[9][22] = 1;
    board[7][23] = 1;
    board[4][24] = 1;
    board[10][24] = 1;
    board[4][25] = 1;
    board[10][25] = 1;
    board[5][26] = 1;
    board[9][26] = 1;
    board[6][27] = 1;
    board[7][27] = 1;
    board[8][27] = 1;

    board[6][36] = 1;
    board[7][36] = 1;
    board[6][37] = 1;
    board[7][37] = 1;
}

// Assembly:
pushq %rax
callq 0x2497
movq 0x3b61(%rip), %rdx      # 0x6178
movq 0x60(%rdx), %rcx
movl $0x1, %eax
movl %eax, 0x8(%rcx)
movq 0x78(%rdx), %rsi
movl %eax, 0x8(%rsi)
movl %eax, 0xc(%rcx)
movl %eax, 0xc(%rsi)
movq 0x30(%rdx), %rdi
movl %eax, 0x34(%rdi)
movq 0x48(%rdx), %r8
movl %eax, 0x34(%r8)
movq 0xa8(%rdx), %rdi
movl %eax, 0x34(%rdi)
movq 0xc0(%rdx), %r9
movl %eax, 0x34(%r9)
movl %eax, 0x3c(%r8)
movl %eax, 0x3c(%rdi)
movl %eax, 0x40(%rcx)
movl %eax, 0x40(%rsi)
movq 0x90(%rdx), %r8
movl %eax, 0x40(%r8)
movl %eax, 0x44(%rcx)
movl %eax, 0x44(%rsi)
movl %eax, 0x44(%r8)
movl %eax, 0x50(%rdi)
movl %eax, 0x54(%r8)
movl %eax, 0x54(%rdi)
movl %eax, 0x54(%r9)
movl %eax, 0x58(%rsi)
movq 0xd8(%rdx), %r10
movl %eax, 0x58(%r10)
movl %eax, 0x5c(%rdi)
movl %eax, 0x60(%rcx)
movq 0xf0(%rdx), %rdx
movl %eax, 0x60(%rdx)
movl %eax, 0x64(%rcx)
movl %eax, 0x64(%rdx)
movl %eax, 0x68(%rsi)
movl %eax, 0x68(%r10)
movl %eax, 0x6c(%r8)
movl %eax, 0x6c(%rdi)
movl %eax, 0x6c(%r9)
movl %eax, 0x90(%r8)
movl %eax, 0x90(%rdi)
movl %eax, 0x94(%r8)
movl %eax, 0x94(%rdi)
popq %rax
retq