int main() {
  int i, n, s3 = 0, s5 = 0;
  for (i = 0; i < 10; i++)
    scanf("%d", &n), s3 += !(n % 3), s5 += !(n % 5);
  return 0 * printf("3의 배수 : %d개\n5의 배수 : %d개\n", s3, s5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    11aa <main+0x8a>
lea    0xeab(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <main+0x24>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
imul   $0x0,%eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    $0xa,%ebx
lea    0xec8(%rip),%r14
lea    0xc(%rsp),%r15
xor    %r12d,%r12d
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
imul   $0xaaaaaaab,%eax,%ecx
add    $0x2aaaaaaa,%ecx
cmp    $0x55555555,%ecx
adc    $0x0,%ebp
imul   $0xcccccccd,%eax,%eax
add    $0x19999999,%eax
cmp    $0x33333333,%eax
adc    $0x0,%r12d
add    $0xffffffff,%ebx
jne    1150 <main+0x30>
lea    0xe6d(%rip),%rdi
mov    %ebp,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [41 x i8] c"3\EC\9D\98 \EB\B0\B0\EC\88\98 : %d\EA\B0\9C\0A5\EC\9D\98 \EB\B0\B0\EC\88\98 : %d\EA\B0\9C\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %2
br label %6
6: ; preds = %25, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %28
9: ; preds = %6
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %3
%12 = srem i32 %11, 3
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
%16 = load i32, i32* %4
%17 = add nsw i32 %16, %15
store i32 %17, i32* %4
%18 = load i32, i32* %3
%19 = srem i32 %18, 5
%20 = icmp ne i32 %19, 0
%21 = xor i1 %20, true
%22 = zext i1 %21 to i32
%23 = load i32, i32* %5
%24 = add nsw i32 %23, %22
store i32 %24, i32* %5
br label %25
25: ; preds = %9
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 1
store i32 %27, i32* %2
br label %6
28: ; preds = %6
%29 = load i32, i32* %4
%30 = load i32, i32* %5
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %29, i32 %30)
%32 = mul nsw i32 0, %31
ret i32 %32
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [41 x i8] c"3\EC\9D\98 \EB\B0\B0\EC\88\98 : %d\EA\B0\9C\0A5\EC\9D\98 \EB\B0\B0\EC\88\98 : %d\EA\B0\9C\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %16, %3 ]
%5 = phi i32 [ 0, %0 ], [ %12, %3 ]
%6 = phi i32 [ 0, %0 ], [ %17, %3 ]
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = srem i32 %8, 3
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %5, %11
%13 = srem i32 %8, 5
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i32
%16 = add nuw nsw i32 %4, %15
%17 = add nuw nsw i32 %6, 1
%18 = icmp eq i32 %17, 10
br i1 %18, label %19, label %3
19: ; preds = %3
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %16)
ret i32 0
}