#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__ xorshift128plus(int *);
scalar_t__ xorshift128plus_32(int *);
int main(void) {
  uint64_t s[] = {0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL};
  uint32_t s32[] = {0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU};
  for (int i = 0; i < 1000000000; i++) {
    assert(xorshift128plus(s) == xorshift128plus_32(s32));
  }
  printf("test succeeded\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xeaf(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeac(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x3b9aca00,-0x24(%rbp)
jge    11bf <main+0x7f>
lea    -0xc(%rbp),%rdi
call   1030 <xorshift128plus@plt>
mov    %rax,-0x30(%rbp)
lea    -0x20(%rbp),%rdi
call   1060 <xorshift128plus_32@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1177 <main+0x37>
lea    0xe5a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
movq   $0xffffffffffffffff,0x8(%rsp)
ff ff
pcmpeqd %xmm0,%xmm0
movdqa %xmm0,0x10(%rsp)
mov    $0x3b9aca00,%ebp
lea    0x8(%rsp),%r14
lea    0x10(%rsp),%r15
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <xorshift128plus@plt>
mov    %rax,%rbx
mov    %r15,%rdi
call   1060 <xorshift128plus_32@plt>
xor    %edi,%edi
cmp    %rax,%rbx
sete   %dil
call   1050 <assert@plt>
add    $0xffffffff,%ebp
jne    1170 <main+0x30>
lea    0xe63(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

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