// File: /workspace/github_cpp_makefile_star2_O3/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
movups 0x2100(%rdi), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2100(%rdi)
movq 0x2110(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x22a8(%rip), %rcx      # 0x101dfe
movq %rcx, 0x2110(%rdi)
movq 0x2118(%rdi), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x2260(%rip), %rcx      # 0x101dd0
movq %rcx, 0x2118(%rdi)
testq %rax, %rax
je 0xffb89
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2120(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2120(%rbx)
movq 0x2130(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x227f(%rip), %rcx      # 0x101e30
movq %rcx, 0x2130(%rbx)
movq 0x2138(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x224b(%rip), %rcx      # 0x101e16
movq %rcx, 0x2138(%rbx)
testq %rax, %rax
je 0xffbe4
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x1fc0(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x1fc0(%rbx)
movq 0x1fd0(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x227e(%rip), %rcx      # 0x101e8a
movq %rcx, 0x1fd0(%rbx)
movq 0x1fd8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x2222(%rip), %rcx      # 0x101e48
movq %rcx, 0x1fd8(%rbx)
testq %rax, %rax
je 0xffc3f
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2060(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2060(%rbx)
movq 0x2070(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x223d(%rip), %rcx      # 0x101ea4
movq %rcx, 0x2070(%rbx)
movq 0x2078(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x2221(%rip), %rcx      # 0x101ea2
movq %rcx, 0x2078(%rbx)
testq %rax, %rax
je 0xffc9a
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2160(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2160(%rbx)
movq 0x2170(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x21fc(%rip), %rcx      # 0x101ebe
movq %rcx, 0x2170(%rbx)
movq 0x2178(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x21e0(%rip), %rcx      # 0x101ebc
movq %rcx, 0x2178(%rbx)
testq %rax, %rax
je 0xffcf5
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2180(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2180(%rbx)
movq 0x2190(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x21bb(%rip), %rcx      # 0x101ed8
movq %rcx, 0x2190(%rbx)
movq 0x2198(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x219f(%rip), %rcx      # 0x101ed6
movq %rcx, 0x2198(%rbx)
testq %rax, %rax
je 0xffd50
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x21a0(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x21a0(%rbx)
movq 0x21b0(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x2192(%rip), %rcx      # 0x101f0a
movq %rcx, 0x21b0(%rbx)
movq 0x21b8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x215e(%rip), %rcx      # 0x101ef0
movq %rcx, 0x21b8(%rbx)
testq %rax, %rax
je 0xffdab
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x21c0(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x21c0(%rbx)
movq 0x21d0(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x2169(%rip), %rcx      # 0x101f3c
movq %rcx, 0x21d0(%rbx)
movq 0x21d8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x2135(%rip), %rcx      # 0x101f22
movq %rcx, 0x21d8(%rbx)
testq %rax, %rax
je 0xffe06
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x2080(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x2080(%rbx)
movq 0x2090(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x2160(%rip), %rcx      # 0x101f8e
movq %rcx, 0x2090(%rbx)
movq 0x2098(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x210c(%rip), %rcx      # 0x101f54
movq %rcx, 0x2098(%rbx)
testq %rax, %rax
je 0xffe61
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x20a0(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x20a0(%rbx)
movq 0x20b0(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x212b(%rip), %rcx      # 0x101fb4
movq %rcx, 0x20b0(%rbx)
movq 0x20b8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x2103(%rip), %rcx      # 0x101fa6
movq %rcx, 0x20b8(%rbx)
testq %rax, %rax
je 0xffebc
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x20c0(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x20c0(%rbx)
movq 0x20d0(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x20f6(%rip), %rcx      # 0x101fda
movq %rcx, 0x20d0(%rbx)
movq 0x20d8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x20ce(%rip), %rcx      # 0x101fcc
movq %rcx, 0x20d8(%rbx)
testq %rax, %rax
je 0xfff17
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movups 0x20e0(%rbx), %xmm0
movaps %xmm0, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x20e0(%rbx)
movq 0x20f0(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x20c1(%rip), %rcx      # 0x102000
movq %rcx, 0x20f0(%rbx)
movq 0x20f8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x2099(%rip), %rcx      # 0x101ff2
movq %rcx, 0x20f8(%rbx)
testq %rax, %rax
je 0xfff72
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
retq
jmp 0xfff8e
jmp 0xfff8e
jmp 0xfff8e
jmp 0xfff8e
jmp 0xfff8e
jmp 0xfff8e
jmp 0xfff8e
jmp 0xfff8e
jmp 0xfff8e
jmp 0xfff8e
jmp 0xfff8e
movq %rax, %rdi
callq 0x171a3