#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 visochina, space, zvezdi, i;
  scanf("%d", &visochina);
  for (i = 0; i <= visochina; i++) {
    for (space = visochina - i; space >= 0; space--)
      printf(" ");
    for (zvezdi = 2 * i - 1; zvezdi > 0; zvezdi--)
      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    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11c9 <main+0xa9>
mov    -0x8(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     117f <main+0x5f>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    115b <main+0x3b>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    11af <main+0x8f>
lea    0xe69(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    118b <main+0x6b>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%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),%ebp
test   %ebp,%ebp
js     11b4 <main+0x94>
xor    %ebx,%ebx
mov    $0x1,%r14d
jmp    116b <main+0x4b>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbx),%eax
mov    0xc(%rsp),%ebp
add    $0x2,%r14d
cmp    %ebx,%ebp
mov    %eax,%ebx
jle    11b4 <main+0x94>
cmp    %ebx,%ebp
js     1191 <main+0x71>
add    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
cmp    %ebp,%ebx
jne    1180 <main+0x60>
test   %ebx,%ebx
je     1150 <main+0x30>
mov    %r14d,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
cmp    $0x2,%ebp
jg     11a0 <main+0x80>
jmp    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* %2)
store i32 0, i32* %5
br label %7
7: ; preds = %37, %0
%8 = load i32, i32* %5
%9 = load i32, i32* %2
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %40
11: ; preds = %7
%12 = load i32, i32* %2
%13 = load i32, i32* %5
%14 = sub nsw i32 %12, %13
store i32 %14, i32* %3
br label %15
15: ; preds = %20, %11
%16 = load i32, i32* %3
%17 = icmp sge i32 %16, 0
br i1 %17, label %18, label %23
18: ; preds = %15
%19 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %20
20: ; preds = %18
%21 = load i32, i32* %3
%22 = add nsw i32 %21, -1
store i32 %22, i32* %3
br label %15
23: ; preds = %15
%24 = load i32, i32* %5
%25 = mul nsw i32 2, %24
%26 = sub nsw i32 %25, 1
store i32 %26, i32* %4
br label %27
27: ; preds = %32, %23
%28 = load i32, i32* %4
%29 = icmp sgt i32 %28, 0
br i1 %29, label %30, label %35
30: ; preds = %27
%31 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, 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 %27
35: ; preds = %27
%36 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %37
37: ; preds = %35
%38 = load i32, i32* %5
%39 = add nsw i32 %38, 1
store i32 %39, i32* %5
br label %7
40: ; 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, 0
br i1 %5, label %30, label %6
6: ; preds = %0, %25
%7 = phi i32 [ %28, %25 ], [ %4, %0 ]
%8 = phi i32 [ %27, %25 ], [ 0, %0 ]
%9 = sub nsw i32 %7, %8
%10 = icmp sgt i32 %9, -1
br i1 %10, label %11, label %16
11: ; preds = %6, %11
%12 = phi i32 [ %14, %11 ], [ %9, %6 ]
%13 = call i32 @putchar(i32 32)
%14 = add nsw i32 %12, -1
%15 = icmp eq i32 %12, 0
br i1 %15, label %16, label %11
16: ; preds = %11, %6
%17 = icmp eq i32 %8, 0
br i1 %17, label %25, label %18
18: ; preds = %16
%19 = shl nuw nsw i32 %8, 1
br label %20
20: ; preds = %18, %20
%21 = phi i32 [ %22, %20 ], [ %19, %18 ]
%22 = add nsw i32 %21, -1
%23 = call i32 @putchar(i32 42)
%24 = icmp sgt i32 %21, 2
br i1 %24, label %20, label %25
25: ; preds = %20, %16
%26 = call i32 @putchar(i32 10)
%27 = add nuw nsw i32 %8, 1
%28 = load i32, i32* %1
%29 = icmp sgt i32 %28, %8
br i1 %29, label %6, label %30
30: ; preds = %25, %0
ret i32 0
}