// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]ramulator/src/TLDRAM.cpp
// Function: ramulator::TLDRAM::init_lambda()
void TLDRAM::init_lambda()
{
    lambda[int(Level::Bank)][int(Command::ACT)] = [] (DRAM<TLDRAM>* node, int id) {
        node->state = State::Opened;
        node->row_state[id] = State::Opened;
    };
    lambda[int(Level::Bank)][int(Command::ACTF)] = [] (DRAM<TLDRAM>* node, int id) {
        node->state = State::Opened;
        node->row_state[id] = State::Opened;
    };
    lambda[int(Level::Bank)][int(Command::ACTM)] = [] (DRAM<TLDRAM>* node, int id) {
        node->state = State::Opened;
        node->row_state[id] = State::Opened;
    };
    lambda[int(Level::Bank)][int(Command::PRE)] = [] (DRAM<TLDRAM>* node, int id) {
        node->state = State::Closed;
        node->row_state.clear();
    };
    lambda[int(Level::Bank)][int(Command::PREF)] = [] (DRAM<TLDRAM>* node, int id) {
        node->state = State::Closed;
        node->row_state.clear();
    };
    lambda[int(Level::Bank)][int(Command::PREM)] = [] (DRAM<TLDRAM>* node, int id) {
        node->state = State::Closed;
        node->row_state.clear();
    };
    lambda[int(Level::Rank)][int(Command::PREA)] = [] (DRAM<TLDRAM>* node, int id) {
        for (auto bank : node->children) {
            bank->state = State::Closed;
            bank->row_state.clear();
        }
    };
    lambda[int(Level::Rank)][int(Command::PREAF)] = [] (DRAM<TLDRAM>* node, int id) {
        for (auto bank : node->children) {
            bank->state = State::Closed;
            bank->row_state.clear();
        }
    };
    lambda[int(Level::Rank)][int(Command::PREAM)] = [] (DRAM<TLDRAM>* node, int id) {
        for (auto bank : node->children) {
            bank->state = State::Closed;
            bank->row_state.clear();
        }
    };
    lambda[int(Level::Rank)][int(Command::REF)] = [] (DRAM<TLDRAM>* node, int id) {};
    lambda[int(Level::Rank)][int(Command::REF)] = [] (DRAM<TLDRAM>* node, int id) {};
    lambda[int(Level::Bank)][int(Command::RD)] = [] (DRAM<TLDRAM>* node, int id) {};
    lambda[int(Level::Bank)][int(Command::WR)] = [] (DRAM<TLDRAM>* node, int id) {};
    lambda[int(Level::Bank)][int(Command::MIG)] = [] (DRAM<TLDRAM>* node, int id) {};
    lambda[int(Level::Rank)][int(Command::PDE)] = [] (DRAM<TLDRAM>* node, int id) {
        for (auto bank : node->children) {
            if (bank->state == State::Closed)
                continue;
            node->state = State::ActPowerDown;
            return;
        }
        node->state = State::PrePowerDown;
    };
    lambda[int(Level::Rank)][int(Command::PDX)] = [] (DRAM<TLDRAM>* node, int id) {
        node->state = State::PowerUp;
    };
    lambda[int(Level::Rank)][int(Command::SRE)] = [] (DRAM<TLDRAM>* node, int id) {
        node->state = State::SelfRefresh;
    };
    lambda[int(Level::Rank)][int(Command::SRX)] = [] (DRAM<TLDRAM>* node, int id) {
        node->state = State::PowerUp;
    };
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movups 0x2eb0(%rdi), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2eb0(%rdi)
movq 0x2ec0(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x3dae(%rip), %rcx      # 0x140752
movq %rcx, 0x2ec0(%rdi)
movq 0x2ec8(%rdi), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3d66(%rip), %rcx      # 0x140724
movq %rcx, 0x2ec8(%rdi)
testq %rax, %rax
je 0x13c9d7
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2ff0(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2ff0(%rbx)
movq 0x3000(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3d99(%rip), %rcx      # 0x140798
movq %rcx, 0x3000(%rbx)
movq 0x3008(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3d51(%rip), %rcx      # 0x14076a
movq %rcx, 0x3008(%rbx)
testq %rax, %rax
je 0x13ca32
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x3070(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x3070(%rbx)
movq 0x3080(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3d84(%rip), %rcx      # 0x1407de
movq %rcx, 0x3080(%rbx)
movq 0x3088(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3d3c(%rip), %rcx      # 0x1407b0
movq %rcx, 0x3088(%rbx)
testq %rax, %rax
je 0x13ca8d
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2ed0(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2ed0(%rbx)
movq 0x2ee0(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3d5b(%rip), %rcx      # 0x140810
movq %rcx, 0x2ee0(%rbx)
movq 0x2ee8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3d27(%rip), %rcx      # 0x1407f6
movq %rcx, 0x2ee8(%rbx)
testq %rax, %rax
je 0x13cae8
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x3010(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x3010(%rbx)
movq 0x3020(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3d32(%rip), %rcx      # 0x140842
movq %rcx, 0x3020(%rbx)
movq 0x3028(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3cfe(%rip), %rcx      # 0x140828
movq %rcx, 0x3028(%rbx)
testq %rax, %rax
je 0x13cb43
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x3090(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x3090(%rbx)
movq 0x30a0(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3d09(%rip), %rcx      # 0x140874
movq %rcx, 0x30a0(%rbx)
movq 0x30a8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3cd5(%rip), %rcx      # 0x14085a
movq %rcx, 0x30a8(%rbx)
testq %rax, %rax
je 0x13cb9e
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2cd0(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2cd0(%rbx)
movq 0x2ce0(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3d08(%rip), %rcx      # 0x1408ce
movq %rcx, 0x2ce0(%rbx)
movq 0x2ce8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3cac(%rip), %rcx      # 0x14088c
movq %rcx, 0x2ce8(%rbx)
testq %rax, %rax
je 0x13cbf9
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2e10(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2e10(%rbx)
movq 0x2e20(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3d07(%rip), %rcx      # 0x140928
movq %rcx, 0x2e20(%rbx)
movq 0x2e28(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3cab(%rip), %rcx      # 0x1408e6
movq %rcx, 0x2e28(%rbx)
testq %rax, %rax
je 0x13cc54
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2e90(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2e90(%rbx)
movq 0x2ea0(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3d06(%rip), %rcx      # 0x140982
movq %rcx, 0x2ea0(%rbx)
movq 0x2ea8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3caa(%rip), %rcx      # 0x140940
movq %rcx, 0x2ea8(%rbx)
testq %rax, %rax
je 0x13ccaf
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2d30(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2d30(%rbx)
movq 0x2d40(%rbx), %r8
movq %r8, 0x10(%rsp)
leaq 0x3cc5(%rip), %rax      # 0x14099c
movq %rax, 0x2d40(%rbx)
movq 0x2d48(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3ca9(%rip), %rcx      # 0x14099a
movq %rcx, 0x2d48(%rbx)
testq %r8, %r8
je 0x13cd19
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%r8
movq 0x2d40(%rbx), %rax
movq 0x2d48(%rbx), %rcx
leaq 0x2d30(%rbx), %rdx
movups (%rdx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
movq %rax, 0x10(%rsp)
leaq 0x3c7d(%rip), %rdx      # 0x1409b6
movq %rdx, 0x2d40(%rbx)
movq %rcx, 0x18(%rsp)
leaq 0x3c68(%rip), %rcx      # 0x1409b4
movq %rcx, 0x2d48(%rbx)
testq %rax, %rax
je 0x13cd65
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2f10(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2f10(%rbx)
movq 0x2f20(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3c43(%rip), %rcx      # 0x1409d0
movq %rcx, 0x2f20(%rbx)
movq 0x2f28(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3c27(%rip), %rcx      # 0x1409ce
movq %rcx, 0x2f28(%rbx)
testq %rax, %rax
je 0x13cdc0
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2f30(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2f30(%rbx)
movq 0x2f40(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3c02(%rip), %rcx      # 0x1409ea
movq %rcx, 0x2f40(%rbx)
movq 0x2f48(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3be6(%rip), %rcx      # 0x1409e8
movq %rcx, 0x2f48(%rbx)
testq %rax, %rax
je 0x13ce1b
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x3050(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x3050(%rbx)
movq 0x3060(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3bc1(%rip), %rcx      # 0x140a04
movq %rcx, 0x3060(%rbx)
movq 0x3068(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3ba5(%rip), %rcx      # 0x140a02
movq %rcx, 0x3068(%rbx)
testq %rax, %rax
je 0x13ce76
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2d50(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2d50(%rbx)
movq 0x2d60(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3bb8(%rip), %rcx      # 0x140a56
movq %rcx, 0x2d60(%rbx)
movq 0x2d68(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3b64(%rip), %rcx      # 0x140a1c
movq %rcx, 0x2d68(%rbx)
testq %rax, %rax
je 0x13ced1
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2d70(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2d70(%rbx)
movq 0x2d80(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3b83(%rip), %rcx      # 0x140a7c
movq %rcx, 0x2d80(%rbx)
movq 0x2d88(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3b5b(%rip), %rcx      # 0x140a6e
movq %rcx, 0x2d88(%rbx)
testq %rax, %rax
je 0x13cf2c
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2d90(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2d90(%rbx)
movq 0x2da0(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3b4e(%rip), %rcx      # 0x140aa2
movq %rcx, 0x2da0(%rbx)
movq 0x2da8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3b26(%rip), %rcx      # 0x140a94
movq %rcx, 0x2da8(%rbx)
testq %rax, %rax
je 0x13cf87
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2db0(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2db0(%rbx)
movq 0x2dc0(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x3b19(%rip), %rcx      # 0x140ac8
movq %rcx, 0x2dc0(%rbx)
movq 0x2dc8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x3af1(%rip), %rcx      # 0x140aba
movq %rcx, 0x2dc8(%rbx)
testq %rax, %rax
je 0x13cfe2
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
retq
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
jmp 0x13d00a
movq %rax, %rdi
callq 0x171a3