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

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movups 0x23b8(%rdi), %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x23b8(%rdi)
movups 0x23c8(%rdi), %xmm0
leaq 0x175e(%rip), %rax      # 0xb4870
movq %rax, 0x23c8(%rdi)
movaps %xmm0, 0x10(%r14)
leaq 0x1725(%rip), %rax      # 0xb484a
movq %rax, 0x23d0(%rdi)
movq %r14, %rdi
callq 0x96b6a
movups 0x23d8(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x23d8(%rbx)
movups 0x23e8(%rbx), %xmm0
leaq 0x174b(%rip), %rax      # 0xb48a2
movq %rax, 0x23e8(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x171e(%rip), %rax      # 0xb4888
movq %rax, 0x23f0(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2258(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2258(%rbx)
movups 0x2268(%rbx), %xmm0
leaq 0x175d(%rip), %rax      # 0xb48fc
movq %rax, 0x2268(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1708(%rip), %rax      # 0xb48ba
movq %rax, 0x2270(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x22f8(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x22f8(%rbx)
movups 0x2308(%rbx), %xmm0
leaq 0x172f(%rip), %rax      # 0xb4916
movq %rax, 0x2308(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x171a(%rip), %rax      # 0xb4914
movq %rax, 0x2310(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2418(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2418(%rbx)
movups 0x2428(%rbx), %xmm0
leaq 0x1701(%rip), %rax      # 0xb4930
movq %rax, 0x2428(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x16ec(%rip), %rax      # 0xb492e
movq %rax, 0x2430(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2438(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2438(%rbx)
movups 0x2448(%rbx), %xmm0
leaq 0x16d3(%rip), %rax      # 0xb494a
movq %rax, 0x2448(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x16be(%rip), %rax      # 0xb4948
movq %rax, 0x2450(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2458(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2458(%rbx)
movups 0x2468(%rbx), %xmm0
leaq 0x16bd(%rip), %rax      # 0xb497c
movq %rax, 0x2468(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1690(%rip), %rax      # 0xb4962
movq %rax, 0x2470(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2478(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2478(%rbx)
movups 0x2488(%rbx), %xmm0
leaq 0x16a7(%rip), %rax      # 0xb49ae
movq %rax, 0x2488(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x167a(%rip), %rax      # 0xb4994
movq %rax, 0x2490(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2338(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2338(%rbx)
movups 0x2348(%rbx), %xmm0
leaq 0x16ad(%rip), %rax      # 0xb49fc
movq %rax, 0x2348(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1664(%rip), %rax      # 0xb49c6
movq %rax, 0x2350(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2358(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2358(%rbx)
movups 0x2368(%rbx), %xmm0
leaq 0x168b(%rip), %rax      # 0xb4a22
movq %rax, 0x2368(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x166a(%rip), %rax      # 0xb4a14
movq %rax, 0x2370(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2378(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2378(%rbx)
movups 0x2388(%rbx), %xmm0
leaq 0x1669(%rip), %rax      # 0xb4a48
movq %rax, 0x2388(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1648(%rip), %rax      # 0xb4a3a
movq %rax, 0x2390(%rbx)
movq %rsp, %r14
movq %r14, %rdi
callq 0x96b6a
movups 0x2398(%rbx), %xmm0
movaps %xmm0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x2398(%rbx)
movups 0x23a8(%rbx), %xmm0
leaq 0x1647(%rip), %rax      # 0xb4a6e
movq %rax, 0x23a8(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1626(%rip), %rax      # 0xb4a60
movq %rax, 0x23b0(%rbx)
movq %rsp, %rdi
callq 0x96b6a
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop