#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 *, long long);
int main() {
  int chislo;
  long long int a, b, c;
  a = 2;
  b = 1;
  c = (a + b);
  printf("%lld, ", a);
  printf("%lld, ", b);
  for (chislo = 0; chislo < 100; chislo++) {
    printf("%lld, ", c);
    a = b;
    b = c;
    c = (a + b);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x2,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    11a6 <main+0x96>
mov    -0x20(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1162 <main+0x52>
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    0xee2(%rip),%r14
mov    $0x2,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    $0x1,%ebx
mov    $0x1,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    $0x3,%eax
mov    $0x64,%ebp
nopw   0x0(%rax,%rax,1)
mov    %rax,%r15
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
add    %r15,%rbx
mov    %rbx,%rax
mov    %r15,%rbx
add    $0xffffffff,%ebp
jne    1150 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%lld, \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 1)
br label %3
3: ; preds = %0, %3
%4 = phi i64 [ 3, %0 ], [ %8, %3 ]
%5 = phi i64 [ 1, %0 ], [ %4, %3 ]
%6 = phi i32 [ 0, %0 ], [ %9, %3 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 %4)
%8 = add nsw i64 %4, %5
%9 = add nuw nsw i32 %6, 1
%10 = icmp eq i32 %9, 100
br i1 %10, label %11, label %3
11: ; preds = %3
ret i32 0
}