#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 */

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ rstart(int, int, int, int);
void rinit(int ijkl) {
  int i, j, k, l, ij, kl;
  if ((ijkl < 0) || (ijkl > 900000000)) {
    printf("rinit: ijkl = %d -- out of range\n\n", ijkl);
    exit(3);
  }
  ij = ijkl / 30082;
  kl = ijkl - (30082 * ij);
  i = ((ij / 177) % 177) + 2;
  j = (ij % 177) + 2;
  k = ((kl / 169) % 178) + 1;
  l = kl % 169;
  if ((i <= 0) || (i > 178)) {
    printf("rinit: i = %d -- out of range\n\n", i);
    exit(3);
  }
  if ((j <= 0) || (j > 178)) {
    printf("rinit: j = %d -- out of range\n\n", j);
    exit(3);
  }
  if ((k <= 0) || (k > 178)) {
    printf("rinit: k = %d -- out of range\n\n", k);
    exit(3);
  }
  if ((l < 0) || (l > 168)) {
    printf("rinit: l = %d -- out of range\n\n", l);
    exit(3);
  }
  if (i == 1 && j == 1 && k == 1) {
    printf("rinit: 1 1 1 not allowed for 1st 3 seeds\n\n");
    exit(4);
  }
  rstart(i, j, k, l);
}


