#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 testNestedDisjunctiveMacro(int *p, int *q) {
  if ((!((int *)(p) == (int *)(q) ||
         (((p) == 0 || isNull(p)) && ((q) == 0 || isNull(q))) ||
         isEqual(p, q)))) {
    *p = 1;
    *q = 1;
  }
  *p = 1;
  *q = 1;
}


x86 assembly (clang, -O0):
<testNestedDisjunctiveMacro>:
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     11a5 <testNestedDisjunctiveMacro+0x85>
cmpq   $0x0,-0x8(%rbp)
je     115c <testNestedDisjunctiveMacro+0x3c>
mov    -0x8(%rbp),%rdi
call   1030 <isNull@plt>
cmp    $0x0,%rax
je     117a <testNestedDisjunctiveMacro+0x5a>
cmpq   $0x0,-0x10(%rbp)
je     11a5 <testNestedDisjunctiveMacro+0x85>
mov    -0x10(%rbp),%rdi
call   1030 <isNull@plt>
cmp    $0x0,%rax
jne    11a5 <testNestedDisjunctiveMacro+0x85>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <isEqual@plt>
cmp    $0x0,%rax
jne    11a5 <testNestedDisjunctiveMacro+0x85>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testNestedDisjunctiveMacro(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 %30, 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 %30, 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 %30, 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 %30, label %27
27: ; preds = %22
%28 = load i32*, i32** %3
store i32 1, i32* %28
%29 = load i32*, i32** %4
store i32 1, i32* %29
br label %30
30: ; preds = %27, %22, %18, %15, %2
%31 = load i32*, i32** %3
store i32 1, i32* %31
%32 = load i32*, i32** %4
store i32 1, i32* %32
ret void
}

LLVM IR (-O2):
define void @testNestedDisjunctiveMacro(i32* %0, i32* %1) {
%3 = icmp eq i32* %0, %1
br i1 %3, label %16, 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 %16, label %11
11: ; preds = %9
%12 = tail call i64 @isNull(i32* %1)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11, %6
%15 = tail call i64 @isEqual(i32* %0, i32* %1)
br label %16
16: ; preds = %14, %11, %9, %2
store i32 1, i32* %0
store i32 1, i32* %1
ret void
}