// File: /workspace/github_cpp_makefile_star2_O3/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 0x1ff683(%rip), %r15d   # 0x609153
leal (,%r15,8), %edi
callq 0x418d20
movq %rax, 0x201b1c(%rip)    # 0x60b600
testl %r15d, %r15d
je 0x409b54
movl 0x201b20(%rip), %r12d   # 0x60b610
movq %r12, %r14
shlq $0x3, %r14
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x418d20
movq 0x201af7(%rip), %rcx    # 0x60b600
movq %rax, (%rcx,%r13,8)
testl %r12d, %r12d
je 0x409b4c
xorl %ebp, %ebp
movl $0x18, %edi
callq 0x418d20
xorps %xmm0, %xmm0
movq $0x4, (%rax)
movups %xmm0, 0x8(%rax)
addq $0x8, %rax
movq 0x201ac9(%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 0x409b14
incq %r13
cmpq %r15, %r13
jne 0x409afa
movq (%rbx), %rsi
leaq 0x100(%rsp), %r15
movq %r15, %rdi
movl $0x8, %edx
callq 0x461750
movq (%r15), %rax
movq -0x18(%rax), %rcx
testb $0x5, 0x120(%rsp,%rcx)
jne 0x40a07c
leaq 0xd8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
leaq 0x78(%rsp), %rbx
leaq 0x58(%rsp), %r14
leaq 0x38(%rsp), %r12
leaq 0x18(%rsp), %r13
leaq 0xc8(%rsp), %rbp
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x465f00
movsbl %al, %edx
movq %r15, %rdi
movq %rbp, %rsi
callq 0x41aa00
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x409f9b
leaq 0x308(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
movl $0x8, %edx
callq 0x48cfb0
movq %rbx, 0x68(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x70(%rsp)
movb %cl, 0x78(%rsp)
movq %r14, 0x48(%rsp)
movq %rcx, 0x50(%rsp)
movb %cl, 0x58(%rsp)
movq %r12, 0x28(%rsp)
movq %rcx, 0x30(%rsp)
movb %cl, 0x38(%rsp)
movq %r13, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movb %cl, 0x18(%rsp)
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq %rcx, 0xb0(%rsp)
movb %cl, 0xb8(%rsp)
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
movq %rcx, 0x90(%rsp)
movb %cl, 0x98(%rsp)
movq %r15, %rdi
leaq 0x68(%rsp), %rsi
callq 0x41a680
movq %rax, %rdi
leaq 0x48(%rsp), %rsi
callq 0x41a680
movq %rax, %rdi
leaq 0x28(%rsp), %rsi
callq 0x41a680
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0x41a680
movq %rax, %rdi
leaq 0xa8(%rsp), %rsi
callq 0x41a680
movq %rax, %rdi
leaq 0x88(%rsp), %rsi
callq 0x41a680
movq 0x68(%rsp), %r14
callq 0x4c85e0
movq %rax, %rbx
movl (%rax), %ebp
movl $0x0, (%rax)
movq %r14, %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x4df260
cmpq %r14, (%rsp)
je 0x40a010
movl (%rbx), %r12d
testl %r12d, %r12d
je 0x409d0b
cmpl $0x22, %r12d
jne 0x409d10
jmp 0x40a064
movl %ebp, (%rbx)
movl %ebp, %r12d
movq %rax, 0xf8(%rsp)
movq 0x48(%rsp), %r15
movl $0x0, (%rbx)
movq %r15, %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x4df260
cmpq %r15, (%rsp)
je 0x40a01c
movq %rax, %rbp
movl (%rbx), %r13d
testl %r13d, %r13d
je 0x409d53
cmpl $0x22, %r13d
jne 0x409d59
jmp 0x40a034
movl %r12d, (%rbx)
movl %r12d, %r13d
movq 0x28(%rsp), %r12
movl $0x0, (%rbx)
movq %r12, %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x4df260
cmpq %r12, (%rsp)
je 0x409ff8
movq %rax, %r15
movl (%rbx), %r14d
testl %r14d, %r14d
je 0x409d94
cmpl $0x22, %r14d
jne 0x409d9a
jmp 0x40a04c
movl %r13d, (%rbx)
movl %r13d, %r14d
movq %rbp, 0xf0(%rsp)
movq 0x8(%rsp), %r13
movl $0x0, (%rbx)
movq %r13, %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x4df260
cmpq %r13, (%rsp)
je 0x40a004
movl (%rbx), %ebp
testl %ebp, %ebp
je 0x409dd7
cmpl $0x22, %ebp
jne 0x409ddd
jmp 0x40a040
movl %r14d, (%rbx)
movl %r14d, %ebp
movq %rax, 0xe8(%rsp)
movq 0xa8(%rsp), %r14
movl $0x0, (%rbx)
movq %r14, %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x4df260
cmpq %r14, (%rsp)
je 0x409fec
movq %rax, %r13
movl (%rbx), %r12d
testl %r12d, %r12d
je 0x409e23
cmpl $0x22, %r12d
jne 0x409e28
jmp 0x40a070
movl %ebp, (%rbx)
movl %ebp, %r12d
movq 0x88(%rsp), %r14
movl $0x0, (%rbx)
movq %r14, %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x4df260
cmpq %r14, (%rsp)
je 0x40a028
movl (%rbx), %ecx
testl %ecx, %ecx
leaq 0xc8(%rsp), %rbp
je 0x409e68
cmpl $0x22, %ecx
jne 0x409e6b
jmp 0x40a058
movl %r12d, (%rbx)
movq 0x20178e(%rip), %rcx    # 0x60b600
movl $0xff, %esi
movq 0xf8(%rsp), %rdx
andl %esi, %edx
movq (%rcx,%rdx,8), %rcx
movzwl 0xf0(%rsp), %edx
movq (%rcx,%rdx,8), %rcx
andl %esi, %r15d
movw %ax, 0x2(%rcx,%r15,4)
movq 0xe8(%rsp), %rax
movb %al, (%rcx,%r15,4)
movb %r13b, 0x1(%rcx,%r15,4)
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x409ed0
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x4177e0
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
leaq 0x78(%rsp), %rbx
leaq 0x58(%rsp), %r14
leaq 0x38(%rsp), %r12
leaq 0x18(%rsp), %r13
leaq 0x100(%rsp), %r15
je 0x409f11
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x4177e0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x409f28
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4177e0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x409f3f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4177e0
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x409f56
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4177e0
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x409f6d
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4177e0
leaq 0x308(%rsp), %rdi
movq $0x606328, %rsi         # imm = 0x606328
callq 0x48d260
leaq 0x380(%rsp), %rdi
callq 0x467320
movq 0x100(%rsp), %rax
jmp 0x409bb4
leaq 0x100(%rsp), %rdi
callq 0x461d00
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x409fcd
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x4177e0
leaq 0x100(%rsp), %rdi
callq 0x4620b0
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18b9d8(%rip), %rdi    # 0x5959cb
callq 0x402b51
leaq 0x18b9cc(%rip), %rdi    # 0x5959cb
callq 0x402b51
leaq 0x18b9c0(%rip), %rdi    # 0x5959cb
callq 0x402b51
leaq 0x18b9b4(%rip), %rdi    # 0x5959cb
callq 0x402b51
leaq 0x18b9a8(%rip), %rdi    # 0x5959cb
callq 0x402b51
leaq 0x18b99c(%rip), %rdi    # 0x5959cb
callq 0x402b51
leaq 0x18b990(%rip), %rdi    # 0x5959cb
callq 0x402c01
leaq 0x18b984(%rip), %rdi    # 0x5959cb
callq 0x402c01
leaq 0x18b978(%rip), %rdi    # 0x5959cb
callq 0x402c01
leaq 0x18b96c(%rip), %rdi    # 0x5959cb
callq 0x402c01
leaq 0x18b960(%rip), %rdi    # 0x5959cb
callq 0x402c01
leaq 0x18b954(%rip), %rdi    # 0x5959cb
callq 0x402c01
movq $0x60c900, %rdi         # imm = 0x60C900
leaq 0x189f96(%rip), %rsi    # 0x594020
movl $0x1b, %edx
callq 0x484db0
movq (%rbx), %rsi
movq $0x60c900, %rdi         # imm = 0x60C900
callq 0x4852e0
movq %rax, %rdi
callq 0x484bc0
movl $0x1, %edi
callq 0x4def10
movq %rax, %r15
jmp 0x40a203
jmp 0x40a10c
jmp 0x40a10c
jmp 0x40a0d2
jmp 0x40a0eb
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x40a0f6
movl %r13d, (%rbx)
jmp 0x40a0f6
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x40a0f6
movl %ebp, (%rbx)
jmp 0x40a0f6
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x40a0f6
movl %r14d, (%rbx)
jmp 0x40a0f6
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x40a0f6
movl %r12d, (%rbx)
leaq 0x78(%rsp), %rbx
leaq 0x58(%rsp), %r14
leaq 0x38(%rsp), %r12
leaq 0x18(%rsp), %r13
jmp 0x40a117
movq %rax, %r15
jmp 0x40a1de
movq %rax, %r15
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x40a13c
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x4177e0
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x40a161
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x4177e0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x40a178
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4177e0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x40a18f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4177e0
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x40a1a6
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x4177e0
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x40a1bd
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x4177e0
movq $0x606328, %rsi         # imm = 0x606328
leaq 0x308(%rsp), %rdi
callq 0x48d260
leaq 0x380(%rsp), %rdi
callq 0x467320
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x40a203
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x4177e0
leaq 0x100(%rsp), %rdi
callq 0x4620b0
movq %r15, %rdi
callq 0x4c34a0