// File: /workspace/github_cpp_makefile_star2_O3/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
movups 0x23b8(%rdi), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x23b8(%rdi)
movq 0x23c8(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x262e(%rip), %rcx      # 0x125746
movq %rcx, 0x23c8(%rdi)
movq 0x23d0(%rdi), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x25e6(%rip), %rcx      # 0x125718
movq %rcx, 0x23d0(%rdi)
testq %rax, %rax
je 0x12314b
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x23d8(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x23d8(%rbx)
movq 0x23e8(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x2605(%rip), %rcx      # 0x125778
movq %rcx, 0x23e8(%rbx)
movq 0x23f0(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x25d1(%rip), %rcx      # 0x12575e
movq %rcx, 0x23f0(%rbx)
testq %rax, %rax
je 0x1231a6
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2258(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2258(%rbx)
movq 0x2268(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x2604(%rip), %rcx      # 0x1257d2
movq %rcx, 0x2268(%rbx)
movq 0x2270(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x25a8(%rip), %rcx      # 0x125790
movq %rcx, 0x2270(%rbx)
testq %rax, %rax
je 0x123201
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x22f8(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x22f8(%rbx)
movq 0x2308(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x25c3(%rip), %rcx      # 0x1257ec
movq %rcx, 0x2308(%rbx)
movq 0x2310(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x25a7(%rip), %rcx      # 0x1257ea
movq %rcx, 0x2310(%rbx)
testq %rax, %rax
je 0x12325c
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2418(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2418(%rbx)
movq 0x2428(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x2582(%rip), %rcx      # 0x125806
movq %rcx, 0x2428(%rbx)
movq 0x2430(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x2566(%rip), %rcx      # 0x125804
movq %rcx, 0x2430(%rbx)
testq %rax, %rax
je 0x1232b7
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2438(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2438(%rbx)
movq 0x2448(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x2541(%rip), %rcx      # 0x125820
movq %rcx, 0x2448(%rbx)
movq 0x2450(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x2525(%rip), %rcx      # 0x12581e
movq %rcx, 0x2450(%rbx)
testq %rax, %rax
je 0x123312
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2458(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2458(%rbx)
movq 0x2468(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x2518(%rip), %rcx      # 0x125852
movq %rcx, 0x2468(%rbx)
movq 0x2470(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x24e4(%rip), %rcx      # 0x125838
movq %rcx, 0x2470(%rbx)
testq %rax, %rax
je 0x12336d
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2478(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2478(%rbx)
movq 0x2488(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x24ef(%rip), %rcx      # 0x125884
movq %rcx, 0x2488(%rbx)
movq 0x2490(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x24bb(%rip), %rcx      # 0x12586a
movq %rcx, 0x2490(%rbx)
testq %rax, %rax
je 0x1233c8
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2338(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2338(%rbx)
movq 0x2348(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x24e6(%rip), %rcx      # 0x1258d6
movq %rcx, 0x2348(%rbx)
movq 0x2350(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x2492(%rip), %rcx      # 0x12589c
movq %rcx, 0x2350(%rbx)
testq %rax, %rax
je 0x123423
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2358(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2358(%rbx)
movq 0x2368(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x24b1(%rip), %rcx      # 0x1258fc
movq %rcx, 0x2368(%rbx)
movq 0x2370(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x2489(%rip), %rcx      # 0x1258ee
movq %rcx, 0x2370(%rbx)
testq %rax, %rax
je 0x12347e
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2378(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2378(%rbx)
movq 0x2388(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x247c(%rip), %rcx      # 0x125922
movq %rcx, 0x2388(%rbx)
movq 0x2390(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x2454(%rip), %rcx      # 0x125914
movq %rcx, 0x2390(%rbx)
testq %rax, %rax
je 0x1234d9
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2398(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2398(%rbx)
movq 0x23a8(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x2447(%rip), %rcx      # 0x125948
movq %rcx, 0x23a8(%rbx)
movq 0x23b0(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x241f(%rip), %rcx      # 0x12593a
movq %rcx, 0x23b0(%rbx)
testq %rax, %rax
je 0x123534
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
retq
jmp 0x123550
jmp 0x123550
jmp 0x123550
jmp 0x123550
jmp 0x123550
jmp 0x123550
jmp 0x123550
jmp 0x123550
jmp 0x123550
jmp 0x123550
jmp 0x123550
movq %rax, %rdi
callq 0x171a3