#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*/ scanf(char *, int *);
int main() {
  int r, c;
  int arr[3][3];
  for (r = 0; r < 3; r++) {
    for (c = 0; c < 3; c++) {
      scanf("%d", &arr[r][c]);
    }
  }
  printf("Even numbers\n");
  for (r = 0; r < 3; r++) {
    for (c = 0; c < 3; c++) {
      if (arr[r][c] % 2 == 0) {
        printf("%d\t", arr[r][c]);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1198 <main+0x78>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1185 <main+0x65>
movslq -0x8(%rbp),%rax
lea    -0x30(%rbp),%rsi
imul   $0xc,%rax,%rax
add    %rax,%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe8e(%rip),%rdi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <main+0x27>
jmp    118a <main+0x6a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
lea    0xe64(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1239 <main+0x119>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1226 <main+0x106>
movslq -0x8(%rbp),%rcx
lea    -0x30(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1213 <main+0xf3>
movslq -0x8(%rbp),%rcx
lea    -0x30(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1218 <main+0xf8>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11be <main+0x9e>
jmp    122b <main+0x10b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11ad <main+0x8d>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xec4(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xe51(%rip),%rdi
call   1030 <puts@plt>
mov    (%rsp),%esi
test   $0x1,%sil
jne    11d2 <main+0xa2>
lea    0xe38(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%esi
test   $0x1,%sil
jne    11ea <main+0xba>
lea    0xe20(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
test   $0x1,%sil
jne    1202 <main+0xd2>
lea    0xe08(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
test   $0x1,%sil
jne    121a <main+0xea>
lea    0xdf0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
test   $0x1,%sil
jne    1232 <main+0x102>
lea    0xdd8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
test   $0x1,%sil
jne    124a <main+0x11a>
lea    0xdc0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%esi
test   $0x1,%sil
jne    1262 <main+0x132>
lea    0xda8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%rsp),%esi
test   $0x1,%sil
jne    127a <main+0x14a>
lea    0xd90(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%esi
test   $0x1,%sil
jne    1292 <main+0x162>
lea    0xd78(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [14 x i8] c"Even numbers\0A\00"
@.str.2 = [4 x i8] c"%d\09\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [3 x [3 x i32]]
store i32 0, i32* %1
store i32 0, i32* %2
br label %5
5: ; preds = %24, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %27
8: ; preds = %5
store i32 0, i32* %3
br label %9
9: ; preds = %20, %8
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 3
br i1 %11, label %12, label %23
12: ; preds = %9
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %4, i64 0, i64 %14
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %15, i64 0, i64 %17
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %18)
br label %20
20: ; preds = %12
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %9
23: ; preds = %9
br label %24
24: ; preds = %23
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
br label %5
27: ; preds = %5
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %29
29: ; preds = %60, %27
%30 = load i32, i32* %2
%31 = icmp slt i32 %30, 3
br i1 %31, label %32, label %63
32: ; preds = %29
store i32 0, i32* %3
br label %33
33: ; preds = %56, %32
%34 = load i32, i32* %3
%35 = icmp slt i32 %34, 3
br i1 %35, label %36, label %59
36: ; preds = %33
%37 = load i32, i32* %2
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %4, i64 0, i64 %38
%40 = load i32, i32* %3
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [3 x i32], [3 x i32]* %39, i64 0, i64 %41
%43 = load i32, i32* %42
%44 = srem i32 %43, 2
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %55
46: ; preds = %36
%47 = load i32, i32* %2
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %4, i64 0, i64 %48
%50 = load i32, i32* %3
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [3 x i32], [3 x i32]* %49, i64 0, i64 %51
%53 = load i32, i32* %52
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %53)
br label %55
55: ; preds = %46, %36
br label %56
56: ; preds = %55
%57 = load i32, i32* %3
%58 = add nsw i32 %57, 1
store i32 %58, i32* %3
br label %33
59: ; preds = %33
br label %60
60: ; preds = %59
%61 = load i32, i32* %2
%62 = add nsw i32 %61, 1
store i32 %62, i32* %2
br label %29
63: ; preds = %29
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d\09\00"
@str = [13 x i8] c"Even numbers\00"
define i32 @main() {
%1 = alloca [3 x [3 x i32]]
%2 = bitcast [3 x [3 x i32]]* %1 to i8*
%3 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 0, i64 1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%7 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 0, i64 2
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%9 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 1, i64 0
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %9)
%11 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 1, i64 1
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %11)
%13 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 1, i64 2
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %13)
%15 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 2, i64 0
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %15)
%17 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 2, i64 1
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %17)
%19 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %1, i64 0, i64 2, i64 2
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %19)
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%22 = load i32, i32* %3
%23 = and i32 %22, 1
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %0
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %22)
br label %27
27: ; preds = %0, %25
%28 = load i32, i32* %5
%29 = and i32 %28, 1
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %27
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %28)
br label %33
33: ; preds = %31, %27
%34 = load i32, i32* %7
%35 = and i32 %34, 1
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %34)
br label %39
39: ; preds = %37, %33
%40 = load i32, i32* %9
%41 = and i32 %40, 1
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %39
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %40)
br label %45
45: ; preds = %43, %39
%46 = load i32, i32* %11
%47 = and i32 %46, 1
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %45
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %46)
br label %51
51: ; preds = %49, %45
%52 = load i32, i32* %13
%53 = and i32 %52, 1
%54 = icmp eq i32 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %51
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %52)
br label %57
57: ; preds = %55, %51
%58 = load i32, i32* %15
%59 = and i32 %58, 1
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %63
61: ; preds = %57
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %58)
br label %63
63: ; preds = %61, %57
%64 = load i32, i32* %17
%65 = and i32 %64, 1
%66 = icmp eq i32 %65, 0
br i1 %66, label %67, label %69
67: ; preds = %63
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %64)
br label %69
69: ; preds = %67, %63
%70 = load i32, i32* %19
%71 = and i32 %70, 1
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %75
73: ; preds = %69
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %70)
br label %75
75: ; preds = %73, %69
ret i32 0
}