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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     11c8 <main+0xa8>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    117e <main+0x5e>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1158 <main+0x38>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    11ae <main+0x8e>
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    118a <main+0x6a>
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x26>
xor    %eax,%eax
add    $0x20,%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    11af <main+0x8f>
mov    $0x1,%r14d
mov    $0x3,%ebx
nopl   0x0(%rax)
cmp    %eax,%r14d
jge    1173 <main+0x53>
mov    %r14d,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    0xc(%rsp),%ebp
jl     1160 <main+0x40>
mov    %ebx,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
cmp    $0x2,%ebp
jg     1180 <main+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%r14),%ecx
mov    0xc(%rsp),%eax
add    $0x2,%ebx
cmp    %eax,%r14d
mov    %ecx,%r14d
jl     1150 <main+0x30>
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" \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
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
store i32 1, i32* %2
br label %7
7: ; preds = %36, %0
%8 = load i32, i32* %2
%9 = load i32, i32* %5
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %39
11: ; preds = %7
%12 = load i32, i32* %2
store i32 %12, i32* %3
br label %13
13: ; preds = %19, %11
%14 = load i32, i32* %3
%15 = load i32, i32* %5
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %22
17: ; preds = %13
%18 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %17
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %13
22: ; preds = %13
%23 = load i32, i32* %2
%24 = mul nsw i32 2, %23
%25 = sub nsw i32 %24, 1
store i32 %25, i32* %4
br label %26
26: ; preds = %31, %22
%27 = load i32, i32* %4
%28 = icmp sgt i32 %27, 0
br i1 %28, label %29, label %34
29: ; preds = %26
%30 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %31
31: ; preds = %29
%32 = load i32, i32* %4
%33 = add nsw i32 %32, -1
store i32 %33, i32* %4
br label %26
34: ; preds = %26
%35 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %36
36: ; preds = %34
%37 = load i32, i32* %2
%38 = add nsw i32 %37, 1
store i32 %38, i32* %2
br label %7
39: ; preds = %7
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 slt i32 %4, 1
br i1 %5, label %28, label %6
6: ; preds = %0, %23
%7 = phi i32 [ %26, %23 ], [ %4, %0 ]
%8 = phi i32 [ %25, %23 ], [ 1, %0 ]
%9 = icmp slt i32 %8, %7
br i1 %9, label %10, label %16
10: ; preds = %6, %10
%11 = phi i32 [ %13, %10 ], [ %8, %6 ]
%12 = call i32 @putchar(i32 32)
%13 = add nuw nsw i32 %11, 1
%14 = load i32, i32* %1
%15 = icmp slt i32 %13, %14
br i1 %15, label %10, label %16
16: ; preds = %10, %6
%17 = shl nuw nsw i32 %8, 1
br label %18
18: ; preds = %16, %18
%19 = phi i32 [ %20, %18 ], [ %17, %16 ]
%20 = add nsw i32 %19, -1
%21 = call i32 @putchar(i32 42)
%22 = icmp sgt i32 %19, 2
br i1 %22, label %18, label %23
23: ; preds = %18
%24 = call i32 @putchar(i32 10)
%25 = add nuw nsw i32 %8, 1
%26 = load i32, i32* %1
%27 = icmp slt i32 %8, %26
br i1 %27, label %6, label %28
28: ; preds = %23, %0
ret i32 0
}