#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 main() {
  int fat = 1;
  for (int termo = 2; termo <= 20; termo += 2) {
    fat *= termo - 1;
    fat *= termo;
    printf("%d\n", fat);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jg     116b <main+0x5b>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x18,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2d0,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9d80,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x375f00,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1c8cfc00,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4c3b2800,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x77758000,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xca730000,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x82b40000,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
br label %4
4: ; preds = %17, %0
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 20
br i1 %6, label %7, label %20
7: ; preds = %4
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = load i32, i32* %2
%11 = mul nsw i32 %10, %9
store i32 %11, i32* %2
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = mul nsw i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %7
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 2
store i32 %19, i32* %3
br label %4
20: ; preds = %4
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 24)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 720)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 40320)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3628800)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 479001600)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1278945280)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2004189184)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -898433024)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -2102132736)
ret i32 0
}