// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
leaq 0x4bc44(%rip), %rsi     # 0x1541d1
leaq 0x4bc40(%rip), %rdx     # 0x1541d4
callq 0x175a0
leaq 0x20(%rbx), %r14
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
leaq 0x4bc29(%rip), %rsi     # 0x1541d5
leaq 0x4bc25(%rip), %rdx     # 0x1541d8
movq %r14, %rdi
callq 0x175a0
leaq 0x40(%rbx), %r14
leaq 0x50(%rbx), %rax
movq %rax, 0x40(%rbx)
leaq 0x43585(%rip), %rsi     # 0x14bb53
leaq 0x43582(%rip), %rdx     # 0x14bb57
movq %r14, %rdi
callq 0x175a0
leaq 0x60(%rbx), %r14
leaq 0x70(%rbx), %rax
movq %rax, 0x60(%rbx)
leaq 0x4bbe9(%rip), %rsi     # 0x1541d9
leaq 0x4bbe4(%rip), %rdx     # 0x1541db
movq %r14, %rdi
callq 0x175a0
leaq 0x80(%rbx), %r14
leaq 0x90(%rbx), %rax
movq %rax, 0x80(%rbx)
leaq 0x425c7(%rip), %rsi     # 0x14abe2
leaq 0x425c2(%rip), %rdx     # 0x14abe4
movq %r14, %rdi
callq 0x175a0
leaq 0xa0(%rbx), %r14
leaq 0xb0(%rbx), %rax
movq %rax, 0xa0(%rbx)
leaq 0x4bb96(%rip), %rsi     # 0x1541dc
leaq 0x4bb92(%rip), %rdx     # 0x1541df
movq %r14, %rdi
callq 0x175a0
leaq 0xc0(%rbx), %r14
leaq 0xd0(%rbx), %rax
movq %rax, 0xc0(%rbx)
leaq 0x4bb6f(%rip), %rsi     # 0x1541e0
leaq 0x4bb6b(%rip), %rdx     # 0x1541e3
movq %r14, %rdi
callq 0x175a0
leaq 0xe0(%rbx), %r14
leaq 0xf0(%rbx), %rax
movq %rax, 0xe0(%rbx)
leaq 0x54c8b(%rip), %rsi     # 0x15d327
leaq 0x54c87(%rip), %rdx     # 0x15d32a
movq %r14, %rdi
callq 0x175a0
leaq 0x100(%rbx), %r14
leaq 0x110(%rbx), %rax
movq %rax, 0x100(%rbx)
leaq 0x4bb1d(%rip), %rsi     # 0x1541e4
leaq 0x4bb19(%rip), %rdx     # 0x1541e7
movq %r14, %rdi
callq 0x175a0
leaq 0x120(%rbx), %r14
leaq 0x130(%rbx), %rax
movq %rax, 0x120(%rbx)
leaq 0x4baf6(%rip), %rsi     # 0x1541e8
leaq 0x4baf2(%rip), %rdx     # 0x1541eb
movq %r14, %rdi
callq 0x175a0
leaq 0x140(%rbx), %r14
leaq 0x150(%rbx), %rax
movq %rax, 0x140(%rbx)
leaq 0x4bacf(%rip), %rsi     # 0x1541ec
leaq 0x4bacb(%rip), %rdx     # 0x1541ef
movq %r14, %rdi
callq 0x175a0
leaq 0x160(%rbx), %r14
leaq 0x170(%rbx), %rax
movq %rax, 0x160(%rbx)
leaq 0x4baa8(%rip), %rsi     # 0x1541f0
leaq 0x4baa4(%rip), %rdx     # 0x1541f3
movq %r14, %rdi
callq 0x175a0
leaq 0x180(%rbx), %r14
movups 0x4d76b(%rip), %xmm0    # 0x155ed0
movups %xmm0, 0x1a0(%rbx)
movups 0x4d74d(%rip), %xmm0    # 0x155ec0
movups %xmm0, 0x190(%rbx)
movups 0x4d72f(%rip), %xmm0    # 0x155eb0
movups %xmm0, 0x180(%rbx)
movups 0x4d751(%rip), %xmm0    # 0x155ee0
movups %xmm0, 0x1b0(%rbx)
movl $0x6, 0x1c0(%rbx)
movups 0x4cc55(%rip), %xmm0    # 0x1553fc
movups %xmm0, 0x1c4(%rbx)
movq $0xa, 0x1d4(%rbx)
leaq 0x1e0(%rbx), %rdi
leaq 0x2580(%rbx), %r12
movl $0x23a0, %edx           # imm = 0x23A0
xorl %esi, %esi
callq 0xb1d0
leaq 0x4d71a(%rip), %rsi     # 0x155ef4
movl $0x1a4, %edx            # imm = 0x1A4
movq %r12, %rdi
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 $0x4000000008, %rax     # imm = 0x4000000008
movq %rax, 0x2740(%rbx)
leaq 0x2748(%rbx), %rdi
leaq 0x4d866(%rip), %rsi     # 0x156098
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
movl $0xe, %ecx
rep  movsq (%rsi), %es:(%rdi)
movl 0x2d80(%rbx), %eax
addl 0x2d8c(%rbx), %eax
movl %eax, 0x2dd8(%rbx)
movq %rbx, %rdi
callq 0x108a08
movq %rbx, %rdi
callq 0x108e8e
movq %rbx, %rdi
callq 0x1090a0
movq %rbx, %rdi
callq 0x109128
movq %rbx, %rdi
callq 0x1091b0
movq %rbx, %rdi
callq 0x109620
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1088c2
jmp 0x1088c2
jmp 0x1088c2
jmp 0x1088c2
jmp 0x1088c2
jmp 0x1088c2
jmp 0x1088c2
jmp 0x1088c2
jmp 0x1088c2
jmp 0x1088c2
movq %rax, %r15
addq $-0x10, %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x1088dd
movq (%r14), %rsi
incq %rsi
callq 0xb2f0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %rbx, %r14
movq %rax, %r14
jne 0x1088c9
jmp 0x1089f1
movq %rax, %r15
leaq 0x2560(%rbx), %r12
xorl %r13d, %r13d
movq 0x2570(%rbx,%r13), %rax
testq %rax, %rax
je 0x10891a
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x1088ff
movl $0x1df8, %r12d          # imm = 0x1DF8
movq -0x10(%rbx,%r12), %rdi
testq %rdi, %rdi
je 0x108943
movq (%rbx,%r12), %rsi
subq %rdi, %rsi
callq 0xb2f0
addq $-0x18, %r12
cmpq $0x1858, %r12           # imm = 0x1858
jne 0x10892d
leaq 0x1840(%rbx), %r12
xorl %r13d, %r13d
movq 0x1850(%rbx,%r13), %rax
testq %rax, %rax
je 0x108975
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x10895a
leaq 0x10c0(%rbx), %r12
xorl %r13d, %r13d
movq 0x10d0(%rbx,%r13), %rax
testq %rax, %rax
je 0x1089a7
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x10898c
leaq 0x940(%rbx), %r12
xorl %r13d, %r13d
movq 0x950(%rbx,%r13), %rax
testq %rax, %rax
je 0x1089d9
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x1089be
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbd45
movq %r15, %rdi
callq 0xb510
jmp 0x1089ff
jmp 0x1089ff
jmp 0x1089ff
movq %rax, %rdi
callq 0x171a3
nop