#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(void) {
  int i = 1, j = 1;
  while (i <= 100) {
    while (j <= 100) {
      if ((j == -i + 2) || (j == -i + 6) || (j == i - 2) || (j == i + 2))
        printf("*");
      else
        printf(" ");
      j++;
    }
    printf("\n");
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     11d3 <main+0xc3>
jmp    113c <main+0x2c>
cmpl   $0x64,-0xc(%rbp)
jg     11b9 <main+0xa9>
mov    -0xc(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
je     118e <main+0x7e>
mov    -0xc(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
add    $0x6,%ecx
cmp    %ecx,%eax
je     118e <main+0x7e>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
je     118e <main+0x7e>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jne    119f <main+0x8f>
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
jmp    11ab <main+0x9b>
lea    0xe5c(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113c <main+0x2c>
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    $0x1,%ebx
mov    $0x1,%ebp
jmp    1147 <main+0x37>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x65,%ebx
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    $0x65,%ebp
je     11b3 <main+0xa3>
cmp    $0x64,%ebx
ja     1135 <main+0x25>
movd   %ebp,%xmm0
pshufd $0x0,%xmm0,%xmm1
movdqa 0xea3(%rip),%xmm0
psubd  %xmm1,%xmm0
paddd  0xea7(%rip),%xmm1
movsd  %xmm0,%xmm1
movapd %xmm1,(%rsp)
jmp    118d <main+0x7d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
je     1130 <main+0x20>
movd   %ebx,%xmm0
pshufd $0x0,%xmm0,%xmm0
pcmpeqd (%rsp),%xmm0
pslld  $0x1f,%xmm0
movmskps %xmm0,%eax
mov    $0x20,%edi
test   %eax,%eax
je     1180 <main+0x70>
mov    $0x2a,%edi
jmp    1180 <main+0x70>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %23
%2 = phi i32 [ 1, %0 ], [ %24, %23 ]
%3 = phi i32 [ 1, %0 ], [ %26, %23 ]
%4 = icmp ult i32 %2, 101
br i1 %4, label %5, label %23
5: ; preds = %1
%6 = insertelement <4 x i32> poison, i32 %3, i64 0
%7 = shufflevector <4 x i32> %6, <4 x i32> poison, <4 x i32> zeroinitializer
%8 = sub nsw <4 x i32> <i32 2, i32 6, i32 poison, i32 poison>, %7
%9 = add nsw <4 x i32> %7, <i32 poison, i32 poison, i32 -2, i32 2>
%10 = shufflevector <4 x i32> %8, <4 x i32> %9, <4 x i32> <i32 0, i32 1, i32 6, i32 7>
br label %11
11: ; preds = %5, %11
%12 = phi i32 [ %2, %5 ], [ %21, %11 ]
%13 = insertelement <4 x i32> poison, i32 %12, i64 0
%14 = shufflevector <4 x i32> %13, <4 x i32> poison, <4 x i32> zeroinitializer
%15 = icmp eq <4 x i32> %14, %10
%16 = freeze <4 x i1> %15
%17 = bitcast <4 x i1> %16 to i4
%18 = icmp eq i4 %17, 0
%19 = select i1 %18, i32 32, i32 42
%20 = tail call i32 @putchar(i32 %19)
%21 = add i32 %12, 1
%22 = icmp eq i32 %21, 101
br i1 %22, label %23, label %11
23: ; preds = %11, %1
%24 = phi i32 [ %2, %1 ], [ 101, %11 ]
%25 = tail call i32 @putchar(i32 10)
%26 = add nuw nsw i32 %3, 1
%27 = icmp eq i32 %26, 101
br i1 %27, label %28, label %1
28: ; preds = %23
ret i32 0
}