// File: CMU-SAFARI[P]ramulator/src/Controller.h
// Function: ramulator::Controller<ramulator::DDR3>::~Controller()
~Controller(){
        delete scheduler;
        delete rowpolicy;
        delete rowtable;
        delete channel;
        delete refresh;
        for (auto& file : cmd_trace_files)
            file.close();
        cmd_trace_files.clear();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0x10a0(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x4e2dc
movq -0x30(%rbp), %rdi
callq 0x4e7a0
movq -0x30(%rbp), %rdi
movl $0x98, %esi
callq 0xc370
movq -0x38(%rbp), %rax
movq 0x10a8(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x4e308
movq -0x40(%rbp), %rdi
callq 0x4e7f0
movq -0x40(%rbp), %rdi
movl $0x90, %esi
callq 0xc370
movq -0x38(%rbp), %rax
movq 0x10b0(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x4e334
movq -0x48(%rbp), %rdi
callq 0x4e840
movq -0x48(%rbp), %rdi
movl $0x38, %esi
callq 0xc370
movq -0x38(%rbp), %rax
movq 0x1098(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
je 0x4e360
movq -0x50(%rbp), %rdi
callq 0x4e860
movq -0x50(%rbp), %rdi
movl $0x898, %esi            # imm = 0x898
callq 0xc370
movq -0x38(%rbp), %rax
movq 0x10b8(%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0x4e37f
movq -0x58(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x38(%rbp), %rax
addq $0x11c0, %rax           # imm = 0x11C0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4e9c0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4e9f0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x4ea20
testb $0x1, %al
jne 0x4e3ba
jmp 0x4e3df
leaq -0x18(%rbp), %rdi
callq 0x4ea60
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0xc4a0
jmp 0x4e3d2
jmp 0x4e3d4
leaq -0x18(%rbp), %rdi
callq 0x4ea80
jmp 0x4e3a7
movq -0x38(%rbp), %rdi
addq $0x11c0, %rdi           # imm = 0x11C0
callq 0x4eaa0
movq -0x38(%rbp), %rdi
addq $0x11c0, %rdi           # imm = 0x11C0
callq 0x2dd30
movq -0x38(%rbp), %rdi
addq $0x11a0, %rdi           # imm = 0x11A0
callq 0xc6b8
movq -0x38(%rbp), %rdi
addq $0x1140, %rdi           # imm = 0x1140
callq 0x2dd90
movq -0x38(%rbp), %rdi
addq $0x1120, %rdi           # imm = 0x1120
callq 0x2de00
movq -0x38(%rbp), %rdi
addq $0x1100, %rdi           # imm = 0x1100
callq 0x2de00
movq -0x38(%rbp), %rdi
addq $0x10e0, %rdi           # imm = 0x10E0
callq 0x2de00
movq -0x38(%rbp), %rdi
addq $0x10c0, %rdi           # imm = 0x10C0
callq 0x2de00
movq -0x38(%rbp), %rdi
addq $0xfe0, %rdi            # imm = 0xFE0
callq 0x2de20
movq -0x38(%rbp), %rdi
addq $0xf30, %rdi            # imm = 0xF30
callq 0x2de20
movq -0x38(%rbp), %rdi
addq $0xe80, %rdi            # imm = 0xE80
callq 0x2de20
movq -0x38(%rbp), %rdi
addq $0xdd0, %rdi            # imm = 0xDD0
callq 0x2de20
movq -0x38(%rbp), %rdi
addq $0xd20, %rdi            # imm = 0xD20
callq 0x2de20
movq -0x38(%rbp), %rdi
addq $0xc70, %rdi            # imm = 0xC70
callq 0x2de20
movq -0x38(%rbp), %rdi
addq $0xbd8, %rdi            # imm = 0xBD8
callq 0x262b0
movq -0x38(%rbp), %rdi
addq $0xb40, %rdi            # imm = 0xB40
callq 0x262b0
movq -0x38(%rbp), %rdi
addq $0xaa8, %rdi            # imm = 0xAA8
callq 0x262b0
movq -0x38(%rbp), %rdi
addq $0xa10, %rdi            # imm = 0xA10
callq 0x262b0
movq -0x38(%rbp), %rdi
addq $0x978, %rdi            # imm = 0x978
callq 0x262b0
movq -0x38(%rbp), %rdi
addq $0x8e0, %rdi            # imm = 0x8E0
callq 0x262b0
movq -0x38(%rbp), %rdi
addq $0x848, %rdi            # imm = 0x848
callq 0x262b0
movq -0x38(%rbp), %rdi
addq $0x7b0, %rdi            # imm = 0x7B0
callq 0x262b0
movq -0x38(%rbp), %rdi
addq $0x718, %rdi            # imm = 0x718
callq 0x262b0
movq -0x38(%rbp), %rdi
addq $0x668, %rdi            # imm = 0x668
callq 0x2de20
movq -0x38(%rbp), %rdi
addq $0x5b8, %rdi            # imm = 0x5B8
callq 0x2de20
movq -0x38(%rbp), %rdi
addq $0x508, %rdi            # imm = 0x508
callq 0x2de20
movq -0x38(%rbp), %rdi
addq $0x458, %rdi            # imm = 0x458
callq 0x2de20
movq -0x38(%rbp), %rdi
addq $0x3a8, %rdi            # imm = 0x3A8
callq 0x2de20
movq -0x38(%rbp), %rdi
addq $0x2f8, %rdi            # imm = 0x2F8
callq 0x2de20
movq -0x38(%rbp), %rdi
addq $0x260, %rdi            # imm = 0x260
callq 0x262b0
movq -0x38(%rbp), %rdi
addq $0x1c8, %rdi            # imm = 0x1C8
callq 0x262b0
movq -0x38(%rbp), %rdi
addq $0x130, %rdi            # imm = 0x130
callq 0x262b0
movq -0x38(%rbp), %rdi
addq $0x98, %rdi
callq 0x262b0
movq -0x38(%rbp), %rdi
callq 0x262b0
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x1c5c0
nopw %cs:(%rax,%rax)