#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 x, y, n;
  scanf("%d", &n);
  for (y = n; y >= 1; y--, printf("\n")) {
    for (x = 0; x < n - y; x++, printf(" "))
      ;
    for (x = 0; x < y; x++, printf("*"))
      ;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jl     11d7 <main+0xb7>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    1186 <main+0x66>
jmp    116c <main+0x4c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
jmp    1156 <main+0x36>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11b8 <main+0x98>
jmp    119e <main+0x7e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xe57(%rip),%rdi
call   1030 <printf@plt>
jmp    118d <main+0x6d>
jmp    11bd <main+0x9d>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
lea    0xe3a(%rip),%rdi
call   1030 <printf@plt>
jmp    1145 <main+0x25>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xed6(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    11ab <main+0x8b>
mov    %eax,%ebx
cmp    %ebx,%eax
jle    1177 <main+0x57>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebp
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%eax
sub    %ebx,%eax
cmp    %eax,%ebp
jl     1160 <main+0x40>
mov    %ebx,%ebp
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1180 <main+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    $0x2,%ebx
jl     11ab <main+0x8b>
add    $0xffffffff,%ebx
mov    0x4(%rsp),%eax
cmp    %ebx,%eax
jg     1150 <main+0x30>
jmp    1177 <main+0x57>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
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
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%6 = load i32, i32* %4
store i32 %6, i32* %3
br label %7
7: ; preds = %33, %0
%8 = load i32, i32* %3
%9 = icmp sge i32 %8, 1
br i1 %9, label %10, label %37
10: ; preds = %7
store i32 0, i32* %2
br label %11
11: ; preds = %18, %10
%12 = load i32, i32* %2
%13 = load i32, i32* %4
%14 = load i32, i32* %3
%15 = sub nsw i32 %13, %14
%16 = icmp slt i32 %12, %15
br i1 %16, label %17, label %22
17: ; preds = %11
br label %18
18: ; preds = %17
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
%21 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %11
22: ; preds = %11
store i32 0, i32* %2
br label %23
23: ; preds = %28, %22
%24 = load i32, i32* %2
%25 = load i32, i32* %3
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %32
27: ; preds = %23
br label %28
28: ; preds = %27
%29 = load i32, i32* %2
%30 = add nsw i32 %29, 1
store i32 %30, i32* %2
%31 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %23
32: ; preds = %23
br label %33
33: ; preds = %32
%34 = load i32, i32* %3
%35 = add nsw i32 %34, -1
store i32 %35, i32* %3
%36 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %7
37: ; preds = %7
%38 = load i32, i32* %1
ret i32 %38
}

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, %26
%7 = phi i32 [ %28, %26 ], [ %4, %0 ]
%8 = phi i32 [ %27, %26 ], [ %4, %0 ]
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %17
10: ; preds = %6, %10
%11 = phi i32 [ %12, %10 ], [ 0, %6 ]
%12 = add nuw nsw i32 %11, 1
%13 = call i32 @putchar(i32 32)
%14 = load i32, i32* %1
%15 = sub nsw i32 %14, %8
%16 = icmp slt i32 %12, %15
br i1 %16, label %10, label %17
17: ; preds = %10, %6
br label %18
18: ; preds = %17, %18
%19 = phi i32 [ %20, %18 ], [ 0, %17 ]
%20 = add nuw nsw i32 %19, 1
%21 = call i32 @putchar(i32 42)
%22 = icmp eq i32 %20, %8
br i1 %22, label %23, label %18
23: ; preds = %18
%24 = call i32 @putchar(i32 10)
%25 = icmp sgt i32 %8, 1
br i1 %25, label %26, label %29
26: ; preds = %23
%27 = add nsw i32 %8, -1
%28 = load i32, i32* %1
br label %6
29: ; preds = %23, %0
ret i32 0
}