#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*/ putchar(char);
int main() {
  int x, y, i;
  for (y = (1 << 5) - 1; y >= 0; y--, putchar('\n')) {
    for (i = 0; i < y; i++)
      putchar(' ');
    for (x = 0; x + y < (1 << 5); x++)
      printf((x & y) ? "  " : "* ");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1f,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     11cc <main+0xac>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    116b <main+0x4b>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1147 <main+0x27>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x20,%eax
jge    11af <main+0x8f>
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
lea    0xe75(%rip),%rdi
lea    0xe6b(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1172 <main+0x52>
jmp    11b4 <main+0x94>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1136 <main+0x16>
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
mov    $0x1f,%ebp
mov    $0x1,%r13d
lea    0xec6(%rip),%r14
lea    0xebc(%rip),%r15
mov    $0x1f,%r12d
nopw   0x0(%rax,%rax,1)
sub    $0x1,%r12d
jb     116f <main+0x4f>
mov    %ebp,%ebx
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1160 <main+0x40>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
test   %ebp,%ebx
mov    %r15,%rdi
cmove  %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    %ebx,%r13d
jne    1180 <main+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r13d
mov    %r12d,%ebp
cmp    $0x21,%r13d
jne    1150 <main+0x30>
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" \00"
@.str.1 = [3 x i8] c"* \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 31, i32* %3
br label %5
5: ; preds = %36, %0
%6 = load i32, i32* %3
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %40
8: ; preds = %5
store i32 0, i32* %4
br label %9
9: ; preds = %15, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = call i32 @putchar(i8 signext 32)
br label %15
15: ; preds = %13
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %9
18: ; preds = %9
store i32 0, i32* %2
br label %19
19: ; preds = %32, %18
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = add nsw i32 %20, %21
%23 = icmp slt i32 %22, 32
br i1 %23, label %24, label %35
24: ; preds = %19
%25 = load i32, i32* %2
%26 = load i32, i32* %3
%27 = and i32 %25, %26
%28 = icmp ne i32 %27, 0
%29 = zext i1 %28 to i64
%30 = select i1 %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%31 = call i32 @printf(i8* %30)
br label %32
32: ; preds = %24
%33 = load i32, i32* %2
%34 = add nsw i32 %33, 1
store i32 %34, i32* %2
br label %19
35: ; preds = %19
br label %36
36: ; preds = %35
%37 = load i32, i32* %3
%38 = add nsw i32 %37, -1
store i32 %38, i32* %3
%39 = call i32 @putchar(i8 signext 10)
br label %5
40: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c" \00"
@.str.1 = [3 x i8] c"* \00"
define i32 @main() {
br label %1
1: ; preds = %0, %19
%2 = phi i32 [ 1, %0 ], [ %22, %19 ]
%3 = phi i32 [ 31, %0 ], [ %20, %19 ]
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %8, %5 ], [ 0, %1 ]
%7 = tail call i32 @putchar(i8 signext 32)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %3
br i1 %9, label %10, label %5
10: ; preds = %5, %1
br label %11
11: ; preds = %10, %11
%12 = phi i32 [ %17, %11 ], [ 0, %10 ]
%13 = and i32 %12, %3
%14 = icmp eq i32 %13, 0
%15 = select i1 %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
%16 = tail call i32 @printf(i8* dereferenceable(1) %15)
%17 = add nuw nsw i32 %12, 1
%18 = icmp eq i32 %17, %2
br i1 %18, label %19, label %11
19: ; preds = %11
%20 = add nsw i32 %3, -1
%21 = tail call i32 @putchar(i8 signext 10)
%22 = add nuw nsw i32 %2, 1
%23 = icmp eq i32 %22, 33
br i1 %23, label %24, label %1
24: ; preds = %19
ret i32 0
}