#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, int, int, int, int, int, int, int);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int x, y, z, f[8];
  for (int i = 0; i < 8; ++i) {
    scanf("%d %d %d", &x, &y, &z);
    scanf("%d", f + x + (y << 1) + (z << 2));
  }
  printf("\t00\t01\t10\t11\n0\t%d\t%d\t%d\t%d\n0\t%d\t%d\t%d\t%d\n", f[0], f[1],
         f[2], f[3], f[4], f[5], f[6], f[7]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x8,-0x34(%rbp)
jge    11a3 <main+0x83>
lea    0xeb9(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x30(%rbp),%rsi
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%eax
shl    $0x2,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1136 <main+0x16>
mov    -0x30(%rbp),%esi
mov    -0x2c(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    -0x1c(%rbp),%r11d
mov    -0x18(%rbp),%r10d
mov    -0x14(%rbp),%eax
lea    0xe43(%rip),%rdi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x30,%rsp
lea    0xecc(%rip),%r14
lea    0xc(%rsp),%r13
lea    0x8(%rsp),%r15
lea    0x4(%rsp),%r12
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
lea    (%rsp,%rax,4),%rax
add    $0x10,%rax
mov    0x8(%rsp),%ecx
add    %ecx,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rax
mov    0x4(%rsp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rsi
lea    0xe81(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
lea    (%rsp,%rax,4),%rax
add    $0x10,%rax
mov    0x8(%rsp),%ecx
add    %ecx,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rax
mov    0x4(%rsp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
lea    (%rsp,%rax,4),%rax
add    $0x10,%rax
mov    0x8(%rsp),%ecx
add    %ecx,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rax
mov    0x4(%rsp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
lea    (%rsp,%rax,4),%rax
add    $0x10,%rax
mov    0x8(%rsp),%ecx
add    %ecx,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rax
mov    0x4(%rsp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
lea    (%rsp,%rax,4),%rax
add    $0x10,%rax
mov    0x8(%rsp),%ecx
add    %ecx,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rax
mov    0x4(%rsp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
lea    (%rsp,%rax,4),%rax
add    $0x10,%rax
mov    0x8(%rsp),%ecx
add    %ecx,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rax
mov    0x4(%rsp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
lea    (%rsp,%rax,4),%rax
add    $0x10,%rax
mov    0x8(%rsp),%ecx
add    %ecx,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rax
mov    0x4(%rsp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
lea    (%rsp,%rax,4),%rax
add    $0x10,%rax
mov    0x8(%rsp),%ecx
add    %ecx,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rax
mov    0x4(%rsp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
lea    (%rax,%rcx,4),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
mov    0x14(%rsp),%edx
mov    0x18(%rsp),%ecx
mov    0x1c(%rsp),%r8d
mov    0x20(%rsp),%r9d
mov    0x24(%rsp),%r10d
mov    0x28(%rsp),%ebx
mov    0x2c(%rsp),%eax
sub    $0x8,%rsp
lea    0xc69(%rip),%rdi
push   %rax
push   %rbx
push   %r10
call   1030 <printf@plt>
add    $0x20,%rsp
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [42 x i8] c"\0900\0901\0910\0911\0A0\09%d\09%d\09%d\09%d\0A0\09%d\09%d\09%d\09%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [8 x i32]
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast [8 x i32]* %4 to i8*
%9 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%10 = load i32, i32* %1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %11
%13 = load i32, i32* %2
%14 = shl i32 %13, 1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %12, i64 %15
%17 = load i32, i32* %3
%18 = shl i32 %17, 2
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %16, i64 %19
%21 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %20)
%22 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%23 = load i32, i32* %1
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %24
%26 = load i32, i32* %2
%27 = shl i32 %26, 1
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i32, i32* %25, i64 %28
%30 = load i32, i32* %3
%31 = shl i32 %30, 2
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %29, i64 %32
%34 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %33)
%35 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%36 = load i32, i32* %1
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %37
%39 = load i32, i32* %2
%40 = shl i32 %39, 1
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i32, i32* %38, i64 %41
%43 = load i32, i32* %3
%44 = shl i32 %43, 2
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i32, i32* %42, i64 %45
%47 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %46)
%48 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%49 = load i32, i32* %1
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %50
%52 = load i32, i32* %2
%53 = shl i32 %52, 1
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i32, i32* %51, i64 %54
%56 = load i32, i32* %3
%57 = shl i32 %56, 2
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i32, i32* %55, i64 %58
%60 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %59)
%61 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%62 = load i32, i32* %1
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %63
%65 = load i32, i32* %2
%66 = shl i32 %65, 1
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i32, i32* %64, i64 %67
%69 = load i32, i32* %3
%70 = shl i32 %69, 2
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i32, i32* %68, i64 %71
%73 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %72)
%74 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%75 = load i32, i32* %1
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %76
%78 = load i32, i32* %2
%79 = shl i32 %78, 1
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i32, i32* %77, i64 %80
%82 = load i32, i32* %3
%83 = shl i32 %82, 2
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i32, i32* %81, i64 %84
%86 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %85)
%87 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%88 = load i32, i32* %1
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %89
%91 = load i32, i32* %2
%92 = shl i32 %91, 1
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds i32, i32* %90, i64 %93
%95 = load i32, i32* %3
%96 = shl i32 %95, 2
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i32, i32* %94, i64 %97
%99 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %98)
%100 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%101 = load i32, i32* %1
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %102
%104 = load i32, i32* %2
%105 = shl i32 %104, 1
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds i32, i32* %103, i64 %106
%108 = load i32, i32* %3
%109 = shl i32 %108, 2
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds i32, i32* %107, i64 %110
%112 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %111)
%113 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%114 = load i32, i32* %113
%115 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 1
%116 = load i32, i32* %115
%117 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 2
%118 = load i32, i32* %117
%119 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 3
%120 = load i32, i32* %119
%121 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 4
%122 = load i32, i32* %121
%123 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 5
%124 = load i32, i32* %123
%125 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 6
%126 = load i32, i32* %125
%127 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 7
%128 = load i32, i32* %127
%129 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i32 %114, i32 %116, i32 %118, i32 %120, i32 %122, i32 %124, i32 %126, i32 %128)
ret i32 0
}