#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, int);
scalar_t__ scanf(char *, int *);
int main(void) {
  int a, b;
  scanf("%*d%d", &a);
  printf("%d", a);
  while (scanf("%d", &b) != EOF) {
    printf(" %d", b - a);
    a = b;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2e83(%rip),%rcx
cmp    (%rcx),%rax
je     118b <main+0x6b>
mov    -0xc(%rbp),%esi
sub    -0x8(%rbp),%esi
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    114e <main+0x2e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xec3(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x2e8a(%rip),%r12
cmp    (%r12),%rax
je     11a7 <main+0x87>
lea    0xe9b(%rip),%r14
lea    0xe95(%rip),%r15
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rsp),%esi
sub    0x4(%rsp),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rsp),%eax
mov    %eax,0x4(%rsp)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    (%r12),%rax
jne    1180 <main+0x60>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%*d%d\00"
@.str.1 = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.2 = [4 x i8] c" %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %11, %0
%8 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = load i64, i64* @EOF
%10 = icmp ne i64 %8, %9
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = sub nsw i32 %12, %13
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %3
store i32 %16, i32* %2
br label %7
17: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%*d%d\00"
@.str.1 = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.2 = [4 x i8] c" %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = load i64, i64* @EOF
%10 = icmp eq i64 %8, %9
br i1 %10, label %20, label %11
11: ; preds = %0, %11
%12 = load i32, i32* %2
%13 = load i32, i32* %1
%14 = sub nsw i32 %12, %13
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %2
store i32 %16, i32* %1
%17 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%18 = load i64, i64* @EOF
%19 = icmp eq i64 %17, %18
br i1 %19, label %20, label %11
20: ; preds = %11, %0
ret i32 0
}