x86 assembly (clang, -O0):
<rinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1152 <rinit+0x22>
cmpl   $0x35a4e900,-0x4(%rbp)
jle    116d <rinit+0x3d>
mov    -0x4(%rbp),%esi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x3,%edi
call   1050 <exit@plt>
mov    -0x4(%rbp),%eax
mov    $0x7582,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
imul   $0x7582,-0x18(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    $0xb1,%ecx
cltd
idiv   %ecx
mov    $0xb1,%ecx
cltd
idiv   %ecx
add    $0x2,%edx
mov    %edx,-0x8(%rbp)
mov    -0x18(%rbp),%eax
mov    $0xb1,%ecx
cltd
idiv   %ecx
add    $0x2,%edx
mov    %edx,-0xc(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0xa9,%ecx
cltd
idiv   %ecx
mov    $0xb2,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0xa9,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    11f2 <rinit+0xc2>
cmpl   $0xb2,-0x8(%rbp)
jle    120d <rinit+0xdd>
mov    -0x8(%rbp),%esi
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x3,%edi
call   1050 <exit@plt>
cmpl   $0x0,-0xc(%rbp)
jle    1224 <rinit+0xf4>
cmpl   $0xb2,-0xc(%rbp)
jle    123f <rinit+0x10f>
mov    -0xc(%rbp),%esi
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x3,%edi
call   1050 <exit@plt>
cmpl   $0x0,-0x10(%rbp)
jle    1256 <rinit+0x126>
cmpl   $0xb2,-0x10(%rbp)
jle    1271 <rinit+0x141>
mov    -0x10(%rbp),%esi
lea    0xe03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x3,%edi
call   1050 <exit@plt>
cmpl   $0x0,-0x14(%rbp)
jl     1288 <rinit+0x158>
cmpl   $0xa8,-0x14(%rbp)
jle    12a3 <rinit+0x173>
mov    -0x14(%rbp),%esi
lea    0xdf1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x3,%edi
call   1050 <exit@plt>
cmpl   $0x1,-0x8(%rbp)
jne    12d9 <rinit+0x1a9>
cmpl   $0x1,-0xc(%rbp)
jne    12d9 <rinit+0x1a9>
cmpl   $0x1,-0x10(%rbp)
jne    12d9 <rinit+0x1a9>
lea    0xddb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x4,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1040 <rstart@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rinit>:
push   %rax
mov    %edi,%r8d
cmp    $0x35a4e901,%edi
jae    11ed <rinit+0xbd>
mov    %r8d,%ecx
shr    %ecx
mov    $0x8b6dd4bd,%r9d
imul   %rcx,%r9
shr    $0x2d,%r9
imul   $0xffff8a7e,%r9d,%ecx
add    %r8d,%ecx
movslq %ecx,%rdx
imul   $0x60f25deb,%rdx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rdi
add    %edx,%edi
movslq %edi,%rax
imul   $0xffffffffb81702e1,%rax,%rdx
shr    $0x20,%rdx
add    %edi,%edx
mov    %edx,%esi
shr    $0x1f,%esi
sar    $0x7,%edx
add    %esi,%edx
imul   $0xb2,%edx,%edx
sub    %edx,%eax
lea    0x1(%rax),%edx
test   %eax,%eax
js     11f9 <rinit+0xc9>
imul   $0xa9,%edi,%eax
sub    %eax,%ecx
js     1204 <rinit+0xd4>
movzwl %r9w,%eax
imul   $0x7243,%eax,%eax
shr    $0x10,%eax
mov    %r9d,%esi
sub    %eax,%esi
movzwl %si,%esi
shr    %esi
add    %eax,%esi
shr    $0x7,%esi
imul   $0xb1,%esi,%eax
neg    %eax
add    %r9d,%eax
add    $0x2,%eax
movzwl %ax,%esi
mov    %r8d,%eax
mov    $0xc9a8f9d5,%edi
imul   %rax,%rdi
shr    $0x36,%rdi
add    $0x2,%edi
pop    %rax
jmp    1040 <rstart@plt>
lea    0xe0c(%rip),%rdi
mov    %r8d,%esi
jmp    120d <rinit+0xdd>
lea    0xe23(%rip),%rdi
mov    %edx,%esi
jmp    120d <rinit+0xdd>
lea    0xe38(%rip),%rdi
mov    %ecx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x3,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"rinit: ijkl = %d -- out of range\0A\0A\00"
@.str.1 = [32 x i8] c"rinit: i = %d -- out of range\0A\0A\00"
@.str.2 = [32 x i8] c"rinit: j = %d -- out of range\0A\0A\00"
@.str.3 = [32 x i8] c"rinit: k = %d -- out of range\0A\0A\00"
@.str.4 = [32 x i8] c"rinit: l = %d -- out of range\0A\0A\00"
@.str.5 = [43 x i8] c"rinit: 1 1 1 not allowed for 1st 3 seeds\0A\0A\00"
define void @rinit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %2
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %1
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 900000000
br i1 %13, label %14, label %18
14: ; preds = %11, %1
%15 = load i32, i32* %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = call i32 @exit(i32 3)
unreachable
18: ; preds = %11
%19 = load i32, i32* %2
%20 = sdiv i32 %19, 30082
store i32 %20, i32* %7
%21 = load i32, i32* %2
%22 = load i32, i32* %7
%23 = mul nsw i32 30082, %22
%24 = sub nsw i32 %21, %23
store i32 %24, i32* %8
%25 = load i32, i32* %7
%26 = sdiv i32 %25, 177
%27 = srem i32 %26, 177
%28 = add nsw i32 %27, 2
store i32 %28, i32* %3
%29 = load i32, i32* %7
%30 = srem i32 %29, 177
%31 = add nsw i32 %30, 2
store i32 %31, i32* %4
%32 = load i32, i32* %8
%33 = sdiv i32 %32, 169
%34 = srem i32 %33, 178
%35 = add nsw i32 %34, 1
store i32 %35, i32* %5
%36 = load i32, i32* %8
%37 = srem i32 %36, 169
store i32 %37, i32* %6
%38 = load i32, i32* %3
%39 = icmp sle i32 %38, 0
br i1 %39, label %43, label %40
40: ; preds = %18
%41 = load i32, i32* %3
%42 = icmp sgt i32 %41, 178
br i1 %42, label %43, label %47
43: ; preds = %40, %18
%44 = load i32, i32* %3
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %44)
%46 = call i32 @exit(i32 3)
unreachable
47: ; preds = %40
%48 = load i32, i32* %4
%49 = icmp sle i32 %48, 0
br i1 %49, label %53, label %50
50: ; preds = %47
%51 = load i32, i32* %4
%52 = icmp sgt i32 %51, 178
br i1 %52, label %53, label %57
53: ; preds = %50, %47
%54 = load i32, i32* %4
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %54)
%56 = call i32 @exit(i32 3)
unreachable
57: ; preds = %50
%58 = load i32, i32* %5
%59 = icmp sle i32 %58, 0
br i1 %59, label %63, label %60
60: ; preds = %57
%61 = load i32, i32* %5
%62 = icmp sgt i32 %61, 178
br i1 %62, label %63, label %67
63: ; preds = %60, %57
%64 = load i32, i32* %5
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %64)
%66 = call i32 @exit(i32 3)
unreachable
67: ; preds = %60
%68 = load i32, i32* %6
%69 = icmp slt i32 %68, 0
br i1 %69, label %73, label %70
70: ; preds = %67
%71 = load i32, i32* %6
%72 = icmp sgt i32 %71, 168
br i1 %72, label %73, label %77
73: ; preds = %70, %67
%74 = load i32, i32* %6
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %74)
%76 = call i32 @exit(i32 3)
unreachable
77: ; preds = %70
%78 = load i32, i32* %3
%79 = icmp eq i32 %78, 1
br i1 %79, label %80, label %89
80: ; preds = %77
%81 = load i32, i32* %4
%82 = icmp eq i32 %81, 1
br i1 %82, label %83, label %89
83: ; preds = %80
%84 = load i32, i32* %5
%85 = icmp eq i32 %84, 1
br i1 %85, label %86, label %89
86: ; preds = %83
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%88 = call i32 @exit(i32 4)
unreachable
89: ; preds = %83, %80, %77
%90 = load i32, i32* %3
%91 = load i32, i32* %4
%92 = load i32, i32* %5
%93 = load i32, i32* %6
%94 = call i32 @rstart(i32 %90, i32 %91, i32 %92, i32 %93)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"rinit: ijkl = %d -- out of range\0A\0A\00"
@.str.3 = [32 x i8] c"rinit: k = %d -- out of range\0A\0A\00"
@.str.4 = [32 x i8] c"rinit: l = %d -- out of range\0A\0A\00"
define void @rinit(i32 %0) {
%2 = icmp ugt i32 %0, 900000000
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = tail call i32 @exit(i32 3)
unreachable
6: ; preds = %1
%7 = udiv i32 %0, 30082
%8 = mul nsw i32 %7, -30082
%9 = add nsw i32 %8, %0
%10 = sdiv i32 %9, 169
%11 = srem i32 %10, 178
%12 = add nsw i32 %11, 1
%13 = srem i32 %9, 169
%14 = icmp slt i32 %11, 0
br i1 %14, label %15, label %18
15: ; preds = %6
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%17 = tail call i32 @exit(i32 3)
unreachable
18: ; preds = %6
%19 = icmp slt i32 %13, 0
br i1 %19, label %20, label %23
20: ; preds = %18
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %13)
%22 = tail call i32 @exit(i32 3)
unreachable
23: ; preds = %18
%24 = trunc i32 %7 to i16
%25 = urem i16 %24, 177
%26 = add nuw nsw i16 %25, 2
%27 = zext i16 %26 to i32
%28 = udiv i32 %0, 5324514
%29 = add nuw nsw i32 %28, 2
%30 = tail call i32 @rstart(i32 %29, i32 %27, i32 %12, i32 %13)
ret void
}