#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("\nIdade:\n");
  scanf("%d", &idade);
  if (idade < 16) {
    printf("\nVoce nao pode votar\n");
  } else if (idade == 16 || idade == 17 || idade > 70) {
    printf("\nVoto facultativo\n");
  } else {
    printf("\nVoto obrigatorio\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    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x10,-0x8(%rbp)
jge    1166 <main+0x46>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
jmp    11a6 <main+0x86>
cmpl   $0x10,-0x8(%rbp)
je     1184 <main+0x64>
cmpl   $0x11,-0x8(%rbp)
je     1184 <main+0x64>
cmpl   $0x46,-0x8(%rbp)
jle    1195 <main+0x75>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
jmp    11a1 <main+0x81>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
jmp    11a6 <main+0x86>
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    $0x10,%eax
jge    1150 <main+0x30>
lea    0xee1(%rip),%rdi
jmp    1171 <main+0x51>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
cmp    $0x10,%ecx
lea    0xebe(%rip),%rcx
lea    0xea5(%rip),%rdi
cmove  %rcx,%rdi
cmp    $0x47,%eax
cmovae %rcx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"\0AIdade:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"\0AVoce nao pode votar\0A\00"
@.str.3 = [19 x i8] c"\0AVoto facultativo\0A\00"
@.str.4 = [19 x i8] c"\0AVoto obrigatorio\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 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 %23
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 16
br i1 %11, label %18, label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 17
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 ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
br label %22
20: ; preds = %15
%21 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
br label %22
22: ; preds = %20, %18
br label %23
23: ; preds = %22, %7
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [8 x i8] c"\0AIdade:\00"
@str.5 = [18 x i8] c"\0AVoto obrigatorio\00"
@str.6 = [18 x i8] c"\0AVoto facultativo\00"
@str.7 = [21 x i8] c"\0AVoce nao pode votar\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 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 %13, label %7
7: ; preds = %0
%8 = and i32 %5, -2
%9 = icmp eq i32 %8, 16
%10 = icmp ugt i32 %5, 70
%11 = or i1 %10, %9
%12 = select i1 %11, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.6, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.5, i64 0, i64 0)
br label %13
13: ; preds = %7, %0
%14 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.7, i64 0, i64 0), %0 ], [ %12, %7 ]
%15 = call i32 @puts(i8* dereferenceable(1) %14)
ret i32 0
}