#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("diga sua idade");
  scanf("%d", &idade);
  if (idade < 16)
    printf("Você nao pode votar ainda.");
  if (idade == 17 || idade == 16 || idade > 70)
    printf("Voto Facultativo");
  if (idade >= 18 && idade <= 70)
    printf("Você pode votar");
  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    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x10,-0x8(%rbp)
jge    1161 <main+0x41>
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x11,-0x8(%rbp)
je     117f <main+0x5f>
cmpl   $0x10,-0x8(%rbp)
je     117f <main+0x5f>
cmpl   $0x46,-0x8(%rbp)
jle    118b <main+0x6b>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x12,-0x8(%rbp)
jl     11ab <main+0x8b>
cmpl   $0x46,-0x8(%rbp)
jg     11ab <main+0x8b>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
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    0xedb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0xf,%eax
jg     1157 <main+0x37>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x46,%eax
jg     1166 <main+0x46>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
cmp    $0x10,%ecx
jne    1176 <main+0x56>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffee,%eax
cmp    $0x34,%eax
ja     118a <main+0x6a>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"diga sua idade\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [28 x i8] c"Voc\C3\AA nao pode votar ainda.\00"
@.str.3 = [17 x i8] c"Voto Facultativo\00"
@.str.4 = [17 x i8] c"Voc\C3\AA pode votar\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 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 ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %7, %0
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 17
br i1 %11, label %18, label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 16
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp sgt i32 %16, 70
br i1 %17, label %18, label %20
18: ; preds = %15, %12, %9
%19 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %20
20: ; preds = %18, %15
%21 = load i32, i32* %2
%22 = icmp sge i32 %21, 18
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp sle i32 %24, 70
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
br label %28
28: ; preds = %26, %23, %20
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"diga sua idade\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [28 x i8] c"Voc\C3\AA nao pode votar ainda.\00"
@.str.3 = [17 x i8] c"Voto Facultativo\00"
@.str.4 = [17 x i8] c"Voc\C3\AA pode votar\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 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
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* %1
br label %10
10: ; preds = %7, %0
%11 = phi i32 [ %9, %7 ], [ %5, %0 ]
%12 = and i32 %11, -2
%13 = icmp eq i32 %12, 16
%14 = icmp sgt i32 %11, 70
%15 = or i1 %14, %13
br i1 %15, label %16, label %19
16: ; preds = %10
%17 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%18 = load i32, i32* %1
br label %19
19: ; preds = %10, %16
%20 = phi i32 [ %11, %10 ], [ %18, %16 ]
%21 = add i32 %20, -18
%22 = icmp ult i32 %21, 53
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
br label %25
25: ; preds = %23, %19
ret i32 0
}