#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i, n, menor = -1, maior = 1, k;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    k = maior + menor;
    printf(" %d,", k);
    menor = maior;
    maior = k;
  }
  printf("\b");
  printf(" \n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
lea    0xebc(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1194 <main+0x74>
mov    -0x14(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1154 <main+0x34>
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xeb2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    119f <main+0x5f>
mov    $0xffffffff,%ebx
mov    $0x1,%eax
lea    0xe93(%rip),%r14
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%r15d
add    %eax,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebp
mov    %ebx,%eax
mov    %r15d,%ebx
cmp    0x4(%rsp),%ebp
jl     1180 <main+0x40>
mov    $0x8,%edi
call   1030 <putchar@plt>
lea    0xe58(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c" %d,\00"
@str = [2 x i8] c" \00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %0, %6
%7 = phi i32 [ %12, %6 ], [ 0, %0 ]
%8 = phi i32 [ %10, %6 ], [ 1, %0 ]
%9 = phi i32 [ %8, %6 ], [ -1, %0 ]
%10 = add nsw i32 %8, %9
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i32 %7, 1
%13 = load i32, i32* %1
%14 = icmp slt i32 %12, %13
br i1 %14, label %6, label %15
15: ; preds = %6, %0
%16 = call i32 @putchar(i32 8)
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}