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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11d3 <main+0xb3>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    1184 <main+0x64>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1159 <main+0x39>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11b9 <main+0x99>
lea    0xe5f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    118b <main+0x6b>
lea    0xe47(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <main+0x26>
mov    -0x4(%rbp),%eax
add    $0x10,%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),%eax
test   %eax,%eax
js     11c1 <main+0xa1>
xor    %r15d,%r15d
mov    $0xffffffff,%r14d
jmp    116e <main+0x4e>
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%r15),%ecx
mov    0x4(%rsp),%eax
add    $0x2,%r14d
cmp    %eax,%r15d
mov    %ecx,%r15d
jge    11c1 <main+0xa1>
cmp    $0x2,%r14d
mov    $0x1,%ebp
cmovge %r14d,%ebp
cmp    %r15d,%eax
jle    11a8 <main+0x88>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    0x4(%rsp),%eax
sub    %r15d,%eax
cmp    %eax,%ebx
jl     1190 <main+0x70>
test   %r15d,%r15d
je     1150 <main+0x30>
nopl   (%rax)
mov    $0x6f,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    11b0 <main+0x90>
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"o\00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %3
br label %6
6: ; preds = %36, %0
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %39
10: ; preds = %6
store i32 0, i32* %4
br label %11
11: ; preds = %19, %10
%12 = load i32, i32* %4
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = sub nsw i32 %13, %14
%16 = icmp slt i32 %12, %15
br i1 %16, label %17, label %22
17: ; preds = %11
%18 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %17
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %11
22: ; preds = %11
store i32 0, i32* %4
br label %23
23: ; preds = %31, %22
%24 = load i32, i32* %4
%25 = load i32, i32* %3
%26 = mul nsw i32 2, %25
%27 = sub nsw i32 %26, 1
%28 = icmp slt i32 %24, %27
br i1 %28, label %29, label %34
29: ; preds = %23
%30 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %31
31: ; preds = %29
%32 = load i32, i32* %4
%33 = add nsw i32 %32, 1
store i32 %33, i32* %4
br label %23
34: ; preds = %23
%35 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %36
36: ; preds = %34
%37 = load i32, i32* %3
%38 = add nsw i32 %37, 1
store i32 %38, i32* %3
br label %6
39: ; preds = %6
%40 = load i32, i32* %1
ret i32 %40
}

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