// File: CMU-SAFARI[P]MQSim/src/exec/IO_Flow_Parameter_Set.cpp
// Function: IO_Flow_Parameter_Set_Trace_Based::XML_deserialize(rapidxml::xml_node<char>*)
void IO_Flow_Parameter_Set_Trace_Based::XML_deserialize(rapidxml::xml_node<> *node)
{
	IO_Flow_Parameter_Set::XML_deserialize(node);

	try {
		for (auto param = node->first_node(); param; param = param->next_sibling()) {
			if (strcmp(param->name(), "Relay_Count") == 0) {
				std::string val = param->value();
				Relay_Count = std::stoi(val);
			} else if (strcmp(param->name(), "Percentage_To_Be_Executed") == 0) {
				std::string val = param->value();
				Percentage_To_Be_Executed = std::stoi(val);
			} else if (strcmp(param->name(), "File_Path") == 0) {
				File_Path = param->value();
			} else if (strcmp(param->name(), "Time_Unit") == 0) {
				std::string val = param->value();
				std::transform(val.begin(), val.end(), val.begin(), ::toupper);
				if (strcmp(val.c_str(), "PICOSECOND") == 0) {
					Time_Unit = Trace_Time_Unit::PICOSECOND;
				} else if (strcmp(val.c_str(), "NANOSECOND") == 0) {
					Time_Unit = Trace_Time_Unit::NANOSECOND;
				} else if (strcmp(val.c_str(), "MICROSECOND") == 0) {
					Time_Unit = Trace_Time_Unit::MICROSECOND;
				} else {
					PRINT_ERROR("Wrong time unit specified for the trace based flow")
				}
			}

		}
	} catch (...) {
		PRINT_ERROR("Error in IO_Flow_Parameter_Set_Trace_Based!")
	}
}

