#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 */
float INT_MAX;
int /*<<< orphan*/ printf(char *, float, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float notas[5];
  float maior = 0, menor = INT_MAX, media;
  for (int i = 0; i < 5; i++) {
    scanf("%f", &notas[i]);
    maior = notas[i] > maior ? notas[i] : maior;
    menor = notas[i] < menor ? notas[i] : menor;
    media += notas[i];
  }
  media /= 5;
  printf("%.1f %.1f %.1f\n\n", maior, menor, media);
  for (int i = 0; i < 5; i++)
    printf("%.1f ", notas[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
mov    0x2eaa(%rip),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x28(%rbp)
movl   $0x0,-0x30(%rbp)
cmpl   $0x5,-0x30(%rbp)
jge    1211 <main+0xf1>
movslq -0x30(%rbp),%rax
lea    -0x20(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe96(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x30(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
ucomiss -0x24(%rbp),%xmm0
jbe    119b <main+0x7b>
movslq -0x30(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x38(%rbp)
jmp    11a5 <main+0x85>
movss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movslq -0x30(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm1
movss  -0x28(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    11db <main+0xbb>
movslq -0x30(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x3c(%rbp)
jmp    11e5 <main+0xc5>
movss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movslq -0x30(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
addss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    114e <main+0x2e>
movss  -0x2c(%rbp),%xmm0
movss  0xde2(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x24(%rbp),%xmm0
movss  -0x28(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x2c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xdc2(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x5,-0x34(%rbp)
jge    1283 <main+0x163>
movslq -0x34(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
lea    0xdaa(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1253 <main+0x133>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0x2ebc(%rip),%rax
movss  (%rax),%xmm0
movss  %xmm0,0x8(%rsp)
lea    0xecb(%rip),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x10(%rsp),%xmm1
xorps  %xmm0,%xmm0
movaps %xmm1,%xmm2
maxss  %xmm0,%xmm2
movss  %xmm2,0xc(%rsp)
minss  0x8(%rsp),%xmm1
movss  %xmm1,0x8(%rsp)
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm0
movaps %xmm0,%xmm1
maxss  0xc(%rsp),%xmm1
movss  %xmm1,0xc(%rsp)
minss  0x8(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x18(%rsp),%xmm0
movaps %xmm0,%xmm1
maxss  0xc(%rsp),%xmm1
movss  %xmm1,0xc(%rsp)
minss  0x8(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x1c(%rsp),%xmm0
movaps %xmm0,%xmm1
maxss  0xc(%rsp),%xmm1
movss  %xmm1,0xc(%rsp)
minss  0x8(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x20(%rsp),%xmm1
movaps %xmm1,%xmm0
maxss  0xc(%rsp),%xmm0
minss  0x8(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xde8(%rip),%rdi
movsd  0xdd5(%rip),%xmm2
mov    $0x3,%al
call   1030 <printf@plt>
movss  0x10(%rsp),%xmm0
lea    0xddd(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x14(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x18(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x1c(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x20(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@INT_MAX = global float 0.000000e+00
@.str = [3 x i8] c"%f\00"
@.str.1 = [17 x i8] c"%.1f %.1f %.1f\0A\0A\00"
@.str.2 = [6 x i8] c"%.1f \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x float]
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store float 0.000000e+00, float* %3
%8 = load float, float* @INT_MAX
store float %8, float* %4
store i32 0, i32* %6
br label %9
9: ; preds = %53, %0
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 5
br i1 %11, label %12, label %56
12: ; preds = %9
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %14
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %15)
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %18
%20 = load float, float* %19
%21 = load float, float* %3
%22 = fcmp ogt float %20, %21
br i1 %22, label %23, label %28
23: ; preds = %12
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %25
%27 = load float, float* %26
br label %30
28: ; preds = %12
%29 = load float, float* %3
br label %30
30: ; preds = %28, %23
%31 = phi float [ %27, %23 ], [ %29, %28 ]
store float %31, float* %3
%32 = load i32, i32* %6
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %33
%35 = load float, float* %34
%36 = load float, float* %4
%37 = fcmp olt float %35, %36
br i1 %37, label %38, label %43
38: ; preds = %30
%39 = load i32, i32* %6
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %40
%42 = load float, float* %41
br label %45
43: ; preds = %30
%44 = load float, float* %4
br label %45
45: ; preds = %43, %38
%46 = phi float [ %42, %38 ], [ %44, %43 ]
store float %46, float* %4
%47 = load i32, i32* %6
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %48
%50 = load float, float* %49
%51 = load float, float* %5
%52 = fadd float %51, %50
store float %52, float* %5
br label %53
53: ; preds = %45
%54 = load i32, i32* %6
%55 = add nsw i32 %54, 1
store i32 %55, i32* %6
br label %9
56: ; preds = %9
%57 = load float, float* %5
%58 = fdiv float %57, 5.000000e+00
store float %58, float* %5
%59 = load float, float* %3
%60 = load float, float* %4
%61 = fpext float %60 to double
%62 = load float, float* %5
%63 = fpext float %62 to double
%64 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), float %59, double %61, double %63)
store i32 0, i32* %7
br label %65
65: ; preds = %74, %56
%66 = load i32, i32* %7
%67 = icmp slt i32 %66, 5
br i1 %67, label %68, label %77
68: ; preds = %65
%69 = load i32, i32* %7
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %70
%72 = load float, float* %71
%73 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), float %72)
br label %74
74: ; preds = %68
%75 = load i32, i32* %7
%76 = add nsw i32 %75, 1
store i32 %76, i32* %7
br label %65
77: ; preds = %65
%78 = load i32, i32* %1
ret i32 %78
}

LLVM IR (-O2):
@INT_MAX = global float 0.000000e+00
@.str = [3 x i8] c"%f\00"
@.str.1 = [17 x i8] c"%.1f %.1f %.1f\0A\0A\00"
@.str.2 = [6 x i8] c"%.1f \00"
define i32 @main() {
%1 = alloca [5 x float]
%2 = bitcast [5 x float]* %1 to i8*
%3 = load float, float* @INT_MAX
%4 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %4)
%6 = load float, float* %4
%7 = fcmp ogt float %6, 0.000000e+00
%8 = select i1 %7, float %6, float 0.000000e+00
%9 = fcmp olt float %6, %3
%10 = select i1 %9, float %6, float %3
%11 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 1
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %11)
%13 = load float, float* %11
%14 = fcmp ogt float %13, %8
%15 = select i1 %14, float %13, float %8
%16 = fcmp olt float %13, %10
%17 = select i1 %16, float %13, float %10
%18 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 2
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %18)
%20 = load float, float* %18
%21 = fcmp ogt float %20, %15
%22 = select i1 %21, float %20, float %15
%23 = fcmp olt float %20, %17
%24 = select i1 %23, float %20, float %17
%25 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 3
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %25)
%27 = load float, float* %25
%28 = fcmp ogt float %27, %22
%29 = select i1 %28, float %27, float %22
%30 = fcmp olt float %27, %24
%31 = select i1 %30, float %27, float %24
%32 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 4
%33 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %32)
%34 = load float, float* %32
%35 = fcmp ogt float %34, %29
%36 = select i1 %35, float %34, float %29
%37 = fcmp olt float %34, %31
%38 = select i1 %37, float %34, float %31
%39 = fpext float %38 to double
%40 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), float %36, double %39, double 0x7FF8000000000000)
%41 = load float, float* %4
%42 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), float %41)
%43 = load float, float* %11
%44 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), float %43)
%45 = load float, float* %18
%46 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), float %45)
%47 = load float, float* %25
%48 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), float %47)
%49 = load float, float* %32
%50 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), float %49)
ret i32 0
}