#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("\Entre com a idade:");
  scanf("%d", &idade);
  if (idade < 16) {
    printf("\n Voce nao pode votar");
  } else if (idade < 18 || idade > 70) {
    printf("\n Voto facultativo!");
  } else {
    printf("\n Voto Obrigatorio!");
  }
  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    0xed1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x10,-0x8(%rbp)
jge    1166 <main+0x46>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    119c <main+0x7c>
cmpl   $0x12,-0x8(%rbp)
jl     117a <main+0x5a>
cmpl   $0x46,-0x8(%rbp)
jle    118b <main+0x6b>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
jmp    1197 <main+0x77>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    119c <main+0x7c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
lea    -0x47(%rax),%ecx
cmp    $0xffffffcb,%ecx
lea    0xedd(%rip),%rcx
lea    0xeea(%rip),%rdx
cmovb  %rcx,%rdx
cmp    $0x10,%eax
lea    0xeb2(%rip),%rdi
cmovge %rdx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"\1Bntre com a idade:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"\0A Voce nao pode votar\00"
@.str.3 = [20 x i8] c"\0A Voto facultativo!\00"
@.str.4 = [20 x i8] c"\0A Voto Obrigatorio!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 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 slt i32 %5, 16
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
br label %20
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 18
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp sgt i32 %13, 70
br i1 %14, label %15, label %17
15: ; preds = %12, %9
%16 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
br label %19
17: ; preds = %12
%18 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
br label %20
20: ; preds = %19, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"\1Bntre com a idade:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"\0A Voce nao pode votar\00"
@.str.3 = [20 x i8] c"\0A Voto facultativo!\00"
@.str.4 = [20 x i8] c"\0A Voto Obrigatorio!\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 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, 16
%7 = add nsw i32 %5, -71
%8 = icmp ult i32 %7, -53
%9 = select i1 %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0)
%10 = select i1 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %9
%11 = call i32 @printf(i8* dereferenceable(1) %10)
ret i32 0
}