#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, o, t = 0, g = 1;
  scanf("%d", &n);
  i = n;
  k = n;
  o = g;
  while (k >= 1) {
    while (i >= 1) {
      printf(" ");
      i--;
    }
    t++;
    i = n - t;
    while (g >= 1) {
      printf("*");
      g--;
    }
    printf("\n");
    g = o + 2;
    o += 2;
    k--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x10(%rbp)
jl     11f4 <main+0xd4>
jmp    116e <main+0x4e>
cmpl   $0x1,-0xc(%rbp)
jl     1192 <main+0x72>
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    116e <main+0x4e>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x18(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jl     11c8 <main+0xa8>
lea    0xe50(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a4 <main+0x84>
lea    0xe38(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    115f <main+0x3f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xecd(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%r14d
test   %r14d,%r14d
jle    11bc <main+0x9c>
xor    %r12d,%r12d
mov    $0x2,%r15d
mov    %r14d,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %ebx,%ebx
jle    1182 <main+0x62>
add    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1170 <main+0x50>
mov    0xc(%rsp),%ebx
mov    %r15d,%ebp
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
jg     1190 <main+0x70>
add    $0x1,%r12d
sub    %r12d,%ebx
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x2,%r15d
cmp    %r14d,%r12d
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
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
store i32 0, i32* %1
store i32 0, i32* %6
store i32 1, i32* %7
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %2
store i32 %9, i32* %3
%10 = load i32, i32* %2
store i32 %10, i32* %4
%11 = load i32, i32* %7
store i32 %11, i32* %5
br label %12
12: ; preds = %36, %0
%13 = load i32, i32* %4
%14 = icmp sge i32 %13, 1
br i1 %14, label %15, label %44
15: ; preds = %12
br label %16
16: ; preds = %19, %15
%17 = load i32, i32* %3
%18 = icmp sge i32 %17, 1
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%21 = load i32, i32* %3
%22 = add nsw i32 %21, -1
store i32 %22, i32* %3
br label %16
23: ; preds = %16
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
%26 = load i32, i32* %2
%27 = load i32, i32* %6
%28 = sub nsw i32 %26, %27
store i32 %28, i32* %3
br label %29
29: ; preds = %32, %23
%30 = load i32, i32* %7
%31 = icmp sge i32 %30, 1
br i1 %31, label %32, label %36
32: ; preds = %29
%33 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%34 = load i32, i32* %7
%35 = add nsw i32 %34, -1
store i32 %35, i32* %7
br label %29
36: ; preds = %29
%37 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%38 = load i32, i32* %5
%39 = add nsw i32 %38, 2
store i32 %39, i32* %7
%40 = load i32, i32* %5
%41 = add nsw i32 %40, 2
store i32 %41, i32* %5
%42 = load i32, i32* %4
%43 = add nsw i32 %42, -1
store i32 %43, i32* %4
br label %12
44: ; preds = %12
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 %29
6: ; preds = %0, %23
%7 = phi i32 [ %27, %23 ], [ 1, %0 ]
%8 = phi i32 [ %24, %23 ], [ 0, %0 ]
%9 = phi i32 [ %25, %23 ], [ %4, %0 ]
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %6, %11
%12 = phi i32 [ %14, %11 ], [ %9, %6 ]
%13 = call i32 @putchar(i32 32)
%14 = add nsw i32 %12, -1
%15 = icmp ugt i32 %12, 1
br i1 %15, label %11, label %16
16: ; preds = %11, %6
%17 = load i32, i32* %1
br label %18
18: ; preds = %16, %18
%19 = phi i32 [ %7, %16 ], [ %21, %18 ]
%20 = call i32 @putchar(i32 42)
%21 = add nsw i32 %19, -1
%22 = icmp sgt i32 %19, 1
br i1 %22, label %18, label %23
23: ; preds = %18
%24 = add nuw nsw i32 %8, 1
%25 = sub nsw i32 %17, %24
%26 = call i32 @putchar(i32 10)
%27 = add nuw nsw i32 %7, 2
%28 = icmp eq i32 %24, %4
br i1 %28, label %29, label %6
29: ; preds = %23, %0
ret i32 0
}