#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, l, a, b = 1, m;
  scanf("%d", &n);
  m = 2 * n - 1;
  for (l = 0; l < n; l++, b = b + 2) {
    for (a = 0; a < (m - b) / 2; a++)
      printf(" ");
    for (a = 0; a < b; a++)
      printf("*");
    for (a = 0; a < (m - b) / 2; a++)
      printf(" ");
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x14(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1239 <main+0x119>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
cmp    %ecx,%eax
jge    11a7 <main+0x87>
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    116c <main+0x4c>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11d4 <main+0xb4>
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11ae <main+0x8e>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
cmp    %ecx,%eax
jge    1216 <main+0xf6>
lea    0xe00(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11db <main+0xbb>
lea    0xdea(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
jmp    1159 <main+0x39>
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
lea    0xece(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,(%rsp)
test   %eax,%eax
jle    11f5 <main+0xd5>
mov    (%rsp),%eax
add    %eax,%eax
mov    %eax,(%rsp)
mov    $0x1,%r14d
xor    %r15d,%r15d
jmp    1179 <main+0x59>
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15d
add    $0x2,%r14d
cmp    0x4(%rsp),%r15d
jge    11f5 <main+0xd5>
mov    %r14d,%r12d
not    %r12d
add    (%rsp),%r12d
mov    %r12d,%r13d
shr    $0x1f,%r13d
add    %r12d,%r13d
sar    %r13d
mov    %r13d,%ebx
mov    %r14d,%ebp
cmp    $0x2,%r12d
jl     11c0 <main+0xa0>
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    11a0 <main+0x80>
mov    %r14d,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    11c0 <main+0xa0>
cmp    $0x2,%r12d
jl     1160 <main+0x40>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%r13d
jne    11e0 <main+0xc0>
jmp    1160 <main+0x40>
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"
@.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
store i32 0, i32* %1
store i32 1, i32* %5
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = mul nsw i32 2, %8
%10 = sub nsw i32 %9, 1
store i32 %10, i32* %6
store i32 0, i32* %3
br label %11
11: ; preds = %53, %0
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %58
15: ; preds = %11
store i32 0, i32* %4
br label %16
16: ; preds = %25, %15
%17 = load i32, i32* %4
%18 = load i32, i32* %6
%19 = load i32, i32* %5
%20 = sub nsw i32 %18, %19
%21 = sdiv i32 %20, 2
%22 = icmp slt i32 %17, %21
br i1 %22, label %23, label %28
23: ; preds = %16
%24 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %25
25: ; preds = %23
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %16
28: ; preds = %16
store i32 0, i32* %4
br label %29
29: ; preds = %35, %28
%30 = load i32, i32* %4
%31 = load i32, i32* %5
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %38
33: ; preds = %29
%34 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %35
35: ; preds = %33
%36 = load i32, i32* %4
%37 = add nsw i32 %36, 1
store i32 %37, i32* %4
br label %29
38: ; preds = %29
store i32 0, i32* %4
br label %39
39: ; preds = %48, %38
%40 = load i32, i32* %4
%41 = load i32, i32* %6
%42 = load i32, i32* %5
%43 = sub nsw i32 %41, %42
%44 = sdiv i32 %43, 2
%45 = icmp slt i32 %40, %44
br i1 %45, label %46, label %51
46: ; preds = %39
%47 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, 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 %39
51: ; preds = %39
%52 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %53
53: ; preds = %51
%54 = load i32, i32* %3
%55 = add nsw i32 %54, 1
store i32 %55, i32* %3
%56 = load i32, i32* %5
%57 = add nsw i32 %56, 2
store i32 %57, i32* %5
br label %11
58: ; preds = %11
ret i32 0
}

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