#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 a, b, c, media;
  scanf("%f\n%f\n%f", &a, &b, &c);
  media = (a + b + c) / 3;
  if (media >= 7)
    printf("aprovado\n");
  if (media < 3)
    printf("reprovado\n");
  if (media >= 3 && media < 7)
    printf("prova final\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  0xea6(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  0xe8c(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     1189 <main+0x69>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
movss  0xe73(%rip),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    11a7 <main+0x87>
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
movss  0xe50(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     11db <main+0xbb>
movss  0xe3b(%rip),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    11db <main+0xbb>
lea    0xe50(%rip),%rdi
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   1040 <scanf@plt>
movss  0x14(%rsp),%xmm1
addss  0x10(%rsp),%xmm1
addss  0xc(%rsp),%xmm1
divss  0xea7(%rip),%xmm1
ucomiss 0xea4(%rip),%xmm1
movss  %xmm1,0x8(%rsp)
jb     117a <main+0x5a>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
movss  0x8(%rsp),%xmm1
movss  0xe7e(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    1199 <main+0x79>
lea    0xe8f(%rip),%rdi
call   1030 <puts@plt>
movss  0x8(%rsp),%xmm1
ucomiss 0xe60(%rip),%xmm1
jb     11bb <main+0x9b>
movss  0xe5a(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    11bb <main+0x9b>
lea    0xe5b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%f\0A%f\0A%f\00"
@.str.1 = [10 x i8] c"aprovado\0A\00"
@.str.2 = [11 x i8] c"reprovado\0A\00"
@.str.3 = [13 x i8] c"prova final\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %2, float* %3, float* %4)
%7 = load float, float* %2
%8 = load float, float* %3
%9 = fadd float %7, %8
%10 = load float, float* %4
%11 = fadd float %9, %10
%12 = fdiv float %11, 3.000000e+00
store float %12, float* %5
%13 = load float, float* %5
%14 = fcmp oge float %13, 7.000000e+00
br i1 %14, label %15, label %17
15: ; preds = %0
%16 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %15, %0
%18 = load float, float* %5
%19 = fcmp olt float %18, 3.000000e+00
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %22
22: ; preds = %20, %17
%23 = load float, float* %5
%24 = fcmp oge float %23, 3.000000e+00
br i1 %24, label %25, label %30
25: ; preds = %22
%26 = load float, float* %5
%27 = fcmp olt float %26, 7.000000e+00
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %30
30: ; preds = %28, %25, %22
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%f\0A%f\0A%f\00"
@str = [12 x i8] c"prova final\00"
@str.4 = [10 x i8] c"reprovado\00"
@str.5 = [9 x i8] c"aprovado\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 = fadd float %8, %9
%11 = load float, float* %3
%12 = fadd float %10, %11
%13 = fdiv float %12, 3.000000e+00
%14 = fcmp ult float %13, 7.000000e+00
br i1 %14, label %17, label %15
15: ; preds = %0
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.5, i64 0, i64 0))
br label %17
17: ; preds = %15, %0
%18 = fcmp olt float %13, 3.000000e+00
br i1 %18, label %19, label %21
19: ; preds = %17
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0))
br label %21
21: ; preds = %19, %17
%22 = fcmp oge float %13, 3.000000e+00
%23 = fcmp olt float %13, 7.000000e+00
%24 = and i1 %22, %23
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
br label %27
27: ; preds = %25, %21
ret i32 0
}