#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*/ clang_analyzer_eval(int);
void testPersistentConstraints(int x, int y) {
  if (!(x))
    return;
  clang_analyzer_eval(x);
  if (!(x & 1))
    return;
  clang_analyzer_eval(x & 1);
  if (!(1 - x))
    return;
  clang_analyzer_eval(1 - x);
  if (!(x & y))
    return;
  clang_analyzer_eval(x & y);
}


x86 assembly (clang, -O0):
<testPersistentConstraints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112d <testPersistentConstraints+0x1d>
jmp    1196 <testPersistentConstraints+0x86>
mov    -0x4(%rbp),%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1149 <testPersistentConstraints+0x39>
jmp    1196 <testPersistentConstraints+0x86>
mov    -0x4(%rbp),%edi
and    $0x1,%edi
call   1030 <clang_analyzer_eval@plt>
mov    $0x1,%eax
sub    -0x4(%rbp),%eax
cmp    $0x0,%eax
jne    116a <testPersistentConstraints+0x5a>
jmp    1196 <testPersistentConstraints+0x86>
mov    $0x1,%edi
sub    -0x4(%rbp),%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
jne    118b <testPersistentConstraints+0x7b>
jmp    1196 <testPersistentConstraints+0x86>
mov    -0x4(%rbp),%edi
and    -0x8(%rbp),%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testPersistentConstraints>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
je     1156 <testPersistentConstraints+0x46>
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <clang_analyzer_eval@plt>
test   $0x1,%bpl
je     1156 <testPersistentConstraints+0x46>
mov    $0x1,%r14d
mov    $0x1,%edi
call   1030 <clang_analyzer_eval@plt>
cmp    $0x1,%ebp
je     1156 <testPersistentConstraints+0x46>
sub    %ebp,%r14d
mov    %r14d,%edi
call   1030 <clang_analyzer_eval@plt>
and    %ebp,%ebx
je     1156 <testPersistentConstraints+0x46>
mov    %ebx,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @testPersistentConstraints(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %2
br label %37
8: ; preds = %2
%9 = load i32, i32* %3
%10 = call i32 @clang_analyzer_eval(i32 %9)
%11 = load i32, i32* %3
%12 = and i32 %11, 1
%13 = icmp ne i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %8
br label %37
15: ; preds = %8
%16 = load i32, i32* %3
%17 = and i32 %16, 1
%18 = call i32 @clang_analyzer_eval(i32 %17)
%19 = load i32, i32* %3
%20 = sub nsw i32 1, %19
%21 = icmp ne i32 %20, 0
br i1 %21, label %23, label %22
22: ; preds = %15
br label %37
23: ; preds = %15
%24 = load i32, i32* %3
%25 = sub nsw i32 1, %24
%26 = call i32 @clang_analyzer_eval(i32 %25)
%27 = load i32, i32* %3
%28 = load i32, i32* %4
%29 = and i32 %27, %28
%30 = icmp ne i32 %29, 0
br i1 %30, label %32, label %31
31: ; preds = %23
br label %37
32: ; preds = %23
%33 = load i32, i32* %3
%34 = load i32, i32* %4
%35 = and i32 %33, %34
%36 = call i32 @clang_analyzer_eval(i32 %35)
br label %37
37: ; preds = %32, %31, %22, %14, %7
ret void
}

LLVM IR (-O2):
define void @testPersistentConstraints(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %18, label %4
4: ; preds = %2
%5 = tail call i32 @clang_analyzer_eval(i32 %0)
%6 = and i32 %0, 1
%7 = icmp eq i32 %6, 0
br i1 %7, label %18, label %8
8: ; preds = %4
%9 = tail call i32 @clang_analyzer_eval(i32 1)
%10 = icmp eq i32 %0, 1
br i1 %10, label %18, label %11
11: ; preds = %8
%12 = sub nsw i32 1, %0
%13 = tail call i32 @clang_analyzer_eval(i32 %12)
%14 = and i32 %1, %0
%15 = icmp eq i32 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %11
%17 = tail call i32 @clang_analyzer_eval(i32 %14)
br label %18
18: ; preds = %11, %8, %4, %2, %16
ret void
}