// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/TSU_Priority_OutOfOrder.cpp
// Function: SSD_Components::TSU_Priority_OutOfOrder::~TSU_Priority_OutOfOrder()
TSU_Priority_OutOfOrder::~TSU_Priority_OutOfOrder()
{
    for (unsigned int channelID = 0; channelID < channel_count; channelID++)
    {
        for (unsigned int chipId = 0; chipId < chip_no_per_channel; chipId++)
        {
            delete[] UserReadTRQueue[channelID][chipId];
            delete[] UserWriteTRQueue[channelID][chipId];
        }
        delete[] nextPriorityClassRead[channelID];
        delete[] nextPriorityClassWrite[channelID];
        delete[] currentWeightRead[channelID];
        delete[] currentWeightWrite[channelID];
        delete[] GCReadTRQueue[channelID];
        delete[] GCWriteTRQueue[channelID];
        delete[] GCEraseTRQueue[channelID];
        delete[] MappingReadTRQueue[channelID];
        delete[] MappingWriteTRQueue[channelID];
    }
    delete[] UserReadTRQueue;
    delete[] UserWriteTRQueue;
    delete[] nextPriorityClassRead;
    delete[] nextPriorityClassWrite;
    delete[] currentWeightRead;
    delete[] currentWeightWrite;
    delete[] GCReadTRQueue;
    delete[] GCWriteTRQueue;
    delete[] GCEraseTRQueue;
    delete[] MappingReadTRQueue;
    delete[] MappingWriteTRQueue;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2328d(%rip), %rax     # 0x61c98
movq %rax, (%rdi)
xorl %r15d, %r15d
movl 0x44(%rbx), %eax
cmpq %rax, %r15
jae 0x3ec7f
xorl %r12d, %r12d
movl 0x48(%rbx), %eax
cmpq %rax, %r12
jae 0x3eaca
movq 0xb0(%rbx), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r12,8), %r14
testq %r14, %r14
je 0x3ea77
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x3ea6b
leaq -0x108(%r14), %r13
imulq $0x108, %rax, %rbp      # imm = 0x108
movq %r13, %rdi
addq %rbp, %rdi
callq 0x38cc8
addq $-0x108, %rbp           # imm = 0xFEF8
jne 0x3ea57
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7430
movq 0xb8(%rbx), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r12,8), %r14
testq %r14, %r14
je 0x3eac2
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x3eab6
leaq -0x108(%r14), %r13
imulq $0x108, %rax, %rbp      # imm = 0x108
movq %r13, %rdi
addq %rbp, %rdi
callq 0x38cc8
addq $-0x108, %rbp           # imm = 0xFEF8
jne 0x3eaa2
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7430
incq %r12
jmp 0x3ea20
movq 0xe8(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x3eadf
callq 0x7430
movq 0xf0(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x3eaf4
callq 0x7430
movq 0xf8(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x3eb09
callq 0x7430
movq 0x100(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x3eb1e
callq 0x7430
movq 0xc0(%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x3eb63
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x3eb57
leaq -0x108(%r14), %r12
imulq $0x108, %rax, %r13      # imm = 0x108
leaq (%r12,%r13), %rdi
callq 0x38cc8
addq $-0x108, %r13           # imm = 0xFEF8
jne 0x3eb45
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7430
movq 0xc8(%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x3eba8
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x3eb9c
leaq -0x108(%r14), %r12
imulq $0x108, %rax, %r13      # imm = 0x108
leaq (%r12,%r13), %rdi
callq 0x38cc8
addq $-0x108, %r13           # imm = 0xFEF8
jne 0x3eb8a
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7430
movq 0xd0(%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x3ebed
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x3ebe1
leaq -0x108(%r14), %r12
imulq $0x108, %rax, %r13      # imm = 0x108
leaq (%r12,%r13), %rdi
callq 0x38cc8
addq $-0x108, %r13           # imm = 0xFEF8
jne 0x3ebcf
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7430
movq 0xd8(%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x3ec32
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x3ec26
leaq -0x108(%r14), %r12
imulq $0x108, %rax, %r13      # imm = 0x108
leaq (%r12,%r13), %rdi
callq 0x38cc8
addq $-0x108, %r13           # imm = 0xFEF8
jne 0x3ec14
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7430
movq 0xe0(%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x3ec77
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x3ec6b
leaq -0x108(%r14), %r12
imulq $0x108, %rax, %r13      # imm = 0x108
leaq (%r12,%r13), %rdi
callq 0x38cc8
addq $-0x108, %r13           # imm = 0xFEF8
jne 0x3ec59
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7430
incq %r15
jmp 0x3ea11
movq 0xb0(%rbx), %rdi
testq %rdi, %rdi
je 0x3ec90
callq 0x7430
movq 0xb8(%rbx), %rdi
testq %rdi, %rdi
je 0x3eca1
callq 0x7430
movq 0xe8(%rbx), %rdi
testq %rdi, %rdi
je 0x3ecb2
callq 0x7430
movq 0xf0(%rbx), %rdi
testq %rdi, %rdi
je 0x3ecc3
callq 0x7430
movq 0xf8(%rbx), %rdi
testq %rdi, %rdi
je 0x3ecd4
callq 0x7430
movq 0x100(%rbx), %rdi
testq %rdi, %rdi
je 0x3ece5
callq 0x7430
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0x3ecf6
callq 0x7430
movq 0xc8(%rbx), %rdi
testq %rdi, %rdi
je 0x3ed07
callq 0x7430
movq 0xd0(%rbx), %rdi
testq %rdi, %rdi
je 0x3ed18
callq 0x7430
movq 0xd8(%rbx), %rdi
testq %rdi, %rdi
je 0x3ed29
callq 0x7430
movq 0xe0(%rbx), %rdi
testq %rdi, %rdi
je 0x3ed3a
callq 0x7430
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3bf48