#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int CheckSeed(unsigned long seed[6]) {
  int i;
  for (i = 0; i < 3; ++i) {
    if (seed[i] >= 4294967087.0) {
      fprintf(stderr,
              "****************************************\n"
              "ERROR: Seed[%1d] >= m1, Seed is not set.\n"
              "****************************************\n\n",
              i);
      return (-1);
    }
  }
  for (i = 3; i < 6; ++i) {
    if (seed[i] >= 4294944443.0) {
      fprintf(stderr,
              "****************************************\n"
              "ERROR: Seed[%1d] >= m1, Seed is not set.\n"
              "****************************************\n\n",
              i);
      return (-1);
    }
  }
  if (seed[0] == 0 && seed[1] == 0 && seed[2] == 0) {
    fprintf(stderr, "****************************\n"
                    "ERROR: First 3 seeds = 0.\n"
                    "****************************\n\n");
    return (-1);
  }
  if (seed[3] == 0 && seed[4] == 0 && seed[5] == 0) {
    fprintf(stderr, "****************************\n"
                    "ERROR: Last 3 seeds = 0.\n"
                    "****************************\n\n");
    return (-1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<CheckSeed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    11a7 <CheckSeed+0x97>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movq   (%rax,%rcx,8),%xmm0
movaps 0xecf(%rip),%xmm1
punpckldq %xmm1,%xmm0
movapd 0xed3(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xea4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1194 <CheckSeed+0x84>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xeaf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    12d8 <CheckSeed+0x1c8>
jmp    1199 <CheckSeed+0x89>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <CheckSeed+0x13>
movl   $0x3,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jge    1232 <CheckSeed+0x122>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movq   (%rax,%rcx,8),%xmm0
movaps 0xe44(%rip),%xmm1
punpckldq %xmm1,%xmm0
movapd 0xe48(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe11(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     121f <CheckSeed+0x10f>
mov    0x2de0(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xe24(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    12d8 <CheckSeed+0x1c8>
jmp    1224 <CheckSeed+0x114>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11ae <CheckSeed+0x9e>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1281 <CheckSeed+0x171>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
jne    1281 <CheckSeed+0x171>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x10(%rax)
jne    1281 <CheckSeed+0x171>
mov    0x2d7b(%rip),%rax
mov    (%rax),%edi
lea    0xe3f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    12d8 <CheckSeed+0x1c8>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x18(%rax)
jne    12d1 <CheckSeed+0x1c1>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x20(%rax)
jne    12d1 <CheckSeed+0x1c1>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x28(%rax)
jne    12d1 <CheckSeed+0x1c1>
mov    0x2d2b(%rip),%rax
mov    (%rax),%edi
lea    0xe45(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    12d8 <CheckSeed+0x1c8>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckSeed>:
push   %rax
mov    $0xffffa6ba,%ecx
mov    (%rdi),%rax
lea    0x5874(%rcx),%rsi
xor    %edx,%edx
cmp    %rsi,%rax
ja     116d <CheckSeed+0x5d>
mov    0x8(%rdi),%r11
mov    $0x1,%edx
cmp    %rsi,%r11
ja     116d <CheckSeed+0x5d>
mov    0x10(%rdi),%r8
mov    $0x2,%edx
cmp    %rsi,%r8
ja     116d <CheckSeed+0x5d>
mov    0x18(%rdi),%r9
mov    $0x3,%edx
cmp    %rcx,%r9
ja     116d <CheckSeed+0x5d>
mov    0x20(%rdi),%r10
mov    $0x4,%edx
cmp    %rcx,%r10
ja     116d <CheckSeed+0x5d>
mov    0x28(%rdi),%rdi
mov    $0x5,%edx
cmp    %rcx,%rdi
jbe    118b <CheckSeed+0x7b>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
lea    0xe83(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
test   %rax,%rax
jne    11ac <CheckSeed+0x9c>
test   %r11,%r11
jne    11ac <CheckSeed+0x9c>
test   %r8,%r8
jne    11ac <CheckSeed+0x9c>
mov    0x2e3f(%rip),%rax
mov    (%rax),%edi
lea    0xed3(%rip),%rsi
jmp    11cd <CheckSeed+0xbd>
xor    %eax,%eax
test   %r9,%r9
jne    1189 <CheckSeed+0x79>
test   %r10,%r10
jne    1189 <CheckSeed+0x79>
test   %rdi,%rdi
jne    1189 <CheckSeed+0x79>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
lea    0xf06(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
jmp    1184 <CheckSeed+0x74>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [125 x i8] c"****************************************\0AERROR: Seed[%1d] >= m1, Seed is not set.\0A****************************************\0A\0A\00"
@.str.1 = [86 x i8] c"****************************\0AERROR: First 3 seeds = 0.\0A****************************\0A\0A\00"
@.str.2 = [85 x i8] c"****************************\0AERROR: Last 3 seeds = 0.\0A****************************\0A\0A\00"
define i32 @CheckSeed(i64* %0) {
%2 = alloca i32
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 0, i32* %4
br label %5
5: ; preds = %21, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %24
8: ; preds = %5
%9 = load i64*, i64** %3
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %9, i64 %11
%13 = load i64, i64* %12
%14 = uitofp i64 %13 to double
%15 = fcmp oge double %14, 0x41EFFFFFE5E00000
br i1 %15, label %16, label %20
16: ; preds = %8
%17 = load i32, i32* @stderr
%18 = load i32, i32* %4
%19 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i32 %18)
store i32 -1, i32* %2
br label %81
20: ; preds = %8
br label %21
21: ; preds = %20
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %5
24: ; preds = %5
store i32 3, i32* %4
br label %25
25: ; preds = %41, %24
%26 = load i32, i32* %4
%27 = icmp slt i32 %26, 6
br i1 %27, label %28, label %44
28: ; preds = %25
%29 = load i64*, i64** %3
%30 = load i32, i32* %4
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i64, i64* %29, i64 %31
%33 = load i64, i64* %32
%34 = uitofp i64 %33 to double
%35 = fcmp oge double %34, 0x41EFFFF4D7600000
br i1 %35, label %36, label %40
36: ; preds = %28
%37 = load i32, i32* @stderr
%38 = load i32, i32* %4
%39 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i32 %38)
store i32 -1, i32* %2
br label %81
40: ; preds = %28
br label %41
41: ; preds = %40
%42 = load i32, i32* %4
%43 = add nsw i32 %42, 1
store i32 %43, i32* %4
br label %25
44: ; preds = %25
%45 = load i64*, i64** %3
%46 = getelementptr inbounds i64, i64* %45, i64 0
%47 = load i64, i64* %46
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %62
49: ; preds = %44
%50 = load i64*, i64** %3
%51 = getelementptr inbounds i64, i64* %50, i64 1
%52 = load i64, i64* %51
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %62
54: ; preds = %49
%55 = load i64*, i64** %3
%56 = getelementptr inbounds i64, i64* %55, i64 2
%57 = load i64, i64* %56
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %62
59: ; preds = %54
%60 = load i32, i32* @stderr
%61 = call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %2
br label %81
62: ; preds = %54, %49, %44
%63 = load i64*, i64** %3
%64 = getelementptr inbounds i64, i64* %63, i64 3
%65 = load i64, i64* %64
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %80
67: ; preds = %62
%68 = load i64*, i64** %3
%69 = getelementptr inbounds i64, i64* %68, i64 4
%70 = load i64, i64* %69
%71 = icmp eq i64 %70, 0
br i1 %71, label %72, label %80
72: ; preds = %67
%73 = load i64*, i64** %3
%74 = getelementptr inbounds i64, i64* %73, i64 5
%75 = load i64, i64* %74
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %80
77: ; preds = %72
%78 = load i32, i32* @stderr
%79 = call i32 (i32, i8*, ...) @fprintf(i32 %78, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %2
br label %81
80: ; preds = %72, %67, %62
store i32 0, i32* %2
br label %81
81: ; preds = %80, %77, %59, %36, %16
%82 = load i32, i32* %2
ret i32 %82
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [125 x i8] c"****************************************\0AERROR: Seed[%1d] >= m1, Seed is not set.\0A****************************************\0A\0A\00"
@.str.1 = [86 x i8] c"****************************\0AERROR: First 3 seeds = 0.\0A****************************\0A\0A\00"
@.str.2 = [85 x i8] c"****************************\0AERROR: Last 3 seeds = 0.\0A****************************\0A\0A\00"
define i32 @CheckSeed(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = icmp ugt i64 %2, 4294967086
br i1 %3, label %4, label %8
4: ; preds = %12, %8, %1
%5 = phi i32 [ 0, %1 ], [ 1, %8 ], [ 2, %12 ]
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %50
8: ; preds = %1
%9 = getelementptr inbounds i64, i64* %0, i64 1
%10 = load i64, i64* %9
%11 = icmp ugt i64 %10, 4294967086
br i1 %11, label %4, label %12
12: ; preds = %8
%13 = getelementptr inbounds i64, i64* %0, i64 2
%14 = load i64, i64* %13
%15 = icmp ugt i64 %14, 4294967086
br i1 %15, label %4, label %16
16: ; preds = %12
%17 = getelementptr inbounds i64, i64* %0, i64 3
%18 = load i64, i64* %17
%19 = icmp ugt i64 %18, 4294944442
br i1 %19, label %20, label %24
20: ; preds = %28, %24, %16
%21 = phi i32 [ 3, %16 ], [ 4, %24 ], [ 5, %28 ]
%22 = load i32, i32* @stderr
%23 = tail call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i32 %21)
br label %50
24: ; preds = %16
%25 = getelementptr inbounds i64, i64* %0, i64 4
%26 = load i64, i64* %25
%27 = icmp ugt i64 %26, 4294944442
br i1 %27, label %20, label %28
28: ; preds = %24
%29 = getelementptr inbounds i64, i64* %0, i64 5
%30 = load i64, i64* %29
%31 = icmp ugt i64 %30, 4294944442
br i1 %31, label %20, label %32
32: ; preds = %28
%33 = icmp eq i64 %2, 0
%34 = icmp eq i64 %10, 0
%35 = select i1 %33, i1 %34, i1 false
%36 = icmp eq i64 %14, 0
%37 = select i1 %35, i1 %36, i1 false
br i1 %37, label %38, label %41
38: ; preds = %32
%39 = load i32, i32* @stderr
%40 = tail call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.1, i64 0, i64 0))
br label %50
41: ; preds = %32
%42 = icmp eq i64 %18, 0
%43 = icmp eq i64 %26, 0
%44 = select i1 %42, i1 %43, i1 false
%45 = icmp eq i64 %30, 0
%46 = select i1 %44, i1 %45, i1 false
br i1 %46, label %47, label %50
47: ; preds = %41
%48 = load i32, i32* @stderr
%49 = tail call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.2, i64 0, i64 0))
br label %50
50: ; preds = %41, %47, %38, %20, %4
%51 = phi i32 [ -1, %4 ], [ -1, %20 ], [ -1, %38 ], [ -1, %47 ], [ 0, %41 ]
ret i32 %51
}