#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("Insira sua idade:");
  scanf("%d", &idade);
  if (idade >= 18 && idade <= 70) {
    printf("Você é obrigado a votar!");
  }
  if (idade < 16) {
    printf("Você não pode votar!");
  }
  if (idade == 16 || idade == 17 || idade > 70) {
    printf("Você pode votar se quiser!");
  }
  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   $0x12,-0x8(%rbp)
jl     116b <main+0x4b>
cmpl   $0x46,-0x8(%rbp)
jg     116b <main+0x4b>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x10,-0x8(%rbp)
jge    1181 <main+0x61>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x10,-0x8(%rbp)
je     119f <main+0x7f>
cmpl   $0x11,-0x8(%rbp)
je     119f <main+0x7f>
cmpl   $0x46,-0x8(%rbp)
jle    11ab <main+0x8b>
lea    0xea1(%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    0xede(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
lea    -0x12(%rax),%ecx
cmp    $0x34,%ecx
jbe    1156 <main+0x36>
cmp    $0xf,%eax
jle    116b <main+0x4b>
cmp    $0x46,%eax
jle    1180 <main+0x60>
jmp    1188 <main+0x68>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0xf,%eax
jg     114f <main+0x2f>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x46,%eax
jg     1188 <main+0x68>
and    $0xfffffffe,%eax
cmp    $0x10,%eax
jne    1194 <main+0x74>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Insira sua idade:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"Voc\C3\AA \C3\A9 obrigado a votar!\00"
@.str.3 = [23 x i8] c"Voc\C3\AA n\C3\A3o pode votar!\00"
@.str.4 = [28 x i8] c"Voc\C3\AA pode votar se quiser!\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 sge i32 %5, 18
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 70
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %12
12: ; preds = %10, %7, %0
%13 = load i32, i32* %2
%14 = icmp slt i32 %13, 16
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
br label %17
17: ; preds = %15, %12
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 16
br i1 %19, label %26, label %20
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp eq i32 %21, 17
br i1 %22, label %26, label %23
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp sgt i32 %24, 70
br i1 %25, label %26, label %28
26: ; preds = %23, %20, %17
%27 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
br label %28
28: ; preds = %26, %23
ret i32 0
}

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