// File: CMU-SAFARI[P]MQSim/src/ssd/TSU_Priority_OutOfOrder.cpp
// Function: SSD_Components::TSU_Priority_OutOfOrder::Report_results_in_XML(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Utils::XmlWriter&)
void TSU_Priority_OutOfOrder::Report_results_in_XML(std::string name_prefix, Utils::XmlWriter &xmlwriter)
{
    name_prefix = name_prefix + ".TSU";
    xmlwriter.Write_open_tag(name_prefix);

    TSU_Base::Report_results_in_XML(name_prefix, xmlwriter);

    for (unsigned int channelID = 0; channelID < channel_count; channelID++)
    {
        for (unsigned int chip_cntr = 0; chip_cntr < chip_no_per_channel; chip_cntr++)
        {
            for (unsigned int priorityClass = 0; priorityClass < IO_Flow_Priority_Class::NUMBER_OF_PRIORITY_LEVELS; priorityClass++)
            {
                UserReadTRQueue[channelID][chip_cntr][priorityClass].Report_results_in_XML(name_prefix + ".User_Read_TR_Queue.Priority." + IO_Flow_Priority_Class::to_string(priorityClass), xmlwriter);
            }
        }
    }

    for (unsigned int channelID = 0; channelID < channel_count; channelID++)
    {
        for (unsigned int chip_cntr = 0; chip_cntr < chip_no_per_channel; chip_cntr++)
        {
            for (unsigned int priorityClass = 0; priorityClass < IO_Flow_Priority_Class::NUMBER_OF_PRIORITY_LEVELS; priorityClass++)
            {
                UserWriteTRQueue[channelID][chip_cntr][priorityClass].Report_results_in_XML(name_prefix + ".User_Write_TR_Queue.Priority." + IO_Flow_Priority_Class::to_string(priorityClass), xmlwriter);
            }
        }
    }

    for (unsigned int channelID = 0; channelID < channel_count; channelID++)
    {
        for (unsigned int chip_cntr = 0; chip_cntr < chip_no_per_channel; chip_cntr++)
        {
            MappingReadTRQueue[channelID][chip_cntr].Report_results_in_XML(name_prefix + ".Mapping_Read_TR_Queue", xmlwriter);
        }
    }

    for (unsigned int channelID = 0; channelID < channel_count; channelID++)
    {
        for (unsigned int chip_cntr = 0; chip_cntr < chip_no_per_channel; chip_cntr++)
        {
            MappingWriteTRQueue[channelID][chip_cntr].Report_results_in_XML(name_prefix + ".Mapping_Write_TR_Queue", xmlwriter);
        }
    }

    for (unsigned int channelID = 0; channelID < channel_count; channelID++)
    {
        for (unsigned int chip_cntr = 0; chip_cntr < chip_no_per_channel; chip_cntr++)
        {
            GCReadTRQueue[channelID][chip_cntr].Report_results_in_XML(name_prefix + ".GC_Read_TR_Queue", xmlwriter);
        }
    }

    for (unsigned int channelID = 0; channelID < channel_count; channelID++)
    {
        for (unsigned int chip_cntr = 0; chip_cntr < chip_no_per_channel; chip_cntr++)
        {
            GCWriteTRQueue[channelID][chip_cntr].Report_results_in_XML(name_prefix + ".GC_Write_TR_Queue", xmlwriter);
        }
    }

    for (unsigned int channelID = 0; channelID < channel_count; channelID++)
    {
        for (unsigned int chip_cntr = 0; chip_cntr < chip_no_per_channel; chip_cntr++)
        {
            GCEraseTRQueue[channelID][chip_cntr].Report_results_in_XML(name_prefix + ".GC_Erase_TR_Queue", xmlwriter);
        }
    }

    xmlwriter.Write_close_tag();
}

