// File: CMU-SAFARI[P]ramulator/src/WideIO.cpp
// Function: ramulator::WideIO::WideIO(ramulator::WideIO::Org, ramulator::WideIO::Speed)
WideIO::WideIO(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();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rax, %rcx
movq %rcx, -0x50(%rbp)
movb $0x1, -0x38(%rbp)
movq %rax, -0x18(%rbp)
leaq -0x19(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0xc5e0
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
leaq 0x245da(%rip), %rsi     # 0x25abb2
callq 0x17a40
jmp 0x2365df
movq -0x48(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x60(%rbp)
movq %rax, -0x18(%rbp)
leaq -0x2d(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0xc5e0
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rdx
leaq 0x245ab(%rip), %rsi     # 0x25abb6
callq 0x17a40
jmp 0x236612
movq -0x48(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x70(%rbp)
movq %rax, -0x18(%rbp)
leaq -0x2e(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0xc5e0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rdx
leaq 0x28f8f(%rip), %rsi     # 0x25f5cd
callq 0x17a40
jmp 0x236645
movq -0x48(%rbp), %rax
addq $0x60, %rax
movq %rax, -0x80(%rbp)
movq %rax, -0x18(%rbp)
leaq -0x2f(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0xc5e0
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rdx
leaq 0x24549(%rip), %rsi     # 0x25abba
callq 0x17a40
jmp 0x236678
movq -0x48(%rbp), %rax
subq $-0x80, %rax
movq %rax, -0x90(%rbp)
movq %rax, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0xc5e0
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rdx
leaq 0x19cfa(%rip), %rsi     # 0x2503aa
callq 0x17a40
jmp 0x2366b7
movq -0x48(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0xa0(%rbp)
movq %rax, -0x18(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0xc5e0
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rdx
leaq 0x244cc(%rip), %rsi     # 0x25abbd
callq 0x17a40
jmp 0x2366f8
movq -0x48(%rbp), %rax
addq $0xc0, %rax
movq %rax, -0xb0(%rbp)
movq %rax, -0x18(%rbp)
leaq -0x32(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0xc5e0
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rdx
leaq 0x2448f(%rip), %rsi     # 0x25abc1
callq 0x17a40
jmp 0x236739
movq -0x48(%rbp), %rax
addq $0xe0, %rax
movq %rax, -0xc0(%rbp)
movq %rax, -0x18(%rbp)
leaq -0x33(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0xc5e0
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rdx
leaq 0x2e3ed(%rip), %rsi     # 0x264b60
callq 0x17a40
jmp 0x23677a
movq -0x48(%rbp), %rax
addq $0x100, %rax            # imm = 0x100
movq %rax, -0xd0(%rbp)
movq %rax, -0x18(%rbp)
leaq -0x34(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0xc5e0
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rdx
leaq 0x28e1d(%rip), %rsi     # 0x25f5d1
callq 0x17a40
jmp 0x2367bb
movq -0x48(%rbp), %rax
addq $0x120, %rax            # imm = 0x120
movq %rax, -0xe0(%rbp)
movq %rax, -0x18(%rbp)
leaq -0x35(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0xc5e0
movq -0xe0(%rbp), %rdi
movq -0xd8(%rbp), %rdx
leaq 0x243d4(%rip), %rsi     # 0x25abc9
callq 0x17a40
jmp 0x2367fc
movq -0x48(%rbp), %rax
addq $0x140, %rax            # imm = 0x140
movq %rax, -0xf0(%rbp)
movq %rax, -0x18(%rbp)
leaq -0x36(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0xc5e0
movq -0xf0(%rbp), %rdi
movq -0xe8(%rbp), %rdx
leaq 0x28d9e(%rip), %rsi     # 0x25f5d4
callq 0x17a40
jmp 0x23683d
movq -0x48(%rbp), %rax
addq $0x160, %rax            # imm = 0x160
movq %rax, -0x100(%rbp)
movq %rax, -0x18(%rbp)
leaq -0x37(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0xc5e0
movq -0x100(%rbp), %rdi
movq -0xf8(%rbp), %rdx
leaq 0x28d62(%rip), %rsi     # 0x25f5d9
callq 0x17a40
jmp 0x23687e
movb $0x0, -0x38(%rbp)
leaq -0x37(%rbp), %rdi
callq 0xc3c0
leaq -0x36(%rbp), %rdi
callq 0xc3c0
leaq -0x35(%rbp), %rdi
callq 0xc3c0
leaq -0x34(%rbp), %rdi
callq 0xc3c0
leaq -0x33(%rbp), %rdi
callq 0xc3c0
leaq -0x32(%rbp), %rdi
callq 0xc3c0
leaq -0x31(%rbp), %rdi
callq 0xc3c0
leaq -0x30(%rbp), %rdi
callq 0xc3c0
leaq -0x2f(%rbp), %rdi
callq 0xc3c0
leaq -0x2e(%rbp), %rdi
callq 0xc3c0
leaq -0x2d(%rbp), %rdi
callq 0xc3c0
leaq -0x19(%rbp), %rdi
callq 0xc3c0
movq -0x50(%rbp), %rdi
addq $0x180, %rdi            # imm = 0x180
leaq 0x2e570(%rip), %rsi     # 0x264e70
movl $0x30, %edx
callq 0xc300
movq -0x50(%rbp), %rax
movq 0x2e58b(%rip), %rcx     # 0x264ea0
movq %rcx, 0x1b0(%rax)
movq 0x2e585(%rip), %rcx     # 0x264ea8
movq %rcx, 0x1b8(%rax)
movl 0x2e580(%rip), %ecx     # 0x264eb0
movl %ecx, 0x1c0(%rax)
movq 0x2e577(%rip), %rcx     # 0x264eb4
movq %rcx, 0x1c4(%rax)
movq 0x2e571(%rip), %rcx     # 0x264ebc
movq %rcx, 0x1cc(%rax)
movq 0x2e56b(%rip), %rcx     # 0x264ec4
movq %rcx, 0x1d4(%rax)
addq $0x1e0, %rax            # imm = 0x1E0
movq %rax, -0x118(%rbp)
movq %rax, %rcx
addq $0x780, %rcx            # imm = 0x780
movq %rcx, -0x110(%rbp)
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x23dea0
movq -0x120(%rbp), %rax
movq -0x110(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0x108(%rbp)
jne 0x236985
movq -0x50(%rbp), %rax
addq $0x960, %rax            # imm = 0x960
movq %rax, -0x138(%rbp)
movq %rax, %rcx
addq $0x780, %rcx            # imm = 0x780
movq %rcx, -0x130(%rbp)
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x23dee0
movq -0x140(%rbp), %rax
movq -0x130(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0x128(%rbp)
jne 0x2369df
movq -0x50(%rbp), %rax
addq $0x10e0, %rax           # imm = 0x10E0
movq %rax, -0x158(%rbp)
movq %rax, %rcx
addq $0x780, %rcx            # imm = 0x780
movq %rcx, -0x150(%rbp)
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x23dee0
movq -0x160(%rbp), %rax
movq -0x150(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0x148(%rbp)
jne 0x236a39
movq -0x50(%rbp), %rax
addq $0x1860, %rax           # imm = 0x1860
movq %rax, -0x178(%rbp)
movq %rax, %rcx
addq $0x5a0, %rcx            # imm = 0x5A0
movq %rcx, -0x170(%rbp)
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x23df20
movq -0x180(%rbp), %rax
movq -0x170(%rbp), %rcx
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, -0x168(%rbp)
jne 0x236a93
movq -0x50(%rbp), %rax
addq $0x1e00, %rax           # imm = 0x1E00
movq %rax, -0x198(%rbp)
movq %rax, %rcx
addq $0x780, %rcx            # imm = 0x780
movq %rcx, -0x190(%rbp)
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x23df40
movq -0x1a0(%rbp), %rax
movq -0x190(%rbp), %rcx
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, -0x188(%rbp)
jne 0x236aed
movq -0x50(%rbp), %rdi
movups 0x2e403(%rip), %xmm0    # 0x264f2c
movups %xmm0, 0x25e0(%rdi)
movups 0x2e3e5(%rip), %xmm0    # 0x264f1c
movups %xmm0, 0x25d0(%rdi)
movups 0x2e3c7(%rip), %xmm0    # 0x264f0c
movups %xmm0, 0x25c0(%rdi)
movups 0x2e3a9(%rip), %xmm0    # 0x264efc
movups %xmm0, 0x25b0(%rdi)
movups 0x2e38b(%rip), %xmm0    # 0x264eec
movups %xmm0, 0x25a0(%rdi)
movups 0x2e36d(%rip), %xmm0    # 0x264edc
movups %xmm0, 0x2590(%rdi)
movups 0x2e34f(%rip), %xmm0    # 0x264ecc
movups %xmm0, 0x2580(%rdi)
movslq -0xc(%rbp), %rcx
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rax
addq %rcx, %rax
movups 0x2580(%rdi,%rax), %xmm0
movups 0x258c(%rdi,%rax), %xmm1
movups %xmm1, 0x25fc(%rdi)
movups %xmm0, 0x25f0(%rdi)
movl $0x4, 0x260c(%rdi)
movl $0x80, 0x2610(%rdi)
addq $0x2618, %rdi           # imm = 0x2618
leaq 0x2e36d(%rip), %rsi     # 0x264f40
movl $0xe0, %edx
callq 0xc300
movq -0x50(%rbp), %rdi
movslq -0x10(%rbp), %rax
imulq $0x70, %rax, %rax
movups 0x2678(%rdi,%rax), %xmm0
movups %xmm0, 0x2758(%rdi)
movups 0x2668(%rdi,%rax), %xmm0
movups %xmm0, 0x2748(%rdi)
movups 0x2658(%rdi,%rax), %xmm0
movups %xmm0, 0x2738(%rdi)
movups 0x2618(%rdi,%rax), %xmm0
movups 0x2628(%rdi,%rax), %xmm1
movups 0x2638(%rdi,%rax), %xmm2
movups 0x2648(%rdi,%rax), %xmm3
movups %xmm3, 0x2728(%rdi)
movups %xmm2, 0x2718(%rdi)
movups %xmm1, 0x2708(%rdi)
movups %xmm0, 0x26f8(%rdi)
movl 0x271c(%rdi), %eax
movl 0x2710(%rdi), %ecx
movl 0x2718(%rdi), %edx
addl %edx, %eax
addl %ecx, %eax
movl %eax, 0x2768(%rdi)
callq 0x236fe0
jmp 0x236c75
movq -0x50(%rbp), %rdi
callq 0x237110
jmp 0x236c80
movq -0x50(%rbp), %rdi
callq 0x237230
jmp 0x236c8b
movq -0x50(%rbp), %rdi
callq 0x2372a0
jmp 0x236c96
movq -0x50(%rbp), %rdi
callq 0x237310
jmp 0x236ca1
movq -0x50(%rbp), %rdi
callq 0x2374b0
jmp 0x236cac
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x236dd0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x236dc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x236dbe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x236db5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x236dac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x236da3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x236d9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x236d91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x236d88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x236d7f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x236d76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x37(%rbp), %rdi
callq 0xc3c0
leaq -0x36(%rbp), %rdi
callq 0xc3c0
leaq -0x35(%rbp), %rdi
callq 0xc3c0
leaq -0x34(%rbp), %rdi
callq 0xc3c0
leaq -0x33(%rbp), %rdi
callq 0xc3c0
leaq -0x32(%rbp), %rdi
callq 0xc3c0
leaq -0x31(%rbp), %rdi
callq 0xc3c0
leaq -0x30(%rbp), %rdi
callq 0xc3c0
leaq -0x2f(%rbp), %rdi
callq 0xc3c0
leaq -0x2e(%rbp), %rdi
callq 0xc3c0
leaq -0x2d(%rbp), %rdi
callq 0xc3c0
leaq -0x19(%rbp), %rdi
callq 0xc3c0
testb $0x1, -0x38(%rbp)
jne 0x236de1
jmp 0x236e25
movq -0x48(%rbp), %rcx
movq -0x18(%rbp), %rax
cmpq %rax, %rcx
movq %rax, -0x1a8(%rbp)
je 0x236e23
movq -0x1a8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1b0(%rbp)
callq 0xc6b8
movq -0x48(%rbp), %rcx
movq -0x1b0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1a8(%rbp)
jne 0x236df5
jmp 0x236e25
jmp 0x236fd1
movq %rdx, %rcx
movq %rax, %rdx
movq -0x198(%rbp), %rax
movq %rdx, -0x28(%rbp)
movl %ecx, -0x2c(%rbp)
addq $0x780, %rax            # imm = 0x780
movq %rax, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1c0(%rbp)
callq 0xebda0
movq -0x198(%rbp), %rcx
movq -0x1c0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1b8(%rbp)
jne 0x236e4b
movq -0x178(%rbp), %rax
addq $0x5a0, %rax            # imm = 0x5A0
movq %rax, -0x1c8(%rbp)
movq -0x1c8(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x1d0(%rbp)
callq 0xebdc0
movq -0x178(%rbp), %rcx
movq -0x1d0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1c8(%rbp)
jne 0x236e90
movq -0x158(%rbp), %rax
addq $0x780, %rax            # imm = 0x780
movq %rax, -0x1d8(%rbp)
movq -0x1d8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1e0(%rbp)
callq 0xebe20
movq -0x158(%rbp), %rcx
movq -0x1e0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1d8(%rbp)
jne 0x236ed5
movq -0x138(%rbp), %rax
addq $0x780, %rax            # imm = 0x780
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1f0(%rbp)
callq 0xebe20
movq -0x138(%rbp), %rcx
movq -0x1f0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1e8(%rbp)
jne 0x236f1a
movq -0x118(%rbp), %rax
addq $0x780, %rax            # imm = 0x780
movq %rax, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x200(%rbp)
callq 0xebe40
movq -0x118(%rbp), %rcx
movq -0x200(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1f8(%rbp)
jne 0x236f5f
movq -0x48(%rbp), %rax
addq $0x180, %rax            # imm = 0x180
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x210(%rbp)
callq 0xc6b8
movq -0x48(%rbp), %rcx
movq -0x210(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x208(%rbp)
jne 0x236fa1
jmp 0x236fd1
movq -0x28(%rbp), %rdi
callq 0xc5d0
nopw (%rax,%rax)