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


x86 assembly (clang, -O0):
<Kit_TruthIsImply>:
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     117e <Kit_TruthIsImply+0x6e>
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
and    %ecx,%eax
cmp    $0x0,%eax
je     116b <Kit_TruthIsImply+0x5b>
movl   $0x0,-0x4(%rbp)
jmp    1185 <Kit_TruthIsImply+0x75>
jmp    1170 <Kit_TruthIsImply+0x60>
mov    -0x20(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
jmp    1131 <Kit_TruthIsImply+0x21>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Kit_TruthIsImply>:
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_TruthIsImply+0x3c>
mov    -0x4(%r14,%rax,4),%ecx
not    %ecx
lea    -0x1(%rax),%rdx
test   %ecx,-0x4(%rbx,%rax,4)
mov    %rdx,%rax
je     1130 <Kit_TruthIsImply+0x20>
xor    %eax,%eax
jmp    1151 <Kit_TruthIsImply+0x41>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @Kit_TruthIsImply(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 = %31, %3
%13 = load i32, i32* %8
%14 = icmp sge i32 %13, 0
br i1 %14, label %15, label %34
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 = and i32 %20, %26
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %30
29: ; preds = %15
store i32 0, i32* %4
br label %35
30: ; preds = %15
br label %31
31: ; preds = %30
%32 = load i32, i32* %8
%33 = add nsw i32 %32, -1
store i32 %33, i32* %8
br label %12
34: ; preds = %12
store i32 1, i32* %4
br label %35
35: ; preds = %34, %29
%36 = load i32, i32* %4
ret i32 %36
}

LLVM IR (-O2):
define i32 @Kit_TruthIsImply(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 %19
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 = and i32 %13, %16
%18 = icmp eq i32 %17, 0
br i1 %18, label %6, label %19
19: ; preds = %6, %11
%20 = phi i32 [ 0, %11 ], [ 1, %6 ]
ret i32 %20
}