#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 *);
void main() {
  int n, imp = 0, pr = 0;
  int par[5], impar[5];
  for (int i = 0; i < 30; i++) {
    printf("Informe a posicao %d: ", i + 1);
    scanf("%d", &n);
    if (n % 2 == 0) {
      par[pr] = n;
      ++pr;
      if (pr > 4) {
        pr = 0;
        printf("Tamanho Par excedido.\nPares do vetor: ");
        for (int j = 0; j < 5; j++) {
          printf("%d ", par[j]);
        }
        printf("\n");
      }
    } else {
      impar[imp] = n;
      ++imp;
      if (imp > 4) {
        imp = 0;
        printf("Tamanho Impar excedido.\nImpares do vetor: ");
        for (int j = 0; j < 5; j++) {
          printf("%d ", impar[j]);
        }
        printf("\n");
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x1e,-0x44(%rbp)
jge    1288 <main+0x168>
mov    -0x44(%rbp),%esi
add    $0x1,%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb5(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11fa <main+0xda>
mov    -0x4(%rbp),%ecx
movslq -0xc(%rbp),%rax
mov    %ecx,-0x20(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jle    11f5 <main+0xd5>
movl   $0x0,-0xc(%rbp)
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x48(%rbp)
cmpl   $0x5,-0x48(%rbp)
jge    11e7 <main+0xc7>
movslq -0x48(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    11b9 <main+0x99>
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1275 <main+0x155>
mov    -0x4(%rbp),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jle    1270 <main+0x150>
movl   $0x0,-0x8(%rbp)
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4c(%rbp)
cmpl   $0x5,-0x4c(%rbp)
jge    1262 <main+0x142>
movslq -0x4c(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%esi
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1234 <main+0x114>
lea    0xddc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1275 <main+0x155>
jmp    127a <main+0x15a>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    113d <main+0x1d>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    $0x1,%ebx
lea    0xeb6(%rip),%r15
lea    0xec6(%rip),%r12
lea    0xc(%rsp),%rbp
xor    %r13d,%r13d
xor    %r14d,%r14d
jmp    120a <main+0xda>
xor    %r14d,%r14d
lea    0xeda(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%esi
lea    0x24(%rsp),%r15
lea    0x28(%rsp),%rbp
lea    0x2c(%rsp),%r12
mov    %r12,0x10(%rsp)
lea    0x30(%rsp),%rax
mov    %rax,0x18(%rsp)
lea    0xea6(%rip),%r12
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r15),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x0(%rbp),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%rax
mov    (%rax),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%rax
mov    (%rax),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe0e(%rip),%r15
lea    0xe1e(%rip),%r12
lea    0xc(%rsp),%rbp
add    $0x1,%ebx
cmp    $0x1f,%ebx
je     128a <main+0x15a>
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
test   $0x1,%al
jne    1240 <main+0x110>
movslq %r13d,%rcx
mov    %eax,0x40(%rsp,%rcx,4)
cmp    $0x4,%r13d
jge    1257 <main+0x127>
add    $0x1,%r13d
jmp    11fe <main+0xce>
nopl   0x0(%rax)
movslq %r14d,%rcx
mov    %eax,0x20(%rsp,%rcx,4)
cmp    $0x4,%r14d
jge    1161 <main+0x31>
add    $0x1,%r14d
jmp    11fe <main+0xce>
xor    %r13d,%r13d
lea    0xdb9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x40(%rsp),%esi
lea    0x44(%rsp),%r15
lea    0x48(%rsp),%rbp
lea    0x4c(%rsp),%r12
mov    %r12,0x10(%rsp)
lea    0x50(%rsp),%rax
jmp    118f <main+0x5f>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Informe a posicao %d: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [39 x i8] c"Tamanho Par excedido.\0APares do vetor: \00"
@.str.3 = [4 x i8] c"%d \00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [43 x i8] c"Tamanho Impar excedido.\0AImpares do vetor: \00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [5 x i32]
%5 = alloca [5 x i32]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %6
br label %9
9: ; preds = %73, %0
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 30
br i1 %11, label %12, label %76
12: ; preds = %9
%13 = load i32, i32* %6
%14 = add nsw i32 %13, 1
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%17 = load i32, i32* %1
%18 = srem i32 %17, 2
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %46
20: ; preds = %12
%21 = load i32, i32* %1
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 %23
store i32 %21, i32* %24
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
%27 = load i32, i32* %3
%28 = icmp sgt i32 %27, 4
br i1 %28, label %29, label %45
29: ; preds = %20
store i32 0, i32* %3
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %7
br label %31
31: ; preds = %40, %29
%32 = load i32, i32* %7
%33 = icmp slt i32 %32, 5
br i1 %33, label %34, label %43
34: ; preds = %31
%35 = load i32, i32* %7
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 %36
%38 = load i32, i32* %37
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %38)
br label %40
40: ; preds = %34
%41 = load i32, i32* %7
%42 = add nsw i32 %41, 1
store i32 %42, i32* %7
br label %31
43: ; preds = %31
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %45
45: ; preds = %43, %20
br label %72
46: ; preds = %12
%47 = load i32, i32* %1
%48 = load i32, i32* %2
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 %49
store i32 %47, i32* %50
%51 = load i32, i32* %2
%52 = add nsw i32 %51, 1
store i32 %52, i32* %2
%53 = load i32, i32* %2
%54 = icmp sgt i32 %53, 4
br i1 %54, label %55, label %71
55: ; preds = %46
store i32 0, i32* %2
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %8
br label %57
57: ; preds = %66, %55
%58 = load i32, i32* %8
%59 = icmp slt i32 %58, 5
br i1 %59, label %60, label %69
60: ; preds = %57
%61 = load i32, i32* %8
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 %62
%64 = load i32, i32* %63
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %64)
br label %66
66: ; preds = %60
%67 = load i32, i32* %8
%68 = add nsw i32 %67, 1
store i32 %68, i32* %8
br label %57
69: ; preds = %57
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %71
71: ; preds = %69, %46
br label %72
72: ; preds = %71, %45
br label %73
73: ; preds = %72
%74 = load i32, i32* %6
%75 = add nsw i32 %74, 1
store i32 %75, i32* %6
br label %9
76: ; preds = %9
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Informe a posicao %d: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [39 x i8] c"Tamanho Par excedido.\0APares do vetor: \00"
@.str.3 = [4 x i8] c"%d \00"
@.str.5 = [43 x i8] c"Tamanho Impar excedido.\0AImpares do vetor: \00"
define void @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca [5 x i32]
%4 = bitcast i32* %1 to i8*
%5 = bitcast [5 x i32]* %2 to i8*
%6 = bitcast [5 x i32]* %3 to i8*
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 1
%9 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 2
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 3
%11 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 4
%12 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%13 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 1
%14 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 2
%15 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 3
%16 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 4
br label %18
17: ; preds = %62
ret void
18: ; preds = %0, %62
%19 = phi i32 [ 0, %0 ], [ %22, %62 ]
%20 = phi i32 [ 0, %0 ], [ %64, %62 ]
%21 = phi i32 [ 0, %0 ], [ %63, %62 ]
%22 = add nuw nsw i32 %19, 1
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %22)
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%25 = load i32, i32* %1
%26 = and i32 %25, 1
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %36
28: ; preds = %18
%29 = sext i32 %20 to i64
%30 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %29
store i32 %25, i32* %30
%31 = add nsw i32 %20, 1
%32 = icmp sgt i32 %20, 3
br i1 %32, label %33, label %62
33: ; preds = %28
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%35 = load i32, i32* %12
br label %44
36: ; preds = %18
%37 = sext i32 %21 to i64
%38 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %37
store i32 %25, i32* %38
%39 = add nsw i32 %21, 1
%40 = icmp sgt i32 %21, 3
br i1 %40, label %41, label %62
41: ; preds = %36
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%43 = load i32, i32* %7
br label %44
44: ; preds = %41, %33
%45 = phi i32 [ %35, %33 ], [ %43, %41 ]
%46 = phi i32* [ %13, %33 ], [ %8, %41 ]
%47 = phi i32* [ %14, %33 ], [ %9, %41 ]
%48 = phi i32* [ %15, %33 ], [ %10, %41 ]
%49 = phi i32* [ %16, %33 ], [ %11, %41 ]
%50 = phi i32 [ %21, %33 ], [ 0, %41 ]
%51 = phi i32 [ 0, %33 ], [ %20, %41 ]
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %45)
%53 = load i32, i32* %46
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %53)
%55 = load i32, i32* %47
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %55)
%57 = load i32, i32* %48
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %57)
%59 = load i32, i32* %49
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %59)
%61 = call i32 @putchar(i32 10)
br label %62
62: ; preds = %44, %28, %36
%63 = phi i32 [ %21, %28 ], [ %39, %36 ], [ %50, %44 ]
%64 = phi i32 [ %31, %28 ], [ %20, %36 ], [ %51, %44 ]
%65 = icmp eq i32 %22, 30
br i1 %65, label %17, label %18
}