#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*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
int main() {
  int N, X, I, I1, I2;
  I1 = 0, I2 = 0;
  scanf("%d", &N);
  if (N < 10000) {
    for (I = 0; I < N; I++) {
      scanf("%d", &X);
      if (X >= 10 && X <= 20)
        I1++;
      else
        I2++;
    }
  }
  printf("%d in\n", I1);
  printf("%d out\n", I2);
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xeac(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x2710,-0x8(%rbp)
jge    11d0 <main+0xa0>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11cb <main+0x9b>
lea    0xe7c(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0xa,-0xc(%rbp)
jl     11af <main+0x7f>
cmpl   $0x14,-0xc(%rbp)
jg     11af <main+0x7f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11b8 <main+0x88>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11bd <main+0x8d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1171 <main+0x41>
jmp    11d0 <main+0xa0>
mov    -0x14(%rbp),%esi
lea    0xe29(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xe21(%rip),%rdi
call   1040 <printf@plt>
lea    0xe1d(%rip),%rdi
call   1030 <system@plt>
xor    %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
lea    0xebd(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x8(%rsp),%eax
add    $0xffffffff,%eax
xor    %ebp,%ebp
mov    $0x0,%r12d
cmp    $0x270e,%eax
ja     11a8 <main+0x78>
xor    %r12d,%r12d
lea    0xe93(%rip),%r14
lea    0xc(%rsp),%r15
xor    %ebp,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
add    $0xfffffff6,%eax
cmp    $0xb,%eax
adc    $0x0,%ebp
cmp    $0xb,%eax
sbb    $0xffffffff,%r12d
add    $0x1,%ebx
cmp    0x8(%rsp),%ebx
jl     1180 <main+0x50>
lea    0xe54(%rip),%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
lea    0xe4d(%rip),%rdi
mov    %r12d,%esi
call   1040 <printf@plt>
lea    0xe46(%rip),%rdi
call   1030 <system@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 = [7 x i8] c"%d in\0A\00"
@.str.2 = [8 x i8] c"%d out\0A\00"
@.str.3 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %5
store i32 0, i32* %6
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 10000
br i1 %9, label %10, label %33
10: ; preds = %0
store i32 0, i32* %4
br label %11
11: ; preds = %29, %10
%12 = load i32, i32* %4
%13 = load i32, i32* %2
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %32
15: ; preds = %11
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%17 = load i32, i32* %3
%18 = icmp sge i32 %17, 10
br i1 %18, label %19, label %25
19: ; preds = %15
%20 = load i32, i32* %3
%21 = icmp sle i32 %20, 20
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
store i32 %24, i32* %5
br label %28
25: ; preds = %19, %15
%26 = load i32, i32* %6
%27 = add nsw i32 %26, 1
store i32 %27, i32* %6
br label %28
28: ; preds = %25, %22
br label %29
29: ; preds = %28
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1
store i32 %31, i32* %4
br label %11
32: ; preds = %11
br label %33
33: ; preds = %32, %0
%34 = load i32, i32* %5
%35 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %34)
%36 = load i32, i32* %6
%37 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %36)
%38 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%d in\0A\00"
@.str.2 = [8 x i8] c"%d out\0A\00"
@.str.3 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast 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 = add i32 %6, -1
%8 = icmp ult i32 %7, 9999
br i1 %8, label %9, label %25
9: ; preds = %0, %9
%10 = phi i32 [ %21, %9 ], [ 0, %0 ]
%11 = phi i32 [ %18, %9 ], [ 0, %0 ]
%12 = phi i32 [ %22, %9 ], [ 0, %0 ]
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%14 = load i32, i32* %2
%15 = add i32 %14, -10
%16 = icmp ult i32 %15, 11
%17 = zext i1 %16 to i32
%18 = add nuw nsw i32 %11, %17
%19 = xor i1 %16, true
%20 = zext i1 %19 to i32
%21 = add nuw nsw i32 %10, %20
%22 = add nuw nsw i32 %12, 1
%23 = load i32, i32* %1
%24 = icmp slt i32 %22, %23
br i1 %24, label %9, label %25
25: ; preds = %9, %0
%26 = phi i32 [ 0, %0 ], [ %18, %9 ]
%27 = phi i32 [ 0, %0 ], [ %21, %9 ]
%28 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %26)
%29 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %27)
%30 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}