#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*/ printi(int);
int /*<<< orphan*/ prints(char *);
int main() {
  int a, b;
  int c = 0;
  a = 1;
  b = 1;
  while (c < 20) {
    c = c + 1;
    printi(a);
    int t = a;
    t = b;
    b = a + b;
    a = t;
    prints(",");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x14,-0x10(%rbp)
jge    118b <main+0x6b>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <printi@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x8(%rbp)
lea    0xe7f(%rip),%rdi
call   1040 <prints@plt>
jmp    1144 <main+0x24>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
call   1030 <printi@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x1,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x2,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x3,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x5,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x8,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0xd,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x15,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x22,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x37,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x59,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x90,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0xe9,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x179,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x262,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x3db,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x63d,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0xa18,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x1055,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
mov    $0x1a6d,%edi
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c",\00"
define i32 @main() {
%1 = tail call i32 @printi(i32 1)
%2 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printi(i32 1)
%4 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @printi(i32 2)
%6 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @printi(i32 3)
%8 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @printi(i32 5)
%10 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = tail call i32 @printi(i32 8)
%12 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%13 = tail call i32 @printi(i32 13)
%14 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%15 = tail call i32 @printi(i32 21)
%16 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%17 = tail call i32 @printi(i32 34)
%18 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = tail call i32 @printi(i32 55)
%20 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%21 = tail call i32 @printi(i32 89)
%22 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%23 = tail call i32 @printi(i32 144)
%24 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%25 = tail call i32 @printi(i32 233)
%26 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%27 = tail call i32 @printi(i32 377)
%28 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%29 = tail call i32 @printi(i32 610)
%30 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%31 = tail call i32 @printi(i32 987)
%32 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%33 = tail call i32 @printi(i32 1597)
%34 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%35 = tail call i32 @printi(i32 2584)
%36 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%37 = tail call i32 @printi(i32 4181)
%38 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%39 = tail call i32 @printi(i32 6765)
%40 = tail call i32 @prints(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}