// File: /workspace/github_cpp_makefile_star2_O3/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 $0x2740, %rsp           # imm = 0x2740
leaq 0x13a0(%rsp), %rbx
movq %rbx, %rdi
callq 0x28e0
movq %rbx, %rdi
callq 0x2170
movl $0x1, %ecx
movl %eax, %eax
movq %rax, 0x18(%rsp)
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, 0x18(%rsp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x2378
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movq $0x270, 0x1398(%rsp) # imm = 0x270
xorl %r12d, %r12d
callq 0x21a0
testl %eax, %eax
js 0x2756
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %r15
leaq 0x18(%rsp), %rbx
movq %rax, (%rsp)
xorl %r13d, %r13d
movl $0x400, %r14d           # imm = 0x400
movq %rbx, %rdi
callq 0x29ea
decq %r14
jne 0x23d9
incq %r13
cmpq $0x4000, %r13           # imm = 0x4000
jne 0x23d3
incl %r12d
cmpl $0xa, %r12d
jne 0x23d0
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x21a0
testl %eax, %eax
js 0x2788
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r14
movq 0x3bb0(%rip), %rdi      # 0x5fd0
leaq 0x1ce5(%rip), %rsi      # 0x410c
movl $0x1e, %edx
callq 0x2160
subq %r15, %r14
subq (%rsp), %rbx
vcvtsi2sd %r14, %xmm1, %xmm0
vcvtsi2sd %rbx, %xmm1, %xmm1
vfmadd231sd 0x1bbd(%rip), %xmm0, %xmm1 # xmm1 = (xmm0 * mem) + xmm1
vmulsd 0x1bbd(%rip), %xmm1, %xmm0 # 0x4010
vdivsd 0x1bbd(%rip), %xmm0, %xmm0 # 0x4018
movq 0x3b6e(%rip), %rdi      # 0x5fd0
callq 0x2190
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
leaq 0x13a0(%rsp), %rdi
callq 0x2120
leaq 0x13a0(%rsp), %rdi
callq 0x2cbe
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
xorl %r15d, %r15d
callq 0x21a0
testl %eax, %eax
js 0x27ba
movq 0x13a0(%rsp), %rax
vpmovsxbq 0x1b4c(%rip), %zmm1 # 0x4020
movq 0x18(%rsp), %rbx
movq 0x20(%rsp), %r14
vmovdqu64 (%rax), %zmm0
xorl %ecx, %ecx
movq $-0x8, %rdx
vextracti64x4 $0x1, %zmm0, %ymm2
addq $0x8, %rdx
vpunpcklqdq %ymm2, %ymm0, %ymm3 # ymm3 = ymm0[0],ymm2[0],ymm0[2],ymm2[2]
vpunpckhqdq %ymm2, %ymm0, %ymm2 # ymm2 = ymm0[1],ymm2[1],ymm0[3],ymm2[3]
vpermq $0xd8, %ymm3, %ymm3     # ymm3 = ymm3[0,2,1,3]
vpermq $0xd8, %ymm2, %ymm2     # ymm2 = ymm2[0,2,1,3]
vpsllq $0x17, %ymm3, %ymm4
vpsrlq $0x1a, %ymm2, %ymm5
vpxor %ymm3, %ymm4, %ymm3
vpsrlq $0x11, %ymm3, %ymm4
vpxor %ymm4, %ymm5, %ymm4
vpternlogq $0x96, %ymm2, %ymm3, %ymm4
vpermt2q %zmm4, %zmm1, %zmm0
cmpq $0x3f8, %rdx            # imm = 0x3F8
jb 0x24ed
incq %rcx
cmpq $0x4000, %rcx           # imm = 0x4000
jne 0x24e6
incl %r15d
cmpl $0xa, %r15d
jne 0x24e4
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
vmovdqu64 %zmm0, (%rax)
vzeroupper
callq 0x21a0
testl %eax, %eax
js 0x27ec
movq 0x18(%rsp), %r15
movq 0x20(%rsp), %r12
movq 0x3a54(%rip), %rdi      # 0x5fd0
leaq 0x1bf0(%rip), %rsi      # 0x4173
movl $0x24, %edx
callq 0x2160
subq %r14, %r12
subq %rbx, %r15
vcvtsi2sd %r12, %xmm6, %xmm0
vcvtsi2sd %r15, %xmm6, %xmm1
vfmadd231sd 0x1a62(%rip), %xmm0, %xmm1 # xmm1 = (xmm0 * mem) + xmm1
vmulsd 0x1a62(%rip), %xmm1, %xmm0 # 0x4010
vdivsd 0x1a62(%rip), %xmm0, %xmm0 # 0x4018
movq 0x3a13(%rip), %rdi      # 0x5fd0
callq 0x2190
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x13a0(%rsp), %rdi
testq %rdi, %rdi
je 0x25fe
callq 0x2130
leaq 0x13a0(%rsp), %rdi
callq 0x2f76
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
xorl %r15d, %r15d
callq 0x21a0
testl %eax, %eax
js 0x281e
vmovdqa 0x13a0(%rsp), %ymm0
vmovdqa 0x13c0(%rsp), %ymm1
movq 0x18(%rsp), %r14
movq 0x20(%rsp), %rbx
xorl %eax, %eax
movq $-0x8, %rcx
vmovdqa %ymm0, %ymm2
vmovdqa %ymm1, %ymm0
vpsllq $0x17, %ymm2, %ymm1
vpsrlq $0x1a, %ymm0, %ymm3
addq $0x8, %rcx
vpxor %ymm2, %ymm1, %ymm2
vpsrlq $0x11, %ymm2, %ymm1
vpxor %ymm1, %ymm3, %ymm1
vpternlogq $0x96, %ymm0, %ymm2, %ymm1
vmovdqa %ymm0, %ymm2
cmpq $0x3f8, %rcx            # imm = 0x3F8
jb 0x264b
incq %rax
cmpq $0x4000, %rax           # imm = 0x4000
jne 0x2640
incl %r15d
cmpl $0xa, %r15d
jne 0x263e
leaq 0x18(%rsp), %rdi
vmovdqa %ymm0, 0x13a0(%rsp)
xorl %esi, %esi
vmovdqa %ymm1, 0x13c0(%rsp)
vzeroupper
callq 0x21a0
testl %eax, %eax
js 0x283c
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
leaq 0x1afd(%rip), %rsi      # 0x41c9
movl $0x28, %edx
subq %r14, %rax
subq %rbx, %rcx
movq 0x38f2(%rip), %rbx      # 0x5fd0
vcvtsi2sd %rax, %xmm6, %xmm0
vcvtsi2sd %rcx, %xmm6, %xmm1
vfmadd132sd 0x1917(%rip), %xmm0, %xmm1 # xmm1 = (xmm1 * mem) + xmm0
movq %rbx, %rdi
vmulsd 0x1914(%rip), %xmm1, %xmm0 # 0x4010
vdivsd 0x1914(%rip), %xmm0, %xmm0 # 0x4018
vmovsd %xmm0, (%rsp)
callq 0x2160
vmovsd (%rsp), %xmm0
movq %rbx, %rdi
callq 0x2190
movq %rax, %rbx
movq (%rax), %rax
movl $0xa, %esi
movq -0x18(%rax), %rdi
addq %rbx, %rdi
callq 0x2140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x2080
movq %rax, %r14
leaq 0x19f3(%rip), %rsi      # 0x415d
movq %rax, %rdi
callq 0x2060
movq 0x3877(%rip), %rsi      # 0x5ff0
movq 0x3848(%rip), %rdx      # 0x5fc8
movq %r14, %rdi
callq 0x21d0
movl $0x10, %edi
callq 0x2080
movq %rax, %r14
leaq 0x19c1(%rip), %rsi      # 0x415d
movq %rax, %rdi
callq 0x2060
movq 0x3845(%rip), %rsi      # 0x5ff0
movq 0x3816(%rip), %rdx      # 0x5fc8
movq %r14, %rdi
callq 0x21d0
movl $0x10, %edi
callq 0x2080
movq %rax, %r14
leaq 0x198f(%rip), %rsi      # 0x415d
movq %rax, %rdi
callq 0x2060
movq 0x3813(%rip), %rsi      # 0x5ff0
movq 0x37e4(%rip), %rdx      # 0x5fc8
movq %r14, %rdi
callq 0x21d0
movl $0x10, %edi
callq 0x2080
movq %rax, %r14
leaq 0x195d(%rip), %rsi      # 0x415d
movq %rax, %rdi
callq 0x2060
movq 0x37e1(%rip), %rsi      # 0x5ff0
movq 0x37b2(%rip), %rdx      # 0x5fc8
movq %r14, %rdi
callq 0x21d0
movl $0x10, %edi
callq 0x2080
movq %rax, %r14
leaq 0x192b(%rip), %rsi      # 0x415d
movq %rax, %rdi
callq 0x2060
jmp 0x2858
movl $0x10, %edi
callq 0x2080
movq %rax, %r14
leaq 0x190d(%rip), %rsi      # 0x415d
movq %rax, %rdi
callq 0x2060
movq 0x3791(%rip), %rsi      # 0x5ff0
movq 0x3762(%rip), %rdx      # 0x5fc8
movq %r14, %rdi
callq 0x21d0
jmp 0x2870
movq %r14, %rdi
movq %rax, %rbx
callq 0x20d0
jmp 0x28d0
jmp 0x28a7
jmp 0x2883
jmp 0x28a7
movq %r14, %rdi
movq %rax, %rbx
callq 0x20d0
jmp 0x28aa
jmp 0x28c0
jmp 0x2896
jmp 0x28c0
movq %r14, %rdi
movq %rax, %rbx
callq 0x20d0
jmp 0x28c3
jmp 0x28d8
jmp 0x28c0
movq %rax, %rbx
movq 0x13a0(%rsp), %rdi
testq %rdi, %rdi
je 0x28d0
callq 0x2130
jmp 0x28d0
jmp 0x28c0
movq %rax, %rbx
leaq 0x13a0(%rsp), %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x21e0
movq %rax, %rdi
callq 0x29df