// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
leaq 0x10159(%rip), %rsi     # 0x51ede
leaq 0x10155(%rip), %rdx     # 0x51ee1
callq 0x80d6
leaq 0x20(%rbx), %r14
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
leaq 0x1013e(%rip), %rsi     # 0x51ee2
leaq 0x1013a(%rip), %rdx     # 0x51ee5
movq %r14, %rdi
callq 0x80d6
leaq 0x40(%rbx), %r14
leaq 0x50(%rbx), %rax
movq %rax, 0x40(%rbx)
leaq 0x10120(%rip), %rsi     # 0x51ee6
leaq 0x1011c(%rip), %rdx     # 0x51ee9
movq %r14, %rdi
callq 0x80d6
leaq 0x60(%rbx), %r14
leaq 0x70(%rbx), %rax
movq %rax, 0x60(%rbx)
leaq 0x10102(%rip), %rsi     # 0x51eea
leaq 0x100fd(%rip), %rdx     # 0x51eec
movq %r14, %rdi
callq 0x80d6
leaq 0x80(%rbx), %r14
leaq 0x90(%rbx), %rax
movq %rax, 0x80(%rbx)
leaq 0x100da(%rip), %rsi     # 0x51eed
leaq 0x100d5(%rip), %rdx     # 0x51eef
movq %r14, %rdi
callq 0x80d6
leaq 0xa0(%rbx), %r14
leaq 0xb0(%rbx), %rax
movq %rax, 0xa0(%rbx)
leaq 0x100b2(%rip), %rsi     # 0x51ef0
leaq 0x100ae(%rip), %rdx     # 0x51ef3
movq %r14, %rdi
callq 0x80d6
leaq 0xc0(%rbx), %r14
leaq 0xd0(%rbx), %rax
movq %rax, 0xc0(%rbx)
leaq 0x1008b(%rip), %rsi     # 0x51ef4
leaq 0x10087(%rip), %rdx     # 0x51ef7
movq %r14, %rdi
callq 0x80d6
leaq 0xe0(%rbx), %r14
leaq 0xf0(%rbx), %rax
movq %rax, 0xe0(%rbx)
leaq 0x1006c(%rip), %rsi     # 0x51f00
leaq 0x10068(%rip), %rdx     # 0x51f03
movq %r14, %rdi
callq 0x80d6
leaq 0x100(%rbx), %r14
leaq 0x110(%rbx), %rax
movq %rax, 0x100(%rbx)
leaq 0x10039(%rip), %rsi     # 0x51ef8
leaq 0x10034(%rip), %rdx     # 0x51efa
movq %r14, %rdi
callq 0x80d6
leaq 0x120(%rbx), %r14
leaq 0x130(%rbx), %rax
movq %rax, 0x120(%rbx)
leaq 0x10011(%rip), %rsi     # 0x51efb
leaq 0x1000d(%rip), %rdx     # 0x51efe
movq %r14, %rdi
callq 0x80d6
leaq 0x140(%rbx), %r14
leaq 0x150(%rbx), %rax
movq %rax, 0x140(%rbx)
leaq 0xffea(%rip), %rsi      # 0x51eff
leaq 0xffe7(%rip), %rdx      # 0x51f03
movq %r14, %rdi
callq 0x80d6
leaq 0x160(%rbx), %r14
leaq 0x170(%rbx), %rax
movq %rax, 0x160(%rbx)
leaq 0xffc4(%rip), %rsi      # 0x51f04
leaq 0xffc2(%rip), %rdx      # 0x51f09
movq %r14, %rdi
callq 0x80d6
leaq 0x180(%rbx), %r14
movups 0x1023b(%rip), %xmm0    # 0x52198
movups %xmm0, 0x1a0(%rbx)
movups 0x1021d(%rip), %xmm0    # 0x52188
movups %xmm0, 0x190(%rbx)
movups 0x101ff(%rip), %xmm0    # 0x52178
movups %xmm0, 0x180(%rbx)
movups 0x10221(%rip), %xmm0    # 0x521a8
movups %xmm0, 0x1b0(%rbx)
movl $0x6, 0x1c0(%rbx)
movups 0x106d9(%rip), %xmm0    # 0x52678
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 0x51c0
leaq 0x101ea(%rip), %rsi     # 0x521bc
movl $0x1c, %ecx
movq %r12, %rdi
rep  movsl (%rsi), %es:(%rdi)
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 %xmm1, 0x25fc(%rbx)
movups %xmm0, 0x25f0(%rbx)
movabsq $0x8000000004, %rax     # imm = 0x8000000004
movq %rax, 0x260c(%rbx)
leaq 0x2618(%rbx), %rdi
leaq 0x10209(%rip), %rsi     # 0x52230
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
movl $0xe, %ecx
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 0x42230
movq %rbx, %rdi
callq 0x422de
movq %rbx, %rdi
callq 0x424f0
movq %rbx, %rdi
callq 0x42578
movq %rbx, %rdi
callq 0x42600
movq %rbx, %rdi
callq 0x42a70
movl 0x2710(%rbx), %eax
movd %eax, %xmm0
pshufd $0x50, %xmm0, %xmm0     # xmm0 = xmm0[0,0,1,1]
paddd 0xfd9f(%rip), %xmm0     # 0x51e50
movq %xmm0, 0x276c(%rbx)
leal -0x2(%rax), %ecx
movl %ecx, 0x2774(%rbx)
movl %eax, 0x2778(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x420eb
jmp 0x420eb
jmp 0x420eb
jmp 0x420eb
jmp 0x420eb
jmp 0x420eb
jmp 0x420eb
jmp 0x420eb
jmp 0x420eb
jmp 0x420eb
movq %rax, %r15
addq $-0x10, %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x42106
movq (%r14), %rsi
incq %rsi
callq 0x52d0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %rbx, %r14
movq %rax, %r14
jne 0x420f2
jmp 0x4221a
movq %rax, %r15
leaq 0x2560(%rbx), %r12
xorl %r13d, %r13d
movq 0x2570(%rbx,%r13), %rax
testq %rax, %rax
je 0x42143
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x42128
movl $0x1df8, %r12d          # imm = 0x1DF8
movq -0x10(%rbx,%r12), %rdi
testq %rdi, %rdi
je 0x4216c
movq (%rbx,%r12), %rsi
subq %rdi, %rsi
callq 0x52d0
addq $-0x18, %r12
cmpq $0x1858, %r12           # imm = 0x1858
jne 0x42156
leaq 0x1840(%rbx), %r12
xorl %r13d, %r13d
movq 0x1850(%rbx,%r13), %rax
testq %rax, %rax
je 0x4219e
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x42183
leaq 0x10c0(%rbx), %r12
xorl %r13d, %r13d
movq 0x10d0(%rbx,%r13), %rax
testq %rax, %rax
je 0x421d0
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x421b5
leaq 0x940(%rbx), %r12
xorl %r13d, %r13d
movq 0x950(%rbx,%r13), %rax
testq %rax, %rax
je 0x42202
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x421e7
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5947
movq %r15, %rdi
callq 0x54c0
jmp 0x42228
jmp 0x42228
jmp 0x42228
movq %rax, %rdi
callq 0x7cd9