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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x3ccd9(%rip), %rsi     # 0xdb170
leaq 0xf(%rsp), %rdx
callq 0x10eea
leaq 0x20(%rbx), %r14
leaq 0x3ccc8(%rip), %rsi     # 0xdb174
leaq 0xe(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x40(%rbx), %r14
leaq 0x3460b(%rip), %rsi     # 0xd2acf
leaq 0xd(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x60(%rbx), %r14
leaq 0x3cc9c(%rip), %rsi     # 0xdb178
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x80(%rbx), %r14
leaq 0x336ab(%rip), %rsi     # 0xd1ba2
leaq 0xb(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0xa0(%rbx), %r14
leaq 0x3cc69(%rip), %rsi     # 0xdb17b
leaq 0xa(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0xc0(%rbx), %r14
leaq 0x3cc52(%rip), %rsi     # 0xdb17f
leaq 0x9(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0xe0(%rbx), %r14
leaq 0x45d9f(%rip), %rsi     # 0xe42e7
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x100(%rbx), %r14
leaq 0x3cc20(%rip), %rsi     # 0xdb183
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x120(%rbx), %r14
leaq 0x3cc09(%rip), %rsi     # 0xdb187
leaq 0x6(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x140(%rbx), %r14
leaq 0x3cbf2(%rip), %rsi     # 0xdb18b
leaq 0x5(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x160(%rbx), %r14
leaq 0x3cbdb(%rip), %rsi     # 0xdb18f
leaq 0x4(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
movups 0x3e8a8(%rip), %xmm0    # 0xdce70
movups %xmm0, 0x1a0(%rbx)
movups 0x3e88a(%rip), %xmm0    # 0xdce60
movups %xmm0, 0x190(%rbx)
movups 0x3e86c(%rip), %xmm0    # 0xdce50
movups %xmm0, 0x180(%rbx)
movups 0x3e88e(%rip), %xmm0    # 0xdce80
movups %xmm0, 0x1b0(%rbx)
movl $0x6, 0x1c0(%rbx)
movups 0x3dd92(%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 0x3e857(%rip), %rsi     # 0xdce94
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 $0x4000000008, %rax     # imm = 0x4000000008
movq %rax, 0x2740(%rbx)
leaq 0x2748(%rbx), %rdi
leaq 0x3e9aa(%rip), %rsi     # 0xdd038
movl $0x620, %edx            # imm = 0x620
callq 0xb270
leaq 0x2d68(%rbx), %rdi
movslq %ebp, %rax
imulq $0x70, %rax, %rax
leaq (%rbx,%rax), %rsi
addq $0x2748, %rsi           # imm = 0x2748
pushq $0xe
popq %rcx
rep  movsq (%rsi), %es:(%rdi)
movl 0x2d80(%rbx), %eax
addl 0x2d8c(%rbx), %eax
movl %eax, 0x2dd8(%rbx)
movq %rbx, %rdi
callq 0x9e7f4
movq %rbx, %rdi
callq 0x9ec30
movq %rbx, %rdi
callq 0x9eddc
movq %rbx, %rdi
callq 0x9ee4a
movq %rbx, %rdi
callq 0x9eeb8
movq %rbx, %rdi
callq 0x9f228
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9e71a
jmp 0x9e71a
jmp 0x9e71a
jmp 0x9e71a
jmp 0x9e71a
jmp 0x9e71a
jmp 0x9e71a
jmp 0x9e71a
jmp 0x9e71a
jmp 0x9e71a
movq %rax, %r15
addq $-0x20, %r14
movq %r14, %rdi
callq 0xb568
cmpq %rbx, %r14
jne 0x9e71d
jmp 0x9e7eb
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 0x9e740
leaq 0x1de8(%rbx), %r14
xorl %r12d, %r12d
leaq (%r14,%r12), %rdi
callq 0x22fd8
addq $-0x18, %r12
cmpq $-0x5a0, %r12           # imm = 0xFA60
jne 0x9e760
leaq 0x1840(%rbx), %r14
xorl %r12d, %r12d
leaq (%r14,%r12), %rdi
callq 0x96b6a
addq $-0x20, %r12
cmpq $-0x780, %r12           # imm = 0xF880
jne 0x9e780
leaq 0x10c0(%rbx), %r14
xorl %r12d, %r12d
leaq (%r14,%r12), %rdi
callq 0x96b6a
addq $-0x20, %r12
cmpq $-0x780, %r12           # imm = 0xF880
jne 0x9e7a0
movl $0x940, %r14d           # imm = 0x940
leaq (%rbx,%r14), %rdi
callq 0x96b6a
addq $-0x20, %r14
cmpq $0x1c0, %r14            # imm = 0x1C0
jne 0x9e7bc
movl $0x160, %r14d           # imm = 0x160
leaq (%rbx,%r14), %rdi
callq 0xb568
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x9e7d8
movq %r15, %rdi
callq 0xb4d0
nop