// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x20, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
movl %ecx, (%rdi)
addq $0x8, %rdi
leaq 0x14d30(%rip), %rsi     # 0xdb170
leaq 0x1f(%rsp), %rdx
callq 0x10eea
leaq 0x28(%rbx), %rdi
leaq 0x14d1f(%rip), %rsi     # 0xdb174
leaq 0x1e(%rsp), %rdx
callq 0x10eea
leaq 0x48(%rbx), %rdi
leaq 0xc665(%rip), %rsi      # 0xd2acf
leaq 0x1d(%rsp), %rdx
callq 0x10eea
leaq 0x68(%rbx), %rdi
leaq 0x14cf9(%rip), %rsi     # 0xdb178
leaq 0x1c(%rsp), %rdx
callq 0x10eea
leaq 0x88(%rbx), %rdi
leaq 0xb70b(%rip), %rsi      # 0xd1ba2
leaq 0x1b(%rsp), %rdx
callq 0x10eea
leaq 0xa8(%rbx), %rdi
leaq 0x1de38(%rip), %rsi     # 0xe42e7
leaq 0x1a(%rsp), %rdx
callq 0x10eea
leaq 0xc8(%rbx), %rdi
leaq 0x14cbc(%rip), %rsi     # 0xdb183
leaq 0x19(%rsp), %rdx
callq 0x10eea
leaq 0xe8(%rbx), %rdi
leaq 0x14ca8(%rip), %rsi     # 0xdb187
leaq 0x18(%rsp), %rdx
callq 0x10eea
leaq 0x108(%rbx), %rdi
leaq 0x14c94(%rip), %rsi     # 0xdb18b
leaq 0x17(%rsp), %rdx
callq 0x10eea
leaq 0x128(%rbx), %rdi
leaq 0x14c80(%rip), %rsi     # 0xdb18f
leaq 0x16(%rsp), %rdx
callq 0x10eea
leaq 0x148(%rbx), %rdi
leaq 0x1ddba(%rip), %rsi     # 0xe42e1
leaq 0x15(%rsp), %rdx
callq 0x10eea
leaq 0x168(%rbx), %rdi
leaq 0x1dda7(%rip), %rsi     # 0xe42e6
leaq 0x14(%rsp), %rdx
callq 0x10eea
leaq 0x188(%rbx), %rdi
leaq 0x1dd94(%rip), %rsi     # 0xe42eb
leaq 0x13(%rsp), %rdx
callq 0x10eea
leaq 0x1a8(%rbx), %rdi
leaq 0x1dd82(%rip), %rsi     # 0xe42f1
leaq 0x12(%rsp), %rdx
callq 0x10eea
leaq 0x1c8(%rbx), %rdi
leaq 0x1dd6e(%rip), %rsi     # 0xe42f5
leaq 0x11(%rsp), %rdx
callq 0x10eea
leaq 0x1e8(%rbx), %rdi
leaq 0x1dd5b(%rip), %rsi     # 0xe42fa
leaq 0x10(%rsp), %rdx
callq 0x10eea
leaq 0x208(%rbx), %rdi
leaq 0x1dd48(%rip), %rsi     # 0xe42ff
leaq 0xf(%rsp), %rdx
callq 0x10eea
leaq 0x228(%rbx), %rdi
leaq 0x1dea9(%rip), %rsi     # 0xe4478
pushq $0x11
popq %rcx
rep  movsl (%rsi), %es:(%rdi)
movups 0x1dee1(%rip), %xmm0    # 0xe44bc
movups %xmm0, 0x26c(%rbx)
movl $0x6, 0x27c(%rbx)
movabsq $0xd00000008, %rax      # imm = 0xD00000008
movq %rax, 0x290(%rbx)
movups 0x1decc(%rip), %xmm0    # 0xe44d0
movups %xmm0, 0x280(%rbx)
leaq 0x298(%rbx), %rdi
leaq 0x3510(%rbx), %r12
movl $0x3278, %edx           # imm = 0x3278
xorl %esi, %esi
callq 0xb1d0
leaq 0x1debc(%rip), %rsi     # 0xe44e8
movl $0x1a4, %edx            # imm = 0x1A4
movq %r12, %rdi
callq 0xb270
movslq %r15d, %rax
imulq $0x1c, %rax, %rax
movups 0x3510(%rbx,%rax), %xmm0
movups 0x351c(%rbx,%rax), %xmm1
movups %xmm0, 0x36b4(%rbx)
movups %xmm1, 0x36c0(%rbx)
movabsq $0x4000000008, %rax     # imm = 0x4000000008
movq %rax, 0x36d0(%rbx)
leaq 0x36d8(%rbx), %rdi
leaq 0x1e013(%rip), %rsi     # 0xe4690
movl $0x7e0, %edx            # imm = 0x7E0
callq 0xb270
leaq 0x3eb8(%rbx), %rdi
movslq %r14d, %rax
imulq $0x90, %rax, %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 0xc6884
movq %rbx, %rdi
callq 0xc6cc0
movq %rbx, %rdi
callq 0xc6eca
movq %rbx, %rdi
callq 0xc6f38
movq %rbx, %rdi
callq 0xc6fa6
movq %rbx, %rdi
callq 0xc74c6
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x208, %r15d           # imm = 0x208
jmp 0xc67ab
movq %rax, %r14
movl $0x1e8, %r15d           # imm = 0x1E8
jmp 0xc67ab
movq %rax, %r14
movl $0x1c8, %r15d           # imm = 0x1C8
jmp 0xc67ab
movq %rax, %r14
movl $0x1a8, %r15d           # imm = 0x1A8
jmp 0xc67ab
movq %rax, %r14
movl $0x188, %r15d           # imm = 0x188
jmp 0xc67ab
movq %rax, %r14
movl $0x168, %r15d           # imm = 0x168
jmp 0xc67ab
movq %rax, %r14
movl $0x148, %r15d           # imm = 0x148
jmp 0xc67ab
movq %rax, %r14
movl $0x128, %r15d           # imm = 0x128
jmp 0xc67ab
movq %rax, %r14
movl $0x108, %r15d           # imm = 0x108
jmp 0xc67ab
movq %rax, %r14
movl $0xe8, %r15d
jmp 0xc67ab
movq %rax, %r14
movl $0xc8, %r15d
jmp 0xc67ab
movq %rax, %r14
movl $0xa8, %r15d
jmp 0xc67ab
movq %rax, %r14
movl $0x88, %r15d
jmp 0xc67ab
movq %rax, %r14
pushq $0x68
jmp 0xc67a9
movq %rax, %r14
pushq $0x48
jmp 0xc67a9
movq %rax, %r14
pushq $0x28
popq %r15
addq $-0x20, %rbx
leaq (%rbx,%r15), %rdi
addq $-0x20, %r15
callq 0xb568
cmpq $0x8, %r15
jne 0xc67af
movq %r14, %rdi
callq 0xb4d0
movq %rax, %r14
leaq 0x34f0(%rbx), %r15
xorl %r12d, %r12d
leaq (%r15,%r12), %rdi
callq 0x96b6a
addq $-0x20, %r12
cmpq $-0xaa0, %r12           # imm = 0xF560
jne 0xc67d7
leaq 0x2a58(%rbx), %r15
xorl %r12d, %r12d
leaq (%r15,%r12), %rdi
callq 0x96b86
addq $-0x18, %r12
cmpq $-0x7f8, %r12           # imm = 0xF808
jne 0xc67f7
leaq 0x2258(%rbx), %r15
xorl %r12d, %r12d
leaq (%r15,%r12), %rdi
callq 0x96b6a
addq $-0x20, %r12
cmpq $-0xaa0, %r12           # imm = 0xF560
jne 0xc6817
movl $0x17b8, %r15d          # imm = 0x17B8
leaq (%rbx,%r15), %rdi
callq 0x96b6a
addq $-0x20, %r15
cmpq $0xd18, %r15            # imm = 0xD18
jne 0xc6833
movl $0xd18, %r15d           # imm = 0xD18
leaq (%rbx,%r15), %rdi
callq 0x96b6a
addq $-0x20, %r15
cmpq $0x278, %r15            # imm = 0x278
jne 0xc684f
movl $0x208, %r15d           # imm = 0x208
leaq (%rbx,%r15), %rdi
callq 0xb568
addq $-0x20, %r15
cmpq $-0x18, %r15
jne 0xc686b
jmp 0xc67c2
nop