#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 EXIT_SUCCESS;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
int main() {
  long long int fn = 1;
  long long int fn1 = 1;
  long long int fn2 = fn1 + fn;
  fprintf(stdout, "Suite de fibonacci: ");
  for (int n = 4; n < 100; n++) {
    fn = fn1;
    fn1 = fn2;
    fn2 = fn1 + fn;
    fprintf(stdout, "%ld ", fn2);
  }
  fprintf(stdout, "\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x4,-0x24(%rbp)
cmpl   $0x64,-0x24(%rbp)
jge    11a8 <main+0x98>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
lea    0xe82(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1159 <main+0x49>
mov    0x2e31(%rip),%rax
mov    (%rax),%edi
lea    0xe62(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e12(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    0x2ec1(%rip),%r15
mov    (%r15),%edi
lea    0xed7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%ebx
mov    $0x2,%eax
mov    $0x60,%ebp
lea    0xecf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %rax,%r12
add    %rax,%rbx
mov    (%r15),%edi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    %rbx,%rax
mov    %r12,%rbx
add    $0xffffffff,%ebp
jne    1150 <main+0x40>
mov    (%r15),%edi
lea    0xe9f(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x2e4f(%rip),%rax
mov    (%rax),%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [21 x i8] c"Suite de fibonacci: \00"
@.str.1 = [5 x i8] c"%ld \00"
@.str.2 = [2 x i8] c"\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %7
3: ; preds = %7
%4 = load i32, i32* @stdout
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
7: ; preds = %0, %7
%8 = phi i32 [ 4, %0 ], [ %14, %7 ]
%9 = phi i64 [ 2, %0 ], [ %11, %7 ]
%10 = phi i64 [ 1, %0 ], [ %9, %7 ]
%11 = add nsw i64 %9, %10
%12 = load i32, i32* @stdout
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %11)
%14 = add nuw nsw i32 %8, 1
%15 = icmp eq i32 %14, 100
br i1 %15, label %3, label %7
}