// File: CMU-SAFARI[P]MQSim/src/exec/Host_Parameter_Set.cpp
// Function: Host_Parameter_Set::XML_deserialize(rapidxml::xml_node<char>*)
void Host_Parameter_Set::XML_deserialize(rapidxml::xml_node<> *node)
{
	try {
		for (auto param = node->first_node(); param; param = param->next_sibling()) {
			if (strcmp(param->name(), "PCIe_Lane_Bandwidth") == 0) {
				std::string val = param->value();
				PCIe_Lane_Bandwidth = std::stod(val);
			} else if (strcmp(param->name(), "PCIe_Lane_Count") == 0) {
				std::string val = param->value();
				PCIe_Lane_Count = std::stoul(val);
			} else if (strcmp(param->name(), "SATA_Processing_Delay") == 0) {
				std::string val = param->value();
				SATA_Processing_Delay = std::stoul(val);
			} else if (strcmp(param->name(), "Enable_ResponseTime_Logging") == 0) {
				std::string val = param->value();
				std::transform(val.begin(), val.end(), val.begin(), ::toupper);
				Enable_ResponseTime_Logging = (val.compare("FALSE") == 0 ? false : true);
			} else if (strcmp(param->name(), "ResponseTime_Logging_Period_Length") == 0) {
				std::string val = param->value();
				ResponseTime_Logging_Period_Length = std::stoul(val);
			}
		}
	} catch (...) {
		PRINT_ERROR("Error in the Host_Parameter_Set!")
	}
}

