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

/* Variables and functions */
int /*<<< orphan*/ __rnd_mother(int *);
void __rnd_mother_init1(cl_uint *state, cl_uint seed) {
  cl_uint s = seed;
  int i;
  for (i = 0; i < 5; i++) {
    s = s * 29943829 - 1;
    state[i] = s;
  }
  for (i = 0; i < 23; i++)
    __rnd_mother(state);
}


x86 assembly (clang, -O0):
<__rnd_mother_init1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    115f <__rnd_mother_init1+0x4f>
imul   $0x1c8e815,-0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112c <__rnd_mother_init1+0x1c>
movl   $0x0,-0x14(%rbp)
cmpl   $0x17,-0x14(%rbp)
jge    1187 <__rnd_mother_init1+0x77>
mov    -0x8(%rbp),%rdi
call   1030 <__rnd_mother@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1166 <__rnd_mother_init1+0x56>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__rnd_mother_init1>:
push   %rbx
mov    %rdi,%rbx
imul   $0x1c8e815,%esi,%eax
add    $0xffffffff,%eax
mov    %eax,(%rdi)
imul   $0x1c8e815,%eax,%eax
add    $0xffffffff,%eax
mov    %eax,0x4(%rdi)
imul   $0x1c8e815,%eax,%eax
add    $0xffffffff,%eax
mov    %eax,0x8(%rdi)
imul   $0x1c8e815,%eax,%eax
add    $0xffffffff,%eax
mov    %eax,0xc(%rdi)
imul   $0x1c8e815,%eax,%eax
add    $0xffffffff,%eax
mov    %eax,0x10(%rdi)
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
call   1030 <__rnd_mother@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <__rnd_mother@plt>

LLVM IR (-O0):
define void @__rnd_mother_init1(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
store i32 %7, i32* %5
store i32 0, i32* %6
br label %8
8: ; preds = %20, %2
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 5
br i1 %10, label %11, label %23
11: ; preds = %8
%12 = load i32, i32* %5
%13 = mul nsw i32 %12, 29943829
%14 = sub nsw i32 %13, 1
store i32 %14, i32* %5
%15 = load i32, i32* %5
%16 = load i32*, i32** %3
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
store i32 %15, i32* %19
br label %20
20: ; preds = %11
%21 = load i32, i32* %6
%22 = add nsw i32 %21, 1
store i32 %22, i32* %6
br label %8
23: ; preds = %8
store i32 0, i32* %6
br label %24
24: ; preds = %30, %23
%25 = load i32, i32* %6
%26 = icmp slt i32 %25, 23
br i1 %26, label %27, label %33
27: ; preds = %24
%28 = load i32*, i32** %3
%29 = call i32 @__rnd_mother(i32* %28)
br label %30
30: ; preds = %27
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
store i32 %32, i32* %6
br label %24
33: ; preds = %24
ret void
}

LLVM IR (-O2):
define void @__rnd_mother_init1(i32* %0, i32 %1) {
%3 = mul nsw i32 %1, 29943829
%4 = add nsw i32 %3, -1
store i32 %4, i32* %0
%5 = mul nsw i32 %4, 29943829
%6 = add nsw i32 %5, -1
%7 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %6, i32* %7
%8 = mul nsw i32 %6, 29943829
%9 = add nsw i32 %8, -1
%10 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %9, i32* %10
%11 = mul nsw i32 %9, 29943829
%12 = add nsw i32 %11, -1
%13 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %12, i32* %13
%14 = mul nsw i32 %12, 29943829
%15 = add nsw i32 %14, -1
%16 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %15, i32* %16
%17 = tail call i32 @__rnd_mother(i32* %0)
%18 = tail call i32 @__rnd_mother(i32* %0)
%19 = tail call i32 @__rnd_mother(i32* %0)
%20 = tail call i32 @__rnd_mother(i32* %0)
%21 = tail call i32 @__rnd_mother(i32* %0)
%22 = tail call i32 @__rnd_mother(i32* %0)
%23 = tail call i32 @__rnd_mother(i32* %0)
%24 = tail call i32 @__rnd_mother(i32* %0)
%25 = tail call i32 @__rnd_mother(i32* %0)
%26 = tail call i32 @__rnd_mother(i32* %0)
%27 = tail call i32 @__rnd_mother(i32* %0)
%28 = tail call i32 @__rnd_mother(i32* %0)
%29 = tail call i32 @__rnd_mother(i32* %0)
%30 = tail call i32 @__rnd_mother(i32* %0)
%31 = tail call i32 @__rnd_mother(i32* %0)
%32 = tail call i32 @__rnd_mother(i32* %0)
%33 = tail call i32 @__rnd_mother(i32* %0)
%34 = tail call i32 @__rnd_mother(i32* %0)
%35 = tail call i32 @__rnd_mother(i32* %0)
%36 = tail call i32 @__rnd_mother(i32* %0)
%37 = tail call i32 @__rnd_mother(i32* %0)
%38 = tail call i32 @__rnd_mother(i32* %0)
%39 = tail call i32 @__rnd_mother(i32* %0)
ret void
}