#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*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int a[10];
  int(*pa)[10];
  int m[4][7];
  if ((int)((&a) + 1) != (int)(a + 10)) {
    printf("Error %d\n", (int)1);
    exit(1);
  };
  pa = &a;
  if (&(pa[0][5]) != &a[5]) {
    printf("Error %d\n", (int)2);
    exit(2);
  };
  if ((char *)(&m + 1) != ((char *)m) + 4 * 7 * sizeof(int)) {
    printf("Error %d\n", (int)3);
    exit(3);
  };
  if ((char *)(&(m[2])) != (char *)(m + 2)) {
    printf("Error %d\n", (int)4);
    exit(4);
  };
  {
    printf("Success\n");
    exit(0);
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rax
add    $0x28,%rax
lea    -0x30(%rbp),%rcx
add    $0x28,%rcx
cmp    %ecx,%eax
je     1167 <main+0x47>
lea    0xeaf(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
add    $0x14,%rax
lea    -0x30(%rbp),%rcx
add    $0x14,%rcx
cmp    %rcx,%rax
je     11a5 <main+0x85>
lea    0xe71(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    $0x1,%al
test   %al,%al
je     114d <main+0x1d>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>
lea    0xeac(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Error %d\0A\00"
@.str.1 = [9 x i8] c"Success\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca [10 x i32]*
%4 = alloca [4 x [7 x i32]]
store i32 0, i32* %1
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 1
%6 = ptrtoint [10 x i32]* %5 to i32
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%8 = getelementptr inbounds i32, i32* %7, i64 10
%9 = ptrtoint i32* %8 to i32
%10 = icmp ne i32 %6, %9
br i1 %10, label %11, label %14
11: ; preds = %0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %0
store [10 x i32]* %2, [10 x i32]** %3
%15 = load [10 x i32]*, [10 x i32]** %3
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %15, i64 0
%17 = getelementptr inbounds [10 x i32], [10 x i32]* %16, i64 0, i64 5
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 5
%19 = icmp ne i32* %17, %18
br i1 %19, label %20, label %23
20: ; preds = %14
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 2)
%22 = call i32 @exit(i32 2)
unreachable
23: ; preds = %14
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%25 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [10 x i8] c"Error %d\0A\00"
@str = [8 x i8] c"Success\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 1
%4 = ptrtoint [10 x i32]* %3 to i64
%5 = trunc i64 %4 to i32
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 10
%7 = ptrtoint i32* %6 to i64
%8 = trunc i64 %7 to i32
%9 = icmp eq i32 %5, %8
br i1 %9, label %13, label %10
10: ; preds = %0
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %0
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%15 = call i32 @exit(i32 0)
unreachable
}