#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 */
long _association();
long _commonSubexpressionElimination();
long _constantFolding();
long _constantPropagation();
long _deadCodeElimination();
long _doubleIf();
long _hoisting();
long _integerDivide();
long _interProceduralOptimization();
long _iterativeFibonacci(long);
long _randomCalculation(long);
long _recursiveFibonacci(long);
long _tailRecursion(long);
long _unswitching();
int /*<<< orphan*/ printf(char *, long);
int /*<<< orphan*/ scanf(char *, long *);
long _main() {
  long EV_input;
  long EV_result;
  long EV_i;
  scanf("%ld", &EV_input);
  EV_i = 1;
  while ((EV_i < EV_input)) {
    EV_result = _constantFolding();
    printf("%ld\n", (long)EV_result);
    EV_result = _constantPropagation();
    printf("%ld\n", (long)EV_result);
    EV_result = _deadCodeElimination();
    printf("%ld\n", (long)EV_result);
    EV_result = _interProceduralOptimization();
    printf("%ld\n", (long)EV_result);
    EV_result = _commonSubexpressionElimination();
    printf("%ld\n", (long)EV_result);
    EV_result = _hoisting();
    printf("%ld\n", (long)EV_result);
    EV_result = _doubleIf();
    printf("%ld\n", (long)EV_result);
    EV_result = _integerDivide();
    printf("%ld\n", (long)EV_result);
    EV_result = _association();
    printf("%ld\n", (long)EV_result);
    EV_result = _tailRecursion((EV_input / 1000));
    printf("%ld\n", (long)EV_result);
    EV_result = _unswitching();
    printf("%ld\n", (long)EV_result);
    EV_result = _randomCalculation(EV_input);
    printf("%ld\n", (long)EV_result);
    EV_result = _iterativeFibonacci((EV_input / 5));
    printf("%ld\n", (long)EV_result);
    EV_result = _recursiveFibonacci((EV_input / 1000));
    printf("%ld\n", (long)EV_result);
    EV_i = (EV_i + 1);
  }
  printf("%ld\n", (long)9999);
  return 0;
}


