// File: /workspace/github_cpp_makefile_star2_O2/mburhanpurkar[P]fast_xorshift_plus/example.cpp
// Function: main
int main()
{
    const int ny = 16384;
    const int nx = 1024;
    const int stride = 4096;
    const int niter = 10;
    
    // Comparison of mt19937, xorshift_plus, and vec_xorshift_plus
    float *buf = new float[ny * stride];
    memset(buf, 0, ny * stride * sizeof(float));
    time_mt19937(buf, niter, ny, nx, stride);
    time_xorshift_plus(buf, niter, ny, nx, stride);
    time_vec_xorshift_plus(buf, niter, ny, nx, stride);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
andq $-0x20, %rsp
subq $0x2780, %rsp           # imm = 0x2780
movl $0x10000000, %edi       # imm = 0x10000000
callq 0x2030
movl $0x10000000, %edx       # imm = 0x10000000
movq %rax, 0x20(%rsp)
movq %rax, %rdi
xorl %esi, %esi
callq 0x20e0
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x2640
movq %r14, %rdi
callq 0x2170
movl %eax, %esi
leaq 0x13e0(%rsp), %rdi
callq 0x2726
vmovddup 0xc8a(%rip), %xmm0      # xmm0 = mem[0,0]
vmovaps %xmm0, 0x30(%rsp)
callq 0x2695
movq %rax, 0x10(%rsp)
movq %rdx, 0x28(%rsp)
leaq 0x30(%rsp), %r12
leaq 0x13e0(%rsp), %r13
xorl %eax, %eax
cmpl $0xa, %eax
je 0x23f8
movq 0x20(%rsp), %rbx
xorl %r15d, %r15d
movq %rax, 0x18(%rsp)
cmpq $0x4000, %r15           # imm = 0x4000
je 0x23ef
xorl %r14d, %r14d
cmpq $0x400, %r14            # imm = 0x400
je 0x23e3
movq %r12, %rdi
movq %r13, %rsi
callq 0x2702
vcvtsd2ss %xmm0, %xmm0, %xmm0
vmovss %xmm0, (%rbx,%r14,4)
incq %r14
jmp 0x23c0
incq %r15
addq $0x4000, %rbx           # imm = 0x4000
jmp 0x23b4
movq 0x18(%rsp), %rax
incl %eax
jmp 0x23a2
callq 0x2695
movq 0x2bcc(%rip), %rdi      # 0x4fd0
leaq 0xc35(%rip), %rsi       # 0x3040
movq %rax, %r12
movq %rdx, %r13
callq 0x2150
subq 0x28(%rsp), %r13
subq 0x10(%rsp), %r12
vcvtsi2sd %r13, %xmm1, %xmm0
vcvtsi2sd %r12, %xmm1, %xmm1
vfmadd231sd 0xbdd(%rip), %xmm0, %xmm1 # xmm1 = (xmm0 * mem) + xmm1
vmulsd 0xbdd(%rip), %xmm1, %xmm0 # 0x3018
vdivsd 0xbdd(%rip), %xmm0, %xmm0 # 0x3020
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
callq 0x20a0
leaq 0x40(%rsp), %rdi
callq 0x270a
leaq 0x40(%rsp), %rdi
callq 0x29cc
callq 0x2695
movq %rax, 0x10(%rsp)
movq %rdx, 0x28(%rsp)
leaq 0x40(%rsp), %r12
xorl %eax, %eax
cmpl $0xa, %eax
je 0x24d0
movq 0x20(%rsp), %r15
xorl %ebx, %ebx
movq %rax, 0x18(%rsp)
cmpq $0x4000, %rbx           # imm = 0x4000
je 0x24c7
movq %r15, %r13
xorl %r14d, %r14d
cmpq $0x400, %r14            # imm = 0x400
jae 0x24bb
movq %r12, %rdi
movq %r13, %rsi
callq 0x2aae
addq $0x8, %r14
addq $0x20, %r13
jmp 0x249d
incq %rbx
addq $0x4000, %r15           # imm = 0x4000
jmp 0x248e
movq 0x18(%rsp), %rax
incl %eax
jmp 0x247d
callq 0x2695
movq 0x2af4(%rip), %rdi      # 0x4fd0
leaq 0xb9a(%rip), %rsi       # 0x307d
movq %rax, %r12
movq %rdx, %r13
callq 0x2150
subq 0x28(%rsp), %r13
subq 0x10(%rsp), %r12
vcvtsi2sd %r13, %xmm2, %xmm0
vcvtsi2sd %r12, %xmm2, %xmm1
vfmadd231sd 0xb05(%rip), %xmm0, %xmm1 # xmm1 = (xmm0 * mem) + xmm1
vmulsd 0xb05(%rip), %xmm1, %xmm0 # 0x3018
vdivsd 0xb05(%rip), %xmm0, %xmm0 # 0x3020
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
callq 0x20a0
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x2ca4
leaq 0x40(%rsp), %rdi
callq 0x2cb2
xorl %r13d, %r13d
callq 0x2695
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
cmpl $0xa, %r13d
je 0x259b
movq 0x20(%rsp), %r15
xorl %ebx, %ebx
cmpq $0x4000, %rbx           # imm = 0x4000
je 0x2596
xorl %r12d, %r12d
cmpq $0x400, %r12            # imm = 0x400
jae 0x258a
movq %r14, %rdi
callq 0x2d96
vmovupd %ymm0, (%r15,%r12,4)
addq $0x8, %r12
jmp 0x256d
incq %rbx
addq $0x4000, %r15           # imm = 0x4000
jmp 0x2561
incl %r13d
jmp 0x2554
vzeroupper
callq 0x2695
subq 0x10(%rsp), %rax
subq 0x18(%rsp), %rdx
movq 0x2a1c(%rip), %rdi      # 0x4fd0
leaq 0xb18(%rip), %rsi       # 0x30d3
vcvtsi2sd %rax, %xmm2, %xmm0
vcvtsi2sd %rdx, %xmm2, %xmm1
vfmadd132sd 0xa42(%rip), %xmm0, %xmm1 # xmm1 = (xmm1 * mem) + xmm0
vmulsd 0xa42(%rip), %xmm1, %xmm0 # 0x3018
vdivsd 0xa42(%rip), %xmm0, %xmm0 # 0x3020
vmovsd %xmm0, 0x20(%rsp)
callq 0x2150
vmovsd 0x20(%rsp), %xmm0
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
callq 0x20a0
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x261a
jmp 0x261a
jmp 0x262b
jmp 0x262b
jmp 0x262b
leaq 0x40(%rsp), %rdi
movq %rax, %rbx
callq 0x2ca4
jmp 0x2638
jmp 0x262b
leaq 0x40(%rsp), %rdi
movq %rax, %rbx
callq 0x270a
movq %rbx, %rdi
callq 0x21e0