// File: /workspace/github_cpp_makefile_star2_O2/MPSLab-ASU[P]DiRAC/./src/baseAccelSim.cc
// Function: baseAccelSim::read_file_network_info(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void baseAccelSim::read_file_network_info(string networkInfoFileName)
{
	total_MC = nRows_PE_Array*nCols_PE_Array + nRows_PE_Array;

	size_packetArr = new uint16_t[total_operands]();
	size_config_data_collect_write_back = new uint16_t[outNetworks]();

	uint16_t it=0;
	ifstream inFile(networkInfoFileName.c_str());
	if(!inFile)
	{
		cout << "Cannot open and read file: " << networkInfoFileName.c_str() << endl;
		exit (EXIT_FAILURE);
	}

	string line;
 	while (getline(inFile, line)) {
		istringstream tokenStream(line);
		string token1;
		tokenStream >> token1;
		int idx_output_network = it - (total_operands+1);

		if(it == 0)
			PE_trigger_latency = stoul(token1);
		else if(it <= total_operands)
			size_packetArr[it-1] = stoul(token1);
		else if(idx_output_network <= outNetworks)
			size_config_data_collect_write_back[idx_output_network] = stoul(token1);
		it++;
	}
	inFile.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3c8, %rsp            # imm = 0x3C8
movq %rsi, %rbx
movzwl 0x201085(%rip), %eax    # 0x6085ac
movzwl 0x201080(%rip), %ecx    # 0x6085ae
incl %ecx
imull %eax, %ecx
movl %ecx, 0x2010d7(%rip)    # 0x608610
movzbl 0x201015(%rip), %r14d   # 0x608556
addl %r14d, %r14d
movq %r14, %rdi
callq 0x414190
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401080
movq %r15, 0x201085(%rip)    # 0x6085e8
movzbl 0x201079(%rip), %r14d   # 0x6085e4
addl %r14d, %r14d
movq %r14, %rdi
callq 0x414190
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401080
movq %r15, 0x201063(%rip)    # 0x6085f0
movq (%rbx), %rsi
leaq 0x40(%rsp), %r14
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x45cbc0
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x60(%rsp,%rax)
jne 0x4076da
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r13d, %r13d
leaq 0x20(%rsp), %r14
leaq 0x248(%rsp), %r15
movq %rsp, %r12
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x493470
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4076aa
movq %r15, %rdi
movq %r14, %rsi
pushq $0x8
popq %rdx
callq 0x488420
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
andq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x415af0
testw %r13w, %r13w
je 0x407663
movzwl %r13w, %ebx
movzbl 0x200f23(%rip), %ebp    # 0x608556
cmpl %ebp, %ebx
jbe 0x407679
notl %ebp
addl %ebx, %ebp
movzbl 0x200fa2(%rip), %eax    # 0x6085e4
cmpl %eax, %ebp
jg 0x407692
movq %r12, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x40a485
movq 0x200f96(%rip), %rcx    # 0x6085f0
movslq %ebp, %rdx
movw %ax, (%rcx,%rdx,2)
jmp 0x407692
movq %r12, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x40a485
movw %ax, 0x201061(%rip)     # 0x6086d8
jmp 0x407692
movq %r12, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x40a485
movq 0x200f5b(%rip), %rcx    # 0x6085e8
movw %ax, -0x2(%rcx,%rbx,2)
incl %r13d
movq %r12, %rdi
callq 0x490a30
movq %r15, %rdi
callq 0x485d10
jmp 0x4075d6
leaq 0x40(%rsp), %rdi
callq 0x45d170
leaq 0x20(%rsp), %rdi
callq 0x490a30
leaq 0x40(%rsp), %rdi
callq 0x45d520
addq $0x3c8, %rsp            # imm = 0x3C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x609900, %rdi         # imm = 0x609900
leaq 0x188938(%rip), %rsi    # 0x590020
callq 0x480750
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x480750
movq %rax, %rdi
callq 0x480030
pushq $0x1
popq %rdi
callq 0x4da4e0
movq %rax, %rbx
jmp 0x40773a
jmp 0x40772d
jmp 0x407713
jmp 0x40772d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x490a30
leaq 0x248(%rsp), %rdi
callq 0x485d10
jmp 0x407730
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x490a30
leaq 0x40(%rsp), %rdi
callq 0x45d520
movq %rbx, %rdi
callq 0x4bea70