#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 **args) {
  printf("Hello World!! \n");
  int A[] = {12, 23, 34, 45, 56, 67, 78, 89, 90};
  int *P;
  P = A;
  printf("P:  %p\n", P);
  printf("A:  %p\n", A);
  printf("&A:  %p\n", &A);
  printf("&P:  %p\n", &P);
  printf("*P+2:  %d\n", *P + 2);
  printf("*(P+2):  %d\n", *(P + 2));
  printf("*&P+1:  %p\n", &P + 1);
  printf("P+1:  %p\n", P + 1);
  printf("&A[4]-3:  %p\n", &A[4] - 3);
  printf("A+3:  %p\n", A + 3);
  printf("P+(*P-10):  %p\n", P + (*P - 10));
  printf("*(P+*(P+8)-A[7]):  %d\n", *(P + *(P + 8) - A[7]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rdi
lea    0xf41(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rsi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe84(%rip),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7b(%rip),%rdi
lea    -0x48(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%rax
mov    (%rax),%esi
add    $0x2,%esi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%rax
mov    0x8(%rax),%esi
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x48(%rbp),%rsi
add    $0x8,%rsi
lea    0xe56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%rsi
add    $0x4,%rsi
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
add    $0x10,%rsi
add    $0xfffffffffffffff4,%rsi
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
add    $0xc,%rsi
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%rsi
mov    -0x48(%rbp),%rax
mov    (%rax),%eax
sub    $0xa,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%rax
mov    -0x48(%rbp),%rcx
movslq 0x20(%rcx),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
lea    0xf6d(%rip),%rdi
call   1030 <puts@plt>
mov    0xee9(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xece(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb2(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rbx
mov    %rbx,0x8(%rsp)
lea    0xeca(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe9e(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe96(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%rax
mov    (%rax),%esi
add    $0x2,%esi
lea    0xe82(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%rax
mov    0x8(%rax),%esi
lea    0xe77(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rsp),%rsi
lea    0xe71(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%rsi
add    $0x4,%rsi
lea    0xe5c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x14(%rsp),%rsi
lea    0xe53(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1c(%rsp),%rsi
lea    0xe4e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%rax
movslq (%rax),%rcx
lea    (%rax,%rcx,4),%rsi
add    $0xffffffffffffffd8,%rsi
lea    0xe3a(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%rax
movslq 0x20(%rax),%rcx
lea    (%rax,%rcx,4),%rax
movslq 0x2c(%rsp),%rcx
shl    $0x2,%rcx
sub    %rcx,%rax
mov    (%rax),%esi
lea    0xe21(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.A = [9 x i32] [i32 12, i32 23, i32 34, i32 45, i32 56, i32 67, i32 78, i32 89, i32 90]
@.str.1 = [8 x i8] c"P: %p\0A\00"
@.str.2 = [8 x i8] c"A: %p\0A\00"
@.str.3 = [9 x i8] c"&A: %p\0A\00"
@.str.4 = [9 x i8] c"&P: %p\0A\00"
@.str.5 = [11 x i8] c"*P+2: %d\0A\00"
@.str.6 = [13 x i8] c"*(P+2): %d\0A\00"
@.str.7 = [12 x i8] c"*&P+1: %p\0A\00"
@.str.8 = [10 x i8] c"P+1: %p\0A\00"
@.str.9 = [14 x i8] c"&A[4]-3: %p\0A\00"
@.str.10 = [10 x i8] c"A+3: %p\0A\00"
@.str.11 = [16 x i8] c"P+(*P-10): %p\0A\00"
@.str.12 = [23 x i8] c"*(P+*(P+8)-A[7]): %d\0A\00"
@str = [15 x i8] c"Hello World!! \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [9 x i32]
%4 = alloca i32*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%6 = bitcast [9 x i32]* %3 to i8*
%7 = bitcast i32** %4 to i8*
%8 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 0
store i32* %8, i32** %4
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32* %8)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), [9 x i32]* %3)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32** %4)
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = add nsw i32 %14, 2
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 %15)
%17 = load i32*, i32** %4
%18 = getelementptr inbounds i32, i32* %17, i64 2
%19 = load i32, i32* %18
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i32 %19)
%21 = getelementptr inbounds i32*, i32** %4, i64 1
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32** %21)
%23 = load i32*, i32** %4
%24 = getelementptr inbounds i32, i32* %23, i64 1
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32* %24)
%26 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 1
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i32* %26)
%28 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 3
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32* %28)
%30 = load i32*, i32** %4
%31 = load i32, i32* %30
%32 = add nsw i32 %31, -10
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i32, i32* %30, i64 %33
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i32* %34)
%36 = load i32*, i32** %4
%37 = getelementptr inbounds i32, i32* %36, i64 8
%38 = load i32, i32* %37
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i32, i32* %36, i64 %39
%41 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 7
%42 = load i32, i32* %41
%43 = sext i32 %42 to i64
%44 = sub nsw i64 0, %43
%45 = getelementptr inbounds i32, i32* %40, i64 %44
%46 = load i32, i32* %45
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i32 %46)
ret i32 0
}