// Assembly:
subq $0x318, %rsp            # imm = 0x318
movq %rsi, 0xd0(%rsp)
movq %rdi, 0x310(%rsp)
movq %rsi, 0x308(%rsp)
movq %rdx, 0x300(%rsp)
movq 0x310(%rsp), %rax
movq %rax, 0xc0(%rsp)
leaq 0x9d37(%rip), %rdx      # 0xab7d5
leaq 0x2e0(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0x1fe40
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdi
callq 0x8510
movq 0xc8(%rsp), %rdi
callq 0x8848
movq 0xd0(%rsp), %rsi
movq 0x300(%rsp), %rax
movq %rax, 0xd8(%rsp)
leaq 0x2c0(%rsp), %rdi
movq %rdi, 0xe0(%rsp)
callq 0x81a0
movq 0xd8(%rsp), %rdi
movq 0xe0(%rsp), %rsi
callq 0xa7d60
jmp 0xa1b19
leaq 0x2c0(%rsp), %rdi
callq 0x8848
movq 0xd0(%rsp), %rsi
leaq 0x290(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
callq 0x81a0
movq 0xc0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movq 0x300(%rsp), %rdx
callq 0x9b290
jmp 0xa1b62
leaq 0x290(%rsp), %rdi
callq 0x8848
movl $0x0, 0x28c(%rsp)
movq 0xc0(%rsp), %rcx
movl 0x28c(%rsp), %eax
cmpl 0x44(%rcx), %eax
jae 0xa1daa
movl $0x0, 0x288(%rsp)
movq 0xc0(%rsp), %rcx
movl 0x288(%rsp), %eax
cmpl 0x48(%rcx), %eax
jae 0xa1d92
movl $0x0, 0x284(%rsp)
cmpl $0x4, 0x284(%rsp)
jae 0xa1d7a
movq 0xd0(%rsp), %rsi
movq 0xc0(%rsp), %rax
movq 0xb0(%rax), %rax
movl 0x28c(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movl 0x288(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movl 0x284(%rsp), %ecx
movl %ecx, %edx
movq %rdx, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rdx,8), %rcx
addq %rcx, %rax
movq %rax, 0xb0(%rsp)
leaq 0xce43(%rip), %rdx      # 0xaea64
leaq 0x240(%rsp), %rdi
callq 0x1fe40
movl 0x284(%rsp), %esi
leaq 0x220(%rsp), %rdi
callq 0xa3ea0
jmp 0xa1c44
leaq 0x260(%rsp), %rdi
leaq 0x240(%rsp), %rsi
leaq 0x220(%rsp), %rdx
callq 0xd0b0
jmp 0xa1c63
movq 0xb0(%rsp), %rdi
movq 0x300(%rsp), %rdx
movq (%rdi), %rax
movq (%rax), %rax
leaq 0x260(%rsp), %rsi
callq *%rax
jmp 0xa1c85
leaq 0x260(%rsp), %rdi
callq 0x8848
leaq 0x220(%rsp), %rdi
callq 0x8848
leaq 0x240(%rsp), %rdi
callq 0x8848
movl 0x284(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x284(%rsp)
jmp 0xa1bc0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0x8848
jmp 0xa25b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
leaq 0x290(%rsp), %rdi
callq 0x8848
jmp 0xa25b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
jmp 0xa1d68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
jmp 0xa1d5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
leaq 0x260(%rsp), %rdi
callq 0x8848
leaq 0x220(%rsp), %rdi
callq 0x8848
leaq 0x240(%rsp), %rdi
callq 0x8848
jmp 0xa25b4
jmp 0xa1d7c
movl 0x288(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x288(%rsp)
jmp 0xa1b9d
jmp 0xa1d94
movl 0x28c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28c(%rsp)
jmp 0xa1b7a
movl $0x0, 0x21c(%rsp)
movq 0xc0(%rsp), %rcx
movl 0x21c(%rsp), %eax
cmpl 0x44(%rcx), %eax
jae 0xa1f99
movl $0x0, 0x218(%rsp)
movq 0xc0(%rsp), %rcx
movl 0x218(%rsp), %eax
cmpl 0x48(%rcx), %eax
jae 0xa1f81
movl $0x0, 0x214(%rsp)
cmpl $0x4, 0x214(%rsp)
jae 0xa1f69
movq 0xd0(%rsp), %rsi
movq 0xc0(%rsp), %rax
movq 0xb8(%rax), %rax
movl 0x21c(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movl 0x218(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movl 0x214(%rsp), %ecx
movl %ecx, %edx
movq %rdx, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rdx,8), %rcx
addq %rcx, %rax
movq %rax, 0xa8(%rsp)
leaq 0xcc26(%rip), %rdx      # 0xaea82
leaq 0x1d0(%rsp), %rdi
callq 0x1fe40
movl 0x214(%rsp), %esi
leaq 0x1b0(%rsp), %rdi
callq 0xa3ea0
jmp 0xa1e7f
leaq 0x1f0(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
leaq 0x1b0(%rsp), %rdx
callq 0xd0b0
jmp 0xa1e9e
movq 0xa8(%rsp), %rdi
movq 0x300(%rsp), %rdx
movq (%rdi), %rax
movq (%rax), %rax
leaq 0x1f0(%rsp), %rsi
callq *%rax
jmp 0xa1ec0
leaq 0x1f0(%rsp), %rdi
callq 0x8848
leaq 0x1b0(%rsp), %rdi
callq 0x8848
leaq 0x1d0(%rsp), %rdi
callq 0x8848
movl 0x214(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x214(%rsp)
jmp 0xa1dfb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
jmp 0xa1f57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
jmp 0xa1f4a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x8848
leaq 0x1b0(%rsp), %rdi
callq 0x8848
leaq 0x1d0(%rsp), %rdi
callq 0x8848
jmp 0xa25b4
jmp 0xa1f6b
movl 0x218(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x218(%rsp)
jmp 0xa1dd8
jmp 0xa1f83
movl 0x21c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x21c(%rsp)
jmp 0xa1db5
movl $0x0, 0x1ac(%rsp)
movq 0xc0(%rsp), %rcx
movl 0x1ac(%rsp), %eax
cmpl 0x44(%rcx), %eax
jae 0xa20e0
movl $0x0, 0x1a8(%rsp)
movq 0xc0(%rsp), %rcx
movl 0x1a8(%rsp), %eax
cmpl 0x48(%rcx), %eax
jae 0xa20c8
movq 0xd0(%rsp), %rsi
movq 0xc0(%rsp), %rax
movq 0xd8(%rax), %rax
movl 0x1ac(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x90(%rsp)
movl 0x1a8(%rsp), %ecx
movl %ecx, %edx
movq %rdx, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rdx,8), %rcx
movq %rcx, 0x88(%rsp)
addq %rcx, %rax
movq %rax, 0x98(%rsp)
leaq 0xc8d9(%rip), %rdx      # 0xae910
leaq 0x188(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
callq 0x1fe40
movq 0x88(%rsp), %rcx
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0x300(%rsp), %rdx
movq (%rax,%rcx), %rax
movq (%rax), %rax
callq *%rax
jmp 0xa207f
leaq 0x188(%rsp), %rdi
callq 0x8848
movl 0x1a8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1a8(%rsp)
jmp 0xa1fc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x8848
jmp 0xa25b4
jmp 0xa20ca
movl 0x1ac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1ac(%rsp)
jmp 0xa1fa4
movl $0x0, 0x184(%rsp)
movq 0xc0(%rsp), %rcx
movl 0x184(%rsp), %eax
cmpl 0x44(%rcx), %eax
jae 0xa2215
movl $0x0, 0x180(%rsp)
movq 0xc0(%rsp), %rcx
movl 0x180(%rsp), %eax
cmpl 0x48(%rcx), %eax
jae 0xa21fd
movq 0xd0(%rsp), %rsi
movq 0xc0(%rsp), %rax
movq 0xe0(%rax), %rax
movl 0x184(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x70(%rsp)
movl 0x180(%rsp), %ecx
movl %ecx, %edx
movq %rdx, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rdx,8), %rcx
movq %rcx, 0x68(%rsp)
addq %rcx, %rax
movq %rax, 0x78(%rsp)
leaq 0xc7b2(%rip), %rdx      # 0xae927
leaq 0x160(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x1fe40
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x300(%rsp), %rdx
movq (%rax,%rcx), %rax
movq (%rax), %rax
callq *%rax
jmp 0xa21b4
leaq 0x160(%rsp), %rdi
callq 0x8848
movl 0x180(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x180(%rsp)
jmp 0xa210e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x8848
jmp 0xa25b4
jmp 0xa21ff
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x184(%rsp)
jmp 0xa20eb
movl $0x0, 0x15c(%rsp)
movq 0xc0(%rsp), %rcx
movl 0x15c(%rsp), %eax
cmpl 0x44(%rcx), %eax
jae 0xa2344
movl $0x0, 0x158(%rsp)
movq 0xc0(%rsp), %rcx
movl 0x158(%rsp), %eax
cmpl 0x48(%rcx), %eax
jae 0xa232c
movq 0xd0(%rsp), %rsi
movq 0xc0(%rsp), %rax
movq 0xc0(%rax), %rax
movl 0x15c(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x50(%rsp)
movl 0x158(%rsp), %ecx
movl %ecx, %edx
movq %rdx, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rdx,8), %rcx
movq %rcx, 0x48(%rsp)
addq %rcx, %rax
movq %rax, 0x58(%rsp)
leaq 0xc695(%rip), %rdx      # 0xae93f
leaq 0x138(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x1fe40
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x300(%rsp), %rdx
movq (%rax,%rcx), %rax
movq (%rax), %rax
callq *%rax
jmp 0xa22e3
leaq 0x138(%rsp), %rdi
callq 0x8848
movl 0x158(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x158(%rsp)
jmp 0xa2243
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x8848
jmp 0xa25b4
jmp 0xa232e
movl 0x15c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x15c(%rsp)
jmp 0xa2220
movl $0x0, 0x134(%rsp)
movq 0xc0(%rsp), %rcx
movl 0x134(%rsp), %eax
cmpl 0x44(%rcx), %eax
jae 0xa2473
movl $0x0, 0x130(%rsp)
movq 0xc0(%rsp), %rcx
movl 0x130(%rsp), %eax
cmpl 0x48(%rcx), %eax
jae 0xa245b
movq 0xd0(%rsp), %rsi
movq 0xc0(%rsp), %rax
movq 0xc8(%rax), %rax
movl 0x134(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x30(%rsp)
movl 0x130(%rsp), %ecx
movl %ecx, %edx
movq %rdx, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rdx,8), %rcx
movq %rcx, 0x28(%rsp)
addq %rcx, %rax
movq %rax, 0x38(%rsp)
leaq 0xc578(%rip), %rdx      # 0xae951
leaq 0x110(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x1fe40
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x300(%rsp), %rdx
movq (%rax,%rcx), %rax
movq (%rax), %rax
callq *%rax
jmp 0xa2412
leaq 0x110(%rsp), %rdi
callq 0x8848
movl 0x130(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x130(%rsp)
jmp 0xa2372
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x8848
jmp 0xa25b4
jmp 0xa245d
movl 0x134(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x134(%rsp)
jmp 0xa234f
movl $0x0, 0x10c(%rsp)
movq 0xc0(%rsp), %rcx
movl 0x10c(%rsp), %eax
cmpl 0x44(%rcx), %eax
jae 0xa259f
movl $0x0, 0x108(%rsp)
movq 0xc0(%rsp), %rcx
movl 0x108(%rsp), %eax
cmpl 0x48(%rcx), %eax
jae 0xa2587
movq 0xd0(%rsp), %rsi
movq 0xc0(%rsp), %rax
movq 0xd0(%rax), %rax
movl 0x10c(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movl 0x108(%rsp), %ecx
movl %ecx, %edx
movq %rdx, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rdx,8), %rcx
movq %rcx, 0x8(%rsp)
addq %rcx, %rax
movq %rax, 0x18(%rsp)
leaq 0xc45c(%rip), %rdx      # 0xae964
leaq 0xe8(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x1fe40
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x300(%rsp), %rdx
movq (%rax,%rcx), %rax
movq (%rax), %rax
callq *%rax
jmp 0xa2541
leaq 0xe8(%rsp), %rdi
callq 0x8848
movl 0x108(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x108(%rsp)
jmp 0xa24a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b8(%rsp)
movl %eax, 0x2b4(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x8848
jmp 0xa25b4
jmp 0xa2589
movl 0x10c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10c(%rsp)
jmp 0xa247e
movq 0x300(%rsp), %rdi
callq 0xa80f0
addq $0x318, %rsp            # imm = 0x318
retq
movq 0x2b8(%rsp), %rdi
callq 0x8770
nopw %cs:(%rax,%rax)