#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;
  scanf("%d", &idade);
  if (idade < 16)
    printf("nao eleitor\n");
  else if ((idade >= 16 && idade < 18) || idade > 65)
    printf("eleitor facultativo\n");
  else
    printf("eleitor 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
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x10,-0x8(%rbp)
jge    115a <main+0x3a>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    119a <main+0x7a>
cmpl   $0x10,-0x8(%rbp)
jl     116e <main+0x4e>
cmpl   $0x12,-0x8(%rbp)
jl     1178 <main+0x58>
cmpl   $0x41,-0x8(%rbp)
jle    1189 <main+0x69>
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
jmp    1195 <main+0x75>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
jmp    119a <main+0x7a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
lea    -0x42(%rax),%ecx
cmp    $0xffffffd0,%ecx
lea    0xed4(%rip),%rcx
lea    0xeb9(%rip),%rdx
cmovb  %rcx,%rdx
cmp    $0x10,%eax
lea    0xed3(%rip),%rdi
cmovge %rdx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [13 x i8] c"nao eleitor\0A\00"
@.str.2 = [21 x i8] c"eleitor facultativo\0A\00"
@.str.3 = [21 x i8] c"eleitor obrigatorio\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 16
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %22
8: ; preds = %0
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 16
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp slt i32 %12, 18
br i1 %13, label %17, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp sgt i32 %15, 65
br i1 %16, label %17, label %19
17: ; preds = %14, %11
%18 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %21
19: ; preds = %14
%20 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %21
21: ; preds = %19, %17
br label %22
22: ; preds = %21, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [20 x i8] c"eleitor obrigatorio\00"
@str.4 = [20 x i8] c"eleitor facultativo\00"
@str.5 = [12 x i8] c"nao eleitor\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 16
%6 = add nsw i32 %4, -66
%7 = icmp ult i32 %6, -48
%8 = select i1 %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0)
%9 = select i1 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.5, i64 0, i64 0), i8* %8
%10 = call i32 @puts(i8* dereferenceable(1) %9)
ret i32 0
}