// File: MPSLab-ASU[P]DiRAC/./src/baseAccelSim.cc
// Function: baseAccelSim::read_golden_outputs()
void baseAccelSim::read_golden_outputs()
{
	for(uint8_t op=input_operands; op < total_operands; op++)
	{
		string fileName = dir_data + "golden_op" + std::to_string(int(op)+1) + ".txt";
		ifstream inFile(fileName.c_str());

		if(!inFile)
		{
			cout << "Cannot open and read file: " << fileName.c_str() << endl;
			exit (EXIT_FAILURE);
		}

		for(int i=0; i < size_tensors[op]; i++) {
			inFile >> golden_outputs[op-input_operands][i];
		}
		inFile.close();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp            # imm = 0x2C0
movq %rdi, -0x8(%rbp)
movb 0x214f13(%rip), %al     # 0x61e558
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
movzbl 0x214f03(%rip), %ecx    # 0x61e556
cmpl %ecx, %eax
jge 0x4098b5
leaq 0x2150fe(%rip), %rsi    # 0x61e760
leaq 0x199214(%rip), %rdx    # 0x5a287d
leaq -0x70(%rbp), %rdi
callq 0x40f4e0
movzbl -0x9(%rbp), %esi
incl %esi
leaq -0x90(%rbp), %rdi
callq 0x40f0c0
jmp 0x409686
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x40f410
jmp 0x40969c
leaq 0x19a94e(%rip), %rdx    # 0x5a3ff1
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x40f3c0
jmp 0x4096b2
leaq -0x50(%rbp), %rdi
callq 0x4a2730
leaq -0x90(%rbp), %rdi
callq 0x4a2730
leaq -0x70(%rbp), %rdi
callq 0x4a2730
leaq -0x30(%rbp), %rdi
callq 0x4a4170
movq %rax, %rsi
leaq -0x2a8(%rbp), %rdi
movl $0x8, %edx
callq 0x46e8c0
jmp 0x4096ef
movq -0x2a8(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x2a8(%rbp,%rax), %rdi
callq 0x472d80
movb %al, -0x2ad(%rbp)
jmp 0x40970f
movb -0x2ad(%rbp), %al
testb $0x1, %al
jne 0x40971e
jmp 0x409811
movq $0x61f900, %rdi         # imm = 0x61F900
leaq 0x1978e4(%rip), %rsi    # 0x5a1010
callq 0x492450
movq %rax, -0x2b8(%rbp)
jmp 0x40973a
leaq -0x30(%rbp), %rdi
callq 0x4a4170
movq -0x2b8(%rbp), %rdi
movq %rax, %rsi
callq 0x492450
movq %rax, -0x2c0(%rbp)
jmp 0x40975b
movq -0x2c0(%rbp), %rdi
movq $0x491d30, %rsi         # imm = 0x491D30
callq 0x490f40
jmp 0x409770
movl $0x1, %edi
callq 0x4ec1e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x4097c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x4097bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4a2730
leaq -0x90(%rbp), %rdi
callq 0x4a2730
leaq -0x70(%rbp), %rdi
callq 0x4a2730
jmp 0x4098be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x4098aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x46f220
jmp 0x4098aa
movl $0x0, -0x2ac(%rbp)
movslq -0x2ac(%rbp), %rax
movq 0x214d47(%rip), %rcx    # 0x61e570
movzbl -0x9(%rbp), %edx
cmpq (%rcx,%rdx,8), %rax
jae 0x40987a
movq 0x214d2e(%rip), %rax    # 0x61e568
movzbl -0x9(%rbp), %ecx
movzbl 0x214d13(%rip), %edx    # 0x61e558
subl %edx, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2ac(%rbp), %rcx
leaq (%rax,%rcx,2), %rsi
leaq -0x2a8(%rbp), %rdi
callq 0x478400
jmp 0x409867
jmp 0x409869
movl -0x2ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2ac(%rbp)
jmp 0x40981b
leaq -0x2a8(%rbp), %rdi
callq 0x46ee70
jmp 0x409888
leaq -0x2a8(%rbp), %rdi
callq 0x46f220
leaq -0x30(%rbp), %rdi
callq 0x4a2730
movb -0x9(%rbp), %al
addb $0x1, %al
movb %al, -0x9(%rbp)
jmp 0x409648
leaq -0x30(%rbp), %rdi
callq 0x4a2730
jmp 0x4098be
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x4d0770
nopw (%rax,%rax)