#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, s, row, b;
  scanf("%d", &row);
  for (n = 1; n <= row; n++) {
    for (s = 1; s <= row - n; s++) {
      printf("  ");
    }
    for (b = 0; b != 2 * n - 1; b++) {
      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    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11d3 <main+0xb3>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     1184 <main+0x64>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1159 <main+0x39>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     11b9 <main+0x99>
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118b <main+0x6b>
lea    0xe49(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%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   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xebd(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    11c8 <main+0x98>
mov    $0x1,%r15d
lea    0xea1(%rip),%r14
lea    0xe9d(%rip),%r12
mov    $0x1,%ebp
xchg   %ax,%ax
mov    %r15d,%ebx
cmp    %ebp,%eax
jle    11a0 <main+0x70>
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    %r14,%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%eax
sub    %ebp,%eax
add    $0x1,%ebx
cmp    %eax,%ebx
jl     1180 <main+0x50>
mov    %r15d,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
call   1040 <printf@plt>
add    $0xffffffff,%ebx
jne    11a0 <main+0x70>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbp),%ecx
mov    0xc(%rsp),%eax
add    $0x2,%r15d
cmp    %eax,%ebp
mov    %ecx,%ebp
jl     1170 <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 = [3 x i8] c" \00"
@.str.2 = [3 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* %4)
store i32 1, i32* %2
br label %7
7: ; preds = %37, %0
%8 = load i32, i32* %2
%9 = load i32, i32* %4
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %40
11: ; preds = %7
store i32 1, i32* %3
br label %12
12: ; preds = %20, %11
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = load i32, i32* %2
%16 = sub nsw i32 %14, %15
%17 = icmp sle i32 %13, %16
br i1 %17, label %18, label %23
18: ; preds = %12
%19 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %20
20: ; preds = %18
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %12
23: ; preds = %12
store i32 0, i32* %5
br label %24
24: ; preds = %32, %23
%25 = load i32, i32* %5
%26 = load i32, i32* %2
%27 = mul nsw i32 2, %26
%28 = sub nsw i32 %27, 1
%29 = icmp ne i32 %25, %28
br i1 %29, label %30, label %35
30: ; preds = %24
%31 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %32
32: ; preds = %30
%33 = load i32, i32* %5
%34 = add nsw i32 %33, 1
store i32 %34, i32* %5
br label %24
35: ; preds = %24
%36 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %37
37: ; preds = %35
%38 = load i32, i32* %2
%39 = add nsw i32 %38, 1
store i32 %39, i32* %2
br label %7
40: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c" \00"
@.str.2 = [3 x i8] c"* \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, 1
br i1 %5, label %30, label %6
6: ; preds = %0, %25
%7 = phi i32 [ %28, %25 ], [ %4, %0 ]
%8 = phi i32 [ %27, %25 ], [ 1, %0 ]
%9 = icmp sgt i32 %7, %8
br i1 %9, label %13, label %10
10: ; preds = %13, %6
%11 = shl nuw nsw i32 %8, 1
%12 = add nsw i32 %11, -1
br label %20
13: ; preds = %6, %13
%14 = phi i32 [ %16, %13 ], [ 1, %6 ]
%15 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%16 = add nuw nsw i32 %14, 1
%17 = load i32, i32* %1
%18 = sub nsw i32 %17, %8
%19 = icmp slt i32 %14, %18
br i1 %19, label %13, label %10
20: ; preds = %10, %20
%21 = phi i32 [ 0, %10 ], [ %23, %20 ]
%22 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%23 = add nuw nsw i32 %21, 1
%24 = icmp eq i32 %23, %12
br i1 %24, label %25, label %20
25: ; preds = %20
%26 = call i32 @putchar(i32 10)
%27 = add nuw nsw i32 %8, 1
%28 = load i32, i32* %1
%29 = icmp slt i32 %8, %28
br i1 %29, label %6, label %30
30: ; preds = %25, %0
ret i32 0
}