// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x253c(%rip), %rcx      # 0x128806
movq %rcx, 0x18(%rsp)
leaq 0x255e(%rip), %rdx      # 0x128834
movq %rdx, 0x10(%rsp)
movups 0x23b8(%rdi), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x23b8(%rdi)
movq 0x23c8(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x23c8(%rdi)
movq 0x23d0(%rdi), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x23d0(%rdi)
testq %rax, %rax
je 0x126325
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x2519(%rip), %rcx      # 0x12884c
movq %rcx, 0x18(%rsp)
leaq 0x2527(%rip), %rdx      # 0x128866
movq %rdx, 0x10(%rsp)
movups 0x23d8(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x23d8(%rbx)
movq 0x23e8(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x23e8(%rbx)
movq 0x23f0(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x23f0(%rbx)
testq %rax, %rax
je 0x12638e
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x24e2(%rip), %rcx      # 0x12887e
movq %rcx, 0x18(%rsp)
leaq 0x2518(%rip), %rdx      # 0x1288c0
movq %rdx, 0x10(%rsp)
movups 0x2258(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2258(%rbx)
movq 0x2268(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2268(%rbx)
movq 0x2270(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2270(%rbx)
testq %rax, %rax
je 0x1263f7
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x24d3(%rip), %rcx      # 0x1288d8
movq %rcx, 0x18(%rsp)
leaq 0x24c9(%rip), %rdx      # 0x1288da
movq %rdx, 0x10(%rsp)
movups 0x22f8(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x22f8(%rbx)
movq 0x2308(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2308(%rbx)
movq 0x2310(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2310(%rbx)
testq %rax, %rax
je 0x126460
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x2484(%rip), %rcx      # 0x1288f2
movq %rcx, 0x18(%rsp)
leaq 0x247a(%rip), %rdx      # 0x1288f4
movq %rdx, 0x10(%rsp)
movups 0x2418(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2418(%rbx)
movq 0x2428(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2428(%rbx)
movq 0x2430(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2430(%rbx)
testq %rax, %rax
je 0x1264c9
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x2435(%rip), %rcx      # 0x12890c
movq %rcx, 0x18(%rsp)
leaq 0x242b(%rip), %rdx      # 0x12890e
movq %rdx, 0x10(%rsp)
movups 0x2438(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2438(%rbx)
movq 0x2448(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2448(%rbx)
movq 0x2450(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2450(%rbx)
testq %rax, %rax
je 0x126532
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x23e6(%rip), %rcx      # 0x128926
movq %rcx, 0x18(%rsp)
leaq 0x23f4(%rip), %rdx      # 0x128940
movq %rdx, 0x10(%rsp)
movups 0x2458(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2458(%rbx)
movq 0x2468(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2468(%rbx)
movq 0x2470(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2470(%rbx)
testq %rax, %rax
je 0x12659b
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x23af(%rip), %rcx      # 0x128958
movq %rcx, 0x18(%rsp)
leaq 0x23bd(%rip), %rdx      # 0x128972
movq %rdx, 0x10(%rsp)
movups 0x2478(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2478(%rbx)
movq 0x2488(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2488(%rbx)
movq 0x2490(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2490(%rbx)
testq %rax, %rax
je 0x126604
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x2378(%rip), %rcx      # 0x12898a
movq %rcx, 0x18(%rsp)
leaq 0x23b8(%rip), %rdx      # 0x1289d6
movq %rdx, 0x10(%rsp)
movups 0x2338(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2338(%rbx)
movq 0x2348(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2348(%rbx)
movq 0x2350(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2350(%rbx)
testq %rax, %rax
je 0x12666d
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x2373(%rip), %rcx      # 0x1289ee
movq %rcx, 0x18(%rsp)
leaq 0x2375(%rip), %rdx      # 0x1289fc
movq %rdx, 0x10(%rsp)
movups 0x2358(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2358(%rbx)
movq 0x2368(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2368(%rbx)
movq 0x2370(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2370(%rbx)
testq %rax, %rax
je 0x1266d6
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x2330(%rip), %rcx      # 0x128a14
movq %rcx, 0x18(%rsp)
leaq 0x2332(%rip), %rdx      # 0x128a22
movq %rdx, 0x10(%rsp)
movups 0x2378(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2378(%rbx)
movq 0x2388(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2388(%rbx)
movq 0x2390(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2390(%rbx)
testq %rax, %rax
je 0x12673f
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x22ed(%rip), %rcx      # 0x128a3a
movq %rcx, 0x18(%rsp)
leaq 0x22ef(%rip), %rdx      # 0x128a48
movq %rdx, 0x10(%rsp)
movups 0x2398(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2398(%rbx)
movq 0x23a8(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x23a8(%rbx)
movq 0x23b0(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x23b0(%rbx)
testq %rax, %rax
je 0x1267a8
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
retq
jmp 0x1267c4
jmp 0x1267c4
jmp 0x1267c4
jmp 0x1267c4
jmp 0x1267c4
jmp 0x1267c4
jmp 0x1267c4
jmp 0x1267c4
jmp 0x1267c4
jmp 0x1267c4
jmp 0x1267c4
movq %rax, %rdi
callq 0x1718f