#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, ALTURA, VALOR = 0;
  printf("Informe o Peso:");
  scanf("%f", &PESO);
  printf("Informe a Altura:");
  scanf("%f", &ALTURA);
  VALOR = PESO / (ALTURA * ALTURA);
  if (VALOR == 19) {
    printf("Magro!");
  } else if ((VALOR >= 20) && (VALOR <= 25)) {
    printf("Peso Ideal!");
  } else if ((VALOR >= 26) && (VALOR <= 30)) {
    printf("Acima do Peso");
  } else if (VALOR >= 31) {
    printf("Obeso,\n Situação prejudicial a saúde!");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  0xe6c(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    11b4 <main+0x94>
jp     11b4 <main+0x94>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
jmp    1257 <main+0x137>
movss  -0x10(%rbp),%xmm0
movss  0xe43(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     11ed <main+0xcd>
movss  0xe36(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     11ed <main+0xcd>
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
jmp    1252 <main+0x132>
movss  -0x10(%rbp),%xmm0
movss  0xe12(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     1226 <main+0x106>
movss  0xe05(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jb     1226 <main+0x106>
lea    0xe34(%rip),%rdi
call   1030 <printf@plt>
jmp    124d <main+0x12d>
movss  -0x10(%rbp),%xmm0
movss  0xde1(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     1248 <main+0x128>
lea    0xe1b(%rip),%rdi
call   1030 <printf@plt>
jmp    124d <main+0x12d>
jmp    1252 <main+0x132>
jmp    1257 <main+0x137>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeec(%rip),%rdi
call   1030 <printf@plt>
lea    0xef0(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
mulss  %xmm1,%xmm1
divss  %xmm1,%xmm0
ucomiss 0xe87(%rip),%xmm0
jne    1186 <main+0x66>
jp     1186 <main+0x66>
lea    0xeb9(%rip),%rdi
jmp    11d4 <main+0xb4>
ucomiss 0xe77(%rip),%xmm0
jb     11a5 <main+0x85>
movss  0xe71(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     11a5 <main+0x85>
lea    0xea1(%rip),%rdi
jmp    11d4 <main+0xb4>
ucomiss 0xe60(%rip),%xmm0
jb     11c4 <main+0xa4>
movss  0xe5a(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     11c4 <main+0xa4>
lea    0xe8e(%rip),%rdi
jmp    11d4 <main+0xb4>
ucomiss 0xe49(%rip),%xmm0
jb     11d9 <main+0xb9>
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Informe o Peso:\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [18 x i8] c"Informe a Altura:\00"
@.str.3 = [7 x i8] c"Magro!\00"
@.str.4 = [12 x i8] c"Peso Ideal!\00"
@.str.5 = [14 x i8] c"Acima do Peso\00"
@.str.6 = [41 x i8] c"Obeso,\0A Situa\C3\A7\C3\A3o prejudicial a sa\C3\BAde!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 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)
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 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* %3)
%9 = load float, float* %2
%10 = load float, float* %3
%11 = load float, float* %3
%12 = fmul float %10, %11
%13 = fdiv float %9, %12
store float %13, float* %4
%14 = load float, float* %4
%15 = fcmp oeq float %14, 1.900000e+01
br i1 %15, label %16, label %18
16: ; preds = %0
%17 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %42
18: ; preds = %0
%19 = load float, float* %4
%20 = fcmp oge float %19, 2.000000e+01
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = load float, float* %4
%23 = fcmp ole float %22, 2.500000e+01
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
br label %41
26: ; preds = %21, %18
%27 = load float, float* %4
%28 = fcmp oge float %27, 2.600000e+01
br i1 %28, label %29, label %34
29: ; preds = %26
%30 = load float, float* %4
%31 = fcmp ole float %30, 3.000000e+01
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
br label %40
34: ; preds = %29, %26
%35 = load float, float* %4
%36 = fcmp oge float %35, 3.100000e+01
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0))
br label %39
39: ; preds = %37, %34
br label %40
40: ; preds = %39, %32
br label %41
41: ; preds = %40, %24
br label %42
42: ; preds = %41, %16
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Informe o Peso:\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [18 x i8] c"Informe a Altura:\00"
@.str.3 = [7 x i8] c"Magro!\00"
@.str.4 = [12 x i8] c"Peso Ideal!\00"
@.str.5 = [14 x i8] c"Acima do Peso\00"
@.str.6 = [41 x i8] c"Obeso,\0A Situa\C3\A7\C3\A3o prejudicial a sa\C3\BAde!\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 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 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 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 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* %1
%10 = load float, float* %2
%11 = fmul float %10, %10
%12 = fdiv float %9, %11
%13 = fcmp oeq float %12, 1.900000e+01
br i1 %13, label %24, label %14
14: ; preds = %0
%15 = fcmp oge float %12, 2.000000e+01
%16 = fcmp ole float %12, 2.500000e+01
%17 = and i1 %15, %16
br i1 %17, label %24, label %18
18: ; preds = %14
%19 = fcmp oge float %12, 2.600000e+01
%20 = fcmp ole float %12, 3.000000e+01
%21 = and i1 %19, %20
br i1 %21, label %24, label %22
22: ; preds = %18
%23 = fcmp ult float %12, 3.100000e+01
br i1 %23, label %27, label %24
24: ; preds = %22, %18, %14, %0
%25 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), %0 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), %14 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), %18 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0), %22 ]
%26 = call i32 @printf(i8* dereferenceable(1) %25)
br label %27
27: ; preds = %24, %22
ret i32 0
}