#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);
int main() {
  int *i_p;
  char c_array[10];
  i_p = (int *)c_array;
  *i_p = 0x01020304;
  assert(c_array[0] == 1 && c_array[1] == 2 && c_array[2] == 3 &&
         c_array[3] == 4);
  char *c_p;
  int i = 0x01020304;
  c_p = (char *)&i;
  assert(c_p[0] == 1 && c_p[1] == 2 && c_p[2] == 3 && c_p[3] == 4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1a(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1020304,(%rax)
movsbl -0x1a(%rbp),%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
mov    %al,-0x2d(%rbp)
jne    1174 <main+0x64>
movsbl -0x19(%rbp),%ecx
xor    %eax,%eax
cmp    $0x2,%ecx
mov    %al,-0x2d(%rbp)
jne    1174 <main+0x64>
movsbl -0x18(%rbp),%ecx
xor    %eax,%eax
cmp    $0x3,%ecx
mov    %al,-0x2d(%rbp)
jne    1174 <main+0x64>
movsbl -0x17(%rbp),%eax
cmp    $0x4,%eax
sete   %al
mov    %al,-0x2d(%rbp)
mov    -0x2d(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x1020304,-0x2c(%rbp)
lea    -0x2c(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
mov    %al,-0x2e(%rbp)
jne    11e2 <main+0xd2>
mov    -0x28(%rbp),%rax
movsbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x2,%ecx
mov    %al,-0x2e(%rbp)
jne    11e2 <main+0xd2>
mov    -0x28(%rbp),%rax
movsbl 0x2(%rax),%ecx
xor    %eax,%eax
cmp    $0x3,%ecx
mov    %al,-0x2e(%rbp)
jne    11e2 <main+0xd2>
mov    -0x28(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x4,%eax
sete   %al
mov    %al,-0x2e(%rbp)
mov    -0x2e(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <assert@plt>
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [10 x i8]
%4 = alloca i8*
%5 = alloca i32
store i32 0, i32* %1
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %2
%8 = load i32*, i32** %2
store i32 16909060, i32* %8
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %28
13: ; preds = %0
%14 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 1
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 2
br i1 %17, label %18, label %28
18: ; preds = %13
%19 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 3
br i1 %22, label %23, label %28
23: ; preds = %18
%24 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 3
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 4
br label %28
28: ; preds = %23, %18, %13, %0
%29 = phi i1 [ false, %18 ], [ false, %13 ], [ false, %0 ], [ %27, %23 ]
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
store i32 16909060, i32* %5
%32 = bitcast i32* %5 to i8*
store i8* %32, i8** %4
%33 = load i8*, i8** %4
%34 = getelementptr inbounds i8, i8* %33, i64 0
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 1
br i1 %37, label %38, label %56
38: ; preds = %28
%39 = load i8*, i8** %4
%40 = getelementptr inbounds i8, i8* %39, i64 1
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 2
br i1 %43, label %44, label %56
44: ; preds = %38
%45 = load i8*, i8** %4
%46 = getelementptr inbounds i8, i8* %45, i64 2
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp eq i32 %48, 3
br i1 %49, label %50, label %56
50: ; preds = %44
%51 = load i8*, i8** %4
%52 = getelementptr inbounds i8, i8* %51, i64 3
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = icmp eq i32 %54, 4
br label %56
56: ; preds = %50, %44, %38, %28
%57 = phi i1 [ false, %44 ], [ false, %38 ], [ false, %28 ], [ %55, %50 ]
%58 = zext i1 %57 to i32
%59 = call i32 @assert(i32 %58)
%60 = load i32, i32* %1
ret i32 %60
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
%2 = tail call i32 @assert(i32 0)
ret i32 0
}