#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(void) {
  int n, row, col;
  scanf("%d", &n);
  for (row = 0; row < n; row++) {
    for (col = 0; col < n + row; col++) {
      if (col < n - 1 - row)
        putchar(' ');
      else
        putchar('*');
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11d4 <main+0xa4>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    11ba <main+0x8a>
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
sub    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    119d <main+0x6d>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    11a7 <main+0x77>
mov    $0x2a,%edi
call   1030 <putchar@plt>
jmp    11ac <main+0x7c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1169 <main+0x39>
lea    0xe42(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1156 <main+0x26>
xor    %eax,%eax
add    $0x10,%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    11a6 <main+0x86>
xor    %r14d,%r14d
jmp    1167 <main+0x47>
cs nopw 0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r14d
mov    0xc(%rsp),%eax
cmp    %eax,%r14d
jge    11a6 <main+0x86>
mov    %eax,%ecx
add    %r14d,%ecx
jle    1150 <main+0x30>
mov    %r14d,%ebp
not    %ebp
xor    %ebx,%ebx
jmp    1194 <main+0x74>
nopw   0x0(%rax,%rax,1)
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    0xc(%rsp),%eax
lea    (%rax,%r14,1),%ecx
cmp    %ecx,%ebx
jge    1150 <main+0x30>
add    %ebp,%eax
mov    $0x20,%edi
cmp    %eax,%ebx
jl     1180 <main+0x60>
mov    $0x2a,%edi
jmp    1180 <main+0x60>
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
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %3
br label %6
6: ; preds = %34, %0
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %37
10: ; preds = %6
store i32 0, i32* %4
br label %11
11: ; preds = %29, %10
%12 = load i32, i32* %4
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = add nsw i32 %13, %14
%16 = icmp slt i32 %12, %15
br i1 %16, label %17, label %32
17: ; preds = %11
%18 = load i32, i32* %4
%19 = load i32, i32* %2
%20 = sub nsw i32 %19, 1
%21 = load i32, i32* %3
%22 = sub nsw i32 %20, %21
%23 = icmp slt i32 %18, %22
br i1 %23, label %24, label %26
24: ; preds = %17
%25 = call i32 @putchar(i8 signext 32)
br label %28
26: ; preds = %17
%27 = call i32 @putchar(i8 signext 42)
br label %28
28: ; preds = %26, %24
br label %29
29: ; preds = %28
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1
store i32 %31, i32* %4
br label %11
32: ; preds = %11
%33 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %34
34: ; preds = %32
%35 = load i32, i32* %3
%36 = add nsw i32 %35, 1
store i32 %36, i32* %3
br label %6
37: ; preds = %6
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, %24
%7 = phi i32 [ %27, %24 ], [ %4, %0 ]
%8 = phi i32 [ %26, %24 ], [ 0, %0 ]
%9 = add nsw i32 %7, %8
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %24
11: ; preds = %6
%12 = xor i32 %8, -1
br label %13
13: ; preds = %11, %13
%14 = phi i32 [ %7, %11 ], [ %21, %13 ]
%15 = phi i32 [ 0, %11 ], [ %20, %13 ]
%16 = add i32 %14, %12
%17 = icmp slt i32 %15, %16
%18 = select i1 %17, i8 32, i8 42
%19 = call i32 @putchar(i8 signext %18)
%20 = add nuw nsw i32 %15, 1
%21 = load i32, i32* %1
%22 = add nsw i32 %21, %8
%23 = icmp slt i32 %20, %22
br i1 %23, label %13, label %24
24: ; preds = %13, %6
%25 = call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
%26 = add nuw nsw i32 %8, 1
%27 = load i32, i32* %1
%28 = icmp slt i32 %26, %27
br i1 %28, label %6, label %29
29: ; preds = %24, %0
ret i32 0
}