#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 uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int splitmix32(int *);
int xorshift128plus_32(int *);
int main(void) {
  uint32_t s[2][4];
  uint32_t seed[2] = {0, 1};
  for (int i = 0; i < 4; i++) {
    s[0][i] = splitmix32(&seed[0]);
    s[1][i] = splitmix32(&seed[1]);
  }
  for (int i = 0; i < 10; i++) {
    printf("%10u %10u\n", xorshift128plus_32(s[0]), xorshift128plus_32(s[1]));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x4,-0x3c(%rbp)
jge    1193 <main+0x63>
lea    -0x38(%rbp),%rdi
call   1050 <splitmix32@plt>
mov    %eax,%ecx
movslq -0x3c(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
lea    -0x38(%rbp),%rdi
add    $0x4,%rdi
call   1050 <splitmix32@plt>
mov    %eax,%ecx
movslq -0x3c(%rbp),%rax
mov    %ecx,-0x20(%rbp,%rax,4)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1151 <main+0x21>
movl   $0x0,-0x40(%rbp)
cmpl   $0xa,-0x40(%rbp)
jge    11dc <main+0xac>
lea    -0x30(%rbp),%rdi
call   1040 <xorshift128plus_32@plt>
mov    %eax,-0x44(%rbp)
lea    -0x30(%rbp),%rdi
add    $0x10,%rdi
call   1040 <xorshift128plus_32@plt>
mov    -0x44(%rbp),%esi
mov    %eax,%edx
lea    0xe3f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    119a <main+0x6a>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x38,%rsp
movabs $0x100000000,%rax
mov    %rax,0x8(%rsp)
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <splitmix32@plt>
mov    %eax,0x10(%rsp)
mov    %r15,%rdi
call   1050 <splitmix32@plt>
lea    0x20(%rsp),%r14
mov    %eax,0x20(%rsp)
mov    %rbx,%rdi
call   1050 <splitmix32@plt>
mov    %eax,0x14(%rsp)
mov    %r15,%rdi
call   1050 <splitmix32@plt>
mov    %eax,0x24(%rsp)
mov    %rbx,%rdi
call   1050 <splitmix32@plt>
mov    %eax,0x18(%rsp)
mov    %r15,%rdi
call   1050 <splitmix32@plt>
mov    %eax,0x28(%rsp)
mov    %rbx,%rdi
call   1050 <splitmix32@plt>
mov    %eax,0x1c(%rsp)
mov    %r15,%rdi
call   1050 <splitmix32@plt>
mov    %eax,0x2c(%rsp)
lea    0x10(%rsp),%r15
mov    %r15,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <xorshift128plus_32@plt>
lea    0xe2a(%rip),%rbx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %r15,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %r15,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %r15,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %r15,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %r15,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %r15,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %r15,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %r15,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %r15,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <xorshift128plus_32@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.seed = [2 x i32] [i32 0, i32 1]
@.str = [11 x i8] c"%10u %10u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x [4 x i32]]
%3 = alloca [2 x i32]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [2 x i32]* %3 to i8*
store i32 0, i32* %4
br label %7
7: ; preds = %23, %0
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 4
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%12 = call i32 @splitmix32(i32* %11)
%13 = getelementptr inbounds [2 x [4 x i32]], [2 x [4 x i32]]* %2, i64 0, i64 0
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %13, i64 0, i64 %15
store i32 %12, i32* %16
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%18 = call i32 @splitmix32(i32* %17)
%19 = getelementptr inbounds [2 x [4 x i32]], [2 x [4 x i32]]* %2, i64 0, i64 1
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [4 x i32], [4 x i32]* %19, i64 0, i64 %21
store i32 %18, i32* %22
br label %23
23: ; preds = %10
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %7
26: ; preds = %7
store i32 0, i32* %5
br label %27
27: ; preds = %38, %26
%28 = load i32, i32* %5
%29 = icmp slt i32 %28, 10
br i1 %29, label %30, label %41
30: ; preds = %27
%31 = getelementptr inbounds [2 x [4 x i32]], [2 x [4 x i32]]* %2, i64 0, i64 0
%32 = getelementptr inbounds [4 x i32], [4 x i32]* %31, i64 0, i64 0
%33 = call i32 @xorshift128plus_32(i32* %32)
%34 = getelementptr inbounds [2 x [4 x i32]], [2 x [4 x i32]]* %2, i64 0, i64 1
%35 = getelementptr inbounds [4 x i32], [4 x i32]* %34, i64 0, i64 0
%36 = call i32 @xorshift128plus_32(i32* %35)
%37 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %33, i32 %36)
br label %38
38: ; preds = %30
%39 = load i32, i32* %5
%40 = add nsw i32 %39, 1
store i32 %40, i32* %5
br label %27
41: ; preds = %27
%42 = load i32, i32* %1
ret i32 %42
}

LLVM IR (-O2):
@.str = [11 x i8] c"%10u %10u\0A\00"
define i32 @main() {
%1 = alloca [2 x [4 x i32]]
%2 = alloca i64
%3 = bitcast i64* %2 to [2 x i32]*
%4 = bitcast [2 x [4 x i32]]* %1 to i8*
%5 = bitcast i64* %2 to i8*
store i64 4294967296, i64* %2
%6 = bitcast i64* %2 to i32*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%8 = call i32 @splitmix32(i32* %6)
%9 = getelementptr inbounds [2 x [4 x i32]], [2 x [4 x i32]]* %1, i64 0, i64 0, i64 0
store i32 %8, i32* %9
%10 = call i32 @splitmix32(i32* %7)
%11 = getelementptr inbounds [2 x [4 x i32]], [2 x [4 x i32]]* %1, i64 0, i64 1, i64 0
store i32 %10, i32* %11
%12 = call i32 @splitmix32(i32* %6)
%13 = getelementptr inbounds [2 x [4 x i32]], [2 x [4 x i32]]* %1, i64 0, i64 0, i64 1
store i32 %12, i32* %13
%14 = call i32 @splitmix32(i32* %7)
%15 = getelementptr inbounds [2 x [4 x i32]], [2 x [4 x i32]]* %1, i64 0, i64 1, i64 1
store i32 %14, i32* %15
%16 = call i32 @splitmix32(i32* %6)
%17 = getelementptr inbounds [2 x [4 x i32]], [2 x [4 x i32]]* %1, i64 0, i64 0, i64 2
store i32 %16, i32* %17
%18 = call i32 @splitmix32(i32* %7)
%19 = getelementptr inbounds [2 x [4 x i32]], [2 x [4 x i32]]* %1, i64 0, i64 1, i64 2
store i32 %18, i32* %19
%20 = call i32 @splitmix32(i32* %6)
%21 = getelementptr inbounds [2 x [4 x i32]], [2 x [4 x i32]]* %1, i64 0, i64 0, i64 3
store i32 %20, i32* %21
%22 = call i32 @splitmix32(i32* %7)
%23 = getelementptr inbounds [2 x [4 x i32]], [2 x [4 x i32]]* %1, i64 0, i64 1, i64 3
store i32 %22, i32* %23
%24 = call i32 @xorshift128plus_32(i32* %9)
%25 = call i32 @xorshift128plus_32(i32* %11)
%26 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %24, i32 %25)
%27 = call i32 @xorshift128plus_32(i32* %9)
%28 = call i32 @xorshift128plus_32(i32* %11)
%29 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %27, i32 %28)
%30 = call i32 @xorshift128plus_32(i32* %9)
%31 = call i32 @xorshift128plus_32(i32* %11)
%32 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %30, i32 %31)
%33 = call i32 @xorshift128plus_32(i32* %9)
%34 = call i32 @xorshift128plus_32(i32* %11)
%35 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %33, i32 %34)
%36 = call i32 @xorshift128plus_32(i32* %9)
%37 = call i32 @xorshift128plus_32(i32* %11)
%38 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %36, i32 %37)
%39 = call i32 @xorshift128plus_32(i32* %9)
%40 = call i32 @xorshift128plus_32(i32* %11)
%41 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %39, i32 %40)
%42 = call i32 @xorshift128plus_32(i32* %9)
%43 = call i32 @xorshift128plus_32(i32* %11)
%44 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %42, i32 %43)
%45 = call i32 @xorshift128plus_32(i32* %9)
%46 = call i32 @xorshift128plus_32(i32* %11)
%47 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %45, i32 %46)
%48 = call i32 @xorshift128plus_32(i32* %9)
%49 = call i32 @xorshift128plus_32(i32* %11)
%50 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %48, i32 %49)
%51 = call i32 @xorshift128plus_32(i32* %9)
%52 = call i32 @xorshift128plus_32(i32* %11)
%53 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %51, i32 %52)
ret i32 0
}