#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(int argc, char const *argv[]) {
  float a, b, c;
  scanf("%f %f %f", &a, &b, &c);
  if ((3 <= ((a + b + c) / 3)) && (((a + b + c) / 3) < 7)) {
    printf("prova final");
  } else if (((a + b + c) / 3) < 3) {
    printf("reprovado");
  } else {
    printf("aprovado");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xecb(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0x14(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
movss  0xe9b(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xe8f(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     11b7 <main+0x97>
movss  -0x14(%rbp),%xmm1
addss  -0x18(%rbp),%xmm1
addss  -0x1c(%rbp),%xmm1
movss  0xe6f(%rip),%xmm0
divss  %xmm0,%xmm1
movss  0xe67(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    11b7 <main+0x97>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
jmp    1205 <main+0xe5>
movss  -0x14(%rbp),%xmm1
addss  -0x18(%rbp),%xmm1
addss  -0x1c(%rbp),%xmm1
movss  0xe32(%rip),%xmm0
divss  %xmm0,%xmm1
movss  0xe26(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    11f4 <main+0xd4>
lea    0xe33(%rip),%rdi
call   1030 <printf@plt>
jmp    1200 <main+0xe0>
lea    0xe2c(%rip),%rdi
call   1030 <printf@plt>
jmp    1205 <main+0xe5>
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),%xmm0
addss  0x10(%rsp),%xmm0
addss  0xc(%rsp),%xmm0
movss  0xea7(%rip),%xmm1
divss  %xmm1,%xmm0
ucomiss %xmm0,%xmm1
lea    0xeb6(%rip),%rax
lea    0xeb9(%rip),%rcx
cmova  %rax,%rcx
movss  0xe8a(%rip),%xmm2
ucomiss %xmm0,%xmm2
lea    0xe8d(%rip),%rdi
cmovbe %rcx,%rdi
ucomiss %xmm1,%xmm0
cmovb  %rcx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%f %f %f\00"
@.str.1 = [12 x i8] c"prova final\00"
@.str.2 = [10 x i8] c"reprovado\00"
@.str.3 = [9 x i8] c"aprovado\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = bitcast float* %3 to i8*
%7 = bitcast float* %4 to i8*
%8 = bitcast float* %5 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %3, float* %4, float* %5)
%10 = load float, float* %3
%11 = load float, float* %4
%12 = fadd float %10, %11
%13 = load float, float* %5
%14 = fadd float %12, %13
%15 = fdiv float %14, 3.000000e+00
%16 = fcmp oge float %15, 3.000000e+00
%17 = fcmp olt float %15, 7.000000e+00
%18 = and i1 %16, %17
%19 = fcmp olt float %15, 3.000000e+00
%20 = select i1 %19, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0)
%21 = select i1 %18, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %20
%22 = call i32 @printf(i8* dereferenceable(1) %21)
ret i32 0
}