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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec4(%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,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11be <main+0x9e>
mov    -0x28(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe72(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x28(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11b9 <main+0x99>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116d <main+0x4d>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1238 <main+0x118>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    11fe <main+0xde>
mov    -0x28(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe0c(%rip),%rdi
call   1030 <printf@plt>
jmp    1238 <main+0x118>
mov    -0x28(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
sub    (%rax,%rcx,4),%esi
lea    0xde4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11c5 <main+0xa5>
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
push   %rax
lea    0xecc(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   1040 <scanf@plt>
mov    %rsp,%r14
mov    -0x2c(%rbp),%eax
mov    %rsp,%r12
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
cmpl   $0x0,-0x2c(%rbp)
jle    11e0 <main+0xc0>
xor    %ebx,%ebx
lea    0xe95(%rip),%r15
nopl   0x0(%rax)
mov    %ebx,%r13d
lea    (%r12,%r13,4),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    (%r12,%r13,4),%eax
and    $0x1,%eax
add    %eax,%ebx
mov    -0x2c(%rbp),%eax
cmp    %eax,%ebx
jl     1170 <main+0x50>
test   %eax,%eax
jle    11e0 <main+0xc0>
xor    %ebx,%ebx
lea    0xe64(%rip),%r15
nopl   0x0(%rax)
add    $0xffffffff,%eax
cmp    %rax,%rbx
je     11d0 <main+0xb0>
mov    (%r12,%rbx,4),%esi
cltq
sub    (%r12,%rax,4),%esi
mov    %r15,%rdi
call   1030 <printf@plt>
movslq -0x2c(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %eax,-0x2c(%rbp)
add    $0x1,%rbx
cmp    %rax,%rbx
jl     11a0 <main+0x80>
jmp    11e0 <main+0xc0>
mov    (%r12,%rbx,4),%esi
lea    0xe25(%rip),%rdi
call   1030 <printf@plt>
mov    %r14,%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"\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i32 0, i32* %1
store i32 0, i32* %3
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %4
%10 = alloca i32, i64 %8
store i64 %8, i64* %5
br label %11
11: ; preds = %29, %0
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %30
15: ; preds = %11
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %10, 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* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %10, i64 %21
%23 = load i32, i32* %22
%24 = srem i32 %23, 2
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %15
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %29
29: ; preds = %26, %15
br label %11
30: ; preds = %11
store i32 0, i32* %3
br label %31
31: ; preds = %60, %30
%32 = load i32, i32* %3
%33 = load i32, i32* %2
%34 = icmp slt i32 %32, %33
br i1 %34, label %35, label %63
35: ; preds = %31
%36 = load i32, i32* %3
%37 = load i32, i32* %2
%38 = sub nsw i32 %37, 1
%39 = icmp eq i32 %36, %38
br i1 %39, label %40, label %46
40: ; preds = %35
%41 = load i32, i32* %3
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i32, i32* %10, i64 %42
%44 = load i32, i32* %43
%45 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %44)
br label %63
46: ; preds = %35
%47 = load i32, i32* %3
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i32, i32* %10, i64 %48
%50 = load i32, i32* %49
%51 = load i32, i32* %2
%52 = sub nsw i32 %51, 1
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i32, i32* %10, i64 %53
%55 = load i32, i32* %54
%56 = sub nsw i32 %50, %55
%57 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %56)
%58 = load i32, i32* %2
%59 = add nsw i32 %58, -1
store i32 %59, i32* %2
br label %60
60: ; preds = %46
%61 = load i32, i32* %3
%62 = add nsw i32 %61, 1
store i32 %62, i32* %3
br label %31
63: ; preds = %40, %31
store i32 0, i32* %1
%64 = load i8*, i8** %4
%65 = load i32, i32* %1
ret i32 %65
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%d\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 %12, label %46
10: ; preds = %12
%11 = icmp sgt i32 %20, 0
br i1 %11, label %22, label %46
12: ; preds = %0, %12
%13 = phi i32 [ %19, %12 ], [ 0, %0 ]
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %7, i64 %14
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %15)
%17 = load i32, i32* %15
%18 = and i32 %17, 1
%19 = add nuw nsw i32 %18, %13
%20 = load i32, i32* %1
%21 = icmp slt i32 %19, %20
br i1 %21, label %12, label %10
22: ; preds = %10, %33
%23 = phi i64 [ %43, %33 ], [ 0, %10 ]
%24 = phi i32 [ %42, %33 ], [ %20, %10 ]
%25 = add nsw i32 %24, -1
%26 = zext i32 %25 to i64
%27 = icmp eq i64 %23, %26
br i1 %27, label %28, label %33
28: ; preds = %22
%29 = and i64 %23, 4294967295
%30 = getelementptr inbounds i32, i32* %7, i64 %29
%31 = load i32, i32* %30
%32 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %31)
br label %46
33: ; preds = %22
%34 = getelementptr inbounds i32, i32* %7, i64 %23
%35 = load i32, i32* %34
%36 = sext i32 %25 to i64
%37 = getelementptr inbounds i32, i32* %7, i64 %36
%38 = load i32, i32* %37
%39 = sub nsw i32 %35, %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
%42 = add nsw i32 %41, -1
store i32 %42, i32* %1
%43 = add nuw nsw i64 %23, 1
%44 = sext i32 %42 to i64
%45 = icmp slt i64 %43, %44
br i1 %45, label %22, label %46
46: ; preds = %33, %0, %10, %28
ret i32 0
}