#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 passlines;
  int lines;
  int res = 1;
  int pasres;
  char star = '*';
  int x;
  int pasx;
  scanf("%d", &lines);
  x = 2 * lines;
  for (passlines = 1; passlines <= lines; passlines++) {
    for (pasres = 1; pasres <= res; pasres++) {
      if (pasres == 1) {
        for (pasx = 1; pasx <= x; pasx++) {
          printf(" ");
        }
      }
      printf("%c", star);
    }
    x = x - 1;
    res = res + 2;
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
movb   $0x2a,-0x15(%rbp)
lea    0xebf(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x1c(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1205 <main+0xe5>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11d7 <main+0xb7>
cmpl   $0x1,-0x14(%rbp)
jne    11b7 <main+0x97>
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     11b2 <main+0x92>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    118a <main+0x6a>
jmp    11b7 <main+0x97>
movsbl -0x15(%rbp),%esi
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116d <main+0x4d>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x10(%rbp)
lea    0xe18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115a <main+0x3a>
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),%ebx
test   %ebx,%ebx
jle    11c3 <main+0xa3>
add    %ebx,%ebx
mov    $0x1,%r14d
mov    $0x2,%r15d
jmp    117f <main+0x5f>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0xffffffff,%ebx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%r14),%eax
add    $0x2,%r15d
cmp    0xc(%rsp),%r14d
mov    %eax,%r14d
jge    11c3 <main+0xa3>
mov    $0x1,%r12d
jmp    11a3 <main+0x83>
nopw   0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%r12d
cmp    %r15d,%r12d
je     1160 <main+0x40>
cmp    $0x1,%r12d
jne    1190 <main+0x70>
test   %ebx,%ebx
jle    1190 <main+0x70>
xor    %ebp,%ebp
nop
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    11b0 <main+0x90>
jmp    1190 <main+0x70>
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 = [3 x i8] c"%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 i8
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %4
store i8 42, i8* %6
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %3
%11 = mul nsw i32 2, %10
store i32 %11, i32* %7
store i32 1, i32* %2
br label %12
12: ; preds = %48, %0
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = icmp sle i32 %13, %14
br i1 %15, label %16, label %51
16: ; preds = %12
store i32 1, i32* %5
br label %17
17: ; preds = %39, %16
%18 = load i32, i32* %5
%19 = load i32, i32* %4
%20 = icmp sle i32 %18, %19
br i1 %20, label %21, label %42
21: ; preds = %17
%22 = load i32, i32* %5
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %35
24: ; preds = %21
store i32 1, i32* %8
br label %25
25: ; preds = %31, %24
%26 = load i32, i32* %8
%27 = load i32, i32* %7
%28 = icmp sle i32 %26, %27
br i1 %28, label %29, label %34
29: ; preds = %25
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %31
31: ; preds = %29
%32 = load i32, i32* %8
%33 = add nsw i32 %32, 1
store i32 %33, i32* %8
br label %25
34: ; preds = %25
br label %35
35: ; preds = %34, %21
%36 = load i8, i8* %6
%37 = sext i8 %36 to i32
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %37)
br label %39
39: ; preds = %35
%40 = load i32, i32* %5
%41 = add nsw i32 %40, 1
store i32 %41, i32* %5
br label %17
42: ; preds = %17
%43 = load i32, i32* %7
%44 = sub nsw i32 %43, 1
store i32 %44, i32* %7
%45 = load i32, i32* %4
%46 = add nsw i32 %45, 2
store i32 %46, i32* %4
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %48
48: ; preds = %42
%49 = load i32, i32* %2
%50 = add nsw i32 %49, 1
store i32 %50, i32* %2
br label %12
51: ; 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*
%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 = shl i32 %4, 1
%6 = icmp slt i32 %4, 1
br i1 %6, label %36, label %7
7: ; preds = %0
%8 = or i32 %5, 1
br label %9
9: ; preds = %7, %28
%10 = phi i32 [ 2, %7 ], [ %35, %28 ]
%11 = phi i32 [ %8, %7 ], [ %34, %28 ]
%12 = phi i32 [ %5, %7 ], [ %29, %28 ]
%13 = phi i32 [ 1, %7 ], [ %31, %28 ]
%14 = icmp slt i32 %12, 1
br label %15
15: ; preds = %9, %24
%16 = phi i32 [ 1, %9 ], [ %26, %24 ]
%17 = icmp ne i32 %16, 1
%18 = select i1 %17, i1 true, i1 %14
br i1 %18, label %24, label %19
19: ; preds = %15, %19
%20 = phi i32 [ %22, %19 ], [ 1, %15 ]
%21 = call i32 @putchar(i32 32)
%22 = add nuw nsw i32 %20, 1
%23 = icmp eq i32 %22, %11
br i1 %23, label %24, label %19
24: ; preds = %19, %15
%25 = call i32 @putchar(i32 42)
%26 = add nuw i32 %16, 1
%27 = icmp eq i32 %26, %10
br i1 %27, label %28, label %15
28: ; preds = %24
%29 = add nsw i32 %12, -1
%30 = call i32 @putchar(i32 10)
%31 = add nuw nsw i32 %13, 1
%32 = load i32, i32* %1
%33 = icmp slt i32 %13, %32
%34 = add nsw i32 %11, -1
%35 = add i32 %10, 2
br i1 %33, label %9, label %36
36: ; preds = %28, %0
ret i32 0
}