#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("\nDiga sua idade:");
  scanf("%d", &idade);
  if (idade <= 15) {
    printf("\nNao pode votar\n");
  } else if (idade == 16 || idade == 17 || idade > 70) {
    printf("\nVoto FACULTATIVO");
  } else {
    printf("\nObrigado a 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    0xecf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0xf,-0x8(%rbp)
jg     1166 <main+0x46>
lea    0xeb8(%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    0xe9a(%rip),%rdi
call   1030 <printf@plt>
jmp    11a1 <main+0x81>
lea    0xe9b(%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    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0xf,%eax
jg     1165 <main+0x35>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
jmp    1187 <main+0x57>
cmp    $0x46,%eax
ja     117b <main+0x4b>
and    $0xfffffffe,%eax
cmp    $0x10,%eax
je     117b <main+0x4b>
lea    0xead(%rip),%rdi
jmp    1182 <main+0x52>
lea    0xe92(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"\0ADiga sua idade:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [17 x i8] c"\0ANao pode votar\0A\00"
@.str.3 = [18 x i8] c"\0AVoto FACULTATIVO\00"
@.str.4 = [18 x i8] c"\0AObrigado a votar\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* 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* %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 ([18 x i8], [18 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 = [17 x i8] c"\0ADiga sua idade:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [18 x i8] c"\0AVoto FACULTATIVO\00"
@.str.4 = [18 x i8] c"\0AObrigado a votar\00"
@str = [16 x i8] c"\0ANao 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 ([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 %7, label %9
7: ; preds = %0
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %18
9: ; preds = %0
%10 = and i32 %5, -2
%11 = icmp eq i32 %10, 16
%12 = icmp ugt i32 %5, 70
%13 = or i1 %12, %11
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %18
16: ; preds = %9
%17 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
br label %18
18: ; preds = %14, %16, %7
ret i32 0
}