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


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>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jle    11d9 <main+0xb9>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    118d <main+0x6d>
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1162 <main+0x42>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jle    11bf <main+0x9f>
lea    0xe59(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    119b <main+0x7b>
lea    0xe41(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1151 <main+0x31>
mov    -0x4(%rbp),%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),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%r14d
test   %r14d,%r14d
js     11b4 <main+0x94>
xor    %r15d,%r15d
mov    %r14d,%ebx
jmp    1167 <main+0x47>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    -0x1(%rbx),%eax
add    $0x2,%r15d
test   %ebx,%ebx
mov    %eax,%ebx
jle    11b4 <main+0x94>
mov    $0xffffffff,%ebp
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1170 <main+0x50>
mov    %r14d,%eax
sub    %ebx,%eax
add    %eax,%eax
add    $0xffffffff,%eax
test   %eax,%eax
jle    1150 <main+0x30>
mov    %r15d,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     11a0 <main+0x80>
jmp    1150 <main+0x30>
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
%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)
%8 = load i32, i32* %2
%9 = mul nsw i32 2, %8
%10 = sub nsw i32 %9, 1
store i32 %10, i32* %4
%11 = load i32, i32* %2
store i32 %11, i32* %3
br label %12
12: ; preds = %41, %0
%13 = load i32, i32* %3
%14 = icmp sgt i32 %13, -1
br i1 %14, label %15, label %44
15: ; preds = %12
store i32 0, i32* %5
br label %16
16: ; preds = %23, %15
%17 = load i32, i32* %5
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
%20 = icmp slt i32 %17, %19
br i1 %20, label %21, label %26
21: ; preds = %16
%22 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %21
%24 = load i32, i32* %5
%25 = add nsw i32 %24, 1
store i32 %25, i32* %5
br label %16
26: ; preds = %16
%27 = load i32, i32* %4
%28 = load i32, i32* %3
%29 = mul nsw i32 2, %28
%30 = sub nsw i32 %27, %29
store i32 %30, i32* %6
br label %31
31: ; preds = %36, %26
%32 = load i32, i32* %6
%33 = icmp sgt i32 %32, 0
br i1 %33, label %34, label %39
34: ; preds = %31
%35 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %36
36: ; preds = %34
%37 = load i32, i32* %6
%38 = add nsw i32 %37, -1
store i32 %38, i32* %6
br label %31
39: ; preds = %31
%40 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %41
41: ; preds = %39
%42 = load i32, i32* %3
%43 = add nsw i32 %42, -1
store i32 %43, i32* %3
br label %12
44: ; preds = %12
%45 = load i32, i32* %1
ret i32 %45
}

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 sgt i32 %4, -1
br i1 %5, label %6, label %31
6: ; preds = %0
%7 = add nuw i32 %4, 1
br label %8
8: ; preds = %26, %6
%9 = phi i32 [ %7, %6 ], [ %30, %26 ]
%10 = phi i32 [ %4, %6 ], [ %28, %26 ]
br label %11
11: ; preds = %8, %11
%12 = phi i32 [ %14, %11 ], [ 0, %8 ]
%13 = call i32 @putchar(i32 32)
%14 = add nuw i32 %12, 1
%15 = icmp eq i32 %14, %9
br i1 %15, label %16, label %11
16: ; preds = %11
%17 = sub nuw nsw i32 %4, %10
%18 = shl i32 %17, 1
%19 = add i32 %18, -1
%20 = icmp sgt i32 %19, 0
br i1 %20, label %21, label %26
21: ; preds = %16, %21
%22 = phi i32 [ %24, %21 ], [ %19, %16 ]
%23 = call i32 @putchar(i32 42)
%24 = add nsw i32 %22, -1
%25 = icmp ugt i32 %22, 1
br i1 %25, label %21, label %26
26: ; preds = %21, %16
%27 = call i32 @putchar(i32 10)
%28 = add nsw i32 %10, -1
%29 = icmp sgt i32 %10, 0
%30 = add i32 %9, -1
br i1 %29, label %8, label %31
31: ; preds = %26, %0
ret i32 0
}