#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, mass[n], i, l, r, a;
  scanf("%d", &n);
  for (i = 0; i < n;) {
    scanf("%d", &mass[i]);
    if (mass[i] % 2) {
      i++;
    }
  }
  for (l = 0, r = n - 1; l <= r; l++, r--) {
    a = (l != r) ? mass[l] - mass[r] : mass[l];
    printf("%d\n", a);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
lea    0xea3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11be <main+0x9e>
mov    -0x30(%rbp),%rsi
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe71(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x30(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11b9 <main+0x99>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    116d <main+0x4d>
movl   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     123a <main+0x11a>
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
je     1200 <main+0xe0>
mov    -0x30(%rbp),%rcx
movslq -0x20(%rbp),%rax
mov    (%rcx,%rax,4),%eax
movslq -0x24(%rbp),%rdx
sub    (%rcx,%rdx,4),%eax
mov    %eax,-0x34(%rbp)
jmp    120e <main+0xee>
mov    -0x30(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%esi
lea    0xde5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    11ce <main+0xae>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rsp,%r14
lea    0xeca(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11b9 <main+0x99>
xor    %ebp,%ebp
lea    0xeb0(%rip),%r15
mov    %ebp,%eax
lea    (%rsp,%rax,4),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    (%rsp),%eax
and    $0x1,%eax
add    %eax,%ebp
mov    0xc(%rsp),%ebx
cmp    %ebx,%ebp
jl     1150 <main+0x30>
test   %ebx,%ebx
jle    11b9 <main+0x99>
add    $0xffffffffffffffff,%rbx
xor    %r12d,%r12d
lea    0xe83(%rip),%r15
jmp    11a8 <main+0x88>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
call   1030 <printf@plt>
add    $0x1,%r12
lea    -0x1(%rbx),%rax
cmp    %rbx,%r12
mov    %rax,%rbx
jge    11b9 <main+0x99>
mov    %ebx,%eax
mov    $0x0,%esi
cmp    %rax,%r12
jne    1190 <main+0x70>
mov    (%rsp),%esi
jmp    1190 <main+0x70>
mov    %r14,%rsp
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
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 i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %3
%12 = alloca i32, i64 %10
store i64 %10, i64* %4
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %5
br label %14
14: ; preds = %32, %0
%15 = load i32, i32* %5
%16 = load i32, i32* %2
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %33
18: ; preds = %14
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %12, i64 %20
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %21)
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i32, i32* %12, i64 %24
%26 = load i32, i32* %25
%27 = srem i32 %26, 2
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %18
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %32
32: ; preds = %29, %18
br label %14
33: ; preds = %14
store i32 0, i32* %6
%34 = load i32, i32* %2
%35 = sub nsw i32 %34, 1
store i32 %35, i32* %7
br label %36
36: ; preds = %63, %33
%37 = load i32, i32* %6
%38 = load i32, i32* %7
%39 = icmp sle i32 %37, %38
br i1 %39, label %40, label %68
40: ; preds = %36
%41 = load i32, i32* %6
%42 = load i32, i32* %7
%43 = icmp ne i32 %41, %42
br i1 %43, label %44, label %54
44: ; preds = %40
%45 = load i32, i32* %6
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i32, i32* %12, i64 %46
%48 = load i32, i32* %47
%49 = load i32, i32* %7
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i32, i32* %12, i64 %50
%52 = load i32, i32* %51
%53 = sub nsw i32 %48, %52
br label %59
54: ; preds = %40
%55 = load i32, i32* %6
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i32, i32* %12, i64 %56
%58 = load i32, i32* %57
br label %59
59: ; preds = %54, %44
%60 = phi i32 [ %53, %44 ], [ %58, %54 ]
store i32 %60, i32* %8
%61 = load i32, i32* %8
%62 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %61)
br label %63
63: ; preds = %59
%64 = load i32, i32* %6
%65 = add nsw i32 %64, 1
store i32 %65, i32* %6
%66 = load i32, i32* %7
%67 = add nsw i32 %66, -1
store i32 %67, i32* %7
br label %36
68: ; preds = %36
%69 = load i8*, i8** %3
%70 = load i32, i32* %1
ret i32 %70
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [0 x i32]
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i8* @llvm.stacksave()
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %38
8: ; preds = %0
%9 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 0
br label %15
10: ; preds = %15
%11 = icmp sgt i32 %23, 0
br i1 %11, label %12, label %38
12: ; preds = %10
%13 = zext i32 %23 to i64
%14 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 0
br label %25
15: ; preds = %8, %15
%16 = phi i32 [ %22, %15 ], [ 0, %8 ]
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 %17
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %18)
%20 = load i32, i32* %9
%21 = and i32 %20, 1
%22 = add nuw nsw i32 %21, %16
%23 = load i32, i32* %2
%24 = icmp slt i32 %22, %23
br i1 %24, label %15, label %10
25: ; preds = %12, %33
%26 = phi i64 [ 0, %12 ], [ %36, %33 ]
%27 = phi i64 [ %13, %12 ], [ %28, %33 ]
%28 = add nsw i64 %27, -1
%29 = and i64 %28, 4294967295
%30 = icmp eq i64 %26, %29
br i1 %30, label %31, label %33
31: ; preds = %25
%32 = load i32, i32* %14
br label %33
33: ; preds = %25, %31
%34 = phi i32 [ %32, %31 ], [ 0, %25 ]
%35 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %34)
%36 = add nuw nsw i64 %26, 1
%37 = icmp slt i64 %36, %28
br i1 %37, label %25, label %38
38: ; preds = %33, %0, %10
ret i32 0
}