#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 abs(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int N, t, star, blank;
  scanf("%d", &N);
  for (int i = 1; i < 2 * N; i++) {
    t = abs(N - i);
    star = 2 * t + 1;
    blank = N - t - 1;
    for (int j = 0; j < blank; j++)
      printf(" ");
    for (int k = 0; k < star; k++)
      printf("*");
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    1201 <main+0xd1>
mov    -0x8(%rbp),%edi
sub    -0x18(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11ba <main+0x8a>
lea    0xe5c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1194 <main+0x64>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11e7 <main+0xb7>
lea    0xe31(%rip),%rdi
call   1040 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11c1 <main+0x91>
lea    0xe19(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1156 <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
jle    11bb <main+0x9b>
mov    $0x1,%r14d
cs nopw 0x0(%rax,%rax,1)
mov    %eax,%ecx
sub    %r14d,%ecx
mov    %ecx,%r15d
neg    %r15d
cmovs  %ecx,%r15d
mov    %r15d,%ebp
not    %ebp
add    %eax,%ebp
test   %ebp,%ebp
jle    1181 <main+0x61>
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    %ebp,%ebx
jl     1170 <main+0x50>
lea    (%r15,%r15,1),%ebx
add    $0x1,%ebx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    %ebx,%ebp
jb     1190 <main+0x70>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r14d
mov    0x4(%rsp),%eax
lea    (%rax,%rax,1),%ecx
cmp    %ecx,%r14d
jl     1150 <main+0x30>
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
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 1, i32* %6
br label %10
10: ; preds = %48, %0
%11 = load i32, i32* %6
%12 = load i32, i32* %2
%13 = mul nsw i32 2, %12
%14 = icmp slt i32 %11, %13
br i1 %14, label %15, label %51
15: ; preds = %10
%16 = load i32, i32* %2
%17 = load i32, i32* %6
%18 = sub nsw i32 %16, %17
%19 = call i32 @abs(i32 %18)
store i32 %19, i32* %3
%20 = load i32, i32* %3
%21 = mul nsw i32 2, %20
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = sub nsw i32 %23, %24
%26 = sub nsw i32 %25, 1
store i32 %26, i32* %5
store i32 0, i32* %7
br label %27
27: ; preds = %33, %15
%28 = load i32, i32* %7
%29 = load i32, i32* %5
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %36
31: ; preds = %27
%32 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %33
33: ; preds = %31
%34 = load i32, i32* %7
%35 = add nsw i32 %34, 1
store i32 %35, i32* %7
br label %27
36: ; preds = %27
store i32 0, i32* %8
br label %37
37: ; preds = %43, %36
%38 = load i32, i32* %8
%39 = load i32, i32* %4
%40 = icmp slt 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.2, i64 0, i64 0))
br label %43
43: ; preds = %41
%44 = load i32, i32* %8
%45 = add nsw i32 %44, 1
store i32 %45, i32* %8
br label %37
46: ; preds = %37
%47 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %48
48: ; preds = %46
%49 = load i32, i32* %6
%50 = add nsw i32 %49, 1
store i32 %50, i32* %6
br label %10
51: ; preds = %10
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 sgt i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %23, %0
ret i32 0
7: ; preds = %0, %23
%8 = phi i32 [ %26, %23 ], [ %4, %0 ]
%9 = phi i32 [ %25, %23 ], [ 1, %0 ]
%10 = sub nsw i32 %8, %9
%11 = call i32 @llvm.abs.i32(i32 %10, i1 true)
%12 = shl nuw nsw i32 %11, 1
%13 = or i32 %12, 1
%14 = xor i32 %11, -1
%15 = add i32 %8, %14
%16 = icmp sgt i32 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %18, %7
br label %29
18: ; preds = %7, %18
%19 = phi i32 [ %21, %18 ], [ 0, %7 ]
%20 = call i32 @putchar(i32 32)
%21 = add nuw nsw i32 %19, 1
%22 = icmp slt i32 %21, %15
br i1 %22, label %18, label %17
23: ; preds = %29
%24 = call i32 @putchar(i32 10)
%25 = add nuw nsw i32 %9, 1
%26 = load i32, i32* %1
%27 = shl nsw i32 %26, 1
%28 = icmp slt i32 %25, %27
br i1 %28, label %7, label %6
29: ; preds = %17, %29
%30 = phi i32 [ %32, %29 ], [ 0, %17 ]
%31 = call i32 @putchar(i32 42)
%32 = add nuw nsw i32 %30, 1
%33 = icmp ult i32 %32, %13
br i1 %33, label %29, label %23
}