// File: CMU-SAFARI[P]MQSim/src/exec/SSD_Device.cpp
// Function: SSD_Device::Report_results_in_XML(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Utils::XmlWriter&)
void SSD_Device::Report_results_in_XML(std::string name_prefix, Utils::XmlWriter &xmlwriter)
{
	std::string tmp;
	tmp = ID();
	xmlwriter.Write_open_tag(tmp);

	this->Host_interface->Report_results_in_XML(ID(), xmlwriter);
	if (Memory_Type == NVM::NVM_Type::FLASH)
	{
		((SSD_Components::FTL *)this->Firmware)->Report_results_in_XML(ID(), xmlwriter);
		((SSD_Components::FTL *)this->Firmware)->TSU->Report_results_in_XML(ID(), xmlwriter);

		for (unsigned int channel_cntr = 0; channel_cntr < Channel_count; channel_cntr++)
		{
			for (unsigned int chip_cntr = 0; chip_cntr < Chip_no_per_channel; chip_cntr++)
			{
				((SSD_Components::ONFI_Channel_NVDDR2 *)Channels[channel_cntr])->Chips[chip_cntr]->Report_results_in_XML(ID(), xmlwriter);
			}
		}
	}
	xmlwriter.Write_close_tag();
}

// Assembly:
subq $0x158, %rsp            # imm = 0x158
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movq %rdx, 0x140(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x120(%rsp), %rdi
callq 0x85e0
movq 0x40(%rsp), %rsi
leaq 0x100(%rsp), %rdi
callq 0xcdf0
jmp 0x2cbdd
leaq 0x120(%rsp), %rdi
movq %rdi, 0x30(%rsp)
leaq 0x100(%rsp), %rsi
movq %rsi, 0x28(%rsp)
callq 0x8510
movq 0x28(%rsp), %rdi
callq 0x8848
movq 0x30(%rsp), %rsi
movq 0x140(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x81a0
jmp 0x2cc27
movq 0x38(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0xa7d60
jmp 0x2cc3b
leaq 0xd0(%rsp), %rdi
callq 0x8848
movq 0x40(%rsp), %rsi
movq 0x40(%rsi), %rax
addq $0x30, %rax
movq %rax, 0x20(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0xcdf0
jmp 0x2cc69
movq 0x20(%rsp), %rdi
movq 0x140(%rsp), %rdx
movq (%rdi), %rax
movq (%rax), %rax
leaq 0xb0(%rsp), %rsi
callq *%rax
jmp 0x2cc88
leaq 0xb0(%rsp), %rdi
callq 0x8848
movq 0x40(%rsp), %rax
cmpl $0x0, 0x3c(%rax)
jne 0x2ceac
movq 0x40(%rsp), %rsi
movq 0x50(%rsi), %rax
movq %rax, 0x18(%rsp)
leaq 0x90(%rsp), %rdi
callq 0xcdf0
jmp 0x2ccc1
movq 0x18(%rsp), %rdi
movq 0x140(%rsp), %rdx
movq (%rdi), %rax
movq 0x38(%rax), %rax
leaq 0x90(%rsp), %rsi
callq *%rax
jmp 0x2cce1
leaq 0x90(%rsp), %rdi
callq 0x8848
movq 0x40(%rsp), %rsi
movq 0x50(%rsi), %rax
movq 0x50(%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xcdf0
jmp 0x2cd0c
movq 0x10(%rsp), %rdi
movq 0x140(%rsp), %rdx
movq (%rdi), %rax
movq 0x38(%rax), %rax
leaq 0x70(%rsp), %rsi
callq *%rax
jmp 0x2cd29
leaq 0x70(%rsp), %rdi
callq 0x8848
movl $0x0, 0x6c(%rsp)
movq 0x40(%rsp), %rcx
movl 0x6c(%rsp), %eax
cmpl 0x78(%rcx), %eax
jae 0x2ceaa
movl $0x0, 0x68(%rsp)
movq 0x40(%rsp), %rcx
movl 0x68(%rsp), %eax
cmpl 0x7c(%rcx), %eax
jae 0x2ce98
movq 0x40(%rsp), %rdi
addq $0x60, %rdi
movl 0x6c(%rsp), %eax
movl %eax, %esi
callq 0x2d290
movq 0x40(%rsp), %rsi
movq (%rax), %rax
movq 0x8(%rax), %rax
movl 0x68(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
leaq 0x48(%rsp), %rdi
callq 0xcdf0
jmp 0x2cda0
movq 0x8(%rsp), %rdi
movq 0x140(%rsp), %rdx
leaq 0x48(%rsp), %rsi
callq 0x44b60
jmp 0x2cdb9
leaq 0x48(%rsp), %rdi
callq 0x8848
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0x2cd55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x2ced0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x8848
jmp 0x2ced0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x8848
jmp 0x2ced0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x8848
jmp 0x2ced0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x8848
jmp 0x2ced0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x8848
jmp 0x2ced0
jmp 0x2ce9a
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x2cd3b
jmp 0x2ceac
movq 0x140(%rsp), %rdi
callq 0xa80f0
jmp 0x2cebb
leaq 0x120(%rsp), %rdi
callq 0x8848
addq $0x158, %rsp            # imm = 0x158
retq
leaq 0x120(%rsp), %rdi
callq 0x8848
movq 0xf8(%rsp), %rdi
callq 0x8770
nopw (%rax,%rax)