#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int candidate[30][3];
  int candidateTotalVote[3] = {0, 0, 0};
  int totalVoteNull = 0;
  int totalVoteWhite = 0;
  int i, j;
  int people;
  int totalVote;
  int maxVote;
  int candidateMaxVote;
  float porcentVoteNull;
  float porcentVoteWhite;
  printf("Please, insert the total people to vote (max 30 peoples): ");
  scanf("%d", &people);
  if (people > 30) {
    printf("-----MAX PEOPLE EXCEDED----- \n");
    exit(0);
  }
  printf("\n---------------------------------\n");
  printf("Here, you can vote, using: \n ");
  printf("* 1 = Vote in actual candidate; \n ");
  printf("* 0 = Not vote in candidate actual; \n ");
  printf("* 5 = Vote null \n ");
  printf("* 6 = Vote white \n ");
  printf("\n---------------------------------\n");
  for (i = 1; i <= people; i++) {
    for (j = 0; j <= 3; j++) {
      printf("Please, do you want vote in candidate %d? \n", j + 1);
      scanf("%d", &candidate[people][j]);
      if (candidate[people][j] == 1) {
        candidateTotalVote[j] = candidateTotalVote[j] + 1;
        totalVote = totalVote + 1;
      }
      if (candidate[people][j] == 5) {
        totalVoteNull = totalVoteNull + 1;
      }
      if (candidate[people][j] == 6) {
        totalVoteWhite = totalVoteWhite + 1;
      }
      if ((j == 3) && (people != i)) {
        printf("\n--------Next people--------\n");
      }
    }
  }
  printf("\n---------------------------------\n");
  printf("Candidates: \n");
  for (j = 0; j <= 3; j++) {
    printf("* Candidate %d; Total Vote: %d \n", (j + 1), candidateTotalVote[j]);
  }
  for (i = 0; i <= 3; i++) {
    if (candidateTotalVote[i] > maxVote) {
      maxVote = candidateTotalVote[i];
      candidateMaxVote = (i + 1);
    }
  }
  porcentVoteWhite =
      (totalVoteWhite > 0) ? (totalVote / totalVoteWhite) * 100 : 0;
  porcentVoteNull = (totalVoteNull > 0) ? (totalVote / totalVoteNull) * 100 : 0;
  if (candidateMaxVote != 0)
    printf("\nCandidate with the most votes: %d; Total votes: %d",
           candidateMaxVote, maxVote);
  printf("\nTotal of votes white: %d; Porcent: %.2f \n", totalVoteWhite,
         porcentVoteWhite);
  printf("\nTotal of votes null: %d; Porcent: %.2f \n", totalVoteNull,
         porcentVoteNull);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x17c(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1040 <memset@plt>
movl   $0x0,-0x180(%rbp)
movl   $0x0,-0x184(%rbp)
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1029(%rip),%rdi
lea    -0x190(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x1e,-0x190(%rbp)
jle    11bc <main+0x7c>
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x188(%rbp)
mov    -0x188(%rbp),%eax
cmp    -0x190(%rbp),%eax
jg     13b4 <main+0x274>
movl   $0x0,-0x18c(%rbp)
cmpl   $0x3,-0x18c(%rbp)
jg     139b <main+0x25b>
mov    -0x18c(%rbp),%esi
add    $0x1,%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x190(%rbp),%rax
lea    -0x170(%rbp),%rsi
imul   $0xc,%rax,%rax
add    %rax,%rsi
movslq -0x18c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xf25(%rip),%rdi
call   1050 <scanf@plt>
movslq -0x190(%rbp),%rcx
lea    -0x170(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x18c(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    12eb <main+0x1ab>
movslq -0x18c(%rbp),%rax
mov    -0x17c(%rbp,%rax,4),%ecx
add    $0x1,%ecx
movslq -0x18c(%rbp),%rax
mov    %ecx,-0x17c(%rbp,%rax,4)
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
movslq -0x190(%rbp),%rcx
lea    -0x170(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x18c(%rbp),%rcx
cmpl   $0x5,(%rax,%rcx,4)
jne    1320 <main+0x1e0>
mov    -0x180(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x180(%rbp)
movslq -0x190(%rbp),%rcx
lea    -0x170(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x18c(%rbp),%rcx
cmpl   $0x6,(%rax,%rcx,4)
jne    1355 <main+0x215>
mov    -0x184(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x184(%rbp)
cmpl   $0x3,-0x18c(%rbp)
jne    1382 <main+0x242>
mov    -0x190(%rbp),%eax
cmp    -0x188(%rbp),%eax
je     1382 <main+0x242>
lea    0xdbe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1387 <main+0x247>
mov    -0x18c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18c(%rbp)
jmp    1244 <main+0x104>
jmp    13a0 <main+0x260>
mov    -0x188(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x188(%rbp)
jmp    1228 <main+0xe8>
lea    0xc9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18c(%rbp)
cmpl   $0x3,-0x18c(%rbp)
jg     1420 <main+0x2e0>
mov    -0x18c(%rbp),%esi
add    $0x1,%esi
movslq -0x18c(%rbp),%rax
mov    -0x17c(%rbp,%rax,4),%edx
lea    0xd60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18c(%rbp)
jmp    13da <main+0x29a>
movl   $0x0,-0x188(%rbp)
cmpl   $0x3,-0x188(%rbp)
jg     148d <main+0x34d>
movslq -0x188(%rbp),%rax
mov    -0x17c(%rbp,%rax,4),%eax
cmp    -0x198(%rbp),%eax
jle    1474 <main+0x334>
movslq -0x188(%rbp),%rax
mov    -0x17c(%rbp,%rax,4),%eax
mov    %eax,-0x198(%rbp)
mov    -0x188(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x19c(%rbp)
jmp    1479 <main+0x339>
mov    -0x188(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x188(%rbp)
jmp    142a <main+0x2ea>
cmpl   $0x0,-0x184(%rbp)
jle    14b5 <main+0x375>
mov    -0x194(%rbp),%eax
cltd
idivl  -0x184(%rbp)
imul   $0x64,%eax,%eax
mov    %eax,-0x1a8(%rbp)
jmp    14c2 <main+0x382>
xor    %eax,%eax
mov    %eax,-0x1a8(%rbp)
jmp    14c2 <main+0x382>
mov    -0x1a8(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x1a4(%rbp)
ff
cmpl   $0x0,-0x180(%rbp)
jle    14fc <main+0x3bc>
mov    -0x194(%rbp),%eax
cltd
idivl  -0x180(%rbp)
imul   $0x64,%eax,%eax
mov    %eax,-0x1ac(%rbp)
jmp    1509 <main+0x3c9>
xor    %eax,%eax
mov    %eax,-0x1ac(%rbp)
jmp    1509 <main+0x3c9>
mov    -0x1ac(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x1a0(%rbp)
ff
cmpl   $0x0,-0x19c(%rbp)
je     1542 <main+0x402>
mov    -0x19c(%rbp),%esi
mov    -0x198(%rbp),%edx
lea    0xc4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x184(%rbp),%esi
movss  -0x1a4(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xc5f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x180(%rbp),%esi
movss  -0x1a0(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xc6a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x198,%rsp
lea    0xea8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfe2(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
cmpl   $0x1f,(%rsp)
jge    151d <main+0x3dd>
lea    0x1021(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xead(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeeb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
cmpl   $0x0,(%rsp)
jle    1405 <main+0x2c5>
mov    $0x1,%eax
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
xor    %r14d,%r14d
xor    %r15d,%r15d
xor    %r12d,%r12d
jmp    123d <main+0xfd>
nop
mov    0x28(%rsp),%ecx
add    %ecx,0xc(%rsp)
mov    0x24(%rsp),%ecx
add    %ecx,0x8(%rsp)
mov    0x2c(%rsp),%ecx
add    %r14d,%ecx
mov    %ecx,%r14d
mov    %r8b,%r13b
mov    0x18(%rsp),%ecx
add    %r13d,%ecx
mov    %ecx,%r13d
mov    %dil,%bpl
add    %ebp,%r15d
mov    %al,%bl
add    %ebx,%r12d
cmp    %esi,%edx
lea    0x1(%rdx),%eax
jge    141e <main+0x2de>
mov    %rax,0x10(%rsp)
mov    %r14d,0x2c(%rsp)
lea    0xe7c(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movslq (%rsp),%rax
lea    (%rax,%rax,2),%rax
lea    (%rsp,%rax,4),%rsi
add    $0x30,%rsi
lea    0xed4(%rip),%rdi
call   1050 <scanf@plt>
movslq (%rsp),%rax
lea    (%rax,%rax,2),%rax
mov    0x30(%rsp,%rax,4),%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,0x28(%rsp)
add    %ecx,%r13d
xor    %ebx,%ebx
cmp    $0x5,%eax
sete   %bl
add    %r15d,%ebx
xor    %ebp,%ebp
cmp    $0x6,%eax
sete   %bpl
add    %r12d,%ebp
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movslq (%rsp),%rax
lea    (%rax,%rax,2),%rax
lea    (%rsp,%rax,4),%rsi
add    $0x34,%rsi
lea    0xe77(%rip),%r15
mov    %r15,%rdi
call   1050 <scanf@plt>
movslq (%rsp),%rax
lea    (%rax,%rax,2),%rax
mov    0x34(%rsp,%rax,4),%eax
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,0x24(%rsp)
add    %ecx,%r13d
xor    %r12d,%r12d
cmp    $0x5,%eax
sete   %r12b
add    %ebx,%r12d
xor    %ebx,%ebx
cmp    $0x6,%eax
sete   %bl
add    %ebp,%ebx
mov    %r14,%rdi
mov    %r14,%rbp
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movslq (%rsp),%rax
lea    (%rax,%rax,2),%rax
lea    (%rsp,%rax,4),%rsi
add    $0x38,%rsi
mov    %r15,%rdi
call   1050 <scanf@plt>
movslq (%rsp),%rax
lea    (%rax,%rax,2),%rax
mov    0x38(%rsp,%rax,4),%eax
xor    %r14d,%r14d
cmp    $0x1,%eax
sete   %r14b
add    %r14d,%r13d
mov    %r13d,0x18(%rsp)
xor    %r15d,%r15d
cmp    $0x5,%eax
sete   %r15b
add    %r12d,%r15d
xor    %r12d,%r12d
cmp    $0x6,%eax
sete   %r12b
add    %ebx,%r12d
mov    %rbp,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movslq (%rsp),%rax
lea    (%rax,%rax,2),%rax
lea    (%rsp,%rax,4),%rsi
add    $0x3c,%rsi
lea    0xdb5(%rip),%rdi
call   1050 <scanf@plt>
mov    0x10(%rsp),%rdx
movslq (%rsp),%rcx
lea    (%rcx,%rcx,2),%rax
mov    0x3c(%rsp,%rax,4),%eax
xor    %r13d,%r13d
cmp    $0x1,%eax
sete   %r8b
xor    %ebp,%ebp
cmp    $0x5,%eax
sete   %dil
xor    %ebx,%ebx
cmp    $0x6,%eax
sete   %al
mov    %edx,%esi
cmp    %ecx,%edx
je     1200 <main+0xc0>
mov    %dil,0x6(%rsp)
lea    0xdf6(%rip),%rdi
mov    %al,0x7(%rsp)
mov    %r8b,0x5(%rsp)
call   1030 <puts@plt>
movzbl 0x5(%rsp),%r8d
movzbl 0x6(%rsp),%edi
movzbl 0x7(%rsp),%eax
mov    0x10(%rsp),%rdx
mov    (%rsp),%esi
jmp    1200 <main+0xc0>
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
xor    %r14d,%r14d
xor    %r12d,%r12d
xor    %r15d,%r15d
lea    0xd7b(%rip),%rdi
call   1030 <puts@plt>
lea    0xd92(%rip),%rdi
call   1030 <puts@plt>
lea    0xcb9(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    0xc(%rsp),%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    0x8(%rsp),%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xorps  %xmm1,%xmm1
xorps  %xmm0,%xmm0
test   %r12d,%r12d
jle    14a4 <main+0x364>
mov    %r13d,%eax
cltd
idiv   %r12d
imul   $0x64,%eax,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
test   %r15d,%r15d
jle    14c7 <main+0x387>
mov    %r13d,%eax
cltd
idiv   %r15d
imul   $0x64,%eax,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
lea    0xc43(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc69(%rip),%rdi
mov    %r12d,%esi
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xc7d(%rip),%rdi
mov    %r15d,%esi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x198,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xcc9(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"Please, insert the total people to vote (max 30 peoples): \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [31 x i8] c"-----MAX PEOPLE EXCEDED----- \0A\00"
@.str.3 = [36 x i8] c"\0A---------------------------------\0A\00"
@.str.4 = [30 x i8] c"Here, you can vote, using: \0A \00"
@.str.5 = [35 x i8] c"* 1 = Vote in actual candidate; \0A \00"
@.str.6 = [39 x i8] c"* 0 = Not vote in candidate actual; \0A \00"
@.str.7 = [19 x i8] c"* 5 = Vote null \0A \00"
@.str.8 = [20 x i8] c"* 6 = Vote white \0A \00"
@.str.9 = [44 x i8] c"Please, do you want vote in candidate %d? \0A\00"
@.str.10 = [30 x i8] c"\0A--------Next people--------\0A\00"
@.str.11 = [14 x i8] c"Candidates: \0A\00"
@.str.12 = [33 x i8] c"* Candidate %d; Total Vote: %d \0A\00"
@.str.13 = [52 x i8] c"\0ACandidate with the most votes: %d; Total votes: %d\00"
@.str.14 = [43 x i8] c"\0ATotal of votes white: %d; Porcent: %.2f \0A\00"
@.str.15 = [42 x i8] c"\0ATotal of votes null: %d; Porcent: %.2f \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [30 x [3 x i32]]
%3 = alloca [3 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca float
%13 = alloca float
store i32 0, i32* %1
%14 = bitcast [3 x i32]* %3 to i8*
store i32 0, i32* %4
store i32 0, i32* %5
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%17 = load i32, i32* %8
%18 = icmp sgt i32 %17, 30
br i1 %18, label %19, label %22
19: ; preds = %0
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 @exit(i32 0)
unreachable
22: ; preds = %0
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %6
br label %30
30: ; preds = %106, %22
%31 = load i32, i32* %6
%32 = load i32, i32* %8
%33 = icmp sle i32 %31, %32
br i1 %33, label %34, label %109
34: ; preds = %30
store i32 0, i32* %7
br label %35
35: ; preds = %102, %34
%36 = load i32, i32* %7
%37 = icmp sle i32 %36, 3
br i1 %37, label %38, label %105
38: ; preds = %35
%39 = load i32, i32* %7
%40 = add nsw i32 %39, 1
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), i32 %40)
%42 = load i32, i32* %8
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [30 x [3 x i32]], [30 x [3 x i32]]* %2, i64 0, i64 %43
%45 = load i32, i32* %7
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [3 x i32], [3 x i32]* %44, i64 0, i64 %46
%48 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %47)
%49 = load i32, i32* %8
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [30 x [3 x i32]], [30 x [3 x i32]]* %2, i64 0, i64 %50
%52 = load i32, i32* %7
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [3 x i32], [3 x i32]* %51, i64 0, i64 %53
%55 = load i32, i32* %54
%56 = icmp eq i32 %55, 1
br i1 %56, label %57, label %68
57: ; preds = %38
%58 = load i32, i32* %7
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 %59
%61 = load i32, i32* %60
%62 = add nsw i32 %61, 1
%63 = load i32, i32* %7
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 %64
store i32 %62, i32* %65
%66 = load i32, i32* %9
%67 = add nsw i32 %66, 1
store i32 %67, i32* %9
br label %68
68: ; preds = %57, %38
%69 = load i32, i32* %8
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [30 x [3 x i32]], [30 x [3 x i32]]* %2, i64 0, i64 %70
%72 = load i32, i32* %7
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [3 x i32], [3 x i32]* %71, i64 0, i64 %73
%75 = load i32, i32* %74
%76 = icmp eq i32 %75, 5
br i1 %76, label %77, label %80
77: ; preds = %68
%78 = load i32, i32* %4
%79 = add nsw i32 %78, 1
store i32 %79, i32* %4
br label %80
80: ; preds = %77, %68
%81 = load i32, i32* %8
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [30 x [3 x i32]], [30 x [3 x i32]]* %2, i64 0, i64 %82
%84 = load i32, i32* %7
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [3 x i32], [3 x i32]* %83, i64 0, i64 %85
%87 = load i32, i32* %86
%88 = icmp eq i32 %87, 6
br i1 %88, label %89, label %92
89: ; preds = %80
%90 = load i32, i32* %5
%91 = add nsw i32 %90, 1
store i32 %91, i32* %5
br label %92
92: ; preds = %89, %80
%93 = load i32, i32* %7
%94 = icmp eq i32 %93, 3
br i1 %94, label %95, label %101
95: ; preds = %92
%96 = load i32, i32* %8
%97 = load i32, i32* %6
%98 = icmp ne i32 %96, %97
br i1 %98, label %99, label %101
99: ; preds = %95
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0))
br label %101
101: ; preds = %99, %95, %92
br label %102
102: ; preds = %101
%103 = load i32, i32* %7
%104 = add nsw i32 %103, 1
store i32 %104, i32* %7
br label %35
105: ; preds = %35
br label %106
106: ; preds = %105
%107 = load i32, i32* %6
%108 = add nsw i32 %107, 1
store i32 %108, i32* %6
br label %30
109: ; preds = %30
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %7
br label %112
112: ; preds = %123, %109
%113 = load i32, i32* %7
%114 = icmp sle i32 %113, 3
br i1 %114, label %115, label %126
115: ; preds = %112
%116 = load i32, i32* %7
%117 = add nsw i32 %116, 1
%118 = load i32, i32* %7
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 %119
%121 = load i32, i32* %120
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.12, i64 0, i64 0), i32 %117, i32 %121)
br label %123
123: ; preds = %115
%124 = load i32, i32* %7
%125 = add nsw i32 %124, 1
store i32 %125, i32* %7
br label %112
126: ; preds = %112
store i32 0, i32* %6
br label %127
127: ; preds = %145, %126
%128 = load i32, i32* %6
%129 = icmp sle i32 %128, 3
br i1 %129, label %130, label %148
130: ; preds = %127
%131 = load i32, i32* %6
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 %132
%134 = load i32, i32* %133
%135 = load i32, i32* %10
%136 = icmp sgt i32 %134, %135
br i1 %136, label %137, label %144
137: ; preds = %130
%138 = load i32, i32* %6
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 %139
%141 = load i32, i32* %140
store i32 %141, i32* %10
%142 = load i32, i32* %6
%143 = add nsw i32 %142, 1
store i32 %143, i32* %11
br label %144
144: ; preds = %137, %130
br label %145
145: ; preds = %144
%146 = load i32, i32* %6
%147 = add nsw i32 %146, 1
store i32 %147, i32* %6
br label %127
148: ; preds = %127
%149 = load i32, i32* %5
%150 = icmp sgt i32 %149, 0
br i1 %150, label %151, label %156
151: ; preds = %148
%152 = load i32, i32* %9
%153 = load i32, i32* %5
%154 = sdiv i32 %152, %153
%155 = mul nsw i32 %154, 100
br label %157
156: ; preds = %148
br label %157
157: ; preds = %156, %151
%158 = phi i32 [ %155, %151 ], [ 0, %156 ]
%159 = sitofp i32 %158 to float
store float %159, float* %13
%160 = load i32, i32* %4
%161 = icmp sgt i32 %160, 0
br i1 %161, label %162, label %167
162: ; preds = %157
%163 = load i32, i32* %9
%164 = load i32, i32* %4
%165 = sdiv i32 %163, %164
%166 = mul nsw i32 %165, 100
br label %168
167: ; preds = %157
br label %168
168: ; preds = %167, %162
%169 = phi i32 [ %166, %162 ], [ 0, %167 ]
%170 = sitofp i32 %169 to float
store float %170, float* %12
%171 = load i32, i32* %11
%172 = icmp ne i32 %171, 0
br i1 %172, label %173, label %177
173: ; preds = %168
%174 = load i32, i32* %11
%175 = load i32, i32* %10
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0), i32 %174, i32 %175)
br label %177
177: ; preds = %173, %168
%178 = load i32, i32* %5
%179 = load float, float* %13
%180 = fpext float %179 to double
%181 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.14, i64 0, i64 0), i32 %178, double %180)
%182 = load i32, i32* %4
%183 = load float, float* %12
%184 = fpext float %183 to double
%185 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0), i32 %182, double %184)
%186 = load i32, i32* %1
ret i32 %186
}

LLVM IR (-O2):
@.str = [59 x i8] c"Please, insert the total people to vote (max 30 peoples): \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.4 = [30 x i8] c"Here, you can vote, using: \0A \00"
@.str.5 = [35 x i8] c"* 1 = Vote in actual candidate; \0A \00"
@.str.6 = [39 x i8] c"* 0 = Not vote in candidate actual; \0A \00"
@.str.7 = [19 x i8] c"* 5 = Vote null \0A \00"
@.str.8 = [20 x i8] c"* 6 = Vote white \0A \00"
@.str.9 = [44 x i8] c"Please, do you want vote in candidate %d? \0A\00"
@.str.12 = [33 x i8] c"* Candidate %d; Total Vote: %d \0A\00"
@.str.13 = [52 x i8] c"\0ACandidate with the most votes: %d; Total votes: %d\00"
@.str.14 = [43 x i8] c"\0ATotal of votes white: %d; Porcent: %.2f \0A\00"
@.str.15 = [42 x i8] c"\0ATotal of votes null: %d; Porcent: %.2f \0A\00"
@str.17 = [35 x i8] c"\0A---------------------------------\00"
@str.18 = [13 x i8] c"Candidates: \00"
@str.19 = [29 x i8] c"\0A--------Next people--------\00"
@str.20 = [30 x i8] c"-----MAX PEOPLE EXCEDED----- \00"
define i32 @main() {
%1 = alloca [30 x [3 x i32]]
%2 = alloca i32
%3 = bitcast [30 x [3 x i32]]* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @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 sgt i32 %7, 30
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.20, i64 0, i64 0))
%11 = call i32 @exit(i32 0)
unreachable
12: ; preds = %0
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.17, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.17, i64 0, i64 0))
%20 = load i32, i32* %2
%21 = icmp slt i32 %20, 1
br i1 %21, label %116, label %22
22: ; preds = %12, %112
%23 = phi i32 [ %41, %112 ], [ 0, %12 ]
%24 = phi i32 [ %61, %112 ], [ 0, %12 ]
%25 = phi i32 [ %81, %112 ], [ 0, %12 ]
%26 = phi i32 [ %104, %112 ], [ 0, %12 ]
%27 = phi i32 [ %107, %112 ], [ 0, %12 ]
%28 = phi i32 [ %101, %112 ], [ undef, %12 ]
%29 = phi i32 [ %114, %112 ], [ 1, %12 ]
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), i32 1)
%31 = load i32, i32* %2
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [30 x [3 x i32]], [30 x [3 x i32]]* %1, i64 0, i64 %32, i64 0
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %33)
%35 = load i32, i32* %2
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [30 x [3 x i32]], [30 x [3 x i32]]* %1, i64 0, i64 %36, i64 0
%38 = load i32, i32* %37
%39 = icmp eq i32 %38, 1
%40 = zext i1 %39 to i32
%41 = add nuw nsw i32 %23, %40
%42 = zext i1 %39 to i32
%43 = add nsw i32 %28, %42
%44 = icmp eq i32 %38, 5
%45 = zext i1 %44 to i32
%46 = add nsw i32 %26, %45
%47 = icmp eq i32 %38, 6
%48 = zext i1 %47 to i32
%49 = add nsw i32 %27, %48
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), i32 2)
%51 = load i32, i32* %2
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [30 x [3 x i32]], [30 x [3 x i32]]* %1, i64 0, i64 %52, i64 1
%54 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %53)
%55 = load i32, i32* %2
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [30 x [3 x i32]], [30 x [3 x i32]]* %1, i64 0, i64 %56, i64 1
%58 = load i32, i32* %57
%59 = icmp eq i32 %58, 1
%60 = zext i1 %59 to i32
%61 = add nuw nsw i32 %24, %60
%62 = zext i1 %59 to i32
%63 = add nsw i32 %43, %62
%64 = icmp eq i32 %58, 5
%65 = zext i1 %64 to i32
%66 = add nsw i32 %46, %65
%67 = icmp eq i32 %58, 6
%68 = zext i1 %67 to i32
%69 = add nsw i32 %49, %68
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), i32 3)
%71 = load i32, i32* %2
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [30 x [3 x i32]], [30 x [3 x i32]]* %1, i64 0, i64 %72, i64 2
%74 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %73)
%75 = load i32, i32* %2
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [30 x [3 x i32]], [30 x [3 x i32]]* %1, i64 0, i64 %76, i64 2
%78 = load i32, i32* %77
%79 = icmp eq i32 %78, 1
%80 = zext i1 %79 to i32
%81 = add nuw nsw i32 %25, %80
%82 = zext i1 %79 to i32
%83 = add nsw i32 %63, %82
%84 = icmp eq i32 %78, 5
%85 = zext i1 %84 to i32
%86 = add nsw i32 %66, %85
%87 = icmp eq i32 %78, 6
%88 = zext i1 %87 to i32
%89 = add nsw i32 %69, %88
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), i32 4)
%91 = load i32, i32* %2
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [30 x [3 x i32]], [30 x [3 x i32]]* %1, i64 0, i64 %92, i64 3
%94 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %93)
%95 = load i32, i32* %2
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [30 x [3 x i32]], [30 x [3 x i32]]* %1, i64 0, i64 %96, i64 3
%98 = load i32, i32* %97
%99 = icmp eq i32 %98, 1
%100 = zext i1 %99 to i32
%101 = add nsw i32 %83, %100
%102 = icmp eq i32 %98, 5
%103 = zext i1 %102 to i32
%104 = add nsw i32 %86, %103
%105 = icmp eq i32 %98, 6
%106 = zext i1 %105 to i32
%107 = add nsw i32 %89, %106
%108 = icmp eq i32 %95, %29
br i1 %108, label %112, label %109
109: ; preds = %22
%110 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.19, i64 0, i64 0))
%111 = load i32, i32* %2
br label %112
112: ; preds = %109, %22
%113 = phi i32 [ %111, %109 ], [ %29, %22 ]
%114 = add nuw nsw i32 %29, 1
%115 = icmp slt i32 %29, %113
br i1 %115, label %22, label %116
116: ; preds = %112, %12
%117 = phi i32 [ 0, %12 ], [ %41, %112 ]
%118 = phi i32 [ 0, %12 ], [ %61, %112 ]
%119 = phi i32 [ 0, %12 ], [ %81, %112 ]
%120 = phi i32 [ undef, %12 ], [ %101, %112 ]
%121 = phi i32 [ 0, %12 ], [ %107, %112 ]
%122 = phi i32 [ 0, %12 ], [ %104, %112 ]
%123 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.17, i64 0, i64 0))
%124 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.18, i64 0, i64 0))
%125 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.12, i64 0, i64 0), i32 1, i32 %117)
%126 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.12, i64 0, i64 0), i32 2, i32 %118)
%127 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.12, i64 0, i64 0), i32 3, i32 %119)
%128 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.12, i64 0, i64 0), i32 4, i32 poison)
%129 = icmp sgt i32 %121, 0
br i1 %129, label %130, label %135
130: ; preds = %116
%131 = sdiv i32 %120, %121
%132 = mul nsw i32 %131, 100
%133 = sitofp i32 %132 to float
%134 = fpext float %133 to double
br label %135
135: ; preds = %116, %130
%136 = phi double [ %134, %130 ], [ 0.000000e+00, %116 ]
%137 = icmp sgt i32 %122, 0
br i1 %137, label %138, label %143
138: ; preds = %135
%139 = sdiv i32 %120, %122
%140 = mul nsw i32 %139, 100
%141 = sitofp i32 %140 to float
%142 = fpext float %141 to double
br label %143
143: ; preds = %135, %138
%144 = phi double [ %142, %138 ], [ 0.000000e+00, %135 ]
%145 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0), i32 undef, i32 undef)
%146 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.14, i64 0, i64 0), i32 %121, double %136)
%147 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0), i32 %122, double %144)
ret i32 0
}