#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*/ PrintFib(long long *);
int main(int argc, char **argv) {
  long long lNumberOfTimes;
  if (argc < 2)
    lNumberOfTimes = 23;
  else
    lNumberOfTimes = (long)argv[1];
  long long lNumbers[3] = {0, 1, 1};
  long long lCount;
  for (lCount = 0; lCount < lNumberOfTimes; lCount++) {
    PrintFib(lNumbers);
    lNumbers[0] = lNumbers[1];
    lNumbers[1] = lNumbers[2];
    lNumbers[2] = lNumbers[0] + lNumbers[1];
    lNumbers[0] = lNumbers[1];
    lNumbers[1] = lNumbers[2];
    lNumbers[2] = lNumbers[0] + lNumbers[1];
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    113d <main+0x2d>
movq   $0x17,-0x18(%rbp)
jmp    1149 <main+0x39>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xead(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    11d2 <main+0xc2>
lea    -0x30(%rbp),%rdi
call   1030 <PrintFib@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1172 <main+0x62>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
cmp    $0x1,%edi
jg     113a <main+0x2a>
mov    0xeed(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    $0x17,%ebx
jmp    115a <main+0x4a>
mov    0x8(%rsi),%rbx
mov    0xecb(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xeaf(%rip),%xmm0
movaps %xmm0,(%rsp)
test   %rbx,%rbx
jle    118c <main+0x7c>
mov    %rsp,%r14
nopl   (%rax)
mov    %r14,%rdi
call   1030 <PrintFib@plt>
mov    0x10(%rsp),%rax
mov    0x8(%rsp),%rcx
add    %rax,%rcx
mov    %rax,(%rsp)
mov    %rcx,0x8(%rsp)
add    %rax,%rcx
mov    %rcx,0x10(%rsp)
add    $0xffffffffffffffff,%rbx
jne    1160 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.lNumbers = [3 x i64] [i64 0, i64 1, i64 1]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca [3 x i64]
%8 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %12
11: ; preds = %2
store i64 23, i64* %6
br label %17
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = ptrtoint i8* %15 to i64
store i64 %16, i64* %6
br label %17
17: ; preds = %12, %11
%18 = bitcast [3 x i64]* %7 to i8*
store i64 0, i64* %8
br label %19
19: ; preds = %50, %17
%20 = load i64, i64* %8
%21 = load i64, i64* %6
%22 = icmp slt i64 %20, %21
br i1 %22, label %23, label %53
23: ; preds = %19
%24 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 0
%25 = call i32 @PrintFib(i64* %24)
%26 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 1
%27 = load i64, i64* %26
%28 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 0
store i64 %27, i64* %28
%29 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 2
%30 = load i64, i64* %29
%31 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 1
store i64 %30, i64* %31
%32 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 0
%33 = load i64, i64* %32
%34 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 1
%35 = load i64, i64* %34
%36 = add nsw i64 %33, %35
%37 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 2
store i64 %36, i64* %37
%38 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 1
%39 = load i64, i64* %38
%40 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 0
store i64 %39, i64* %40
%41 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 2
%42 = load i64, i64* %41
%43 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 1
store i64 %42, i64* %43
%44 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 0
%45 = load i64, i64* %44
%46 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 1
%47 = load i64, i64* %46
%48 = add nsw i64 %45, %47
%49 = getelementptr inbounds [3 x i64], [3 x i64]* %7, i64 0, i64 2
store i64 %48, i64* %49
br label %50
50: ; preds = %23
%51 = load i64, i64* %8
%52 = add nsw i64 %51, 1
store i64 %52, i64* %8
br label %19
53: ; preds = %19
ret i32 0
}

LLVM IR (-O2):
@__const.main.lNumbers = [3 x i64] [i64 0, i64 1, i64 1]
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [3 x i64]
%4 = icmp slt i32 %0, 2
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = bitcast [3 x i64]* %3 to i8*
br label %13
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = ptrtoint i8* %9 to i64
%11 = bitcast [3 x i64]* %3 to i8*
%12 = icmp sgt i8* %9, null
br i1 %12, label %13, label %27
13: ; preds = %5, %7
%14 = phi i64 [ 23, %5 ], [ %10, %7 ]
%15 = getelementptr inbounds [3 x i64], [3 x i64]* %3, i64 0, i64 0
%16 = getelementptr inbounds [3 x i64], [3 x i64]* %3, i64 0, i64 1
%17 = getelementptr inbounds [3 x i64], [3 x i64]* %3, i64 0, i64 2
br label %18
18: ; preds = %13, %18
%19 = phi i64 [ 0, %13 ], [ %25, %18 ]
%20 = call i32 @PrintFib(i64* %15)
%21 = load i64, i64* %16
%22 = load i64, i64* %17
%23 = add nsw i64 %22, %21
store i64 %22, i64* %15
store i64 %23, i64* %16
%24 = add nsw i64 %23, %22
store i64 %24, i64* %17
%25 = add nuw nsw i64 %19, 1
%26 = icmp eq i64 %25, %14
br i1 %26, label %27, label %18
27: ; preds = %18, %7
%28 = bitcast [3 x i64]* %3 to i8*
ret i32 0
}