#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 atol(char *);
int /*<<< orphan*/ function_F(long);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  long i, to;
  if (argc > 1)
    to = atol(argv[1]);
  else
    to = 300;
  for (i = 0; i < to; i++)
    printf("F(%ld) = %f\n", i, function_F(i));
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1166 <main+0x36>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atol@plt>
mov    %rax,-0x20(%rbp)
jmp    116e <main+0x3e>
movq   $0x12c,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    11ba <main+0x8a>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <function_F@plt>
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1176 <main+0x46>
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x12c,%r15d
cmp    $0x2,%edi
jl     1161 <main+0x21>
mov    0x8(%rsi),%rdi
call   1060 <atol@plt>
mov    %rax,%r15
test   %rax,%rax
jle    1190 <main+0x50>
lea    0xe98(%rip),%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <function_F@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1170 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [13 x i8] c"F(%ld) = %f\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 1
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i64 @atol(i8* %13)
store i64 %14, i64* %7
br label %16
15: ; preds = %2
store i64 300, i64* %7
br label %16
16: ; preds = %15, %10
store i64 0, i64* %6
br label %17
17: ; preds = %26, %16
%18 = load i64, i64* %6
%19 = load i64, i64* %7
%20 = icmp slt i64 %18, %19
br i1 %20, label %21, label %29
21: ; preds = %17
%22 = load i64, i64* %6
%23 = load i64, i64* %6
%24 = call i32 @function_F(i64 %23)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 %22, i32 %24)
br label %26
26: ; preds = %21
%27 = load i64, i64* %6
%28 = add nsw i64 %27, 1
store i64 %28, i64* %6
br label %17
29: ; preds = %17
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"F(%ld) = %f\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @atol(i8* %6)
%8 = icmp sgt i64 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %2, %4
%10 = phi i64 [ %7, %4 ], [ 300, %2 ]
br label %11
11: ; preds = %9, %11
%12 = phi i64 [ %15, %11 ], [ 0, %9 ]
%13 = tail call i32 @function_F(i64 %12)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 %12, i32 %13)
%15 = add nuw nsw i64 %12, 1
%16 = icmp eq i64 %15, %10
br i1 %16, label %17, label %11
17: ; preds = %11, %4
%18 = tail call i32 @putchar(i32 10)
ret i32 0
}