#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 ip_conntrack_tuple {
  int dummy;
};

/* Variables and functions */
scalar_t__ ip_ct_tuple_dst_equal(struct ip_conntrack_tuple const *,
                                 struct ip_conntrack_tuple const *);
scalar_t__ ip_ct_tuple_src_equal(struct ip_conntrack_tuple const *,
                                 struct ip_conntrack_tuple const *);
int ip_ct_tuple_equal(const struct ip_conntrack_tuple *t1,
                      const struct ip_conntrack_tuple *t2) {
  return ip_ct_tuple_src_equal(t1, t2) && ip_ct_tuple_dst_equal(t1, t2);
}


x86 assembly (clang, -O0):
<ip_ct_tuple_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ip_ct_tuple_src_equal@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     1166 <ip_ct_tuple_equal+0x46>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <ip_ct_tuple_dst_equal@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

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