#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 Kit_TruthWordNum(int);
int Kit_TruthIsOpposite(unsigned *pIn0, unsigned *pIn1, int nVars) {
  int w;
  for (w = Kit_TruthWordNum(nVars) - 1; w >= 0; w--)
    if (pIn0[w] != ~pIn1[w])
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<Kit_TruthIsOpposite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <Kit_TruthWordNum@plt>
sub    $0x1,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jl     117b <Kit_TruthIsOpposite+0x6b>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
mov    (%rcx,%rdx,4),%ecx
xor    $0xffffffff,%ecx
cmp    %ecx,%eax
je     1168 <Kit_TruthIsOpposite+0x58>
movl   $0x0,-0x4(%rbp)
jmp    1182 <Kit_TruthIsOpposite+0x72>
jmp    116d <Kit_TruthIsOpposite+0x5d>
mov    -0x20(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
jmp    1131 <Kit_TruthIsOpposite+0x21>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Kit_TruthIsOpposite>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %edx,%edi
call   1030 <Kit_TruthWordNum@plt>
mov    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %eax,%eax
jle    114c <Kit_TruthIsOpposite+0x3c>
mov    -0x4(%r14,%rax,4),%ecx
not    %ecx
lea    -0x1(%rax),%rdx
cmp    %ecx,-0x4(%rbx,%rax,4)
mov    %rdx,%rax
je     1130 <Kit_TruthIsOpposite+0x20>
xor    %eax,%eax
jmp    1151 <Kit_TruthIsOpposite+0x41>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @Kit_TruthIsOpposite(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = tail call i32 @Kit_TruthWordNum(i32 %2)
%5 = zext i32 %4 to i64
br label %6
6: ; preds = %11, %3
%7 = phi i64 [ %8, %11 ], [ %5, %3 ]
%8 = add nsw i64 %7, -1
%9 = trunc i64 %7 to i32
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %6
%12 = getelementptr inbounds i32, i32* %0, i64 %8
%13 = load i32, i32* %12
%14 = getelementptr inbounds i32, i32* %1, i64 %8
%15 = load i32, i32* %14
%16 = xor i32 %15, -1
%17 = icmp eq i32 %13, %16
br i1 %17, label %6, label %18
18: ; preds = %6, %11
%19 = phi i32 [ 0, %11 ], [ 1, %6 ]
ret i32 %19
}