#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, double);
scalar_t__ scanf(char *, int *);
int main() {
  double jie[21];
  int i;
  jie[0] = 1;
  for (i = 1; i < 21; i++)
    jie[i] = jie[i - 1] * i;
  while (scanf("%d", &i) != EOF) {
    printf("%0.0f\n", jie[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec6(%rip),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movl   $0x1,-0xb4(%rbp)
cmpl   $0x15,-0xb4(%rbp)
jge    119d <main+0x7d>
mov    -0xb4(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
cvtsi2sdl -0xb4(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movslq -0xb4(%rbp),%rax
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    114c <main+0x2c>
jmp    11a2 <main+0x82>
lea    0xe5f(%rip),%rdi
lea    -0xb4(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2e2c(%rip),%rcx
cmp    (%rcx),%rax
je     11e6 <main+0xc6>
movslq -0xb4(%rbp),%rax
movsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
lea    0xe2f(%rip),%rdi
call   1030 <printf@plt>
jmp    11a2 <main+0x82>
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xb8,%rsp
movaps 0xecb(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed3(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed7(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xedb(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xedf(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xee3(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xee7(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xee8(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movabs $0x43c0e1b3be415a00,%rax
e1 c0 43
mov    %rax,0xb0(%rsp)
movl   $0x15,0xc(%rsp)
lea    0xed0(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2e07(%rip),%r12
cmp    (%r12),%rax
je     1224 <main+0x104>
lea    0xeb5(%rip),%r14
lea    0xeab(%rip),%r15
lea    0xc(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
movslq 0xc(%rsp),%rax
movsd  0x10(%rsp,%rax,8),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    (%r12),%rax
jne    1200 <main+0xe0>
xor    %eax,%eax
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%0.0f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [21 x double]
%3 = alloca i32
store i32 0, i32* %1
%4 = getelementptr inbounds [21 x double], [21 x double]* %2, i64 0, i64 0
store double 1.000000e+00, double* %4
store i32 1, i32* %3
br label %5
5: ; preds = %20, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 21
br i1 %7, label %8, label %23
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [21 x double], [21 x double]* %2, i64 0, i64 %11
%13 = load double, double* %12
%14 = load i32, i32* %3
%15 = sitofp i32 %14 to double
%16 = fmul double %13, %15
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [21 x double], [21 x double]* %2, i64 0, i64 %18
store double %16, double* %19
br label %20
20: ; preds = %8
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %5
23: ; preds = %5
br label %24
24: ; preds = %28, %23
%25 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%26 = load i64, i64* @EOF
%27 = icmp ne i64 %25, %26
br i1 %27, label %28, label %34
28: ; preds = %24
%29 = load i32, i32* %3
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [21 x double], [21 x double]* %2, i64 0, i64 %30
%32 = load double, double* %31
%33 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %32)
br label %24
34: ; preds = %24
%35 = load i32, i32* %1
ret i32 %35
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%0.0f\0A\00"
define i32 @main() {
%1 = alloca [21 x double]
%2 = alloca i32
%3 = bitcast [21 x double]* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = bitcast [21 x double]* %1 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %5
%6 = getelementptr inbounds [21 x double], [21 x double]* %1, i64 0, i64 2
%7 = bitcast double* %6 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 6.000000e+00>, <2 x double>* %7
%8 = getelementptr inbounds [21 x double], [21 x double]* %1, i64 0, i64 4
%9 = bitcast double* %8 to <2 x double>*
store <2 x double> <double 2.400000e+01, double 1.200000e+02>, <2 x double>* %9
%10 = getelementptr inbounds [21 x double], [21 x double]* %1, i64 0, i64 6
%11 = bitcast double* %10 to <2 x double>*
store <2 x double> <double 7.200000e+02, double 5.040000e+03>, <2 x double>* %11
%12 = getelementptr inbounds [21 x double], [21 x double]* %1, i64 0, i64 8
%13 = bitcast double* %12 to <2 x double>*
store <2 x double> <double 4.032000e+04, double 3.628800e+05>, <2 x double>* %13
%14 = getelementptr inbounds [21 x double], [21 x double]* %1, i64 0, i64 10
%15 = bitcast double* %14 to <2 x double>*
store <2 x double> <double 3.628800e+06, double 3.991680e+07>, <2 x double>* %15
%16 = getelementptr inbounds [21 x double], [21 x double]* %1, i64 0, i64 12
%17 = bitcast double* %16 to <2 x double>*
store <2 x double> <double 0x41BC8CFC00000000, double 0x41F7328CC0000000>, <2 x double>* %17
%18 = getelementptr inbounds [21 x double], [21 x double]* %1, i64 0, i64 14
%19 = bitcast double* %18 to <2 x double>*
store <2 x double> <double 0x42344C3B28000000, double 0x4273077775800000>, <2 x double>* %19
%20 = getelementptr inbounds [21 x double], [21 x double]* %1, i64 0, i64 16
%21 = bitcast double* %20 to <2 x double>*
store <2 x double> <double 0x42B3077775800000, double 0x42F437EEECD80000>, <2 x double>* %21
%22 = getelementptr inbounds [21 x double], [21 x double]* %1, i64 0, i64 18
%23 = bitcast double* %22 to <2 x double>*
store <2 x double> <double 0x4336BEECCA730000, double 0x437B02B930689000>, <2 x double>* %23
%24 = getelementptr inbounds [21 x double], [21 x double]* %1, i64 0, i64 20
store double 0x43C0E1B3BE415A00, double* %24
store i32 21, i32* %2
%25 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%26 = load i64, i64* @EOF
%27 = icmp eq i64 %25, %26
br i1 %27, label %37, label %28
28: ; preds = %0, %28
%29 = load i32, i32* %2
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [21 x double], [21 x double]* %1, i64 0, i64 %30
%32 = load double, double* %31
%33 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %32)
%34 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%35 = load i64, i64* @EOF
%36 = icmp eq i64 %34, %35
br i1 %36, label %37, label %28
37: ; preds = %28, %0
ret i32 0
}