#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 alt, peso, formula;
  printf("Digite a sua altura com . exemplo 1.90:\n");
  scanf("%f", &alt);
  while (alt > 3) {
    printf("Digite a sua altura com . exemplo 1.90:\n");
    scanf("%f", &alt);
  }
  printf("Digite o seu peso:\n");
  scanf("%f", &peso);
  formula = peso / (alt * alt);
  if (formula <= 19) {
    printf("Você está com %.2f, você está Magro!!!", formula);
  } else if (formula <= 25) {
    printf("Você está com %.2f, você está com o peso Ideal!!!", formula);
  } else if (formula <= 30) {
    printf("Você está com %2.f, você está Acima do Peso!!!", formula);
  } else {
    printf("Você está com %2.f, você está OBESO!!!!\nSua situação é "
           "prejudicial para sua saúde",
           formula);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xea6(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1186 <main+0x66>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
jmp    114d <main+0x2d>
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9e(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe40(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     11ea <main+0xca>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe72(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1267 <main+0x147>
movss  0xe16(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     1218 <main+0xf8>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe6f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1262 <main+0x142>
movss  0xdec(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     1246 <main+0x126>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe77(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    125d <main+0x13d>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1262 <main+0x142>
jmp    1267 <main+0x147>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xfd4(%rip),%rdi
call   1030 <puts@plt>
lea    0xec4(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x8(%rsp),%xmm0
ucomiss 0xe9d(%rip),%xmm0
jbe    11a2 <main+0x72>
lea    0xfa8(%rip),%r14
lea    0xe9d(%rip),%r15
lea    0x8(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
movss  0x8(%rsp),%xmm0
ucomiss 0xe60(%rip),%xmm0
ja     1180 <main+0x50>
lea    0xf58(%rip),%rdi
call   1030 <puts@plt>
lea    0xe5b(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
mulss  %xmm1,%xmm1
divss  %xmm1,%xmm0
movss  0xe29(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1207 <main+0xd7>
movss  0xe20(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1214 <main+0xe4>
movss  0xe17(%rip),%xmm1
ucomiss %xmm0,%xmm1
cvtss2sd %xmm0,%xmm0
jae    1221 <main+0xf1>
lea    0xea2(%rip),%rdi
jmp    1228 <main+0xf8>
cvtss2sd %xmm0,%xmm0
lea    0xe01(%rip),%rdi
jmp    1228 <main+0xf8>
cvtss2sd %xmm0,%xmm0
lea    0xe1f(%rip),%rdi
jmp    1228 <main+0xf8>
lea    0xe4c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Digite a sua altura com . exemplo 1.90:\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [20 x i8] c"Digite o seu peso:\0A\00"
@.str.3 = [43 x i8] c"Voc\C3\AA est\C3\A1 com %.2f, voc\C3\AA est\C3\A1 Magro!!!\00"
@.str.4 = [54 x i8] c"Voc\C3\AA est\C3\A1 com %.2f, voc\C3\AA est\C3\A1 com o peso Ideal!!!\00"
@.str.5 = [51 x i8] c"Voc\C3\AA est\C3\A1 com %2.f, voc\C3\AA est\C3\A1 Acima do Peso!!!\00"
@.str.6 = [90 x i8] c"Voc\C3\AA est\C3\A1 com %2.f, voc\C3\AA est\C3\A1 OBESO!!!!\0ASua situa\C3\A7\C3\A3o \C3\A9 prejudicial para sua sa\C3\BAde\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 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* %2)
br label %7
7: ; preds = %10, %0
%8 = load float, float* %2
%9 = fcmp ogt float %8, 3.000000e+00
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
br label %7
13: ; preds = %7
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%16 = load float, float* %3
%17 = load float, float* %2
%18 = load float, float* %2
%19 = fmul float %17, %18
%20 = fdiv float %16, %19
store float %20, float* %4
%21 = load float, float* %4
%22 = fcmp ole float %21, 1.900000e+01
br i1 %22, label %23, label %27
23: ; preds = %13
%24 = load float, float* %4
%25 = fpext float %24 to double
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), double %25)
br label %47
27: ; preds = %13
%28 = load float, float* %4
%29 = fcmp ole float %28, 2.500000e+01
br i1 %29, label %30, label %34
30: ; preds = %27
%31 = load float, float* %4
%32 = fpext float %31 to double
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0), double %32)
br label %46
34: ; preds = %27
%35 = load float, float* %4
%36 = fcmp ole float %35, 3.000000e+01
br i1 %36, label %37, label %41
37: ; preds = %34
%38 = load float, float* %4
%39 = fpext float %38 to double
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0), double %39)
br label %45
41: ; preds = %34
%42 = load float, float* %4
%43 = fpext float %42 to double
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.6, i64 0, i64 0), double %43)
br label %45
45: ; preds = %41, %37
br label %46
46: ; preds = %45, %30
br label %47
47: ; preds = %46, %23
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.3 = [43 x i8] c"Voc\C3\AA est\C3\A1 com %.2f, voc\C3\AA est\C3\A1 Magro!!!\00"
@.str.4 = [54 x i8] c"Voc\C3\AA est\C3\A1 com %.2f, voc\C3\AA est\C3\A1 com o peso Ideal!!!\00"
@.str.5 = [51 x i8] c"Voc\C3\AA est\C3\A1 com %2.f, voc\C3\AA est\C3\A1 Acima do Peso!!!\00"
@.str.6 = [90 x i8] c"Voc\C3\AA est\C3\A1 com %2.f, voc\C3\AA est\C3\A1 OBESO!!!!\0ASua situa\C3\A7\C3\A3o \C3\A9 prejudicial para sua sa\C3\BAde\00"
@str.7 = [19 x i8] c"Digite o seu peso:\00"
@str.8 = [40 x i8] c"Digite a sua altura com . exemplo 1.90:\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.8, 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 = load float, float* %1
%8 = fcmp ogt float %7, 3.000000e+00
br i1 %8, label %9, label %14
9: ; preds = %0, %9
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.8, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%12 = load float, float* %1
%13 = fcmp ogt float %12, 3.000000e+00
br i1 %13, label %9, label %14
14: ; preds = %9, %0
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.7, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%17 = load float, float* %2
%18 = load float, float* %1
%19 = fmul float %18, %18
%20 = fdiv float %17, %19
%21 = fcmp ugt float %20, 1.900000e+01
br i1 %21, label %25, label %22
22: ; preds = %14
%23 = fpext float %20 to double
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), double %23)
br label %37
25: ; preds = %14
%26 = fcmp ugt float %20, 2.500000e+01
br i1 %26, label %30, label %27
27: ; preds = %25
%28 = fpext float %20 to double
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0), double %28)
br label %37
30: ; preds = %25
%31 = fcmp ugt float %20, 3.000000e+01
%32 = fpext float %20 to double
br i1 %31, label %35, label %33
33: ; preds = %30
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.5, i64 0, i64 0), double %32)
br label %37
35: ; preds = %30
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([90 x i8], [90 x i8]* @.str.6, i64 0, i64 0), double %32)
br label %37
37: ; preds = %27, %35, %33, %22
ret i32 0
}