#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 *);
int main() {
  float n1 = 0, n2 = 0, n3 = 0, me = 0, ma = 0;
  int i;
  printf("\nDigite a sua Nota 1:\n");
  scanf("%f", &n1);
  printf("\nDigite a sua Nota 2:\n");
  scanf("%f", &n2);
  printf("\nDigite a sua Nota 3:\n");
  scanf("%f", &n3);
  printf("\nDigite a sua Média das Notas dos Exercícios:\n");
  scanf("%f", &me);
  ma = (n1 + (n2 * 2) + (n3 * 3) + me) / 7;
  printf("\nA sua Média Final foi %.2f.\n", ma);
  if (ma >= 9) {
    printf("\nO seu conceito foi A, parabens!!!\n");
  } else if (ma >= 7.5 && ma < 9) {
    printf("\nO seu conceito foi B.\n");
  } else if (ma >= 6 && ma < 7.5) {
    printf("\nO seu conceito foi C.\n");
  } else if (ma >= 4 && ma < 6) {
    printf("\nO seu conceito foi D.\n");
  } else {
    printf("\nO seu conceito foi E, Estude Mais!!!.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xead(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe71(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
addss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
movss  0xe1a(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
addss  -0x14(%rbp),%xmm0
movss  0xe01(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe7d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
movss  0xdd0(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     124c <main+0x12c>
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1328 <main+0x208>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdbb(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     128c <main+0x16c>
movss  0xd91(%rip),%xmm0
ucomiss -0x18(%rbp),%xmm0
jbe    128c <main+0x16c>
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1323 <main+0x203>
movss  -0x18(%rbp),%xmm0
movss  0xd73(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     12d0 <main+0x1b0>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd65(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    12d0 <main+0x1b0>
lea    0xe30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    131e <main+0x1fe>
movss  -0x18(%rbp),%xmm0
movss  0xd33(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     130b <main+0x1eb>
movss  0xd1e(%rip),%xmm0
ucomiss -0x18(%rbp),%xmm0
jbe    130b <main+0x1eb>
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1319 <main+0x1f9>
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    131e <main+0x1fe>
jmp    1323 <main+0x203>
jmp    1328 <main+0x208>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movl   $0x0,0x18(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb0(%rip),%rbx
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x14(%rsp),%xmm0
addss  %xmm0,%xmm0
addss  0x18(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
mulss  0xe22(%rip),%xmm1
addss  %xmm0,%xmm1
addss  0xc(%rsp),%xmm1
divss  0xe14(%rip),%xmm1
movss  %xmm1,0x1c(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xe17(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x1c(%rsp),%xmm1
ucomiss 0xdf0(%rip),%xmm1
jae    1239 <main+0x109>
ucomiss 0xdeb(%rip),%xmm1
jb     1242 <main+0x112>
movss  0xddd(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    1242 <main+0x112>
lea    0xeca(%rip),%rdi
jmp    1289 <main+0x159>
lea    0xed8(%rip),%rdi
jmp    1289 <main+0x159>
ucomiss 0xdc7(%rip),%xmm1
jb     1261 <main+0x131>
movss  0xdb9(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    1261 <main+0x131>
lea    0xe8b(%rip),%rdi
jmp    1289 <main+0x159>
movss  0xda7(%rip),%xmm0
ucomiss %xmm1,%xmm0
lea    0xe60(%rip),%rdi
lea    0xe32(%rip),%rax
cmovbe %rax,%rdi
ucomiss 0xd8f(%rip),%xmm1
cmovb  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"\0ADigite a sua Nota 1:\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [23 x i8] c"\0ADigite a sua Nota 2:\0A\00"
@.str.3 = [23 x i8] c"\0ADigite a sua Nota 3:\0A\00"
@.str.4 = [49 x i8] c"\0ADigite a sua M\C3\A9dia das Notas dos Exerc\C3\ADcios:\0A\00"
@.str.5 = [31 x i8] c"\0AA sua M\C3\A9dia Final foi %.2f.\0A\00"
@.str.6 = [36 x i8] c"\0AO seu conceito foi A, parabens!!!\0A\00"
@.str.7 = [24 x i8] c"\0AO seu conceito foi B.\0A\00"
@.str.8 = [24 x i8] c"\0AO seu conceito foi C.\0A\00"
@.str.9 = [24 x i8] c"\0AO seu conceito foi D.\0A\00"
@.str.10 = [40 x i8] c"\0AO seu conceito foi E, Estude Mais!!!.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca i32
store i32 0, i32* %1
store float 0.000000e+00, float* %2
store float 0.000000e+00, float* %3
store float 0.000000e+00, float* %4
store float 0.000000e+00, float* %5
store float 0.000000e+00, float* %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %5)
%16 = load float, float* %2
%17 = load float, float* %3
%18 = call float @llvm.fmuladd.f32(float %17, float 2.000000e+00, float %16)
%19 = load float, float* %4
%20 = call float @llvm.fmuladd.f32(float %19, float 3.000000e+00, float %18)
%21 = load float, float* %5
%22 = fadd float %20, %21
%23 = fdiv float %22, 7.000000e+00
store float %23, float* %6
%24 = load float, float* %6
%25 = fpext float %24 to double
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), double %25)
%27 = load float, float* %6
%28 = fcmp oge float %27, 9.000000e+00
br i1 %28, label %29, label %31
29: ; preds = %0
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
br label %62
31: ; preds = %0
%32 = load float, float* %6
%33 = fpext float %32 to double
%34 = fcmp oge double %33, 7.500000e+00
br i1 %34, label %35, label %40
35: ; preds = %31
%36 = load float, float* %6
%37 = fcmp olt float %36, 9.000000e+00
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
br label %61
40: ; preds = %35, %31
%41 = load float, float* %6
%42 = fcmp oge float %41, 6.000000e+00
br i1 %42, label %43, label %49
43: ; preds = %40
%44 = load float, float* %6
%45 = fpext float %44 to double
%46 = fcmp olt double %45, 7.500000e+00
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
br label %60
49: ; preds = %43, %40
%50 = load float, float* %6
%51 = fcmp oge float %50, 4.000000e+00
br i1 %51, label %52, label %57
52: ; preds = %49
%53 = load float, float* %6
%54 = fcmp olt float %53, 6.000000e+00
br i1 %54, label %55, label %57
55: ; preds = %52
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
br label %59
57: ; preds = %52, %49
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0))
br label %59
59: ; preds = %57, %55
br label %60
60: ; preds = %59, %47
br label %61
61: ; preds = %60, %38
br label %62
62: ; preds = %61, %29
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.5 = [31 x i8] c"\0AA sua M\C3\A9dia Final foi %.2f.\0A\00"
@str = [22 x i8] c"\0ADigite a sua Nota 1:\00"
@str.11 = [22 x i8] c"\0ADigite a sua Nota 2:\00"
@str.12 = [22 x i8] c"\0ADigite a sua Nota 3:\00"
@str.13 = [48 x i8] c"\0ADigite a sua M\C3\A9dia das Notas dos Exerc\C3\ADcios:\00"
@str.14 = [39 x i8] c"\0AO seu conceito foi E, Estude Mais!!!.\00"
@str.15 = [23 x i8] c"\0AO seu conceito foi D.\00"
@str.16 = [23 x i8] c"\0AO seu conceito foi C.\00"
@str.17 = [23 x i8] c"\0AO seu conceito foi B.\00"
@str.18 = [35 x i8] c"\0AO seu conceito foi A, parabens!!!\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = bitcast float* %1 to i8*
store float 0.000000e+00, float* %1
%6 = bitcast float* %2 to i8*
store float 0.000000e+00, float* %2
%7 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%8 = bitcast float* %4 to i8*
store float 0.000000e+00, float* %4
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.11, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.12, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.13, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%17 = load float, float* %1
%18 = load float, float* %2
%19 = call float @llvm.fmuladd.f32(float %18, float 2.000000e+00, float %17)
%20 = load float, float* %3
%21 = call float @llvm.fmuladd.f32(float %20, float 3.000000e+00, float %19)
%22 = load float, float* %4
%23 = fadd float %21, %22
%24 = fdiv float %23, 7.000000e+00
%25 = fpext float %24 to double
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), double %25)
%27 = fcmp ult float %24, 9.000000e+00
br i1 %27, label %28, label %41
28: ; preds = %0
%29 = fcmp oge float %24, 7.500000e+00
%30 = fcmp olt float %24, 9.000000e+00
%31 = and i1 %29, %30
br i1 %31, label %41, label %32
32: ; preds = %28
%33 = fcmp oge float %24, 6.000000e+00
%34 = fcmp olt float %24, 7.500000e+00
%35 = and i1 %33, %34
br i1 %35, label %41, label %36
36: ; preds = %32
%37 = fcmp oge float %24, 4.000000e+00
%38 = fcmp olt float %24, 6.000000e+00
%39 = and i1 %37, %38
%40 = select i1 %39, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.15, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @str.14, i64 0, i64 0)
br label %41
41: ; preds = %36, %32, %28, %0
%42 = phi i8* [ getelementptr inbounds ([35 x i8], [35 x i8]* @str.18, i64 0, i64 0), %0 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.17, i64 0, i64 0), %28 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.16, i64 0, i64 0), %32 ], [ %40, %36 ]
%43 = call i32 @puts(i8* dereferenceable(1) %42)
ret i32 0
}