#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 argc, char **argv) {
  size_t i, j;
  int values[][4] = {
      {41, 31, 21, 11},
      {-100, -200, -300, -400},
      {3, -9, 27, -81},
  };
  printf("values[0][0] == %d\n", values[0][0]);
  printf("values[2][1] == %d\n", values[2][1]);
  printf("\n");
  for (i = 0; i < 3; i++) {
    printf("[ ");
    for (j = 0; j < 4; j++)
      printf("%5d ", values[i][j]);
    printf("]\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xebf(%rip),%rsi
mov    $0x30,%edx
call   1040 <memcpy@plt>
mov    -0x50(%rbp),%esi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x18(%rbp)
cmpq   $0x3,-0x18(%rbp)
jae    1203 <main+0xe3>
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x20(%rbp)
cmpq   $0x4,-0x20(%rbp)
jae    11e4 <main+0xc4>
mov    -0x18(%rbp),%rcx
lea    -0x50(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    11a4 <main+0x84>
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1183 <main+0x63>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xec4(%rip),%rdi
mov    $0x29,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0xfffffff7,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebc(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeae(%rip),%rbx
mov    %rbx,%rdi
mov    $0x29,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x1f,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x15,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe70(%rip),%r15
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffff9c,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffff38,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffed4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffe70,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffff7,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x1b,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffffaf,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [20 x i8] c"values[0][0] == %d\0A\00"
@.str.1 = [20 x i8] c"values[2][1] == %d\0A\00"
@.str.3 = [3 x i8] c"[ \00"
@.str.4 = [5 x i8] c"%5d \00"
@str = [2 x i8] c"]\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 41)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 -9)
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 41)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 31)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 21)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 11)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 -100)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 -200)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 -300)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 -400)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 3)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 -9)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 27)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 -81)
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}