#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 */
struct nf_conntrack_tuple_mask {
  int dummy;
};
struct nf_conntrack_tuple {
  int dummy;
};

/* Variables and functions */
scalar_t__ __nf_ct_tuple_dst_equal(struct nf_conntrack_tuple const *,
                                   struct nf_conntrack_tuple const *);
scalar_t__ nf_ct_tuple_src_mask_cmp(struct nf_conntrack_tuple const *,
                                    struct nf_conntrack_tuple const *,
                                    struct nf_conntrack_tuple_mask const *);
int nf_ct_tuple_mask_cmp(const struct nf_conntrack_tuple *t,
                         const struct nf_conntrack_tuple *tuple,
                         const struct nf_conntrack_tuple_mask *mask) {
  return nf_ct_tuple_src_mask_cmp(t, tuple, mask) &&
         __nf_ct_tuple_dst_equal(t, tuple);
}


x86 assembly (clang, -O0):
<nf_ct_tuple_mask_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <nf_ct_tuple_src_mask_cmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x19(%rbp)
je     116e <nf_ct_tuple_mask_cmp+0x4e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__nf_ct_tuple_dst_equal@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nf_ct_tuple_mask_cmp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <nf_ct_tuple_src_mask_cmp@plt>
test   %rax,%rax
je     114c <nf_ct_tuple_mask_cmp+0x2c>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <__nf_ct_tuple_dst_equal@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    114e <nf_ct_tuple_mask_cmp+0x2e>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.nf_conntrack_tuple = type { i32 }
%struct.nf_conntrack_tuple_mask = type { i32 }
define i32 @nf_ct_tuple_mask_cmp(%struct.nf_conntrack_tuple* %0, %struct.nf_conntrack_tuple* %1, %struct.nf_conntrack_tuple_mask* %2) {
%4 = alloca %struct.nf_conntrack_tuple*
%5 = alloca %struct.nf_conntrack_tuple*
%6 = alloca %struct.nf_conntrack_tuple_mask*
store %struct.nf_conntrack_tuple* %0, %struct.nf_conntrack_tuple** %4
store %struct.nf_conntrack_tuple* %1, %struct.nf_conntrack_tuple** %5
store %struct.nf_conntrack_tuple_mask* %2, %struct.nf_conntrack_tuple_mask** %6
%7 = load %struct.nf_conntrack_tuple*, %struct.nf_conntrack_tuple** %4
%8 = load %struct.nf_conntrack_tuple*, %struct.nf_conntrack_tuple** %5
%9 = load %struct.nf_conntrack_tuple_mask*, %struct.nf_conntrack_tuple_mask** %6
%10 = call i64 @nf_ct_tuple_src_mask_cmp(%struct.nf_conntrack_tuple* %7, %struct.nf_conntrack_tuple* %8, %struct.nf_conntrack_tuple_mask* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %3
%13 = load %struct.nf_conntrack_tuple*, %struct.nf_conntrack_tuple** %4
%14 = load %struct.nf_conntrack_tuple*, %struct.nf_conntrack_tuple** %5
%15 = call i64 @__nf_ct_tuple_dst_equal(%struct.nf_conntrack_tuple* %13, %struct.nf_conntrack_tuple* %14)
%16 = icmp ne i64 %15, 0
br label %17
17: ; preds = %12, %3
%18 = phi i1 [ false, %3 ], [ %16, %12 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
%struct.nf_conntrack_tuple = type { i32 }
%struct.nf_conntrack_tuple_mask = type { i32 }
define i32 @nf_ct_tuple_mask_cmp(%struct.nf_conntrack_tuple* %0, %struct.nf_conntrack_tuple* %1, %struct.nf_conntrack_tuple_mask* %2) {
%4 = tail call i64 @nf_ct_tuple_src_mask_cmp(%struct.nf_conntrack_tuple* %0, %struct.nf_conntrack_tuple* %1, %struct.nf_conntrack_tuple_mask* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i64 @__nf_ct_tuple_dst_equal(%struct.nf_conntrack_tuple* %0, %struct.nf_conntrack_tuple* %1)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3
%11 = phi i32 [ 0, %3 ], [ %9, %6 ]
ret i32 %11
}