#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;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ ic_decl_type_union_print_header(int /*<<< orphan*/ *,
                                                   struct ic_decl_type_union *,
                                                   unsigned int *);
int /*<<< orphan*/ puts(char *);
void ic_decl_type_union_print_debug(FILE *fd,
                                    struct ic_decl_type_union *udecl) {
  unsigned int fake_indent = 0;
  if (!udecl) {
    puts("ic_decl_type_union_print_debug: udecl was null");
    return;
  }
  fputs("found: ", fd);
  ic_decl_type_union_print_header(fd, udecl, &fake_indent);
}


x86 assembly (clang, -O0):
<ic_decl_type_union_print_debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1163 <ic_decl_type_union_print_debug+0x33>
lea    0xea7(%rip),%rdi
call   1030 <puts@plt>
jmp    1184 <ic_decl_type_union_print_debug+0x54>
mov    -0x8(%rbp),%rsi
lea    0xec1(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1050 <ic_decl_type_union_print_header@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ic_decl_type_union_print_debug>:
push   %r14
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
test   %rsi,%rsi
je     1178 <ic_decl_type_union_print_debug+0x48>
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xee1(%rip),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1050 <fwrite@plt>
lea    0x4(%rsp),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <ic_decl_type_union_print_header@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe81(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
%struct.ic_decl_type_union = type { i32 }
@.str = [47 x i8] c"ic_decl_type_union_print_debug: udecl was null\00"
@.str.1 = [8 x i8] c"found: \00"
define void @ic_decl_type_union_print_debug(i32* %0, %struct.ic_decl_type_union* %1) {
%3 = alloca i32*
%4 = alloca %struct.ic_decl_type_union*
%5 = alloca i32
store i32* %0, i32** %3
store %struct.ic_decl_type_union* %1, %struct.ic_decl_type_union** %4
store i32 0, i32* %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 ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
br label %16
10: ; preds = %2
%11 = load i32*, i32** %3
%12 = call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32* %11)
%13 = load i32*, i32** %3
%14 = load %struct.ic_decl_type_union*, %struct.ic_decl_type_union** %4
%15 = call i32 @ic_decl_type_union_print_header(i32* %13, %struct.ic_decl_type_union* %14, i32* %5)
br label %16
16: ; preds = %10, %8
ret void
}

LLVM IR (-O2):
%struct.ic_decl_type_union = type { i32 }
@.str = [47 x i8] c"ic_decl_type_union_print_debug: udecl was null\00"
@.str.1 = [8 x i8] c"found: \00"
define void @ic_decl_type_union_print_debug(i32* %0, %struct.ic_decl_type_union* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = icmp eq %struct.ic_decl_type_union* %1, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
br label %11
8: ; preds = %2
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i64 7, i64 1, i32* %0)
%10 = call i32 @ic_decl_type_union_print_header(i32* %0, %struct.ic_decl_type_union* %1, i32* %3)
br label %11
11: ; preds = %8, %6
ret void
}