#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 n, i = 0, a[100];
  scanf("%d", &n);
  while (i != n) {
    scanf("%d", &a[i]);
    if (a[i] % 2)
      i++;
  }
  i = 0;
  n--;
  while (n > i) {
    printf("%d\n", a[i] - a[n]);
    i++;
    n--;
    if (i == n)
      printf("%d\n", a[n]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     119d <main+0x7d>
movslq -0xc(%rbp),%rax
lea    -0x1a0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe92(%rip),%rdi
call   1040 <scanf@plt>
movslq -0xc(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1198 <main+0x78>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1149 <main+0x29>
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1215 <main+0xf5>
movslq -0xc(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%esi
movslq -0x8(%rbp),%rax
sub    -0x1a0(%rbp,%rax,4),%esi
lea    0xe2d(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1210 <main+0xf0>
movslq -0x8(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%esi
lea    0xdf8(%rip),%rdi
call   1030 <printf@plt>
jmp    11ad <main+0x8d>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x1a0,%rsp
lea    0xece(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
je     11d0 <main+0xb0>
xor    %ecx,%ecx
lea    0xeb0(%rip),%r14
mov    %ecx,%ebp
mov    %ecx,%ebx
lea    (%rsp,%rbx,4),%rsi
add    $0x10,%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
mov    0x10(%rsp,%rbx,4),%ecx
and    $0x1,%ecx
add    %ebp,%ecx
cmp    0xc(%rsp),%ecx
jne    1150 <main+0x30>
lea    -0x1(%rcx),%eax
mov    %eax,0xc(%rsp)
cmp    $0x2,%ecx
jb     11d0 <main+0xb0>
xor    %ebx,%ebx
lea    0xe7b(%rip),%r14
jmp    1194 <main+0x74>
nopw   0x0(%rax,%rax,1)
cmp    %ebx,%eax
jle    11d0 <main+0xb0>
mov    0x10(%rsp,%rbx,4),%esi
cltq
sub    0x10(%rsp,%rax,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rcx
lea    -0x1(%rcx),%rax
mov    %eax,0xc(%rsp)
mov    %eax,%edx
cmp    %rdx,%rbx
jne    1190 <main+0x70>
mov    0xc(%rsp,%rcx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
jmp    1190 <main+0x70>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
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 [100 x i32]
store i32 0, i32* %1
store i32 0, i32* %3
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %6
6: ; preds = %24, %0
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %25
10: ; preds = %6
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %12
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %13)
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = srem i32 %18, 2
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %10
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %24
24: ; preds = %21, %10
br label %6
25: ; preds = %6
store i32 0, i32* %3
%26 = load i32, i32* %2
%27 = add nsw i32 %26, -1
store i32 %27, i32* %2
br label %28
28: ; preds = %56, %25
%29 = load i32, i32* %2
%30 = load i32, i32* %3
%31 = icmp sgt i32 %29, %30
br i1 %31, label %32, label %57
32: ; preds = %28
%33 = load i32, i32* %3
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %34
%36 = load i32, i32* %35
%37 = load i32, i32* %2
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %38
%40 = load i32, i32* %39
%41 = sub nsw i32 %36, %40
%42 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %41)
%43 = load i32, i32* %3
%44 = add nsw i32 %43, 1
store i32 %44, i32* %3
%45 = load i32, i32* %2
%46 = add nsw i32 %45, -1
store i32 %46, i32* %2
%47 = load i32, i32* %3
%48 = load i32, i32* %2
%49 = icmp eq i32 %47, %48
br i1 %49, label %50, label %56
50: ; preds = %32
%51 = load i32, i32* %2
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 %52
%54 = load i32, i32* %53
%55 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %54)
br label %56
56: ; preds = %50, %32
br label %28
57: ; preds = %28
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 [100 x i32]
%3 = bitcast i32* %1 to i8*
%4 = bitcast [100 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 %46, label %8
8: ; preds = %0, %8
%9 = phi i32 [ %15, %8 ], [ 0, %0 ]
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %10
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %11)
%13 = load i32, i32* %11
%14 = and i32 %13, 1
%15 = add nuw nsw i32 %14, %9
%16 = load i32, i32* %1
%17 = icmp eq i32 %15, %16
br i1 %17, label %18, label %8
18: ; preds = %8
%19 = add nsw i32 %15, -1
store i32 %19, i32* %1
%20 = icmp ugt i32 %15, 1
br i1 %20, label %21, label %46
21: ; preds = %18, %42
%22 = phi i64 [ %31, %42 ], [ 0, %18 ]
%23 = phi i32 [ %43, %42 ], [ %19, %18 ]
%24 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %22
%25 = load i32, i32* %24
%26 = sext i32 %23 to i64
%27 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %26
%28 = load i32, i32* %27
%29 = sub nsw i32 %25, %28
%30 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %29)
%31 = add nuw i64 %22, 1
%32 = load i32, i32* %1
%33 = add nsw i32 %32, -1
store i32 %33, i32* %1
%34 = zext i32 %33 to i64
%35 = icmp eq i64 %31, %34
br i1 %35, label %36, label %42
36: ; preds = %21
%37 = sext i32 %33 to i64
%38 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %37
%39 = load i32, i32* %38
%40 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %39)
%41 = load i32, i32* %1
br label %42
42: ; preds = %36, %21
%43 = phi i32 [ %41, %36 ], [ %33, %21 ]
%44 = trunc i64 %31 to i32
%45 = icmp sgt i32 %43, %44
br i1 %45, label %21, label %46
46: ; preds = %42, %0, %18
ret i32 0
}