#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 a[11], v[2] = {0, 0};
  for (*a = 0; *a < 10 ||
               0 * printf("홀수 번째 합 : %d\n짝수 번째 합 : %d\n", v[1], v[0]);
       scanf("%d", ++*a + a), v[*a % 2] += a[*a])
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x38(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
movl   $0x0,-0x30(%rbp)
mov    $0x1,%al
cmpl   $0xa,-0x30(%rbp)
mov    %al,-0x39(%rbp)
jl     1183 <main+0x53>
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
imul   $0x0,%eax,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x39(%rbp)
mov    -0x39(%rbp),%al
test   $0x1,%al
jne    1193 <main+0x63>
jmp    11dd <main+0xad>
jmp    1198 <main+0x68>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
lea    -0x30(%rbp),%rsi
cltq
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe7a(%rip),%rdi
call   1050 <scanf@plt>
movslq -0x30(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
mov    -0x30(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
movslq %edx,%rax
add    -0x38(%rbp,%rax,4),%ecx
mov    %ecx,-0x38(%rbp,%rax,4)
jmp    1156 <main+0x26>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
movq   $0x0,0x8(%rsp)
xor    %eax,%eax
lea    0xef8(%rip),%rbx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rax),%ecx
mov    %ecx,0x10(%rsp)
cltq
lea    (%rsp,%rax,4),%rsi
add    $0x14,%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movslq 0x10(%rsp),%rax
mov    0x10(%rsp,%rax,4),%ecx
mov    %eax,%edx
shr    $0x1f,%edx
add    %eax,%edx
and    $0xfffffffe,%edx
mov    %eax,%esi
sub    %edx,%esi
movslq %esi,%rdx
add    %ecx,0x8(%rsp,%rdx,4)
cmp    $0xa,%rax
jl     1140 <main+0x20>
mov    0x8(%rsp),%edx
mov    0xc(%rsp),%esi
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"\ED\99\80\EC\88\98 \EB\B2\88\EC\A7\B8 \ED\95\A9 : %d\0A\EC\A7\9D\EC\88\98 \EB\B2\88\EC\A7\B8 \ED\95\A9 : %d\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i32]
%3 = alloca [2 x i32]
store i32 0, i32* %1
%4 = bitcast [2 x i32]* %3 to i8*
%5 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
store i32 0, i32* %5
br label %6
6: ; preds = %21, %0
%7 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, 10
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%12 = load i32, i32* %11
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%14 = load i32, i32* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %14)
%16 = mul nsw i32 0, %15
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %10, %6
%19 = phi i1 [ true, %6 ], [ %17, %10 ]
br i1 %19, label %20, label %41
20: ; preds = %18
br label %21
21: ; preds = %20
%22 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%23 = load i32, i32* %22
%24 = add nsw i32 %23, 1
store i32 %24, i32* %22
%25 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%26 = sext i32 %24 to i64
%27 = getelementptr inbounds i32, i32* %25, i64 %26
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %27)
%29 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%30 = load i32, i32* %29
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%35 = load i32, i32* %34
%36 = srem i32 %35, 2
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 %37
%39 = load i32, i32* %38
%40 = add nsw i32 %39, %33
store i32 %40, i32* %38
br label %6
41: ; preds = %18
%42 = load i32, i32* %1
ret i32 %42
}

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