#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 gcd(int /*<<< orphan*/, int);
int /*<<< orphan*/ get_hour();
int get_sec();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ usleep(int);
int main() {
  int nowcounter, counter = 15;
  int i, space, star;
  unsigned long long int fib[50];
  fib[0] = 0;
  fib[1] = 1;
  for (i = 2; i < 50; i++)
    fib[i] = fib[i - 1] + fib[i - 2];
  int fib_counter;
  for (nowcounter = 0; nowcounter < counter; nowcounter++) {
    system("clear");
    fib_counter = get_sec() % 4;
    for (i = 0; i <= fib[fib_counter + 2]; i++) {
      for (space = 0; space < nowcounter; space++)
        printf(" ");
      for (star = 0; star <= gcd(get_hour(), (get_sec() + 1)); star++)
        printf("*");
      printf("\n");
    }
    usleep(1000000);
  }
  system("clear");
  printf("The End of the animation.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xf,-0xc(%rbp)
movq   $0x0,-0x1b0(%rbp)
movq   $0x1,-0x1a8(%rbp)
movl   $0x2,-0x10(%rbp)
cmpl   $0x32,-0x10(%rbp)
jge    11da <main+0x7a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x1b0(%rbp,%rax,8),%rcx
ff
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
cltq
add    -0x1b0(%rbp,%rax,8),%rcx
ff
movslq -0x10(%rbp),%rax
mov    %rcx,-0x1b0(%rbp,%rax,8)
ff
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1196 <main+0x36>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12f0 <main+0x190>
lea    0xe0c(%rip),%rdi
call   1030 <system@plt>
mov    $0x0,%al
call   1060 <get_sec@plt>
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,-0x1b4(%rbp)
movl   $0x0,-0x10(%rbp)
movslq -0x10(%rbp),%rax
mov    -0x1b4(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
cmp    -0x1b0(%rbp,%rcx,8),%rax
ff
ja     12d8 <main+0x178>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1260 <main+0x100>
lea    0xdb9(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    123a <main+0xda>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1b8(%rbp)
mov    $0x0,%al
call   1050 <get_hour@plt>
mov    %eax,-0x1bc(%rbp)
mov    $0x0,%al
call   1060 <get_sec@plt>
mov    -0x1bc(%rbp),%edi
mov    %eax,%esi
add    $0x1,%esi
call   1070 <gcd@plt>
mov    %eax,%ecx
mov    -0x1b8(%rbp),%eax
cmp    %ecx,%eax
jg     12be <main+0x15e>
lea    0xd5d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1267 <main+0x107>
lea    0xd5e(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1215 <main+0xb5>
mov    $0xf4240,%edi
call   1080 <usleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11e1 <main+0x81>
lea    0xd09(%rip),%rdi
call   1030 <system@plt>
lea    0xd07(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x198,%rsp
movaps 0xe78(%rip),%xmm0
movaps %xmm0,(%rsp)
movq   $0x1,0x10(%rsp)
mov    $0x1,%edx
mov    $0x6,%eax
nop
add    -0x28(%rsp,%rax,8),%rdx
mov    %rdx,-0x18(%rsp,%rax,8)
mov    -0x20(%rsp,%rax,8),%rcx
add    %rdx,%rcx
mov    %rcx,-0x10(%rsp,%rax,8)
add    %rdx,%rcx
mov    %rcx,-0x8(%rsp,%rax,8)
cmp    $0x32,%rax
je     11d7 <main+0x67>
add    -0x10(%rsp,%rax,8),%rcx
mov    %rcx,(%rsp,%rax,8)
add    $0x4,%rax
mov    %rcx,%rdx
jmp    11a0 <main+0x30>
lea    0xe32(%rip),%r14
xor    %r12d,%r12d
jmp    1208 <main+0x98>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0xf4240,%edi
call   1090 <usleep@plt>
add    $0x1,%r12d
cmp    $0xf,%r12d
je     12c0 <main+0x150>
mov    %r14,%rdi
call   1050 <system@plt>
xor    %eax,%eax
call   1070 <get_sec@plt>
lea    0x3(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffffc,%ecx
sub    %ecx,%eax
cltq
mov    0x10(%rsp,%rax,8),%r15
xor    %r13d,%r13d
jmp    1246 <main+0xd6>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%r13),%rax
cmp    %r15,%r13
mov    %rax,%r13
je     11f0 <main+0x80>
mov    %r12d,%ebx
test   %r12d,%r12d
je     125f <main+0xef>
xchg   %ax,%ax
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1250 <main+0xe0>
xor    %eax,%eax
call   1060 <get_hour@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1070 <get_sec@plt>
lea    0x1(%rax),%esi
mov    %ebp,%edi
call   1080 <gcd@plt>
test   %eax,%eax
js     1230 <main+0xc0>
mov    $0xffffffff,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1060 <get_hour@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1070 <get_sec@plt>
lea    0x1(%rax),%esi
mov    %ebp,%edi
call   1080 <gcd@plt>
add    $0x1,%ebx
cmp    %eax,%ebx
jl     1290 <main+0x120>
jmp    1230 <main+0xc0>
lea    0xd49(%rip),%rdi
call   1050 <system@plt>
lea    0xd43(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x198,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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