// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/ALDRAM.cpp
// Function: ramulator::ALDRAM::init_lambda()
void ALDRAM::init_lambda()
{
    lambda[int(Level::Bank)][int(Command::ACT)] = [] (DRAM<ALDRAM>* node, int id) {
        node->state = State::Opened;
        node->row_state[id] = State::Opened;};
    lambda[int(Level::Bank)][int(Command::PRE)] = [] (DRAM<ALDRAM>* node, int id) {
        node->state = State::Closed;
        node->row_state.clear();};
    lambda[int(Level::Rank)][int(Command::PREA)] = [] (DRAM<ALDRAM>* node, int id) {
        for (auto bank : node->children) {
            bank->state = State::Closed;
            bank->row_state.clear();}};
    lambda[int(Level::Rank)][int(Command::REF)] = [] (DRAM<ALDRAM>* node, int id) {};
    lambda[int(Level::Bank)][int(Command::RD)] = [] (DRAM<ALDRAM>* node, int id) {};
    lambda[int(Level::Bank)][int(Command::WR)] = [] (DRAM<ALDRAM>* node, int id) {};
    lambda[int(Level::Bank)][int(Command::RDA)] = [] (DRAM<ALDRAM>* node, int id) {
        node->state = State::Closed;
        node->row_state.clear();};
    lambda[int(Level::Bank)][int(Command::WRA)] = [] (DRAM<ALDRAM>* node, int id) {
        node->state = State::Closed;
        node->row_state.clear();};
    lambda[int(Level::Rank)][int(Command::PDE)] = [] (DRAM<ALDRAM>* 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<ALDRAM>* node, int id) {
        node->state = State::PowerUp;};
    lambda[int(Level::Rank)][int(Command::SRE)] = [] (DRAM<ALDRAM>* node, int id) {
        node->state = State::SelfRefresh;};
    lambda[int(Level::Rank)][int(Command::SRX)] = [] (DRAM<ALDRAM>* node, int id) {
        node->state = State::PowerUp;};
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movups 0x2100(%rdi), %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2100(%rdi)
movups 0x2110(%rdi), %xmm0
leaq 0x169c(%rip), %rax      # 0x98c7e
movq %rax, 0x2110(%rdi)
movaps %xmm0, 0x10(%r14)
leaq 0x1663(%rip), %rax      # 0x98c58
movq %rax, 0x2118(%rdi)
movq %r14, %rdi
callq 0x96b6a
movups 0x2120(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2120(%rbx)
movups 0x2130(%rbx), %xmm0
leaq 0x1689(%rip), %rax      # 0x98cb0
movq %rax, 0x2130(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x165c(%rip), %rax      # 0x98c96
movq %rax, 0x2138(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x1fc0(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x1fc0(%rbx)
movups 0x1fd0(%rbx), %xmm0
leaq 0x169b(%rip), %rax      # 0x98d0a
movq %rax, 0x1fd0(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1646(%rip), %rax      # 0x98cc8
movq %rax, 0x1fd8(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2060(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2060(%rbx)
movups 0x2070(%rbx), %xmm0
leaq 0x166d(%rip), %rax      # 0x98d24
movq %rax, 0x2070(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1658(%rip), %rax      # 0x98d22
movq %rax, 0x2078(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2160(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2160(%rbx)
movups 0x2170(%rbx), %xmm0
leaq 0x163f(%rip), %rax      # 0x98d3e
movq %rax, 0x2170(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x162a(%rip), %rax      # 0x98d3c
movq %rax, 0x2178(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2180(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2180(%rbx)
movups 0x2190(%rbx), %xmm0
leaq 0x1611(%rip), %rax      # 0x98d58
movq %rax, 0x2190(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x15fc(%rip), %rax      # 0x98d56
movq %rax, 0x2198(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x21a0(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x21a0(%rbx)
movups 0x21b0(%rbx), %xmm0
leaq 0x15fb(%rip), %rax      # 0x98d8a
movq %rax, 0x21b0(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x15ce(%rip), %rax      # 0x98d70
movq %rax, 0x21b8(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x21c0(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x21c0(%rbx)
movups 0x21d0(%rbx), %xmm0
leaq 0x15e5(%rip), %rax      # 0x98dbc
movq %rax, 0x21d0(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x15b8(%rip), %rax      # 0x98da2
movq %rax, 0x21d8(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2080(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2080(%rbx)
movups 0x2090(%rbx), %xmm0
leaq 0x15eb(%rip), %rax      # 0x98e0a
movq %rax, 0x2090(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x15a2(%rip), %rax      # 0x98dd4
movq %rax, 0x2098(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x20a0(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x20a0(%rbx)
movups 0x20b0(%rbx), %xmm0
leaq 0x15c9(%rip), %rax      # 0x98e30
movq %rax, 0x20b0(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x15a8(%rip), %rax      # 0x98e22
movq %rax, 0x20b8(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x20c0(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x20c0(%rbx)
movups 0x20d0(%rbx), %xmm0
leaq 0x15a7(%rip), %rax      # 0x98e56
movq %rax, 0x20d0(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1586(%rip), %rax      # 0x98e48
movq %rax, 0x20d8(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x20e0(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x20e0(%rbx)
movups 0x20f0(%rbx), %xmm0
leaq 0x1585(%rip), %rax      # 0x98e7c
movq %rax, 0x20f0(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1564(%rip), %rax      # 0x98e6e
movq %rax, 0x20f8(%rbx)
movq %rsp, %rdi
callq 0x96b6a
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop