#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 n1, n2, n3, media;
  scanf("%f%f%f", &n1, &n2, &n3);
  media = (n1 + n2 + n3) / 3;
  if (media >= 7) {
    printf("aprovado\n");
  } else {
    if (media < 3) {
      printf("reprovado\n");
    } else {
      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     118e <main+0x6e>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
jmp    11c2 <main+0xa2>
movss  0xe6e(%rip),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    11b1 <main+0x91>
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
jmp    11bd <main+0x9d>
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
jmp    11c2 <main+0xa2>
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    0xeb4(%rip),%rax
lea    0xea1(%rip),%rcx
cmova  %rax,%rcx
ucomiss 0xe8b(%rip),%xmm0
lea    0xea5(%rip),%rdi
cmovb  %rcx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%f%f%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 ([7 x i8], [7 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 %25
17: ; preds = %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 %24
22: ; preds = %17
%23 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %24
24: ; preds = %22, %20
br label %25
25: ; preds = %24, %15
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%f%f%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 ([7 x i8], [7 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
%15 = fcmp olt float %13, 3.000000e+00
%16 = select i1 %15, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0)
%17 = select i1 %14, i8* %16, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.5, i64 0, i64 0)
%18 = call i32 @puts(i8* dereferenceable(1) %17)
ret i32 0
}