#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, i, j, k, f = 1;
  printf("vuvedi n= \n");
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    for (k = n - 2; k >= i; k--) {
      printf("  ");
    }
    for (j = 1; j <= f; j++) {
      printf("* ");
    }
    f = f + 2;
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x18(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e4 <main+0xc4>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1194 <main+0x74>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    116e <main+0x4e>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     11c1 <main+0xa1>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    119b <main+0x7b>
mov    -0x18(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
lea    0xe39(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1159 <main+0x39>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xeb6(%rip),%rdi
call   1040 <puts@plt>
lea    0xea1(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%ebx
test   %ebx,%ebx
jle    11e6 <main+0xa6>
xor    %ebp,%ebp
mov    $0x1,%r15d
lea    0xe86(%rip),%r12
lea    0xe7c(%rip),%r14
nopw   0x0(%rax,%rax,1)
lea    -0x2(%rbx),%eax
cmp    %ebp,%eax
jl     11af <main+0x6f>
add    $0xffffffff,%ebx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1050 <printf@plt>
add    $0xffffffff,%ebx
cmp    %ebp,%ebx
jg     11a0 <main+0x60>
mov    %r15d,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r12,%rdi
call   1050 <printf@plt>
add    $0xffffffff,%ebx
jne    11c0 <main+0x80>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
mov    0xc(%rsp),%ebx
add    $0x2,%r15d
cmp    %ebx,%ebp
jl     1190 <main+0x50>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"vuvedi n= \0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [3 x i8] c" \00"
@.str.3 = [3 x i8] c"* \00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
store i32 0, i32* %3
br label %9
9: ; preds = %39, %0
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %42
13: ; preds = %9
%14 = load i32, i32* %2
%15 = sub nsw i32 %14, 2
store i32 %15, i32* %5
br label %16
16: ; preds = %22, %13
%17 = load i32, i32* %5
%18 = load i32, i32* %3
%19 = icmp sge i32 %17, %18
br i1 %19, label %20, label %25
20: ; preds = %16
%21 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %22
22: ; preds = %20
%23 = load i32, i32* %5
%24 = add nsw i32 %23, -1
store i32 %24, i32* %5
br label %16
25: ; preds = %16
store i32 1, i32* %4
br label %26
26: ; preds = %32, %25
%27 = load i32, i32* %4
%28 = load i32, i32* %6
%29 = icmp sle i32 %27, %28
br i1 %29, label %30, label %35
30: ; preds = %26
%31 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %32
32: ; preds = %30
%33 = load i32, i32* %4
%34 = add nsw i32 %33, 1
store i32 %34, i32* %4
br label %26
35: ; preds = %26
%36 = load i32, i32* %6
%37 = add nsw i32 %36, 2
store i32 %37, i32* %6
%38 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %39
39: ; preds = %35
%40 = load i32, i32* %3
%41 = add nsw i32 %40, 1
store i32 %41, i32* %3
br label %9
42: ; preds = %9
%43 = load i32, i32* %1
ret i32 %43
}

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