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

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x3af4(%rip), %rcx      # 0x143b86
movq %rcx, 0x18(%rsp)
leaq 0x3b16(%rip), %rdx      # 0x143bb4
movq %rdx, 0x10(%rsp)
movups 0x2eb0(%rdi), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2eb0(%rdi)
movq 0x2ec0(%rdi), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2ec0(%rdi)
movq 0x2ec8(%rdi), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2ec8(%rdi)
testq %rax, %rax
je 0x1400ed
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x3ad1(%rip), %rcx      # 0x143bcc
movq %rcx, 0x18(%rsp)
leaq 0x3af3(%rip), %rdx      # 0x143bfa
movq %rdx, 0x10(%rsp)
movups 0x2ff0(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2ff0(%rbx)
movq 0x3000(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x3000(%rbx)
movq 0x3008(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x3008(%rbx)
testq %rax, %rax
je 0x140156
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x3aae(%rip), %rcx      # 0x143c12
movq %rcx, 0x18(%rsp)
leaq 0x3ad0(%rip), %rdx      # 0x143c40
movq %rdx, 0x10(%rsp)
movups 0x3070(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x3070(%rbx)
movq 0x3080(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x3080(%rbx)
movq 0x3088(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x3088(%rbx)
testq %rax, %rax
je 0x1401bf
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x3a8b(%rip), %rcx      # 0x143c58
movq %rcx, 0x18(%rsp)
leaq 0x3a99(%rip), %rdx      # 0x143c72
movq %rdx, 0x10(%rsp)
movups 0x2ed0(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2ed0(%rbx)
movq 0x2ee0(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2ee0(%rbx)
movq 0x2ee8(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2ee8(%rbx)
testq %rax, %rax
je 0x140228
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x3a54(%rip), %rcx      # 0x143c8a
movq %rcx, 0x18(%rsp)
leaq 0x3a62(%rip), %rdx      # 0x143ca4
movq %rdx, 0x10(%rsp)
movups 0x3010(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x3010(%rbx)
movq 0x3020(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x3020(%rbx)
movq 0x3028(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x3028(%rbx)
testq %rax, %rax
je 0x140291
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x3a1d(%rip), %rcx      # 0x143cbc
movq %rcx, 0x18(%rsp)
leaq 0x3a2b(%rip), %rdx      # 0x143cd6
movq %rdx, 0x10(%rsp)
movups 0x3090(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x3090(%rbx)
movq 0x30a0(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x30a0(%rbx)
movq 0x30a8(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x30a8(%rbx)
testq %rax, %rax
je 0x1402fa
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x39e6(%rip), %rcx      # 0x143cee
movq %rcx, 0x18(%rsp)
leaq 0x3a1c(%rip), %rdx      # 0x143d30
movq %rdx, 0x10(%rsp)
movups 0x2cd0(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2cd0(%rbx)
movq 0x2ce0(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2ce0(%rbx)
movq 0x2ce8(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2ce8(%rbx)
testq %rax, %rax
je 0x140363
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x39d7(%rip), %rcx      # 0x143d48
movq %rcx, 0x18(%rsp)
leaq 0x3a0d(%rip), %rdx      # 0x143d8a
movq %rdx, 0x10(%rsp)
movups 0x2e10(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2e10(%rbx)
movq 0x2e20(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2e20(%rbx)
movq 0x2e28(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2e28(%rbx)
testq %rax, %rax
je 0x1403cc
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x39c8(%rip), %rcx      # 0x143da2
movq %rcx, 0x18(%rsp)
leaq 0x39fe(%rip), %rdx      # 0x143de4
movq %rdx, 0x10(%rsp)
movups 0x2e90(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2e90(%rbx)
movq 0x2ea0(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2ea0(%rbx)
movq 0x2ea8(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2ea8(%rbx)
testq %rax, %rax
je 0x140435
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x39b9(%rip), %rcx      # 0x143dfc
movq %rcx, 0x18(%rsp)
leaq 0x39af(%rip), %rdx      # 0x143dfe
movq %rdx, 0x10(%rsp)
movups 0x2d30(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2d30(%rbx)
movq 0x2d40(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2d40(%rbx)
movq 0x2d48(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2d48(%rbx)
testq %rax, %rax
je 0x14049e
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x2d30(%rbx), %rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x3963(%rip), %rcx      # 0x143e16
movq %rcx, 0x18(%rsp)
leaq 0x3959(%rip), %rdx      # 0x143e18
movq %rdx, 0x10(%rsp)
movups (%rax), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, (%rax)
movq 0x2d40(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2d40(%rbx)
movq 0x2d48(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2d48(%rbx)
testq %rax, %rax
je 0x140506
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x391c(%rip), %rcx      # 0x143e30
movq %rcx, 0x18(%rsp)
leaq 0x3912(%rip), %rdx      # 0x143e32
movq %rdx, 0x10(%rsp)
movups 0x2f10(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2f10(%rbx)
movq 0x2f20(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2f20(%rbx)
movq 0x2f28(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2f28(%rbx)
testq %rax, %rax
je 0x14056f
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x38cd(%rip), %rcx      # 0x143e4a
movq %rcx, 0x18(%rsp)
leaq 0x38c3(%rip), %rdx      # 0x143e4c
movq %rdx, 0x10(%rsp)
movups 0x2f30(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2f30(%rbx)
movq 0x2f40(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2f40(%rbx)
movq 0x2f48(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2f48(%rbx)
testq %rax, %rax
je 0x1405d8
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x387e(%rip), %rcx      # 0x143e64
movq %rcx, 0x18(%rsp)
leaq 0x3874(%rip), %rdx      # 0x143e66
movq %rdx, 0x10(%rsp)
movups 0x3050(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x3050(%rbx)
movq 0x3060(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x3060(%rbx)
movq 0x3068(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x3068(%rbx)
testq %rax, %rax
je 0x140641
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x382f(%rip), %rcx      # 0x143e7e
movq %rcx, 0x18(%rsp)
leaq 0x386f(%rip), %rdx      # 0x143eca
movq %rdx, 0x10(%rsp)
movups 0x2d50(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2d50(%rbx)
movq 0x2d60(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2d60(%rbx)
movq 0x2d68(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2d68(%rbx)
testq %rax, %rax
je 0x1406aa
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x382a(%rip), %rcx      # 0x143ee2
movq %rcx, 0x18(%rsp)
leaq 0x382c(%rip), %rdx      # 0x143ef0
movq %rdx, 0x10(%rsp)
movups 0x2d70(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2d70(%rbx)
movq 0x2d80(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2d80(%rbx)
movq 0x2d88(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2d88(%rbx)
testq %rax, %rax
je 0x140713
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x37e7(%rip), %rcx      # 0x143f08
movq %rcx, 0x18(%rsp)
leaq 0x37e9(%rip), %rdx      # 0x143f16
movq %rdx, 0x10(%rsp)
movups 0x2d90(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2d90(%rbx)
movq 0x2da0(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2da0(%rbx)
movq 0x2da8(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2da8(%rbx)
testq %rax, %rax
je 0x14077c
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
leaq 0x37a4(%rip), %rcx      # 0x143f2e
movq %rcx, 0x18(%rsp)
leaq 0x37a6(%rip), %rdx      # 0x143f3c
movq %rdx, 0x10(%rsp)
movups 0x2db0(%rbx), %xmm0
movaps %xmm0, (%rsp)
movups %xmm1, 0x2db0(%rbx)
movq 0x2dc0(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rdx, 0x2dc0(%rbx)
movq 0x2dc8(%rbx), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, 0x2dc8(%rbx)
testq %rax, %rax
je 0x1407e5
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x20, %rsp
popq %rbx
retq
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
jmp 0x14080d
movq %rax, %rdi
callq 0x1718f
nop