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

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x21ee(%rip), %rcx      # 0x1047f8
movq %rcx, 0x18(%rsp)
leaq 0x2210(%rip), %rdx      # 0x104826
movq %rdx, 0x10(%rsp)
movups 0x2100(%rdi), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2100(%rdi)
movq 0x2110(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2110(%rdi)
movq 0x2118(%rdi), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2118(%rdi)
testq %rax, %rax
je 0x102665
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x21cb(%rip), %rcx      # 0x10483e
movq %rcx, 0x18(%rsp)
leaq 0x21d9(%rip), %rdx      # 0x104858
movq %rdx, 0x10(%rsp)
movups 0x2120(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2120(%rbx)
movq 0x2130(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2130(%rbx)
movq 0x2138(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2138(%rbx)
testq %rax, %rax
je 0x1026ce
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x2194(%rip), %rcx      # 0x104870
movq %rcx, 0x18(%rsp)
leaq 0x21ca(%rip), %rdx      # 0x1048b2
movq %rdx, 0x10(%rsp)
movups 0x1fc0(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x1fc0(%rbx)
movq 0x1fd0(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x1fd0(%rbx)
movq 0x1fd8(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x1fd8(%rbx)
testq %rax, %rax
je 0x102737
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x2185(%rip), %rcx      # 0x1048ca
movq %rcx, 0x18(%rsp)
leaq 0x217b(%rip), %rdx      # 0x1048cc
movq %rdx, 0x10(%rsp)
movups 0x2060(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2060(%rbx)
movq 0x2070(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2070(%rbx)
movq 0x2078(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2078(%rbx)
testq %rax, %rax
je 0x1027a0
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x2136(%rip), %rcx      # 0x1048e4
movq %rcx, 0x18(%rsp)
leaq 0x212c(%rip), %rdx      # 0x1048e6
movq %rdx, 0x10(%rsp)
movups 0x2160(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2160(%rbx)
movq 0x2170(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2170(%rbx)
movq 0x2178(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2178(%rbx)
testq %rax, %rax
je 0x102809
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x20e7(%rip), %rcx      # 0x1048fe
movq %rcx, 0x18(%rsp)
leaq 0x20dd(%rip), %rdx      # 0x104900
movq %rdx, 0x10(%rsp)
movups 0x2180(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2180(%rbx)
movq 0x2190(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2190(%rbx)
movq 0x2198(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2198(%rbx)
testq %rax, %rax
je 0x102872
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x2098(%rip), %rcx      # 0x104918
movq %rcx, 0x18(%rsp)
leaq 0x20a6(%rip), %rdx      # 0x104932
movq %rdx, 0x10(%rsp)
movups 0x21a0(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x21a0(%rbx)
movq 0x21b0(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x21b0(%rbx)
movq 0x21b8(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x21b8(%rbx)
testq %rax, %rax
je 0x1028db
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x2061(%rip), %rcx      # 0x10494a
movq %rcx, 0x18(%rsp)
leaq 0x206f(%rip), %rdx      # 0x104964
movq %rdx, 0x10(%rsp)
movups 0x21c0(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x21c0(%rbx)
movq 0x21d0(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x21d0(%rbx)
movq 0x21d8(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x21d8(%rbx)
testq %rax, %rax
je 0x102944
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x202a(%rip), %rcx      # 0x10497c
movq %rcx, 0x18(%rsp)
leaq 0x206a(%rip), %rdx      # 0x1049c8
movq %rdx, 0x10(%rsp)
movups 0x2080(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2080(%rbx)
movq 0x2090(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2090(%rbx)
movq 0x2098(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2098(%rbx)
testq %rax, %rax
je 0x1029ad
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x2025(%rip), %rcx      # 0x1049e0
movq %rcx, 0x18(%rsp)
leaq 0x2027(%rip), %rdx      # 0x1049ee
movq %rdx, 0x10(%rsp)
movups 0x20a0(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x20a0(%rbx)
movq 0x20b0(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x20b0(%rbx)
movq 0x20b8(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x20b8(%rbx)
testq %rax, %rax
je 0x102a16
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x1fe2(%rip), %rcx      # 0x104a06
movq %rcx, 0x18(%rsp)
leaq 0x1fe4(%rip), %rdx      # 0x104a14
movq %rdx, 0x10(%rsp)
movups 0x20c0(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x20c0(%rbx)
movq 0x20d0(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x20d0(%rbx)
movq 0x20d8(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x20d8(%rbx)
testq %rax, %rax
je 0x102a7f
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x1f9f(%rip), %rcx      # 0x104a2c
movq %rcx, 0x18(%rsp)
leaq 0x1fa1(%rip), %rdx      # 0x104a3a
movq %rdx, 0x10(%rsp)
movups 0x20e0(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x20e0(%rbx)
movq 0x20f0(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x20f0(%rbx)
movq 0x20f8(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x20f8(%rbx)
testq %rax, %rax
je 0x102ae8
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
retq
jmp 0x102b04
jmp 0x102b04
jmp 0x102b04
jmp 0x102b04
jmp 0x102b04
jmp 0x102b04
jmp 0x102b04
jmp 0x102b04
jmp 0x102b04
jmp 0x102b04
jmp 0x102b04
movq %rax, %rdi
callq 0x1718f