// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/LPDDR3.cpp
// Function: ramulator::LPDDR3::init_lambda()
void LPDDR3::init_lambda()
{
    lambda[int(Level::Bank)][int(Command::ACT)] = [] (DRAM<LPDDR3>* node, int id) {
        node->state = State::Opened;
        node->row_state[id] = State::Opened;};
    lambda[int(Level::Bank)][int(Command::PRE)] = [] (DRAM<LPDDR3>* node, int id) {
        node->state = State::Closed;
        node->row_state.clear();};
    lambda[int(Level::Rank)][int(Command::PRA)] = [] (DRAM<LPDDR3>* node, int id) {
        for (auto bank : node->children) {
            bank->state = State::Closed;
            bank->row_state.clear();}};
    lambda[int(Level::Rank)][int(Command::REF)] = [] (DRAM<LPDDR3>* node, int id) {};
    lambda[int(Level::Bank)][int(Command::RD)] = [] (DRAM<LPDDR3>* node, int id) {};
    lambda[int(Level::Bank)][int(Command::WR)] = [] (DRAM<LPDDR3>* node, int id) {};
    lambda[int(Level::Bank)][int(Command::RDA)] = [] (DRAM<LPDDR3>* node, int id) {
        node->state = State::Closed;
        node->row_state.clear();};
    lambda[int(Level::Bank)][int(Command::WRA)] = [] (DRAM<LPDDR3>* node, int id) {
        node->state = State::Closed;
        node->row_state.clear();};
    lambda[int(Level::Rank)][int(Command::PD)] = [] (DRAM<LPDDR3>* 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<LPDDR3>* node, int id) {
        node->state = State::PowerUp;};
    lambda[int(Level::Rank)][int(Command::SREF)] = [] (DRAM<LPDDR3>* node, int id) {
        node->state = State::SelfRefresh;};
    lambda[int(Level::Rank)][int(Command::SREFX)] = [] (DRAM<LPDDR3>* 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 0x1766(%rip), %rax      # 0xb151a
movq %rax, 0x23c8(%rdi)
movaps %xmm0, 0x10(%r14)
leaq 0x172d(%rip), %rax      # 0xb14f4
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 0x1753(%rip), %rax      # 0xb154c
movq %rax, 0x23e8(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1726(%rip), %rax      # 0xb1532
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 0x1765(%rip), %rax      # 0xb15a6
movq %rax, 0x2268(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1710(%rip), %rax      # 0xb1564
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 0x1737(%rip), %rax      # 0xb15c0
movq %rax, 0x2308(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1722(%rip), %rax      # 0xb15be
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 0x1709(%rip), %rax      # 0xb15da
movq %rax, 0x2428(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x16f4(%rip), %rax      # 0xb15d8
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 0x16db(%rip), %rax      # 0xb15f4
movq %rax, 0x2448(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x16c6(%rip), %rax      # 0xb15f2
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 0x16c5(%rip), %rax      # 0xb1626
movq %rax, 0x2468(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1698(%rip), %rax      # 0xb160c
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 0x16af(%rip), %rax      # 0xb1658
movq %rax, 0x2488(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1682(%rip), %rax      # 0xb163e
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 0x16b5(%rip), %rax      # 0xb16a6
movq %rax, 0x2348(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x166c(%rip), %rax      # 0xb1670
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 0x1693(%rip), %rax      # 0xb16cc
movq %rax, 0x2368(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1672(%rip), %rax      # 0xb16be
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 0x1671(%rip), %rax      # 0xb16f2
movq %rax, 0x2388(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x1650(%rip), %rax      # 0xb16e4
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 0x164f(%rip), %rax      # 0xb1718
movq %rax, 0x23a8(%rbx)
movaps %xmm0, 0x10(%r14)
leaq 0x162e(%rip), %rax      # 0xb170a
movq %rax, 0x23b0(%rbx)
movq %rsp, %rdi
callq 0x96b6a
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop