#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*/ RandomFunc(unsigned int *, unsigned int *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ megaInit();
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strtoul(char *, int /*<<< orphan*/, int);
int main(int argc, char *argv[]) {
  unsigned int input[1];
  unsigned int output[1];
  int randomFuns_i5;
  unsigned int randomFuns_value6;
  int randomFuns_main_i7;
  {
    megaInit();
    if (argc != 2) {
      printf("Call this program with %i arguments\n", 1);
      exit(-1);
    } else {
    }
    randomFuns_i5 = 0;
    while (randomFuns_i5 < 1) {
      randomFuns_value6 = (unsigned int)strtoul(argv[randomFuns_i5 + 1], 0, 10);
      input[randomFuns_i5] = randomFuns_value6;
      randomFuns_i5++;
    }
    RandomFunc(input, output);
    if (output[0] == 2466803335U) {
      printf("You win!\n");
    } else {
    }
    randomFuns_main_i7 = 0;
    while (randomFuns_main_i7 < 1) {
      printf("%u\n", output[randomFuns_main_i7]);
      randomFuns_main_i7++;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <megaInit@plt>
cmpl   $0x2,-0x8(%rbp)
je     1194 <main+0x44>
lea    0xe82(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1070 <exit@plt>
jmp    1199 <main+0x49>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jge    11e3 <main+0x93>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtoul@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%ecx
movslq -0x1c(%rbp),%rax
mov    %ecx,-0x14(%rbp,%rax,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a0 <main+0x50>
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <RandomFunc@plt>
cmpl   $0x93086e87,-0x18(%rbp)
jne    1210 <main+0xc0>
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1215 <main+0xc5>
jmp    1215 <main+0xc5>
movl   $0x0,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
jge    124a <main+0xfa>
movslq -0x24(%rbp),%rax
mov    -0x18(%rbp,%rax,4),%esi
lea    0xdfa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    121c <main+0xcc>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <megaInit@plt>
cmp    $0x2,%ebp
jne    11c6 <main+0x66>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1070 <strtoul@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1060 <RandomFunc@plt>
mov    (%rsp),%esi
cmp    $0x93086e87,%esi
jne    11af <main+0x4f>
lea    0xe82(%rip),%rdi
call   1040 <puts@plt>
mov    (%rsp),%esi
lea    0xe6f(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe33(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"Call this program with %i arguments\0A\00"
@.str.1 = [10 x i8] c"You win!\0A\00"
@.str.2 = [4 x i8] c"%u\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1 x i32]
%7 = alloca [1 x i32]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = call i32 (...) @megaInit()
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 2
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 1)
%16 = call i32 @exit(i32 -1)
unreachable
17: ; preds = %2
br label %18
18: ; preds = %17
store i32 0, i32* %8
br label %19
19: ; preds = %22, %18
%20 = load i32, i32* %8
%21 = icmp slt i32 %20, 1
br i1 %21, label %22, label %37
22: ; preds = %19
%23 = load i8**, i8*** %5
%24 = load i32, i32* %8
%25 = add nsw i32 %24, 1
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %23, i64 %26
%28 = load i8*, i8** %27
%29 = call i64 @strtoul(i8* %28, i32 0, i32 10)
%30 = trunc i64 %29 to i32
store i32 %30, i32* %9
%31 = load i32, i32* %9
%32 = load i32, i32* %8
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 %33
store i32 %31, i32* %34
%35 = load i32, i32* %8
%36 = add nsw i32 %35, 1
store i32 %36, i32* %8
br label %19
37: ; preds = %19
%38 = getelementptr inbounds [1 x i32], [1 x i32]* %6, i64 0, i64 0
%39 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
%40 = call i32 @RandomFunc(i32* %38, i32* %39)
%41 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
%42 = load i32, i32* %41
%43 = icmp eq i32 %42, -1828163961
br i1 %43, label %44, label %46
44: ; preds = %37
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %47
46: ; preds = %37
br label %47
47: ; preds = %46, %44
store i32 0, i32* %10
br label %48
48: ; preds = %51, %47
%49 = load i32, i32* %10
%50 = icmp slt i32 %49, 1
br i1 %50, label %51, label %59
51: ; preds = %48
%52 = load i32, i32* %10
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 %53
%55 = load i32, i32* %54
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %55)
%57 = load i32, i32* %10
%58 = add nsw i32 %57, 1
store i32 %58, i32* %10
br label %48
59: ; preds = %48
%60 = load i32, i32* %3
ret i32 %60
}

LLVM IR (-O2):
@.str = [37 x i8] c"Call this program with %i arguments\0A\00"
@.str.2 = [4 x i8] c"%u\0A\00"
@str = [9 x i8] c"You win!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1 x i32]
%4 = alloca [1 x i32]
%5 = bitcast [1 x i32]* %3 to i8*
%6 = bitcast [1 x i32]* %4 to i8*
%7 = tail call i32 (...) @megaInit()
%8 = icmp eq i32 %0, 2
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 1)
%11 = tail call i32 @exit(i32 -1)
unreachable
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i64 @strtoul(i8* %14, i32 0, i32 10)
%16 = trunc i64 %15 to i32
%17 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
store i32 %16, i32* %17
%18 = getelementptr inbounds [1 x i32], [1 x i32]* %4, i64 0, i64 0
%19 = call i32 @RandomFunc(i32* %17, i32* %18)
%20 = load i32, i32* %18
%21 = icmp eq i32 %20, -1828163961
br i1 %21, label %22, label %25
22: ; preds = %12
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%24 = load i32, i32* %18
br label %25
25: ; preds = %12, %22
%26 = phi i32 [ %20, %12 ], [ %24, %22 ]
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %26)
ret i32 0
}