void test() {
  int a[3][2] = {{0, 1}, {2, 3}, {4, 5}};
  assertTrue("a[0][0] == 0", a[0][0] == 0);
  ;
  assertTrue("a[0][1] == 1", a[0][1] == 1);
  ;
  assertTrue("a[1][0] == 2", a[1][0] == 2);
  ;
  assertTrue("a[2][1] == 5", a[2][1] == 5);
  ;
  int *p = a;
  assertTrue("p[0] == 0", p[0] == 0);
  ;
  assertTrue("p[1] == 1", p[1] == 1);
  ;
  assertTrue("p[2] == 2", p[2] == 2);
  ;
  assertTrue("p[3] == 3", p[3] == 3);
  ;
  assertTrue("p[4] == 4", p[4] == 4);
  ;
  assertTrue("p[5] == 5", p[5] == 5);
  ;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x20(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <assertTrue@plt>
cmpl   $0x1,-0x1c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <assertTrue@plt>
cmpl   $0x2,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <assertTrue@plt>
cmpl   $0x5,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <assertTrue@plt>
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmpl   $0x0,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <assertTrue@plt>
mov    -0x28(%rbp),%rax
cmpl   $0x1,0x4(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1030 <assertTrue@plt>
mov    -0x28(%rbp),%rax
cmpl   $0x2,0x8(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1030 <assertTrue@plt>
mov    -0x28(%rbp),%rax
cmpl   $0x3,0xc(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <assertTrue@plt>
mov    -0x28(%rbp),%rax
cmpl   $0x4,0x10(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe3d(%rip),%rdi
mov    $0x0,%al
call   1030 <assertTrue@plt>
mov    -0x28(%rbp),%rax
cmpl   $0x5,0x14(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1030 <assertTrue@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <assertTrue@plt>
lea    0xee2(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <assertTrue@plt>
lea    0xedc(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <assertTrue@plt>
lea    0xed6(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <assertTrue@plt>
lea    0xed0(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <assertTrue@plt>
lea    0xec7(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <assertTrue@plt>
lea    0xebe(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <assertTrue@plt>
lea    0xeb5(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <assertTrue@plt>
lea    0xeac(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <assertTrue@plt>
lea    0xea3(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
pop    %rcx
jmp    1030 <assertTrue@plt>

LLVM IR (-O0):
@__const.test.a = [3 x [2 x i32]] [[2 x i32] [i32 0, i32 1], [2 x i32] [i32 2, i32 3], [2 x i32] [i32 4, i32 5]]
@.str = [13 x i8] c"a[0][0] == 0\00"
@.str.1 = [13 x i8] c"a[0][1] == 1\00"
@.str.2 = [13 x i8] c"a[1][0] == 2\00"
@.str.3 = [13 x i8] c"a[2][1] == 5\00"
@.str.4 = [10 x i8] c"p[0] == 0\00"
@.str.5 = [10 x i8] c"p[1] == 1\00"
@.str.6 = [10 x i8] c"p[2] == 2\00"
@.str.7 = [10 x i8] c"p[3] == 3\00"
@.str.8 = [10 x i8] c"p[4] == 4\00"
@.str.9 = [10 x i8] c"p[5] == 5\00"
define void @test() {
%1 = alloca [3 x [2 x i32]]
%2 = alloca i32*
%3 = bitcast [3 x [2 x i32]]* %1 to i8*
%4 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* %1, i64 0, i64 0
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* %1, i64 0, i64 0
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, 1
%14 = zext i1 %13 to i32
%15 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* %1, i64 0, i64 1
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 0
%18 = load i32, i32* %17
%19 = icmp eq i32 %18, 2
%20 = zext i1 %19 to i32
%21 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %20)
%22 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* %1, i64 0, i64 2
%23 = getelementptr inbounds [2 x i32], [2 x i32]* %22, i64 0, i64 1
%24 = load i32, i32* %23
%25 = icmp eq i32 %24, 5
%26 = zext i1 %25 to i32
%27 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %26)
%28 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* %1, i64 0, i64 0
%29 = bitcast [2 x i32]* %28 to i32*
store i32* %29, i32** %2
%30 = load i32*, i32** %2
%31 = getelementptr inbounds i32, i32* %30, i64 0
%32 = load i32, i32* %31
%33 = icmp eq i32 %32, 0
%34 = zext i1 %33 to i32
%35 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %34)
%36 = load i32*, i32** %2
%37 = getelementptr inbounds i32, i32* %36, i64 1
%38 = load i32, i32* %37
%39 = icmp eq i32 %38, 1
%40 = zext i1 %39 to i32
%41 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %40)
%42 = load i32*, i32** %2
%43 = getelementptr inbounds i32, i32* %42, i64 2
%44 = load i32, i32* %43
%45 = icmp eq i32 %44, 2
%46 = zext i1 %45 to i32
%47 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 %46)
%48 = load i32*, i32** %2
%49 = getelementptr inbounds i32, i32* %48, i64 3
%50 = load i32, i32* %49
%51 = icmp eq i32 %50, 3
%52 = zext i1 %51 to i32
%53 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 %52)
%54 = load i32*, i32** %2
%55 = getelementptr inbounds i32, i32* %54, i64 4
%56 = load i32, i32* %55
%57 = icmp eq i32 %56, 4
%58 = zext i1 %57 to i32
%59 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 %58)
%60 = load i32*, i32** %2
%61 = getelementptr inbounds i32, i32* %60, i64 5
%62 = load i32, i32* %61
%63 = icmp eq i32 %62, 5
%64 = zext i1 %63 to i32
%65 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 %64)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"a[0][0] == 0\00"
@.str.1 = [13 x i8] c"a[0][1] == 1\00"
@.str.2 = [13 x i8] c"a[1][0] == 2\00"
@.str.3 = [13 x i8] c"a[2][1] == 5\00"
@.str.4 = [10 x i8] c"p[0] == 0\00"
@.str.5 = [10 x i8] c"p[1] == 1\00"
@.str.6 = [10 x i8] c"p[2] == 2\00"
@.str.7 = [10 x i8] c"p[3] == 3\00"
@.str.8 = [10 x i8] c"p[4] == 4\00"
@.str.9 = [10 x i8] c"p[5] == 5\00"
define void @test() {
%1 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 1)
%4 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 1)
%5 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 1)
%6 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 1)
%7 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i32 1)
%8 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 1)
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 1)
%10 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @assertTrue to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i32 1)
ret void
}