x86 assembly (clang, -O0):
<_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xdf1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   10d0 <scanf@plt>
movq   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    13e8 <_main+0x1e8>
mov    $0x0,%al
call   10a0 <_constantFolding@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xdc0(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1110 <_constantPropagation@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xda5(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1100 <_deadCodeElimination@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xd8a(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1080 <_interProceduralOptimization@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xd6f(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1070 <_commonSubexpressionElimination@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xd54(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <_hoisting@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xd39(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   10b0 <_doubleIf@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xd1e(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   10c0 <_integerDivide@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xd03(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   10e0 <_association@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xce8(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
mov    %rax,%rdi
call   1090 <_tailRecursion@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xcbe(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   10f0 <_unswitching@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xca3(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <_randomCalculation@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xc86(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%rax
mov    $0x5,%ecx
cqto
idiv   %rcx
mov    %rax,%rdi
call   1060 <_iterativeFibonacci@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xc5c(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
mov    %rax,%rdi
call   1120 <_recursiveFibonacci@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xc32(%rip),%rdi
call   1050 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1220 <_main+0x20>
lea    0xc15(%rip),%rdi
mov    $0x270f,%esi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xdf1(%rip),%rdi
mov    %rsp,%rsi
call   10d0 <scanf@plt>
cmpq   $0x2,(%rsp)
jl     1394 <_main+0x194>
mov    $0x1,%r12d
lea    0xdd5(%rip),%rbx
movabs $0x20c49ba5e353f7cf,%r14
9b c4 20
movabs $0x6666666666666667,%r15
66 66 66
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   10a0 <_constantFolding@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   1110 <_constantPropagation@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   1100 <_deadCodeElimination@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   1080 <_interProceduralOptimization@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   1070 <_commonSubexpressionElimination@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <_hoisting@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   10b0 <_doubleIf@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   10c0 <_integerDivide@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   10e0 <_association@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    %r14,%rax
imulq  (%rsp)
mov    %rdx,%rdi
shr    $0x3f,%rdi
sar    $0x7,%rdx
add    %rdx,%rdi
call   1090 <_tailRecursion@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   10f0 <_unswitching@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    (%rsp),%rdi
call   1030 <_randomCalculation@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    %r15,%rax
imulq  (%rsp)
mov    %rdx,%rdi
shr    $0x3f,%rdi
sar    %rdx
add    %rdx,%rdi
call   1060 <_iterativeFibonacci@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    %r14,%rax
imulq  (%rsp)
mov    %rdx,%rdi
shr    $0x3f,%rdi
sar    $0x7,%rdx
add    %rdx,%rdi
call   1120 <_recursiveFibonacci@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
add    $0x1,%r12
cmp    (%rsp),%r12
jl     1250 <_main+0x50>
lea    0xc69(%rip),%rdi
mov    $0x270f,%esi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i64 @_main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
store i64 1, i64* %3
br label %5
5: ; preds = %9, %0
%6 = load i64, i64* %3
%7 = load i64, i64* %1
%8 = icmp slt i64 %6, %7
br i1 %8, label %9, label %61
9: ; preds = %5
%10 = call i64 (...) @_constantFolding()
store i64 %10, i64* %2
%11 = load i64, i64* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %11)
%13 = call i64 (...) @_constantPropagation()
store i64 %13, i64* %2
%14 = load i64, i64* %2
%15 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %14)
%16 = call i64 (...) @_deadCodeElimination()
store i64 %16, i64* %2
%17 = load i64, i64* %2
%18 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %17)
%19 = call i64 (...) @_interProceduralOptimization()
store i64 %19, i64* %2
%20 = load i64, i64* %2
%21 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %20)
%22 = call i64 (...) @_commonSubexpressionElimination()
store i64 %22, i64* %2
%23 = load i64, i64* %2
%24 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %23)
%25 = call i64 (...) @_hoisting()
store i64 %25, i64* %2
%26 = load i64, i64* %2
%27 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %26)
%28 = call i64 (...) @_doubleIf()
store i64 %28, i64* %2
%29 = load i64, i64* %2
%30 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %29)
%31 = call i64 (...) @_integerDivide()
store i64 %31, i64* %2
%32 = load i64, i64* %2
%33 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %32)
%34 = call i64 (...) @_association()
store i64 %34, i64* %2
%35 = load i64, i64* %2
%36 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %35)
%37 = load i64, i64* %1
%38 = sdiv i64 %37, 1000
%39 = call i64 @_tailRecursion(i64 %38)
store i64 %39, i64* %2
%40 = load i64, i64* %2
%41 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %40)
%42 = call i64 (...) @_unswitching()
store i64 %42, i64* %2
%43 = load i64, i64* %2
%44 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %43)
%45 = load i64, i64* %1
%46 = call i64 @_randomCalculation(i64 %45)
store i64 %46, i64* %2
%47 = load i64, i64* %2
%48 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %47)
%49 = load i64, i64* %1
%50 = sdiv i64 %49, 5
%51 = call i64 @_iterativeFibonacci(i64 %50)
store i64 %51, i64* %2
%52 = load i64, i64* %2
%53 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %52)
%54 = load i64, i64* %1
%55 = sdiv i64 %54, 1000
%56 = call i64 @_recursiveFibonacci(i64 %55)
store i64 %56, i64* %2
%57 = load i64, i64* %2
%58 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %57)
%59 = load i64, i64* %3
%60 = add nsw i64 %59, 1
store i64 %60, i64* %3
br label %5
61: ; preds = %5
%62 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 9999)
ret i64 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i64 @_main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = icmp sgt i64 %4, 1
br i1 %5, label %6, label %46
6: ; preds = %0, %6
%7 = phi i64 [ %43, %6 ], [ 1, %0 ]
%8 = call i64 (...) @_constantFolding()
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %8)
%10 = call i64 (...) @_constantPropagation()
%11 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %10)
%12 = call i64 (...) @_deadCodeElimination()
%13 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %12)
%14 = call i64 (...) @_interProceduralOptimization()
%15 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %14)
%16 = call i64 (...) @_commonSubexpressionElimination()
%17 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %16)
%18 = call i64 (...) @_hoisting()
%19 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %18)
%20 = call i64 (...) @_doubleIf()
%21 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %20)
%22 = call i64 (...) @_integerDivide()
%23 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %22)
%24 = call i64 (...) @_association()
%25 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %24)
%26 = load i64, i64* %1
%27 = sdiv i64 %26, 1000
%28 = call i64 @_tailRecursion(i64 %27)
%29 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %28)
%30 = call i64 (...) @_unswitching()
%31 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %30)
%32 = load i64, i64* %1
%33 = call i64 @_randomCalculation(i64 %32)
%34 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %33)
%35 = load i64, i64* %1
%36 = sdiv i64 %35, 5
%37 = call i64 @_iterativeFibonacci(i64 %36)
%38 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %37)
%39 = load i64, i64* %1
%40 = sdiv i64 %39, 1000
%41 = call i64 @_recursiveFibonacci(i64 %40)
%42 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %41)
%43 = add nuw nsw i64 %7, 1
%44 = load i64, i64* %1
%45 = icmp slt i64 %43, %44
br i1 %45, label %6, label %46
46: ; preds = %6, %0
%47 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 9999)
ret i64 0
}