#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int e = 0;
  int o = 0;
  int i = 0;
  int anzahl = 0;
  printf("Bitte die Anzahl eingeben: \n");
  scanf("%i", &anzahl);
  int zahlen[anzahl];
  while (i < anzahl) {
    printf("%i.Zahl:\t", i + 1);
    scanf("%i", &zahlen[i]);
    i = i + 1;
  }
  i = 0;
  while ((zahlen[e] % 2) == 0) {
    e++;
    if (e == anzahl) {
      printf("Even!\n");
      return 0;
    }
  }
  while ((zahlen[o] % 2) != 0) {
    o++;
    if (o == anzahl) {
      printf("Odd!\n");
      return 0;
    }
  }
  printf("Both!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xeae(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11d9 <main+0xb9>
mov    -0x10(%rbp),%esi
add    $0x1,%esi
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rsi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe57(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1190 <main+0x70>
movl   $0x0,-0x10(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1237 <main+0x117>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    1232 <main+0x112>
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x2c(%rbp)
jmp    12af <main+0x18f>
jmp    11e0 <main+0xc0>
jmp    123c <main+0x11c>
mov    -0x38(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1293 <main+0x173>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    128e <main+0x16e>
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x2c(%rbp)
jmp    12af <main+0x18f>
jmp    123c <main+0x11c>
lea    0xd9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x0,-0x2c(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
lea    0xea5(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   1050 <scanf@plt>
mov    %rsp,%rbx
mov    -0x2c(%rbp),%eax
mov    %rsp,%r13
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
mov    -0x2c(%rbp),%eax
test   %eax,%eax
jle    11cc <main+0x9c>
mov    %rbx,-0x38(%rbp)
lea    0xe72(%rip),%r14
lea    0xe68(%rip),%r15
mov    %r13,%r12
xor    %ebx,%ebx
nopl   (%rax)
add    $0x1,%rbx
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
movslq -0x2c(%rbp),%rax
add    $0x4,%r12
cmp    %rax,%rbx
jl     11a0 <main+0x70>
mov    -0x38(%rbp),%rbx
mov    %eax,%eax
xor    %ecx,%ecx
lea    0xe5d(%rip),%rdi
nopw   0x0(%rax,%rax,1)
testb  $0x1,0x0(%r13,%rcx,4)
jne    11f3 <main+0xc3>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    11e0 <main+0xb0>
jmp    1224 <main+0xf4>
xor    %ecx,%ecx
lea    0xe2d(%rip),%rdi
lea    0xe2c(%rip),%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
testb  $0x1,0x0(%r13,%rcx,4)
je     1224 <main+0xf4>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1210 <main+0xe0>
mov    %rdx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [10 x i8] c"%i.Zahl:\09\00"
@str = [28 x i8] c"Bitte die Anzahl eingeben: \00"
@str.6 = [6 x i8] c"Both!\00"
@str.7 = [5 x i8] c"Odd!\00"
@str.8 = [6 x i8] c"Even!\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
%8 = alloca i32, i64 %6
%9 = load i32, i32* %1
%10 = icmp sgt i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %14, %0
%12 = phi i32 [ %9, %0 ], [ %21, %14 ]
%13 = zext i32 %12 to i64
br label %24
14: ; preds = %0, %14
%15 = phi i64 [ %16, %14 ], [ 0, %0 ]
%16 = add nuw nsw i64 %15, 1
%17 = trunc i64 %16 to i32
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %17)
%19 = getelementptr inbounds i32, i32* %8, i64 %15
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %19)
%21 = load i32, i32* %1
%22 = sext i32 %21 to i64
%23 = icmp slt i64 %16, %22
br i1 %23, label %14, label %11
24: ; preds = %11, %30
%25 = phi i64 [ 0, %11 ], [ %31, %30 ]
%26 = getelementptr inbounds i32, i32* %8, i64 %25
%27 = load i32, i32* %26
%28 = and i32 %27, 1
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %33
30: ; preds = %24
%31 = add nuw nsw i64 %25, 1
%32 = icmp eq i64 %31, %13
br i1 %32, label %42, label %24
33: ; preds = %24, %39
%34 = phi i64 [ %40, %39 ], [ 0, %24 ]
%35 = getelementptr inbounds i32, i32* %8, i64 %34
%36 = load i32, i32* %35
%37 = and i32 %36, 1
%38 = icmp eq i32 %37, 0
br i1 %38, label %42, label %39
39: ; preds = %33
%40 = add nuw nsw i64 %34, 1
%41 = icmp eq i64 %40, %13
br i1 %41, label %42, label %33
42: ; preds = %30, %33, %39
%43 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @str.7, i64 0, i64 0), %39 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.6, i64 0, i64 0), %33 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.8, i64 0, i64 0), %30 ]
%44 = call i32 @puts(i8* dereferenceable(1) %43)
ret i32 0
}