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

/* Variables and functions */
int /*<<< orphan*/ puts(char *);
unsigned int ic_decl_type_union_equal(struct ic_decl_type_union *a,
                                      struct ic_decl_type_union *b) {
  if (!a) {
    puts("ic_decl_type_union_equal: a was null");
    return 0;
  }
  if (!b) {
    puts("ic_decl_type_union_equal: b was null");
    return 0;
  }
  return a == b;
}


x86 assembly (clang, -O0):
<ic_decl_type_union_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1143 <ic_decl_type_union_equal+0x33>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    1179 <ic_decl_type_union_equal+0x69>
cmpq   $0x0,-0x18(%rbp)
jne    1166 <ic_decl_type_union_equal+0x56>
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    1179 <ic_decl_type_union_equal+0x69>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ic_decl_type_union_equal>:
push   %rax
test   %rdi,%rdi
je     1125 <ic_decl_type_union_equal+0x15>
test   %rsi,%rsi
je     112e <ic_decl_type_union_equal+0x1e>
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
pop    %rcx
ret
lea    0xed4(%rip),%rdi
jmp    1135 <ic_decl_type_union_equal+0x25>
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ic_decl_type_union = type { i32 }
@.str = [37 x i8] c"ic_decl_type_union_equal: a was null\00"
@.str.1 = [37 x i8] c"ic_decl_type_union_equal: b was null\00"
define i32 @ic_decl_type_union_equal(%struct.ic_decl_type_union* %0, %struct.ic_decl_type_union* %1) {
%3 = alloca i32
%4 = alloca %struct.ic_decl_type_union*
%5 = alloca %struct.ic_decl_type_union*
store %struct.ic_decl_type_union* %0, %struct.ic_decl_type_union** %4
store %struct.ic_decl_type_union* %1, %struct.ic_decl_type_union** %5
%6 = load %struct.ic_decl_type_union*, %struct.ic_decl_type_union** %4
%7 = icmp ne %struct.ic_decl_type_union* %6, null
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %20
10: ; preds = %2
%11 = load %struct.ic_decl_type_union*, %struct.ic_decl_type_union** %5
%12 = icmp ne %struct.ic_decl_type_union* %11, null
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %20
15: ; preds = %10
%16 = load %struct.ic_decl_type_union*, %struct.ic_decl_type_union** %4
%17 = load %struct.ic_decl_type_union*, %struct.ic_decl_type_union** %5
%18 = icmp eq %struct.ic_decl_type_union* %16, %17
%19 = zext i1 %18 to i32
store i32 %19, i32* %3
br label %20
20: ; preds = %15, %13, %8
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
%struct.ic_decl_type_union = type { i32 }
@.str = [37 x i8] c"ic_decl_type_union_equal: a was null\00"
@.str.1 = [37 x i8] c"ic_decl_type_union_equal: b was null\00"
define i32 @ic_decl_type_union_equal(%struct.ic_decl_type_union* readnone %0, %struct.ic_decl_type_union* readnone %1) {
%3 = icmp eq %struct.ic_decl_type_union* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %13
6: ; preds = %2
%7 = icmp eq %struct.ic_decl_type_union* %1, null
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
br label %13
10: ; preds = %6
%11 = icmp eq %struct.ic_decl_type_union* %0, %1
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %10, %8, %4
%14 = phi i32 [ %12, %10 ], [ 0, %8 ], [ 0, %4 ]
ret i32 %14
}