// File: /workspace/github_cpp_makefile_star2_O1/MPSLab-ASU[P]DiRAC/./src/baseAccelSim.cc
// Function: baseAccelSim::read_file_config_interconnect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void baseAccelSim::read_file_config_interconnect(string interconnectConfigFileName)
{
	configArr = new Packet**[totalNetworks];
	for(uint8_t i=0; i < totalNetworks; i++)
  {
    configArr[i] = new Packet*[total_MC];
    // each Multicast Controller requires 4 parameters for configured
    for(uint16_t j=0; j < total_MC; j++)
      configArr[i][j] = new Packet[network_controller_config_params];
  }

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

	string line;
 	while (getline(inFile, line)) {
		istringstream tokenStream(line);
		string token1, token2, token3, token4, token5, token6;
		tokenStream >> token1 >> token2 >> token3 >> token4 >> token5 >> token6;
		uint8_t 	network 	= stoul(token1);
		uint16_t	idx				= stoul(token2);
		uint8_t		val				= stoul(token3);
		uint8_t 	rowTag 		= stoul(token4);
		uint8_t 	colTag 		= stoul(token5);
		data_type configVal	= stoul(token6);

		configArr[network][idx][val].setData(configVal);
		configArr[network][idx][val].setRowTag(rowTag);
		configArr[network][idx][val].setColTag(colTag);
	}
	inFile.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x488, %rsp            # imm = 0x488
movq %rsi, %rbx
movzbl 0x1ff6a7(%rip), %r15d   # 0x609153
leal (,%r15,8), %edi
callq 0x4181e0
movq %rax, 0x201b40(%rip)    # 0x60b600
testl %r15d, %r15d
je 0x409b30
movl 0x201b44(%rip), %r12d   # 0x60b610
movq %r12, %r14
shlq $0x3, %r14
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x4181e0
movq 0x201b1b(%rip), %rcx    # 0x60b600
movq %rax, (%rcx,%r13,8)
testl %r12d, %r12d
je 0x409b28
xorl %ebp, %ebp
movl $0x18, %edi
callq 0x4181e0
xorps %xmm0, %xmm0
movq $0x4, (%rax)
movups %xmm0, 0x8(%rax)
addq $0x8, %rax
movq 0x201aed(%rip), %rcx    # 0x60b600
movq (%rcx,%r13,8), %rcx
movzwl %bp, %edx
movq %rax, (%rcx,%rdx,8)
incl %ebp
movzwl %bp, %eax
cmpl %eax, %r12d
ja 0x409af0
incq %r13
cmpq %r15, %r13
jne 0x409ad6
movq (%rbx), %rsi
leaq 0x100(%rsp), %rbp
movq %rbp, %rdi
movl $0x8, %edx
callq 0x460c10
movq (%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x120(%rsp,%rax)
jne 0x40a069
leaq 0xe0(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xa0(%rsp), %rbx
leaq 0x80(%rsp), %r14
leaq 0x60(%rsp), %r15
leaq 0x40(%rsp), %r12
leaq 0x20(%rsp), %r13
movq 0x100(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x4653c0
movsbl %al, %edx
movq %rbp, %rdi
leaq 0xd0(%rsp), %rsi
callq 0x419ec0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x409f88
leaq 0x308(%rsp), %rbp
movq %rbp, %rdi
leaq 0xd0(%rsp), %rsi
movl $0x8, %edx
callq 0x48c470
movq %rbx, 0x90(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x98(%rsp)
movb %cl, 0xa0(%rsp)
movq %r14, 0x70(%rsp)
movq %rcx, 0x78(%rsp)
movb %cl, 0x80(%rsp)
movq %r15, 0x50(%rsp)
movq %rcx, 0x58(%rsp)
movb %cl, 0x60(%rsp)
movq %r12, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movb %cl, 0x40(%rsp)
movq %r13, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movb %cl, 0x20(%rsp)
leaq 0xc0(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq %rcx, 0xb8(%rsp)
movb %cl, 0xc0(%rsp)
movq %rbp, %rdi
leaq 0x90(%rsp), %rsi
callq 0x419b40
movq %rax, %rdi
leaq 0x70(%rsp), %rsi
callq 0x419b40
movq %rax, %rdi
leaq 0x50(%rsp), %rsi
callq 0x419b40
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x419b40
movq %rax, %rdi
leaq 0x10(%rsp), %rsi
callq 0x419b40
movq %rax, %rdi
leaq 0xb0(%rsp), %rsi
callq 0x419b40
movq 0x90(%rsp), %rbx
callq 0x4c7aa0
movq %rax, %r14
movl (%rax), %r15d
movl $0x0, (%rax)
movq %rbx, %rdi
leaq 0x8(%rsp), %rbp
movq %rbp, %rsi
movl $0xa, %edx
callq 0x4de720
cmpq %rbx, 0x8(%rsp)
je 0x409ffd
movq %rax, %r13
movl (%r14), %eax
testl %eax, %eax
je 0x409d03
cmpl $0x22, %eax
jne 0x409d06
jmp 0x40a051
movl %r15d, (%r14)
movq 0x70(%rsp), %r15
movl (%r14), %r12d
movl $0x0, (%r14)
movq %r15, %rdi
movq %rbp, %rsi
movl $0xa, %edx
callq 0x4de720
cmpq %r15, 0x8(%rsp)
je 0x40a009
movq %rax, %rbx
movl (%r14), %eax
testl %eax, %eax
movq %r13, 0xf8(%rsp)
je 0x409d4c
cmpl $0x22, %eax
jne 0x409d4f
jmp 0x40a021
movl %r12d, (%r14)
movq 0x50(%rsp), %r12
movl (%r14), %r13d
movl $0x0, (%r14)
movq %r12, %rdi
movq %rbp, %rsi
movl $0xa, %edx
callq 0x4de720
cmpq %r12, 0x8(%rsp)
je 0x409fe5
movq %rax, %r15
movl (%r14), %eax
testl %eax, %eax
movq %rbx, 0xf0(%rsp)
je 0x409d95
cmpl $0x22, %eax
jne 0x409d98
jmp 0x40a039
movl %r13d, (%r14)
movq 0x30(%rsp), %r13
movl (%r14), %ebx
movl $0x0, (%r14)
movq %r13, %rdi
movq %rbp, %rsi
movl $0xa, %edx
callq 0x4de720
cmpq %r13, 0x8(%rsp)
je 0x409ff1
movq %rax, %r12
movl (%r14), %eax
testl %eax, %eax
je 0x409dd6
cmpl $0x22, %eax
jne 0x409dd9
jmp 0x40a02d
movl %ebx, (%r14)
movq 0x10(%rsp), %rbx
movl (%r14), %ebp
movl $0x0, (%r14)
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
callq 0x4de720
cmpq %rbx, 0x8(%rsp)
je 0x409fd9
movq %rax, %r13
movl (%r14), %eax
testl %eax, %eax
je 0x409e19
cmpl $0x22, %eax
jne 0x409e1c
jmp 0x40a05d
movl %ebp, (%r14)
movq 0xb0(%rsp), %rbx
movl (%r14), %ebp
movl $0x0, (%r14)
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
callq 0x4de720
cmpq %rbx, 0x8(%rsp)
je 0x40a015
movl (%r14), %ecx
testl %ecx, %ecx
movq 0xf0(%rsp), %rdi
je 0x409e64
cmpl $0x22, %ecx
jne 0x409e67
jmp 0x40a045
movl %ebp, (%r14)
movq 0x201792(%rip), %rcx    # 0x60b600
movl $0xff, %esi
movq 0xf8(%rsp), %rdx
andl %esi, %edx
movq (%rcx,%rdx,8), %rcx
movzwl %di, %edx
movq (%rcx,%rdx,8), %rcx
andl %esi, %r15d
movw %ax, 0x2(%rcx,%r15,4)
movb %r12b, (%rcx,%r15,4)
movb %r13b, 0x1(%rcx,%r15,4)
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x409ebf
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %r13
cmpq %r13, %rdi
leaq 0xa0(%rsp), %rbx
leaq 0x80(%rsp), %r14
leaq 0x60(%rsp), %r15
leaq 0x40(%rsp), %r12
leaq 0x100(%rsp), %rbp
je 0x409efd
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x409f14
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x409f2b
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x409f45
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
je 0x409f62
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x308(%rsp), %rdi
movq $0x606328, %rsi         # imm = 0x606328
callq 0x48c720
leaq 0x380(%rsp), %rdi
callq 0x4667e0
jmp 0x409b94
leaq 0x100(%rsp), %rdi
callq 0x4611c0
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x409fba
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x100(%rsp), %rdi
callq 0x461570
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18b9eb(%rip), %rdi    # 0x5959cb
callq 0x402b8d
leaq 0x18b9df(%rip), %rdi    # 0x5959cb
callq 0x402b8d
leaq 0x18b9d3(%rip), %rdi    # 0x5959cb
callq 0x402b8d
leaq 0x18b9c7(%rip), %rdi    # 0x5959cb
callq 0x402b8d
leaq 0x18b9bb(%rip), %rdi    # 0x5959cb
callq 0x402b8d
leaq 0x18b9af(%rip), %rdi    # 0x5959cb
callq 0x402b8d
leaq 0x18b9a3(%rip), %rdi    # 0x5959cb
callq 0x402c3d
leaq 0x18b997(%rip), %rdi    # 0x5959cb
callq 0x402c3d
leaq 0x18b98b(%rip), %rdi    # 0x5959cb
callq 0x402c3d
leaq 0x18b97f(%rip), %rdi    # 0x5959cb
callq 0x402c3d
leaq 0x18b973(%rip), %rdi    # 0x5959cb
callq 0x402c3d
leaq 0x18b967(%rip), %rdi    # 0x5959cb
callq 0x402c3d
movq $0x60c900, %rdi         # imm = 0x60C900
leaq 0x189fa9(%rip), %rsi    # 0x594020
movl $0x1b, %edx
callq 0x484270
movq (%rbx), %rsi
movq $0x60c900, %rdi         # imm = 0x60C900
callq 0x4847a0
movq %rax, %rdi
callq 0x484080
movl $0x1, %edi
callq 0x4de3d0
movq %rax, %rbp
jmp 0x40a229
jmp 0x40a137
jmp 0x40a137
movq %rax, %rbp
cmpl $0x0, (%r14)
jne 0x40a116
movl %r15d, (%r14)
jmp 0x40a116
jmp 0x40a0d2
movq %rax, %rbp
cmpl $0x0, (%r14)
jne 0x40a116
movl %r13d, (%r14)
jmp 0x40a116
cmpl $0x0, (%r14)
jne 0x40a0db
movl %ebp, (%r14)
leaq 0xa0(%rsp), %rbx
leaq 0x80(%rsp), %r14
leaq 0x60(%rsp), %r15
leaq 0x40(%rsp), %r12
leaq 0x20(%rsp), %r13
jmp 0x40a13f
movq %rax, %rbp
cmpl $0x0, (%r14)
jne 0x40a116
movl %ebx, (%r14)
jmp 0x40a116
movq %rax, %rbp
cmpl $0x0, (%r14)
jne 0x40a116
movl %r12d, (%r14)
leaq 0xa0(%rsp), %rbx
leaq 0x80(%rsp), %r14
leaq 0x60(%rsp), %r15
leaq 0x40(%rsp), %r12
leaq 0x20(%rsp), %r13
jmp 0x40a142
movq %rax, %rbp
jmp 0x40a204
movq %rax, %rbp
movq 0xb0(%rsp), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x40a167
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x40a17e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x40a195
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x40a1ac
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x40a1c6
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
je 0x40a1e3
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq $0x606328, %rsi         # imm = 0x606328
leaq 0x308(%rsp), %rdi
callq 0x48c720
leaq 0x380(%rsp), %rdi
callq 0x4667e0
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x40a229
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x100(%rsp), %rdi
callq 0x461570
movq %rbp, %rdi
callq 0x4c2960