// Assembly:
subq $0x168, %rsp            # imm = 0x168
movq %rdi, 0x160(%rsp)
movq %rsi, 0x158(%rsp)
movq 0x160(%rsp), %rdi
movq %rdi, 0x98(%rsp)
movq 0x158(%rsp), %rsi
callq 0x23b60
movq 0x158(%rsp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xc960
movq %rax, 0xa0(%rsp)
jmp 0x27e37
movq 0xa0(%rsp), %rax
movq %rax, 0x150(%rsp)
cmpq $0x0, 0x150(%rsp)
je 0x283c2
movq 0x150(%rsp), %rdi
callq 0xcac0
movq %rax, 0x90(%rsp)
jmp 0x27e6d
movq 0x90(%rsp), %rdi
leaq 0x8380d(%rip), %rsi     # 0xab689
callq 0x85f0
cmpl $0x0, %eax
jne 0x27f84
movq 0x150(%rsp), %rdi
callq 0x10590
movq %rax, 0x88(%rsp)
jmp 0x27ea1
leaq 0x11f(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x8780
movq 0x88(%rsp), %rsi
movq 0x80(%rsp), %rdx
leaq 0x120(%rsp), %rdi
callq 0x85d0
jmp 0x27ed5
leaq 0x11f(%rsp), %rdi
callq 0x84a0
xorl %eax, %eax
movl %eax, %esi
leaq 0x120(%rsp), %rdi
movl $0xa, %edx
callq 0x19180
movl %eax, 0x7c(%rsp)
jmp 0x27efe
movq 0x98(%rsp), %rax
movl 0x7c(%rsp), %ecx
movl %ecx, 0x74(%rax)
leaq 0x120(%rsp), %rdi
callq 0x8848
jmp 0x2838e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
jmp 0x2824f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
leaq 0x11f(%rsp), %rdi
callq 0x84a0
jmp 0x2824f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
leaq 0x120(%rsp), %rdi
callq 0x8848
jmp 0x2824f
movq 0x150(%rsp), %rdi
callq 0xcac0
movq %rax, 0x70(%rsp)
jmp 0x27f98
movq 0x70(%rsp), %rdi
leaq 0x836cb(%rip), %rsi     # 0xab66f
callq 0x85f0
cmpl $0x0, %eax
jne 0x28087
movq 0x150(%rsp), %rdi
callq 0x10590
movq %rax, 0x68(%rsp)
jmp 0x27fc6
leaq 0xf7(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x8780
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %rdx
leaq 0xf8(%rsp), %rdi
callq 0x85d0
jmp 0x27ff1
leaq 0xf7(%rsp), %rdi
callq 0x84a0
xorl %eax, %eax
movl %eax, %esi
leaq 0xf8(%rsp), %rdi
movl $0xa, %edx
callq 0x19180
movl %eax, 0x5c(%rsp)
jmp 0x2801a
movq 0x98(%rsp), %rax
movl 0x5c(%rsp), %ecx
movl %ecx, 0x70(%rax)
leaq 0xf8(%rsp), %rdi
callq 0x8848
jmp 0x2838c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
leaq 0xf7(%rsp), %rdi
callq 0x84a0
jmp 0x2824f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x8848
jmp 0x2824f
movq 0x150(%rsp), %rdi
callq 0xcac0
movq %rax, 0x50(%rsp)
jmp 0x2809b
movq 0x50(%rsp), %rdi
leaq 0x835be(%rip), %rsi     # 0xab665
callq 0x85f0
cmpl $0x0, %eax
jne 0x280e2
movq 0x150(%rsp), %rdi
callq 0x10590
movq %rax, 0x48(%rsp)
jmp 0x280c5
movq 0x48(%rsp), %rsi
movq 0x98(%rsp), %rdi
addq $0x50, %rdi
callq 0x85c0
jmp 0x280dd
jmp 0x2838a
movq 0x150(%rsp), %rdi
callq 0xcac0
movq %rax, 0x40(%rsp)
jmp 0x280f6
movq 0x40(%rsp), %rdi
leaq 0x83593(%rip), %rsi     # 0xab695
callq 0x85f0
cmpl $0x0, %eax
jne 0x28388
movq 0x150(%rsp), %rdi
callq 0x10590
movq %rax, 0x38(%rsp)
jmp 0x28124
leaq 0xcf(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x8780
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0xd0(%rsp), %rdi
callq 0x85d0
jmp 0x2814f
leaq 0xcf(%rsp), %rdi
callq 0x84a0
leaq 0xd0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x83c0
movq 0x20(%rsp), %rdi
movq %rax, 0xc0(%rsp)
callq 0x8280
movq 0x20(%rsp), %rdi
movq %rax, 0xb8(%rsp)
callq 0x83c0
movq %rax, 0xb0(%rsp)
movq 0xc0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
movq 0xb1e1f(%rip), %rcx     # 0xd9fd8
callq 0x191d0
movq %rax, 0x28(%rsp)
jmp 0x281c5
movq 0x28(%rsp), %rax
movq %rax, 0xa8(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x8190
movq %rax, %rdi
leaq 0x834b6(%rip), %rsi     # 0xab69f
callq 0x85f0
cmpl $0x0, %eax
jne 0x282b6
movq 0x98(%rsp), %rax
movl $0x0, 0x78(%rax)
jmp 0x2837b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
leaq 0xcf(%rsp), %rdi
callq 0x84a0
jmp 0x2824f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x8848
movq 0x148(%rsp), %rdi
callq 0x8180
movq 0xb1d8d(%rip), %rdi     # 0xd9ff0
leaq 0x8267e(%rip), %rsi     # 0xaa8e8
callq 0x8440
jmp 0x28271
movq 0xb1d78(%rip), %rdi     # 0xd9ff0
leaq 0x83475(%rip), %rsi     # 0xab6f4
callq 0x8440
movq %rax, 0x18(%rsp)
jmp 0x2828b
movq 0x18(%rsp), %rdi
movq 0xb1cc1(%rip), %rsi     # 0xd9f58
callq 0x8480
jmp 0x2829e
movq 0xb1d2b(%rip), %rdi     # 0xd9fd0
callq 0x84f0
jmp 0x282ac
movl $0x1, %edi
callq 0x8500
leaq 0xd0(%rsp), %rdi
callq 0x8190
movq %rax, %rdi
leaq 0x833dd(%rip), %rsi     # 0xab6aa
callq 0x85f0
cmpl $0x0, %eax
jne 0x282eb
movq 0x98(%rsp), %rax
movl $0x1, 0x78(%rax)
jmp 0x28379
leaq 0xd0(%rsp), %rdi
callq 0x8190
movq %rax, %rdi
leaq 0x833b3(%rip), %rsi     # 0xab6b5
callq 0x85f0
cmpl $0x0, %eax
jne 0x2831d
movq 0x98(%rsp), %rax
movl $0x2, 0x78(%rax)
jmp 0x28377
movq 0xb1ccc(%rip), %rdi     # 0xd9ff0
leaq 0x825bd(%rip), %rsi     # 0xaa8e8
callq 0x8440
jmp 0x28332
movq 0xb1cb7(%rip), %rdi     # 0xd9ff0
leaq 0x83381(%rip), %rsi     # 0xab6c1
callq 0x8440
movq %rax, 0x10(%rsp)
jmp 0x2834c
movq 0x10(%rsp), %rdi
movq 0xb1c00(%rip), %rsi     # 0xd9f58
callq 0x8480
jmp 0x2835f
movq 0xb1c6a(%rip), %rdi     # 0xd9fd0
callq 0x84f0
jmp 0x2836d
movl $0x1, %edi
callq 0x8500
jmp 0x28379
jmp 0x2837b
leaq 0xd0(%rsp), %rdi
callq 0x8848
jmp 0x2838a
jmp 0x2838c
jmp 0x2838e
jmp 0x28390
movq 0x150(%rsp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xcc00
movq %rax, 0x8(%rsp)
jmp 0x283b0
movq 0x8(%rsp), %rax
movq %rax, 0x150(%rsp)
jmp 0x27e47
jmp 0x283e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x148(%rsp)
movl %eax, 0x144(%rsp)
callq 0x86d0
jmp 0x283df
jmp 0x283e9
addq $0x168, %rsp            # imm = 0x168
retq
movq 0x148(%rsp), %rdi
callq 0x8770
movq %rax, %rdi
callq 0xd460
nop