#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 main() {
  int starNo, spaceNo;
  for (int i = 1; i <= 10; i++) {
    starNo = i * 2 - 1;
    spaceNo = i + 10 - starNo;
    for (int j = 0; j < spaceNo; j++)
      printf(" ");
    for (int k = 0; k < starNo; k++)
      printf("%c", '*');
    printf("\n");
  }
  for (int l = 0; l < 3; l++) {
    for (int m = 0; m < (10 * 2 + 1) / 2; m++)
      printf(" ");
    printf("%c\n", '*');
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jg     11c7 <main+0xb7>
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0xa,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1177 <main+0x67>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114f <main+0x3f>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11ab <main+0x9b>
lea    0xe71(%rip),%rdi
mov    $0x2a,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    117e <main+0x6e>
lea    0xe55(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <main+0x16>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    1226 <main+0x116>
movl   $0x0,-0x20(%rbp)
cmpl   $0xa,-0x20(%rbp)
jge    1205 <main+0xf5>
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11df <main+0xcf>
lea    0xdf9(%rip),%rdi
mov    $0x2a,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11ce <main+0xbe>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0xa,%r14d
mov    $0x1,%r15d
mov    $0x1,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r14d,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    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
jne    1170 <main+0x50>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
add    $0xffffffff,%r14d
add    $0x2,%r15d
cmp    $0xb,%ebx
jne    1140 <main+0x20>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
lea    0xdfc(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x2a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x2a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %4
br label %9
9: ; preds = %41, %0
%10 = load i32, i32* %4
%11 = icmp sle i32 %10, 10
br i1 %11, label %12, label %44
12: ; preds = %9
%13 = load i32, i32* %4
%14 = mul nsw i32 %13, 2
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %2
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 10
%18 = load i32, i32* %2
%19 = sub nsw i32 %17, %18
store i32 %19, i32* %3
store i32 0, i32* %5
br label %20
20: ; preds = %26, %12
%21 = load i32, i32* %5
%22 = load i32, i32* %3
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %26
26: ; preds = %24
%27 = load i32, i32* %5
%28 = add nsw i32 %27, 1
store i32 %28, i32* %5
br label %20
29: ; preds = %20
store i32 0, i32* %6
br label %30
30: ; preds = %36, %29
%31 = load i32, i32* %6
%32 = load i32, i32* %2
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %39
34: ; preds = %30
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 42)
br label %36
36: ; preds = %34
%37 = load i32, i32* %6
%38 = add nsw i32 %37, 1
store i32 %38, i32* %6
br label %30
39: ; preds = %30
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %41
41: ; preds = %39
%42 = load i32, i32* %4
%43 = add nsw i32 %42, 1
store i32 %43, i32* %4
br label %9
44: ; preds = %9
store i32 0, i32* %7
br label %45
45: ; preds = %59, %44
%46 = load i32, i32* %7
%47 = icmp slt i32 %46, 3
br i1 %47, label %48, label %62
48: ; preds = %45
store i32 0, i32* %8
br label %49
49: ; preds = %54, %48
%50 = load i32, i32* %8
%51 = icmp slt i32 %50, 10
br i1 %51, label %52, label %57
52: ; preds = %49
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %54
54: ; preds = %52
%55 = load i32, i32* %8
%56 = add nsw i32 %55, 1
store i32 %56, i32* %8
br label %49
57: ; preds = %49
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 42)
br label %59
59: ; preds = %57
%60 = load i32, i32* %7
%61 = add nsw i32 %60, 1
store i32 %61, i32* %7
br label %45
62: ; preds = %45
ret i32 0
}

LLVM IR (-O2):
@.str.3 = [4 x i8] c"%c\0A\00"
define i32 @main() {
br label %1
1: ; preds = %10, %0
%2 = phi i32 [ 1, %0 ], [ %14, %10 ]
%3 = phi i32 [ 10, %0 ], [ %13, %10 ]
%4 = phi i32 [ 1, %0 ], [ %12, %10 ]
br label %5
5: ; preds = %1, %5
%6 = phi i32 [ %8, %5 ], [ 0, %1 ]
%7 = tail call i32 @putchar(i32 32)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %3
br i1 %9, label %50, label %5
10: ; preds = %50
%11 = tail call i32 @putchar(i32 10)
%12 = add nuw nsw i32 %4, 1
%13 = add nsw i32 %3, -1
%14 = add nuw nsw i32 %2, 2
%15 = icmp eq i32 %12, 11
br i1 %15, label %16, label %1
16: ; preds = %10
%17 = tail call i32 @putchar(i32 32)
%18 = tail call i32 @putchar(i32 32)
%19 = tail call i32 @putchar(i32 32)
%20 = tail call i32 @putchar(i32 32)
%21 = tail call i32 @putchar(i32 32)
%22 = tail call i32 @putchar(i32 32)
%23 = tail call i32 @putchar(i32 32)
%24 = tail call i32 @putchar(i32 32)
%25 = tail call i32 @putchar(i32 32)
%26 = tail call i32 @putchar(i32 32)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 42)
%28 = tail call i32 @putchar(i32 32)
%29 = tail call i32 @putchar(i32 32)
%30 = tail call i32 @putchar(i32 32)
%31 = tail call i32 @putchar(i32 32)
%32 = tail call i32 @putchar(i32 32)
%33 = tail call i32 @putchar(i32 32)
%34 = tail call i32 @putchar(i32 32)
%35 = tail call i32 @putchar(i32 32)
%36 = tail call i32 @putchar(i32 32)
%37 = tail call i32 @putchar(i32 32)
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 42)
%39 = tail call i32 @putchar(i32 32)
%40 = tail call i32 @putchar(i32 32)
%41 = tail call i32 @putchar(i32 32)
%42 = tail call i32 @putchar(i32 32)
%43 = tail call i32 @putchar(i32 32)
%44 = tail call i32 @putchar(i32 32)
%45 = tail call i32 @putchar(i32 32)
%46 = tail call i32 @putchar(i32 32)
%47 = tail call i32 @putchar(i32 32)
%48 = tail call i32 @putchar(i32 32)
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 42)
ret i32 0
50: ; preds = %5, %50
%51 = phi i32 [ %53, %50 ], [ 0, %5 ]
%52 = tail call i32 @putchar(i32 42)
%53 = add nuw nsw i32 %51, 1
%54 = icmp eq i32 %53, %2
br i1 %54, label %10, label %50
}