#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 findRudolph(int *, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i, amountOfReindeer, reindeer[200];
  do {
    scanf("%d", &amountOfReindeer);
  } while (amountOfReindeer % 2 != 0 &&
           !(amountOfReindeer > 0 && amountOfReindeer < 200));
  for (i = 0; i < amountOfReindeer; i++) {
    do {
      scanf("%d", &reindeer[i]);
    } while (reindeer[i] > 100 || reindeer[i] < 0);
  }
  printf("%d", findRudolph(reindeer, amountOfReindeer));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x340,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    $0x0,%edx
mov    %al,-0x331(%rbp)
je     119e <main+0x6e>
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x332(%rbp)
jle    1190 <main+0x60>
cmpl   $0xc8,-0xc(%rbp)
setl   %al
mov    %al,-0x332(%rbp)
mov    -0x332(%rbp),%al
xor    $0xff,%al
mov    %al,-0x331(%rbp)
mov    -0x331(%rbp),%al
test   $0x1,%al
jne    1142 <main+0x12>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1232 <main+0x102>
jmp    11c4 <main+0x94>
movslq -0x8(%rbp),%rax
lea    -0x330(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe23(%rip),%rdi
call   1050 <scanf@plt>
movslq -0x8(%rbp),%rcx
mov    $0x1,%al
cmpl   $0x64,-0x330(%rbp,%rcx,4)
64
mov    %al,-0x333(%rbp)
jg     1211 <main+0xe1>
movslq -0x8(%rbp),%rax
cmpl   $0x0,-0x330(%rbp,%rax,4)
setl   %al
mov    %al,-0x333(%rbp)
mov    -0x333(%rbp),%al
test   $0x1,%al
jne    11c4 <main+0x94>
jmp    1224 <main+0xf4>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11b3 <main+0x83>
lea    -0x330(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <findRudolph@plt>
mov    %eax,%esi
lea    0xdb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x340,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x330,%rsp
lea    0xebd(%rip),%r14
lea    0xc(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%esi
test   $0x1,%sil
je     1172 <main+0x42>
lea    -0xc8(%rsi),%eax
cmp    $0xffffff39,%eax
jb     1150 <main+0x20>
test   %esi,%esi
jle    11ae <main+0x7e>
xor    %r15d,%r15d
lea    0xe80(%rip),%r14
lea    (%rsp,%r15,4),%rbx
add    $0x10,%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
cmpl   $0x64,(%rbx)
ja     1190 <main+0x60>
add    $0x1,%r15
movslq 0xc(%rsp),%rsi
cmp    %rsi,%r15
jl     1180 <main+0x50>
lea    0x10(%rsp),%rdi
call   1040 <findRudolph@plt>
lea    0xe41(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x330,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [200 x i32]
store i32 0, i32* %1
br label %5
5: ; preds = %20, %0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
br label %7
7: ; preds = %5
%8 = load i32, i32* %3
%9 = srem i32 %8, 2
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i32, i32* %3
%16 = icmp slt i32 %15, 200
br label %17
17: ; preds = %14, %11
%18 = phi i1 [ false, %11 ], [ %16, %14 ]
%19 = xor i1 %18, true
br label %20
20: ; preds = %17, %7
%21 = phi i1 [ false, %7 ], [ %19, %17 ]
br i1 %21, label %5, label %22
22: ; preds = %20
store i32 0, i32* %2
br label %23
23: ; preds = %48, %22
%24 = load i32, i32* %2
%25 = load i32, i32* %3
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %51
27: ; preds = %23
br label %28
28: ; preds = %45, %27
%29 = load i32, i32* %2
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [200 x i32], [200 x i32]* %4, i64 0, i64 %30
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %31)
br label %33
33: ; preds = %28
%34 = load i32, i32* %2
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [200 x i32], [200 x i32]* %4, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = icmp sgt i32 %37, 100
br i1 %38, label %45, label %39
39: ; preds = %33
%40 = load i32, i32* %2
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [200 x i32], [200 x i32]* %4, i64 0, i64 %41
%43 = load i32, i32* %42
%44 = icmp slt i32 %43, 0
br label %45
45: ; preds = %39, %33
%46 = phi i1 [ true, %33 ], [ %44, %39 ]
br i1 %46, label %28, label %47
47: ; preds = %45
br label %48
48: ; preds = %47
%49 = load i32, i32* %2
%50 = add nsw i32 %49, 1
store i32 %50, i32* %2
br label %23
51: ; preds = %23
%52 = getelementptr inbounds [200 x i32], [200 x i32]* %4, i64 0, i64 0
%53 = load i32, i32* %3
%54 = call i32 @findRudolph(i32* %52, i32 %53)
%55 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %54)
%56 = load i32, i32* %1
ret i32 %56
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i32]
%3 = bitcast i32* %1 to i8*
%4 = bitcast [200 x i32]* %2 to i8*
br label %5
5: ; preds = %5, %0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = and i32 %7, 1
%9 = icmp ne i32 %8, 0
%10 = add i32 %7, -200
%11 = icmp ult i32 %10, -199
%12 = and i1 %9, %11
br i1 %12, label %5, label %13
13: ; preds = %5
%14 = icmp sgt i32 %7, 0
br i1 %14, label %15, label %27
15: ; preds = %13, %22
%16 = phi i64 [ %23, %22 ], [ 0, %13 ]
%17 = getelementptr inbounds [200 x i32], [200 x i32]* %2, i64 0, i64 %16
br label %18
18: ; preds = %15, %18
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %17)
%20 = load i32, i32* %17
%21 = icmp ugt i32 %20, 100
br i1 %21, label %18, label %22
22: ; preds = %18
%23 = add nuw nsw i64 %16, 1
%24 = load i32, i32* %1
%25 = sext i32 %24 to i64
%26 = icmp slt i64 %23, %25
br i1 %26, label %15, label %27
27: ; preds = %22, %13
%28 = phi i32 [ %7, %13 ], [ %24, %22 ]
%29 = getelementptr inbounds [200 x i32], [200 x i32]* %2, i64 0, i64 0
%30 = call i32 @findRudolph(i32* %29, i32 %28)
%31 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %30)
ret i32 0
}