#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);
int main() {
  int n1 = 1, n2 = 0;
  while (n1 < 1560) {
    n1 = n1 + n2;
    printf("%d, ", n1);
    n2 = n1 + n2;
    if (n2 < 2580) {
      printf("%d, ", n2);
    } else {
      n2 = n2 / 10;
      printf("%.d....\n", n2);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x618,-0x8(%rbp)
jge    119e <main+0x8e>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xa14,-0xc(%rbp)
jge    117c <main+0x6c>
mov    -0xc(%rbp),%esi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
jmp    1199 <main+0x89>
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0x1,%ebp
xor    %ebx,%ebx
lea    0xeda(%rip),%r14
mov    $0xcccccccd,%r12d
lea    0xed2(%rip),%r15
jmp    115c <main+0x4c>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%ebx
imul   %r12,%rbx
shr    $0x23,%rbx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    $0x618,%ebp
jge    1177 <main+0x67>
add    %ebx,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
add    %ebp,%ebx
cmp    $0xa13,%ebx
jg     1140 <main+0x30>
mov    %r14,%rdi
jmp    114d <main+0x3d>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d, \00"
@.str.1 = [9 x i8] c"%.d....\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %13
%2 = phi i32 [ 0, %0 ], [ %14, %13 ]
%3 = phi i32 [ 1, %0 ], [ %4, %13 ]
%4 = add nsw i32 %2, %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add nsw i32 %4, %2
%7 = icmp slt i32 %6, 2580
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %13
10: ; preds = %1
%11 = udiv i32 %6, 10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %10, %8
%14 = phi i32 [ %6, %8 ], [ %11, %10 ]
%15 = icmp slt i32 %4, 1560
br i1 %15, label %1, label %16
16: ; preds = %13
ret i32 0
}