#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(void) {
  int idade;
  printf("Favor informar idade:\n");
  scanf("%i", &idade);
  if (idade <= 9) {
    printf("Você é um bebe\n");
  } else if (idade >= 10 && idade <= 18) {
    printf("Você é um jovem\n");
  } else if (idade > 18 && idade <= 99) {
    printf("A cerveja está liberada\n");
  } else {
    printf("Insira a idade corretamente!!!\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    0xed5(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x9,-0x8(%rbp)
jg     1166 <main+0x46>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
jmp    11c6 <main+0xa6>
cmpl   $0xa,-0x8(%rbp)
jl     118b <main+0x6b>
cmpl   $0x12,-0x8(%rbp)
jg     118b <main+0x6b>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
jmp    11c1 <main+0xa1>
cmpl   $0x12,-0x8(%rbp)
jle    11b0 <main+0x90>
cmpl   $0x63,-0x8(%rbp)
jg     11b0 <main+0x90>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
jmp    11bc <main+0x9c>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
jmp    11c1 <main+0xa1>
jmp    11c6 <main+0xa6>
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    $0xa,%eax
jge    1150 <main+0x30>
lea    0xf15(%rip),%rdi
jmp    1173 <main+0x53>
cmp    $0x13,%eax
jae    115e <main+0x3e>
lea    0xef5(%rip),%rdi
jmp    1173 <main+0x53>
cmp    $0x64,%eax
lea    0xed0(%rip),%rax
lea    0xeaa(%rip),%rdi
cmovb  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Favor informar idade:\0A\00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [18 x i8] c"Voc\C3\AA \C3\A9 um bebe\0A\00"
@.str.3 = [19 x i8] c"Voc\C3\AA \C3\A9 um jovem\0A\00"
@.str.4 = [26 x i8] c"A cerveja est\C3\A1 liberada\0A\00"
@.str.5 = [32 x i8] c"Insira a idade corretamente!!!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 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, 9
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
br label %29
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp sge i32 %10, 10
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp sle i32 %13, 18
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
br label %28
17: ; preds = %12, %9
%18 = load i32, i32* %2
%19 = icmp sgt i32 %18, 18
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp sle i32 %21, 99
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %27
25: ; preds = %20, %17
%26 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0))
br label %27
27: ; preds = %25, %23
br label %28
28: ; preds = %27, %15
br label %29
29: ; preds = %28, %7
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%i\00"
@str = [22 x i8] c"Favor informar idade:\00"
@str.6 = [31 x i8] c"Insira a idade corretamente!!!\00"
@str.7 = [25 x i8] c"A cerveja est\C3\A1 liberada\00"
@str.8 = [18 x i8] c"Voc\C3\AA \C3\A9 um jovem\00"
@str.9 = [17 x i8] c"Voc\C3\AA \C3\A9 um bebe\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 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, 10
br i1 %6, label %12, label %7
7: ; preds = %0
%8 = icmp ult i32 %5, 19
br i1 %8, label %12, label %9
9: ; preds = %7
%10 = icmp ult i32 %5, 100
%11 = select i1 %10, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @str.7, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @str.6, i64 0, i64 0)
br label %12
12: ; preds = %9, %7, %0
%13 = phi i8* [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.9, i64 0, i64 0), %0 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.8, i64 0, i64 0), %7 ], [ %11, %9 ]
%14 = call i32 @puts(i8* dereferenceable(1) %13)
ret i32 0
}