#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, k;
  for (i = 1; i <= 5; i++) {
    for (j = 1; j <= 6 - i; j++) {
      printf("*");
    }
    for (k = 1; k < i; k++) {
      printf("  ");
    }
    for (j = 1; j <= 6 - i; j++) {
      printf("*");
    }
    printf("\n");
  }
  for (i = 2; i <= 5; i++) {
    for (j = 1; j <= i; j++) {
      printf("*");
    }
    for (k = 1; k <= 5 - i; k++) {
      printf("  ");
    }
    for (j = 1; j <= i; j++) {
      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   $0x5,-0x8(%rbp)
jg     11df <main+0xcf>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x6,%ecx
sub    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     1164 <main+0x54>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1191 <main+0x81>
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    116b <main+0x5b>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x6,%ecx
sub    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     11c5 <main+0xb5>
lea    0xe4e(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1198 <main+0x88>
lea    0xe39(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
movl   $0x2,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     1298 <main+0x188>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     121d <main+0x10d>
lea    0xdf6(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11f7 <main+0xe7>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x5,%ecx
sub    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     1251 <main+0x141>
lea    0xdc4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1224 <main+0x114>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     127e <main+0x16e>
lea    0xd95(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1258 <main+0x148>
lea    0xd80(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11e6 <main+0xd6>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
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>
lea    0xe42(%rip),%rbx
mov    %rbx,%rdi
call   1040 <printf@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    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@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    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@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    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@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    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@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    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@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    %rbx,%rdi
call   1040 <printf@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    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"*\00"
@.str.1 = [3 x i8] c" \00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %5
5: ; preds = %42, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 5
br i1 %7, label %8, label %45
8: ; preds = %5
store i32 1, i32* %3
br label %9
9: ; preds = %16, %8
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = sub nsw i32 6, %11
%13 = icmp sle i32 %10, %12
br i1 %13, label %14, label %19
14: ; preds = %9
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %9
19: ; preds = %9
store i32 1, i32* %4
br label %20
20: ; preds = %26, %19
%21 = load i32, i32* %4
%22 = load i32, i32* %2
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %26
26: ; preds = %24
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
store i32 %28, i32* %4
br label %20
29: ; preds = %20
store i32 1, i32* %3
br label %30
30: ; preds = %37, %29
%31 = load i32, i32* %3
%32 = load i32, i32* %2
%33 = sub nsw i32 6, %32
%34 = icmp sle i32 %31, %33
br i1 %34, label %35, label %40
35: ; preds = %30
%36 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %37
37: ; preds = %35
%38 = load i32, i32* %3
%39 = add nsw i32 %38, 1
store i32 %39, i32* %3
br label %30
40: ; preds = %30
%41 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %42
42: ; preds = %40
%43 = load i32, i32* %2
%44 = add nsw i32 %43, 1
store i32 %44, i32* %2
br label %5
45: ; preds = %5
store i32 2, i32* %2
br label %46
46: ; preds = %82, %45
%47 = load i32, i32* %2
%48 = icmp sle i32 %47, 5
br i1 %48, label %49, label %85
49: ; preds = %46
store i32 1, i32* %3
br label %50
50: ; preds = %56, %49
%51 = load i32, i32* %3
%52 = load i32, i32* %2
%53 = icmp sle i32 %51, %52
br i1 %53, label %54, label %59
54: ; preds = %50
%55 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %56
56: ; preds = %54
%57 = load i32, i32* %3
%58 = add nsw i32 %57, 1
store i32 %58, i32* %3
br label %50
59: ; preds = %50
store i32 1, i32* %4
br label %60
60: ; preds = %67, %59
%61 = load i32, i32* %4
%62 = load i32, i32* %2
%63 = sub nsw i32 5, %62
%64 = icmp sle i32 %61, %63
br i1 %64, label %65, label %70
65: ; preds = %60
%66 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %67
67: ; preds = %65
%68 = load i32, i32* %4
%69 = add nsw i32 %68, 1
store i32 %69, i32* %4
br label %60
70: ; preds = %60
store i32 1, i32* %3
br label %71
71: ; preds = %77, %70
%72 = load i32, i32* %3
%73 = load i32, i32* %2
%74 = icmp sle i32 %72, %73
br i1 %74, label %75, label %80
75: ; preds = %71
%76 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %77
77: ; preds = %75
%78 = load i32, i32* %3
%79 = add nsw i32 %78, 1
store i32 %79, i32* %3
br label %71
80: ; preds = %71
%81 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %82
82: ; preds = %80
%83 = load i32, i32* %2
%84 = add nsw i32 %83, 1
store i32 %84, i32* %2
br label %46
85: ; preds = %46
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c" \00"
define i32 @main() {
%1 = tail call i32 @putchar(i32 42)
%2 = tail call i32 @putchar(i32 42)
%3 = tail call i32 @putchar(i32 42)
%4 = tail call i32 @putchar(i32 42)
%5 = tail call i32 @putchar(i32 42)
%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 42)
%10 = tail call i32 @putchar(i32 42)
%11 = tail call i32 @putchar(i32 10)
%12 = tail call i32 @putchar(i32 42)
%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 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%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 42)
%21 = tail call i32 @putchar(i32 10)
%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 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%26 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%27 = tail call i32 @putchar(i32 42)
%28 = tail call i32 @putchar(i32 42)
%29 = tail call i32 @putchar(i32 42)
%30 = tail call i32 @putchar(i32 10)
%31 = tail call i32 @putchar(i32 42)
%32 = tail call i32 @putchar(i32 42)
%33 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%34 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%35 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%36 = tail call i32 @putchar(i32 42)
%37 = tail call i32 @putchar(i32 42)
%38 = tail call i32 @putchar(i32 10)
%39 = tail call i32 @putchar(i32 42)
%40 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%41 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%42 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%43 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%44 = tail call i32 @putchar(i32 42)
%45 = tail call i32 @putchar(i32 10)
%46 = tail call i32 @putchar(i32 42)
%47 = tail call i32 @putchar(i32 42)
%48 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%49 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%50 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%51 = tail call i32 @putchar(i32 42)
%52 = tail call i32 @putchar(i32 42)
%53 = tail call i32 @putchar(i32 10)
%54 = tail call i32 @putchar(i32 42)
%55 = tail call i32 @putchar(i32 42)
%56 = tail call i32 @putchar(i32 42)
%57 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%58 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%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 10)
%63 = tail call i32 @putchar(i32 42)
%64 = tail call i32 @putchar(i32 42)
%65 = tail call i32 @putchar(i32 42)
%66 = tail call i32 @putchar(i32 42)
%67 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%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 10)
%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 42)
%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 10)
ret i32 0
}