#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*/ __analyzer_eval(int);
void test(int *p, int i, int j) {
  p[3] = 42;
  __analyzer_eval(p[3] == 42);
  __analyzer_eval(*(p + 3) == 42);
  __analyzer_eval(p[i] == 42);
  __analyzer_eval(p[j] == 42);
  p[i] = 17;
  __analyzer_eval(p[3] == 42);
  __analyzer_eval(p[i] == 17);
  __analyzer_eval(p[j] == 17);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2a,0xc(%rax)
mov    -0x8(%rbp),%rax
cmpl   $0x2a,0xc(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x8(%rbp),%rax
cmpl   $0x2a,0xc(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpl   $0x2a,(%rax,%rcx,4)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpl   $0x2a,(%rax,%rcx,4)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x11,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
cmpl   $0x2a,0xc(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpl   $0x11,(%rax,%rcx,4)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpl   $0x11,(%rax,%rcx,4)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
movl   $0x2a,0xc(%rdi)
mov    $0x1,%edi
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
cmpl   $0x2a,0xc(%rbx)
sete   %dil
call   1030 <__analyzer_eval@plt>
movslq %ebp,%rbp
xor    %edi,%edi
cmpl   $0x2a,(%rbx,%rbp,4)
sete   %dil
call   1030 <__analyzer_eval@plt>
movslq %r14d,%r14
xor    %edi,%edi
cmpl   $0x2a,(%rbx,%r14,4)
sete   %dil
call   1030 <__analyzer_eval@plt>
movl   $0x11,(%rbx,%rbp,4)
xor    %edi,%edi
cmpl   $0x2a,0xc(%rbx)
sete   %dil
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
cmpl   $0x11,(%rbx,%rbp,4)
sete   %dil
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
cmpl   $0x11,(%rbx,%r14,4)
sete   %dil
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <__analyzer_eval@plt>

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

LLVM IR (-O2):
define void @test(i32* nocapture %0, i32 %1, i32 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 3
store i32 42, i32* %4
%5 = tail call i32 @__analyzer_eval(i32 1)
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 42
%8 = zext i1 %7 to i32
%9 = tail call i32 @__analyzer_eval(i32 %8)
%10 = sext i32 %1 to i64
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, 42
%14 = zext i1 %13 to i32
%15 = tail call i32 @__analyzer_eval(i32 %14)
%16 = sext i32 %2 to i64
%17 = getelementptr inbounds i32, i32* %0, i64 %16
%18 = load i32, i32* %17
%19 = icmp eq i32 %18, 42
%20 = zext i1 %19 to i32
%21 = tail call i32 @__analyzer_eval(i32 %20)
store i32 17, i32* %11
%22 = load i32, i32* %4
%23 = icmp eq i32 %22, 42
%24 = zext i1 %23 to i32
%25 = tail call i32 @__analyzer_eval(i32 %24)
%26 = load i32, i32* %11
%27 = icmp eq i32 %26, 17
%28 = zext i1 %27 to i32
%29 = tail call i32 @__analyzer_eval(i32 %28)
%30 = load i32, i32* %17
%31 = icmp eq i32 %30, 17
%32 = zext i1 %31 to i32
%33 = tail call i32 @__analyzer_eval(i32 %32)
ret void
}