// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movups 0x2eb0(%rdi), %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2eb0(%rdi)
movups 0x2ec0(%rdi), %xmm0
leaq 0x2408(%rip), %rax      # 0xc93de
movq %rax, 0x2ec0(%rdi)
movaps %xmm0, 0x10(%r14)
leaq 0x23cf(%rip), %rax      # 0xc93b8
movq %rax, 0x2ec8(%rdi)
movq %r14, %rdi
callq 0x96b6a
movups 0x2ff0(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2ff0(%rbx)
movups 0x3000(%rbx), %xmm0
leaq 0x2401(%rip), %rax      # 0xc941c
movq %rax, 0x3000(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x23c8(%rip), %rax      # 0xc93f6
movq %rax, 0x3008(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x3070(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x3070(%rbx)
movups 0x3080(%rbx), %xmm0
leaq 0x23f7(%rip), %rax      # 0xc945a
movq %rax, 0x3080(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x23be(%rip), %rax      # 0xc9434
movq %rax, 0x3088(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2ed0(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2ed0(%rbx)
movups 0x2ee0(%rbx), %xmm0
leaq 0x23e1(%rip), %rax      # 0xc948c
movq %rax, 0x2ee0(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x23b4(%rip), %rax      # 0xc9472
movq %rax, 0x2ee8(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x3010(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x3010(%rbx)
movups 0x3020(%rbx), %xmm0
leaq 0x23cb(%rip), %rax      # 0xc94be
movq %rax, 0x3020(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x239e(%rip), %rax      # 0xc94a4
movq %rax, 0x3028(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x3090(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x3090(%rbx)
movups 0x30a0(%rbx), %xmm0
leaq 0x23b5(%rip), %rax      # 0xc94f0
movq %rax, 0x30a0(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x2388(%rip), %rax      # 0xc94d6
movq %rax, 0x30a8(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2cd0(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2cd0(%rbx)
movups 0x2ce0(%rbx), %xmm0
leaq 0x23c7(%rip), %rax      # 0xc954a
movq %rax, 0x2ce0(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x2372(%rip), %rax      # 0xc9508
movq %rax, 0x2ce8(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2e10(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2e10(%rbx)
movups 0x2e20(%rbx), %xmm0
leaq 0x23d9(%rip), %rax      # 0xc95a4
movq %rax, 0x2e20(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x2384(%rip), %rax      # 0xc9562
movq %rax, 0x2e28(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2e90(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2e90(%rbx)
movups 0x2ea0(%rbx), %xmm0
leaq 0x23eb(%rip), %rax      # 0xc95fe
movq %rax, 0x2ea0(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x2396(%rip), %rax      # 0xc95bc
movq %rax, 0x2ea8(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2d30(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2d30(%rbx)
movups 0x2d40(%rbx), %xmm0
leaq 0x23bd(%rip), %rax      # 0xc9618
movq %rax, 0x2d40(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x23a8(%rip), %rax      # 0xc9616
movq %rax, 0x2d48(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2d30(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2d30(%rbx)
movups 0x2d40(%rbx), %xmm0
leaq 0x238f(%rip), %rax      # 0xc9632
movq %rax, 0x2d40(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x237a(%rip), %rax      # 0xc9630
movq %rax, 0x2d48(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2f10(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2f10(%rbx)
movups 0x2f20(%rbx), %xmm0
leaq 0x2361(%rip), %rax      # 0xc964c
movq %rax, 0x2f20(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x234c(%rip), %rax      # 0xc964a
movq %rax, 0x2f28(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2f30(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2f30(%rbx)
movups 0x2f40(%rbx), %xmm0
leaq 0x2333(%rip), %rax      # 0xc9666
movq %rax, 0x2f40(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x231e(%rip), %rax      # 0xc9664
movq %rax, 0x2f48(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x3050(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x3050(%rbx)
movups 0x3060(%rbx), %xmm0
leaq 0x2305(%rip), %rax      # 0xc9680
movq %rax, 0x3060(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x22f0(%rip), %rax      # 0xc967e
movq %rax, 0x3068(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2d50(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2d50(%rbx)
movups 0x2d60(%rbx), %xmm0
leaq 0x230b(%rip), %rax      # 0xc96ce
movq %rax, 0x2d60(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x22c2(%rip), %rax      # 0xc9698
movq %rax, 0x2d68(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2d70(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2d70(%rbx)
movups 0x2d80(%rbx), %xmm0
leaq 0x22e9(%rip), %rax      # 0xc96f4
movq %rax, 0x2d80(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x22c8(%rip), %rax      # 0xc96e6
movq %rax, 0x2d88(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2d90(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2d90(%rbx)
movups 0x2da0(%rbx), %xmm0
leaq 0x22c7(%rip), %rax      # 0xc971a
movq %rax, 0x2da0(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x22a6(%rip), %rax      # 0xc970c
movq %rax, 0x2da8(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2db0(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2db0(%rbx)
movups 0x2dc0(%rbx), %xmm0
leaq 0x22a5(%rip), %rax      # 0xc9740
movq %rax, 0x2dc0(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x2284(%rip), %rax      # 0xc9732
movq %rax, 0x2dc8(%rbx)
movq %rsp, %rdi
callq 0x96b6a
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop