#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 /*<<< orphan*/ usleep(int);
int move_rocket(void) {
  int i, x, y;
  for (i = 0; i < 21; i++) {
    if (i > 11) {
      printf("[%i;%iH", 21 - ((i - 11) * 2), 34 + (2 * (i - 11)));
      printf("[1;36m _. [1B[5D / | [1B[6D / / [1B[6D / / [1B[6D   / "
             "[1B[6D     [1B[6D     [0m");
    };
    if (i > 6) {
      printf("[%i;%iH", 21 - i + 6, 30 - i + 6);
      printf("[1;36m ._ [1B[4D | \\ [1B[4D \\ \\ [1B[4D \\ \\ [1B[4D "
             "\\   [1B[4D     [1B[4D     [0m");
    };
    printf("[%i;30H", 21 - i);
    printf("[1;32m /\\ [1B[4D || [1B[4D || [1B[4D || [1B[4D    "
           "[1B[4D    [0m");
    printf("[%i;34H", 21 - (i / 2));
    printf("[1;32m /\\ [1B[4D || [1B[4D || [1B[4D || [1B[4D    "
           "[1B[4D    [0m");
    if (i > 12) {
      printf("[%i;26H", 20 - ((i - 12) * 2));
      printf("[1;32m /\\ [1B[4D || [1B[4D || [1B[4D || [1B[4D    "
             "[1B[4D    [0m");
    };
    printf("[21;0H------------------------------------------------------------"
           "--------------------\n                                             "
           "                                   ");
    usleep(40000);
  };
}


