#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("Digite sua idade\n");
  scanf("%d", &idade);
  if (idade <= 15) {
    printf("Não pode votar\n");
  } else if (idade == 16 || idade == 17 || idade > 70) {
    printf("Voto facultativo\n");
  } else {
    printf("Voto obrigatório\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    0xed0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0xf,-0x8(%rbp)
jg     1166 <main+0x46>
lea    0xeb9(%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    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    11a1 <main+0x81>
lea    0xe9c(%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    0xee9(%rip),%rdi
jmp    1171 <main+0x51>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
cmp    $0x10,%ecx
lea    0xec7(%rip),%rcx
lea    0xeae(%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 = [18 x i8] c"Digite sua idade\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [17 x i8] c"N\C3\A3o pode votar\0A\00"
@.str.3 = [18 x i8] c"Voto facultativo\0A\00"
@.str.4 = [19 x i8] c"Voto obrigat\C3\B3rio\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 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, 15
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 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 ([18 x i8], [18 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 = [17 x i8] c"Digite sua idade\00"
@str.5 = [18 x i8] c"Voto obrigat\C3\B3rio\00"
@str.6 = [17 x i8] c"Voto facultativo\00"
@str.7 = [16 x i8] c"N\C3\A3o 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 ([17 x i8], [17 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 ([17 x i8], [17 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 ([16 x i8], [16 x i8]* @str.7, i64 0, i64 0), %0 ], [ %12, %7 ]
%15 = call i32 @puts(i8* dereferenceable(1) %14)
ret i32 0
}