#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(void) {
  int cCounter = 0;
  int rCounter = 0;
  for (cCounter = 1; cCounter <= 10; cCounter++) {
    for (rCounter = 1; rCounter <= cCounter; rCounter++) {
      printf("*");
    }
    printf("\n");
  }
  printf("\n");
  for (cCounter = 10; cCounter >= 1; cCounter--) {
    for (rCounter = 1; rCounter <= cCounter; rCounter++) {
      printf("*");
    }
    printf("\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     1185 <main+0x75>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     116b <main+0x5b>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1145 <main+0x35>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
movl   $0xa,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     11e9 <main+0xd9>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11cf <main+0xbf>
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a9 <main+0x99>
lea    0xe2c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1198 <main+0x88>
lea    0xe12(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%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>
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>
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    $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    $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    $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    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0xa,%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
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 1, i32* %2
br label %4
4: ; preds = %19, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 10
br i1 %6, label %7, label %22
7: ; preds = %4
store i32 1, i32* %3
br label %8
8: ; preds = %14, %7
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %8
17: ; preds = %8
%18 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %17
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %4
22: ; preds = %4
%23 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 10, i32* %2
br label %24
24: ; preds = %39, %22
%25 = load i32, i32* %2
%26 = icmp sge i32 %25, 1
br i1 %26, label %27, label %42
27: ; preds = %24
store i32 1, i32* %3
br label %28
28: ; preds = %34, %27
%29 = load i32, i32* %3
%30 = load i32, i32* %2
%31 = icmp sle i32 %29, %30
br i1 %31, label %32, label %37
32: ; preds = %28
%33 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %34
34: ; preds = %32
%35 = load i32, i32* %3
%36 = add nsw i32 %35, 1
store i32 %36, i32* %3
br label %28
37: ; preds = %28
%38 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %39
39: ; preds = %37
%40 = load i32, i32* %2
%41 = add nsw i32 %40, -1
store i32 %41, i32* %2
br label %24
42: ; preds = %24
%43 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%44 = load i32, i32* %1
ret i32 %44
}

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)
%66 = tail call i32 @putchar(i32 10)
%67 = tail call i32 @putchar(i32 42)
%68 = tail call i32 @putchar(i32 42)
%69 = tail call i32 @putchar(i32 42)
%70 = tail call i32 @putchar(i32 42)
%71 = tail call i32 @putchar(i32 42)
%72 = tail call i32 @putchar(i32 42)
%73 = tail call i32 @putchar(i32 42)
%74 = tail call i32 @putchar(i32 42)
%75 = tail call i32 @putchar(i32 42)
%76 = tail call i32 @putchar(i32 42)
%77 = tail call i32 @putchar(i32 10)
%78 = tail call i32 @putchar(i32 42)
%79 = tail call i32 @putchar(i32 42)
%80 = tail call i32 @putchar(i32 42)
%81 = tail call i32 @putchar(i32 42)
%82 = tail call i32 @putchar(i32 42)
%83 = tail call i32 @putchar(i32 42)
%84 = tail call i32 @putchar(i32 42)
%85 = tail call i32 @putchar(i32 42)
%86 = tail call i32 @putchar(i32 42)
%87 = tail call i32 @putchar(i32 10)
%88 = tail call i32 @putchar(i32 42)
%89 = tail call i32 @putchar(i32 42)
%90 = tail call i32 @putchar(i32 42)
%91 = tail call i32 @putchar(i32 42)
%92 = tail call i32 @putchar(i32 42)
%93 = tail call i32 @putchar(i32 42)
%94 = tail call i32 @putchar(i32 42)
%95 = tail call i32 @putchar(i32 42)
%96 = tail call i32 @putchar(i32 10)
%97 = tail call i32 @putchar(i32 42)
%98 = tail call i32 @putchar(i32 42)
%99 = tail call i32 @putchar(i32 42)
%100 = tail call i32 @putchar(i32 42)
%101 = tail call i32 @putchar(i32 42)
%102 = tail call i32 @putchar(i32 42)
%103 = tail call i32 @putchar(i32 42)
%104 = tail call i32 @putchar(i32 10)
%105 = tail call i32 @putchar(i32 42)
%106 = tail call i32 @putchar(i32 42)
%107 = tail call i32 @putchar(i32 42)
%108 = tail call i32 @putchar(i32 42)
%109 = tail call i32 @putchar(i32 42)
%110 = tail call i32 @putchar(i32 42)
%111 = tail call i32 @putchar(i32 10)
%112 = tail call i32 @putchar(i32 42)
%113 = tail call i32 @putchar(i32 42)
%114 = tail call i32 @putchar(i32 42)
%115 = tail call i32 @putchar(i32 42)
%116 = tail call i32 @putchar(i32 42)
%117 = tail call i32 @putchar(i32 10)
%118 = tail call i32 @putchar(i32 42)
%119 = tail call i32 @putchar(i32 42)
%120 = tail call i32 @putchar(i32 42)
%121 = tail call i32 @putchar(i32 42)
%122 = tail call i32 @putchar(i32 10)
%123 = tail call i32 @putchar(i32 42)
%124 = tail call i32 @putchar(i32 42)
%125 = tail call i32 @putchar(i32 42)
%126 = tail call i32 @putchar(i32 10)
%127 = tail call i32 @putchar(i32 42)
%128 = tail call i32 @putchar(i32 42)
%129 = tail call i32 @putchar(i32 10)
%130 = tail call i32 @putchar(i32 42)
%131 = tail call i32 @putchar(i32 10)
%132 = tail call i32 @putchar(i32 10)
ret i32 0
}