#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 rows;
  do
    scanf("%d", &rows);
  while (rows <= 0);
  int stars, current_row, spaces;
  for (current_row = 1; current_row ^ (rows + 1); current_row++) {
    for (spaces = rows - current_row; spaces >= 1; spaces--)
      printf(" ");
    for (stars = 1; stars <= (current_row << 1) - 1; stars++, 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>
cmpl   $0x0,-0x8(%rbp)
jle    112f <main+0xf>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
xor    %ecx,%eax
cmp    $0x0,%eax
je     11e5 <main+0xc5>
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jl     1191 <main+0x71>
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    116d <main+0x4d>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x1,%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     11cb <main+0xab>
jmp    11b1 <main+0x91>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
jmp    1198 <main+0x78>
lea    0xe35(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1150 <main+0x30>
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),%r14
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebp
test   %ebp,%ebp
jle    1140 <main+0x20>
xor    %r14d,%r14d
mov    $0x1,%r15d
mov    $0x1,%ebx
jmp    118f <main+0x6f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbx),%eax
mov    0x4(%rsp),%ebp
add    $0xffffffff,%r14d
add    $0x2,%r15d
cmp    %ebp,%ebx
mov    %eax,%ebx
je     11d1 <main+0xb1>
cmp    %ebx,%ebp
jle    11b2 <main+0x92>
add    %r14d,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     11a0 <main+0x80>
lea    (%rbx,%rbx,1),%eax
mov    %r15d,%ebp
cmp    $0x2,%eax
jl     1170 <main+0x50>
nopl   (%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    11c0 <main+0xa0>
jmp    1170 <main+0x50>
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
%5 = alloca i32
store i32 0, i32* %1
br label %6
6: ; preds = %8, %0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %8
8: ; preds = %6
%9 = load i32, i32* %2
%10 = icmp sle i32 %9, 0
br i1 %10, label %6, label %11
11: ; preds = %8
store i32 1, i32* %4
br label %12
12: ; preds = %44, %11
%13 = load i32, i32* %4
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
%16 = xor i32 %13, %15
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %47
18: ; preds = %12
%19 = load i32, i32* %2
%20 = load i32, i32* %4
%21 = sub nsw i32 %19, %20
store i32 %21, i32* %5
br label %22
22: ; preds = %27, %18
%23 = load i32, i32* %5
%24 = icmp sge i32 %23, 1
br i1 %24, label %25, label %30
25: ; preds = %22
%26 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %27
27: ; preds = %25
%28 = load i32, i32* %5
%29 = add nsw i32 %28, -1
store i32 %29, i32* %5
br label %22
30: ; preds = %22
store i32 1, i32* %3
br label %31
31: ; preds = %38, %30
%32 = load i32, i32* %3
%33 = load i32, i32* %4
%34 = shl i32 %33, 1
%35 = sub nsw i32 %34, 1
%36 = icmp sle i32 %32, %35
br i1 %36, label %37, label %42
37: ; preds = %31
br label %38
38: ; preds = %37
%39 = load i32, i32* %3
%40 = add nsw i32 %39, 1
store i32 %40, i32* %3
%41 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %31
42: ; preds = %31
%43 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %44
44: ; preds = %42
%45 = load i32, i32* %4
%46 = add nsw i32 %45, 1
store i32 %46, i32* %4
br label %12
47: ; preds = %12
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*
br label %3
3: ; preds = %3, %0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 1
br i1 %6, label %3, label %7
7: ; preds = %3, %26
%8 = phi i32 [ %31, %26 ], [ 2, %3 ]
%9 = phi i32 [ %29, %26 ], [ %5, %3 ]
%10 = phi i32 [ %28, %26 ], [ 1, %3 ]
%11 = sub nsw i32 %9, %10
%12 = icmp sgt i32 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %16, %7
%14 = shl nuw i32 %10, 1
%15 = icmp sgt i32 %14, 1
br i1 %15, label %21, label %26
16: ; preds = %7, %16
%17 = phi i32 [ %19, %16 ], [ %11, %7 ]
%18 = call i32 @putchar(i32 32)
%19 = add nsw i32 %17, -1
%20 = icmp ugt i32 %17, 1
br i1 %20, label %16, label %13
21: ; preds = %13, %21
%22 = phi i32 [ %23, %21 ], [ 1, %13 ]
%23 = add nuw nsw i32 %22, 1
%24 = call i32 @putchar(i32 42)
%25 = icmp eq i32 %23, %8
br i1 %25, label %26, label %21
26: ; preds = %21, %13
%27 = call i32 @putchar(i32 10)
%28 = add nuw nsw i32 %10, 1
%29 = load i32, i32* %1
%30 = icmp eq i32 %10, %29
%31 = add i32 %8, 2
br i1 %30, label %32, label %7
32: ; preds = %26
ret i32 0
}