// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]ramulator/src/TLDRAM.cpp
// Function: ramulator::TLDRAM::TLDRAM(ramulator::TLDRAM::Org, ramulator::TLDRAM::Speed, int)
TLDRAM::TLDRAM(Org org, Speed speed, int segment_ratio) :
    segment_ratio(segment_ratio),
    org_entry(org_table[int(org)]),
    speed_entry(speed_table[int(speed)]),
    read_latency(speed_entry.nCL + speed_entry.nBL)
{
    this->segment_ratio = segment_ratio;
    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
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
movl %ecx, (%rdi)
addq $0x8, %rdi
leaq 0x18(%rbx), %rax
movq %rax, 0x8(%rbx)
leaq 0x18625(%rip), %rsi     # 0x1541d1
leaq 0x18621(%rip), %rdx     # 0x1541d4
callq 0x175a0
leaq 0x28(%rbx), %rdi
leaq 0x38(%rbx), %rax
movq %rax, 0x28(%rbx)
leaq 0x1860a(%rip), %rsi     # 0x1541d5
leaq 0x18606(%rip), %rdx     # 0x1541d8
callq 0x175a0
leaq 0x48(%rbx), %rdi
leaq 0x58(%rbx), %rax
movq %rax, 0x48(%rbx)
leaq 0xff69(%rip), %rsi      # 0x14bb53
leaq 0xff66(%rip), %rdx      # 0x14bb57
callq 0x175a0
leaq 0x68(%rbx), %rdi
leaq 0x78(%rbx), %rax
movq %rax, 0x68(%rbx)
leaq 0x185d0(%rip), %rsi     # 0x1541d9
leaq 0x185cb(%rip), %rdx     # 0x1541db
callq 0x175a0
leaq 0x88(%rbx), %rdi
leaq 0x98(%rbx), %rax
movq %rax, 0x88(%rbx)
leaq 0xefb1(%rip), %rsi      # 0x14abe2
leaq 0xefac(%rip), %rdx      # 0x14abe4
callq 0x175a0
leaq 0xa8(%rbx), %rdi
leaq 0xb8(%rbx), %rax
movq %rax, 0xa8(%rbx)
leaq 0x216ce(%rip), %rsi     # 0x15d327
leaq 0x216ca(%rip), %rdx     # 0x15d32a
callq 0x175a0
leaq 0xc8(%rbx), %rdi
leaq 0xd8(%rbx), %rax
movq %rax, 0xc8(%rbx)
leaq 0x18563(%rip), %rsi     # 0x1541e4
leaq 0x1855f(%rip), %rdx     # 0x1541e7
callq 0x175a0
leaq 0xe8(%rbx), %rdi
leaq 0xf8(%rbx), %rax
movq %rax, 0xe8(%rbx)
leaq 0x1853f(%rip), %rsi     # 0x1541e8
leaq 0x1853b(%rip), %rdx     # 0x1541eb
callq 0x175a0
leaq 0x108(%rbx), %rdi
leaq 0x118(%rbx), %rax
movq %rax, 0x108(%rbx)
leaq 0x1851b(%rip), %rsi     # 0x1541ec
leaq 0x18517(%rip), %rdx     # 0x1541ef
callq 0x175a0
leaq 0x128(%rbx), %rdi
leaq 0x138(%rbx), %rax
movq %rax, 0x128(%rbx)
leaq 0x184f7(%rip), %rsi     # 0x1541f0
leaq 0x184f3(%rip), %rdx     # 0x1541f3
callq 0x175a0
leaq 0x148(%rbx), %rdi
leaq 0x158(%rbx), %rax
movq %rax, 0x148(%rbx)
leaq 0x21600(%rip), %rsi     # 0x15d321
leaq 0x215fd(%rip), %rdx     # 0x15d325
callq 0x175a0
leaq 0x168(%rbx), %rdi
leaq 0x178(%rbx), %rax
movq %rax, 0x168(%rbx)
leaq 0x215dd(%rip), %rsi     # 0x15d326
leaq 0x215da(%rip), %rdx     # 0x15d32a
callq 0x175a0
leaq 0x188(%rbx), %rdi
leaq 0x198(%rbx), %rax
movq %rax, 0x188(%rbx)
leaq 0x215ba(%rip), %rsi     # 0x15d32b
leaq 0x215b8(%rip), %rdx     # 0x15d330
callq 0x175a0
leaq 0x1a8(%rbx), %rdi
leaq 0x1b8(%rbx), %rax
movq %rax, 0x1a8(%rbx)
leaq 0x21598(%rip), %rsi     # 0x15d331
leaq 0x21594(%rip), %rdx     # 0x15d334
callq 0x175a0
leaq 0x1c8(%rbx), %rdi
leaq 0x1d8(%rbx), %rax
movq %rax, 0x1c8(%rbx)
leaq 0x21574(%rip), %rsi     # 0x15d335
leaq 0x21571(%rip), %rdx     # 0x15d339
callq 0x175a0
leaq 0x1e8(%rbx), %rdi
leaq 0x1f8(%rbx), %rax
movq %rax, 0x1e8(%rbx)
leaq 0x21551(%rip), %rsi     # 0x15d33a
leaq 0x2154e(%rip), %rdx     # 0x15d33e
callq 0x175a0
leaq 0x208(%rbx), %rdi
leaq 0x218(%rbx), %rax
movq %rax, 0x208(%rbx)
leaq 0x2152e(%rip), %rsi     # 0x15d33f
leaq 0x2152c(%rip), %rdx     # 0x15d344
callq 0x175a0
leaq 0x228(%rbx), %rdi
leaq 0x2168d(%rip), %rsi     # 0x15d4b8
movl $0x11, %ecx
rep  movsl (%rsi), %es:(%rdi)
movups 0x216c3(%rip), %xmm0    # 0x15d4fc
movups %xmm0, 0x26c(%rbx)
movl $0x6, 0x27c(%rbx)
movabsq $0xd00000008, %rax      # imm = 0xD00000008
movq %rax, 0x290(%rbx)
movups 0x216ae(%rip), %xmm0    # 0x15d510
movups %xmm0, 0x280(%rbx)
leaq 0x298(%rbx), %rdi
leaq 0x3510(%rbx), %r12
movl $0x3278, %edx           # imm = 0x3278
xorl %esi, %esi
callq 0xb1d0
leaq 0x2169e(%rip), %rsi     # 0x15d528
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 0x3510(%rbx,%rcx), %xmm0
movups 0x351c(%rbx,%rcx), %xmm1
movups %xmm0, 0x36b4(%rbx)
movups %xmm1, 0x36c0(%rbx)
movabsq $0x4000000008, %rax     # imm = 0x4000000008
movq %rax, 0x36d0(%rbx)
leaq 0x36d8(%rbx), %rdi
leaq 0x217ee(%rip), %rsi     # 0x15d6d0
movl $0x7e0, %edx            # imm = 0x7E0
callq 0xb270
leaq 0x3eb8(%rbx), %rdi
movslq %r14d, %rax
leaq (%rax,%rax,8), %rax
shlq $0x4, %rax
leaq (%rbx,%rax), %rsi
addq $0x36d8, %rsi           # imm = 0x36D8
movl $0x90, %edx
callq 0xb270
movl 0x3ed0(%rbx), %eax
addl 0x3edc(%rbx), %eax
movl %eax, 0x3f48(%rbx)
movl %ebp, (%rbx)
movq %rbx, %rdi
callq 0x13c158
movq %rbx, %rdi
callq 0x13c5de
movq %rbx, %rdi
callq 0x13c864
movq %rbx, %rdi
callq 0x13c8ec
movq %rbx, %rdi
callq 0x13c974
movq %rbx, %rdi
callq 0x13d012
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x208, %r15d           # imm = 0x208
jmp 0x13c01a
movq %rax, %r14
movl $0x1e8, %r15d           # imm = 0x1E8
jmp 0x13c01a
movq %rax, %r14
movl $0x1c8, %r15d           # imm = 0x1C8
jmp 0x13c01a
movq %rax, %r14
movl $0x1a8, %r15d           # imm = 0x1A8
jmp 0x13c01a
movq %rax, %r14
movl $0x188, %r15d           # imm = 0x188
jmp 0x13c01a
movq %rax, %r14
movl $0x168, %r15d           # imm = 0x168
jmp 0x13c01a
movq %rax, %r14
movl $0x148, %r15d           # imm = 0x148
jmp 0x13c01a
movq %rax, %r14
movl $0x128, %r15d           # imm = 0x128
jmp 0x13c01a
movq %rax, %r14
movl $0x108, %r15d           # imm = 0x108
jmp 0x13c01a
movq %rax, %r14
movl $0xe8, %r15d
jmp 0x13c01a
movq %rax, %r14
movl $0xc8, %r15d
jmp 0x13c01a
movq %rax, %r14
movl $0xa8, %r15d
jmp 0x13c01a
movq %rax, %r14
movl $0x88, %r15d
jmp 0x13c01a
movq %rax, %r14
movl $0x68, %r15d
jmp 0x13c01a
movq %rax, %r14
movl $0x48, %r15d
jmp 0x13c01a
movq %rax, %r14
movl $0x28, %r15d
addq $-0x10, %rbx
leaq (%rbx,%r15), %rax
movq -0x10(%rbx,%r15), %rdi
cmpq %rdi, %rax
je 0x13c037
movq (%rax), %rsi
incq %rsi
callq 0xb2f0
addq $-0x20, %r15
cmpq $0x8, %r15
jne 0x13c01e
movq %r14, %rdi
callq 0xb510
movq %rax, %r14
leaq 0x34f0(%rbx), %r15
xorl %r12d, %r12d
movq 0x3500(%rbx,%r12), %rax
testq %rax, %rax
je 0x13c071
leaq (%r15,%r12), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r12
cmpq $-0xaa0, %r12           # imm = 0xF560
jne 0x13c056
movl $0x2a68, %r15d          # imm = 0x2A68
movq -0x10(%rbx,%r15), %rdi
testq %rdi, %rdi
je 0x13c09a
movq (%rbx,%r15), %rsi
subq %rdi, %rsi
callq 0xb2f0
addq $-0x18, %r15
cmpq $0x2270, %r15           # imm = 0x2270
jne 0x13c084
leaq 0x2258(%rbx), %r15
xorl %r12d, %r12d
movq 0x2268(%rbx,%r12), %rax
testq %rax, %rax
je 0x13c0cc
leaq (%r15,%r12), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r12
cmpq $-0xaa0, %r12           # imm = 0xF560
jne 0x13c0b1
leaq 0x17b8(%rbx), %r15
xorl %r12d, %r12d
movq 0x17c8(%rbx,%r12), %rax
testq %rax, %rax
je 0x13c0fe
leaq (%r15,%r12), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r12
cmpq $-0xaa0, %r12           # imm = 0xF560
jne 0x13c0e3
leaq 0xd18(%rbx), %r15
xorl %r12d, %r12d
movq 0xd28(%rbx,%r12), %rax
testq %rax, %rax
je 0x13c130
leaq (%r15,%r12), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r12
cmpq $-0xaa0, %r12           # imm = 0xF560
jne 0x13c115
movq %rbx, %rdi
callq 0xc3b9
jmp 0x13c041
jmp 0x13c150
jmp 0x13c150
jmp 0x13c150
movq %rax, %rdi
callq 0x171a3