#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 *);
void escreveCategoria(float indice) {
  printf("Categoria: ");
  if (indice <= 30) {
    if (indice >= 19) {
      if (indice >= 25)
        printf("Excesso de peso\n");
      else
        printf("Normal\n");
    } else
      printf("Magro\n");
  } else if (indice <= 40)
    printf("Obeso I\n");
  else
    printf("Obeso II\n");
}


x86 assembly (clang, -O0):
<escreveCategoria>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
lea    0xeec(%rip),%rdi
call   1030 <printf@plt>
movss  0xecf(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jb     119a <escreveCategoria+0x8a>
movss  -0x4(%rbp),%xmm0
movss  0xec0(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     1189 <escreveCategoria+0x79>
movss  -0x4(%rbp),%xmm0
movss  0xeae(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     1178 <escreveCategoria+0x68>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    1184 <escreveCategoria+0x74>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    1195 <escreveCategoria+0x85>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
jmp    11ce <escreveCategoria+0xbe>
movss  0xe62(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jb     11bd <escreveCategoria+0xad>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
jmp    11c9 <escreveCategoria+0xb9>
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
jmp    11ce <escreveCategoria+0xbe>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<escreveCategoria>:
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0xee2(%rip),%rdi
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm1
movss  0xebf(%rip),%xmm0
ucomiss %xmm1,%xmm0
jae    1161 <escreveCategoria+0x41>
movss  0xebe(%rip),%xmm0
ucomiss %xmm1,%xmm0
lea    0xec4(%rip),%rax
lea    0xec6(%rip),%rdi
jmp    118c <escreveCategoria+0x6c>
ucomiss 0xe9c(%rip),%xmm1
jae    1177 <escreveCategoria+0x57>
lea    0xebc(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
ucomiss 0xe8a(%rip),%xmm1
lea    0xeae(%rip),%rax
lea    0xeae(%rip),%rdi
cmovb  %rax,%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Categoria: \00"
@.str.1 = [17 x i8] c"Excesso de peso\0A\00"
@.str.2 = [8 x i8] c"Normal\0A\00"
@.str.3 = [7 x i8] c"Magro\0A\00"
@.str.4 = [9 x i8] c"Obeso I\0A\00"
@.str.5 = [10 x i8] c"Obeso II\0A\00"
define void @escreveCategoria(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load float, float* %2
%5 = fcmp ole float %4, 3.000000e+01
br i1 %5, label %6, label %20
6: ; preds = %1
%7 = load float, float* %2
%8 = fcmp oge float %7, 1.900000e+01
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = load float, float* %2
%11 = fcmp oge float %10, 2.500000e+01
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %16
14: ; preds = %9
%15 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
br label %19
17: ; preds = %6
%18 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %19
19: ; preds = %17, %16
br label %28
20: ; preds = %1
%21 = load float, float* %2
%22 = fcmp ole float %21, 4.000000e+01
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
br label %27
25: ; preds = %20
%26 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
br label %27
27: ; preds = %25, %23
br label %28
28: ; preds = %27, %19
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Categoria: \00"
@str = [9 x i8] c"Obeso II\00"
@str.6 = [8 x i8] c"Obeso I\00"
@str.7 = [6 x i8] c"Magro\00"
@str.8 = [7 x i8] c"Normal\00"
@str.9 = [16 x i8] c"Excesso de peso\00"
define void @escreveCategoria(float %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = fcmp ugt float %0, 3.000000e+01
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = fcmp ult float %0, 1.900000e+01
br i1 %5, label %12, label %6
6: ; preds = %4
%7 = fcmp ult float %0, 2.500000e+01
%8 = select i1 %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.8, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.9, i64 0, i64 0)
br label %12
9: ; preds = %1
%10 = fcmp ugt float %0, 4.000000e+01
%11 = select i1 %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.6, i64 0, i64 0)
br label %12
12: ; preds = %9, %4, %6
%13 = phi i8* [ %8, %6 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.7, i64 0, i64 0), %4 ], [ %11, %9 ]
%14 = tail call i32 @puts(i8* dereferenceable(1) %13)
ret void
}