// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x80, %rsp
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x44596(%rip), %rsi     # 0xdb170
leaq 0x7f(%rsp), %rdx
callq 0x10eea
leaq 0x20(%rbx), %r14
leaq 0x44585(%rip), %rsi     # 0xdb174
leaq 0x7e(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x40(%rbx), %r14
leaq 0x3bec8(%rip), %rsi     # 0xd2acf
leaq 0x7d(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x60(%rbx), %r14
leaq 0x44559(%rip), %rsi     # 0xdb178
leaq 0x7c(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x80(%rbx), %r14
leaq 0x3af68(%rip), %rsi     # 0xd1ba2
leaq 0x7b(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0xa0(%rbx), %r14
leaq 0x44526(%rip), %rsi     # 0xdb17b
leaq 0x7a(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0xc0(%rbx), %r14
leaq 0x4450f(%rip), %rsi     # 0xdb17f
leaq 0x79(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0xe0(%rbx), %r14
leaq 0x4d65c(%rip), %rsi     # 0xe42e7
leaq 0x78(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x100(%rbx), %r14
leaq 0x444dd(%rip), %rsi     # 0xdb183
leaq 0x77(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x120(%rbx), %r14
leaq 0x444c6(%rip), %rsi     # 0xdb187
leaq 0x76(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x140(%rbx), %r14
leaq 0x444af(%rip), %rsi     # 0xdb18b
leaq 0x75(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x160(%rbx), %r14
leaq 0x44498(%rip), %rsi     # 0xdb18f
leaq 0x74(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
movups 0x445b5(%rip), %xmm0    # 0xdb2c0
movups %xmm0, 0x1a0(%rbx)
movups 0x44597(%rip), %xmm0    # 0xdb2b0
movups %xmm0, 0x190(%rbx)
movups 0x44579(%rip), %xmm0    # 0xdb2a0
movups %xmm0, 0x180(%rbx)
movups 0x4459b(%rip), %xmm0    # 0xdb2d0
movups %xmm0, 0x1b0(%rbx)
movl $0x6, 0x1c0(%rbx)
movups 0x4564f(%rip), %xmm0    # 0xdc39c
movups %xmm0, 0x1c4(%rbx)
movq $0xa, 0x1d4(%rbx)
leaq 0x1e0(%rbx), %rdi
leaq 0x2580(%rbx), %r14
movl $0x23a0, %edx           # imm = 0x23A0
xorl %esi, %esi
callq 0xb1d0
leaq 0x44564(%rip), %rsi     # 0xdb2e4
movl $0x1a4, %edx            # imm = 0x1A4
movq %r14, %rdi
callq 0xb270
movslq %r15d, %rax
imulq $0x1c, %rax, %rax
movups 0x2580(%rbx,%rax), %xmm0
movups 0x258c(%rbx,%rax), %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 0x446ad(%rip), %rsi     # 0xdb488
movl $0xc40, %edx            # imm = 0xC40
callq 0xb270
leaq 0x3390(%rbx), %rdi
movslq %ebp, %rax
imulq $0x70, %rax, %r14
leaq (%rbx,%r14), %rsi
addq $0x2750, %rsi           # imm = 0x2750
pushq $0xe
popq %rcx
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 0x96f5c
movq %rbx, %rdi
callq 0x97398
movq %rbx, %rdi
callq 0x97544
movq %rbx, %rdi
callq 0x975b2
leaq (%rbx,%r14), %rsi
addq $0x2d70, %rsi           # imm = 0x2D70
pushq $0xe
popq %rcx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
callq 0x97922
andl $0x0, 0x2744(%rbx)
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x96e83
jmp 0x96e83
jmp 0x96e83
jmp 0x96e83
jmp 0x96e83
jmp 0x96e83
jmp 0x96e83
jmp 0x96e83
jmp 0x96e83
jmp 0x96e83
movq %rax, %r15
addq $-0x20, %r14
movq %r14, %rdi
callq 0xb568
cmpq %rbx, %r14
jne 0x96e86
jmp 0x96f54
movq %rax, %r15
leaq 0x2560(%rbx), %r14
xorl %r12d, %r12d
leaq (%r14,%r12), %rdi
callq 0x96b6a
addq $-0x20, %r12
cmpq $-0x780, %r12           # imm = 0xF880
jne 0x96ea9
leaq 0x1de8(%rbx), %r14
xorl %r12d, %r12d
leaq (%r14,%r12), %rdi
callq 0x8f1d0
addq $-0x18, %r12
cmpq $-0x5a0, %r12           # imm = 0xFA60
jne 0x96ec9
leaq 0x1840(%rbx), %r14
xorl %r12d, %r12d
leaq (%r14,%r12), %rdi
callq 0x96b6a
addq $-0x20, %r12
cmpq $-0x780, %r12           # imm = 0xF880
jne 0x96ee9
leaq 0x10c0(%rbx), %r14
xorl %r12d, %r12d
leaq (%r14,%r12), %rdi
callq 0x96b6a
addq $-0x20, %r12
cmpq $-0x780, %r12           # imm = 0xF880
jne 0x96f09
movl $0x940, %r14d           # imm = 0x940
leaq (%rbx,%r14), %rdi
callq 0x96b6a
addq $-0x20, %r14
cmpq $0x1c0, %r14            # imm = 0x1C0
jne 0x96f25
movl $0x160, %r14d           # imm = 0x160
leaq (%rbx,%r14), %rdi
callq 0xb568
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x96f41
movq %r15, %rdi
callq 0xb4d0