#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 *);
int main() {
  float PESO = 0, ALT = 0, IMC = 0, MIN = 0, MAX = 0;
  printf("Informe o PESO em quilogramas (Ex: 55.695): ");
  scanf("%f", &PESO);
  printf("Informe a ALTURA em metros (Ex: 1.63): ");
  scanf("%f", &ALT);
  MIN = ((ALT * ALT) * 19);
  MAX = ((ALT * ALT) * 25);
  IMC = PESO / (ALT * ALT);
  if (IMC < 19) {
    printf("Seu IMC eh %.2f, voce esta abaixo do peso ideal!!! O peso ideal "
           "para sua altura eh entre %.3f e %.3f quilogramas \n",
           IMC, MIN, MAX);
  } else {
    if (IMC >= 19 && IMC <= 25) {
      printf("Seu IMC eh %.2f, voce esta no peso ideal!!! O peso ideal para "
             "sua altura eh entre %.3f e %.3f quilogramas \n",
             IMC, MIN, MAX);
    } else {
      if (IMC > 25 && IMC < 30) {
        printf("Seu IMC eh %.2f, voce esta acima do peso ideal!!! O peso ideal "
               "para sua altura eh entre %.3f e %.3f quilogramas \n",
               IMC, MIN, MAX);
      } else {
        printf("Seu IMC eh %.2f, cuidado voce esta obeso!!! O peso ideal para "
               "sua altura eh entre %.3f e %.3f quilogramas \n",
               IMC, MIN, MAX);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  0xe5b(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  0xe44(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe17(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1221 <main+0x101>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x18(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe4f(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    1300 <main+0x1e0>
movss  -0x10(%rbp),%xmm0
movss  0xdd2(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     1277 <main+0x157>
movss  0xdc5(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     1277 <main+0x157>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x18(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe6c(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    12fb <main+0x1db>
movss  -0x10(%rbp),%xmm0
movss  0xd80(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    12cd <main+0x1ad>
movss  0xd73(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    12cd <main+0x1ad>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x18(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe82(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    12f6 <main+0x1d6>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x18(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xec6(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    12fb <main+0x1db>
jmp    1300 <main+0x1e0>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeef(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xede(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x8(%rsp),%xmm1
mulss  %xmm1,%xmm1
movss  0xe7c(%rip),%xmm0
movss  0xe78(%rip),%xmm2
mulss  %xmm1,%xmm2
movss  0xc(%rsp),%xmm3
divss  %xmm1,%xmm3
mulss  %xmm0,%xmm1
ucomiss %xmm3,%xmm0
jbe    11bb <main+0x9b>
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
cvtss2sd %xmm1,%xmm1
cvtss2sd %xmm2,%xmm2
lea    0xeab(%rip),%rdi
jmp    121e <main+0xfe>
ucomiss 0xe3e(%rip),%xmm3
jb     11e9 <main+0xc9>
movss  0xe38(%rip),%xmm0
ucomiss %xmm3,%xmm0
jb     11e9 <main+0xc9>
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
cvtss2sd %xmm1,%xmm1
cvtss2sd %xmm2,%xmm2
lea    0xef0(%rip),%rdi
jmp    121e <main+0xfe>
ucomiss 0xe14(%rip),%xmm3
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
cvtss2sd %xmm1,%xmm1
cvtss2sd %xmm2,%xmm2
jbe    1217 <main+0xf7>
movss  0xdff(%rip),%xmm4
ucomiss %xmm3,%xmm4
jbe    1217 <main+0xf7>
lea    0xf2e(%rip),%rdi
jmp    121e <main+0xfe>
lea    0xf97(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"Informe o PESO em quilogramas (Ex: 55.695): \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [40 x i8] c"Informe a ALTURA em metros (Ex: 1.63): \00"
@.str.3 = [115 x i8] c"Seu IMC eh %.2f, voce esta abaixo do peso ideal!!! O peso ideal para sua altura eh entre %.3f e %.3f quilogramas \0A\00"
@.str.4 = [108 x i8] c"Seu IMC eh %.2f, voce esta no peso ideal!!! O peso ideal para sua altura eh entre %.3f e %.3f quilogramas \0A\00"
@.str.5 = [114 x i8] c"Seu IMC eh %.2f, voce esta acima do peso ideal!!! O peso ideal para sua altura eh entre %.3f e %.3f quilogramas \0A\00"
@.str.6 = [108 x i8] c"Seu IMC eh %.2f, cuidado voce esta obeso!!! O peso ideal para sua altura eh entre %.3f e %.3f quilogramas \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %2
store float 0.000000e+00, float* %3
store float 0.000000e+00, float* %4
store float 0.000000e+00, float* %5
store float 0.000000e+00, float* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%11 = load float, float* %3
%12 = load float, float* %3
%13 = fmul float %11, %12
%14 = fmul float %13, 1.900000e+01
store float %14, float* %5
%15 = load float, float* %3
%16 = load float, float* %3
%17 = fmul float %15, %16
%18 = fmul float %17, 2.500000e+01
store float %18, float* %6
%19 = load float, float* %2
%20 = load float, float* %3
%21 = load float, float* %3
%22 = fmul float %20, %21
%23 = fdiv float %19, %22
store float %23, float* %4
%24 = load float, float* %4
%25 = fcmp olt float %24, 1.900000e+01
br i1 %25, label %26, label %34
26: ; preds = %0
%27 = load float, float* %4
%28 = fpext float %27 to double
%29 = load float, float* %5
%30 = fpext float %29 to double
%31 = load float, float* %6
%32 = fpext float %31 to double
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str.3, i64 0, i64 0), double %28, double %30, double %32)
br label %72
34: ; preds = %0
%35 = load float, float* %4
%36 = fcmp oge float %35, 1.900000e+01
br i1 %36, label %37, label %48
37: ; preds = %34
%38 = load float, float* %4
%39 = fcmp ole float %38, 2.500000e+01
br i1 %39, label %40, label %48
40: ; preds = %37
%41 = load float, float* %4
%42 = fpext float %41 to double
%43 = load float, float* %5
%44 = fpext float %43 to double
%45 = load float, float* %6
%46 = fpext float %45 to double
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.4, i64 0, i64 0), double %42, double %44, double %46)
br label %71
48: ; preds = %37, %34
%49 = load float, float* %4
%50 = fcmp ogt float %49, 2.500000e+01
br i1 %50, label %51, label %62
51: ; preds = %48
%52 = load float, float* %4
%53 = fcmp olt float %52, 3.000000e+01
br i1 %53, label %54, label %62
54: ; preds = %51
%55 = load float, float* %4
%56 = fpext float %55 to double
%57 = load float, float* %5
%58 = fpext float %57 to double
%59 = load float, float* %6
%60 = fpext float %59 to double
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str.5, i64 0, i64 0), double %56, double %58, double %60)
br label %70
62: ; preds = %51, %48
%63 = load float, float* %4
%64 = fpext float %63 to double
%65 = load float, float* %5
%66 = fpext float %65 to double
%67 = load float, float* %6
%68 = fpext float %67 to double
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.6, i64 0, i64 0), double %64, double %66, double %68)
br label %70
70: ; preds = %62, %54
br label %71
71: ; preds = %70, %40
br label %72
72: ; preds = %71, %26
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"Informe o PESO em quilogramas (Ex: 55.695): \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [40 x i8] c"Informe a ALTURA em metros (Ex: 1.63): \00"
@.str.3 = [115 x i8] c"Seu IMC eh %.2f, voce esta abaixo do peso ideal!!! O peso ideal para sua altura eh entre %.3f e %.3f quilogramas \0A\00"
@.str.4 = [108 x i8] c"Seu IMC eh %.2f, voce esta no peso ideal!!! O peso ideal para sua altura eh entre %.3f e %.3f quilogramas \0A\00"
@.str.5 = [114 x i8] c"Seu IMC eh %.2f, voce esta acima do peso ideal!!! O peso ideal para sua altura eh entre %.3f e %.3f quilogramas \0A\00"
@.str.6 = [108 x i8] c"Seu IMC eh %.2f, cuidado voce esta obeso!!! O peso ideal para sua altura eh entre %.3f e %.3f quilogramas \0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
store float 0.000000e+00, float* %1
%4 = bitcast float* %2 to i8*
store float 0.000000e+00, float* %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%9 = load float, float* %2
%10 = fmul float %9, %9
%11 = fmul float %10, 1.900000e+01
%12 = fmul float %10, 2.500000e+01
%13 = load float, float* %1
%14 = fdiv float %13, %10
%15 = fcmp olt float %14, 1.900000e+01
br i1 %15, label %16, label %21
16: ; preds = %0
%17 = fpext float %14 to double
%18 = fpext float %11 to double
%19 = fpext float %12 to double
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([115 x i8], [115 x i8]* @.str.3, i64 0, i64 0), double %17, double %18, double %19)
br label %41
21: ; preds = %0
%22 = fcmp oge float %14, 1.900000e+01
%23 = fcmp ole float %14, 2.500000e+01
%24 = and i1 %22, %23
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = fpext float %14 to double
%27 = fpext float %11 to double
%28 = fpext float %12 to double
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([108 x i8], [108 x i8]* @.str.4, i64 0, i64 0), double %26, double %27, double %28)
br label %41
30: ; preds = %21
%31 = fcmp ogt float %14, 2.500000e+01
%32 = fcmp olt float %14, 3.000000e+01
%33 = and i1 %31, %32
%34 = fpext float %14 to double
%35 = fpext float %11 to double
%36 = fpext float %12 to double
br i1 %33, label %37, label %39
37: ; preds = %30
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([114 x i8], [114 x i8]* @.str.5, i64 0, i64 0), double %34, double %35, double %36)
br label %41
39: ; preds = %30
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([108 x i8], [108 x i8]* @.str.6, i64 0, i64 0), double %34, double %35, double %36)
br label %41
41: ; preds = %25, %39, %37, %16
ret i32 0
}