#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 InSearchOfRudolph(int *, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i = 0, input, deers[200], numbers[100];
  scanf("%d", &input);
  if ((input > 200) || (input % 2 == 0))
    return 0;
  for (i = 0; i < 100; i++)
    numbers[i] = 0;
  for (i = 0; i < input; i++) {
    scanf("\n%d", &deers[i]);
    numbers[deers[i]]++;
    if (numbers[deers[i]] > 2)
      return 0;
  }
  printf("%d", InSearchOfRudolph(deers, input));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4c0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xeb1(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0xc8,-0xc(%rbp)
jg     117a <main+0x4a>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1186 <main+0x56>
movl   $0x0,-0x4(%rbp)
jmp    125f <main+0x12f>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    11b4 <main+0x84>
movslq -0x8(%rbp),%rax
movl   $0x0,-0x4c0(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    118d <main+0x5d>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    123b <main+0x10b>
movslq -0x8(%rbp),%rax
lea    -0x330(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe20(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x8(%rbp),%rax
movslq -0x330(%rbp,%rax,4),%rax
ff
mov    -0x4c0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x4c0(%rbp,%rax,4)
movslq -0x8(%rbp),%rax
movslq -0x330(%rbp,%rax,4),%rax
ff
cmpl   $0x2,-0x4c0(%rbp,%rax,4)
02
jle    1228 <main+0xf8>
movl   $0x0,-0x4(%rbp)
jmp    125f <main+0x12f>
jmp    122d <main+0xfd>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11bb <main+0x8b>
lea    -0x330(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <InSearchOfRudolph@plt>
mov    %eax,%esi
lea    0xdae(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x4c8,%rsp
lea    0xeac(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%r14d
cmp    $0xc8,%r14d
jg     11fe <main+0xbe>
mov    %r14d,%eax
and    $0x1,%eax
je     11fe <main+0xbe>
lea    0x10(%rsp),%rdi
mov    $0x190,%edx
xor    %esi,%esi
call   1040 <memset@plt>
test   %r14d,%r14d
jle    11e0 <main+0xa0>
lea    0x1a0(%rsp),%rbx
xor    %r12d,%r12d
lea    0xe5b(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
movslq (%rbx),%rax
mov    0x10(%rsp,%rax,4),%ecx
lea    0x1(%rcx),%edx
mov    %edx,0x10(%rsp,%rax,4)
cmp    $0x1,%ecx
jg     11fe <main+0xbe>
add    $0x1,%r12
movslq 0xc(%rsp),%r14
add    $0x4,%rbx
cmp    %r14,%r12
jl     11b0 <main+0x70>
lea    0x1a0(%rsp),%rdi
mov    %r14d,%esi
call   1060 <InSearchOfRudolph@plt>
lea    0xe0a(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x4c8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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