#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 *, int *);
int main() {
  int idade;
  printf("Informe uma idade: \n");
  scanf("%i", &idade);
  if (idade <= 5)
    printf("Bebe\n");
  else if (idade > 5 && idade <= 10)
    printf("Criança\n");
  else if (idade > 10 && idade <= 15)
    printf("Adolescente\n");
  else if (idade > 15 && idade <= 18)
    printf("Jovem\n");
  else if (idade > 18 && idade <= 30)
    printf("Adulto\n");
  else
    printf("Velho\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x5,-0x8(%rbp)
jg     1166 <main+0x46>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
jmp    121a <main+0xfa>
cmpl   $0x5,-0x8(%rbp)
jle    118b <main+0x6b>
cmpl   $0xa,-0x8(%rbp)
jg     118b <main+0x6b>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
jmp    1215 <main+0xf5>
cmpl   $0xa,-0x8(%rbp)
jle    11b0 <main+0x90>
cmpl   $0xf,-0x8(%rbp)
jg     11b0 <main+0x90>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
jmp    1210 <main+0xf0>
cmpl   $0xf,-0x8(%rbp)
jle    11d5 <main+0xb5>
cmpl   $0x12,-0x8(%rbp)
jg     11d5 <main+0xb5>
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
jmp    120b <main+0xeb>
cmpl   $0x12,-0x8(%rbp)
jle    11fa <main+0xda>
cmpl   $0x1e,-0x8(%rbp)
jg     11fa <main+0xda>
lea    0xe4c(%rip),%rdi
call   1030 <printf@plt>
jmp    1206 <main+0xe6>
lea    0xe43(%rip),%rdi
call   1030 <printf@plt>
jmp    120b <main+0xeb>
jmp    1210 <main+0xf0>
jmp    1215 <main+0xf5>
jmp    121a <main+0xfa>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x6,%eax
jge    1150 <main+0x30>
lea    0xef1(%rip),%rdi
jmp    118f <main+0x6f>
cmp    $0xb,%eax
jae    115e <main+0x3e>
lea    0xeda(%rip),%rdi
jmp    118f <main+0x6f>
cmp    $0x10,%eax
jae    116c <main+0x4c>
lea    0xec0(%rip),%rdi
jmp    118f <main+0x6f>
cmp    $0x13,%eax
jae    117a <main+0x5a>
lea    0xeac(%rip),%rdi
jmp    118f <main+0x6f>
cmp    $0x1f,%eax
lea    0xe99(%rip),%rax
lea    0xe8c(%rip),%rdi
cmovb  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Informe uma idade: \0A\00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [6 x i8] c"Bebe\0A\00"
@.str.3 = [10 x i8] c"Crian\C3\A7a\0A\00"
@.str.4 = [13 x i8] c"Adolescente\0A\00"
@.str.5 = [7 x i8] c"Jovem\0A\00"
@.str.6 = [8 x i8] c"Adulto\0A\00"
@.str.7 = [7 x i8] c"Velho\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 5
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %47
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 5
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp sle i32 %13, 10
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %46
17: ; preds = %12, %9
%18 = load i32, i32* %2
%19 = icmp sgt i32 %18, 10
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp sle i32 %21, 15
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
br label %45
25: ; preds = %20, %17
%26 = load i32, i32* %2
%27 = icmp sgt i32 %26, 15
br i1 %27, label %28, label %33
28: ; preds = %25
%29 = load i32, i32* %2
%30 = icmp sle i32 %29, 18
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %44
33: ; preds = %28, %25
%34 = load i32, i32* %2
%35 = icmp sgt i32 %34, 18
br i1 %35, label %36, label %41
36: ; preds = %33
%37 = load i32, i32* %2
%38 = icmp sle i32 %37, 30
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %43
41: ; preds = %36, %33
%42 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %43
43: ; preds = %41, %39
br label %44
44: ; preds = %43, %31
br label %45
45: ; preds = %44, %23
br label %46
46: ; preds = %45, %15
br label %47
47: ; preds = %46, %7
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%i\00"
@str = [20 x i8] c"Informe uma idade: \00"
@str.8 = [6 x i8] c"Velho\00"
@str.9 = [7 x i8] c"Adulto\00"
@str.10 = [6 x i8] c"Jovem\00"
@str.11 = [12 x i8] c"Adolescente\00"
@str.12 = [9 x i8] c"Crian\C3\A7a\00"
@str.13 = [5 x i8] c"Bebe\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 6
br i1 %6, label %16, label %7
7: ; preds = %0
%8 = icmp ult i32 %5, 11
br i1 %8, label %16, label %9
9: ; preds = %7
%10 = icmp ult i32 %5, 16
br i1 %10, label %16, label %11
11: ; preds = %9
%12 = icmp ult i32 %5, 19
br i1 %12, label %16, label %13
13: ; preds = %11
%14 = icmp ult i32 %5, 31
%15 = select i1 %14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.9, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.8, i64 0, i64 0)
br label %16
16: ; preds = %13, %11, %9, %7, %0
%17 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @str.13, i64 0, i64 0), %0 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @str.12, i64 0, i64 0), %7 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @str.11, i64 0, i64 0), %9 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.10, i64 0, i64 0), %11 ], [ %15, %13 ]
%18 = call i32 @puts(i8* dereferenceable(1) %17)
ret i32 0
}