#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 *, float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float alunos[5];
  float soma = 0;
  for (int i = 0; i < 5; i++) {
    scanf("%f", &alunos[i]);
    soma += alunos[i];
  }
  float media = soma / 5;
  for (int i = 0; i < 5; i++)
    if (alunos[i] >= media)
      printf("%.2f\n", alunos[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x5,-0x28(%rbp)
jge    1185 <main+0x65>
movslq -0x28(%rbp),%rax
lea    -0x20(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xea6(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x28(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
addss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    113e <main+0x1e>
movss  -0x24(%rbp),%xmm0
movss  0xe6e(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
cmpl   $0x5,-0x30(%rbp)
jge    11e9 <main+0xc9>
movslq -0x30(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
ucomiss -0x2c(%rbp),%xmm0
jb     11d6 <main+0xb6>
movslq -0x30(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
lea    0xe36(%rip),%rdi
call   1030 <printf@plt>
jmp    11db <main+0xbb>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11a2 <main+0x82>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xed8(%rip),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
xorps  %xmm0,%xmm0
addss  0x10(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0x14(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0x18(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0x1c(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm1
addss  0x20(%rsp),%xmm1
divss  0xe3a(%rip),%xmm1
movss  0x10(%rsp),%xmm0
movss  %xmm1,0xc(%rsp)
ucomiss %xmm1,%xmm0
jb     11e3 <main+0xc3>
lea    0xe29(%rip),%rdi
call   1030 <printf@plt>
movss  0x14(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jb     11fc <main+0xdc>
lea    0xe10(%rip),%rdi
call   1030 <printf@plt>
movss  0x18(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jb     1215 <main+0xf5>
lea    0xdf7(%rip),%rdi
call   1030 <printf@plt>
movss  0x1c(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jb     122e <main+0x10e>
lea    0xdde(%rip),%rdi
call   1030 <printf@plt>
movss  0x20(%rsp),%xmm0
ucomiss 0xc(%rsp),%xmm0
jb     1247 <main+0x127>
lea    0xdc5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x float]
%3 = alloca float
%4 = alloca i32
%5 = alloca float
%6 = alloca i32
store i32 0, i32* %1
store float 0.000000e+00, float* %3
store i32 0, i32* %4
br label %7
7: ; preds = %21, %0
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 5
br i1 %9, label %10, label %24
10: ; preds = %7
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %12
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %13)
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %16
%18 = load float, float* %17
%19 = load float, float* %3
%20 = fadd float %19, %18
store float %20, float* %3
br label %21
21: ; preds = %10
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %7
24: ; preds = %7
%25 = load float, float* %3
%26 = fdiv float %25, 5.000000e+00
store float %26, float* %5
store i32 0, i32* %6
br label %27
27: ; preds = %44, %24
%28 = load i32, i32* %6
%29 = icmp slt i32 %28, 5
br i1 %29, label %30, label %47
30: ; preds = %27
%31 = load i32, i32* %6
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %32
%34 = load float, float* %33
%35 = load float, float* %5
%36 = fcmp oge float %34, %35
br i1 %36, label %37, label %43
37: ; preds = %30
%38 = load i32, i32* %6
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %39
%41 = load float, float* %40
%42 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %41)
br label %43
43: ; preds = %37, %30
br label %44
44: ; preds = %43
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 1
store i32 %46, i32* %6
br label %27
47: ; preds = %27
%48 = load i32, i32* %1
ret i32 %48
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca [5 x float]
%2 = bitcast [5 x float]* %1 to i8*
%3 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%5 = load float, float* %3
%6 = fadd float %5, 0.000000e+00
%7 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %7)
%9 = load float, float* %7
%10 = fadd float %6, %9
%11 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 2
%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 = fadd float %10, %13
%15 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 3
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %15)
%17 = load float, float* %15
%18 = fadd float %14, %17
%19 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 4
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %19)
%21 = load float, float* %19
%22 = fadd float %18, %21
%23 = fdiv float %22, 5.000000e+00
%24 = load float, float* %3
%25 = fcmp ult float %24, %23
br i1 %25, label %28, label %26
26: ; preds = %0
%27 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %24)
br label %28
28: ; preds = %0, %26
%29 = load float, float* %7
%30 = fcmp ult float %29, %23
br i1 %30, label %33, label %31
31: ; preds = %28
%32 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %29)
br label %33
33: ; preds = %31, %28
%34 = load float, float* %11
%35 = fcmp ult float %34, %23
br i1 %35, label %38, label %36
36: ; preds = %33
%37 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %34)
br label %38
38: ; preds = %36, %33
%39 = load float, float* %15
%40 = fcmp ult float %39, %23
br i1 %40, label %43, label %41
41: ; preds = %38
%42 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %39)
br label %43
43: ; preds = %41, %38
%44 = load float, float* %19
%45 = fcmp ult float %44, %23
br i1 %45, label %48, label %46
46: ; preds = %43
%47 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %44)
br label %48
48: ; preds = %46, %43
ret i32 0
}