// Assembly:
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, 0x1d0(%rsp)
movq %rsi, 0x1c8(%rsp)
movq 0x1c8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xc960
movq %rax, 0xc0(%rsp)
jmp 0x1d6ba
movq 0xc0(%rsp), %rax
movq %rax, 0x1c0(%rsp)
cmpq $0x0, 0x1c0(%rsp)
je 0x1dd30
movq 0x1c0(%rsp), %rdi
callq 0xcac0
movq %rax, 0xb8(%rsp)
jmp 0x1d6f0
movq 0xb8(%rsp), %rdi
leaq 0x8d923(%rip), %rsi     # 0xab022
callq 0x85f0
cmpl $0x0, %eax
jne 0x1d809
movq 0x1c0(%rsp), %rdi
callq 0x10590
movq %rax, 0xb0(%rsp)
jmp 0x1d724
leaq 0x18f(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0x8780
movq 0xb0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
leaq 0x190(%rsp), %rdi
callq 0x85d0
jmp 0x1d758
leaq 0x18f(%rsp), %rdi
callq 0x84a0
xorl %eax, %eax
movl %eax, %esi
leaq 0x190(%rsp), %rdi
callq 0x19300
movsd %xmm0, 0xa0(%rsp)
jmp 0x1d781
movsd 0xa0(%rsp), %xmm0
movsd %xmm0, 0xbcdc6(%rip)    # 0xda558
leaq 0x190(%rsp), %rdi
callq 0x8848
jmp 0x1dcfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
jmp 0x1dc8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0x18f(%rsp), %rdi
callq 0x84a0
jmp 0x1dc8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x8848
jmp 0x1dc8d
movq 0x1c0(%rsp), %rdi
callq 0xcac0
movq %rax, 0x98(%rsp)
jmp 0x1d820
movq 0x98(%rsp), %rdi
leaq 0x8d807(%rip), %rsi     # 0xab036
callq 0x85f0
cmpl $0x0, %eax
jne 0x1d921
movq 0x1c0(%rsp), %rdi
callq 0x10590
movq %rax, 0x90(%rsp)
jmp 0x1d854
leaq 0x167(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x8780
movq 0x90(%rsp), %rsi
movq 0x88(%rsp), %rdx
leaq 0x168(%rsp), %rdi
callq 0x85d0
jmp 0x1d888
leaq 0x167(%rsp), %rdi
callq 0x84a0
xorl %eax, %eax
movl %eax, %esi
leaq 0x168(%rsp), %rdi
movl $0xa, %edx
callq 0x192b0
movq %rax, 0x80(%rsp)
jmp 0x1d8b5
movq 0x80(%rsp), %rax
movl %eax, 0xbcc9d(%rip)     # 0xda560
leaq 0x168(%rsp), %rdi
callq 0x8848
jmp 0x1dcfa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0x167(%rsp), %rdi
callq 0x84a0
jmp 0x1dc8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0x168(%rsp), %rdi
callq 0x8848
jmp 0x1dc8d
movq 0x1c0(%rsp), %rdi
callq 0xcac0
movq %rax, 0x78(%rsp)
jmp 0x1d935
movq 0x78(%rsp), %rdi
leaq 0x8d705(%rip), %rsi     # 0xab046
callq 0x85f0
cmpl $0x0, %eax
jne 0x1da22
movq 0x1c0(%rsp), %rdi
callq 0x10590
movq %rax, 0x70(%rsp)
jmp 0x1d963
leaq 0x13f(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x8780
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdx
leaq 0x140(%rsp), %rdi
callq 0x85d0
jmp 0x1d98e
leaq 0x13f(%rsp), %rdi
callq 0x84a0
xorl %eax, %eax
movl %eax, %esi
leaq 0x140(%rsp), %rdi
movl $0xa, %edx
callq 0x192b0
movq %rax, 0x60(%rsp)
jmp 0x1d9b8
movq 0x60(%rsp), %rax
movq %rax, 0xbcc64(%rip)     # 0xda628
leaq 0x140(%rsp), %rdi
callq 0x8848
jmp 0x1dcf8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0x13f(%rsp), %rdi
callq 0x84a0
jmp 0x1dc8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x8848
jmp 0x1dc8d
movq 0x1c0(%rsp), %rdi
callq 0xcac0
movq %rax, 0x58(%rsp)
jmp 0x1da36
movq 0x58(%rsp), %rdi
leaq 0x8d61a(%rip), %rsi     # 0xab05c
callq 0x85f0
cmpl $0x0, %eax
jne 0x1db94
movq 0x1c0(%rsp), %rdi
callq 0x10590
movq %rax, 0x50(%rsp)
jmp 0x1da64
leaq 0x117(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x8780
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rdx
leaq 0x118(%rsp), %rdi
callq 0x85d0
jmp 0x1da8f
leaq 0x117(%rsp), %rdi
callq 0x84a0
leaq 0x118(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x83c0
movq 0x38(%rsp), %rdi
movq %rax, 0x108(%rsp)
callq 0x8280
movq 0x38(%rsp), %rdi
movq %rax, 0x100(%rsp)
callq 0x83c0
movq %rax, 0xf8(%rsp)
movq 0x108(%rsp), %rdi
movq 0x100(%rsp), %rsi
movq 0xf8(%rsp), %rdx
movq 0xbc4df(%rip), %rcx     # 0xd9fd8
callq 0x191d0
movq %rax, 0x40(%rsp)
jmp 0x1db05
movq 0x40(%rsp), %rax
movq %rax, 0xf0(%rsp)
leaq 0x8cdc9(%rip), %rsi     # 0xaa8e2
leaq 0x118(%rsp), %rdi
callq 0x8140
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
andb $0x1, %al
movb %al, 0xbcafa(%rip)      # 0xda630
leaq 0x118(%rsp), %rdi
callq 0x8848
jmp 0x1dcf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0x117(%rsp), %rdi
callq 0x84a0
jmp 0x1dc8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x8848
jmp 0x1dc8d
movq 0x1c0(%rsp), %rdi
callq 0xcac0
movq %rax, 0x30(%rsp)
jmp 0x1dba8
movq 0x30(%rsp), %rdi
leaq 0x8d4c4(%rip), %rsi     # 0xab078
callq 0x85f0
cmpl $0x0, %eax
jne 0x1dcf4
movq 0x1c0(%rsp), %rdi
callq 0x10590
movq %rax, 0x28(%rsp)
jmp 0x1dbd6
leaq 0xcf(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x8780
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0xd0(%rsp), %rdi
callq 0x85d0
jmp 0x1dc01
leaq 0xcf(%rsp), %rdi
callq 0x84a0
xorl %eax, %eax
movl %eax, %esi
leaq 0xd0(%rsp), %rdi
movl $0xa, %edx
callq 0x192b0
movq %rax, 0x18(%rsp)
jmp 0x1dc2b
movq 0x18(%rsp), %rax
movq %rax, 0xbc931(%rip)     # 0xda568
leaq 0xd0(%rsp), %rdi
callq 0x8848
jmp 0x1dcf4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0xcf(%rsp), %rdi
callq 0x84a0
jmp 0x1dc8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x8848
movq 0x1b8(%rsp), %rdi
callq 0x8180
movq 0xbc34f(%rip), %rdi     # 0xd9ff0
leaq 0x8cc40(%rip), %rsi     # 0xaa8e8
callq 0x8440
jmp 0x1dcaf
movq 0xbc33a(%rip), %rdi     # 0xd9ff0
leaq 0x8d3de(%rip), %rsi     # 0xab09b
callq 0x8440
movq %rax, 0x10(%rsp)
jmp 0x1dcc9
movq 0x10(%rsp), %rdi
movq 0xbc283(%rip), %rsi     # 0xd9f58
callq 0x8480
jmp 0x1dcdc
movq 0xbc2ed(%rip), %rdi     # 0xd9fd0
callq 0x84f0
jmp 0x1dcea
movl $0x1, %edi
callq 0x8500
jmp 0x1dcf6
jmp 0x1dcf8
jmp 0x1dcfa
jmp 0x1dcfc
jmp 0x1dcfe
movq 0x1c0(%rsp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movq %rdx, %rsi
callq 0xcc00
movq %rax, 0x8(%rsp)
jmp 0x1dd1e
movq 0x8(%rsp), %rax
movq %rax, 0x1c0(%rsp)
jmp 0x1d6ca
jmp 0x1dd4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1b8(%rsp)
movl %eax, 0x1b4(%rsp)
callq 0x86d0
jmp 0x1dd4d
jmp 0x1dd57
addq $0x1d8, %rsp            # imm = 0x1D8
retq
movq 0x1b8(%rsp), %rdi
callq 0x8770
movq %rax, %rdi
callq 0xd460
nopl (%rax)