#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, i, l, z;
  scanf("%d", &n);
  for (i = 0; i <= n; i++) {
    l = n - i;
    for (z = 0; z < n * 2; z++) {
      if (z >= l && (n * 2 - 1) - z > l)
        printf("*");
      else
        printf(" ");
    }
    printf("\n");
  }
  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>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11de <main+0xbe>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    11c4 <main+0xa4>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     11a5 <main+0x85>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
sub    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11a5 <main+0x85>
lea    0xe68(%rip),%rdi
call   1030 <printf@plt>
jmp    11b1 <main+0x91>
lea    0xe59(%rip),%rdi
call   1030 <printf@plt>
jmp    11b6 <main+0x96>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1162 <main+0x42>
lea    0xe3c(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <main+0x26>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xed2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
js     11ad <main+0x8d>
xor    %r14d,%r14d
jmp    116a <main+0x4a>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%r14),%ecx
mov    0x4(%rsp),%eax
cmp    %r14d,%eax
mov    %ecx,%r14d
jle    11ad <main+0x8d>
test   %eax,%eax
jle    1150 <main+0x30>
mov    %eax,%r15d
sub    %r14d,%r15d
add    %eax,%eax
xor    %ebx,%ebx
mov    $0xffffffff,%ebp
jmp    119a <main+0x7a>
nop
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    0x4(%rsp),%eax
add    %eax,%eax
add    $0xffffffff,%ebp
cmp    %eax,%ebx
jge    1150 <main+0x30>
cmp    %r15d,%ebx
jl     1180 <main+0x60>
add    %ebp,%eax
mov    $0x2a,%edi
cmp    %r15d,%eax
jle    1180 <main+0x60>
jmp    1185 <main+0x65>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
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
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %3
br label %7
7: ; preds = %42, %0
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %45
11: ; preds = %7
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = sub nsw i32 %12, %13
store i32 %14, i32* %4
store i32 0, i32* %5
br label %15
15: ; preds = %37, %11
%16 = load i32, i32* %5
%17 = load i32, i32* %2
%18 = mul nsw i32 %17, 2
%19 = icmp slt i32 %16, %18
br i1 %19, label %20, label %40
20: ; preds = %15
%21 = load i32, i32* %5
%22 = load i32, i32* %4
%23 = icmp sge i32 %21, %22
br i1 %23, label %24, label %34
24: ; preds = %20
%25 = load i32, i32* %2
%26 = mul nsw i32 %25, 2
%27 = sub nsw i32 %26, 1
%28 = load i32, i32* %5
%29 = sub nsw i32 %27, %28
%30 = load i32, i32* %4
%31 = icmp sgt i32 %29, %30
br i1 %31, label %32, label %34
32: ; preds = %24
%33 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %36
34: ; preds = %24, %20
%35 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %36
36: ; preds = %34, %32
br label %37
37: ; preds = %36
%38 = load i32, i32* %5
%39 = add nsw i32 %38, 1
store i32 %39, i32* %5
br label %15
40: ; preds = %15
%41 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %42
42: ; preds = %40
%43 = load i32, i32* %3
%44 = add nsw i32 %43, 1
store i32 %44, i32* %3
br label %7
45: ; preds = %7
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 = icmp slt i32 %4, 0
br i1 %5, label %34, label %6
6: ; preds = %0, %29
%7 = phi i32 [ %32, %29 ], [ %4, %0 ]
%8 = phi i32 [ %31, %29 ], [ 0, %0 ]
%9 = sub nsw i32 %7, %8
%10 = icmp sgt i32 %7, 0
br i1 %10, label %11, label %29
11: ; preds = %6
%12 = shl nuw nsw i32 %7, 1
br label %13
13: ; preds = %11, %22
%14 = phi i32 [ %27, %22 ], [ %12, %11 ]
%15 = phi i32 [ %25, %22 ], [ 0, %11 ]
%16 = icmp slt i32 %15, %9
br i1 %16, label %21, label %17
17: ; preds = %13
%18 = xor i32 %15, -1
%19 = add i32 %14, %18
%20 = icmp sgt i32 %19, %9
br i1 %20, label %22, label %21
21: ; preds = %17, %13
br label %22
22: ; preds = %17, %21
%23 = phi i32 [ 32, %21 ], [ 42, %17 ]
%24 = call i32 @putchar(i32 %23)
%25 = add nuw nsw i32 %15, 1
%26 = load i32, i32* %1
%27 = shl nsw i32 %26, 1
%28 = icmp slt i32 %25, %27
br i1 %28, label %13, label %29
29: ; preds = %22, %6
%30 = call i32 @putchar(i32 10)
%31 = add nuw nsw i32 %8, 1
%32 = load i32, i32* %1
%33 = icmp sgt i32 %32, %8
br i1 %33, label %6, label %34
34: ; preds = %29, %0
ret i32 0
}