#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");
  else if (media >= 3 && media < 7)
    printf("prova final\n");
  else
    printf("reprovado");
  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     118e <main+0x6e>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
jmp    11d8 <main+0xb8>
movss  -0x14(%rbp),%xmm0
movss  0xe69(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     11c7 <main+0xa7>
movss  0xe54(%rip),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    11c7 <main+0xa7>
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
jmp    11d3 <main+0xb3>
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
jmp    11d8 <main+0xb8>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xecd(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1050 <scanf@plt>
movss  0x14(%rsp),%xmm0
addss  0x10(%rsp),%xmm0
addss  0xc(%rsp),%xmm0
divss  0xe97(%rip),%xmm0
ucomiss 0xe94(%rip),%xmm0
jae    1196 <main+0x66>
ucomiss 0xe87(%rip),%xmm0
jb     11a4 <main+0x74>
movss  0xe81(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    11a4 <main+0x74>
lea    0xe8c(%rip),%rdi
call   1030 <puts@plt>
jmp    11b0 <main+0x80>
lea    0xe8a(%rip),%rdi
call   1030 <puts@plt>
jmp    11b0 <main+0x80>
lea    0xe66(%rip),%rdi
call   1040 <printf@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 = [13 x i8] c"prova final\0A\00"
@.str.3 = [10 x i8] c"reprovado\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 %28
17: ; preds = %0
%18 = load float, float* %5
%19 = fcmp oge float %18, 3.000000e+00
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = load float, float* %5
%22 = fcmp olt float %21, 7.000000e+00
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %27
25: ; preds = %20, %17
%26 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %27
27: ; preds = %25, %23
br label %28
28: ; preds = %27, %15
ret i32 0
}

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