#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 main() {
  int n, x, i, in = 0, out = 0;
  scanf("%d", &n);
  if (n < 10000) {
    for (i = 1; i <= n; i++) {
      scanf("%d", &x);
      if (x >= 10 && x <= 20) {
        in++;
      } else if (x < 10 || x > 20) {
        out++;
      }
    }
    printf("%d in\n", in);
    printf("%d out\n", out);
  }
  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    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x2710,-0x8(%rbp)
jge    11f2 <main+0xd2>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11d4 <main+0xb4>
lea    0xe8c(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0xa,-0xc(%rbp)
jl     119f <main+0x7f>
cmpl   $0x14,-0xc(%rbp)
jg     119f <main+0x7f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11c1 <main+0xa1>
cmpl   $0xa,-0xc(%rbp)
jl     11b3 <main+0x93>
cmpl   $0x14,-0xc(%rbp)
jle    11bc <main+0x9c>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11c1 <main+0xa1>
jmp    11c6 <main+0xa6>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1161 <main+0x41>
mov    -0x14(%rbp),%esi
lea    0xe25(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xe1d(%rip),%rdi
call   1030 <printf@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    0xecd(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
cmp    $0x270f,%eax
jg     11ac <main+0x8c>
test   %eax,%eax
jle    118a <main+0x6a>
xor    %ebx,%ebx
lea    0xeab(%rip),%r14
lea    0xc(%rsp),%r15
xor    %r12d,%r12d
xor    %ebp,%ebp
nop
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <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     1160 <main+0x40>
jmp    118f <main+0x6f>
xor    %ebp,%ebp
xor    %r12d,%r12d
lea    0xe6d(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    0xe66(%rip),%rdi
mov    %r12d,%esi
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 = [7 x i8] c"%d in\0A\00"
@.str.2 = [8 x i8] c"%d out\0A\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 %44
10: ; preds = %0
store i32 1, i32* %4
br label %11
11: ; preds = %36, %10
%12 = load i32, i32* %4
%13 = load i32, i32* %2
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %39
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 %35
25: ; preds = %19, %15
%26 = load i32, i32* %3
%27 = icmp slt i32 %26, 10
br i1 %27, label %31, label %28
28: ; preds = %25
%29 = load i32, i32* %3
%30 = icmp sgt i32 %29, 20
br i1 %30, label %31, label %34
31: ; preds = %28, %25
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
store i32 %33, i32* %6
br label %34
34: ; preds = %31, %28
br label %35
35: ; preds = %34, %22
br label %36
36: ; preds = %35
%37 = load i32, i32* %4
%38 = add nsw i32 %37, 1
store i32 %38, i32* %4
br label %11
39: ; preds = %11
%40 = load i32, i32* %5
%41 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %40)
%42 = load i32, i32* %6
%43 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %42)
br label %44
44: ; preds = %39, %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"
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 = icmp slt i32 %6, 10000
br i1 %7, label %8, label %31
8: ; preds = %0
%9 = icmp slt i32 %6, 1
br i1 %9, label %26, label %10
10: ; preds = %8, %10
%11 = phi i32 [ %22, %10 ], [ 0, %8 ]
%12 = phi i32 [ %19, %10 ], [ 0, %8 ]
%13 = phi i32 [ %23, %10 ], [ 1, %8 ]
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%15 = load i32, i32* %2
%16 = add i32 %15, -10
%17 = icmp ult i32 %16, 11
%18 = zext i1 %17 to i32
%19 = add nuw nsw i32 %12, %18
%20 = xor i1 %17, true
%21 = zext i1 %20 to i32
%22 = add nuw nsw i32 %11, %21
%23 = add nuw nsw i32 %13, 1
%24 = load i32, i32* %1
%25 = icmp slt i32 %13, %24
br i1 %25, label %10, label %26
26: ; preds = %10, %8
%27 = phi i32 [ 0, %8 ], [ %19, %10 ]
%28 = phi i32 [ 0, %8 ], [ %22, %10 ]
%29 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %27)
%30 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %28)
br label %31
31: ; preds = %26, %0
ret i32 0
}