int main() {
  int a = 1;
  int *p1 = &a;
  *p1 = 2;
  if (a != 2)
    return 1;
  int b = 0;
  *(&b) = 3;
  if (b != 3)
    return 2;
  int c;
  int *p2;
  int *p3;
  p2 = &c + 2;
  *p2 = 4;
  p3 = &c + 2;
  if (*p2 != *p3)
    return 3;
  char d = 4;
  long e = 3;
  *(&d) = e;
  if (d != 3)
    return 4;
  d = 4;
  *(&e) = d;
  if (e != 4)
    return 5;
  int *p4;
  int f;
  &p2;
  p2 = &f;
  *p2 = 10;
  if (f != 10)
    return 6;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
cmpl   $0x2,-0x8(%rbp)
je     113a <main+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    121d <main+0x11d>
movl   $0x0,-0x14(%rbp)
movl   $0x3,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
je     115e <main+0x5e>
movl   $0x2,-0x4(%rbp)
jmp    121d <main+0x11d>
lea    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x4,(%rax)
lea    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
je     119e <main+0x9e>
movl   $0x3,-0x4(%rbp)
jmp    121d <main+0x11d>
movb   $0x4,-0x29(%rbp)
movq   $0x3,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %al,-0x29(%rbp)
movsbl -0x29(%rbp),%eax
cmp    $0x3,%eax
je     11ca <main+0xca>
movl   $0x4,-0x4(%rbp)
jmp    121d <main+0x11d>
movb   $0x4,-0x29(%rbp)
movsbq -0x29(%rbp),%rax
mov    %rax,-0x38(%rbp)
cmpq   $0x4,-0x38(%rbp)
je     11ee <main+0xee>
movl   $0x5,-0x4(%rbp)
jmp    121d <main+0x11d>
lea    -0x44(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movl   $0xa,(%rax)
cmpl   $0xa,-0x44(%rbp)
je     1216 <main+0x116>
movl   $0x6,-0x4(%rbp)
jmp    121d <main+0x11d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i8
%9 = alloca i64
%10 = alloca i32*
%11 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32* %2, i32** %3
%12 = load i32*, i32** %3
store i32 2, i32* %12
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 2
br i1 %14, label %15, label %16
15: ; preds = %0
store i32 1, i32* %1
br label %49
16: ; preds = %0
store i32 0, i32* %4
store i32 3, i32* %4
%17 = load i32, i32* %4
%18 = icmp ne i32 %17, 3
br i1 %18, label %19, label %20
19: ; preds = %16
store i32 2, i32* %1
br label %49
20: ; preds = %16
%21 = getelementptr inbounds i32, i32* %5, i64 2
store i32* %21, i32** %6
%22 = load i32*, i32** %6
store i32 4, i32* %22
%23 = getelementptr inbounds i32, i32* %5, i64 2
store i32* %23, i32** %7
%24 = load i32*, i32** %6
%25 = load i32, i32* %24
%26 = load i32*, i32** %7
%27 = load i32, i32* %26
%28 = icmp ne i32 %25, %27
br i1 %28, label %29, label %30
29: ; preds = %20
store i32 3, i32* %1
br label %49
30: ; preds = %20
store i8 4, i8* %8
store i64 3, i64* %9
%31 = load i64, i64* %9
%32 = trunc i64 %31 to i8
store i8 %32, i8* %8
%33 = load i8, i8* %8
%34 = sext i8 %33 to i32
%35 = icmp ne i32 %34, 3
br i1 %35, label %36, label %37
36: ; preds = %30
store i32 4, i32* %1
br label %49
37: ; preds = %30
store i8 4, i8* %8
%38 = load i8, i8* %8
%39 = sext i8 %38 to i64
store i64 %39, i64* %9
%40 = load i64, i64* %9
%41 = icmp ne i64 %40, 4
br i1 %41, label %42, label %43
42: ; preds = %37
store i32 5, i32* %1
br label %49
43: ; preds = %37
store i32* %11, i32** %6
%44 = load i32*, i32** %6
store i32 10, i32* %44
%45 = load i32, i32* %11
%46 = icmp ne i32 %45, 10
br i1 %46, label %47, label %48
47: ; preds = %43
store i32 6, i32* %1
br label %49
48: ; preds = %43
store i32 0, i32* %1
br label %49
49: ; preds = %48, %47, %42, %36, %29, %19, %15
%50 = load i32, i32* %1
ret i32 %50
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}