#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 main() {
  unsigned long int f_prev = 2;
  unsigned long int s_prev = 1;
  int count;
  printf("%lu, %lu", f_prev, s_prev);
  for (count = 1; count <= 49; count++) {
    f_prev = f_prev + s_prev;
    s_prev = f_prev + s_prev;
    printf(", %lu, %lu", f_prev, s_prev);
  }
  printf("\n");
  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),%rsi
mov    -0x18(%rbp),%rdx
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x1c(%rbp)
cmpl   $0x31,-0x1c(%rbp)
jg     1192 <main+0x82>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    114c <main+0x3c>
lea    0xe72(%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    0xed4(%rip),%rdi
mov    $0x2,%r14d
mov    $0x1,%ebx
mov    $0x2,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x31,%ebp
lea    0xeaa(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
add    %rbx,%r14
add    %r14,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1160 <main+0x40>
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 = [9 x i8] c"%lu, %lu\00"
@.str.1 = [11 x i8] c", %lu, %lu\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32
store i32 0, i32* %1
store i64 2, i64* %2
store i64 1, i64* %3
%5 = load i64, i64* %2
%6 = load i64, i64* %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %5, i64 %6)
store i32 1, i32* %4
br label %8
8: ; preds = %21, %0
%9 = load i32, i32* %4
%10 = icmp sle i32 %9, 49
br i1 %10, label %11, label %24
11: ; preds = %8
%12 = load i64, i64* %2
%13 = load i64, i64* %3
%14 = add i64 %12, %13
store i64 %14, i64* %2
%15 = load i64, i64* %2
%16 = load i64, i64* %3
%17 = add i64 %15, %16
store i64 %17, i64* %3
%18 = load i64, i64* %2
%19 = load i64, i64* %3
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 %18, i64 %19)
br label %21
21: ; preds = %11
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %8
24: ; preds = %8
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

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