#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 */
typedef scalar_t__ array;

/* Variables and functions */
int /*<<< orphan*/ __assert_fail(char *, char *, unsigned int, char *);
void g(void) {
  int array[1];
  int i;
  int j;
  unsigned int __cil_tmp4;
  unsigned int __cil_tmp5;
  unsigned int __cil_tmp6;
  unsigned int __cil_tmp7;
  int __cil_tmp8;
  {
    i = 0;
    __cil_tmp4 = i * 4U;
    __cil_tmp5 = (unsigned int)(array) + __cil_tmp4;
    *((int *)__cil_tmp5) = 1;
    j = 0;
    {
      __cil_tmp6 = j * 4U;
      __cil_tmp7 = (unsigned int)(array) + __cil_tmp6;
      __cil_tmp8 = *((int *)__cil_tmp7);
      if (__cil_tmp8 == 1) {
      } else {
        __assert_fail("array[j]==1", "blast_array_1.c", 21U, "g");
      }
    }
    return;
  }
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x10(%rbp)
lea    -0x4(%rbp),%rax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movl   $0x1,(%rax)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x18(%rbp)
lea    -0x4(%rbp),%rax
add    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x1,-0x20(%rbp)
jne    116c <g+0x5c>
jmp    118b <g+0x7b>
lea    0xe8d(%rip),%rdi
lea    0xe92(%rip),%rsi
mov    $0x15,%edx
lea    0xe96(%rip),%rcx
call   1030 <__assert_fail@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
lea    -0x4(%rsp),%rax
mov    %eax,%eax
movl   $0x1,(%rax)
ret

LLVM IR (-O0):
@.str = [12 x i8] c"array[j]==1\00"
@.str.1 = [16 x i8] c"blast_array_1.c\00"
@.str.2 = [2 x i8] c"g\00"
define void @g() {
%1 = alloca [1 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %2
%9 = load i32, i32* %2
%10 = mul i32 %9, 4
store i32 %10, i32* %4
%11 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%12 = ptrtoint i32* %11 to i32
%13 = load i32, i32* %4
%14 = add i32 %12, %13
store i32 %14, i32* %5
%15 = load i32, i32* %5
%16 = zext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
store i32 1, i32* %17
store i32 0, i32* %3
%18 = load i32, i32* %3
%19 = mul i32 %18, 4
store i32 %19, i32* %6
%20 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%21 = ptrtoint i32* %20 to i32
%22 = load i32, i32* %6
%23 = add i32 %21, %22
store i32 %23, i32* %7
%24 = load i32, i32* %7
%25 = zext i32 %24 to i64
%26 = inttoptr i64 %25 to i32*
%27 = load i32, i32* %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = icmp eq i32 %28, 1
br i1 %29, label %30, label %31
30: ; preds = %0
br label %33
31: ; preds = %0
%32 = call i32 @__assert_fail(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %33
33: ; preds = %31, %30
ret void
}

LLVM IR (-O2):
define void @g() {
%1 = alloca [1 x i32]
%2 = bitcast [1 x i32]* %1 to i8*
%3 = ptrtoint [1 x i32]* %1 to i64
%4 = and i64 %3, 4294967292
%5 = inttoptr i64 %4 to i32*
store i32 1, i32* %5
ret void
}