#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*/ printMyArray(int *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int evens[5], odds[5];
  int evensSize = 0, oddsSize = 0;
  int num, isOdd;
  int i, j;
  for (i = 0; i < 15; i++) {
    scanf("%d", &num);
    if (isOdd = num % 2) {
      if (oddsSize == 5) {
        printMyArray(odds, oddsSize, isOdd);
        oddsSize = 0;
      }
      odds[oddsSize++] = num;
    } else {
      if (evensSize == 5) {
        printMyArray(evens, evensSize, isOdd);
        evensSize = 0;
      }
      evens[evensSize++] = num;
    }
  }
  printMyArray(odds, oddsSize, isOdd = 1);
  printMyArray(evens, evensSize, isOdd = 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x54(%rbp)
cmpl   $0xf,-0x54(%rbp)
jge    11f5 <main+0xd5>
lea    0xeab(%rip),%rdi
lea    -0x4c(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x50(%rbp)
cmp    $0x0,%edx
je     11ae <main+0x8e>
cmpl   $0x5,-0x48(%rbp)
jne    1195 <main+0x75>
lea    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%esi
mov    -0x50(%rbp),%edx
call   1030 <printMyArray@plt>
movl   $0x0,-0x48(%rbp)
mov    -0x4c(%rbp),%ecx
mov    -0x48(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x48(%rbp)
cltq
mov    %ecx,-0x40(%rbp,%rax,4)
jmp    11e2 <main+0xc2>
cmpl   $0x5,-0x44(%rbp)
jne    11ce <main+0xae>
lea    -0x20(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    -0x50(%rbp),%edx
call   1030 <printMyArray@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x4c(%rbp),%ecx
mov    -0x44(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x44(%rbp)
cltq
mov    %ecx,-0x20(%rbp,%rax,4)
jmp    11e7 <main+0xc7>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1144 <main+0x24>
lea    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%esi
movl   $0x1,-0x50(%rbp)
mov    $0x1,%edx
call   1030 <printMyArray@plt>
lea    -0x20(%rbp),%rdi
mov    -0x44(%rbp),%esi
movl   $0x0,-0x50(%rbp)
xor    %edx,%edx
call   1030 <printMyArray@plt>
xor    %eax,%eax
add    $0x60,%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    %ebx,%ebx
mov    $0xf,%r12d
lea    0xec3(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x30(%rsp),%r13
xor    %ebp,%ebp
jmp    1166 <main+0x46>
nopl   0x0(%rax,%rax,1)
mov    %ebp,%ecx
lea    0x1(%rbp),%esi
mov    %r13,%rdx
mov    %esi,%ebp
movslq %ecx,%rcx
mov    %eax,(%rdx,%rcx,4)
add    $0xffffffff,%r12d
je     11ca <main+0xaa>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
mov    %eax,%edx
sub    %ecx,%edx
je     11a0 <main+0x80>
cmp    $0x5,%ebp
jne    1150 <main+0x30>
mov    %r13,%rdi
mov    $0x5,%esi
call   1030 <printMyArray@plt>
xor    %ebp,%ebp
mov    0xc(%rsp),%eax
jmp    1150 <main+0x30>
nop
cmp    $0x5,%ebx
jne    11bc <main+0x9c>
xor    %ebx,%ebx
lea    0x10(%rsp),%rdi
mov    $0x5,%esi
xor    %edx,%edx
call   1030 <printMyArray@plt>
mov    0xc(%rsp),%eax
mov    %ebx,%ecx
lea    0x1(%rbx),%esi
lea    0x10(%rsp),%rdx
mov    %esi,%ebx
jmp    115a <main+0x3a>
lea    0x30(%rsp),%rdi
mov    %ebp,%esi
mov    $0x1,%edx
call   1030 <printMyArray@plt>
lea    0x10(%rsp),%rdi
mov    %ebx,%esi
xor    %edx,%edx
call   1030 <printMyArray@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"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca [5 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %8
br label %10
10: ; preds = %47, %0
%11 = load i32, i32* %8
%12 = icmp slt i32 %11, 15
br i1 %12, label %13, label %50
13: ; preds = %10
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%15 = load i32, i32* %6
%16 = srem i32 %15, 2
store i32 %16, i32* %7
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %32
18: ; preds = %13
%19 = load i32, i32* %5
%20 = icmp eq i32 %19, 5
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%23 = load i32, i32* %5
%24 = load i32, i32* %7
%25 = call i32 @printMyArray(i32* %22, i32 %23, i32 %24)
store i32 0, i32* %5
br label %26
26: ; preds = %21, %18
%27 = load i32, i32* %6
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
%30 = sext i32 %28 to i64
%31 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %30
store i32 %27, i32* %31
br label %46
32: ; preds = %13
%33 = load i32, i32* %4
%34 = icmp eq i32 %33, 5
br i1 %34, label %35, label %40
35: ; preds = %32
%36 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%37 = load i32, i32* %4
%38 = load i32, i32* %7
%39 = call i32 @printMyArray(i32* %36, i32 %37, i32 %38)
store i32 0, i32* %4
br label %40
40: ; preds = %35, %32
%41 = load i32, i32* %6
%42 = load i32, i32* %4
%43 = add nsw i32 %42, 1
store i32 %43, i32* %4
%44 = sext i32 %42 to i64
%45 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %44
store i32 %41, i32* %45
br label %46
46: ; preds = %40, %26
br label %47
47: ; preds = %46
%48 = load i32, i32* %8
%49 = add nsw i32 %48, 1
store i32 %49, i32* %8
br label %10
50: ; preds = %10
%51 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%52 = load i32, i32* %5
store i32 1, i32* %7
%53 = call i32 @printMyArray(i32* %51, i32 %52, i32 1)
%54 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%55 = load i32, i32* %4
store i32 0, i32* %7
%56 = call i32 @printMyArray(i32* %54, i32 %55, i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = alloca [5 x i32]
%3 = alloca i32
%4 = bitcast [5 x i32]* %1 to i8*
%5 = bitcast [5 x i32]* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
br label %9
9: ; preds = %0, %35
%10 = phi i32 [ 0, %0 ], [ %40, %35 ]
%11 = phi i32 [ 0, %0 ], [ %43, %35 ]
%12 = phi i32 [ 0, %0 ], [ %39, %35 ]
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%14 = load i32, i32* %3
%15 = srem i32 %14, 2
%16 = icmp eq i32 %15, 0
br i1 %16, label %26, label %17
17: ; preds = %9
%18 = icmp eq i32 %12, 5
br i1 %18, label %19, label %22
19: ; preds = %17
%20 = call i32 @printMyArray(i32* %7, i32 5, i32 %15)
%21 = load i32, i32* %3
br label %22
22: ; preds = %19, %17
%23 = phi i32 [ %21, %19 ], [ %14, %17 ]
%24 = phi i32 [ 0, %19 ], [ %12, %17 ]
%25 = add nsw i32 %24, 1
br label %35
26: ; preds = %9
%27 = icmp eq i32 %10, 5
br i1 %27, label %28, label %31
28: ; preds = %26
%29 = call i32 @printMyArray(i32* %8, i32 5, i32 0)
%30 = load i32, i32* %3
br label %31
31: ; preds = %28, %26
%32 = phi i32 [ %30, %28 ], [ %14, %26 ]
%33 = phi i32 [ 0, %28 ], [ %10, %26 ]
%34 = add nsw i32 %33, 1
br label %35
35: ; preds = %22, %31
%36 = phi i32 [ %24, %22 ], [ %33, %31 ]
%37 = phi [5 x i32]* [ %2, %22 ], [ %1, %31 ]
%38 = phi i32 [ %23, %22 ], [ %32, %31 ]
%39 = phi i32 [ %25, %22 ], [ %12, %31 ]
%40 = phi i32 [ %10, %22 ], [ %34, %31 ]
%41 = sext i32 %36 to i64
%42 = getelementptr inbounds [5 x i32], [5 x i32]* %37, i64 0, i64 %41
store i32 %38, i32* %42
%43 = add nuw nsw i32 %11, 1
%44 = icmp eq i32 %43, 15
br i1 %44, label %45, label %9
45: ; preds = %35
%46 = call i32 @printMyArray(i32* %7, i32 %39, i32 1)
%47 = call i32 @printMyArray(i32* %8, i32 %40, i32 0)
ret i32 0
}