#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;
scalar_t__ scanf(char *, int *);
int main(int argc, const char *argv[]) {
  int i, a[9], max, min;
  double sum, avg;
  while (scanf("%d", &a[0]) != EOF) {
    sum = max = min = 0;
    for (i = 1; i < 9; i++)
      scanf("%d", &a[i]);
    for (i = 1; i < 9; i++) {
      if (a[i] > a[max])
        max = i;
      if (a[i] < a[min])
        min = 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)
lea    -0x40(%rbp),%rsi
lea    0xecf(%rip),%rdi
call   1030 <scanf@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
je     11f7 <main+0xe7>
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x44(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x9,-0x14(%rbp)
jge    1196 <main+0x86>
movslq -0x14(%rbp),%rax
lea    -0x40(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe7d(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1163 <main+0x53>
movl   $0x1,-0x14(%rbp)
cmpl   $0x9,-0x14(%rbp)
jge    11f2 <main+0xe2>
movslq -0x14(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
movslq -0x44(%rbp),%rcx
cmp    -0x40(%rbp,%rcx,4),%eax
jle    11c3 <main+0xb3>
mov    -0x14(%rbp),%eax
mov    %eax,-0x44(%rbp)
movslq -0x14(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%eax
movslq -0x48(%rbp),%rcx
cmp    -0x40(%rbp,%rcx,4),%eax
jge    11df <main+0xcf>
mov    -0x14(%rbp),%eax
mov    %eax,-0x48(%rbp)
jmp    11e4 <main+0xd4>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    119d <main+0x8d>
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xedb(%rip),%rdi
mov    %rsp,%rsi
call   1030 <scanf@plt>
mov    0x2eb4(%rip),%rbx
cmp    (%rbx),%rax
je     11d2 <main+0xc2>
lea    0x18(%rsp),%rbp
lea    0x1c(%rsp),%r14
lea    0x20(%rsp),%r15
lea    0xead(%rip),%r12
mov    %rsp,%r13
cs nopw 0x0(%rax,%rax,1)
mov    %r12,%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
mov    %r12,%rdi
lea    0x8(%rsp),%rsi
call   1030 <scanf@plt>
mov    %r12,%rdi
lea    0xc(%rsp),%rsi
call   1030 <scanf@plt>
mov    %r12,%rdi
lea    0x10(%rsp),%rsi
call   1030 <scanf@plt>
mov    %r12,%rdi
lea    0x14(%rsp),%rsi
call   1030 <scanf@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
call   1030 <scanf@plt>
mov    %r12,%rdi
mov    %r14,%rsi
call   1030 <scanf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1030 <scanf@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   1030 <scanf@plt>
cmp    (%rbx),%rax
jne    1160 <main+0x50>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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