#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 count_digits(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int evenNum = 0, oddNum = 0, i, n, a[100];
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 0; i < n; i++) {
    if ((count_digits(a[i])) % 2 == 0)
      evenNum++;
    else
      oddNum++;
  }
  printf("Even digits numbers count: %d\n", evenNum);
  printf("Odd digits numbers count: %d\n", oddNum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xea9(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    119f <main+0x6f>
movslq -0x10(%rbp),%rax
lea    -0x1b0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe74(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1167 <main+0x37>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11fd <main+0xcd>
movslq -0x10(%rbp),%rax
mov    -0x1b0(%rbp,%rax,4),%edi
call   1040 <count_digits@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11e1 <main+0xb1>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11ea <main+0xba>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11ef <main+0xbf>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11a6 <main+0x76>
mov    -0x8(%rbp),%esi
lea    0xdfc(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe0c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x1a0,%rsp
lea    0xebe(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11c4 <main+0x94>
lea    0x10(%rsp),%rbx
xor    %ebp,%ebp
lea    0xe9f(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
add    $0x1,%rbp
movslq 0xc(%rsp),%rax
add    $0x4,%rbx
cmp    %rax,%rbp
jl     1170 <main+0x40>
test   %eax,%eax
jle    11c4 <main+0x94>
xor    %ebx,%ebx
xor    %r14d,%r14d
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    0x10(%rsp,%rbx,4),%edi
call   1040 <count_digits@plt>
and    $0x1,%eax
add    %eax,%r14d
xor    $0x1,%eax
add    %eax,%ebp
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
cmp    %rax,%rbx
jl     11a0 <main+0x70>
jmp    11c9 <main+0x99>
xor    %ebp,%ebp
xor    %r14d,%r14d
lea    0xe33(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    0xe44(%rip),%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [31 x i8] c"Even digits numbers count: %d\0A\00"
@.str.2 = [30 x i8] c"Odd digits numbers count: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i32]
%3 = bitcast i32* %1 to i8*
%4 = bitcast [100 x i32]* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 0
br i1 %7, label %10, label %33
8: ; preds = %10
%9 = icmp sgt i32 %15, 0
br i1 %9, label %18, label %33
10: ; preds = %0, %10
%11 = phi i64 [ %14, %10 ], [ 0, %0 ]
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %11
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %12)
%14 = add nuw nsw i64 %11, 1
%15 = load i32, i32* %1
%16 = sext i32 %15 to i64
%17 = icmp slt i64 %14, %16
br i1 %17, label %10, label %8
18: ; preds = %8, %18
%19 = phi i64 [ %29, %18 ], [ 0, %8 ]
%20 = phi i32 [ %28, %18 ], [ 0, %8 ]
%21 = phi i32 [ %27, %18 ], [ 0, %8 ]
%22 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %19
%23 = load i32, i32* %22
%24 = call i32 @count_digits(i32 %23)
%25 = and i32 %24, 1
%26 = xor i32 %25, 1
%27 = add nuw nsw i32 %26, %21
%28 = add nuw nsw i32 %25, %20
%29 = add nuw nsw i64 %19, 1
%30 = load i32, i32* %1
%31 = sext i32 %30 to i64
%32 = icmp slt i64 %29, %31
br i1 %32, label %18, label %33
33: ; preds = %18, %0, %8
%34 = phi i32 [ 0, %8 ], [ 0, %0 ], [ %27, %18 ]
%35 = phi i32 [ 0, %8 ], [ 0, %0 ], [ %28, %18 ]
%36 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %34)
%37 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %35)
ret i32 0
}