#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 /*<<< orphan*/ _gc_add_reachable(void *, void *, void *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int _gc_add_reachable_both(void *data, void *extra, void *h) {
  int result = 0;
  do {
    ((void)(data && extra && h));
    assert(data && extra && h);
  } while (0);
  _gc_add_reachable(extra, 0, h);
  _gc_add_reachable(data, extra, h);
  return result;
}


x86 assembly (clang, -O0):
<_gc_add_reachable_both>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x1d(%rbp)
je     1166 <_gc_add_reachable_both+0x46>
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x1d(%rbp)
je     1166 <_gc_add_reachable_both+0x46>
cmpq   $0x0,-0x18(%rbp)
setne  %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x1e(%rbp)
je     1194 <_gc_add_reachable_both+0x74>
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x1e(%rbp)
je     1194 <_gc_add_reachable_both+0x74>
cmpq   $0x0,-0x18(%rbp)
setne  %al
mov    %al,-0x1e(%rbp)
mov    -0x1e(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <_gc_add_reachable@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <_gc_add_reachable@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_gc_add_reachable_both>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
test   %rdi,%rdi
setne  %al
test   %rsi,%rsi
setne  %cl
and    %al,%cl
test   %rdx,%rdx
setne  %al
and    %cl,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1040 <_gc_add_reachable@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <_gc_add_reachable@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @_gc_add_reachable_both(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
store i32 0, i32* %7
br label %8
8: ; preds = %3
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load i8*, i8** %5
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i8*, i8** %6
%16 = icmp ne i8* %15, null
br label %17
17: ; preds = %14, %11, %8
%18 = phi i1 [ false, %11 ], [ false, %8 ], [ %16, %14 ]
%19 = zext i1 %18 to i32
%20 = load i8*, i8** %4
%21 = icmp ne i8* %20, null
br i1 %21, label %22, label %28
22: ; preds = %17
%23 = load i8*, i8** %5
%24 = icmp ne i8* %23, null
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = load i8*, i8** %6
%27 = icmp ne i8* %26, null
br label %28
28: ; preds = %25, %22, %17
%29 = phi i1 [ false, %22 ], [ false, %17 ], [ %27, %25 ]
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
br label %32
32: ; preds = %28
%33 = load i8*, i8** %5
%34 = load i8*, i8** %6
%35 = call i32 @_gc_add_reachable(i8* %33, i8* null, i8* %34)
%36 = load i8*, i8** %4
%37 = load i8*, i8** %5
%38 = load i8*, i8** %6
%39 = call i32 @_gc_add_reachable(i8* %36, i8* %37, i8* %38)
%40 = load i32, i32* %7
ret i32 %40
}

LLVM IR (-O2):
define i32 @_gc_add_reachable_both(i8* %0, i8* %1, i8* %2) {
%4 = icmp ne i8* %0, null
%5 = icmp ne i8* %1, null
%6 = and i1 %4, %5
%7 = icmp ne i8* %2, null
%8 = and i1 %6, %7
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = tail call i32 @_gc_add_reachable(i8* %1, i8* null, i8* %2)
%12 = tail call i32 @_gc_add_reachable(i8* %0, i8* %1, i8* %2)
ret i32 0
}