#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 *);
main() {
  int a, c;
  for (a = 1; a <= 13; a++) {
    if (a <= 7) {
      for (c = 1; c <= a; c++) {
        printf("*");
      }
      printf("\n");
    } else {
      for (c = 6; c >= a - 7; c--) {
        printf("*");
      }
      printf("\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xd,-0x8(%rbp)
jg     11c9 <main+0xb9>
cmpl   $0x7,-0x8(%rbp)
jg     1178 <main+0x68>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1167 <main+0x57>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1141 <main+0x31>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
jmp    11b6 <main+0xa6>
movl   $0x6,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x7,%ecx
cmp    %ecx,%eax
jl     11aa <main+0x9a>
lea    0xe69(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    117f <main+0x6f>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
jmp    11bb <main+0xab>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x1,%r15d
mov    $0x2,%r14d
jmp    1148 <main+0x38>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15d
add    $0x1,%r14d
cmp    $0xf,%r14d
je     11a3 <main+0x93>
mov    %r15d,%ebx
cmp    $0x7,%r15d
ja     1180 <main+0x70>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1160 <main+0x50>
jmp    1130 <main+0x20>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x7(%r15),%ebp
mov    $0x7,%ebx
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
cmp    %ebp,%ebx
jg     1190 <main+0x80>
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
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 1, i32* %2
br label %4
4: ; preds = %36, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 13
br i1 %6, label %7, label %39
7: ; preds = %4
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 7
br i1 %9, label %10, label %22
10: ; preds = %7
store i32 1, i32* %3
br label %11
11: ; preds = %17, %10
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %11
20: ; preds = %11
%21 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %35
22: ; preds = %7
store i32 6, i32* %3
br label %23
23: ; preds = %30, %22
%24 = load i32, i32* %3
%25 = load i32, i32* %2
%26 = sub nsw i32 %25, 7
%27 = icmp sge i32 %24, %26
br i1 %27, label %28, label %33
28: ; preds = %23
%29 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %30
30: ; preds = %28
%31 = load i32, i32* %3
%32 = add nsw i32 %31, -1
store i32 %32, i32* %3
br label %23
33: ; preds = %23
%34 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %35
35: ; preds = %33, %20
br label %36
36: ; preds = %35
%37 = load i32, i32* %2
%38 = add nsw i32 %37, 1
store i32 %38, i32* %2
br label %4
39: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %17
%2 = phi i32 [ 2, %0 ], [ %20, %17 ]
%3 = phi i32 [ 1, %0 ], [ %19, %17 ]
%4 = icmp ult i32 %3, 8
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = add nsw i32 %3, -7
br label %12
7: ; preds = %1, %7
%8 = phi i32 [ %10, %7 ], [ 1, %1 ]
%9 = tail call i32 @putchar(i32 42)
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, %2
br i1 %11, label %17, label %7
12: ; preds = %5, %12
%13 = phi i32 [ %15, %12 ], [ 6, %5 ]
%14 = tail call i32 @putchar(i32 42)
%15 = add nsw i32 %13, -1
%16 = icmp sgt i32 %13, %6
br i1 %16, label %12, label %17
17: ; preds = %12, %7
%18 = tail call i32 @putchar(i32 10)
%19 = add nuw nsw i32 %3, 1
%20 = add nuw nsw i32 %2, 1
%21 = icmp eq i32 %20, 15
br i1 %21, label %22, label %1
22: ; preds = %17
ret i32 0
}