#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*/ imprimir(char *, int *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int i, n;
  int pares[5], paresLength = 0;
  int impares[5], imparesLength = 0;
  for (i = 0; i < 15; i++) {
    scanf("%d", &n);
    if (((n) % 2 != 0 ? 0 : 1)) {
      pares[paresLength++] = n;
    } else {
      impares[imparesLength++] = n;
    }
    if (paresLength == 5) {
      imprimir("par", pares, paresLength);
      paresLength = 0;
    } else if (imparesLength == 5) {
      imprimir("impar", impares, imparesLength);
      imparesLength = 0;
    }
  }
  if (imparesLength > 0) {
    imprimir("impar", impares, imparesLength);
  }
  if (paresLength > 0) {
    imprimir("par", pares, paresLength);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xf,-0x8(%rbp)
jge    1222 <main+0x102>
lea    0xeab(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1181 <main+0x61>
xor    %eax,%eax
test   $0x1,%al
jne    1190 <main+0x70>
jmp    11a9 <main+0x89>
mov    $0x1,%al
test   $0x1,%al
jne    1190 <main+0x70>
jmp    11a9 <main+0x89>
mov    -0xc(%rbp),%ecx
mov    -0x24(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
cltq
mov    %ecx,-0x20(%rbp,%rax,4)
jmp    11bd <main+0x9d>
mov    -0xc(%rbp),%ecx
mov    -0x44(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x44(%rbp)
cltq
mov    %ecx,-0x40(%rbp,%rax,4)
cmpl   $0x5,-0x24(%rbp)
jne    11e6 <main+0xc6>
lea    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
lea    0xe30(%rip),%rdi
call   1030 <imprimir@plt>
movl   $0x0,-0x24(%rbp)
jmp    120f <main+0xef>
cmpl   $0x5,-0x44(%rbp)
jne    120a <main+0xea>
lea    -0x40(%rbp),%rsi
mov    -0x44(%rbp),%edx
lea    0xe05(%rip),%rdi
call   1030 <imprimir@plt>
movl   $0x0,-0x44(%rbp)
jmp    120f <main+0xef>
jmp    1214 <main+0xf4>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <main+0x24>
cmpl   $0x0,-0x44(%rbp)
jle    123f <main+0x11f>
lea    -0x40(%rbp),%rsi
mov    -0x44(%rbp),%edx
lea    0xdc9(%rip),%rdi
call   1030 <imprimir@plt>
cmpl   $0x0,-0x24(%rbp)
jle    125c <main+0x13c>
lea    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
lea    0xdae(%rip),%rdi
call   1030 <imprimir@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
xor    %ebp,%ebp
lea    0xec9(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x10(%rsp),%r13
xor    %ebx,%ebx
xor    %r12d,%r12d
jmp    116a <main+0x4a>
lea    0xeb6(%rip),%rdi
lea    0x30(%rsp),%rsi
mov    $0x5,%edx
call   1030 <imprimir@plt>
xor    %ebx,%ebx
add    $0x1,%r12d
cmp    $0xf,%r12d
je     11d4 <main+0xb4>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   $0x1,%al
jne    11a0 <main+0x80>
movslq %ebx,%rcx
add    $0x1,%ebx
mov    %eax,0x30(%rsp,%rcx,4)
cmp    $0x5,%ebx
je     1148 <main+0x28>
cmp    $0x5,%ebp
jne    1160 <main+0x40>
jmp    11af <main+0x8f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movslq %ebp,%rcx
add    $0x1,%ebp
mov    %eax,0x10(%rsp,%rcx,4)
cmp    $0x5,%ebp
jne    1160 <main+0x40>
lea    0xe4d(%rip),%rdi
mov    %r13,%rsi
mov    $0x5,%edx
call   1030 <imprimir@plt>
add    $0x1,%r12d
mov    $0x0,%ebp
cmp    $0xf,%r12d
jne    116a <main+0x4a>
jmp    11eb <main+0xcb>
test   %ebp,%ebp
jle    11eb <main+0xcb>
lea    0xe24(%rip),%rdi
lea    0x10(%rsp),%rsi
mov    %ebp,%edx
call   1030 <imprimir@plt>
test   %ebx,%ebx
jle    1202 <main+0xe2>
lea    0xe0f(%rip),%rdi
lea    0x30(%rsp),%rsi
mov    %ebx,%edx
call   1030 <imprimir@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"par\00"
@.str.2 = [6 x i8] c"impar\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [5 x i32]
%5 = alloca i32
%6 = alloca [5 x i32]
%7 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %5
store i32 0, i32* %7
store i32 0, i32* %2
br label %8
8: ; preds = %46, %0
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 15
br i1 %10, label %11, label %49
11: ; preds = %8
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %3
%14 = srem i32 %13, 2
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %11
br i1 false, label %18, label %24
17: ; preds = %11
br i1 true, label %18, label %24
18: ; preds = %17, %16
%19 = load i32, i32* %3
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
%22 = sext i32 %20 to i64
%23 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 %22
store i32 %19, i32* %23
br label %30
24: ; preds = %17, %16
%25 = load i32, i32* %3
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
store i32 %27, i32* %7
%28 = sext i32 %26 to i64
%29 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 %28
store i32 %25, i32* %29
br label %30
30: ; preds = %24, %18
%31 = load i32, i32* %5
%32 = icmp eq i32 %31, 5
br i1 %32, label %33, label %37
33: ; preds = %30
%34 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 0
%35 = load i32, i32* %5
%36 = call i32 @imprimir(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %34, i32 %35)
store i32 0, i32* %5
br label %45
37: ; preds = %30
%38 = load i32, i32* %7
%39 = icmp eq i32 %38, 5
br i1 %39, label %40, label %44
40: ; preds = %37
%41 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
%42 = load i32, i32* %7
%43 = call i32 @imprimir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32* %41, i32 %42)
store i32 0, i32* %7
br label %44
44: ; preds = %40, %37
br label %45
45: ; preds = %44, %33
br label %46
46: ; preds = %45
%47 = load i32, i32* %2
%48 = add nsw i32 %47, 1
store i32 %48, i32* %2
br label %8
49: ; preds = %8
%50 = load i32, i32* %7
%51 = icmp sgt i32 %50, 0
br i1 %51, label %52, label %56
52: ; preds = %49
%53 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
%54 = load i32, i32* %7
%55 = call i32 @imprimir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32* %53, i32 %54)
br label %56
56: ; preds = %52, %49
%57 = load i32, i32* %5
%58 = icmp sgt i32 %57, 0
br i1 %58, label %59, label %63
59: ; preds = %56
%60 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 0
%61 = load i32, i32* %5
%62 = call i32 @imprimir(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %60, i32 %61)
br label %63
63: ; preds = %59, %56
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"par\00"
@.str.2 = [6 x i8] c"impar\00"
define i32 @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]* %2, i64 0, i64 0
br label %9
9: ; preds = %37, %0
%10 = phi i32 [ 0, %0 ], [ %38, %37 ]
%11 = phi i32 [ 0, %0 ], [ %39, %37 ]
%12 = phi i32 [ 0, %0 ], [ %40, %37 ]
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%14 = load i32, i32* %1
%15 = and i32 %14, 1
%16 = icmp eq i32 %15, 0
br i1 %16, label %21, label %17
17: ; preds = %9
%18 = add nsw i32 %10, 1
%19 = sext i32 %10 to i64
%20 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %19
store i32 %14, i32* %20
br label %28
21: ; preds = %9
%22 = add nsw i32 %11, 1
%23 = sext i32 %11 to i64
%24 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %23
store i32 %14, i32* %24
%25 = icmp eq i32 %22, 5
br i1 %25, label %26, label %28
26: ; preds = %21
%27 = call i32 @imprimir(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %8, i32 5)
br label %32
28: ; preds = %17, %21
%29 = phi i32 [ %18, %17 ], [ %10, %21 ]
%30 = phi i32 [ %11, %17 ], [ %22, %21 ]
%31 = icmp eq i32 %29, 5
br i1 %31, label %41, label %32
32: ; preds = %26, %28
%33 = phi i32 [ 0, %26 ], [ %30, %28 ]
%34 = phi i32 [ %10, %26 ], [ %29, %28 ]
%35 = add nuw nsw i32 %12, 1
%36 = icmp eq i32 %35, 15
br i1 %36, label %45, label %37
37: ; preds = %32, %41
%38 = phi i32 [ %34, %32 ], [ 0, %41 ]
%39 = phi i32 [ %33, %32 ], [ %30, %41 ]
%40 = phi i32 [ %35, %32 ], [ %43, %41 ]
br label %9
41: ; preds = %28
%42 = call i32 @imprimir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32* %7, i32 5)
%43 = add nuw nsw i32 %12, 1
%44 = icmp eq i32 %43, 15
br i1 %44, label %49, label %37
45: ; preds = %32
%46 = icmp sgt i32 %34, 0
br i1 %46, label %47, label %49
47: ; preds = %45
%48 = call i32 @imprimir(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32* %7, i32 %34)
br label %49
49: ; preds = %41, %47, %45
%50 = phi i32 [ %33, %47 ], [ %33, %45 ], [ %30, %41 ]
%51 = icmp sgt i32 %50, 0
br i1 %51, label %52, label %54
52: ; preds = %49
%53 = call i32 @imprimir(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %8, i32 %50)
br label %54
54: ; preds = %52, %49
ret i32 0
}