#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  system("clear");
  int a[100] = {0}, i, s = 0;
  a[0] = 3;
  a[1] = 6;
  for (i = 2; i < 100; i++) {
    s = a[i - 1] * a[i - 2];
    if (s / 10) {
      a[i] = s / 10;
      a[i + 1] = s % 10;
      i = i + 1;
    } else
      a[i] = s;
  }
  for (i = 0; i < 100; i++) {
    if (!(i % 10))
      printf("\n");
    printf("%3d", a[i]);
  }
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea0(%rip),%rdi
call   1030 <system@plt>
lea    -0x1a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1050 <memset@plt>
movl   $0x0,-0x1a8(%rbp)
movl   $0x3,-0x1a0(%rbp)
movl   $0x6,-0x19c(%rbp)
movl   $0x2,-0x1a4(%rbp)
cmpl   $0x64,-0x1a4(%rbp)
jge    126f <main+0x12f>
mov    -0x1a4(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x1a0(%rbp,%rax,4),%eax
mov    -0x1a4(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
imul   -0x1a0(%rbp,%rcx,4),%eax
ff
mov    %eax,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     1242 <main+0x102>
mov    -0x1a8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
movslq -0x1a4(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0x1a8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
mov    %edx,-0x1a0(%rbp,%rax,4)
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    1256 <main+0x116>
mov    -0x1a8(%rbp),%ecx
movslq -0x1a4(%rbp),%rax
mov    %ecx,-0x1a0(%rbp,%rax,4)
jmp    125b <main+0x11b>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    11a0 <main+0x60>
movl   $0x0,-0x1a4(%rbp)
cmpl   $0x64,-0x1a4(%rbp)
jge    12db <main+0x19b>
mov    -0x1a4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    12ab <main+0x16b>
lea    0xd62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movslq -0x1a4(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%esi
lea    0xd48(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    1279 <main+0x139>
mov    $0x0,%al
call   1060 <getchar@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x190,%rsp
lea    0xe9d(%rip),%rdi
call   1040 <system@plt>
mov    %rsp,%rdi
mov    $0x190,%edx
xor    %esi,%esi
call   1060 <memset@plt>
movabs $0x600000003,%rax
mov    %rax,(%rsp)
mov    $0x2,%ecx
mov    $0x6,%eax
jmp    11ae <main+0x5e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movslq %ecx,%rdx
mov    %eax,(%rsp,%rdx,4)
lea    0x1(%rdx),%ecx
cmp    $0x63,%edx
jge    11e6 <main+0x96>
movslq %ecx,%rdx
imul   -0x8(%rsp,%rdx,4),%eax
lea    0x9(%rax),%esi
cmp    $0x13,%esi
jb     11a0 <main+0x50>
movslq %eax,%rcx
imul   $0x66666667,%rcx,%rcx
mov    %rcx,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rcx
add    %esi,%ecx
mov    %ecx,(%rsp,%rdx,4)
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
add    $0x1,%edx
mov    %edx,%ecx
jmp    11a0 <main+0x50>
lea    0xe19(%rip),%r14
xor    %r15d,%r15d
xor    %ebx,%ebx
jmp    121b <main+0xcb>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rsp,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
add    $0xff,%r15b
cmp    $0x64,%rbx
je     123e <main+0xee>
movzbl %bl,%eax
imul   $0xcd,%eax,%eax
shr    $0xa,%eax
and    $0xfffffffe,%eax
lea    (%rax,%rax,4),%eax
add    %r15b,%al
jne    1200 <main+0xb0>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1200 <main+0xb0>
xor    %eax,%eax
call   1070 <getchar@plt>
xor    %eax,%eax
add    $0x190,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [4 x i8] c"%3d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x i32]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%10 = bitcast [100 x i32]* %6 to i8*
store i32 0, i32* %8
%11 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 0
store i32 3, i32* %11
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 1
store i32 6, i32* %12
store i32 2, i32* %7
br label %13
13: ; preds = %51, %2
%14 = load i32, i32* %7
%15 = icmp slt i32 %14, 100
br i1 %15, label %16, label %54
16: ; preds = %13
%17 = load i32, i32* %7
%18 = sub nsw i32 %17, 1
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = load i32, i32* %7
%23 = sub nsw i32 %22, 2
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 %24
%26 = load i32, i32* %25
%27 = mul nsw i32 %21, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = sdiv i32 %28, 10
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %45
31: ; preds = %16
%32 = load i32, i32* %8
%33 = sdiv i32 %32, 10
%34 = load i32, i32* %7
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 %35
store i32 %33, i32* %36
%37 = load i32, i32* %8
%38 = srem i32 %37, 10
%39 = load i32, i32* %7
%40 = add nsw i32 %39, 1
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 %41
store i32 %38, i32* %42
%43 = load i32, i32* %7
%44 = add nsw i32 %43, 1
store i32 %44, i32* %7
br label %50
45: ; preds = %16
%46 = load i32, i32* %8
%47 = load i32, i32* %7
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 %48
store i32 %46, i32* %49
br label %50
50: ; preds = %45, %31
br label %51
51: ; preds = %50
%52 = load i32, i32* %7
%53 = add nsw i32 %52, 1
store i32 %53, i32* %7
br label %13
54: ; preds = %13
store i32 0, i32* %7
br label %55
55: ; preds = %70, %54
%56 = load i32, i32* %7
%57 = icmp slt i32 %56, 100
br i1 %57, label %58, label %73
58: ; preds = %55
%59 = load i32, i32* %7
%60 = srem i32 %59, 10
%61 = icmp ne i32 %60, 0
br i1 %61, label %64, label %62
62: ; preds = %58
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %64
64: ; preds = %62, %58
%65 = load i32, i32* %7
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [100 x i32], [100 x i32]* %6, i64 0, i64 %66
%68 = load i32, i32* %67
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %68)
br label %70
70: ; preds = %64
%71 = load i32, i32* %7
%72 = add nsw i32 %71, 1
store i32 %72, i32* %7
br label %55
73: ; preds = %55
%74 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.2 = [4 x i8] c"%3d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i32]
%4 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = bitcast [100 x i32]* %3 to i8*
%6 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
store i32 3, i32* %6
%7 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 1
store i32 6, i32* %7
br label %8
8: ; preds = %24, %2
%9 = phi i32 [ 6, %2 ], [ %26, %24 ]
%10 = phi i32 [ 2, %2 ], [ %30, %24 ]
%11 = add nsw i32 %10, -2
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %12
%14 = load i32, i32* %13
%15 = mul nsw i32 %14, %9
%16 = add i32 %15, 9
%17 = icmp ult i32 %16, 19
br i1 %17, label %24, label %18
18: ; preds = %8
%19 = sdiv i32 %15, 10
%20 = sext i32 %10 to i64
%21 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %20
store i32 %19, i32* %21
%22 = srem i32 %15, 10
%23 = add nsw i32 %10, 1
br label %24
24: ; preds = %8, %18
%25 = phi i32 [ %23, %18 ], [ %10, %8 ]
%26 = phi i32 [ %22, %18 ], [ %15, %8 ]
%27 = sext i32 %25 to i64
%28 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %27
store i32 %26, i32* %28
%29 = icmp slt i32 %25, 99
%30 = add nsw i32 %25, 1
br i1 %29, label %8, label %31
31: ; preds = %24, %38
%32 = phi i64 [ %42, %38 ], [ 0, %24 ]
%33 = trunc i64 %32 to i8
%34 = urem i8 %33, 10
%35 = icmp eq i8 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %31
%37 = tail call i32 @putchar(i32 10)
br label %38
38: ; preds = %36, %31
%39 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %32
%40 = load i32, i32* %39
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %40)
%42 = add nuw nsw i64 %32, 1
%43 = icmp eq i64 %42, 100
br i1 %43, label %44, label %31
44: ; preds = %38
%45 = tail call i32 (...) @getchar()
ret i32 0
}