#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *);
scalar_t__ scanf(char *, int *);
int main() {
  int h, i, j, start, end, tmp1;
  while (scanf("%d", &h) != EOF) {
    start = end = h;
    for (i = 1; i < h; i++)
      end += 2;
    for (i = 0; i < h; i++) {
      for (j = 0; j < end - start; j++)
        printf(" ");
      for (j = 0; j < start; j++)
        printf("*");
      printf("\n");
      start += 2;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%rax
je     121c <main+0xfc>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    %eax,-0x14(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1182 <main+0x62>
mov    -0x18(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115f <main+0x3f>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1217 <main+0xf7>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    -0x14(%rbp),%ecx
cmp    %ecx,%eax
jge    11c7 <main+0xa7>
lea    0xe4f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    119c <main+0x7c>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11f4 <main+0xd4>
lea    0xe24(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11ce <main+0xae>
lea    0xe0c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1189 <main+0x69>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
nopl   0x0(%rax,%rax,1)
lea    0xec9(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2ea0(%rip),%rcx
cmp    (%rcx),%rax
je     11e1 <main+0xc1>
mov    0x4(%rsp),%ebx
cmp    $0x2,%ebx
jl     1170 <main+0x50>
lea    (%rbx,%rbx,2),%r14d
add    $0xfffffffe,%r14d
jmp    1178 <main+0x58>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebx,%r14d
cmp    $0x1,%ebx
jne    1130 <main+0x10>
xor    %r12d,%r12d
jmp    1198 <main+0x78>
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x2,%ebx
add    $0x1,%r12d
cmp    0x4(%rsp),%r12d
jge    1130 <main+0x10>
mov    %r14d,%r13d
sub    %ebx,%r13d
jle    11c3 <main+0xa3>
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%r15d
cmp    %r13d,%r15d
jl     11b0 <main+0x90>
mov    %ebx,%ebp
test   %ebx,%ebx
jle    1180 <main+0x60>
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    11d0 <main+0xb0>
jmp    1180 <main+0x60>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.1 = [2 x i8] c" \00"
@.str.2 = [2 x i8] c"*\00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
br label %8
8: ; preds = %58, %0
%9 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%10 = load i64, i64* @EOF
%11 = icmp ne i64 %9, %10
br i1 %11, label %12, label %59
12: ; preds = %8
%13 = load i32, i32* %2
store i32 %13, i32* %6
store i32 %13, i32* %5
store i32 1, i32* %3
br label %14
14: ; preds = %21, %12
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %24
18: ; preds = %14
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 2
store i32 %20, i32* %6
br label %21
21: ; preds = %18
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %14
24: ; preds = %14
store i32 0, i32* %3
br label %25
25: ; preds = %55, %24
%26 = load i32, i32* %3
%27 = load i32, i32* %2
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %58
29: ; preds = %25
store i32 0, i32* %4
br label %30
30: ; preds = %38, %29
%31 = load i32, i32* %4
%32 = load i32, i32* %6
%33 = load i32, i32* %5
%34 = sub nsw i32 %32, %33
%35 = icmp slt i32 %31, %34
br i1 %35, label %36, label %41
36: ; preds = %30
%37 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %38
38: ; preds = %36
%39 = load i32, i32* %4
%40 = add nsw i32 %39, 1
store i32 %40, i32* %4
br label %30
41: ; preds = %30
store i32 0, i32* %4
br label %42
42: ; preds = %48, %41
%43 = load i32, i32* %4
%44 = load i32, i32* %5
%45 = icmp slt i32 %43, %44
br i1 %45, label %46, label %51
46: ; preds = %42
%47 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %48
48: ; preds = %46
%49 = load i32, i32* %4
%50 = add nsw i32 %49, 1
store i32 %50, i32* %4
br label %42
51: ; preds = %42
%52 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%53 = load i32, i32* %5
%54 = add nsw i32 %53, 2
store i32 %54, i32* %5
br label %55
55: ; preds = %51
%56 = load i32, i32* %3
%57 = add nsw i32 %56, 1
store i32 %57, i32* %3
br label %25
58: ; preds = %25
br label %8
59: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
br i1 %5, label %43, label %10
6: ; preds = %37, %16
%7 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %43, label %10
10: ; preds = %0, %6
%11 = load i32, i32* %1
%12 = icmp sgt i32 %11, 1
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = mul i32 %11, 3
%15 = add i32 %14, -2
br label %18
16: ; preds = %10
%17 = icmp eq i32 %11, 1
br i1 %17, label %18, label %6
18: ; preds = %13, %16
%19 = phi i32 [ %15, %13 ], [ %11, %16 ]
br label %20
20: ; preds = %18, %37
%21 = phi i32 [ %40, %37 ], [ 0, %18 ]
%22 = phi i32 [ %39, %37 ], [ %11, %18 ]
%23 = sub nsw i32 %19, %22
%24 = icmp sgt i32 %23, 0
br i1 %24, label %27, label %25
25: ; preds = %27, %20
%26 = icmp sgt i32 %22, 0
br i1 %26, label %32, label %37
27: ; preds = %20, %27
%28 = phi i32 [ %30, %27 ], [ 0, %20 ]
%29 = call i32 @putchar(i32 32)
%30 = add nuw nsw i32 %28, 1
%31 = icmp slt i32 %30, %23
br i1 %31, label %27, label %25
32: ; preds = %25, %32
%33 = phi i32 [ %35, %32 ], [ 0, %25 ]
%34 = call i32 @putchar(i32 42)
%35 = add nuw nsw i32 %33, 1
%36 = icmp eq i32 %35, %22
br i1 %36, label %37, label %32
37: ; preds = %32, %25
%38 = call i32 @putchar(i32 10)
%39 = add nsw i32 %22, 2
%40 = add nuw nsw i32 %21, 1
%41 = load i32, i32* %1
%42 = icmp slt i32 %40, %41
br i1 %42, label %20, label %6
43: ; preds = %6, %0
ret i32 0
}