#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*/ system(char *);
main() {
  system("color 27");
  system("title 17_MoverUnAsterisco_Cascallar_Autrán_Manuel");
  system("cls");
  printf("MOVER UN ASTERISCO\n");
  printf("==================\n");
  int n, a;
  system("cls");
  for (n = 0; n < 23 * 80; n++) {
    for (a = 0; a < n; a++) {
      printf(" ");
    }
    printf("*");
    system("cls");
  }
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <system@plt>
lea    0xec7(%rip),%rdi
call   1030 <system@plt>
lea    0xeee(%rip),%rdi
call   1030 <system@plt>
lea    0xee6(%rip),%rdi
call   1040 <printf@plt>
lea    0xeee(%rip),%rdi
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
call   1030 <system@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x730,-0x8(%rbp)
jge    11de <main+0xbe>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b8 <main+0x98>
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1192 <main+0x72>
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
lea    0xe71(%rip),%rdi
call   1030 <system@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    117e <main+0x5e>
lea    0xe87(%rip),%rdi
call   1030 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
lea    0xec5(%rip),%rdi
call   1050 <system@plt>
lea    0xec2(%rip),%rdi
call   1050 <system@plt>
lea    0xee9(%rip),%r14
mov    %r14,%rdi
call   1050 <system@plt>
lea    0xee4(%rip),%rdi
call   1040 <puts@plt>
lea    0xeeb(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1050 <system@plt>
xor    %ebx,%ebx
jmp    119d <main+0x6d>
nop
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
call   1050 <system@plt>
add    $0x1,%ebx
cmp    $0x730,%ebx
je     11c1 <main+0x91>
test   %ebx,%ebx
je     1180 <main+0x50>
mov    %ebx,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    11b0 <main+0x80>
jmp    1180 <main+0x50>
lea    0xe78(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"color 27\00"
@.str.1 = [51 x i8] c"title 17_MoverUnAsterisco_Cascallar_Autr\C3\A1n_Manuel\00"
@.str.2 = [4 x i8] c"cls\00"
@.str.3 = [20 x i8] c"MOVER UN ASTERISCO\0A\00"
@.str.4 = [20 x i8] c"==================\0A\00"
@.str.5 = [2 x i8] c" \00"
@.str.6 = [2 x i8] c"*\00"
@.str.7 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @system(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %2
br label %10
10: ; preds = %26, %0
%11 = load i32, i32* %2
%12 = icmp slt i32 %11, 1840
br i1 %12, label %13, label %29
13: ; preds = %10
store i32 0, i32* %3
br label %14
14: ; preds = %20, %13
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %23
18: ; preds = %14
%19 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %20
20: ; preds = %18
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %14
23: ; preds = %14
%24 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%25 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %26
26: ; preds = %23
%27 = load i32, i32* %2
%28 = add nsw i32 %27, 1
store i32 %28, i32* %2
br label %10
29: ; preds = %10
%30 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%31 = load i32, i32* %1
ret i32 %31
}

LLVM IR (-O2):
@.str = [9 x i8] c"color 27\00"
@.str.1 = [51 x i8] c"title 17_MoverUnAsterisco_Cascallar_Autr\C3\A1n_Manuel\00"
@.str.2 = [4 x i8] c"cls\00"
@.str.7 = [6 x i8] c"pause\00"
@str = [19 x i8] c"MOVER UN ASTERISCO\00"
@str.8 = [19 x i8] c"==================\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.8, i64 0, i64 0))
%6 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %0, %15
%8 = phi i32 [ 0, %0 ], [ %18, %15 ]
%9 = icmp eq i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %7, %10
%11 = phi i32 [ %13, %10 ], [ 0, %7 ]
%12 = tail call i32 @putchar(i32 32)
%13 = add nuw nsw i32 %11, 1
%14 = icmp eq i32 %13, %8
br i1 %14, label %15, label %10
15: ; preds = %10, %7
%16 = tail call i32 @putchar(i32 42)
%17 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%18 = add nuw nsw i32 %8, 1
%19 = icmp eq i32 %18, 1840
br i1 %19, label %20, label %7
20: ; preds = %15
%21 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}