#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("qual sua iadade: ");
  scanf("%i", &idade);
  if (idade >= 16 && idade <= 17) {
    printf("\n você pode votar, se quiser");
  }
  if (idade <= 15) {
    printf("\nvocê não pode votar");
  }
  if (idade >= 18 && idade <= 70) {
    printf("\nvocê é obrigado a votar");
  }
  if (idade >= 71) {
    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   $0x10,-0x8(%rbp)
jl     116b <main+0x4b>
cmpl   $0x11,-0x8(%rbp)
jg     116b <main+0x4b>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0xf,-0x8(%rbp)
jg     1181 <main+0x61>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x12,-0x8(%rbp)
jl     11a1 <main+0x81>
cmpl   $0x46,-0x8(%rbp)
jg     11a1 <main+0x81>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x47,-0x8(%rbp)
jl     11b7 <main+0x97>
lea    0xe65(%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
mov    %eax,%ecx
and    $0xfffffffe,%ecx
cmp    $0x10,%ecx
jne    115c <main+0x3c>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0xf,%eax
jg     1171 <main+0x51>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
lea    -0x12(%rax),%ecx
cmp    $0x34,%ecx
ja     1189 <main+0x69>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x47,%eax
jl     119a <main+0x7a>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [18 x i8] c"qual sua iadade: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [30 x i8] c"\0A voc\C3\AA pode votar, se quiser\00"
@.str.3 = [23 x i8] c"\0Avoc\C3\AA n\C3\A3o pode votar\00"
@.str.4 = [27 x i8] c"\0Avoc\C3\AA \C3\A9 obrigado a votar\00"
@.str.5 = [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 = and i32 %5, -2
%7 = icmp eq i32 %6, 16
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 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 = add i32 %18, -18
%20 = icmp ult i32 %19, 53
br i1 %20, label %21, label %24
21: ; preds = %17
%22 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%23 = load i32, i32* %1
br label %24
24: ; preds = %21, %17
%25 = phi i32 [ %23, %21 ], [ %18, %17 ]
%26 = icmp sgt i32 %25, 70
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
br label %29
29: ; preds = %27, %24
ret i32 0
}