#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*/ assert(int);
void example9() {
  int a[42][42];
  int(*ptr2)[42];
  int *y;
  int i, j, x;
  for (i = 0; i < 42; i++) {
    for (j = 0; j < 42; j++) {
      a[i][j] = 0;
    }
  }
  a[14][0] = 3;
  ptr2 = a + 7;
  y = (ptr2 + 1)[6];
  assert(*y == 3);
}


x86 assembly (clang, -O0):
<example9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1bb0,%rsp
movl   $0x0,-0x1ba4(%rbp)
cmpl   $0x2a,-0x1ba4(%rbp)
jge    119c <example9+0x8c>
movl   $0x0,-0x1ba8(%rbp)
cmpl   $0x2a,-0x1ba8(%rbp)
jge    1183 <example9+0x73>
movslq -0x1ba4(%rbp),%rcx
lea    -0x1b90(%rbp),%rax
imul   $0xa8,%rcx,%rcx
add    %rcx,%rax
movslq -0x1ba8(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x1ba8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ba8(%rbp)
jmp    113c <example9+0x2c>
jmp    1188 <example9+0x78>
mov    -0x1ba4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ba4(%rbp)
jmp    1125 <example9+0x15>
movl   $0x3,-0x1260(%rbp)
lea    -0x1b90(%rbp),%rax
add    $0x498,%rax
mov    %rax,-0x1b98(%rbp)
mov    -0x1b98(%rbp),%rax
add    $0xa8,%rax
add    $0x3f0,%rax
mov    %rax,-0x1ba0(%rbp)
mov    -0x1ba0(%rbp),%rax
cmpl   $0x3,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x1bb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<example9>:
mov    $0x1,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @example9() {
%1 = alloca [42 x [42 x i32]]
%2 = alloca [42 x i32]*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %4
br label %7
7: ; preds = %25, %0
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 42
br i1 %9, label %10, label %28
10: ; preds = %7
store i32 0, i32* %5
br label %11
11: ; preds = %21, %10
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, 42
br i1 %13, label %14, label %24
14: ; preds = %11
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [42 x [42 x i32]], [42 x [42 x i32]]* %1, i64 0, i64 %16
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [42 x i32], [42 x i32]* %17, i64 0, i64 %19
store i32 0, i32* %20
br label %21
21: ; preds = %14
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %11
24: ; preds = %11
br label %25
25: ; preds = %24
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %7
28: ; preds = %7
%29 = getelementptr inbounds [42 x [42 x i32]], [42 x [42 x i32]]* %1, i64 0, i64 14
%30 = getelementptr inbounds [42 x i32], [42 x i32]* %29, i64 0, i64 0
store i32 3, i32* %30
%31 = getelementptr inbounds [42 x [42 x i32]], [42 x [42 x i32]]* %1, i64 0, i64 0
%32 = getelementptr inbounds [42 x i32], [42 x i32]* %31, i64 7
store [42 x i32]* %32, [42 x i32]** %2
%33 = load [42 x i32]*, [42 x i32]** %2
%34 = getelementptr inbounds [42 x i32], [42 x i32]* %33, i64 1
%35 = getelementptr inbounds [42 x i32], [42 x i32]* %34, i64 6
%36 = getelementptr inbounds [42 x i32], [42 x i32]* %35, i64 0, i64 0
store i32* %36, i32** %3
%37 = load i32*, i32** %3
%38 = load i32, i32* %37
%39 = icmp eq i32 %38, 3
%40 = zext i1 %39 to i32
%41 = call i32 @assert(i32 %40)
ret void
}

LLVM IR (-O2):
define void @example9() {
%1 = tail call i32 @assert(i32 1)
ret void
}