// File: CMU-SAFARI[P]MQSim/src/exec/IO_Flow_Parameter_Set.cpp
// Function: IO_Flow_Parameter_Set::XML_serialize(Utils::XmlWriter&)
void IO_Flow_Parameter_Set::XML_serialize(Utils::XmlWriter& xmlwriter)
{
	std::string attr = "Priority_Class";
	std::string val;
	switch (Priority_Class) {
		case IO_Flow_Priority_Class::URGENT:
			val = "URGENT";
			break;
		case IO_Flow_Priority_Class::HIGH:
			val = "HIGH";
			break;
		case IO_Flow_Priority_Class::MEDIUM:
			val = "MEDIUM";
			break;
		case IO_Flow_Priority_Class::LOW:
			val = "LOW";
			break;
		default:
			break;
	}
	xmlwriter.Write_attribute_string(attr, val);


	attr = "Device_Level_Data_Caching_Mode";
	switch (Device_Level_Data_Caching_Mode) {
		case SSD_Components::Caching_Mode::TURNED_OFF:
			val = "TURNED_OFF";
			break;
		case SSD_Components::Caching_Mode::READ_CACHE:
			val = "READ_CACHE";
			break;
		case SSD_Components::Caching_Mode::WRITE_CACHE:
			val = "WRITE_CACHE";
			break;
		case SSD_Components::Caching_Mode::WRITE_READ_CACHE:
			val = "WRITE_READ_CACHE";
			break;
	}
	xmlwriter.Write_attribute_string(attr, val);

	attr = "Channel_IDs";
	val = "";
	for (int i = 0; i < Channel_No; i++) {
		if (i > 0) {
			val += ",";
		}
		val += std::to_string(Channel_IDs[i]);
	}
	xmlwriter.Write_attribute_string(attr, val);

	attr = "Chip_IDs";
	val = "";
	for (int i = 0; i < Chip_No; i++) {
		if (i > 0) {
			val += ",";
		}
		val += std::to_string(Chip_IDs[i]);
	}
	xmlwriter.Write_attribute_string(attr, val);

	attr = "Die_IDs";
	val = "";
	for (int i = 0; i < Die_No; i++) {
		if (i > 0) {
			val += ",";
		}
		val += std::to_string(Die_IDs[i]);
	}
	xmlwriter.Write_attribute_string(attr, val);

	attr = "Plane_IDs";
	val = "";
	for (int i = 0; i < Plane_No; i++) {
		if (i > 0) {
			val += ",";
		}
		val += std::to_string(Plane_IDs[i]);
	}
	xmlwriter.Write_attribute_string(attr, val);

	attr = "Initial_Occupancy_Percentage";
	val = std::to_string(Initial_Occupancy_Percentage);
	xmlwriter.Write_attribute_string(attr, val);
}

