#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 *, char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int odd = 0, even = 0, x, i;
  for (i = 0; i < 8; i++) {
    scanf("%d", &x);
    odd += (x % 2) ? x : 0;
    even += (!(x % 2)) ? x : 0;
  }
  printf("%s\n%d\n%d",
         (odd == even)  ? "equal"
         : (odd > even) ? "odd"
                        : "even",
         even, odd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    11d0 <main+0xb0>
lea    0xeb1(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     117d <main+0x5d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1187 <main+0x67>
xor    %eax,%eax
mov    %eax,-0x18(%rbp)
jmp    1187 <main+0x67>
mov    -0x18(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11af <main+0x8f>
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    11b9 <main+0x99>
xor    %eax,%eax
mov    %eax,-0x1c(%rbp)
jmp    11b9 <main+0x99>
mov    -0x1c(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1144 <main+0x24>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11ec <main+0xcc>
lea    0xe26(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    120a <main+0xea>
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%esi
lea    0xe1a(%rip),%rax
lea    0xe0f(%rip),%rcx
cmp    %esi,%edx
cmovg  %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xde5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xed4(%rip),%r12
lea    0x4(%rsp),%r14
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%r13d
mov    %r13d,%eax
and    $0x1,%eax
mov    %eax,%ebx
neg    %ebx
and    %r13d,%ebx
xor    %ecx,%ecx
test   %eax,%eax
cmovne %ecx,%r13d
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebp
mov    %ebp,%eax
and    $0x1,%eax
mov    %eax,%r15d
neg    %r15d
and    %ebp,%r15d
add    %ebx,%r15d
test   %eax,%eax
mov    $0x0,%eax
cmovne %eax,%ebp
add    %r13d,%ebp
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%r13d
mov    %r13d,%eax
and    $0x1,%eax
mov    %eax,%ebx
neg    %ebx
and    %r13d,%ebx
add    %r15d,%ebx
test   %eax,%eax
mov    $0x0,%eax
cmovne %eax,%r13d
add    %ebp,%r13d
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%r15d
mov    %r15d,%eax
and    $0x1,%eax
mov    %eax,%ebp
neg    %ebp
and    %r15d,%ebp
add    %ebx,%ebp
test   %eax,%eax
mov    $0x0,%eax
cmovne %eax,%r15d
add    %r13d,%r15d
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%r13d
mov    %r13d,%eax
and    $0x1,%eax
mov    %eax,%ebx
neg    %ebx
and    %r13d,%ebx
add    %ebp,%ebx
test   %eax,%eax
mov    $0x0,%eax
cmovne %eax,%r13d
add    %r15d,%r13d
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%r15d
mov    %r15d,%eax
and    $0x1,%eax
mov    %eax,%ebp
neg    %ebp
and    %r15d,%ebp
add    %ebx,%ebp
test   %eax,%eax
mov    $0x0,%eax
cmovne %eax,%r15d
add    %r13d,%r15d
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%r13d
mov    %r13d,%eax
and    $0x1,%eax
mov    %eax,%ebx
neg    %ebx
and    %r13d,%ebx
add    %ebp,%ebx
test   %eax,%eax
mov    $0x0,%ebp
cmovne %ebp,%r13d
add    %r15d,%r13d
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edx
mov    %edx,%eax
and    $0x1,%eax
mov    %eax,%ecx
neg    %ecx
and    %edx,%ecx
add    %ebx,%ecx
test   %eax,%eax
cmovne %ebp,%edx
add    %r13d,%edx
cmp    %edx,%ecx
lea    0xd77(%rip),%rax
lea    0xd74(%rip),%rdi
cmovg  %rax,%rdi
lea    0xd5f(%rip),%rsi
cmovne %rdi,%rsi
lea    0xd4b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"%s\0A%d\0A%d\00"
@.str.2 = [6 x i8] c"equal\00"
@.str.3 = [4 x i8] c"odd\00"
@.str.4 = [5 x i8] c"even\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 0, i32 %4
%8 = select i1 %6, i32 %4, i32 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = and i32 %10, 1
%12 = icmp eq i32 %11, 0
%13 = select i1 %12, i32 0, i32 %10
%14 = add nsw i32 %13, %7
%15 = select i1 %12, i32 %10, i32 0
%16 = add nsw i32 %15, %8
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%18 = load i32, i32* %1
%19 = and i32 %18, 1
%20 = icmp eq i32 %19, 0
%21 = select i1 %20, i32 0, i32 %18
%22 = add nsw i32 %21, %14
%23 = select i1 %20, i32 %18, i32 0
%24 = add nsw i32 %23, %16
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%26 = load i32, i32* %1
%27 = and i32 %26, 1
%28 = icmp eq i32 %27, 0
%29 = select i1 %28, i32 0, i32 %26
%30 = add nsw i32 %29, %22
%31 = select i1 %28, i32 %26, i32 0
%32 = add nsw i32 %31, %24
%33 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%34 = load i32, i32* %1
%35 = and i32 %34, 1
%36 = icmp eq i32 %35, 0
%37 = select i1 %36, i32 0, i32 %34
%38 = add nsw i32 %37, %30
%39 = select i1 %36, i32 %34, i32 0
%40 = add nsw i32 %39, %32
%41 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%42 = load i32, i32* %1
%43 = and i32 %42, 1
%44 = icmp eq i32 %43, 0
%45 = select i1 %44, i32 0, i32 %42
%46 = add nsw i32 %45, %38
%47 = select i1 %44, i32 %42, i32 0
%48 = add nsw i32 %47, %40
%49 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%50 = load i32, i32* %1
%51 = and i32 %50, 1
%52 = icmp eq i32 %51, 0
%53 = select i1 %52, i32 0, i32 %50
%54 = add nsw i32 %53, %46
%55 = select i1 %52, i32 %50, i32 0
%56 = add nsw i32 %55, %48
%57 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%58 = load i32, i32* %1
%59 = and i32 %58, 1
%60 = icmp eq i32 %59, 0
%61 = select i1 %60, i32 0, i32 %58
%62 = add nsw i32 %61, %54
%63 = select i1 %60, i32 %58, i32 0
%64 = add nsw i32 %63, %56
%65 = icmp eq i32 %62, %64
%66 = icmp sgt i32 %62, %64
%67 = select i1 %66, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0)
%68 = select i1 %65, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %67
%69 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %68, i32 %64, i32 %62)
ret i32 0
}