#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 *);
scalar_t__ scanf(char *, double *, double *, double *);
int main() {
  double w1, w2, r, d = 0, e = 0, total = 0;
  while (scanf("%lf%lf%lf", &w1, &w2, &r)) {
    if (w1 == 0 && w2 == 0 && r == 0) {
      break;
    }
    d = 1 + (r / 30);
    d = (w1 * d) + (w2 * d);
    d = d / 2;
    if (d > 60) {
      printf("AQUI E BODYBUILDER!!\n");
    } else if (d >= 40) {
      printf("Ta saindo da jaula o monstro!\n");
    } else if (d >= 14) {
      printf("Bora, hora do show! BIIR!\n");
    } else if (d >= 13) {
      printf("E 13\n");
    } else if (d >= 1) {
      printf("Nao vai da nao\n");
    }
    total += d;
    e++;
  }
  if ((total / e) > 40) {
    printf("\nAqui nois constroi fibra rapaz! Nao e agua com musculo!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
lea    0xeea(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
cmp    $0x0,%rax
je     130c <main+0x1ec>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11b6 <main+0x96>
jp     11b6 <main+0x96>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11b6 <main+0x96>
jp     11b6 <main+0x96>
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11b6 <main+0x96>
jp     11b6 <main+0x96>
jmp    130c <main+0x1ec>
movsd  -0x20(%rbp),%xmm1
movsd  0xe55(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xe41(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe02(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xde4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1237 <main+0x117>
lea    0xe15(%rip),%rdi
call   1030 <printf@plt>
jmp    12e6 <main+0x1c6>
movsd  -0x28(%rbp),%xmm0
movsd  0xddc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     125f <main+0x13f>
lea    0xe03(%rip),%rdi
call   1030 <printf@plt>
jmp    12e1 <main+0x1c1>
movsd  -0x28(%rbp),%xmm0
movsd  0xdbc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1287 <main+0x167>
lea    0xdfa(%rip),%rdi
call   1030 <printf@plt>
jmp    12dc <main+0x1bc>
movsd  -0x28(%rbp),%xmm0
movsd  0xd9c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     12af <main+0x18f>
lea    0xded(%rip),%rdi
call   1030 <printf@plt>
jmp    12d7 <main+0x1b7>
movsd  -0x28(%rbp),%xmm0
movsd  0xd54(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     12d2 <main+0x1b2>
lea    0xdcb(%rip),%rdi
call   1030 <printf@plt>
jmp    12d7 <main+0x1b7>
jmp    12dc <main+0x1bc>
jmp    12e1 <main+0x1c1>
jmp    12e6 <main+0x1c6>
movsd  -0x28(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xd13(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1147 <main+0x27>
movsd  -0x38(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  0xd02(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1334 <main+0x214>
lea    0xd79(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
lea    0xf03(%rip),%rdi
lea    0x28(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x18(%rsp),%rcx
call   1040 <scanf@plt>
test   %rax,%rax
je     12a5 <main+0x185>
xorpd  %xmm2,%xmm2
lea    0xf6a(%rip),%r13
lea    0xed4(%rip),%r14
lea    0x28(%rsp),%r15
lea    0x20(%rsp),%r12
lea    0x18(%rsp),%rbx
lea    0xf2f(%rip),%rbp
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
xchg   %ax,%ax
movsd  0x28(%rsp),%xmm3
ucomisd %xmm2,%xmm3
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
jne    11be <main+0x9e>
jp     11be <main+0x9e>
ucomisd %xmm2,%xmm0
jne    11be <main+0x9e>
jp     11be <main+0x9e>
ucomisd %xmm2,%xmm1
jne    11be <main+0x9e>
jnp    1283 <main+0x163>
divsd  0xe3a(%rip),%xmm1
addsd  0xe3a(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm3
addsd  %xmm0,%xmm3
mulsd  0xe2e(%rip),%xmm3
ucomisd 0xe2e(%rip),%xmm3
mov    %r13,%rdi
ja     1230 <main+0x110>
ucomisd 0xe29(%rip),%xmm3
mov    %rbp,%rdi
jae    1230 <main+0x110>
ucomisd 0xe24(%rip),%xmm3
lea    0xe84(%rip),%rdi
jae    1230 <main+0x110>
ucomisd 0xe1b(%rip),%xmm3
lea    0xe6e(%rip),%rdi
jae    1230 <main+0x110>
ucomisd 0xde2(%rip),%xmm3
lea    0xe4e(%rip),%rdi
jb     1241 <main+0x121>
nop
movsd  %xmm3,0x30(%rsp)
call   1030 <puts@plt>
movsd  0x30(%rsp),%xmm3
movsd  0x10(%rsp),%xmm0
addsd  %xmm3,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  0xda9(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
call   1040 <scanf@plt>
test   %rax,%rax
xorpd  %xmm2,%xmm2
jne    1190 <main+0x70>
movsd  0x10(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
ucomisd 0xd89(%rip),%xmm0
jbe    12a5 <main+0x185>
lea    0xda2(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%lf%lf%lf\00"
@.str.1 = [22 x i8] c"AQUI E BODYBUILDER!!\0A\00"
@.str.2 = [31 x i8] c"Ta saindo da jaula o monstro!\0A\00"
@.str.3 = [27 x i8] c"Bora, hora do show! BIIR!\0A\00"
@.str.4 = [6 x i8] c"E 13\0A\00"
@.str.5 = [16 x i8] c"Nao vai da nao\0A\00"
@.str.6 = [58 x i8] c"\0AAqui nois constroi fibra rapaz! Nao e agua com musculo!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %5
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
br label %8
8: ; preds = %61, %0
%9 = call i64 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %67
11: ; preds = %8
%12 = load double, double* %2
%13 = fcmp oeq double %12, 0.000000e+00
br i1 %13, label %14, label %21
14: ; preds = %11
%15 = load double, double* %3
%16 = fcmp oeq double %15, 0.000000e+00
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load double, double* %4
%19 = fcmp oeq double %18, 0.000000e+00
br i1 %19, label %20, label %21
20: ; preds = %17
br label %67
21: ; preds = %17, %14, %11
%22 = load double, double* %4
%23 = fdiv double %22, 3.000000e+01
%24 = fadd double 1.000000e+00, %23
store double %24, double* %5
%25 = load double, double* %2
%26 = load double, double* %5
%27 = load double, double* %3
%28 = load double, double* %5
%29 = fmul double %27, %28
%30 = call double @llvm.fmuladd.f64(double %25, double %26, double %29)
store double %30, double* %5
%31 = load double, double* %5
%32 = fdiv double %31, 2.000000e+00
store double %32, double* %5
%33 = load double, double* %5
%34 = fcmp ogt double %33, 6.000000e+01
br i1 %34, label %35, label %37
35: ; preds = %21
%36 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %61
37: ; preds = %21
%38 = load double, double* %5
%39 = fcmp oge double %38, 4.000000e+01
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
br label %60
42: ; preds = %37
%43 = load double, double* %5
%44 = fcmp oge double %43, 1.400000e+01
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
br label %59
47: ; preds = %42
%48 = load double, double* %5
%49 = fcmp oge double %48, 1.300000e+01
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %58
52: ; preds = %47
%53 = load double, double* %5
%54 = fcmp oge double %53, 1.000000e+00
br i1 %54, label %55, label %57
55: ; preds = %52
%56 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
br label %57
57: ; preds = %55, %52
br label %58
58: ; preds = %57, %50
br label %59
59: ; preds = %58, %45
br label %60
60: ; preds = %59, %40
br label %61
61: ; preds = %60, %35
%62 = load double, double* %5
%63 = load double, double* %7
%64 = fadd double %63, %62
store double %64, double* %7
%65 = load double, double* %6
%66 = fadd double %65, 1.000000e+00
store double %66, double* %6
br label %8
67: ; preds = %20, %8
%68 = load double, double* %7
%69 = load double, double* %6
%70 = fdiv double %68, %69
%71 = fcmp ogt double %70, 4.000000e+01
br i1 %71, label %72, label %74
72: ; preds = %67
%73 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.6, i64 0, i64 0))
br label %74
74: ; preds = %72, %67
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%lf%lf%lf\00"
@str = [57 x i8] c"\0AAqui nois constroi fibra rapaz! Nao e agua com musculo!\00"
@str.7 = [15 x i8] c"Nao vai da nao\00"
@str.8 = [5 x i8] c"E 13\00"
@str.9 = [26 x i8] c"Bora, hora do show! BIIR!\00"
@str.10 = [30 x i8] c"Ta saindo da jaula o monstro!\00"
@str.11 = [21 x i8] c"AQUI E BODYBUILDER!!\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i64 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%8 = icmp eq i64 %7, 0
br i1 %8, label %50, label %9
9: ; preds = %0, %38
%10 = phi double [ %39, %38 ], [ 0.000000e+00, %0 ]
%11 = phi double [ %40, %38 ], [ 0.000000e+00, %0 ]
%12 = load double, double* %1
%13 = fcmp oeq double %12, 0.000000e+00
%14 = load double, double* %2
%15 = fcmp oeq double %14, 0.000000e+00
%16 = select i1 %13, i1 %15, i1 false
%17 = load double, double* %3
%18 = fcmp oeq double %17, 0.000000e+00
%19 = select i1 %16, i1 %18, i1 false
br i1 %19, label %43, label %20
20: ; preds = %9
%21 = fdiv double %17, 3.000000e+01
%22 = fadd double %21, 1.000000e+00
%23 = fmul double %14, %22
%24 = call double @llvm.fmuladd.f64(double %12, double %22, double %23)
%25 = fmul double %24, 5.000000e-01
%26 = fcmp ogt double %25, 6.000000e+01
br i1 %26, label %35, label %27
27: ; preds = %20
%28 = fcmp ult double %25, 4.000000e+01
br i1 %28, label %29, label %35
29: ; preds = %27
%30 = fcmp ult double %25, 1.400000e+01
br i1 %30, label %31, label %35
31: ; preds = %29
%32 = fcmp ult double %25, 1.300000e+01
br i1 %32, label %33, label %35
33: ; preds = %31
%34 = fcmp ult double %25, 1.000000e+00
br i1 %34, label %38, label %35
35: ; preds = %33, %31, %29, %27, %20
%36 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.11, i64 0, i64 0), %20 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @str.10, i64 0, i64 0), %27 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @str.9, i64 0, i64 0), %29 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @str.8, i64 0, i64 0), %31 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @str.7, i64 0, i64 0), %33 ]
%37 = call i32 @puts(i8* dereferenceable(1) %36)
br label %38
38: ; preds = %35, %33
%39 = fadd double %10, %25
%40 = fadd double %11, 1.000000e+00
%41 = call i64 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %9
43: ; preds = %38, %9
%44 = phi double [ %40, %38 ], [ %11, %9 ]
%45 = phi double [ %39, %38 ], [ %10, %9 ]
%46 = fdiv double %45, %44
%47 = fcmp ogt double %46, 4.000000e+01
br i1 %47, label %48, label %50
48: ; preds = %43
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
br label %50
50: ; preds = %0, %48, %43
ret i32 0
}