#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*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i = 0, j = 0, temp = 0;
  int n, deer[200];
  scanf("%d", &n);
  while (i != n) {
    scanf("%d", &deer[i]);
    i++;
  }
  for (i = 0; i != n; i++) {
    temp = 0;
    for (j = 0; j != n; j++) {
      if (deer[i] == deer[j] && i != j) {
        temp = 1;
        break;
      }
    }
    if (temp == 0) {
      printf("%d\n", i);
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x340,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xeb2(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     118f <main+0x6f>
movslq -0x8(%rbp),%rax
lea    -0x340(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe84(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1157 <main+0x37>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     1234 <main+0x114>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     1203 <main+0xe3>
movslq -0x8(%rbp),%rax
mov    -0x340(%rbp,%rax,4),%eax
movslq -0xc(%rbp),%rcx
cmp    -0x340(%rbp,%rcx,4),%eax
jne    11f0 <main+0xd0>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     11f0 <main+0xd0>
movl   $0x1,-0x10(%rbp)
jmp    1203 <main+0xe3>
jmp    11f5 <main+0xd5>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11b0 <main+0x90>
cmpl   $0x0,-0x10(%rbp)
jne    1221 <main+0x101>
mov    -0x8(%rbp),%esi
lea    0xdec(%rip),%rdi
call   1030 <printf@plt>
jmp    1234 <main+0x114>
jmp    1226 <main+0x106>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1196 <main+0x76>
xor    %eax,%eax
add    $0x340,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x330,%rsp
lea    0xecd(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
je     11bb <main+0x9b>
lea    0x10(%rsp),%r15
xor    %ebx,%ebx
lea    0xeae(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
add    $0x1,%rbx
mov    0xc(%rsp),%eax
add    $0x4,%r15
cmp    %rax,%rbx
jne    1160 <main+0x40>
test   %rax,%rax
je     11bb <main+0x9b>
xor    %esi,%esi
mov    0x10(%rsp,%rsi,4),%ecx
xor    %edx,%edx
jmp    1199 <main+0x79>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdx
cmp    %rdx,%rax
je     11af <main+0x8f>
cmp    0x10(%rsp,%rdx,4),%ecx
jne    1190 <main+0x70>
cmp    %rdx,%rsi
je     1190 <main+0x70>
add    $0x1,%rsi
cmp    %rax,%rsi
jne    1183 <main+0x63>
jmp    11bb <main+0x9b>
lea    0xe4d(%rip),%rdi
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"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [200 x i32]
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
br label %8
8: ; preds = %12, %0
%9 = load i32, i32* %2
%10 = load i32, i32* %5
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [200 x i32], [200 x i32]* %6, i64 0, i64 %14
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %15)
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
br label %8
19: ; preds = %8
store i32 0, i32* %2
br label %20
20: ; preds = %55, %19
%21 = load i32, i32* %2
%22 = load i32, i32* %5
%23 = icmp ne i32 %21, %22
br i1 %23, label %24, label %58
24: ; preds = %20
store i32 0, i32* %4
store i32 0, i32* %3
br label %25
25: ; preds = %45, %24
%26 = load i32, i32* %3
%27 = load i32, i32* %5
%28 = icmp ne i32 %26, %27
br i1 %28, label %29, label %48
29: ; preds = %25
%30 = load i32, i32* %2
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [200 x i32], [200 x i32]* %6, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = load i32, i32* %3
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [200 x i32], [200 x i32]* %6, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = icmp eq i32 %33, %37
br i1 %38, label %39, label %44
39: ; preds = %29
%40 = load i32, i32* %2
%41 = load i32, i32* %3
%42 = icmp ne i32 %40, %41
br i1 %42, label %43, label %44
43: ; preds = %39
store i32 1, i32* %4
br label %48
44: ; preds = %39, %29
br label %45
45: ; preds = %44
%46 = load i32, i32* %3
%47 = add nsw i32 %46, 1
store i32 %47, i32* %3
br label %25
48: ; preds = %43, %25
%49 = load i32, i32* %4
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %48
%52 = load i32, i32* %2
%53 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %52)
br label %58
54: ; preds = %48
br label %55
55: ; preds = %54
%56 = load i32, i32* %2
%57 = add nsw i32 %56, 1
store i32 %57, i32* %2
br label %20
58: ; preds = %51, %20
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\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*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 0
br i1 %7, label %40, label %12
8: ; preds = %12
%9 = icmp eq i32 %17, 0
br i1 %9, label %40, label %10
10: ; preds = %8
%11 = zext i32 %17 to i64
br label %20
12: ; preds = %0, %12
%13 = phi i64 [ %16, %12 ], [ 0, %0 ]
%14 = getelementptr inbounds [200 x i32], [200 x i32]* %2, i64 0, i64 %13
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %14)
%16 = add nuw i64 %13, 1
%17 = load i32, i32* %1
%18 = zext i32 %17 to i64
%19 = icmp eq i64 %16, %18
br i1 %19, label %8, label %12
20: ; preds = %37, %10
%21 = phi i64 [ 0, %10 ], [ %38, %37 ]
%22 = getelementptr inbounds [200 x i32], [200 x i32]* %2, i64 0, i64 %21
%23 = load i32, i32* %22
br label %26
24: ; preds = %26
%25 = icmp eq i64 %33, %11
br i1 %25, label %34, label %26
26: ; preds = %20, %24
%27 = phi i64 [ 0, %20 ], [ %33, %24 ]
%28 = getelementptr inbounds [200 x i32], [200 x i32]* %2, i64 0, i64 %27
%29 = load i32, i32* %28
%30 = icmp ne i32 %23, %29
%31 = icmp eq i64 %21, %27
%32 = select i1 %30, i1 true, i1 %31
%33 = add nuw nsw i64 %27, 1
br i1 %32, label %24, label %37
34: ; preds = %24
%35 = trunc i64 %21 to i32
%36 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %35)
br label %40
37: ; preds = %26
%38 = add nuw nsw i64 %21, 1
%39 = icmp eq i64 %38, %11
br i1 %39, label %40, label %20
40: ; preds = %37, %0, %8, %34
ret i32 0
}