#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 columns = 1;
  int rows = 8;
  for (i = 1; i <= rows; i++) {
    for (j = 1; j <= columns; j++) {
      printf("*");
    }
    printf("\n");
    columns += 1;
  }
  rows += 1;
  columns -= 2;
  for (i = 1; i <= rows; i++) {
    for (j = 1; j <= columns; j++) {
      printf("*");
    }
    printf("\n");
    columns -= 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x8,-0x14(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1190 <main+0x80>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     116d <main+0x5d>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <main+0x37>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1205 <main+0xf5>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11e2 <main+0xd2>
lea    0xe31(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11bc <main+0xac>
lea    0xe19(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11a9 <main+0x99>
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    $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>
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 1, i32* %4
store i32 8, i32* %5
store i32 1, i32* %2
br label %6
6: ; preds = %24, %0
%7 = load i32, i32* %2
%8 = load i32, i32* %5
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %27
10: ; preds = %6
store i32 1, i32* %3
br label %11
11: ; preds = %17, %10
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%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))
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %24
24: ; preds = %20
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
br label %6
27: ; preds = %6
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
%30 = load i32, i32* %4
%31 = sub nsw i32 %30, 2
store i32 %31, i32* %4
store i32 1, i32* %2
br label %32
32: ; preds = %50, %27
%33 = load i32, i32* %2
%34 = load i32, i32* %5
%35 = icmp sle i32 %33, %34
br i1 %35, label %36, label %53
36: ; preds = %32
store i32 1, i32* %3
br label %37
37: ; preds = %43, %36
%38 = load i32, i32* %3
%39 = load i32, i32* %4
%40 = icmp sle i32 %38, %39
br i1 %40, label %41, label %46
41: ; preds = %37
%42 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %43
43: ; preds = %41
%44 = load i32, i32* %3
%45 = add nsw i32 %44, 1
store i32 %45, i32* %3
br label %37
46: ; preds = %37
%47 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%48 = load i32, i32* %4
%49 = sub nsw i32 %48, 1
store i32 %49, i32* %4
br label %50
50: ; preds = %46
%51 = load i32, i32* %2
%52 = add nsw i32 %51, 1
store i32 %52, i32* %2
br label %32
53: ; preds = %32
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 10)
%53 = tail call i32 @putchar(i32 42)
%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 @putchar(i32 42)
%58 = tail call i32 @putchar(i32 42)
%59 = tail call i32 @putchar(i32 10)
%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 42)
%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 10)
%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 10)
%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 10)
%80 = tail call i32 @putchar(i32 10)
%81 = tail call i32 @putchar(i32 10)
ret i32 0
}