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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11d9 <main+0xb9>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1183 <main+0x63>
jmp    1169 <main+0x49>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
jmp    1158 <main+0x38>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    11ba <main+0x9a>
jmp    11a0 <main+0x80>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
lea    0xe56(%rip),%rdi
call   1030 <printf@plt>
jmp    118a <main+0x6a>
jmp    11bf <main+0x9f>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
lea    0xe39(%rip),%rdi
call   1030 <printf@plt>
jmp    1146 <main+0x26>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xec2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    11cd <main+0x9d>
mov    $0x1,%r14d
lea    0xea6(%rip),%rbx
mov    $0x1,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    %eax,%r15d
jge    1191 <main+0x61>
mov    %r15d,%ebp
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebp
mov    %rbx,%rdi
call   1040 <printf@plt>
cmp    0x4(%rsp),%ebp
jl     1180 <main+0x50>
mov    %r14d,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    11a0 <main+0x70>
lea    0x1(%r15),%ebp
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%eax
add    $0x2,%r14d
cmp    %eax,%r15d
mov    %ebp,%r15d
jl     1170 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
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 = [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* %2)
store i32 1, i32* %4
br label %6
6: ; preds = %33, %0
%7 = load i32, i32* %4
%8 = load i32, i32* %2
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %37
10: ; preds = %6
%11 = load i32, i32* %4
store i32 %11, i32* %3
br label %12
12: ; preds = %17, %10
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %21
16: ; preds = %12
br label %17
17: ; preds = %16
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %12
21: ; preds = %12
store i32 1, i32* %3
br label %22
22: ; preds = %28, %21
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = mul nsw i32 %24, 2
%26 = icmp slt i32 %23, %25
br i1 %26, label %27, label %32
27: ; preds = %22
br label %28
28: ; preds = %27
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
%31 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %22
32: ; preds = %22
br label %33
33: ; preds = %32
%34 = load i32, i32* %4
%35 = add nsw i32 %34, 1
store i32 %35, i32* %4
%36 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %6
37: ; preds = %6
%38 = load i32, i32* %1
ret i32 %38
}

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