#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 main() {
  int i, j;
  int lineCount = 0;
  int starCount = 0;
  lineCount = 10;
  for (i = 1; i <= lineCount; i++) {
    starCount = i;
    for (j = 1; j <= starCount; j++) {
      printf("*");
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0xa,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1194 <main+0x84>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     117a <main+0x6a>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1154 <main+0x44>
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113b <main+0x2b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i32 42)
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @putchar(i32 42)
%4 = tail call i32 @putchar(i32 42)
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @putchar(i32 42)
%7 = tail call i32 @putchar(i32 42)
%8 = tail call i32 @putchar(i32 42)
%9 = tail call i32 @putchar(i32 10)
%10 = tail call i32 @putchar(i32 42)
%11 = tail call i32 @putchar(i32 42)
%12 = tail call i32 @putchar(i32 42)
%13 = tail call i32 @putchar(i32 42)
%14 = tail call i32 @putchar(i32 10)
%15 = tail call i32 @putchar(i32 42)
%16 = tail call i32 @putchar(i32 42)
%17 = tail call i32 @putchar(i32 42)
%18 = tail call i32 @putchar(i32 42)
%19 = tail call i32 @putchar(i32 42)
%20 = tail call i32 @putchar(i32 10)
%21 = tail call i32 @putchar(i32 42)
%22 = tail call i32 @putchar(i32 42)
%23 = tail call i32 @putchar(i32 42)
%24 = tail call i32 @putchar(i32 42)
%25 = tail call i32 @putchar(i32 42)
%26 = tail call i32 @putchar(i32 42)
%27 = tail call i32 @putchar(i32 10)
%28 = tail call i32 @putchar(i32 42)
%29 = tail call i32 @putchar(i32 42)
%30 = tail call i32 @putchar(i32 42)
%31 = tail call i32 @putchar(i32 42)
%32 = tail call i32 @putchar(i32 42)
%33 = tail call i32 @putchar(i32 42)
%34 = tail call i32 @putchar(i32 42)
%35 = tail call i32 @putchar(i32 10)
%36 = tail call i32 @putchar(i32 42)
%37 = tail call i32 @putchar(i32 42)
%38 = tail call i32 @putchar(i32 42)
%39 = tail call i32 @putchar(i32 42)
%40 = tail call i32 @putchar(i32 42)
%41 = tail call i32 @putchar(i32 42)
%42 = tail call i32 @putchar(i32 42)
%43 = tail call i32 @putchar(i32 42)
%44 = tail call i32 @putchar(i32 10)
%45 = tail call i32 @putchar(i32 42)
%46 = tail call i32 @putchar(i32 42)
%47 = tail call i32 @putchar(i32 42)
%48 = tail call i32 @putchar(i32 42)
%49 = tail call i32 @putchar(i32 42)
%50 = tail call i32 @putchar(i32 42)
%51 = tail call i32 @putchar(i32 42)
%52 = tail call i32 @putchar(i32 42)
%53 = tail call i32 @putchar(i32 42)
%54 = tail call i32 @putchar(i32 10)
%55 = tail call i32 @putchar(i32 42)
%56 = tail call i32 @putchar(i32 42)
%57 = tail call i32 @putchar(i32 42)
%58 = tail call i32 @putchar(i32 42)
%59 = tail call i32 @putchar(i32 42)
%60 = tail call i32 @putchar(i32 42)
%61 = tail call i32 @putchar(i32 42)
%62 = tail call i32 @putchar(i32 42)
%63 = tail call i32 @putchar(i32 42)
%64 = tail call i32 @putchar(i32 42)
%65 = tail call i32 @putchar(i32 10)
ret i32 0
}