#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 /*<<< orphan*/ scanf(char *, float *, float *, float *);
int main() {
  float media, a, b, c, mediapond;
  scanf("%f %f %f", &a, &b, &c);
  media = (a * 2) + (b * 3) + (c * 5);
  mediapond = media / 10;
  printf("%6.2f\n", mediapond);
  if (mediapond > 0 && mediapond < 5) {
    printf("E\n");
  }
  if (mediapond >= 5 && mediapond < 6) {
    printf("D\n");
  }
  if (mediapond >= 6 && mediapond < 7) {
    printf("C\n");
  }
  if (mediapond >= 7 && mediapond < 8) {
    printf("B\n");
  }
  if (mediapond >= 8 && mediapond <= 10) {
    printf("A\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm1
movss  0xeb4(%rip),%xmm0
mulss  -0x10(%rbp),%xmm0
addss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
movss  0xe96(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xe78(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe80(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    11d9 <main+0xb9>
movss  0xe43(%rip),%xmm0
ucomiss -0x18(%rbp),%xmm0
jbe    11d9 <main+0xb9>
lea    0xe56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
movss  0xe1e(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     120f <main+0xef>
movss  0xe15(%rip),%xmm0
ucomiss -0x18(%rbp),%xmm0
jbe    120f <main+0xef>
lea    0xe23(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
movss  0xdf0(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     1245 <main+0x125>
movss  0xde3(%rip),%xmm0
ucomiss -0x18(%rbp),%xmm0
jbe    1245 <main+0x125>
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
movss  0xdbe(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     127b <main+0x15b>
movss  0xdb1(%rip),%xmm0
ucomiss -0x18(%rbp),%xmm0
jbe    127b <main+0x15b>
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
movss  0xd8c(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     12b1 <main+0x191>
movss  0xd67(%rip),%xmm0
ucomiss -0x18(%rbp),%xmm0
jb     12b1 <main+0x191>
lea    0xd8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xedd(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
mulss  0xe9d(%rip),%xmm1
addss  %xmm0,%xmm0
addss  %xmm1,%xmm0
movss  0xc(%rsp),%xmm1
mulss  0xe8b(%rip),%xmm1
addss  %xmm0,%xmm1
divss  0xe83(%rip),%xmm1
movss  %xmm1,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xe88(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x8(%rsp),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jbe    11cd <main+0x9d>
movss  0xe4e(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    11cd <main+0x9d>
lea    0xe6e(%rip),%rdi
call   1030 <puts@plt>
movss  0x8(%rsp),%xmm1
ucomiss 0xe30(%rip),%xmm1
jb     11f5 <main+0xc5>
movss  0xe2e(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    11f5 <main+0xc5>
lea    0xe44(%rip),%rdi
call   1030 <puts@plt>
movss  0x8(%rsp),%xmm1
ucomiss 0xe10(%rip),%xmm1
jb     121d <main+0xed>
movss  0xe0a(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    121d <main+0xed>
lea    0xe1a(%rip),%rdi
call   1030 <puts@plt>
movss  0x8(%rsp),%xmm1
ucomiss 0xdec(%rip),%xmm1
jb     1245 <main+0x115>
movss  0xde6(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    1245 <main+0x115>
lea    0xdf0(%rip),%rdi
call   1030 <puts@plt>
movss  0x8(%rsp),%xmm1
ucomiss 0xdc8(%rip),%xmm1
jb     1267 <main+0x137>
movss  0xdb2(%rip),%xmm0
ucomiss %xmm1,%xmm0
jb     1267 <main+0x137>
lea    0xdc6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%f %f %f\00"
@.str.1 = [7 x i8] c"%6.2f\0A\00"
@.str.2 = [3 x i8] c"E\0A\00"
@.str.3 = [3 x i8] c"D\0A\00"
@.str.4 = [3 x i8] c"C\0A\00"
@.str.5 = [3 x i8] c"B\0A\00"
@.str.6 = [3 x i8] c"A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %3, float* %4, float* %5)
%8 = load float, float* %3
%9 = load float, float* %4
%10 = fmul float %9, 3.000000e+00
%11 = call float @llvm.fmuladd.f32(float %8, float 2.000000e+00, float %10)
%12 = load float, float* %5
%13 = call float @llvm.fmuladd.f32(float %12, float 5.000000e+00, float %11)
store float %13, float* %2
%14 = load float, float* %2
%15 = fdiv float %14, 1.000000e+01
store float %15, float* %6
%16 = load float, float* %6
%17 = fpext float %16 to double
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %17)
%19 = load float, float* %6
%20 = fcmp ogt float %19, 0.000000e+00
br i1 %20, label %21, label %26
21: ; preds = %0
%22 = load float, float* %6
%23 = fcmp olt float %22, 5.000000e+00
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %26
26: ; preds = %24, %21, %0
%27 = load float, float* %6
%28 = fcmp oge float %27, 5.000000e+00
br i1 %28, label %29, label %34
29: ; preds = %26
%30 = load float, float* %6
%31 = fcmp olt float %30, 6.000000e+00
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %34
34: ; preds = %32, %29, %26
%35 = load float, float* %6
%36 = fcmp oge float %35, 6.000000e+00
br i1 %36, label %37, label %42
37: ; preds = %34
%38 = load float, float* %6
%39 = fcmp olt float %38, 7.000000e+00
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %42
42: ; preds = %40, %37, %34
%43 = load float, float* %6
%44 = fcmp oge float %43, 7.000000e+00
br i1 %44, label %45, label %50
45: ; preds = %42
%46 = load float, float* %6
%47 = fcmp olt float %46, 8.000000e+00
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %50
50: ; preds = %48, %45, %42
%51 = load float, float* %6
%52 = fcmp oge float %51, 8.000000e+00
br i1 %52, label %53, label %58
53: ; preds = %50
%54 = load float, float* %6
%55 = fcmp ole float %54, 1.000000e+01
br i1 %55, label %56, label %58
56: ; preds = %53
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %58
58: ; preds = %56, %53, %50
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%f %f %f\00"
@.str.1 = [7 x i8] c"%6.2f\0A\00"
@str = [2 x i8] c"A\00"
@str.7 = [2 x i8] c"B\00"
@str.8 = [2 x i8] c"C\00"
@str.9 = [2 x i8] c"D\00"
@str.10 = [2 x i8] c"E\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, float* %3)
%8 = load float, float* %1
%9 = load float, float* %2
%10 = fmul float %9, 3.000000e+00
%11 = call float @llvm.fmuladd.f32(float %8, float 2.000000e+00, float %10)
%12 = load float, float* %3
%13 = call float @llvm.fmuladd.f32(float %12, float 5.000000e+00, float %11)
%14 = fdiv float %13, 1.000000e+01
%15 = fpext float %14 to double
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %15)
%17 = fcmp ogt float %14, 0.000000e+00
%18 = fcmp olt float %14, 5.000000e+00
%19 = and i1 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %0
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0))
br label %22
22: ; preds = %20, %0
%23 = fcmp oge float %14, 5.000000e+00
%24 = fcmp olt float %14, 6.000000e+00
%25 = and i1 %23, %24
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.9, i64 0, i64 0))
br label %28
28: ; preds = %26, %22
%29 = fcmp oge float %14, 6.000000e+00
%30 = fcmp olt float %14, 7.000000e+00
%31 = and i1 %29, %30
br i1 %31, label %32, label %34
32: ; preds = %28
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.8, i64 0, i64 0))
br label %34
34: ; preds = %32, %28
%35 = fcmp oge float %14, 7.000000e+00
%36 = fcmp olt float %14, 8.000000e+00
%37 = and i1 %35, %36
br i1 %37, label %38, label %40
38: ; preds = %34
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.7, i64 0, i64 0))
br label %40
40: ; preds = %38, %34
%41 = fcmp oge float %14, 8.000000e+00
%42 = fcmp ole float %14, 1.000000e+01
%43 = and i1 %41, %42
br i1 %43, label %44, label %46
44: ; preds = %40
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
br label %46
46: ; preds = %44, %40
ret i32 0
}