int main() {
  int v[4][3] = {{3, 5, 9}, {2, 11, 5}, {8, 30, 10}, {22, 5, 1}}, x, y, z;
  for (z = y = 0; y < 4 || 0 * printf("%d", z); y++, printf("\n"))
    for (x = 0; x < 3; x++)
      printf("%d ", v[y][x]), z += v[y][x];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x30,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    $0x1,%al
cmpl   $0x4,-0x48(%rbp)
mov    %al,-0x4d(%rbp)
jl     117e <main+0x5e>
mov    -0x4c(%rbp),%esi
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
imul   $0x0,%eax,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x4d(%rbp)
mov    -0x4d(%rbp),%al
test   $0x1,%al
jne    118e <main+0x6e>
jmp    120e <main+0xee>
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    11ed <main+0xcd>
movslq -0x48(%rbp),%rcx
lea    -0x40(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x48(%rbp),%rcx
lea    -0x40(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x4c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1195 <main+0x75>
jmp    11f2 <main+0xd2>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1152 <main+0x32>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xedb(%rip),%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1e,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
mov    $0x16,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdf5(%rip),%rdi
mov    $0x6f,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 5)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 9)
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 2)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 11)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 5)
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 8)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 30)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 10)
%12 = tail call i32 @putchar(i32 10)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 22)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 5)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 1)
%16 = tail call i32 @putchar(i32 10)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 111)
ret i32 0
}