// Assembly:
subq $0x348, %rsp            # imm = 0x348
movq %rdi, 0x340(%rsp)
movq %rsi, 0x338(%rsp)
movq 0x340(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x317(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x8780
movq 0x58(%rsp), %rdx
leaq 0x88284(%rip), %rsi     # 0xab2e6
leaq 0x318(%rsp), %rdi
callq 0x85d0
jmp 0x23071
leaq 0x317(%rsp), %rdi
callq 0x84a0
leaq 0x2e0(%rsp), %rdi
callq 0x85e0
movq 0x50(%rsp), %rax
movl 0x10(%rax), %eax
movq %rax, 0x48(%rsp)
subq $0x3, %rax
ja 0x23156
movq 0x48(%rsp), %rax
leaq 0x881ba(%rip), %rcx     # 0xab268
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x317(%rsp), %rdi
callq 0x84a0
jmp 0x23b4b
leaq 0x88211(%rip), %rsi     # 0xab2f5
leaq 0x2e0(%rsp), %rdi
callq 0x85c0
jmp 0x230f3
jmp 0x23158
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0x23b31
leaq 0x881e7(%rip), %rsi     # 0xab2fc
leaq 0x2e0(%rsp), %rdi
callq 0x85c0
jmp 0x23124
jmp 0x23158
leaq 0x881d4(%rip), %rsi     # 0xab301
leaq 0x2e0(%rsp), %rdi
callq 0x85c0
jmp 0x2313c
jmp 0x23158
leaq 0x881c3(%rip), %rsi     # 0xab308
leaq 0x2e0(%rsp), %rdi
callq 0x85c0
jmp 0x23154
jmp 0x23158
jmp 0x23158
movq 0x338(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x2c0(%rsp), %rdi
leaq 0x318(%rsp), %rsi
callq 0x81a0
jmp 0x2317c
leaq 0x2a0(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x81a0
jmp 0x23193
movq 0x40(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
leaq 0x2a0(%rsp), %rdx
callq 0xa7eb0
jmp 0x231af
leaq 0x2a0(%rsp), %rdi
callq 0x8848
leaq 0x2c0(%rsp), %rdi
callq 0x8848
leaq 0x8813c(%rip), %rsi     # 0xab30c
leaq 0x318(%rsp), %rdi
callq 0x85c0
jmp 0x231df
movq 0x50(%rsp), %rax
movl 0x8(%rax), %eax
movq %rax, 0x38(%rsp)
subq $0x3, %rax
ja 0x232b4
movq 0x38(%rsp), %rax
leaq 0x88076(%rip), %rcx     # 0xab278
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0x23242
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x2a0(%rsp), %rdi
callq 0x8848
leaq 0x2c0(%rsp), %rdi
callq 0x8848
jmp 0x23b31
leaq 0x880d0(%rip), %rsi     # 0xab32b
leaq 0x2e0(%rsp), %rdi
callq 0x85c0
jmp 0x2326a
jmp 0x232b4
leaq 0x880d5(%rip), %rsi     # 0xab348
leaq 0x2e0(%rsp), %rdi
callq 0x85c0
jmp 0x23282
jmp 0x232b4
leaq 0x880ab(%rip), %rsi     # 0xab336
leaq 0x2e0(%rsp), %rdi
callq 0x85c0
jmp 0x2329a
jmp 0x232b4
leaq 0x8809f(%rip), %rsi     # 0xab342
leaq 0x2e0(%rsp), %rdi
callq 0x85c0
jmp 0x232b2
jmp 0x232b4
movq 0x338(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x280(%rsp), %rdi
leaq 0x318(%rsp), %rsi
callq 0x81a0
jmp 0x232d8
leaq 0x260(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x81a0
jmp 0x232ef
movq 0x30(%rsp), %rdi
leaq 0x280(%rsp), %rsi
leaq 0x260(%rsp), %rdx
callq 0xa7eb0
jmp 0x2330b
leaq 0x260(%rsp), %rdi
callq 0x8848
leaq 0x280(%rsp), %rdi
callq 0x8848
leaq 0x88027(%rip), %rsi     # 0xab353
leaq 0x318(%rsp), %rdi
callq 0x85c0
jmp 0x2333b
leaq 0x8873d(%rip), %rsi     # 0xaba7f
leaq 0x2e0(%rsp), %rdi
callq 0x85c0
jmp 0x23351
movl $0x0, 0x25c(%rsp)
movq 0x50(%rsp), %rcx
movl 0x25c(%rsp), %eax
cmpl 0x3c(%rcx), %eax
jge 0x2345f
cmpl $0x0, 0x25c(%rsp)
jle 0x233dc
leaq 0x87fdd(%rip), %rsi     # 0xab35f
leaq 0x2e0(%rsp), %rdi
callq 0x8430
jmp 0x23391
jmp 0x233dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0x233ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x260(%rsp), %rdi
callq 0x8848
leaq 0x280(%rsp), %rdi
callq 0x8848
jmp 0x23b31
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x25c(%rsp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0x238(%rsp), %rdi
callq 0x18f30
jmp 0x233ff
leaq 0x2e0(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x8550
jmp 0x23416
leaq 0x238(%rsp), %rdi
callq 0x8848
movl 0x25c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x25c(%rsp)
jmp 0x2335c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x238(%rsp), %rdi
callq 0x8848
jmp 0x23b31
movq 0x338(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x218(%rsp), %rdi
leaq 0x318(%rsp), %rsi
callq 0x81a0
jmp 0x23483
leaq 0x1f8(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x81a0
jmp 0x2349a
movq 0x28(%rsp), %rdi
leaq 0x218(%rsp), %rsi
leaq 0x1f8(%rsp), %rdx
callq 0xa7eb0
jmp 0x234b6
leaq 0x1f8(%rsp), %rdi
callq 0x8848
leaq 0x218(%rsp), %rdi
callq 0x8848
leaq 0x87e8a(%rip), %rsi     # 0xab361
leaq 0x318(%rsp), %rdi
callq 0x85c0
jmp 0x234e6
leaq 0x88592(%rip), %rsi     # 0xaba7f
leaq 0x2e0(%rsp), %rdi
callq 0x85c0
jmp 0x234fc
movl $0x0, 0x1f4(%rsp)
movq 0x50(%rsp), %rcx
movl 0x1f4(%rsp), %eax
cmpl 0x40(%rcx), %eax
jge 0x2360a
cmpl $0x0, 0x1f4(%rsp)
jle 0x23587
leaq 0x87e32(%rip), %rsi     # 0xab35f
leaq 0x2e0(%rsp), %rdi
callq 0x8430
jmp 0x2353c
jmp 0x23587
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0x23575
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0x8848
leaq 0x218(%rsp), %rdi
callq 0x8848
jmp 0x23b31
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x1f4(%rsp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0x1d0(%rsp), %rdi
callq 0x18f30
jmp 0x235aa
leaq 0x2e0(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x8550
jmp 0x235c1
leaq 0x1d0(%rsp), %rdi
callq 0x8848
movl 0x1f4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1f4(%rsp)
jmp 0x23507
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x1d0(%rsp), %rdi
callq 0x8848
jmp 0x23b31
movq 0x338(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x1b0(%rsp), %rdi
leaq 0x318(%rsp), %rsi
callq 0x81a0
jmp 0x2362e
leaq 0x190(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x81a0
jmp 0x23645
movq 0x20(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
leaq 0x190(%rsp), %rdx
callq 0xa7eb0
jmp 0x23661
leaq 0x190(%rsp), %rdi
callq 0x8848
leaq 0x1b0(%rsp), %rdi
callq 0x8848
leaq 0x87ce8(%rip), %rsi     # 0xab36a
leaq 0x318(%rsp), %rdi
callq 0x85c0
jmp 0x23691
leaq 0x883e7(%rip), %rsi     # 0xaba7f
leaq 0x2e0(%rsp), %rdi
callq 0x85c0
jmp 0x236a7
movl $0x0, 0x18c(%rsp)
movq 0x50(%rsp), %rcx
movl 0x18c(%rsp), %eax
cmpl 0x44(%rcx), %eax
jge 0x237b5
cmpl $0x0, 0x18c(%rsp)
jle 0x23732
leaq 0x87c87(%rip), %rsi     # 0xab35f
leaq 0x2e0(%rsp), %rdi
callq 0x8430
jmp 0x236e7
jmp 0x23732
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0x23720
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x8848
leaq 0x1b0(%rsp), %rdi
callq 0x8848
jmp 0x23b31
movq 0x50(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0x18c(%rsp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0x168(%rsp), %rdi
callq 0x18f30
jmp 0x23755
leaq 0x2e0(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x8550
jmp 0x2376c
leaq 0x168(%rsp), %rdi
callq 0x8848
movl 0x18c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18c(%rsp)
jmp 0x236b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x168(%rsp), %rdi
callq 0x8848
jmp 0x23b31
movq 0x338(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x148(%rsp), %rdi
leaq 0x318(%rsp), %rsi
callq 0x81a0
jmp 0x237d9
leaq 0x128(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x81a0
jmp 0x237f0
movq 0x18(%rsp), %rdi
leaq 0x148(%rsp), %rsi
leaq 0x128(%rsp), %rdx
callq 0xa7eb0
jmp 0x2380c
leaq 0x128(%rsp), %rdi
callq 0x8848
leaq 0x148(%rsp), %rdi
callq 0x8848
leaq 0x87b45(%rip), %rsi     # 0xab372
leaq 0x318(%rsp), %rdi
callq 0x85c0
jmp 0x2383c
leaq 0x8823c(%rip), %rsi     # 0xaba7f
leaq 0x2e0(%rsp), %rdi
callq 0x85c0
jmp 0x23852
movl $0x0, 0x124(%rsp)
movq 0x50(%rsp), %rcx
movl 0x124(%rsp), %eax
cmpl 0x48(%rcx), %eax
jge 0x23960
cmpl $0x0, 0x124(%rsp)
jle 0x238dd
leaq 0x87adc(%rip), %rsi     # 0xab35f
leaq 0x2e0(%rsp), %rdi
callq 0x8430
jmp 0x23892
jmp 0x238dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0x238cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x8848
leaq 0x148(%rsp), %rdi
callq 0x8848
jmp 0x23b31
movq 0x50(%rsp), %rax
movq 0x30(%rax), %rax
movslq 0x124(%rsp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0x100(%rsp), %rdi
callq 0x18f30
jmp 0x23900
leaq 0x2e0(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x8550
jmp 0x23917
leaq 0x100(%rsp), %rdi
callq 0x8848
movl 0x124(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x124(%rsp)
jmp 0x2385d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x8848
jmp 0x23b31
movq 0x338(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xe0(%rsp), %rdi
leaq 0x318(%rsp), %rsi
callq 0x81a0
jmp 0x23984
leaq 0xc0(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x81a0
jmp 0x2399b
movq 0x10(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0xa7eb0
jmp 0x239b7
leaq 0xc0(%rsp), %rdi
callq 0x8848
leaq 0xe0(%rsp), %rdi
callq 0x8848
leaq 0x879a4(%rip), %rsi     # 0xab37c
leaq 0x318(%rsp), %rdi
callq 0x85c0
jmp 0x239e7
movq 0x50(%rsp), %rax
movl 0x38(%rax), %esi
leaq 0xa0(%rsp), %rdi
callq 0x18f30
jmp 0x239fe
leaq 0x2e0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
movq %rsi, (%rsp)
callq 0x8510
movq (%rsp), %rdi
callq 0x8848
movq 0x338(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x318(%rsp), %rsi
callq 0x81a0
jmp 0x23a44
leaq 0x60(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x81a0
jmp 0x23a58
movq 0x8(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0xa7eb0
jmp 0x23a71
leaq 0x60(%rsp), %rdi
callq 0x8848
leaq 0x80(%rsp), %rdi
callq 0x8848
leaq 0x2e0(%rsp), %rdi
callq 0x8848
leaq 0x318(%rsp), %rdi
callq 0x8848
addq $0x348, %rsp            # imm = 0x348
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0x23ae1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x8848
leaq 0xe0(%rsp), %rdi
callq 0x8848
jmp 0x23b31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
jmp 0x23b24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x308(%rsp)
movl %eax, 0x304(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x8848
leaq 0x80(%rsp), %rdi
callq 0x8848
leaq 0x2e0(%rsp), %rdi
callq 0x8848
leaq 0x318(%rsp), %rdi
callq 0x8848
movq 0x308(%rsp), %rdi
callq 0x8770
nopl (%rax,%rax)