#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 printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, c[2] = {0, 0};
  for (;;) {
    scanf("%d", &n);
    if (!n)
      return 0 * printf("홀수 : %d개\n짝수 : %d개\n", c[1], c[0]);
    c[n % 2]++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1184 <main+0x54>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
imul   $0x0,%eax,%eax
add    $0x10,%rsp
pop    %rbp
ret
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    -0x10(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x10(%rbp,%rax,4)
jmp    114f <main+0x1f>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
lea    0xec9(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
je     1190 <main+0x70>
lea    0xeb0(%rip),%r14
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
cltq
addl   $0x1,0x10(%rsp,%rax,4)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jne    1160 <main+0x40>
mov    0x10(%rsp),%edx
mov    0x14(%rsp),%esi
jmp    1194 <main+0x74>
xor    %edx,%edx
xor    %esi,%esi
lea    0xe68(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [31 x i8] c"\ED\99\80\EC\88\98 : %d\EA\B0\9C\0A\EC\A7\9D\EC\88\98 : %d\EA\B0\9C\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [2 x i32]
store i32 0, i32* %1
%4 = bitcast [2 x i32]* %3 to i8*
br label %5
5: ; preds = %16, %0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %5
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%11 = load i32, i32* %10
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%13 = load i32, i32* %12
%14 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %11, i32 %13)
%15 = mul nsw i32 0, %14
ret i32 %15
16: ; preds = %5
%17 = load i32, i32* %2
%18 = srem i32 %17, 2
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = add nsw i32 %21, 1
store i32 %22, i32* %20
br label %5
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [31 x i8] c"\ED\99\80\EC\88\98 : %d\EA\B0\9C\0A\EC\A7\9D\EC\88\98 : %d\EA\B0\9C\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = bitcast i64* %2 to [2 x i32]*
%4 = bitcast i32* %1 to i8*
%5 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 0
br i1 %8, label %14, label %18
9: ; preds = %18
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%11 = load i32, i32* %10
%12 = bitcast i64* %2 to i32*
%13 = load i32, i32* %12
br label %14
14: ; preds = %0, %9
%15 = phi i32 [ %13, %9 ], [ 0, %0 ]
%16 = phi i32 [ %11, %9 ], [ 0, %0 ]
%17 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %15)
ret i32 0
18: ; preds = %0, %18
%19 = phi i32 [ %26, %18 ], [ %7, %0 ]
%20 = srem i32 %19, 2
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 %21
%23 = load i32, i32* %22
%24 = add nsw i32 %23, 1
store i32 %24, i32* %22
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%26 = load i32, i32* %1
%27 = icmp eq i32 %26, 0
br i1 %27, label %9, label %18
}