#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 argc, const char *argv[]) {
  int n, i, j, m = 1;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    for (j = 0; j < n - i - 1; j++)
      printf(" ");
    for (j = 0; j < m; j++) {
      printf("*");
    }
    m += 2;
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x20(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11e5 <main+0xc5>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    -0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1195 <main+0x75>
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1167 <main+0x47>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    11c2 <main+0xa2>
lea    0xe56(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    119c <main+0x7c>
mov    -0x20(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x20(%rbp)
lea    0xe35(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1154 <main+0x34>
xor    %eax,%eax
add    $0x20,%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    11aa <main+0x8a>
xor    %r15d,%r15d
mov    $0x1,%r14d
nopl   0x0(%rax)
mov    %r15d,%ebx
not    %ebx
add    %ebx,%eax
test   %eax,%eax
jle    1177 <main+0x57>
xor    %ebp,%ebp
nopl   (%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
mov    0x4(%rsp),%eax
add    %ebx,%eax
cmp    %eax,%ebp
jl     1160 <main+0x40>
mov    %r14d,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1180 <main+0x60>
add    $0x2,%r14d
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15d
mov    0x4(%rsp),%eax
cmp    %eax,%r15d
jl     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(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %9
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
store i32 0, i32* %7
br label %11
11: ; preds = %42, %2
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %45
15: ; preds = %11
store i32 0, i32* %8
br label %16
16: ; preds = %25, %15
%17 = load i32, i32* %8
%18 = load i32, i32* %6
%19 = load i32, i32* %7
%20 = sub nsw i32 %18, %19
%21 = sub nsw i32 %20, 1
%22 = icmp slt i32 %17, %21
br i1 %22, label %23, label %28
23: ; preds = %16
%24 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %25
25: ; preds = %23
%26 = load i32, i32* %8
%27 = add nsw i32 %26, 1
store i32 %27, i32* %8
br label %16
28: ; preds = %16
store i32 0, i32* %8
br label %29
29: ; preds = %35, %28
%30 = load i32, i32* %8
%31 = load i32, i32* %9
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %38
33: ; preds = %29
%34 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %35
35: ; preds = %33
%36 = load i32, i32* %8
%37 = add nsw i32 %36, 1
store i32 %37, i32* %8
br label %29
38: ; preds = %29
%39 = load i32, i32* %9
%40 = add nsw i32 %39, 2
store i32 %40, i32* %9
%41 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %42
42: ; preds = %38
%43 = load i32, i32* %7
%44 = add nsw i32 %43, 1
store i32 %44, i32* %7
br label %11
45: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %34
8: ; preds = %2, %28
%9 = phi i32 [ %32, %28 ], [ %6, %2 ]
%10 = phi i32 [ %29, %28 ], [ 1, %2 ]
%11 = phi i32 [ %31, %28 ], [ 0, %2 ]
%12 = xor i32 %11, -1
%13 = add i32 %9, %12
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %22
15: ; preds = %8, %15
%16 = phi i32 [ %18, %15 ], [ 0, %8 ]
%17 = call i32 @putchar(i32 32)
%18 = add nuw nsw i32 %16, 1
%19 = load i32, i32* %3
%20 = add i32 %19, %12
%21 = icmp slt i32 %18, %20
br i1 %21, label %15, label %22
22: ; preds = %15, %8
br label %23
23: ; preds = %22, %23
%24 = phi i32 [ %26, %23 ], [ 0, %22 ]
%25 = call i32 @putchar(i32 42)
%26 = add nuw nsw i32 %24, 1
%27 = icmp eq i32 %26, %10
br i1 %27, label %28, label %23
28: ; preds = %23
%29 = add nuw nsw i32 %10, 2
%30 = call i32 @putchar(i32 10)
%31 = add nuw nsw i32 %11, 1
%32 = load i32, i32* %3
%33 = icmp slt i32 %31, %32
br i1 %33, label %8, label %34
34: ; preds = %28, %2
ret i32 0
}