#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() {
  char asterisk = '*';
  int i, ii, height, start = 1, end = 1;
  height = 4;
  for (i = 1; i <= height; i++) {
    for (ii = 1; ii <= height - i; ii++) {
      printf(" ");
    }
    for (start = 1; start <= end; start++) {
      printf("%c", asterisk);
    }
    end += 2;
    printf("\n");
  }
  end = 1;
  height = 7;
  for (i = 1; i <= height; i++) {
    for (ii = 1; ii <= height - i; ii++) {
      printf(" ");
    }
    for (start = 1; start <= end; start++) {
      printf("%c", asterisk);
    }
    end += 2;
    printf("\n");
  }
  end = 1;
  height = 11;
  for (i = 1; i <= height; i++) {
    for (ii = 1; ii <= height - i; ii++) {
      printf(" ");
    }
    for (start = 1; start <= end; start++) {
      printf("%c", asterisk);
    }
    end += 2;
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x2a,-0x5(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x4,-0x14(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     11d7 <main+0xc7>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jg     117f <main+0x6f>
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1152 <main+0x42>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     11b2 <main+0xa2>
movsbl -0x5(%rbp),%esi
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1186 <main+0x76>
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <main+0x2f>
movl   $0x1,-0x1c(%rbp)
movl   $0x7,-0x14(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1284 <main+0x174>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jg     122c <main+0x11c>
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11ff <main+0xef>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     125f <main+0x14f>
movsbl -0x5(%rbp),%esi
lea    0xdb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1233 <main+0x123>
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
lea    0xd96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11ec <main+0xdc>
movl   $0x1,-0x1c(%rbp)
movl   $0xb,-0x14(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1331 <main+0x221>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jg     12d9 <main+0x1c9>
lea    0xd3c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12ac <main+0x19c>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     130c <main+0x1fc>
movsbl -0x5(%rbp),%esi
lea    0xd0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12e0 <main+0x1d0>
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
lea    0xce9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1299 <main+0x189>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%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    $0x20,%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    $0x6,%r15d
mov    $0x1,%r14d
mov    $0x1,%ebp
nopl   0x0(%rax)
cmp    $0x2,%r15d
mov    $0x1,%ebx
cmovge %r15d,%ebx
cmp    $0x6,%ebp
ja     125f <main+0x14f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1250 <main+0x140>
mov    %r14d,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1270 <main+0x160>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
add    $0xffffffff,%r15d
add    $0x2,%r14d
cmp    $0x8,%ebp
jne    1230 <main+0x120>
mov    $0xa,%r15d
mov    $0x1,%r14d
mov    $0x1,%ebp
nopw   0x0(%rax,%rax,1)
cmp    $0x2,%r15d
mov    $0x1,%ebx
cmovge %r15d,%ebx
cmp    $0xa,%ebp
ja     12df <main+0x1cf>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    12d0 <main+0x1c0>
mov    %r14d,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    12f0 <main+0x1e0>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
add    $0xffffffff,%r15d
add    $0x2,%r14d
cmp    $0xc,%ebp
jne    12b0 <main+0x1a0>
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 = [3 x i8] c"%c\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i8 42, i8* %2
store i32 1, i32* %6
store i32 1, i32* %7
store i32 4, i32* %5
store i32 1, i32* %3
br label %8
8: ; preds = %40, %0
%9 = load i32, i32* %3
%10 = load i32, i32* %5
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %43
12: ; preds = %8
store i32 1, i32* %4
br label %13
13: ; preds = %21, %12
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = load i32, i32* %3
%17 = sub nsw i32 %15, %16
%18 = icmp sle i32 %14, %17
br i1 %18, label %19, label %24
19: ; preds = %13
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %19
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %13
24: ; preds = %13
store i32 1, i32* %6
br label %25
25: ; preds = %33, %24
%26 = load i32, i32* %6
%27 = load i32, i32* %7
%28 = icmp sle i32 %26, %27
br i1 %28, label %29, label %36
29: ; preds = %25
%30 = load i8, i8* %2
%31 = sext i8 %30 to i32
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %31)
br label %33
33: ; preds = %29
%34 = load i32, i32* %6
%35 = add nsw i32 %34, 1
store i32 %35, i32* %6
br label %25
36: ; preds = %25
%37 = load i32, i32* %7
%38 = add nsw i32 %37, 2
store i32 %38, i32* %7
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %40
40: ; preds = %36
%41 = load i32, i32* %3
%42 = add nsw i32 %41, 1
store i32 %42, i32* %3
br label %8
43: ; preds = %8
store i32 1, i32* %7
store i32 7, i32* %5
store i32 1, i32* %3
br label %44
44: ; preds = %76, %43
%45 = load i32, i32* %3
%46 = load i32, i32* %5
%47 = icmp sle i32 %45, %46
br i1 %47, label %48, label %79
48: ; preds = %44
store i32 1, i32* %4
br label %49
49: ; preds = %57, %48
%50 = load i32, i32* %4
%51 = load i32, i32* %5
%52 = load i32, i32* %3
%53 = sub nsw i32 %51, %52
%54 = icmp sle i32 %50, %53
br i1 %54, label %55, label %60
55: ; preds = %49
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %57
57: ; preds = %55
%58 = load i32, i32* %4
%59 = add nsw i32 %58, 1
store i32 %59, i32* %4
br label %49
60: ; preds = %49
store i32 1, i32* %6
br label %61
61: ; preds = %69, %60
%62 = load i32, i32* %6
%63 = load i32, i32* %7
%64 = icmp sle i32 %62, %63
br i1 %64, label %65, label %72
65: ; preds = %61
%66 = load i8, i8* %2
%67 = sext i8 %66 to i32
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %67)
br label %69
69: ; preds = %65
%70 = load i32, i32* %6
%71 = add nsw i32 %70, 1
store i32 %71, i32* %6
br label %61
72: ; preds = %61
%73 = load i32, i32* %7
%74 = add nsw i32 %73, 2
store i32 %74, i32* %7
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %76
76: ; preds = %72
%77 = load i32, i32* %3
%78 = add nsw i32 %77, 1
store i32 %78, i32* %3
br label %44
79: ; preds = %44
store i32 1, i32* %7
store i32 11, i32* %5
store i32 1, i32* %3
br label %80
80: ; preds = %112, %79
%81 = load i32, i32* %3
%82 = load i32, i32* %5
%83 = icmp sle i32 %81, %82
br i1 %83, label %84, label %115
84: ; preds = %80
store i32 1, i32* %4
br label %85
85: ; preds = %93, %84
%86 = load i32, i32* %4
%87 = load i32, i32* %5
%88 = load i32, i32* %3
%89 = sub nsw i32 %87, %88
%90 = icmp sle i32 %86, %89
br i1 %90, label %91, label %96
91: ; preds = %85
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %93
93: ; preds = %91
%94 = load i32, i32* %4
%95 = add nsw i32 %94, 1
store i32 %95, i32* %4
br label %85
96: ; preds = %85
store i32 1, i32* %6
br label %97
97: ; preds = %105, %96
%98 = load i32, i32* %6
%99 = load i32, i32* %7
%100 = icmp sle i32 %98, %99
br i1 %100, label %101, label %108
101: ; preds = %97
%102 = load i8, i8* %2
%103 = sext i8 %102 to i32
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %103)
br label %105
105: ; preds = %101
%106 = load i32, i32* %6
%107 = add nsw i32 %106, 1
store i32 %107, i32* %6
br label %97
108: ; preds = %97
%109 = load i32, i32* %7
%110 = add nsw i32 %109, 2
store i32 %110, i32* %7
%111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %112
112: ; preds = %108
%113 = load i32, i32* %3
%114 = add nsw i32 %113, 1
store i32 %114, i32* %3
br label %80
115: ; preds = %80
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i32 32)
%2 = tail call i32 @putchar(i32 32)
%3 = tail call i32 @putchar(i32 32)
%4 = tail call i32 @putchar(i32 42)
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @putchar(i32 32)
%7 = tail call i32 @putchar(i32 32)
%8 = tail call i32 @putchar(i32 42)
%9 = tail call i32 @putchar(i32 42)
%10 = tail call i32 @putchar(i32 42)
%11 = tail call i32 @putchar(i32 10)
%12 = tail call i32 @putchar(i32 32)
%13 = tail call i32 @putchar(i32 42)
%14 = tail call i32 @putchar(i32 42)
%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 10)
%19 = tail call i32 @putchar(i32 42)
%20 = tail call i32 @putchar(i32 42)
%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 10)
br label %27
27: ; preds = %0, %44
%28 = phi i32 [ 2, %0 ], [ %48, %44 ]
%29 = phi i32 [ 6, %0 ], [ %47, %44 ]
%30 = phi i32 [ 1, %0 ], [ %46, %44 ]
%31 = call i32 @llvm.smax.i32(i32 %29, i32 1)
%32 = icmp ugt i32 %30, 6
br i1 %32, label %38, label %33
33: ; preds = %27, %33
%34 = phi i32 [ %36, %33 ], [ 1, %27 ]
%35 = tail call i32 @putchar(i32 32)
%36 = add nuw nsw i32 %34, 1
%37 = icmp eq i32 %34, %31
br i1 %37, label %38, label %33
38: ; preds = %33, %27
br label %39
39: ; preds = %38, %39
%40 = phi i32 [ %42, %39 ], [ 1, %38 ]
%41 = tail call i32 @putchar(i32 42)
%42 = add nuw nsw i32 %40, 1
%43 = icmp eq i32 %42, %28
br i1 %43, label %44, label %39
44: ; preds = %39
%45 = tail call i32 @putchar(i32 10)
%46 = add nuw nsw i32 %30, 1
%47 = add nsw i32 %29, -1
%48 = add nuw nsw i32 %28, 2
%49 = icmp eq i32 %46, 8
br i1 %49, label %50, label %27
50: ; preds = %44, %67
%51 = phi i32 [ %71, %67 ], [ 2, %44 ]
%52 = phi i32 [ %70, %67 ], [ 10, %44 ]
%53 = phi i32 [ %69, %67 ], [ 1, %44 ]
%54 = call i32 @llvm.smax.i32(i32 %52, i32 1)
%55 = icmp ugt i32 %53, 10
br i1 %55, label %61, label %56
56: ; preds = %50, %56
%57 = phi i32 [ %59, %56 ], [ 1, %50 ]
%58 = tail call i32 @putchar(i32 32)
%59 = add nuw nsw i32 %57, 1
%60 = icmp eq i32 %57, %54
br i1 %60, label %61, label %56
61: ; preds = %56, %50
br label %62
62: ; preds = %61, %62
%63 = phi i32 [ %65, %62 ], [ 1, %61 ]
%64 = tail call i32 @putchar(i32 42)
%65 = add nuw nsw i32 %63, 1
%66 = icmp eq i32 %65, %51
br i1 %66, label %67, label %62
67: ; preds = %62
%68 = tail call i32 @putchar(i32 10)
%69 = add nuw nsw i32 %53, 1
%70 = add nsw i32 %52, -1
%71 = add nuw nsw i32 %51, 2
%72 = icmp eq i32 %69, 12
br i1 %72, label %73, label %50
73: ; preds = %67
ret i32 0
}