// File: /workspace/github_cpp_makefile_star2_O1/CMU-SAFARI[P]ramulator/src/ALDRAM.cpp
// Function: ramulator::ALDRAM::ALDRAM(ramulator::ALDRAM::Org, ramulator::ALDRAM::Speed)
ALDRAM::ALDRAM(Org org, Speed speed) :
    org_entry(org_table[int(org)]),
    speed_entry(speed_table[int(Temp::COLD)][int(speed)]),
    read_latency(speed_entry.nCL + speed_entry.nBL)
{
    current_speed = speed;
    init_speed();
    init_prereq();
    init_rowhit(); // SAUGATA: added row hit function
    init_lambda();
    init_timing(speed_table[int(Temp::HOT)][int(speed)]);
    temperature = Temp::COLD;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
leaq 0x55915(%rip), %rsi     # 0x157161
leaq 0x55911(%rip), %rdx     # 0x157164
callq 0x17586
leaq 0x20(%rbx), %r14
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
leaq 0x558fa(%rip), %rsi     # 0x157165
leaq 0x558f6(%rip), %rdx     # 0x157168
movq %r14, %rdi
callq 0x17586
leaq 0x40(%rbx), %r14
leaq 0x50(%rbx), %rax
movq %rax, 0x40(%rbx)
leaq 0x4d286(%rip), %rsi     # 0x14eb13
leaq 0x4d283(%rip), %rdx     # 0x14eb17
movq %r14, %rdi
callq 0x17586
leaq 0x60(%rbx), %r14
leaq 0x70(%rbx), %rax
movq %rax, 0x60(%rbx)
leaq 0x558ba(%rip), %rsi     # 0x157169
leaq 0x558b5(%rip), %rdx     # 0x15716b
movq %r14, %rdi
callq 0x17586
leaq 0x80(%rbx), %r14
leaq 0x90(%rbx), %rax
movq %rax, 0x80(%rbx)
leaq 0x4c2c8(%rip), %rsi     # 0x14dba2
leaq 0x4c2c3(%rip), %rdx     # 0x14dba4
movq %r14, %rdi
callq 0x17586
leaq 0xa0(%rbx), %r14
leaq 0xb0(%rbx), %rax
movq %rax, 0xa0(%rbx)
leaq 0x55867(%rip), %rsi     # 0x15716c
leaq 0x55863(%rip), %rdx     # 0x15716f
movq %r14, %rdi
callq 0x17586
leaq 0xc0(%rbx), %r14
leaq 0xd0(%rbx), %rax
movq %rax, 0xc0(%rbx)
leaq 0x55840(%rip), %rsi     # 0x157170
leaq 0x5583c(%rip), %rdx     # 0x157173
movq %r14, %rdi
callq 0x17586
leaq 0xe0(%rbx), %r14
leaq 0xf0(%rbx), %rax
movq %rax, 0xe0(%rbx)
leaq 0x5e927(%rip), %rsi     # 0x160282
leaq 0x5e923(%rip), %rdx     # 0x160285
movq %r14, %rdi
callq 0x17586
leaq 0x100(%rbx), %r14
leaq 0x110(%rbx), %rax
movq %rax, 0x100(%rbx)
leaq 0x557ee(%rip), %rsi     # 0x157174
leaq 0x557ea(%rip), %rdx     # 0x157177
movq %r14, %rdi
callq 0x17586
leaq 0x120(%rbx), %r14
leaq 0x130(%rbx), %rax
movq %rax, 0x120(%rbx)
leaq 0x557c7(%rip), %rsi     # 0x157178
leaq 0x557c3(%rip), %rdx     # 0x15717b
movq %r14, %rdi
callq 0x17586
leaq 0x140(%rbx), %r14
leaq 0x150(%rbx), %rax
movq %rax, 0x140(%rbx)
leaq 0x557a0(%rip), %rsi     # 0x15717c
leaq 0x5579c(%rip), %rdx     # 0x15717f
movq %r14, %rdi
callq 0x17586
leaq 0x160(%rbx), %r14
leaq 0x170(%rbx), %rax
movq %rax, 0x160(%rbx)
leaq 0x55779(%rip), %rsi     # 0x157180
leaq 0x55775(%rip), %rdx     # 0x157183
movq %r14, %rdi
callq 0x17586
leaq 0x180(%rbx), %r14
movups 0x5588c(%rip), %xmm0    # 0x1572b0
movups %xmm0, 0x1a0(%rbx)
movups 0x5586e(%rip), %xmm0    # 0x1572a0
movups %xmm0, 0x190(%rbx)
movups 0x55850(%rip), %xmm0    # 0x157290
movups %xmm0, 0x180(%rbx)
movups 0x55872(%rip), %xmm0    # 0x1572c0
movups %xmm0, 0x1b0(%rbx)
movl $0x6, 0x1c0(%rbx)
movups 0x56926(%rip), %xmm0    # 0x15838c
movups %xmm0, 0x1c4(%rbx)
movq $0xa, 0x1d4(%rbx)
leaq 0x1e0(%rbx), %rdi
movl $0x780, %edx            # imm = 0x780
xorl %esi, %esi
callq 0xb1d0
leaq 0x960(%rbx), %rdi
movl $0x780, %edx            # imm = 0x780
xorl %esi, %esi
callq 0xb1d0
leaq 0x10e0(%rbx), %rdi
movl $0x780, %edx            # imm = 0x780
xorl %esi, %esi
callq 0xb1d0
leaq 0x1860(%rbx), %rdi
movl $0x5a0, %edx            # imm = 0x5A0
xorl %esi, %esi
callq 0xb1d0
leaq 0x1e00(%rbx), %rdi
movl $0x780, %edx            # imm = 0x780
xorl %esi, %esi
callq 0xb1d0
leaq 0x2580(%rbx), %rdi
leaq 0x557ef(%rip), %rsi     # 0x1572d4
movl $0x1a4, %edx            # imm = 0x1A4
callq 0xb270
movslq %r15d, %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rcx
movups 0x2580(%rbx,%rcx), %xmm0
movups 0x258c(%rbx,%rcx), %xmm1
movups %xmm0, 0x2724(%rbx)
movups %xmm1, 0x2730(%rbx)
movabsq $0x800000001, %rax      # imm = 0x800000001
movq %rax, 0x2744(%rbx)
movl $0x40, 0x274c(%rbx)
leaq 0x2750(%rbx), %rdi
leaq 0x55934(%rip), %rsi     # 0x157478
movl $0xc40, %edx            # imm = 0xC40
callq 0xb270
leaq 0x3390(%rbx), %rdi
movslq %ebp, %rax
imulq $0x70, %rax, %r15
leaq (%rbx,%r15), %rsi
addq $0x2750, %rsi           # imm = 0x2750
movl $0xe, %ecx
rep  movsq (%rsi), %es:(%rdi)
movl 0x33a8(%rbx), %ecx
addl 0x33b4(%rbx), %ecx
movl %ecx, 0x3400(%rbx)
movl %eax, 0x2740(%rbx)
movq %rbx, %rdi
callq 0x101d48
movq %rbx, %rdi
callq 0x102306
movq %rbx, %rdi
callq 0x10255e
movq %rbx, %rdi
callq 0x1025f4
leaq (%rbx,%r15), %rsi
addq $0x2d70, %rsi           # imm = 0x2D70
movl $0xe, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
callq 0x102b0c
movl $0x0, 0x2744(%rbx)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x101bf2
jmp 0x101bf2
jmp 0x101bf2
jmp 0x101bf2
jmp 0x101bf2
jmp 0x101bf2
jmp 0x101bf2
jmp 0x101bf2
jmp 0x101bf2
jmp 0x101bf2
movq %rax, %r15
cmpq %rbx, %r14
je 0x101d32
addq $-0x10, %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x101c16
movq (%r14), %rsi
incq %rsi
callq 0xb2f0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %rbx, %r14
movq %rax, %r14
jne 0x101c02
jmp 0x101d32
movq %rax, %r15
movq %rbx, %r14
jmp 0x101bf5
movq %rax, %r15
leaq 0x2560(%rbx), %r12
xorl %r13d, %r13d
movq 0x2570(%rbx,%r13), %rax
testq %rax, %rax
je 0x101c5b
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x101c40
movl $0x1df8, %r12d          # imm = 0x1DF8
movq -0x10(%rbx,%r12), %rdi
testq %rdi, %rdi
je 0x101c84
movq (%rbx,%r12), %rsi
subq %rdi, %rsi
callq 0xb2f0
addq $-0x18, %r12
cmpq $0x1858, %r12           # imm = 0x1858
jne 0x101c6e
leaq 0x1840(%rbx), %r12
xorl %r13d, %r13d
movq 0x1850(%rbx,%r13), %rax
testq %rax, %rax
je 0x101cb6
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x101c9b
leaq 0x10c0(%rbx), %r12
xorl %r13d, %r13d
movq 0x10d0(%rbx,%r13), %rax
testq %rax, %rax
je 0x101ce8
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x101ccd
leaq 0x940(%rbx), %r12
xorl %r13d, %r13d
movq 0x950(%rbx,%r13), %rax
testq %rax, %rax
je 0x101d1a
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x101cff
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbbb2
movq %r15, %rdi
callq 0xb510
jmp 0x101d40
jmp 0x101d40
jmp 0x101d40
movq %rax, %rdi
callq 0x1718f