// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]ramulator/src/LPDDR3.cpp
// Function: ramulator::LPDDR3::LPDDR3(ramulator::LPDDR3::Org, ramulator::LPDDR3::Speed)
LPDDR3::LPDDR3(Org org, Speed speed)
    : org_entry(org_table[int(org)]),
    speed_entry(speed_table[int(speed)]),
    read_latency(speed_entry.nCL + speed_entry.nDQSCK + 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 0x2bb11(%rip), %rsi     # 0xdb170
leaq 0xf(%rsp), %rdx
callq 0x10eea
leaq 0x20(%rbx), %r14
leaq 0x2bb00(%rip), %rsi     # 0xdb174
leaq 0xe(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x40(%rbx), %r14
leaq 0x30729(%rip), %rsi     # 0xdfdb5
leaq 0xd(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x60(%rbx), %r14
leaq 0x2bad4(%rip), %rsi     # 0xdb178
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x80(%rbx), %r14
leaq 0x224e3(%rip), %rsi     # 0xd1ba2
leaq 0xb(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0xa0(%rbx), %r14
leaq 0x2baa1(%rip), %rsi     # 0xdb17b
leaq 0xa(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0xc0(%rbx), %r14
leaq 0x2ba8a(%rip), %rsi     # 0xdb17f
leaq 0x9(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0xe0(%rbx), %r14
leaq 0x34bd7(%rip), %rsi     # 0xe42e7
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x100(%rbx), %r14
leaq 0x2f1dc(%rip), %rsi     # 0xde907
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x120(%rbx), %r14
leaq 0x30673(%rip), %rsi     # 0xdfdb9
leaq 0x6(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x140(%rbx), %r14
leaq 0x2ba26(%rip), %rsi     # 0xdb187
leaq 0x5(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x160(%rbx), %r14
leaq 0x30640(%rip), %rsi     # 0xdfdbc
leaq 0x4(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
leaq 0x180(%rbx), %r14
leaq 0x3062a(%rip), %rsi     # 0xdfdc1
leaq 0x3(%rsp), %rdx
movq %r14, %rdi
callq 0x10eea
movups 0x307d5(%rip), %xmm0    # 0xdff80
movups %xmm0, 0x1c0(%rbx)
movups 0x307b7(%rip), %xmm0    # 0xdff70
movups %xmm0, 0x1b0(%rbx)
movups 0x30799(%rip), %xmm0    # 0xdff60
movups %xmm0, 0x1a0(%rbx)
movl $0x1, 0x1d0(%rbx)
movups 0x307b5(%rip), %xmm0    # 0xdff94
movups %xmm0, 0x1d4(%rbx)
movl $0x6, 0x1e4(%rbx)
movups 0x2f395(%rip), %xmm0    # 0xdeb8c
movups %xmm0, 0x1e8(%rbx)
movq $0xb, 0x1f8(%rbx)
leaq 0x200(%rbx), %rdi
leaq 0x2898(%rbx), %r14
movl $0x2698, %edx           # imm = 0x2698
xorl %esi, %esi
callq 0xb1d0
leaq 0x3077e(%rip), %rsi     # 0xdffa8
movl $0x118, %edx            # imm = 0x118
movq %r14, %rdi
callq 0xb270
movslq %r15d, %rax
imulq $0x1c, %rax, %rax
movups 0x2898(%rbx,%rax), %xmm0
movups 0x28a4(%rbx,%rax), %xmm1
movups %xmm0, 0x29b0(%rbx)
movups %xmm1, 0x29bc(%rbx)
movabsq $0x4000000008, %rax     # imm = 0x4000000008
movq %rax, 0x29cc(%rbx)
leaq 0x29d8(%rbx), %rdi
leaq 0x30845(%rip), %rsi     # 0xe00c0
movl $0x1e0, %edx            # imm = 0x1E0
callq 0xb270
leaq 0x2bb8(%rbx), %rdi
movslq %ebp, %rax
imulq $0x78, %rax, %rax
leaq (%rbx,%rax), %rsi
addq $0x29d8, %rsi           # imm = 0x29D8
pushq $0xf
popq %rcx
rep  movsq (%rsi), %es:(%rdi)
movl 0x2bdc(%rbx), %eax
addl 0x2be0(%rbx), %eax
addl 0x2bd0(%rbx), %eax
movl %eax, 0x2c30(%rbx)
movq %rbx, %rdi
callq 0xaf9e4
movq %rbx, %rdi
callq 0xafab4
movq %rbx, %rdi
callq 0xafca8
movq %rbx, %rdi
callq 0xafd16
movq %rbx, %rdi
callq 0xafd84
movq %rbx, %rdi
callq 0xb00f4
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xaf90f
jmp 0xaf90f
jmp 0xaf90f
jmp 0xaf90f
jmp 0xaf90f
jmp 0xaf90f
jmp 0xaf90f
jmp 0xaf90f
jmp 0xaf90f
jmp 0xaf90f
jmp 0xaf90f
movq %rax, %r15
addq $-0x20, %r14
movq %r14, %rdi
callq 0xb568
cmpq %rbx, %r14
jne 0xaf912
jmp 0xaf9dc
movq %rax, %r15
leaq 0x2878(%rbx), %r14
xorl %r12d, %r12d
leaq (%r14,%r12), %rdi
callq 0x96b6a
addq $-0x20, %r12
cmpq $-0x820, %r12           # imm = 0xF7E0
jne 0xaf935
leaq 0x2060(%rbx), %r14
xorl %r12d, %r12d
leaq (%r14,%r12), %rdi
callq 0x3e120
addq $-0x18, %r12
cmpq $-0x618, %r12           # imm = 0xF9E8
jne 0xaf955
leaq 0x1a40(%rbx), %r14
xorl %r12d, %r12d
leaq (%r14,%r12), %rdi
callq 0x96b6a
addq $-0x20, %r12
cmpq $-0x820, %r12           # imm = 0xF7E0
jne 0xaf975
movl $0x1220, %r14d          # imm = 0x1220
leaq (%rbx,%r14), %rdi
callq 0x96b6a
addq $-0x20, %r14
cmpq $0xa00, %r14            # imm = 0xA00
jne 0xaf991
movl $0xa00, %r14d           # imm = 0xA00
leaq (%rbx,%r14), %rdi
callq 0x96b6a
addq $-0x20, %r14
cmpq $0x1e0, %r14            # imm = 0x1E0
jne 0xaf9ad
movl $0x180, %r14d           # imm = 0x180
leaq (%rbx,%r14), %rdi
callq 0xb568
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0xaf9c9
movq %r15, %rdi
callq 0xb4d0