#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 */
float IMC(double, double);
int /*<<< orphan*/ printf(char *);
float main() {
  float a = IMC(109.5, 1.88);
  if (a < 18.5) {
    printf("Infrapeso \n");
  } else if (((18.50) <= (a) && (a) <= (24.99))) {
    printf("NORMAL \n");
  } else if (a >= 25 && a <= 30) {
    printf("Sobrepeso \n");
  } else if (a >= 30) {
    printf("Obeso \n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xed8(%rip),%xmm0
movsd  0xed8(%rip),%xmm1
call   1040 <IMC@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xead(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    116e <main+0x4e>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
jmp    121f <main+0xff>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe81(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11b5 <main+0x95>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe7e(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     11b5 <main+0x95>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
jmp    121a <main+0xfa>
movss  -0x4(%rbp),%xmm0
movss  0xe5e(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     11ee <main+0xce>
movss  0xe51(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jb     11ee <main+0xce>
lea    0xe59(%rip),%rdi
call   1030 <printf@plt>
jmp    1215 <main+0xf5>
movss  -0x4(%rbp),%xmm0
movss  0xe29(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     1210 <main+0xf0>
lea    0xe3e(%rip),%rdi
call   1030 <printf@plt>
jmp    1215 <main+0xf5>
jmp    121a <main+0xfa>
jmp    121f <main+0xff>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
call   1040 <IMC@plt>
movss  0xeda(%rip),%xmm1
ucomiss %xmm0,%xmm1
jbe    114c <main+0x2c>
lea    0xef4(%rip),%rdi
jmp    11a2 <main+0x82>
ucomiss 0xec5(%rip),%xmm0
jb     1173 <main+0x53>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xeac(%rip),%xmm2
ucomisd %xmm1,%xmm2
jb     1173 <main+0x53>
lea    0xec5(%rip),%rdi
jmp    11a2 <main+0x82>
ucomiss 0xea2(%rip),%xmm0
jb     1192 <main+0x72>
movss  0xe9c(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     1192 <main+0x72>
lea    0xe9b(%rip),%rdi
jmp    11a2 <main+0x82>
ucomiss 0xe87(%rip),%xmm0
jb     11a7 <main+0x87>
lea    0xe82(%rip),%rdi
call   1030 <puts@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Infrapeso \0A\00"
@.str.1 = [9 x i8] c"NORMAL \0A\00"
@.str.2 = [12 x i8] c"Sobrepeso \0A\00"
@.str.3 = [8 x i8] c"Obeso \0A\00"
define float @main() {
%1 = alloca float
%2 = call float @IMC(double 1.095000e+02, double 1.880000e+00)
store float %2, float* %1
%3 = load float, float* %1
%4 = fpext float %3 to double
%5 = fcmp olt double %4, 1.850000e+01
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %34
8: ; preds = %0
%9 = load float, float* %1
%10 = fpext float %9 to double
%11 = fcmp ole double 1.850000e+01, %10
br i1 %11, label %12, label %18
12: ; preds = %8
%13 = load float, float* %1
%14 = fpext float %13 to double
%15 = fcmp ole double %14, 2.499000e+01
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %33
18: ; preds = %12, %8
%19 = load float, float* %1
%20 = fcmp oge float %19, 2.500000e+01
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = load float, float* %1
%23 = fcmp ole float %22, 3.000000e+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.2, i64 0, i64 0))
br label %32
26: ; preds = %21, %18
%27 = load float, float* %1
%28 = fcmp oge float %27, 3.000000e+01
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %31
31: ; preds = %29, %26
br label %32
32: ; preds = %31, %24
br label %33
33: ; preds = %32, %16
br label %34
34: ; preds = %33, %6
ret float 0.000000e+00
}

LLVM IR (-O2):
@str = [7 x i8] c"Obeso \00"
@str.4 = [11 x i8] c"Sobrepeso \00"
@str.5 = [8 x i8] c"NORMAL \00"
@str.6 = [11 x i8] c"Infrapeso \00"
define float @main() {
%1 = tail call float @IMC(double 1.095000e+02, double 1.880000e+00)
%2 = fcmp olt float %1, 1.850000e+01
br i1 %2, label %14, label %3
3: ; preds = %0
%4 = fpext float %1 to double
%5 = fcmp ult float %1, 1.850000e+01
%6 = fcmp ugt double %4, 2.499000e+01
%7 = or i1 %5, %6
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = fcmp oge float %1, 2.500000e+01
%10 = fcmp ole float %1, 3.000000e+01
%11 = and i1 %9, %10
br i1 %11, label %14, label %12
12: ; preds = %8
%13 = fcmp ult float %1, 3.000000e+01
br i1 %13, label %17, label %14
14: ; preds = %12, %8, %3, %0
%15 = phi i8* [ getelementptr inbounds ([11 x i8], [11 x i8]* @str.6, i64 0, i64 0), %0 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.5, i64 0, i64 0), %3 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @str.4, i64 0, i64 0), %8 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0), %12 ]
%16 = tail call i32 @puts(i8* dereferenceable(1) %15)
br label %17
17: ; preds = %14, %12
ret float 0.000000e+00
}