#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 main() {
  int voto;
  char cont;
  do {
    printf("Dilma 1 || Aécio 2\n");
    scanf("%d", &voto);
    if (voto == 1) {
      printf("Dilma\n");
    }
    if (voto == 2) {
      printf("Aecio\n");
    }
    if (voto != 1 && voto != 2) {
      printf("Erro\n");
    }
    printf("Você tem certeza de seu voto?(s/n)");
    scanf(" %c", &cont);
  } while (cont == 's' || cont == 'S');
  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    0xed3(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    1163 <main+0x43>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x2,-0x8(%rbp)
jne    1179 <main+0x59>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
je     1199 <main+0x79>
cmpl   $0x2,-0x8(%rbp)
je     1199 <main+0x79>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
lea    0xea4(%rip),%rdi
lea    -0x9(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x9(%rbp),%ecx
mov    $0x1,%al
cmp    $0x73,%ecx
mov    %al,-0xa(%rbp)
je     11d6 <main+0xb6>
movsbl -0x9(%rbp),%eax
cmp    $0x53,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
test   $0x1,%al
jne    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xee9(%rip),%r14
lea    0xeb7(%rip),%r15
lea    0x4(%rsp),%rbx
lea    0xeae(%rip),%r12
lea    0xecb(%rip),%r13
lea    0x3(%rsp),%rbp
jmp    1190 <main+0x60>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r12,%rdi
call   1040 <printf@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movzbl 0x3(%rsp),%eax
and    $0xdf,%al
cmp    $0x53,%al
jne    11e9 <main+0xb9>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x1,%eax
jne    11be <main+0x8e>
lea    0xe95(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
cmp    $0x2,%eax
jne    11d3 <main+0xa3>
lea    0xe7a(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
add    $0xfffffffd,%eax
cmp    $0xfffffffd,%eax
ja     1170 <main+0x40>
lea    0xe5d(%rip),%rdi
call   1030 <puts@plt>
jmp    1170 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Dilma 1 || A\C3\A9cio 2\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [7 x i8] c"Dilma\0A\00"
@.str.3 = [7 x i8] c"Aecio\0A\00"
@.str.4 = [6 x i8] c"Erro\0A\00"
@.str.5 = [36 x i8] c"Voc\C3\AA tem certeza de seu voto?(s/n)\00"
@.str.6 = [4 x i8] c" %c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
store i32 0, i32* %1
br label %4
4: ; preds = %35, %0
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %4
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 2
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %16
16: ; preds = %14, %11
%17 = load i32, i32* %2
%18 = icmp ne i32 %17, 1
br i1 %18, label %19, label %24
19: ; preds = %16
%20 = load i32, i32* %2
%21 = icmp ne i32 %20, 2
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %24
24: ; preds = %22, %19, %16
%25 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %3)
br label %27
27: ; preds = %24
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 115
br i1 %30, label %35, label %31
31: ; preds = %27
%32 = load i8, i8* %3
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 83
br label %35
35: ; preds = %31, %27
%36 = phi i1 [ true, %27 ], [ %34, %31 ]
br i1 %36, label %4, label %37
37: ; preds = %35
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.5 = [36 x i8] c"Voc\C3\AA tem certeza de seu voto?(s/n)\00"
@.str.6 = [4 x i8] c" %c\00"
@str = [20 x i8] c"Dilma 1 || A\C3\A9cio 2\00"
@str.7 = [5 x i8] c"Erro\00"
@str.8 = [6 x i8] c"Aecio\00"
@str.9 = [6 x i8] c"Dilma\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = bitcast i32* %1 to i8*
br label %4
4: ; preds = %24, %0
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.9, i64 0, i64 0))
%11 = load i32, i32* %1
br label %12
12: ; preds = %9, %4
%13 = phi i32 [ %11, %9 ], [ %7, %4 ]
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.8, i64 0, i64 0))
%17 = load i32, i32* %1
br label %18
18: ; preds = %15, %12
%19 = phi i32 [ %17, %15 ], [ %13, %12 ]
%20 = add i32 %19, -3
%21 = icmp ult i32 %20, -2
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.7, i64 0, i64 0))
br label %24
24: ; preds = %22, %18
%25 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %2)
%27 = load i8, i8* %2
%28 = and i8 %27, -33
%29 = icmp eq i8 %28, 83
br i1 %29, label %4, label %30
30: ; preds = %24
ret i32 0
}