#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 = y; x < n; x++, printf(" "))
      ;
    for (x = 1; x < 2 * 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     11d6 <main+0xb6>
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1180 <main+0x60>
jmp    1166 <main+0x46>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
jmp    1155 <main+0x35>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    11b7 <main+0x97>
jmp    119d <main+0x7d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
jmp    1187 <main+0x67>
jmp    11bc <main+0x9c>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
lea    0xe3b(%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   %r15
push   %r14
push   %rbx
push   %rax
lea    0xed2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    11bd <main+0x9d>
lea    (%rax,%rax,1),%r14d
mov    %eax,%r15d
nopw   0x0(%rax,%rax,1)
cmp    $0x3,%r14d
mov    $0x2,%ebx
cmovge %r14d,%ebx
cmp    %eax,%r15d
jge    1183 <main+0x63>
mov    %r15d,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ebp
mov    $0x20,%edi
call   1030 <putchar@plt>
cmp    0x4(%rsp),%ebp
jl     1170 <main+0x50>
add    $0xffffffff,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1190 <main+0x70>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    $0x2,%r15d
jl     11bd <main+0x9d>
add    $0xfffffffe,%r14d
add    $0xffffffff,%r15d
mov    0x4(%rsp),%eax
jmp    1150 <main+0x30>
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 = [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
%11 = load i32, i32* %3
store i32 %11, i32* %2
br label %12
12: ; preds = %17, %10
%13 = load i32, i32* %2
%14 = load i32, i32* %4
%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* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
%20 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %12
21: ; preds = %12
store i32 1, i32* %2
br label %22
22: ; preds = %28, %21
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = mul nsw i32 2, %24
%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* %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 %22
32: ; preds = %22
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 %33
6: ; preds = %0
%7 = shl nuw i32 %4, 1
br label %8
8: ; preds = %29, %6
%9 = phi i32 [ %4, %6 ], [ %32, %29 ]
%10 = phi i32 [ %7, %6 ], [ %30, %29 ]
%11 = phi i32 [ %4, %6 ], [ %31, %29 ]
%12 = call i32 @llvm.smax.i32(i32 %10, i32 2)
%13 = icmp slt i32 %11, %9
br i1 %13, label %14, label %20
14: ; preds = %8, %14
%15 = phi i32 [ %16, %14 ], [ %11, %8 ]
%16 = add nsw i32 %15, 1
%17 = call i32 @putchar(i32 32)
%18 = load i32, i32* %1
%19 = icmp slt i32 %16, %18
br i1 %19, label %14, label %20
20: ; preds = %14, %8
br label %21
21: ; preds = %20, %21
%22 = phi i32 [ %23, %21 ], [ 1, %20 ]
%23 = add nuw nsw i32 %22, 1
%24 = call i32 @putchar(i32 42)
%25 = icmp eq i32 %23, %12
br i1 %25, label %26, label %21
26: ; preds = %21
%27 = call i32 @putchar(i32 10)
%28 = icmp sgt i32 %11, 1
br i1 %28, label %29, label %33
29: ; preds = %26
%30 = add i32 %10, -2
%31 = add nsw i32 %11, -1
%32 = load i32, i32* %1
br label %8
33: ; preds = %26, %0
ret i32 0
}