#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*/ wzor(int, int);
int main() {
  int x = 1, j = 0, i;
  while (j <= 3) {
    int tab[7] = {x, 8 - x, 5 - x, (x + 1) * 2, tab[2], tab[1], x};
    i = 0;
    while (i <= 6) {
      wzor(tab[i], i);
      i++;
    }
    printf("\n");
    x++;
    j++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jg     11d3 <main+0xb3>
mov    -0x8(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    $0x8,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    $0x5,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jg     11b0 <main+0x90>
movslq -0x10(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edi
mov    -0x10(%rbp),%esi
call   1030 <wzor@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1188 <main+0x68>
lea    0xe49(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <wzor@plt>
mov    $0x7,%edi
mov    $0x1,%esi
call   1040 <wzor@plt>
mov    $0x4,%edi
mov    $0x2,%esi
call   1040 <wzor@plt>
mov    $0x4,%edi
mov    $0x3,%esi
call   1040 <wzor@plt>
mov    $0x4,%edi
mov    $0x4,%esi
call   1040 <wzor@plt>
mov    $0x7,%edi
mov    $0x5,%esi
call   1040 <wzor@plt>
mov    $0x1,%edi
mov    $0x6,%esi
call   1040 <wzor@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <wzor@plt>
mov    $0x6,%edi
mov    $0x1,%esi
call   1040 <wzor@plt>
mov    $0x3,%edi
mov    $0x2,%esi
call   1040 <wzor@plt>
mov    $0x6,%edi
mov    $0x3,%esi
call   1040 <wzor@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <wzor@plt>
mov    $0x6,%edi
mov    $0x5,%esi
call   1040 <wzor@plt>
mov    $0x2,%edi
mov    $0x6,%esi
call   1040 <wzor@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x3,%edi
xor    %esi,%esi
call   1040 <wzor@plt>
mov    $0x5,%edi
mov    $0x1,%esi
call   1040 <wzor@plt>
mov    $0x2,%edi
mov    $0x2,%esi
call   1040 <wzor@plt>
mov    $0x8,%edi
mov    $0x3,%esi
call   1040 <wzor@plt>
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <wzor@plt>
mov    $0x5,%edi
mov    $0x5,%esi
call   1040 <wzor@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1040 <wzor@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x4,%edi
xor    %esi,%esi
call   1040 <wzor@plt>
mov    $0x4,%edi
mov    $0x1,%esi
call   1040 <wzor@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <wzor@plt>
mov    $0xa,%edi
mov    $0x3,%esi
call   1040 <wzor@plt>
mov    $0x1,%edi
mov    $0x4,%esi
call   1040 <wzor@plt>
mov    $0x4,%edi
mov    $0x5,%esi
call   1040 <wzor@plt>
mov    $0x4,%edi
mov    $0x6,%esi
call   1040 <wzor@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @wzor(i32 1, i32 0)
%2 = tail call i32 @wzor(i32 7, i32 1)
%3 = tail call i32 @wzor(i32 4, i32 2)
%4 = tail call i32 @wzor(i32 4, i32 3)
%5 = tail call i32 @wzor(i32 4, i32 4)
%6 = tail call i32 @wzor(i32 7, i32 5)
%7 = tail call i32 @wzor(i32 1, i32 6)
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 @wzor(i32 2, i32 0)
%10 = tail call i32 @wzor(i32 6, i32 1)
%11 = tail call i32 @wzor(i32 3, i32 2)
%12 = tail call i32 @wzor(i32 6, i32 3)
%13 = tail call i32 @wzor(i32 3, i32 4)
%14 = tail call i32 @wzor(i32 6, i32 5)
%15 = tail call i32 @wzor(i32 2, i32 6)
%16 = tail call i32 @putchar(i32 10)
%17 = tail call i32 @wzor(i32 3, i32 0)
%18 = tail call i32 @wzor(i32 5, i32 1)
%19 = tail call i32 @wzor(i32 2, i32 2)
%20 = tail call i32 @wzor(i32 8, i32 3)
%21 = tail call i32 @wzor(i32 2, i32 4)
%22 = tail call i32 @wzor(i32 5, i32 5)
%23 = tail call i32 @wzor(i32 3, i32 6)
%24 = tail call i32 @putchar(i32 10)
%25 = tail call i32 @wzor(i32 4, i32 0)
%26 = tail call i32 @wzor(i32 4, i32 1)
%27 = tail call i32 @wzor(i32 1, i32 2)
%28 = tail call i32 @wzor(i32 10, i32 3)
%29 = tail call i32 @wzor(i32 1, i32 4)
%30 = tail call i32 @wzor(i32 4, i32 5)
%31 = tail call i32 @wzor(i32 4, i32 6)
%32 = tail call i32 @putchar(i32 10)
ret i32 0
}