#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*/ putchar(char);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a, b, c, i, j, n;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n - i; j++)
      putchar(' ');
    for (j = 1; j <= 2 * i - 1; j++) {
      putchar('*');
    }
    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    -0x1c(%rbp),%rsi
call   1050 <scanf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     11df <main+0xaf>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    -0x14(%rbp),%ecx
cmp    %ecx,%eax
jg     1192 <main+0x62>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1169 <main+0x39>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     11c5 <main+0x95>
mov    $0x2a,%edi
call   1030 <putchar@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1199 <main+0x69>
lea    0xe37(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1156 <main+0x26>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    11aa <main+0x8a>
mov    $0x1,%r14d
mov    $0x1,%ebx
nopl   0x0(%rax)
cmp    %ebx,%eax
jle    1177 <main+0x57>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
sub    %ebx,%eax
add    $0x1,%ebp
cmp    %eax,%ebp
jl     1160 <main+0x40>
mov    %r14d,%ebp
nopw   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1180 <main+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbx),%ecx
mov    0xc(%rsp),%eax
add    $0x2,%r14d
cmp    %eax,%ebx
mov    %ecx,%ebx
jl     1150 <main+0x30>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [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
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
store i32 1, i32* %5
br label %9
9: ; preds = %39, %0
%10 = load i32, i32* %5
%11 = load i32, i32* %7
%12 = icmp sle i32 %10, %11
br i1 %12, label %13, label %42
13: ; preds = %9
store i32 1, i32* %6
br label %14
14: ; preds = %22, %13
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = load i32, i32* %5
%18 = sub nsw i32 %16, %17
%19 = icmp sle i32 %15, %18
br i1 %19, label %20, label %25
20: ; preds = %14
%21 = call i32 @putchar(i8 signext 32)
br label %22
22: ; preds = %20
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
store i32 %24, i32* %6
br label %14
25: ; preds = %14
store i32 1, i32* %6
br label %26
26: ; preds = %34, %25
%27 = load i32, i32* %6
%28 = load i32, i32* %5
%29 = mul nsw i32 2, %28
%30 = sub nsw i32 %29, 1
%31 = icmp sle i32 %27, %30
br i1 %31, label %32, label %37
32: ; preds = %26
%33 = call i32 @putchar(i8 signext 42)
br label %34
34: ; preds = %32
%35 = load i32, i32* %6
%36 = add nsw i32 %35, 1
store i32 %36, i32* %6
br label %26
37: ; preds = %26
%38 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %39
39: ; preds = %37
%40 = load i32, i32* %5
%41 = add nsw i32 %40, 1
store i32 %41, i32* %5
br label %9
42: ; preds = %9
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, 1
br i1 %5, label %30, label %6
6: ; preds = %0, %24
%7 = phi i32 [ %27, %24 ], [ %4, %0 ]
%8 = phi i32 [ %29, %24 ], [ 2, %0 ]
%9 = phi i32 [ %26, %24 ], [ 1, %0 ]
%10 = icmp sgt i32 %7, %9
br i1 %10, label %11, label %18
11: ; preds = %6, %11
%12 = phi i32 [ %14, %11 ], [ 1, %6 ]
%13 = call i32 @putchar(i8 signext 32)
%14 = add nuw nsw i32 %12, 1
%15 = load i32, i32* %1
%16 = sub nsw i32 %15, %9
%17 = icmp slt i32 %12, %16
br i1 %17, label %11, label %18
18: ; preds = %11, %6
br label %19
19: ; preds = %18, %19
%20 = phi i32 [ %22, %19 ], [ 1, %18 ]
%21 = call i32 @putchar(i8 signext 42)
%22 = add nuw i32 %20, 1
%23 = icmp eq i32 %22, %8
br i1 %23, label %24, label %19
24: ; preds = %19
%25 = call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
%26 = add nuw nsw i32 %9, 1
%27 = load i32, i32* %1
%28 = icmp slt i32 %9, %27
%29 = add i32 %8, 2
br i1 %28, label %6, label %30
30: ; preds = %24, %0
ret i32 0
}