#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, k;
  scanf("%d", &n);
  for (i = 2 * n - 1; i >= 1; i = i - 2) {
    int tmp = (2 * n - 1 - i) / 2;
    for (k = 0; k < tmp; k++) {
      printf(" ");
    }
    for (k = 0; k < i; k++) {
      printf("*");
    }
    for (k = 0; k < tmp; k++) {
      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>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jl     120d <main+0xed>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
sub    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1199 <main+0x79>
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1173 <main+0x53>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11c6 <main+0xa6>
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11a0 <main+0x80>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11f3 <main+0xd3>
lea    0xe23(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11cd <main+0xad>
lea    0xe0d(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    114b <main+0x2b>
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    11dc <main+0xbc>
lea    (%rax,%rax,1),%r15d
add    $0xffffffff,%r15d
nopl   0x0(%rax)
mov    %r15d,%ecx
not    %ecx
lea    (%rcx,%rax,2),%r14d
mov    %r14d,%ebp
shr    $0x1f,%ebp
add    %r14d,%ebp
sar    %ebp
mov    %ebp,%ebx
cmp    $0x2,%r14d
jl     117f <main+0x5f>
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1170 <main+0x50>
test   %r15d,%r15d
jle    11a2 <main+0x82>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    %ebx,%r15d
jne    1190 <main+0x70>
cmp    $0x2,%r14d
jl     11bf <main+0x9f>
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    11b0 <main+0x90>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    $0x3,%r15d
jl     11dc <main+0xbc>
add    $0xfffffffe,%r15d
mov    0x4(%rsp),%eax
jmp    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
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)
%7 = load i32, i32* %2
%8 = mul nsw i32 2, %7
%9 = sub nsw i32 %8, 1
store i32 %9, i32* %3
br label %10
10: ; preds = %51, %0
%11 = load i32, i32* %3
%12 = icmp sge i32 %11, 1
br i1 %12, label %13, label %54
13: ; preds = %10
%14 = load i32, i32* %2
%15 = mul nsw i32 2, %14
%16 = sub nsw i32 %15, 1
%17 = load i32, i32* %3
%18 = sub nsw i32 %16, %17
%19 = sdiv i32 %18, 2
store i32 %19, i32* %5
store i32 0, i32* %4
br label %20
20: ; preds = %26, %13
%21 = load i32, i32* %4
%22 = load i32, i32* %5
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %26
26: ; preds = %24
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
store i32 %28, i32* %4
br label %20
29: ; preds = %20
store i32 0, i32* %4
br label %30
30: ; preds = %36, %29
%31 = load i32, i32* %4
%32 = load i32, i32* %3
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %39
34: ; preds = %30
%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
%37 = load i32, i32* %4
%38 = add nsw i32 %37, 1
store i32 %38, i32* %4
br label %30
39: ; preds = %30
store i32 0, i32* %4
br label %40
40: ; preds = %46, %39
%41 = load i32, i32* %4
%42 = load i32, i32* %5
%43 = icmp slt i32 %41, %42
br i1 %43, label %44, label %49
44: ; preds = %40
%45 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %46
46: ; preds = %44
%47 = load i32, i32* %4
%48 = add nsw i32 %47, 1
store i32 %48, i32* %4
br label %40
49: ; preds = %40
%50 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %51
51: ; preds = %49
%52 = load i32, i32* %3
%53 = sub nsw i32 %52, 2
store i32 %53, i32* %3
br label %10
54: ; 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 %6, label %41
6: ; preds = %0
%7 = shl nuw nsw i32 %4, 1
%8 = add nsw i32 %7, -1
br label %9
9: ; preds = %38, %6
%10 = phi i32 [ %40, %38 ], [ %4, %6 ]
%11 = phi i32 [ %39, %38 ], [ %8, %6 ]
%12 = shl nsw i32 %10, 1
%13 = xor i32 %11, -1
%14 = add i32 %12, %13
%15 = sdiv i32 %14, 2
%16 = icmp sgt i32 %14, 1
br i1 %16, label %19, label %17
17: ; preds = %19, %9
%18 = icmp sgt i32 %11, 0
br i1 %18, label %25, label %24
19: ; preds = %9, %19
%20 = phi i32 [ %22, %19 ], [ 0, %9 ]
%21 = call i32 @putchar(i32 32)
%22 = add nuw nsw i32 %20, 1
%23 = icmp eq i32 %22, %15
br i1 %23, label %17, label %19
24: ; preds = %25, %17
br i1 %16, label %30, label %35
25: ; preds = %17, %25
%26 = phi i32 [ %28, %25 ], [ 0, %17 ]
%27 = call i32 @putchar(i32 42)
%28 = add nuw nsw i32 %26, 1
%29 = icmp eq i32 %28, %11
br i1 %29, label %24, label %25
30: ; preds = %24, %30
%31 = phi i32 [ %33, %30 ], [ 0, %24 ]
%32 = call i32 @putchar(i32 32)
%33 = add nuw nsw i32 %31, 1
%34 = icmp eq i32 %33, %15
br i1 %34, label %35, label %30
35: ; preds = %30, %24
%36 = call i32 @putchar(i32 10)
%37 = icmp sgt i32 %11, 2
br i1 %37, label %38, label %41
38: ; preds = %35
%39 = add nsw i32 %11, -2
%40 = load i32, i32* %1
br label %9
41: ; preds = %35, %0
ret i32 0
}