#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*/ __CPROVER_assume(int);
int /*<<< orphan*/ assert(int);
int main() {
  int i, ii;
  int data = 0;
  char *p = (char *)&data;
  i = ii;
  __CPROVER_assume(i >= 0 && i < 4);
  p[i]++;
  if (i == 0)
    assert(data == 1);
  else if (i == 1)
    assert(data == 0x100);
  else if (i == 2)
    assert(data == 0x10000);
  else
    assert(data == 0x1000000);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x19(%rbp)
jl     115d <main+0x3d>
cmpl   $0x4,-0x8(%rbp)
setl   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CPROVER_assume@plt>
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
add    $0x1,%dl
mov    %dl,(%rax,%rcx,1)
cmpl   $0x0,-0x8(%rbp)
jne    119b <main+0x7b>
cmpl   $0x1,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
jmp    11ff <main+0xdf>
cmpl   $0x1,-0x8(%rbp)
jne    11be <main+0x9e>
cmpl   $0x100,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
jmp    11fa <main+0xda>
cmpl   $0x2,-0x8(%rbp)
jne    11e1 <main+0xc1>
cmpl   $0x10000,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
jmp    11f5 <main+0xd5>
cmpl   $0x1000000,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
jmp    11fa <main+0xda>
jmp    11ff <main+0xdf>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

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