#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *);
scalar_t__ xorshift1024star(int *, int *);
scalar_t__ xorshift1024star_32(int *);
int main(void) {
  uint64_t s[16] = {
      0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL,
      0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL,
      0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL,
      0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL,
      0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL,
      0xFFFFFFFFFFFFFFFFULL};
  int p = 0;
  uint32_t s32[33] = {0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
                      0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
                      0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
                      0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
                      0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
                      0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
                      0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
                      0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
                      0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
                      0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
                      0xFFFFFFFFU, 0xFFFFFFFFU, 0};
  for (int i = 0; i < 1000000000; i++) {
    assert(xorshift1024star(s, &p) == xorshift1024star_32(s32));
  }
  printf("test succeeded\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
mov    $0xff,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
movl   $0x0,-0x54(%rbp)
lea    -0xe0(%rbp),%rdi
lea    0xe66(%rip),%rsi
mov    $0x84,%edx
call   1070 <memcpy@plt>
movl   $0x0,-0xe4(%rbp)
cmpl   $0x3b9aca00,-0xe4(%rbp)
ca 9a 3b
jge    120c <main+0xac>
lea    -0x50(%rbp),%rdi
lea    -0x54(%rbp),%rsi
call   1050 <xorshift1024star@plt>
mov    %rax,-0xf0(%rbp)
lea    -0xe0(%rbp),%rdi
call   1080 <xorshift1024star_32@plt>
mov    %rax,%rcx
mov    -0xf0(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    11ae <main+0x4e>
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xe0,%rsp
pcmpeqd %xmm0,%xmm0
movdqa %xmm0,0x40(%rsp)
movdqa %xmm0,0x30(%rsp)
movdqa %xmm0,0x20(%rsp)
movdqa %xmm0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xe76(%rip),%rsi
lea    0x50(%rsp),%r14
mov    $0x84,%edx
mov    %r14,%rdi
call   1060 <memcpy@plt>
mov    $0x3b9aca00,%ebp
lea    0x10(%rsp),%r15
lea    0xc(%rsp),%r12
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <xorshift1024star@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1070 <xorshift1024star_32@plt>
xor    %edi,%edi
cmp    %rax,%rbx
sete   %dil
call   1050 <assert@plt>
add    $0xffffffff,%ebp
jne    11b0 <main+0x60>
lea    0xea4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.s32 = [33 x i32] [i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 0]
@.str = [16 x i8] c"test succeeded\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i32]
%3 = alloca i32
%4 = alloca [33 x i32]
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [16 x i32]* %2 to i8*
store i32 0, i32* %3
%7 = bitcast [33 x i32]* %4 to i8*
store i32 0, i32* %5
br label %8
8: ; preds = %19, %0
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 1000000000
br i1 %10, label %11, label %22
11: ; preds = %8
%12 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%13 = call i64 @xorshift1024star(i32* %12, i32* %3)
%14 = getelementptr inbounds [33 x i32], [33 x i32]* %4, i64 0, i64 0
%15 = call i64 @xorshift1024star_32(i32* %14)
%16 = icmp eq i64 %13, %15
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %8
22: ; preds = %8
%23 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@__const.main.s32 = [33 x i32] [i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 0]
@str = [15 x i8] c"test succeeded\00"
define i32 @main() {
%1 = alloca [16 x i32]
%2 = alloca i32
%3 = alloca [33 x i32]
%4 = bitcast [16 x i32]* %1 to i8*
%5 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%6 = bitcast [33 x i32]* %3 to i8*
%7 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%8 = getelementptr inbounds [33 x i32], [33 x i32]* %3, i64 0, i64 0
br label %11
9: ; preds = %11
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
11: ; preds = %0, %11
%12 = phi i32 [ 0, %0 ], [ %18, %11 ]
%13 = call i64 @xorshift1024star(i32* %7, i32* %2)
%14 = call i64 @xorshift1024star_32(i32* %8)
%15 = icmp eq i64 %13, %14
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = add nuw nsw i32 %12, 1
%19 = icmp eq i32 %18, 1000000000
br i1 %19, label %9, label %11
}