#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 i, j, k = 2;
  while ((k % 2) == 0 && k < 9) {
    k += 2;
    i = 0;
    j = 0;
    while (i < 8) {
      i++;
      printf("* ");
    }
    printf("\n");
    printf(" ");
    while (j < 8) {
      j++;
      printf("* ");
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    $0x0,%edx
mov    %al,-0x11(%rbp)
jne    1149 <main+0x39>
cmpl   $0x9,-0x10(%rbp)
setl   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1159 <main+0x49>
jmp    11e1 <main+0xd1>
mov    -0x10(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1194 <main+0x84>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
jmp    1170 <main+0x60>
lea    0xe68(%rip),%rdi
call   1030 <printf@plt>
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x8,-0xc(%rbp)
jge    11d0 <main+0xc0>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
lea    0xe3a(%rip),%rdi
call   1030 <printf@plt>
jmp    11ac <main+0x9c>
lea    0xe2c(%rip),%rdi
call   1030 <printf@plt>
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
lea    0xed4(%rip),%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x2,%ebp
cmp    $0x7,%ebp
jb     1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"* \00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [2 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 2, i32* %4
br label %5
5: ; preds = %34, %0
%6 = load i32, i32* %4
%7 = srem i32 %6, 2
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 9
br label %12
12: ; preds = %9, %5
%13 = phi i1 [ false, %5 ], [ %11, %9 ]
br i1 %13, label %14, label %36
14: ; preds = %12
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 2
store i32 %16, i32* %4
store i32 0, i32* %2
store i32 0, i32* %3
br label %17
17: ; preds = %20, %14
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 8
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
%23 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %17
24: ; preds = %17
%25 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %27
27: ; preds = %30, %24
%28 = load i32, i32* %3
%29 = icmp slt i32 %28, 8
br i1 %29, label %30, label %34
30: ; preds = %27
%31 = load i32, i32* %3
%32 = add nsw i32 %31, 1
store i32 %32, i32* %3
%33 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %27
34: ; preds = %27
%35 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %5
36: ; preds = %12
ret i32 0
}

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