// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]SMLA/src/SMLA_CIO.cpp
// Function: ramulator::SMLA_CIO::SMLA_CIO(ramulator::SMLA_CIO::Org, ramulator::SMLA_CIO::Speed)
SMLA_CIO::SMLA_CIO(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();
		read_latency_smla[0] = speed_entry.nBL - 6;
		read_latency_smla[1] = speed_entry.nBL - 4;
		read_latency_smla[2] = speed_entry.nBL - 2;
		read_latency_smla[3] = speed_entry.nBL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
leaq 0xd073(%rip), %rsi      # 0x37ebe
leaq 0xf(%rsp), %rdx
callq 0x64b0
leaq 0x20(%rbx), %r14
leaq 0xd062(%rip), %rsi      # 0x37ec2
leaq 0xe(%rsp), %rdx
movq %r14, %rdi
callq 0x64b0
leaq 0x40(%rbx), %r14
leaq 0xd04e(%rip), %rsi      # 0x37ec6
leaq 0xd(%rsp), %rdx
movq %r14, %rdi
callq 0x64b0
leaq 0x60(%rbx), %r14
leaq 0xd03a(%rip), %rsi      # 0x37eca
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
callq 0x64b0
leaq 0x80(%rbx), %r14
leaq 0xd022(%rip), %rsi      # 0x37ecd
leaq 0xb(%rsp), %rdx
movq %r14, %rdi
callq 0x64b0
leaq 0xa0(%rbx), %r14
leaq 0xd00a(%rip), %rsi      # 0x37ed0
leaq 0xa(%rsp), %rdx
movq %r14, %rdi
callq 0x64b0
leaq 0xc0(%rbx), %r14
leaq 0xcff3(%rip), %rsi      # 0x37ed4
leaq 0x9(%rsp), %rdx
movq %r14, %rdi
callq 0x64b0
leaq 0xe0(%rbx), %r14
leaq 0xcfe4(%rip), %rsi      # 0x37ee0
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x64b0
leaq 0x100(%rbx), %r14
leaq 0xcfc1(%rip), %rsi      # 0x37ed8
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x64b0
leaq 0x120(%rbx), %r14
leaq 0xcfa9(%rip), %rsi      # 0x37edb
leaq 0x6(%rsp), %rdx
movq %r14, %rdi
callq 0x64b0
leaq 0x140(%rbx), %r14
leaq 0xcf92(%rip), %rsi      # 0x37edf
leaq 0x5(%rsp), %rdx
movq %r14, %rdi
callq 0x64b0
leaq 0x160(%rbx), %r14
leaq 0xcf7c(%rip), %rsi      # 0x37ee4
leaq 0x4(%rsp), %rdx
movq %r14, %rdi
callq 0x64b0
movups 0xd1fc(%rip), %xmm0     # 0x38178
movups %xmm0, 0x1a0(%rbx)
movups 0xd1de(%rip), %xmm0     # 0x38168
movups %xmm0, 0x190(%rbx)
movups 0xd1c0(%rip), %xmm0     # 0x38158
movups %xmm0, 0x180(%rbx)
movups 0xd1e2(%rip), %xmm0     # 0x38188
movups %xmm0, 0x1b0(%rbx)
movl $0x6, 0x1c0(%rbx)
movups 0xd69a(%rip), %xmm0     # 0x38658
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 0x51c0
leaq 0xd1ab(%rip), %rsi      # 0x3819c
pushq $0x1c
popq %rcx
movq %r14, %rdi
rep  movsl (%rsi), %es:(%rdi)
movslq %r15d, %rax
imulq $0x1c, %rax, %rax
movups 0x2580(%rbx,%rax), %xmm0
movups 0x258c(%rbx,%rax), %xmm1
movups %xmm1, 0x25fc(%rbx)
movups %xmm0, 0x25f0(%rbx)
movabsq $0x8000000004, %rax     # imm = 0x8000000004
movq %rax, 0x260c(%rbx)
leaq 0x2618(%rbx), %rdi
leaq 0xd1d3(%rip), %rsi      # 0x38210
movl $0xe0, %edx
callq 0x5250
leaq 0x26f8(%rbx), %rdi
movslq %ebp, %rax
imulq $0x70, %rax, %rax
leaq (%rbx,%rax), %rsi
addq $0x2618, %rsi           # imm = 0x2618
pushq $0xe
popq %rcx
rep  movsq (%rsi), %es:(%rdi)
movl 0x2718(%rbx), %eax
addl 0x271c(%rbx), %eax
addl 0x2710(%rbx), %eax
movl %eax, 0x2768(%rbx)
movq %rbx, %rdi
callq 0x2b1d6
movq %rbx, %rdi
callq 0x2b27a
movq %rbx, %rdi
callq 0x2b426
movq %rbx, %rdi
callq 0x2b494
movq %rbx, %rdi
callq 0x2b502
movq %rbx, %rdi
callq 0x2b872
movl 0x2710(%rbx), %eax
movd %eax, %xmm0
pshufd $0x50, %xmm0, %xmm0     # xmm0 = xmm0[0,0,1,1]
paddd 0xcd6b(%rip), %xmm0     # 0x37e30
movq %xmm0, 0x276c(%rbx)
leal -0x2(%rax), %ecx
movl %ecx, 0x2774(%rbx)
movl %eax, 0x2778(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2b0fd
jmp 0x2b0fd
jmp 0x2b0fd
jmp 0x2b0fd
jmp 0x2b0fd
jmp 0x2b0fd
jmp 0x2b0fd
jmp 0x2b0fd
jmp 0x2b0fd
jmp 0x2b0fd
movq %rax, %r15
addq $-0x20, %r14
movq %r14, %rdi
callq 0x5508
cmpq %rbx, %r14
jne 0x2b100
jmp 0x2b1ce
movq %rax, %r15
leaq 0x2560(%rbx), %r14
xorl %r12d, %r12d
leaq (%r14,%r12), %rdi
callq 0x2564a
addq $-0x20, %r12
cmpq $-0x780, %r12           # imm = 0xF880
jne 0x2b123
leaq 0x1de8(%rbx), %r14
xorl %r12d, %r12d
leaq (%r14,%r12), %rdi
callq 0x1d21e
addq $-0x18, %r12
cmpq $-0x5a0, %r12           # imm = 0xFA60
jne 0x2b143
leaq 0x1840(%rbx), %r14
xorl %r12d, %r12d
leaq (%r14,%r12), %rdi
callq 0x2564a
addq $-0x20, %r12
cmpq $-0x780, %r12           # imm = 0xF880
jne 0x2b163
leaq 0x10c0(%rbx), %r14
xorl %r12d, %r12d
leaq (%r14,%r12), %rdi
callq 0x2564a
addq $-0x20, %r12
cmpq $-0x780, %r12           # imm = 0xF880
jne 0x2b183
movl $0x940, %r14d           # imm = 0x940
leaq (%rbx,%r14), %rdi
callq 0x2564a
addq $-0x20, %r14
cmpq $0x1c0, %r14            # imm = 0x1C0
jne 0x2b19f
movl $0x160, %r14d           # imm = 0x160
leaq (%rbx,%r14), %rdi
callq 0x5508
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x2b1bb
movq %r15, %rdi
callq 0x54a0