#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 /*<<< orphan*/ system(char *);
int main() {
  int vet1[6], i, contpar = 0, contimpar = 0;
  for (i = 0; i < 6; i++) {
    printf("Digite um número inteiro: ");
    scanf("%d", &vet1[i]);
  }
  printf("Números pares digitados: ");
  for (i = 0; i < 6; i++) {
    if ((vet1[i] % 2) == 0) {
      printf("\n\t%d -> par ", vet1[i]);
      contpar++;
    } else {
      printf("\n\t\t%d -> ímpar ", vet1[i]);
      contimpar++;
    }
  }
  printf("\n\n A quantidade de números ímpares digitados foi %d, e de números "
         "pares foi %d.\n\n",
         contimpar, contpar);
  system("pause");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x6,-0x24(%rbp)
jge    1195 <main+0x65>
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x24(%rbp),%rax
lea    -0x20(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe9a(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1154 <main+0x24>
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x6,-0x24(%rbp)
jge    1223 <main+0xf3>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11f1 <main+0xc1>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1210 <main+0xe0>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1215 <main+0xe5>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11aa <main+0x7a>
mov    -0x2c(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe6f(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
lea    0xec1(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecc(%rip),%rbp
mov    %rsp,%rsi
mov    %rbp,%rdi
call   1050 <scanf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbp,%rdi
call   1050 <scanf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbp,%rdi
call   1050 <scanf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbp,%rdi
call   1050 <scanf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbp,%rdi
call   1050 <scanf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbp,%rdi
call   1050 <scanf@plt>
lea    0xe4a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp),%esi
mov    %esi,%ebp
and    $0x1,%ebp
lea    0xe4f(%rip),%rax
lea    0xe55(%rip),%rdi
cmove  %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%esi
test   $0x1,%sil
jne    1227 <main+0xf7>
xor    %r14d,%r14d
test   %ebp,%ebp
setne  %r14b
lea    0xe23(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x2,%ebx
sub    %ebp,%ebx
jmp    1247 <main+0x117>
mov    %ebp,%ebx
xor    $0x1,%ebx
lea    0xe14(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x1,%ebp
mov    $0x2,%r14d
sbb    $0x0,%r14d
mov    0x8(%rsp),%esi
test   $0x1,%sil
jne    1264 <main+0x134>
lea    0xde2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
jmp    1276 <main+0x146>
lea    0xddc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r14d
mov    0xc(%rsp),%esi
test   $0x1,%sil
jne    1293 <main+0x163>
lea    0xdb3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
jmp    12a5 <main+0x175>
lea    0xdad(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r14d
mov    0x10(%rsp),%esi
test   $0x1,%sil
jne    12c2 <main+0x192>
lea    0xd84(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
jmp    12d4 <main+0x1a4>
lea    0xd7e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r14d
mov    0x14(%rsp),%esi
test   $0x1,%sil
jne    12f1 <main+0x1c1>
lea    0xd55(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
jmp    1303 <main+0x1d3>
lea    0xd4f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r14d
lea    0xd4e(%rip),%rdi
mov    %r14d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd90(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Digite um n\C3\BAmero inteiro: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"N\C3\BAmeros pares digitados: \00"
@.str.3 = [13 x i8] c"\0A\09%d -> par \00"
@.str.4 = [17 x i8] c"\0A\09\09%d -> \C3\ADmpar \00"
@.str.5 = [85 x i8] c"\0A\0A A quantidade de n\C3\BAmeros \C3\ADmpares digitados foi %d, e de n\C3\BAmeros pares foi %d.\0A\0A\00"
@.str.6 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %3
br label %6
6: ; preds = %15, %0
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 6
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 %12
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %13)
br label %15
15: ; preds = %9
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %6
18: ; preds = %6
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %20
20: ; preds = %47, %18
%21 = load i32, i32* %3
%22 = icmp slt i32 %21, 6
br i1 %22, label %23, label %50
23: ; preds = %20
%24 = load i32, i32* %3
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 %25
%27 = load i32, i32* %26
%28 = srem i32 %27, 2
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %38
30: ; preds = %23
%31 = load i32, i32* %3
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 %32
%34 = load i32, i32* %33
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %34)
%36 = load i32, i32* %4
%37 = add nsw i32 %36, 1
store i32 %37, i32* %4
br label %46
38: ; preds = %23
%39 = load i32, i32* %3
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 %40
%42 = load i32, i32* %41
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %42)
%44 = load i32, i32* %5
%45 = add nsw i32 %44, 1
store i32 %45, i32* %5
br label %46
46: ; preds = %38, %30
br label %47
47: ; preds = %46
%48 = load i32, i32* %3
%49 = add nsw i32 %48, 1
store i32 %49, i32* %3
br label %20
50: ; preds = %20
%51 = load i32, i32* %5
%52 = load i32, i32* %4
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.5, i64 0, i64 0), i32 %51, i32 %52)
%54 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Digite um n\C3\BAmero inteiro: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"N\C3\BAmeros pares digitados: \00"
@.str.3 = [13 x i8] c"\0A\09%d -> par \00"
@.str.4 = [17 x i8] c"\0A\09\09%d -> \C3\ADmpar \00"
@.str.5 = [85 x i8] c"\0A\0A A quantidade de n\C3\BAmeros \C3\ADmpares digitados foi %d, e de n\C3\BAmeros pares foi %d.\0A\0A\00"
@.str.6 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%10 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 2
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %10)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%13 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 3
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %13)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%16 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 4
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %16)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%19 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 5
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %19)
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%22 = load i32, i32* %4
%23 = and i32 %22, 1
%24 = icmp eq i32 %23, 0
%25 = select i1 %24, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %25, i32 %22)
%27 = load i32, i32* %7
%28 = and i32 %27, 1
%29 = icmp eq i32 %28, 0
br i1 %29, label %34, label %30
30: ; preds = %0
%31 = xor i32 %23, 1
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %27)
%33 = select i1 %24, i32 1, i32 2
br label %39
34: ; preds = %0
%35 = xor i1 %24, true
%36 = zext i1 %35 to i32
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %27)
%38 = sub nuw nsw i32 2, %23
br label %39
39: ; preds = %34, %30
%40 = phi i32 [ %38, %34 ], [ %31, %30 ]
%41 = phi i32 [ %36, %34 ], [ %33, %30 ]
%42 = load i32, i32* %10
%43 = and i32 %42, 1
%44 = icmp eq i32 %43, 0
br i1 %44, label %48, label %45
45: ; preds = %39
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %42)
%47 = add nuw nsw i32 %41, 1
br label %51
48: ; preds = %39
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %42)
%50 = add nuw nsw i32 %40, 1
br label %51
51: ; preds = %48, %45
%52 = phi i32 [ %50, %48 ], [ %40, %45 ]
%53 = phi i32 [ %41, %48 ], [ %47, %45 ]
%54 = load i32, i32* %13
%55 = and i32 %54, 1
%56 = icmp eq i32 %55, 0
br i1 %56, label %60, label %57
57: ; preds = %51
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %54)
%59 = add nuw nsw i32 %53, 1
br label %63
60: ; preds = %51
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %54)
%62 = add nuw nsw i32 %52, 1
br label %63
63: ; preds = %60, %57
%64 = phi i32 [ %62, %60 ], [ %52, %57 ]
%65 = phi i32 [ %53, %60 ], [ %59, %57 ]
%66 = load i32, i32* %16
%67 = and i32 %66, 1
%68 = icmp eq i32 %67, 0
br i1 %68, label %72, label %69
69: ; preds = %63
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %66)
%71 = add nuw nsw i32 %65, 1
br label %75
72: ; preds = %63
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %66)
%74 = add nuw nsw i32 %64, 1
br label %75
75: ; preds = %72, %69
%76 = phi i32 [ %74, %72 ], [ %64, %69 ]
%77 = phi i32 [ %65, %72 ], [ %71, %69 ]
%78 = load i32, i32* %19
%79 = and i32 %78, 1
%80 = icmp eq i32 %79, 0
br i1 %80, label %84, label %81
81: ; preds = %75
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %78)
%83 = add nuw nsw i32 %77, 1
br label %87
84: ; preds = %75
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %78)
%86 = add nuw nsw i32 %76, 1
br label %87
87: ; preds = %84, %81
%88 = phi i32 [ %86, %84 ], [ %76, %81 ]
%89 = phi i32 [ %77, %84 ], [ %83, %81 ]
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @.str.5, i64 0, i64 0), i32 %89, i32 %88)
%91 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}