#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, int, int, int, int);
void main() {
  int TestArray[5][5] = {{11, 12, 13, 14, 15},
                         {16, 17, 18, 19, 20},
                         {21, 22, 23, 24, 25},
                         {26, 27, 28, 29, 30},
                         {31, 32, 33, 34, 35}};
  int *p1 = (int *)(&TestArray + 1);
  int *p2 = (int *)(*(TestArray + 1) + 6);
  printf("Result: %d; %d; %d; %d; %d\n", *(*TestArray), *(*(TestArray + 1)),
         *(*(TestArray + 3) + 3), p1[-8], p2[4]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    -0x70(%rbp),%rdi
lea    0xeca(%rip),%rsi
mov    $0x64,%edx
call   1040 <memcpy@plt>
lea    -0x70(%rbp),%rax
add    $0x64,%rax
mov    %rax,-0x78(%rbp)
lea    -0x70(%rbp),%rax
add    $0x14,%rax
add    $0x18,%rax
mov    %rax,-0x80(%rbp)
mov    -0x70(%rbp),%esi
mov    -0x5c(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x78(%rbp),%rax
mov    -0x20(%rax),%r8d
mov    -0x80(%rbp),%rax
mov    0x10(%rax),%r9d
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0xb,%esi
mov    $0x10,%edx
mov    $0x1d,%ecx
mov    $0x1c,%r8d
mov    $0x1a,%r9d
jmp    1030 <printf@plt>

LLVM IR (-O0):
@__const.main.TestArray = [5 x [5 x i32]] [[5 x i32] [i32 11, i32 12, i32 13, i32 14, i32 15], [5 x i32] [i32 16, i32 17, i32 18, i32 19, i32 20], [5 x i32] [i32 21, i32 22, i32 23, i32 24, i32 25], [5 x i32] [i32 26, i32 27, i32 28, i32 29, i32 30], [5 x i32] [i32 31, i32 32, i32 33, i32 34, i32 35]]
@.str = [28 x i8] c"Result: %d; %d; %d; %d; %d\0A\00"
define void @main() {
%1 = alloca [5 x [5 x i32]]
%2 = alloca i32*
%3 = alloca i32*
%4 = bitcast [5 x [5 x i32]]* %1 to i8*
%5 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 1
%6 = bitcast [5 x [5 x i32]]* %5 to i32*
store i32* %6, i32** %2
%7 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 0
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %7, i64 1
%9 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 0
%10 = getelementptr inbounds i32, i32* %9, i64 6
store i32* %10, i32** %3
%11 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 0
%12 = getelementptr inbounds [5 x i32], [5 x i32]* %11, i64 0, i64 0
%13 = load i32, i32* %12
%14 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 0
%15 = getelementptr inbounds [5 x i32], [5 x i32]* %14, i64 1
%16 = getelementptr inbounds [5 x i32], [5 x i32]* %15, i64 0, i64 0
%17 = load i32, i32* %16
%18 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %1, i64 0, i64 0
%19 = getelementptr inbounds [5 x i32], [5 x i32]* %18, i64 3
%20 = getelementptr inbounds [5 x i32], [5 x i32]* %19, i64 0, i64 0
%21 = getelementptr inbounds i32, i32* %20, i64 3
%22 = load i32, i32* %21
%23 = load i32*, i32** %2
%24 = getelementptr inbounds i32, i32* %23, i64 -8
%25 = load i32, i32* %24
%26 = load i32*, i32** %3
%27 = getelementptr inbounds i32, i32* %26, i64 4
%28 = load i32, i32* %27
%29 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %17, i32 %22, i32 %25, i32 %28)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Result: %d; %d; %d; %d; %d\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 11, i32 16, i32 29, i32 28, i32 26)
ret void
}