#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 */
scalar_t__ __VERIFIER_nondet_int();
int *__VERIFIER_nondet_pointer();
void __Main(int flag) {
  int *p1 = 0, *p2 = 0, *p3 = 0, n4 = 0;
  if (flag) {
    if (__VERIFIER_nondet_int()) {
      p2 = p1;
      p1 = 0;
    } else {
      p1 = 0;
    }
  } else {
    p1 = __VERIFIER_nondet_pointer();
    p2 = __VERIFIER_nondet_pointer();
  }
  p3 = __VERIFIER_nondet_pointer();
  if (flag) {
    p3 = __VERIFIER_nondet_pointer();
  } else {
    n4 = 1;
  }
  if (p1 != p2 && n4 == 1) {
  ERROR:
    goto ERROR;
  }
}


x86 assembly (clang, -O0):
<__Main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1187 <__Main+0x67>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
je     117a <__Main+0x5a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
jmp    1182 <__Main+0x62>
movq   $0x0,-0x10(%rbp)
jmp    119d <__Main+0x7d>
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_pointer@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_pointer@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_pointer@plt>
mov    %rax,-0x20(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     11c2 <__Main+0xa2>
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_pointer@plt>
mov    %rax,-0x20(%rbp)
jmp    11c9 <__Main+0xa9>
movl   $0x1,-0x24(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     11eb <__Main+0xcb>
cmpl   $0x1,-0x24(%rbp)
jne    11eb <__Main+0xcb>
jmp    11e6 <__Main+0xc6>
jmp    11e6 <__Main+0xc6>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__Main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
test   %edi,%edi
je     1144 <__Main+0x24>
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_pointer@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <__VERIFIER_nondet_pointer@plt>
call   1040 <__VERIFIER_nondet_pointer@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_pointer@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_pointer@plt>
cmp    %rbx,%r14
je     1172 <__Main+0x52>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    1170 <__Main+0x50>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @__Main(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 (...) @__VERIFIER_nondet_int()
%5 = tail call i32* (...) @__VERIFIER_nondet_pointer()
%6 = tail call i32* (...) @__VERIFIER_nondet_pointer()
br label %13
7: ; preds = %1
%8 = tail call i32* (...) @__VERIFIER_nondet_pointer()
%9 = tail call i32* (...) @__VERIFIER_nondet_pointer()
%10 = tail call i32* (...) @__VERIFIER_nondet_pointer()
%11 = icmp eq i32* %8, %9
br i1 %11, label %13, label %12
12: ; preds = %7, %12
br label %12
13: ; preds = %3, %7
ret void
}