#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 m, i = 0, j;
  scanf("%d", &m);
  int a[m];
  while (i < m) {
    do {
      scanf("%d", &a[i]);
    } while (a[i] % 2 == 0);
    i++;
  }
  int c = 0;
  int d = m - 1;
  int sum;
  j = m / 2;
  while (j > 0) {
    sum = a[c] - a[d];
    c++;
    d--;
    j--;
    printf("%d\n", sum);
  }
  if (m % 2 == 1) {
    printf("%d", a[m / 2]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11c3 <main+0xa3>
jmp    117e <main+0x5e>
mov    -0x38(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe6c(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x38(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     117e <main+0x5e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116d <main+0x4d>
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    122f <main+0x10f>
mov    -0x38(%rbp),%rcx
movslq -0x24(%rbp),%rax
mov    (%rcx,%rax,4),%eax
movslq -0x28(%rbp),%rdx
sub    (%rcx,%rdx,4),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x2c(%rbp),%esi
lea    0xdde(%rip),%rdi
call   1030 <printf@plt>
jmp    11e1 <main+0xc1>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1266 <main+0x146>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xd9f(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x18(%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
lea    0xec8(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   1040 <scanf@plt>
mov    %rsp,%r12
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    11f8 <main+0xd8>
xor    %r15d,%r15d
lea    0xe8f(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x0(,%r15,4),%rbx
add    %r13,%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
testb  $0x1,(%rbx)
je     1190 <main+0x70>
add    $0x1,%r15
movslq -0x2c(%rbp),%rax
cmp    %rax,%r15
jl     1180 <main+0x60>
cmp    $0x2,%eax
jl     11f8 <main+0xd8>
mov    %r12,-0x38(%rbp)
mov    %eax,%ebx
lea    -0x4(,%rbx,4),%r14
ff
add    %r13,%r14
shr    %rbx
neg    %rbx
xor    %r15d,%r15d
mov    %r13,%r12
nop
mov    (%r12),%esi
sub    (%r14,%r15,4),%esi
lea    0xe24(%rip),%rdi
call   1030 <printf@plt>
add    $0x4,%r12
add    $0xffffffffffffffff,%r15
cmp    %r15,%rbx
jne    11d0 <main+0xb0>
mov    -0x2c(%rbp),%eax
mov    -0x38(%rbp),%r12
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
mov    %ecx,%edx
and    $0xfffffffe,%edx
sub    %edx,%eax
cmp    $0x1,%eax
jne    1221 <main+0x101>
sar    %ecx
movslq %ecx,%rax
mov    0x0(%r13,%rax,4),%esi
lea    0xde4(%rip),%rdi
call   1030 <printf@plt>
mov    %r12,%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 = [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 i8*
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %5
%14 = alloca i32, i64 %12
store i64 %12, i64* %6
br label %15
15: ; preds = %32, %0
%16 = load i32, i32* %3
%17 = load i32, i32* %2
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %35
19: ; preds = %15
br label %20
20: ; preds = %25, %19
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %14, i64 %22
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %23)
br label %25
25: ; preds = %20
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %14, i64 %27
%29 = load i32, i32* %28
%30 = srem i32 %29, 2
%31 = icmp eq i32 %30, 0
br i1 %31, label %20, label %32
32: ; preds = %25
%33 = load i32, i32* %3
%34 = add nsw i32 %33, 1
store i32 %34, i32* %3
br label %15
35: ; preds = %15
store i32 0, i32* %7
%36 = load i32, i32* %2
%37 = sub nsw i32 %36, 1
store i32 %37, i32* %8
%38 = load i32, i32* %2
%39 = sdiv i32 %38, 2
store i32 %39, i32* %4
br label %40
40: ; preds = %43, %35
%41 = load i32, i32* %4
%42 = icmp sgt i32 %41, 0
br i1 %42, label %43, label %61
43: ; preds = %40
%44 = load i32, i32* %7
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i32, i32* %14, i64 %45
%47 = load i32, i32* %46
%48 = load i32, i32* %8
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i32, i32* %14, i64 %49
%51 = load i32, i32* %50
%52 = sub nsw i32 %47, %51
store i32 %52, i32* %9
%53 = load i32, i32* %7
%54 = add nsw i32 %53, 1
store i32 %54, i32* %7
%55 = load i32, i32* %8
%56 = add nsw i32 %55, -1
store i32 %56, i32* %8
%57 = load i32, i32* %4
%58 = add nsw i32 %57, -1
store i32 %58, i32* %4
%59 = load i32, i32* %9
%60 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %59)
br label %40
61: ; preds = %40
%62 = load i32, i32* %2
%63 = srem i32 %62, 2
%64 = icmp eq i32 %63, 1
br i1 %64, label %65, label %72
65: ; preds = %61
%66 = load i32, i32* %2
%67 = sdiv i32 %66, 2
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i32, i32* %14, i64 %68
%70 = load i32, i32* %69
%71 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %70)
br label %72
72: ; preds = %65, %61
store i32 0, i32* %1
%73 = load i8*, i8** %5
%74 = load i32, i32* %1
ret i32 %74
}

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 = 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 = zext i32 %4 to i64
%6 = call i8* @llvm.stacksave()
%7 = alloca i32, i64 %5
%8 = load i32, i32* %1
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %43
10: ; preds = %0, %18
%11 = phi i64 [ %19, %18 ], [ 0, %0 ]
%12 = getelementptr inbounds i32, i32* %7, i64 %11
br label %13
13: ; preds = %10, %13
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %12)
%15 = load i32, i32* %12
%16 = and i32 %15, 1
%17 = icmp eq i32 %16, 0
br i1 %17, label %13, label %18
18: ; preds = %13
%19 = add nuw nsw i64 %11, 1
%20 = load i32, i32* %1
%21 = sext i32 %20 to i64
%22 = icmp slt i64 %19, %21
br i1 %22, label %10, label %23
23: ; preds = %18
%24 = icmp sgt i32 %20, 1
br i1 %24, label %25, label %43
25: ; preds = %23
%26 = lshr i32 %20, 1
%27 = zext i32 %20 to i64
%28 = zext i32 %26 to i64
br label %29
29: ; preds = %25, %29
%30 = phi i64 [ 0, %25 ], [ %38, %29 ]
%31 = phi i64 [ %27, %25 ], [ %32, %29 ]
%32 = add nsw i64 %31, -1
%33 = getelementptr inbounds i32, i32* %7, i64 %30
%34 = load i32, i32* %33
%35 = getelementptr inbounds i32, i32* %7, i64 %32
%36 = load i32, i32* %35
%37 = sub nsw i32 %34, %36
%38 = add nuw nsw i64 %30, 1
%39 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %37)
%40 = icmp eq i64 %38, %28
br i1 %40, label %41, label %29
41: ; preds = %29
%42 = load i32, i32* %1
br label %43
43: ; preds = %0, %41, %23
%44 = phi i32 [ %42, %41 ], [ %20, %23 ], [ %8, %0 ]
%45 = srem i32 %44, 2
%46 = sdiv i32 %44, 2
%47 = icmp eq i32 %45, 1
br i1 %47, label %48, label %53
48: ; preds = %43
%49 = sext i32 %46 to i64
%50 = getelementptr inbounds i32, i32* %7, i64 %49
%51 = load i32, i32* %50
%52 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %51)
br label %53
53: ; preds = %48, %43
ret i32 0
}