#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 argc, char **argv) {
  int a[10], t, *p;
  for (int i = 0; i < 10; i++)
    scanf("%d", a + i);
  for (p = a; p < (a + 10); p++) {
    *p += *(p + 1);
    *(p + 1) = *p - *(p + 1);
    *p -= *(p + 1);
  }
  for (int i = 0; i < 10; i++)
    printf("%d", a[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x54(%rbp)
cmpl   $0xa,-0x54(%rbp)
jge    1170 <main+0x50>
lea    -0x40(%rbp),%rsi
movslq -0x54(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xea3(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    113d <main+0x1d>
lea    -0x40(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
lea    -0x40(%rbp),%rcx
add    $0x28,%rcx
cmp    %rcx,%rax
jae    11d2 <main+0xb2>
mov    -0x50(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x50(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x50(%rbp),%rax
mov    (%rax),%ecx
mov    -0x50(%rbp),%rax
sub    0x4(%rax),%ecx
mov    -0x50(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x50(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x50(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x50(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x50(%rbp)
jmp    1178 <main+0x58>
movl   $0x0,-0x58(%rbp)
cmpl   $0xa,-0x58(%rbp)
jge    1205 <main+0xe5>
movslq -0x58(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%esi
lea    0xe0e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    11d9 <main+0xb9>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsp,%rbx
lea    0xecf(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
lea    0x14(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
lea    0x18(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
lea    0x1c(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
lea    0x20(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
lea    0x24(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
lea    0x28(%rsp),%rax
mov    (%rsp),%ecx
nopl   0x0(%rax)
mov    0x4(%rbx),%edx
mov    %ecx,0x4(%rbx)
mov    %edx,(%rbx)
lea    0x4(%rbx),%rdx
mov    %rdx,%rbx
cmp    %rax,%rdx
jb     11c0 <main+0xa0>
mov    (%rsp),%esi
lea    0xe22(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x10(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x20(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x24(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i32]
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %9
br label %11
11: ; preds = %20, %2
%12 = load i32, i32* %9
%13 = icmp slt i32 %12, 10
br i1 %13, label %14, label %23
14: ; preds = %11
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%16 = load i32, i32* %9
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %18)
br label %20
20: ; preds = %14
%21 = load i32, i32* %9
%22 = add nsw i32 %21, 1
store i32 %22, i32* %9
br label %11
23: ; preds = %11
%24 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
store i32* %24, i32** %8
br label %25
25: ; preds = %51, %23
%26 = load i32*, i32** %8
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%28 = getelementptr inbounds i32, i32* %27, i64 10
%29 = icmp ult i32* %26, %28
br i1 %29, label %30, label %54
30: ; preds = %25
%31 = load i32*, i32** %8
%32 = getelementptr inbounds i32, i32* %31, i64 1
%33 = load i32, i32* %32
%34 = load i32*, i32** %8
%35 = load i32, i32* %34
%36 = add nsw i32 %35, %33
store i32 %36, i32* %34
%37 = load i32*, i32** %8
%38 = load i32, i32* %37
%39 = load i32*, i32** %8
%40 = getelementptr inbounds i32, i32* %39, i64 1
%41 = load i32, i32* %40
%42 = sub nsw i32 %38, %41
%43 = load i32*, i32** %8
%44 = getelementptr inbounds i32, i32* %43, i64 1
store i32 %42, i32* %44
%45 = load i32*, i32** %8
%46 = getelementptr inbounds i32, i32* %45, i64 1
%47 = load i32, i32* %46
%48 = load i32*, i32** %8
%49 = load i32, i32* %48
%50 = sub nsw i32 %49, %47
store i32 %50, i32* %48
br label %51
51: ; preds = %30
%52 = load i32*, i32** %8
%53 = getelementptr inbounds i32, i32* %52, i32 1
store i32* %53, i32** %8
br label %25
54: ; preds = %25
store i32 0, i32* %10
br label %55
55: ; preds = %64, %54
%56 = load i32, i32* %10
%57 = icmp slt i32 %56, 10
br i1 %57, label %58, label %67
58: ; preds = %55
%59 = load i32, i32* %10
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 %60
%62 = load i32, i32* %61
%63 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %62)
br label %64
64: ; preds = %58
%65 = load i32, i32* %10
%66 = add nsw i32 %65, 1
store i32 %66, i32* %10
br label %55
67: ; preds = %55
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i32]
%4 = bitcast [10 x i32]* %3 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 2
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %9)
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 3
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %11)
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 4
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %13)
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 5
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %15)
%17 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 6
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %17)
%19 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 7
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %19)
%21 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 8
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %21)
%23 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 9
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %23)
%25 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 10
%26 = load i32, i32* %5
br label %27
27: ; preds = %2, %27
%28 = phi i32* [ %5, %2 ], [ %29, %27 ]
%29 = getelementptr inbounds i32, i32* %28, i64 1
%30 = load i32, i32* %29
store i32 %26, i32* %29
store i32 %30, i32* %28
%31 = icmp ult i32* %29, %25
br i1 %31, label %27, label %32
32: ; preds = %27
%33 = load i32, i32* %5
%34 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %33)
%35 = load i32, i32* %7
%36 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %35)
%37 = load i32, i32* %9
%38 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %37)
%39 = load i32, i32* %11
%40 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %39)
%41 = load i32, i32* %13
%42 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %41)
%43 = load i32, i32* %15
%44 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %43)
%45 = load i32, i32* %17
%46 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %45)
%47 = load i32, i32* %19
%48 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %47)
%49 = load i32, i32* %21
%50 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %49)
%51 = load i32, i32* %23
%52 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %51)
ret i32 0
}