// File: /workspace/github_cpp_makefile_star2_O1/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 0xfacc(%rip), %rsi      # 0x51e65
leaq 0xfac8(%rip), %rdx      # 0x51e68
callq 0x80e0
leaq 0x20(%rbx), %r14
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
leaq 0xfab1(%rip), %rsi      # 0x51e69
leaq 0xfaad(%rip), %rdx      # 0x51e6c
movq %r14, %rdi
callq 0x80e0
leaq 0x40(%rbx), %r14
leaq 0x50(%rbx), %rax
movq %rax, 0x40(%rbx)
leaq 0xfa93(%rip), %rsi      # 0x51e6d
leaq 0xfa8f(%rip), %rdx      # 0x51e70
movq %r14, %rdi
callq 0x80e0
leaq 0x60(%rbx), %r14
leaq 0x70(%rbx), %rax
movq %rax, 0x60(%rbx)
leaq 0xfa75(%rip), %rsi      # 0x51e71
leaq 0xfa70(%rip), %rdx      # 0x51e73
movq %r14, %rdi
callq 0x80e0
leaq 0x80(%rbx), %r14
leaq 0x90(%rbx), %rax
movq %rax, 0x80(%rbx)
leaq 0xfa4d(%rip), %rsi      # 0x51e74
leaq 0xfa48(%rip), %rdx      # 0x51e76
movq %r14, %rdi
callq 0x80e0
leaq 0xa0(%rbx), %r14
leaq 0xb0(%rbx), %rax
movq %rax, 0xa0(%rbx)
leaq 0xfa25(%rip), %rsi      # 0x51e77
leaq 0xfa21(%rip), %rdx      # 0x51e7a
movq %r14, %rdi
callq 0x80e0
leaq 0xc0(%rbx), %r14
leaq 0xd0(%rbx), %rax
movq %rax, 0xc0(%rbx)
leaq 0xf9fe(%rip), %rsi      # 0x51e7b
leaq 0xf9fa(%rip), %rdx      # 0x51e7e
movq %r14, %rdi
callq 0x80e0
leaq 0xe0(%rbx), %r14
leaq 0xf0(%rbx), %rax
movq %rax, 0xe0(%rbx)
leaq 0xf9df(%rip), %rsi      # 0x51e87
leaq 0xf9db(%rip), %rdx      # 0x51e8a
movq %r14, %rdi
callq 0x80e0
leaq 0x100(%rbx), %r14
leaq 0x110(%rbx), %rax
movq %rax, 0x100(%rbx)
leaq 0xf9ac(%rip), %rsi      # 0x51e7f
leaq 0xf9a7(%rip), %rdx      # 0x51e81
movq %r14, %rdi
callq 0x80e0
leaq 0x120(%rbx), %r14
leaq 0x130(%rbx), %rax
movq %rax, 0x120(%rbx)
leaq 0xf984(%rip), %rsi      # 0x51e82
leaq 0xf980(%rip), %rdx      # 0x51e85
movq %r14, %rdi
callq 0x80e0
leaq 0x140(%rbx), %r14
leaq 0x150(%rbx), %rax
movq %rax, 0x140(%rbx)
leaq 0xf95d(%rip), %rsi      # 0x51e86
leaq 0xf95a(%rip), %rdx      # 0x51e8a
movq %r14, %rdi
callq 0x80e0
leaq 0x160(%rbx), %r14
leaq 0x170(%rbx), %rax
movq %rax, 0x160(%rbx)
leaq 0xf937(%rip), %rsi      # 0x51e8b
leaq 0xf935(%rip), %rdx      # 0x51e90
movq %r14, %rdi
callq 0x80e0
leaq 0x180(%rbx), %r14
movups 0xfbaf(%rip), %xmm0     # 0x52120
movups %xmm0, 0x1a0(%rbx)
movups 0xfb91(%rip), %xmm0     # 0x52110
movups %xmm0, 0x190(%rbx)
movups 0xfb73(%rip), %xmm0     # 0x52100
movups %xmm0, 0x180(%rbx)
movups 0xfb95(%rip), %xmm0     # 0x52130
movups %xmm0, 0x1b0(%rbx)
movl $0x6, 0x1c0(%rbx)
movups 0x1004d(%rip), %xmm0    # 0x52600
movups %xmm0, 0x1c4(%rbx)
movq $0xa, 0x1d4(%rbx)
leaq 0x1e0(%rbx), %rdi
movl $0x780, %edx            # imm = 0x780
xorl %esi, %esi
callq 0x51c0
leaq 0x960(%rbx), %rdi
movl $0x780, %edx            # imm = 0x780
xorl %esi, %esi
callq 0x51c0
leaq 0x10e0(%rbx), %rdi
movl $0x780, %edx            # imm = 0x780
xorl %esi, %esi
callq 0x51c0
leaq 0x1860(%rbx), %rdi
movl $0x5a0, %edx            # imm = 0x5A0
xorl %esi, %esi
callq 0x51c0
leaq 0x1e00(%rbx), %rdi
movl $0x780, %edx            # imm = 0x780
xorl %esi, %esi
callq 0x51c0
leaq 0x2580(%rbx), %rdi
leaq 0xfb12(%rip), %rsi      # 0x52144
movl $0x1c, %ecx
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 0xfb34(%rip), %rsi      # 0x521b8
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 0x42898
movq %rbx, %rdi
callq 0x42946
movq %rbx, %rdi
callq 0x42b9e
movq %rbx, %rdi
callq 0x42c34
movq %rbx, %rdi
callq 0x42cca
movq %rbx, %rdi
callq 0x431e2
movl 0x2710(%rbx), %eax
leal -0x6(%rax), %ecx
movl %ecx, 0x276c(%rbx)
leal -0x4(%rax), %ecx
movl %ecx, 0x2770(%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 0x42741
jmp 0x42741
jmp 0x42741
jmp 0x42741
jmp 0x42741
jmp 0x42741
jmp 0x42741
jmp 0x42741
jmp 0x42741
jmp 0x42741
movq %rax, %r15
cmpq %rbx, %r14
je 0x42881
addq $-0x10, %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x42765
movq (%r14), %rsi
incq %rsi
callq 0x52d0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %rbx, %r14
movq %rax, %r14
jne 0x42751
jmp 0x42881
movq %rax, %r15
movq %rbx, %r14
jmp 0x42744
movq %rax, %r15
leaq 0x2560(%rbx), %r12
xorl %r13d, %r13d
movq 0x2570(%rbx,%r13), %rax
testq %rax, %rax
je 0x427aa
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x4278f
movl $0x1df8, %r12d          # imm = 0x1DF8
movq -0x10(%rbx,%r12), %rdi
testq %rdi, %rdi
je 0x427d3
movq (%rbx,%r12), %rsi
subq %rdi, %rsi
callq 0x52d0
addq $-0x18, %r12
cmpq $0x1858, %r12           # imm = 0x1858
jne 0x427bd
leaq 0x1840(%rbx), %r12
xorl %r13d, %r13d
movq 0x1850(%rbx,%r13), %rax
testq %rax, %rax
je 0x42805
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x427ea
leaq 0x10c0(%rbx), %r12
xorl %r13d, %r13d
movq 0x10d0(%rbx,%r13), %rax
testq %rax, %rax
je 0x42837
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x4281c
leaq 0x940(%rbx), %r12
xorl %r13d, %r13d
movq 0x950(%rbx,%r13), %rax
testq %rax, %rax
je 0x42869
leaq (%r12,%r13), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x20, %r13
cmpq $-0x780, %r13           # imm = 0xF880
jne 0x4284e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x595e
movq %r15, %rdi
callq 0x54c0
jmp 0x4288f
jmp 0x4288f
jmp 0x4288f
movq %rax, %rdi
callq 0x7ce9
nop