// File: /workspace/github_cpp_makefile_star2_O1/MPSLab-ASU[P]DiRAC/./src/baseAccelSim.cc
// Function: baseAccelSim::read_file_input_network_packets(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void baseAccelSim::read_file_input_network_packets(string inputNetworkPacketsFileName)
{
	packetArr = new Packet*[total_operands];
	for(uint8_t i=0; i < total_operands; i++)
    packetArr[i] = new Packet[size_packetArr[i]];

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

	string line;
 	while (getline(inFile, line)) {
		istringstream tokenStream(line);
		string token1, token2, token3, token4;
		tokenStream >> token1 >> token2 >> token3 >> token4;
		uint8_t		operand 	= stoul(token1);
		uint16_t 	idx				= stoul(token2);
		uint8_t 	rowTag 		= stoul(token3);
		uint8_t		colTag 		= stoul(token4);

		packetArr[operand][idx].setData(0);
		packetArr[operand][idx].setRowTag(rowTag);
		packetArr[operand][idx].setColTag(colTag);
	}
	inFile.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
movq %rsi, %r14
movzbl 0x2012fc(%rip), %r15d   # 0x60b556
leal (,%r15,8), %edi
callq 0x4181e0
movq %rax, 0x20138a(%rip)    # 0x60b5f8
testl %r15d, %r15d
je 0x40a2c0
xorl %r12d, %r12d
movq 0x20136b(%rip), %rax    # 0x60b5e8
movzwl (%rax,%r12,2), %r13d
leaq 0x8(,%r13,4), %rdi
callq 0x4181e0
leaq 0x8(%rax), %rbx
movq %r13, (%rax)
testl %r13d, %r13d
je 0x40a2ad
leal (,%r13,4), %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x401088
movq 0x201344(%rip), %rax    # 0x60b5f8
movq %rbx, (%rax,%r12,8)
incq %r12
cmpq %r12, %r15
jne 0x40a276
movq (%r14), %rsi
leaq 0xb0(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x460c10
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0xd0(%rsp,%rax)
jne 0x40a684
leaq 0xa0(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x60(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0x20(%rsp), %r12
leaq 0x90(%rsp), %r13
leaq 0x2b8(%rsp), %rbp
movq 0xb0(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4653c0
movsbl %al, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x419ec0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x40a5d3
movq %rbp, %rdi
movq %r13, %rsi
movl $0x8, %edx
callq 0x48c470
movq %r14, 0x50(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x58(%rsp)
movb %cl, 0x60(%rsp)
movq %r15, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movb %cl, 0x40(%rsp)
movq %r12, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movb %cl, 0x20(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq %rcx, 0x78(%rsp)
movb %cl, 0x80(%rsp)
movq %rbp, %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 0x70(%rsp), %rsi
callq 0x419b40
movq 0x50(%rsp), %rbx
callq 0x4c7aa0
movq %rax, %r13
movl (%rax), %r15d
movl $0x0, (%rax)
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
callq 0x4de720
cmpq %rbx, 0x8(%rsp)
je 0x40a63c
movq %rax, %r14
movl (%r13), %eax
testl %eax, %eax
je 0x40a42d
cmpl $0x22, %eax
jne 0x40a431
jmp 0x40a654
movl %r15d, (%r13)
movq 0x30(%rsp), %r15
movl (%r13), %r12d
movl $0x0, (%r13)
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
callq 0x4de720
cmpq %r15, 0x8(%rsp)
je 0x40a648
movq %rax, %rbx
movl (%r13), %eax
testl %eax, %eax
je 0x40a474
cmpl $0x22, %eax
jne 0x40a478
jmp 0x40a66c
movl %r12d, (%r13)
movq 0x10(%rsp), %r12
movl (%r13), %ebp
movl $0x0, (%r13)
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
callq 0x4de720
cmpq %r12, 0x8(%rsp)
je 0x40a624
movq %rax, %r15
movl (%r13), %eax
testl %eax, %eax
je 0x40a4bb
cmpl $0x22, %eax
jne 0x40a4bf
jmp 0x40a660
movl %ebp, (%r13)
movq 0x70(%rsp), %r12
movl (%r13), %ebp
movl $0x0, (%r13)
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
callq 0x4de720
cmpq %r12, 0x8(%rsp)
je 0x40a630
movl (%r13), %ecx
testl %ecx, %ecx
leaq 0x20(%rsp), %r12
je 0x40a504
cmpl $0x22, %ecx
jne 0x40a508
jmp 0x40a678
movl %ebp, (%r13)
movq 0x2010e9(%rip), %rcx    # 0x60b5f8
movzbl %r14b, %edx
movq (%rcx,%rdx,8), %rcx
movzwl %bx, %edx
movw $0x0, 0x2(%rcx,%rdx,4)
movb %r15b, (%rcx,%rdx,4)
movb %al, 0x1(%rcx,%rdx,4)
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x40a54b
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
leaq 0x60(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0xb0(%rsp), %rbx
leaq 0x90(%rsp), %r13
leaq 0x2b8(%rsp), %rbp
je 0x40a584
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x40a59b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x40a5b2
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq %rbp, %rdi
movq $0x606328, %rsi         # imm = 0x606328
callq 0x48c720
leaq 0x330(%rsp), %rdi
callq 0x4667e0
jmp 0x40a323
leaq 0xb0(%rsp), %rdi
callq 0x4611c0
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x40a605
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0xb0(%rsp), %rdi
callq 0x461570
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18b3a0(%rip), %rdi    # 0x5959cb
callq 0x402b8d
leaq 0x18b394(%rip), %rdi    # 0x5959cb
callq 0x402b8d
leaq 0x18b388(%rip), %rdi    # 0x5959cb
callq 0x402b8d
leaq 0x18b37c(%rip), %rdi    # 0x5959cb
callq 0x402b8d
leaq 0x18b370(%rip), %rdi    # 0x5959cb
callq 0x402c3d
leaq 0x18b364(%rip), %rdi    # 0x5959cb
callq 0x402c3d
leaq 0x18b358(%rip), %rdi    # 0x5959cb
callq 0x402c3d
leaq 0x18b34c(%rip), %rdi    # 0x5959cb
callq 0x402c3d
movq $0x60c900, %rdi         # imm = 0x60C900
leaq 0x18998e(%rip), %rsi    # 0x594020
movl $0x1b, %edx
callq 0x484270
movq (%r14), %rsi
movq $0x60c900, %rdi         # imm = 0x60C900
callq 0x4847a0
movq %rax, %rdi
callq 0x484080
movl $0x1, %edi
callq 0x4de3d0
movq %rax, %rbx
jmp 0x40a7c2
jmp 0x40a70a
jmp 0x40a70a
movq %rax, %rbx
cmpl $0x0, (%r13)
jne 0x40a6f9
movl %r12d, (%r13)
jmp 0x40a6f9
jmp 0x40a6eb
movq %rax, %rbx
cmpl $0x0, (%r13)
jne 0x40a6f9
movl %r15d, (%r13)
jmp 0x40a6f9
movq %rax, %rbx
cmpl $0x0, (%r13)
jne 0x40a6f9
movl %ebp, (%r13)
leaq 0x60(%rsp), %r14
leaq 0x40(%rsp), %r15
leaq 0x20(%rsp), %r12
jmp 0x40a715
movq %rax, %rbx
jmp 0x40a79d
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x40a737
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x40a74e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x40a765
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x40a77c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq $0x606328, %rsi         # imm = 0x606328
leaq 0x2b8(%rsp), %rdi
callq 0x48c720
leaq 0x330(%rsp), %rdi
callq 0x4667e0
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x40a7c2
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0xb0(%rsp), %rdi
callq 0x461570
movq %rbx, %rdi
callq 0x4c2960
nop