#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 *);
main() {
  int n, i = 1, aux1 = 0, aux2 = 1;
  scanf("%d", &n);
  if (n < 46 && n > 0) {
    while (i <= n) {
      if (i == 1) {
        printf("%d", aux1);
      } else {
        aux1 = aux1 + aux2;
        aux2 = aux1 - aux2;
        printf(" %d", aux1);
      }
      i++;
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
lea    0xeb6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x2e,-0x8(%rbp)
jge    11d8 <main+0xb8>
cmpl   $0x0,-0x8(%rbp)
jle    11d8 <main+0xb8>
jmp    116d <main+0x4d>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11ca <main+0xaa>
cmpl   $0x1,-0xc(%rbp)
jne    1199 <main+0x79>
mov    -0x10(%rbp),%esi
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11bc <main+0x9c>
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116d <main+0x4d>
lea    0xe33(%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    0xec3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x2c,%eax
ja     11aa <main+0x7a>
lea    0xea6(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x2,0x4(%rsp)
jl     11a0 <main+0x70>
mov    $0x1,%ebx
lea    0xe89(%rip),%r14
mov    $0x1,%eax
xor    %r15d,%r15d
nop
mov    %eax,%ebp
add    %r15d,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
mov    %r15d,%eax
mov    %ebp,%r15d
cmp    0x4(%rsp),%ebx
jl     1180 <main+0x50>
mov    $0xa,%edi
call   1030 <putchar@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 = [4 x i8] c" %d\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %3
store i32 0, i32* %4
store i32 1, i32* %5
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 46
br i1 %8, label %9, label %37
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %37
12: ; preds = %9
br label %13
13: ; preds = %32, %12
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = icmp sle i32 %14, %15
br i1 %16, label %17, label %35
17: ; preds = %13
%18 = load i32, i32* %3
%19 = icmp eq i32 %18, 1
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i32, i32* %4
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %21)
br label %32
23: ; preds = %17
%24 = load i32, i32* %4
%25 = load i32, i32* %5
%26 = add nsw i32 %24, %25
store i32 %26, i32* %4
%27 = load i32, i32* %4
%28 = load i32, i32* %5
%29 = sub nsw i32 %27, %28
store i32 %29, i32* %5
%30 = load i32, i32* %4
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %30)
br label %32
32: ; preds = %23, %20
%33 = load i32, i32* %3
%34 = add nsw i32 %33, 1
store i32 %34, i32* %3
br label %13
35: ; preds = %13
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %37
37: ; preds = %35, %9, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c" %d\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 = add i32 %4, -1
%6 = icmp ult i32 %5, 45
br i1 %6, label %7, label %22
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
%9 = load i32, i32* %1
%10 = icmp sgt i32 %9, 1
br i1 %10, label %11, label %20
11: ; preds = %7, %11
%12 = phi i32 [ %13, %11 ], [ 1, %7 ]
%13 = phi i32 [ %15, %11 ], [ 0, %7 ]
%14 = phi i32 [ %18, %11 ], [ 2, %7 ]
%15 = add nsw i32 %12, %13
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %1
%18 = add nuw nsw i32 %14, 1
%19 = icmp slt i32 %14, %17
br i1 %19, label %11, label %20
20: ; preds = %11, %7
%21 = call i32 @putchar(i32 10)
br label %22
22: ; preds = %20, %0
ret i32 0
}