// File: /workspace/github_cpp_makefile_star2_O3/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
subq $0x18, %rsp
movq %rdi, %rbp
leaq 0x1edfc(%rip), %rax     # 0x6ecb8
movq %rax, (%rdi)
cmpl $0x0, 0x44(%rdi)
je 0x50476
movq $0x0, 0x8(%rsp)
leaq 0x1e587(%rip), %r12     # 0x6e460
addq $0x10, %r12
movq %rbp, 0x10(%rsp)
cmpl $0x0, 0x48(%rbp)
je 0x50076
xorl %r13d, %r13d
movq 0xb0(%rbp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax,%r13,8), %r14
testq %r14, %r14
je 0x4ffab
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x4ff9a
movq %rax, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rax,8), %rbp
addq %r14, %rbp
movq %r12, -0x108(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x477c0
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x4ff45
callq 0x7370
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x4ff53
callq 0x7370
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x4ff6b
callq 0x7370
leaq -0x100(%rbp), %r15
movq -0x100(%rbp), %rdi
cmpq %r15, %rdi
je 0x4ff8e
movq (%rdi), %rbx
callq 0x7370
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x4ff7e
addq $-0x108, %rbp           # imm = 0xFEF8
cmpq %r14, %rbp
jne 0x4ff27
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7480
movq 0x10(%rsp), %rbp
movq 0xb8(%rbp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax,%r13,8), %r14
testq %r14, %r14
je 0x50067
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x50056
movq %rax, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rax,8), %rbp
addq %r14, %rbp
movq %r12, -0x108(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x477c0
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x50001
callq 0x7370
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x5000f
callq 0x7370
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x50027
callq 0x7370
leaq -0x100(%rbp), %r15
movq -0x100(%rbp), %rdi
cmpq %r15, %rdi
je 0x5004a
movq (%rdi), %rbx
callq 0x7370
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x5003a
addq $-0x108, %rbp           # imm = 0xFEF8
cmpq %r14, %rbp
jne 0x4ffe3
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7480
movq 0x10(%rsp), %rbp
incq %r13
movl 0x48(%rbp), %eax
cmpq %rax, %r13
jb 0x4feef
movq 0xe8(%rbp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x50090
callq 0x7480
movq 0xf0(%rbp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x500aa
callq 0x7480
movq 0xf8(%rbp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x500c4
callq 0x7480
movq 0x100(%rbp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x500de
callq 0x7480
movq 0xc0(%rbp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x50191
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x50185
movq %rax, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rax,8), %r13
addq %r14, %r13
movq %r12, -0x108(%r13)
leaq -0x48(%r13), %rdi
callq 0x477c0
movq -0x60(%r13), %rdi
testq %rdi, %rdi
je 0x50130
callq 0x7370
movq -0x78(%r13), %rdi
testq %rdi, %rdi
je 0x5013e
callq 0x7370
movq -0xe8(%r13), %rdi
leaq -0xd8(%r13), %rax
cmpq %rax, %rdi
je 0x50156
callq 0x7370
leaq -0x100(%r13), %r15
movq -0x100(%r13), %rdi
cmpq %r15, %rdi
je 0x50179
movq (%rdi), %rbx
callq 0x7370
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x50169
addq $-0x108, %r13           # imm = 0xFEF8
cmpq %r14, %r13
jne 0x50112
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7480
movq 0xc8(%rbp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x50244
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x50238
movq %rax, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rax,8), %r13
addq %r14, %r13
movq %r12, -0x108(%r13)
leaq -0x48(%r13), %rdi
callq 0x477c0
movq -0x60(%r13), %rdi
testq %rdi, %rdi
je 0x501e3
callq 0x7370
movq -0x78(%r13), %rdi
testq %rdi, %rdi
je 0x501f1
callq 0x7370
movq -0xe8(%r13), %rdi
leaq -0xd8(%r13), %rax
cmpq %rax, %rdi
je 0x50209
callq 0x7370
leaq -0x100(%r13), %r15
movq -0x100(%r13), %rdi
cmpq %r15, %rdi
je 0x5022c
movq (%rdi), %rbx
callq 0x7370
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x5021c
addq $-0x108, %r13           # imm = 0xFEF8
cmpq %r14, %r13
jne 0x501c5
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7480
movq 0xd0(%rbp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x502f7
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x502eb
movq %rax, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rax,8), %r13
addq %r14, %r13
movq %r12, -0x108(%r13)
leaq -0x48(%r13), %rdi
callq 0x477c0
movq -0x60(%r13), %rdi
testq %rdi, %rdi
je 0x50296
callq 0x7370
movq -0x78(%r13), %rdi
testq %rdi, %rdi
je 0x502a4
callq 0x7370
movq -0xe8(%r13), %rdi
leaq -0xd8(%r13), %rax
cmpq %rax, %rdi
je 0x502bc
callq 0x7370
leaq -0x100(%r13), %r15
movq -0x100(%r13), %rdi
cmpq %r15, %rdi
je 0x502df
movq (%rdi), %rbx
callq 0x7370
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x502cf
addq $-0x108, %r13           # imm = 0xFEF8
cmpq %r14, %r13
jne 0x50278
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7480
movq 0xd8(%rbp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x503aa
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x5039e
movq %rax, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rax,8), %r13
addq %r14, %r13
movq %r12, -0x108(%r13)
leaq -0x48(%r13), %rdi
callq 0x477c0
movq -0x60(%r13), %rdi
testq %rdi, %rdi
je 0x50349
callq 0x7370
movq -0x78(%r13), %rdi
testq %rdi, %rdi
je 0x50357
callq 0x7370
movq -0xe8(%r13), %rdi
leaq -0xd8(%r13), %rax
cmpq %rax, %rdi
je 0x5036f
callq 0x7370
leaq -0x100(%r13), %r15
movq -0x100(%r13), %rdi
cmpq %r15, %rdi
je 0x50392
movq (%rdi), %rbx
callq 0x7370
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x50382
addq $-0x108, %r13           # imm = 0xFEF8
cmpq %r14, %r13
jne 0x5032b
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7480
movq 0xe0(%rbp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x5045d
movq -0x8(%r14), %rax
testq %rax, %rax
je 0x50451
movq %rax, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rax,8), %r13
addq %r14, %r13
movq %r12, -0x108(%r13)
leaq -0x48(%r13), %rdi
callq 0x477c0
movq -0x60(%r13), %rdi
testq %rdi, %rdi
je 0x503fc
callq 0x7370
movq -0x78(%r13), %rdi
testq %rdi, %rdi
je 0x5040a
callq 0x7370
movq -0xe8(%r13), %rdi
leaq -0xd8(%r13), %rax
cmpq %rax, %rdi
je 0x50422
callq 0x7370
leaq -0x100(%r13), %r15
movq -0x100(%r13), %rdi
cmpq %r15, %rdi
je 0x50445
movq (%rdi), %rbx
callq 0x7370
movq %rbx, %rdi
cmpq %r15, %rbx
jne 0x50435
addq $-0x108, %r13           # imm = 0xFEF8
cmpq %r14, %r13
jne 0x503de
addq $-0x8, %r14
movq %r14, %rdi
callq 0x7480
movq 0x8(%rsp), %rdx
incq %rdx
movl 0x44(%rbp), %eax
movq %rdx, 0x8(%rsp)
cmpq %rax, %rdx
jb 0x4fee2
movq 0xb0(%rbp), %rdi
testq %rdi, %rdi
je 0x50487
callq 0x7480
movq 0xb8(%rbp), %rdi
testq %rdi, %rdi
je 0x50498
callq 0x7480
movq 0xe8(%rbp), %rdi
testq %rdi, %rdi
je 0x504a9
callq 0x7480
movq 0xf0(%rbp), %rdi
testq %rdi, %rdi
je 0x504ba
callq 0x7480
movq 0xf8(%rbp), %rdi
testq %rdi, %rdi
je 0x504cb
callq 0x7480
movq 0x100(%rbp), %rdi
testq %rdi, %rdi
je 0x504dc
callq 0x7480
movq 0xc0(%rbp), %rdi
testq %rdi, %rdi
je 0x504ed
callq 0x7480
movq 0xc8(%rbp), %rdi
testq %rdi, %rdi
je 0x504fe
callq 0x7480
movq 0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x5050f
callq 0x7480
movq 0xd8(%rbp), %rdi
testq %rdi, %rdi
je 0x50520
callq 0x7480
movq 0xe0(%rbp), %rdi
testq %rdi, %rdi
je 0x50531
callq 0x7480
movq %rbp, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4a5ba
nop