#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 notas[15];
  float media = 0.0;
  int i = 0;
  for (i = 0; i < 15; i++) {
    scanf("%f", &notas[i]);
    media += notas[i];
  }
  media /= 15;
  printf("%0.2f", media);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x48(%rbp)
cmpl   $0xf,-0x48(%rbp)
jge    118c <main+0x6c>
movslq -0x48(%rbp),%rax
lea    -0x40(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe9f(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x48(%rbp),%rax
movss  -0x40(%rbp,%rax,4),%xmm0
addss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1145 <main+0x25>
movss  -0x44(%rbp),%xmm0
movss  0xe67(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x44(%rbp)
movss  -0x44(%rbp),%xmm0
lea    0xe59(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%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),%xmm0
addss  0x20(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x24(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0x24(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0x28(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x2c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0x2c(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0x30(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x34(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0x34(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x38(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0x38(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x3c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0x3c(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x40(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0x40(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x44(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0x44(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0x48(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0x48(%rsp),%xmm0
divss  0xd04(%rip),%xmm0
lea    0xd04(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%0.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x float]
%3 = alloca float
%4 = alloca i32
store i32 0, i32* %1
store float 0.000000e+00, float* %3
store i32 0, i32* %4
store i32 0, i32* %4
br label %5
5: ; preds = %19, %0
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 15
br i1 %7, label %8, label %22
8: ; preds = %5
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [15 x float], [15 x float]* %2, i64 0, i64 %10
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %11)
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [15 x float], [15 x float]* %2, i64 0, i64 %14
%16 = load float, float* %15
%17 = load float, float* %3
%18 = fadd float %17, %16
store float %18, float* %3
br label %19
19: ; preds = %8
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %5
22: ; preds = %5
%23 = load float, float* %3
%24 = fdiv float %23, 1.500000e+01
store float %24, float* %3
%25 = load float, float* %3
%26 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [6 x i8] c"%0.2f\00"
define i32 @main() {
%1 = alloca [15 x float]
%2 = bitcast [15 x float]* %1 to i8*
%3 = getelementptr inbounds [15 x float], [15 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 [15 x float], [15 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 [15 x float], [15 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 [15 x float], [15 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 [15 x float], [15 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 = getelementptr inbounds [15 x float], [15 x float]* %1, i64 0, i64 5
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %23)
%25 = load float, float* %23
%26 = fadd float %22, %25
%27 = getelementptr inbounds [15 x float], [15 x float]* %1, i64 0, i64 6
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %27)
%29 = load float, float* %27
%30 = fadd float %26, %29
%31 = getelementptr inbounds [15 x float], [15 x float]* %1, i64 0, i64 7
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %31)
%33 = load float, float* %31
%34 = fadd float %30, %33
%35 = getelementptr inbounds [15 x float], [15 x float]* %1, i64 0, i64 8
%36 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %35)
%37 = load float, float* %35
%38 = fadd float %34, %37
%39 = getelementptr inbounds [15 x float], [15 x float]* %1, i64 0, i64 9
%40 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %39)
%41 = load float, float* %39
%42 = fadd float %38, %41
%43 = getelementptr inbounds [15 x float], [15 x float]* %1, i64 0, i64 10
%44 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %43)
%45 = load float, float* %43
%46 = fadd float %42, %45
%47 = getelementptr inbounds [15 x float], [15 x float]* %1, i64 0, i64 11
%48 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %47)
%49 = load float, float* %47
%50 = fadd float %46, %49
%51 = getelementptr inbounds [15 x float], [15 x float]* %1, i64 0, i64 12
%52 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %51)
%53 = load float, float* %51
%54 = fadd float %50, %53
%55 = getelementptr inbounds [15 x float], [15 x float]* %1, i64 0, i64 13
%56 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %55)
%57 = load float, float* %55
%58 = fadd float %54, %57
%59 = getelementptr inbounds [15 x float], [15 x float]* %1, i64 0, i64 14
%60 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %59)
%61 = load float, float* %59
%62 = fadd float %58, %61
%63 = fdiv float %62, 1.500000e+01
%64 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %63)
ret i32 0
}