#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*/ print_pattern(int, char *);
int main() {
  int n = 1;
  for (int i = 0; i < n; i++) {
    print_pattern(1, "*     ****   ****     *");
    print_pattern(1, "**     ***   ***     **");
    print_pattern(1, "***     **   **     ***");
    print_pattern(1, "****     *   *     ****");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    118b <main+0x7b>
mov    $0x1,%edi
lea    0xebb(%rip),%rsi
call   1030 <print_pattern@plt>
mov    $0x1,%edi
lea    0xec2(%rip),%rsi
call   1030 <print_pattern@plt>
mov    $0x1,%edi
lea    0xec9(%rip),%rsi
call   1030 <print_pattern@plt>
mov    $0x1,%edi
lea    0xed0(%rip),%rsi
call   1030 <print_pattern@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
call   1030 <print_pattern@plt>
lea    0xeef(%rip),%rsi
mov    $0x1,%edi
call   1030 <print_pattern@plt>
lea    0xef6(%rip),%rsi
mov    $0x1,%edi
call   1030 <print_pattern@plt>
lea    0xefd(%rip),%rsi
mov    $0x1,%edi
call   1030 <print_pattern@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"* **** **** *\00"
@.str.1 = [24 x i8] c"** *** *** **\00"
@.str.2 = [24 x i8] c"*** ** ** ***\00"
@.str.3 = [24 x i8] c"**** * * ****\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 0, i32* %3
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = call i32 @print_pattern(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @print_pattern(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @print_pattern(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @print_pattern(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
br label %13
13: ; preds = %8
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
@.str = [24 x i8] c"* **** **** *\00"
@.str.1 = [24 x i8] c"** *** *** **\00"
@.str.2 = [24 x i8] c"*** ** ** ***\00"
@.str.3 = [24 x i8] c"**** * * ****\00"
define i32 @main() {
%1 = tail call i32 @print_pattern(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_pattern(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @print_pattern(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @print_pattern(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}