#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 i, j, n;
  scanf("%d", &n);
  for (i = 0; i <= n; i++) {
    for (j = 0; j < n - i; j++) {
      printf(" ");
    }
    printf("/");
    for (j = 0; j < 2 * i - 1; j++) {
      if (i == n) {
        printf("_");
      } else {
        printf(" ");
      }
    }
    if (i == 0) {
      printf("\\ \n");
    } else {
      printf(" \\ \n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1221 <main+0x101>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jge    1184 <main+0x64>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1159 <main+0x39>
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11e7 <main+0xc7>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11c8 <main+0xa8>
lea    0xe49(%rip),%rdi
call   1030 <printf@plt>
jmp    11d4 <main+0xb4>
lea    0xe34(%rip),%rdi
call   1030 <printf@plt>
jmp    11d9 <main+0xb9>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1197 <main+0x77>
cmpl   $0x0,-0x8(%rbp)
jne    1202 <main+0xe2>
lea    0xe12(%rip),%rdi
call   1030 <printf@plt>
jmp    120e <main+0xee>
lea    0xe00(%rip),%rdi
call   1030 <printf@plt>
jmp    1213 <main+0xf3>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x26>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xebe(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
js     120d <main+0xdd>
xor    %r13d,%r13d
mov    $0xffffffff,%r12d
lea    0xe9c(%rip),%r14
lea    0xe94(%rip),%r15
jmp    11a3 <main+0x73>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
test   %r13d,%r13d
mov    %r15,%rdi
cmove  %r14,%rdi
call   1040 <puts@plt>
lea    0x1(%r13),%ecx
mov    0x4(%rsp),%eax
add    $0x2,%r12d
cmp    %eax,%r13d
mov    %ecx,%r13d
jge    120d <main+0xdd>
cmp    $0x2,%r12d
mov    $0x1,%ebp
cmovge %r12d,%ebp
cmp    %r13d,%eax
jle    11d8 <main+0xa8>
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
mov    0x4(%rsp),%eax
sub    %r13d,%eax
cmp    %eax,%ebx
jl     11c0 <main+0x90>
mov    $0x2f,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
test   %r13d,%r13d
jne    11fa <main+0xca>
jmp    118a <main+0x5a>
nopl   0x0(%rax)
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
je     1180 <main+0x50>
mov    $0x5f,%edi
cmp    0x4(%rsp),%r13d
je     11f0 <main+0xc0>
mov    $0x20,%edi
jmp    11f0 <main+0xc0>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
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"_\00"
@.str.4 = [4 x i8] c"\\ \0A\00"
@.str.5 = [5 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* %4)
store i32 0, i32* %2
br label %6
6: ; preds = %50, %0
%7 = load i32, i32* %2
%8 = load i32, i32* %4
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %53
10: ; preds = %6
store i32 0, i32* %3
br label %11
11: ; preds = %19, %10
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = load i32, i32* %2
%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* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %11
22: ; preds = %11
%23 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %24
24: ; preds = %39, %22
%25 = load i32, i32* %3
%26 = load i32, i32* %2
%27 = mul nsw i32 2, %26
%28 = sub nsw i32 %27, 1
%29 = icmp slt i32 %25, %28
br i1 %29, label %30, label %42
30: ; preds = %24
%31 = load i32, i32* %2
%32 = load i32, i32* %4
%33 = icmp eq i32 %31, %32
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %38
36: ; preds = %30
%37 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %38
38: ; preds = %36, %34
br label %39
39: ; preds = %38
%40 = load i32, i32* %3
%41 = add nsw i32 %40, 1
store i32 %41, i32* %3
br label %24
42: ; preds = %24
%43 = load i32, i32* %2
%44 = icmp eq i32 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
br label %49
47: ; preds = %42
%48 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %49
49: ; preds = %47, %45
br label %50
50: ; preds = %49
%51 = load i32, i32* %2
%52 = add nsw i32 %51, 1
store i32 %52, i32* %2
br label %6
53: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [4 x i8] c" \\ \00"
@str.6 = [3 x i8] c"\\ \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 %39, label %6
6: ; preds = %0, %32
%7 = phi i32 [ %36, %32 ], [ %4, %0 ]
%8 = phi i32 [ %38, %32 ], [ -1, %0 ]
%9 = phi i32 [ %35, %32 ], [ 0, %0 ]
%10 = call i32 @llvm.smax.i32(i32 %8, i32 1)
%11 = icmp sgt i32 %7, %9
br i1 %11, label %12, label %19
12: ; preds = %6, %12
%13 = phi i32 [ %15, %12 ], [ 0, %6 ]
%14 = call i32 @putchar(i32 32)
%15 = add nuw nsw i32 %13, 1
%16 = load i32, i32* %1
%17 = sub nsw i32 %16, %9
%18 = icmp slt i32 %15, %17
br i1 %18, label %12, label %19
19: ; preds = %12, %6
%20 = call i32 @putchar(i32 47)
%21 = icmp eq i32 %9, 0
br i1 %21, label %32, label %22
22: ; preds = %19, %22
%23 = phi i32 [ %28, %22 ], [ 0, %19 ]
%24 = load i32, i32* %1
%25 = icmp eq i32 %9, %24
%26 = select i1 %25, i32 95, i32 32
%27 = call i32 @putchar(i32 %26)
%28 = add nuw nsw i32 %23, 1
%29 = icmp eq i32 %28, %10
br i1 %29, label %30, label %22
30: ; preds = %22
%31 = select i1 %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0)
br label %32
32: ; preds = %30, %19
%33 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @str.6, i64 0, i64 0), %19 ], [ %31, %30 ]
%34 = call i32 @puts(i8* dereferenceable(1) %33)
%35 = add nuw nsw i32 %9, 1
%36 = load i32, i32* %1
%37 = icmp slt i32 %9, %36
%38 = add i32 %8, 2
br i1 %37, label %6, label %39
39: ; preds = %32, %0
ret i32 0
}