x86 assembly (clang, -O0):
<move_rocket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
cmpl   $0x15,-0x8(%rbp)
jge    1265 <move_rocket+0x145>
cmpl   $0xb,-0x8(%rbp)
jle    117b <move_rocket+0x5b>
mov    -0x8(%rbp),%eax
sub    $0xb,%eax
shl    $0x1,%eax
mov    $0x15,%esi
sub    %eax,%esi
mov    -0x8(%rbp),%edx
sub    $0xb,%edx
shl    $0x1,%edx
add    $0x22,%edx
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x6,-0x8(%rbp)
jle    11b7 <move_rocket+0x97>
mov    $0x15,%esi
sub    -0x8(%rbp),%esi
add    $0x6,%esi
mov    $0x1e,%edx
sub    -0x8(%rbp),%edx
add    $0x6,%edx
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x15,%esi
sub    -0x8(%rbp),%esi
lea    0xeff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    $0x15,%esi
sub    %eax,%esi
lea    0xf26(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0xc,-0x8(%rbp)
jle    123f <move_rocket+0x11f>
mov    -0x8(%rbp),%eax
sub    $0xc,%eax
shl    $0x1,%eax
mov    $0x14,%esi
sub    %eax,%esi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x9c40,%edi
call   1040 <usleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <move_rocket+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<move_rocket>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x2c,%r14d
mov    $0x15,%ebx
mov    $0xc,%ebp
lea    0xebe(%rip),%r15
lea    0xf85(%rip),%r13
xor    %r12d,%r12d
jmp    117c <move_rocket+0x5c>
xchg   %ax,%ax
lea    0xfd5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x9c40,%edi
call   1040 <usleep@plt>
add    $0x1,%r12d
add    $0xfffffffe,%r14d
add    $0x2,%ebp
add    $0xffffffff,%ebx
je     123c <move_rocket+0x11c>
cmp    $0xc,%r12d
jb     11b0 <move_rocket+0x90>
lea    -0x1(%r14),%esi
mov    %r15,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe70(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    11b6 <move_rocket+0x96>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0x7,%r12d
jb     11d4 <move_rocket+0xb4>
lea    0x6(%rbx),%esi
lea    0xf(%rbx),%edx
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe9a(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12d,%eax
shr    %eax
mov    $0x15,%esi
sub    %eax,%esi
lea    0xf19(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0xd,%r12d
jb     1150 <move_rocket+0x30>
lea    0xf00(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1150 <move_rocket+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%i;%iH\00"
@.str.1 = [94 x i8] c"\1B[1;36m _. \1B[1B\1B[5D / | \1B[1B\1B[6D / / \1B[1B\1B[6D / / \1B[1B\1B[6D / \1B[1B\1B[6D \1B[1B\1B[6D \1B[0m\00"
@.str.2 = [94 x i8] c"\1B[1;36m ._ \1B[1B\1B[4D | \\ \1B[1B\1B[4D \\ \\ \1B[1B\1B[4D \\ \\ \1B[1B\1B[4D \\ \1B[1B\1B[4D \1B[1B\1B[4D \1B[0m\00"
@.str.3 = [9 x i8] c"\1B[%i;30H\00"
@.str.4 = [76 x i8] c"\1B[1;32m /\\ \1B[1B\1B[4D || \1B[1B\1B[4D || \1B[1B\1B[4D || \1B[1B\1B[4D \1B[1B\1B[4D \1B[0m\00"
@.str.5 = [9 x i8] c"\1B[%i;34H\00"
@.str.6 = [9 x i8] c"\1B[%i;26H\00"
@.str.7 = [169 x i8] c"\1B[21;0H--------------------------------------------------------------------------------\0A \00"
define i32 @move_rocket() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %2
br label %5
5: ; preds = %56, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 21
br i1 %7, label %8, label %59
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 11
br i1 %10, label %11, label %22
11: ; preds = %8
%12 = load i32, i32* %2
%13 = sub nsw i32 %12, 11
%14 = mul nsw i32 %13, 2
%15 = sub nsw i32 21, %14
%16 = load i32, i32* %2
%17 = sub nsw i32 %16, 11
%18 = mul nsw i32 2, %17
%19 = add nsw i32 34, %18
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %19)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.1, i64 0, i64 0))
br label %22
22: ; preds = %11, %8
%23 = load i32, i32* %2
%24 = icmp sgt i32 %23, 6
br i1 %24, label %25, label %34
25: ; preds = %22
%26 = load i32, i32* %2
%27 = sub nsw i32 21, %26
%28 = add nsw i32 %27, 6
%29 = load i32, i32* %2
%30 = sub nsw i32 30, %29
%31 = add nsw i32 %30, 6
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %28, i32 %31)
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.2, i64 0, i64 0))
br label %34
34: ; preds = %25, %22
%35 = load i32, i32* %2
%36 = sub nsw i32 21, %35
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %36)
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.4, i64 0, i64 0))
%39 = load i32, i32* %2
%40 = sdiv i32 %39, 2
%41 = sub nsw i32 21, %40
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %41)
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.4, i64 0, i64 0))
%44 = load i32, i32* %2
%45 = icmp sgt i32 %44, 12
br i1 %45, label %46, label %53
46: ; preds = %34
%47 = load i32, i32* %2
%48 = sub nsw i32 %47, 12
%49 = mul nsw i32 %48, 2
%50 = sub nsw i32 20, %49
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %50)
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.4, i64 0, i64 0))
br label %53
53: ; preds = %46, %34
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str.7, i64 0, i64 0))
%55 = call i32 @usleep(i32 40000)
br label %56
56: ; preds = %53
%57 = load i32, i32* %2
%58 = add nsw i32 %57, 1
store i32 %58, i32* %2
br label %5
59: ; preds = %5
%60 = load i32, i32* %1
ret i32 %60
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%i;%iH\00"
@.str.1 = [94 x i8] c"\1B[1;36m _. \1B[1B\1B[5D / | \1B[1B\1B[6D / / \1B[1B\1B[6D / / \1B[1B\1B[6D / \1B[1B\1B[6D \1B[1B\1B[6D \1B[0m\00"
@.str.2 = [94 x i8] c"\1B[1;36m ._ \1B[1B\1B[4D | \\ \1B[1B\1B[4D \\ \\ \1B[1B\1B[4D \\ \\ \1B[1B\1B[4D \\ \1B[1B\1B[4D \1B[1B\1B[4D \1B[0m\00"
@.str.3 = [9 x i8] c"\1B[%i;30H\00"
@.str.4 = [76 x i8] c"\1B[1;32m /\\ \1B[1B\1B[4D || \1B[1B\1B[4D || \1B[1B\1B[4D || \1B[1B\1B[4D \1B[1B\1B[4D \1B[0m\00"
@.str.5 = [9 x i8] c"\1B[%i;34H\00"
@.str.6 = [9 x i8] c"\1B[%i;26H\00"
@.str.7 = [169 x i8] c"\1B[21;0H--------------------------------------------------------------------------------\0A \00"
define i32 @move_rocket() {
br label %1
1: ; preds = %0, %31
%2 = phi i32 [ 0, %0 ], [ %34, %31 ]
%3 = icmp ugt i32 %2, 11
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = shl nuw nsw i32 %2, 1
%6 = sub nuw nsw i32 43, %5
%7 = add nuw nsw i32 %5, 12
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([94 x i8], [94 x i8]* @.str.1, i64 0, i64 0))
br label %12
10: ; preds = %1
%11 = icmp ugt i32 %2, 6
br i1 %11, label %12, label %17
12: ; preds = %4, %10
%13 = sub nuw nsw i32 27, %2
%14 = sub nuw nsw i32 36, %2
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([94 x i8], [94 x i8]* @.str.2, i64 0, i64 0))
br label %17
17: ; preds = %12, %10
%18 = sub nuw nsw i32 21, %2
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %18)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str.4, i64 0, i64 0))
%21 = lshr i32 %2, 1
%22 = sub nuw nsw i32 21, %21
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i32 %22)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str.4, i64 0, i64 0))
%25 = icmp ugt i32 %2, 12
br i1 %25, label %26, label %31
26: ; preds = %17
%27 = mul nsw i32 %2, -2
%28 = add nsw i32 %27, 44
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %28)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str.4, i64 0, i64 0))
br label %31
31: ; preds = %26, %17
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([169 x i8], [169 x i8]* @.str.7, i64 0, i64 0))
%33 = tail call i32 @usleep(i32 40000)
%34 = add nuw nsw i32 %2, 1
%35 = icmp eq i32 %34, 21
br i1 %35, label %36, label %1
36: ; preds = %31
ret i32 undef
}