#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 main() {
  printf("n e\n");
  printf("- -----------\n");
  printf("0 1\n");
  printf("1 2\n");
  printf("2 2.5\n");
  int index, temp = 2;
  double e = 2.5;
  for (index = 3; index < 10; index++) {
    temp *= index;
    e += 1.0 / temp;
    printf("%d %.9lf\n", index, e);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x2,-0xc(%rbp)
movsd  0xe8c(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x3,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    11d3 <main+0xc3>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe67(%rip),%xmm0
divsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
lea    0xe77(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1180 <main+0x70>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf1a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf12(%rip),%rdi
call   1030 <puts@plt>
lea    0xf14(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rbx
movsd  0xe94(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe85(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe76(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe67(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x6,%esi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe58(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe49(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe3a(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"n e\0A\00"
@.str.1 = [15 x i8] c"- -----------\0A\00"
@.str.2 = [5 x i8] c"0 1\0A\00"
@.str.3 = [5 x i8] c"1 2\0A\00"
@.str.4 = [7 x i8] c"2 2.5\0A\00"
@.str.5 = [10 x i8] c"%d %.9lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
store i32 2, i32* %3
store double 2.500000e+00, double* %4
store i32 3, i32* %2
br label %10
10: ; preds = %25, %0
%11 = load i32, i32* %2
%12 = icmp slt i32 %11, 10
br i1 %12, label %13, label %28
13: ; preds = %10
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = mul nsw i32 %15, %14
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = sitofp i32 %17 to double
%19 = fdiv double 1.000000e+00, %18
%20 = load double, double* %4
%21 = fadd double %20, %19
store double %21, double* %4
%22 = load i32, i32* %2
%23 = load double, double* %4
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %22, double %23)
br label %25
25: ; preds = %13
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 1
store i32 %27, i32* %2
br label %10
28: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str.5 = [10 x i8] c"%d %.9lf\0A\00"
@str = [4 x i8] c"n e\00"
@str.6 = [14 x i8] c"- -----------\00"
@str.7 = [4 x i8] c"0 1\00"
@str.8 = [4 x i8] c"1 2\00"
@str.9 = [6 x i8] c"2 2.5\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.6, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.7, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.8, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.9, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 3, double 0x4005555555555555)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 4, double 0x4005AAAAAAAAAAAA)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 5, double 0x4005BBBBBBBBBBBB)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 6, double 0x4005BE93E93E93E9)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 7, double 0x4005BEFBEFBEFBF0)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 8, double 0x4005BF08F08F08F1)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 9, double 0x4005BF0A626D4346)
ret i32 0
}