#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__ isEqual(int *, int *);
scalar_t__ isNull(int *);
void testNestedDisjunctiveMacro2(int *p, int *q) {
  if (((int *)(p) == (int *)(q) ||
       (((p) == 0 || isNull(p)) && ((q) == 0 || isNull(q))) || isEqual(p, q))) {
    return;
  }
  *p = 1;
  *q = 1;
}


x86 assembly (clang, -O0):
<testNestedDisjunctiveMacro2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1191 <testNestedDisjunctiveMacro2+0x71>
cmpq   $0x0,-0x8(%rbp)
je     115c <testNestedDisjunctiveMacro2+0x3c>
mov    -0x8(%rbp),%rdi
call   1030 <isNull@plt>
cmp    $0x0,%rax
je     117a <testNestedDisjunctiveMacro2+0x5a>
cmpq   $0x0,-0x10(%rbp)
je     1191 <testNestedDisjunctiveMacro2+0x71>
mov    -0x10(%rbp),%rdi
call   1030 <isNull@plt>
cmp    $0x0,%rax
jne    1191 <testNestedDisjunctiveMacro2+0x71>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <isEqual@plt>
cmp    $0x0,%rax
je     1196 <testNestedDisjunctiveMacro2+0x76>
jmp    11aa <testNestedDisjunctiveMacro2+0x8a>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testNestedDisjunctiveMacro2>:
push   %r14
push   %rbx
push   %rax
cmp    %rsi,%rdi
je     1170 <testNestedDisjunctiveMacro2+0x50>
mov    %rsi,%r14
mov    %rdi,%rbx
test   %rdi,%rdi
je     1141 <testNestedDisjunctiveMacro2+0x21>
mov    %rbx,%rdi
call   1030 <isNull@plt>
test   %rax,%rax
je     1153 <testNestedDisjunctiveMacro2+0x33>
test   %r14,%r14
je     1170 <testNestedDisjunctiveMacro2+0x50>
mov    %r14,%rdi
call   1030 <isNull@plt>
test   %rax,%rax
jne    1170 <testNestedDisjunctiveMacro2+0x50>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <isEqual@plt>
test   %rax,%rax
jne    1170 <testNestedDisjunctiveMacro2+0x50>
movl   $0x1,(%rbx)
movl   $0x1,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @testNestedDisjunctiveMacro2(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 = load i32*, i32** %4
%7 = icmp eq i32* %5, %6
br i1 %7, label %27, label %8
8: ; preds = %2
%9 = load i32*, i32** %3
%10 = icmp eq i32* %9, null
br i1 %10, label %15, label %11
11: ; preds = %8
%12 = load i32*, i32** %3
%13 = call i64 @isNull(i32* %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %22
15: ; preds = %11, %8
%16 = load i32*, i32** %4
%17 = icmp eq i32* %16, null
br i1 %17, label %27, label %18
18: ; preds = %15
%19 = load i32*, i32** %4
%20 = call i64 @isNull(i32* %19)
%21 = icmp ne i64 %20, 0
br i1 %21, label %27, label %22
22: ; preds = %18, %11
%23 = load i32*, i32** %3
%24 = load i32*, i32** %4
%25 = call i64 @isEqual(i32* %23, i32* %24)
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %22, %18, %15, %2
br label %31
28: ; preds = %22
%29 = load i32*, i32** %3
store i32 1, i32* %29
%30 = load i32*, i32** %4
store i32 1, i32* %30
br label %31
31: ; preds = %28, %27
ret void
}

LLVM IR (-O2):
define void @testNestedDisjunctiveMacro2(i32* %0, i32* %1) {
%3 = icmp eq i32* %0, %1
br i1 %3, label %18, label %4
4: ; preds = %2
%5 = icmp eq i32* %0, null
br i1 %5, label %9, label %6
6: ; preds = %4
%7 = tail call i64 @isNull(i32* %0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %6, %4
%10 = icmp eq i32* %1, null
br i1 %10, label %18, label %11
11: ; preds = %9
%12 = tail call i64 @isNull(i32* %1)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %11, %6
%15 = tail call i64 @isEqual(i32* %0, i32* %1)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %14
store i32 1, i32* %0
store i32 1, i32* %1
br label %18
18: ; preds = %2, %9, %11, %14, %17
ret void
}