#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 const *argv[]) {
  int zippo[4][2] = {{2, 4}, {6, 8}, {1, 3}, {5, 7}};
  int(*pz)[2];
  pz = zippo;
  printf("pz    = %p, pz + 1 = %p\n", pz, pz + 1);
  printf("*pz   = %p,*pz + 1 = %p\n", *pz, *pz + 1);
  printf("pz[0] = %p,pz[0] + 1 = %p\n", pz[0], pz[0] + 1);
  printf("==============================\n");
  printf("    **pz = %d\n", **pz);
  printf("  *pz[0] = %d\n", *pz[0]);
  printf("pz[0][0] = %d\n", pz[0][0]);
  printf("==============================\n");
  printf("      	pz[2][1] = %d\n", pz[2][1]);
  printf("* (* (pz+2) + 1) = %d\n", *(*(pz + 2) + 1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xecd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rsi
mov    -0x38(%rbp),%rdx
add    $0x8,%rdx
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rsi
mov    -0x38(%rbp),%rdx
add    $0x4,%rdx
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rsi
mov    -0x38(%rbp),%rdx
add    $0x4,%rdx
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%esi
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%esi
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%esi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
mov    0x14(%rax),%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
mov    0x14(%rax),%esi
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x8(%rsp),%rdx
lea    0xed6(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%r14
lea    0xed6(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedb(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf3c(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    (%rsp),%esi
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp),%esi
lea    0xece(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp),%esi
lea    0xecc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    0x14(%rsp),%esi
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.zippo = [4 x [2 x i32]] [[2 x i32] [i32 2, i32 4], [2 x i32] [i32 6, i32 8], [2 x i32] [i32 1, i32 3], [2 x i32] [i32 5, i32 7]]
@.str = [25 x i8] c"pz = %p, pz + 1 = %p\0A\00"
@.str.1 = [25 x i8] c"*pz = %p,*pz + 1 = %p\0A\00"
@.str.2 = [27 x i8] c"pz[0] = %p,pz[0] + 1 = %p\0A\00"
@.str.3 = [32 x i8] c"==============================\0A\00"
@.str.4 = [15 x i8] c" **pz = %d\0A\00"
@.str.5 = [15 x i8] c" *pz[0] = %d\0A\00"
@.str.6 = [15 x i8] c"pz[0][0] = %d\0A\00"
@.str.7 = [22 x i8] c" \09pz[2][1] = %d\0A\00"
@.str.8 = [23 x i8] c"* (* (pz+2) + 1) = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x [2 x i32]]
%7 = alloca [2 x i32]*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [4 x [2 x i32]]* %6 to i8*
%9 = getelementptr inbounds [4 x [2 x i32]], [4 x [2 x i32]]* %6, i64 0, i64 0
store [2 x i32]* %9, [2 x i32]** %7
%10 = load [2 x i32]*, [2 x i32]** %7
%11 = load [2 x i32]*, [2 x i32]** %7
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %11, i64 1
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), [2 x i32]* %10, [2 x i32]* %12)
%14 = load [2 x i32]*, [2 x i32]** %7
%15 = getelementptr inbounds [2 x i32], [2 x i32]* %14, i64 0, i64 0
%16 = load [2 x i32]*, [2 x i32]** %7
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 0
%18 = getelementptr inbounds i32, i32* %17, i64 1
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32* %15, i32* %18)
%20 = load [2 x i32]*, [2 x i32]** %7
%21 = getelementptr inbounds [2 x i32], [2 x i32]* %20, i64 0
%22 = getelementptr inbounds [2 x i32], [2 x i32]* %21, i64 0, i64 0
%23 = load [2 x i32]*, [2 x i32]** %7
%24 = getelementptr inbounds [2 x i32], [2 x i32]* %23, i64 0
%25 = getelementptr inbounds [2 x i32], [2 x i32]* %24, i64 0, i64 0
%26 = getelementptr inbounds i32, i32* %25, i64 1
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32* %22, i32* %26)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%29 = load [2 x i32]*, [2 x i32]** %7
%30 = getelementptr inbounds [2 x i32], [2 x i32]* %29, i64 0, i64 0
%31 = load i32, i32* %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %31)
%33 = load [2 x i32]*, [2 x i32]** %7
%34 = getelementptr inbounds [2 x i32], [2 x i32]* %33, i64 0
%35 = getelementptr inbounds [2 x i32], [2 x i32]* %34, i64 0, i64 0
%36 = load i32, i32* %35
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 %36)
%38 = load [2 x i32]*, [2 x i32]** %7
%39 = getelementptr inbounds [2 x i32], [2 x i32]* %38, i64 0
%40 = getelementptr inbounds [2 x i32], [2 x i32]* %39, i64 0, i64 0
%41 = load i32, i32* %40
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %41)
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%44 = load [2 x i32]*, [2 x i32]** %7
%45 = getelementptr inbounds [2 x i32], [2 x i32]* %44, i64 2
%46 = getelementptr inbounds [2 x i32], [2 x i32]* %45, i64 0, i64 1
%47 = load i32, i32* %46
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %47)
%49 = load [2 x i32]*, [2 x i32]** %7
%50 = getelementptr inbounds [2 x i32], [2 x i32]* %49, i64 2
%51 = getelementptr inbounds [2 x i32], [2 x i32]* %50, i64 0, i64 0
%52 = getelementptr inbounds i32, i32* %51, i64 1
%53 = load i32, i32* %52
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %53)
ret i32 0
}

LLVM IR (-O2):
@__const.main.zippo = [4 x [2 x i32]] [[2 x i32] [i32 2, i32 4], [2 x i32] [i32 6, i32 8], [2 x i32] [i32 1, i32 3], [2 x i32] [i32 5, i32 7]]
@.str = [25 x i8] c"pz = %p, pz + 1 = %p\0A\00"
@.str.1 = [25 x i8] c"*pz = %p,*pz + 1 = %p\0A\00"
@.str.2 = [27 x i8] c"pz[0] = %p,pz[0] + 1 = %p\0A\00"
@.str.4 = [15 x i8] c" **pz = %d\0A\00"
@.str.5 = [15 x i8] c" *pz[0] = %d\0A\00"
@.str.6 = [15 x i8] c"pz[0][0] = %d\0A\00"
@.str.7 = [22 x i8] c" \09pz[2][1] = %d\0A\00"
@.str.8 = [23 x i8] c"* (* (pz+2) + 1) = %d\0A\00"
@str.9 = [31 x i8] c"==============================\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x [2 x i32]]
%4 = bitcast [4 x [2 x i32]]* %3 to i8*
%5 = getelementptr inbounds [4 x [2 x i32]], [4 x [2 x i32]]* %3, i64 0, i64 0
%6 = getelementptr inbounds [4 x [2 x i32]], [4 x [2 x i32]]* %3, i64 0, i64 1
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), [2 x i32]* %5, [2 x i32]* %6)
%8 = getelementptr inbounds [4 x [2 x i32]], [4 x [2 x i32]]* %3, i64 0, i64 0, i64 0
%9 = getelementptr inbounds [4 x [2 x i32]], [4 x [2 x i32]]* %3, i64 0, i64 0, i64 1
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32* %8, i32* %9)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32* %8, i32* %9)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.9, i64 0, i64 0))
%13 = load i32, i32* %8
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %8
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %8
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %17)
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.9, i64 0, i64 0))
%20 = getelementptr inbounds [4 x [2 x i32]], [4 x [2 x i32]]* %3, i64 0, i64 2, i64 1
%21 = load i32, i32* %20
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %21)
%23 = load i32, i32* %20
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %23)
ret i32 0
}