#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, t;
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) {
    t = N - i;
    for (int j = 0; j < t; j++)
      printf(" ");
    for (int k = 0; k < 2 * i - 1; k++) {
      if (k % 2 == 1)
        printf(" ");
      else
        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   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1201 <main+0xe1>
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1188 <main+0x68>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1162 <main+0x42>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x1,%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11e7 <main+0xc7>
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    11c8 <main+0xa8>
lea    0xe45(%rip),%rdi
call   1030 <printf@plt>
jmp    11d4 <main+0xb4>
lea    0xe36(%rip),%rdi
call   1030 <printf@plt>
jmp    11d9 <main+0xb9>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    118f <main+0x6f>
lea    0xe19(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1146 <main+0x26>
xor    %eax,%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    0xecd(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%ebp
test   %ebp,%ebp
jle    11d8 <main+0xb8>
mov    $0x1,%r14d
mov    $0x2a,%r15d
mov    $0x1,%r12d
nopl   0x0(%rax,%rax,1)
cmp    $0x2,%r14d
mov    $0x1,%ebx
cmovge %r14d,%ebx
cmp    %r12d,%ebp
jle    1192 <main+0x72>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
cmp    %ebp,%r12d
jne    1180 <main+0x60>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
test   $0x1,%bpl
mov    $0x20,%edi
cmove  %r15d,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    11a0 <main+0x80>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%r12),%eax
mov    0xc(%rsp),%ebp
add    $0x2,%r14d
cmp    %r12d,%ebp
mov    %eax,%r12d
jg     1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
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
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 1, i32* %4
br label %8
8: ; preds = %46, %0
%9 = load i32, i32* %4
%10 = load i32, i32* %2
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %49
12: ; preds = %8
%13 = load i32, i32* %2
%14 = load i32, i32* %4
%15 = sub nsw i32 %13, %14
store i32 %15, i32* %3
store i32 0, i32* %5
br label %16
16: ; preds = %22, %12
%17 = load i32, i32* %5
%18 = load i32, i32* %3
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %25
20: ; preds = %16
%21 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, 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 0, i32* %6
br label %26
26: ; preds = %41, %25
%27 = load i32, i32* %6
%28 = load i32, i32* %4
%29 = mul nsw i32 2, %28
%30 = sub nsw i32 %29, 1
%31 = icmp slt i32 %27, %30
br i1 %31, label %32, label %44
32: ; preds = %26
%33 = load i32, i32* %6
%34 = srem i32 %33, 2
%35 = icmp eq i32 %34, 1
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %40
38: ; preds = %32
%39 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %40
40: ; preds = %38, %36
br label %41
41: ; preds = %40
%42 = load i32, i32* %6
%43 = add nsw i32 %42, 1
store i32 %43, i32* %6
br label %26
44: ; preds = %26
%45 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %46
46: ; preds = %44
%47 = load i32, i32* %4
%48 = add nsw i32 %47, 1
store i32 %48, i32* %4
br label %8
49: ; preds = %8
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 %6, label %7
6: ; preds = %22, %0
ret i32 0
7: ; preds = %0, %22
%8 = phi i32 [ %28, %22 ], [ 1, %0 ]
%9 = phi i32 [ %27, %22 ], [ -1, %0 ]
%10 = phi i32 [ %25, %22 ], [ %4, %0 ]
%11 = phi i32 [ %24, %22 ], [ 1, %0 ]
%12 = call i32 @llvm.smax.i32(i32 %8, i32 1)
%13 = icmp sgt i32 %10, %11
br i1 %13, label %15, label %14
14: ; preds = %17, %7
br label %29
15: ; preds = %7
%16 = add i32 %10, %9
br label %17
17: ; preds = %15, %17
%18 = phi i32 [ %20, %17 ], [ 0, %15 ]
%19 = call i32 @putchar(i32 32)
%20 = add nuw nsw i32 %18, 1
%21 = icmp eq i32 %20, %16
br i1 %21, label %14, label %17
22: ; preds = %29
%23 = call i32 @putchar(i32 10)
%24 = add nuw nsw i32 %11, 1
%25 = load i32, i32* %1
%26 = icmp sgt i32 %25, %11
%27 = add i32 %9, -1
%28 = add nuw i32 %8, 2
br i1 %26, label %7, label %6
29: ; preds = %14, %29
%30 = phi i32 [ %35, %29 ], [ 0, %14 ]
%31 = and i32 %30, 1
%32 = icmp eq i32 %31, 0
%33 = select i1 %32, i32 42, i32 32
%34 = call i32 @putchar(i32 %33)
%35 = add nuw nsw i32 %30, 1
%36 = icmp eq i32 %35, %12
br i1 %36, label %22, label %29
}