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

/* Variables and functions */
int /*<<< orphan*/ ic_decl_func_print_body(int /*<<< orphan*/ *,
                                           struct ic_decl_func *,
                                           unsigned int *);
int /*<<< orphan*/ ic_decl_func_print_header(int /*<<< orphan*/ *,
                                             struct ic_decl_func *,
                                             unsigned int *);
int /*<<< orphan*/ ic_parse_print_indent(int /*<<< orphan*/ *, unsigned int);
int /*<<< orphan*/ puts(char *);
void ic_decl_func_print(FILE *fd, struct ic_decl_func *fdecl,
                        unsigned int *indent_level) {
  if (!fdecl) {
    puts("ic_decl_func_print: fdecl was null");
    return;
  }
  if (!indent_level) {
    puts("ic_decl_func_print: indent_level was null");
    return;
  }
  ic_parse_print_indent(fd, *indent_level);
  ic_decl_func_print_header(fd, fdecl, indent_level);
  ic_decl_func_print_body(fd, fdecl, indent_level);
}


x86 assembly (clang, -O0):
<ic_decl_func_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1170 <ic_decl_func_print+0x30>
lea    0xe9a(%rip),%rdi
call   1040 <puts@plt>
jmp    11bd <ic_decl_func_print+0x7d>
cmpq   $0x0,-0x18(%rbp)
jne    118c <ic_decl_func_print+0x4c>
lea    0xea1(%rip),%rdi
call   1040 <puts@plt>
jmp    11bd <ic_decl_func_print+0x7d>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1030 <ic_parse_print_indent@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1060 <ic_decl_func_print_header@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <ic_decl_func_print_body@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ic_decl_func_print>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1181 <ic_decl_func_print+0x41>
mov    %rdx,%r14
test   %rdx,%rdx
je     118a <ic_decl_func_print+0x4a>
mov    %rsi,%rbx
mov    %rdi,%r15
mov    (%r14),%esi
call   1030 <ic_parse_print_indent@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1060 <ic_decl_func_print_header@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <ic_decl_func_print_body@plt>
lea    0xe78(%rip),%rdi
jmp    1191 <ic_decl_func_print+0x51>
lea    0xe92(%rip),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <puts@plt>

LLVM IR (-O0):
%struct.ic_decl_func = type { i32 }
@.str = [35 x i8] c"ic_decl_func_print: fdecl was null\00"
@.str.1 = [42 x i8] c"ic_decl_func_print: indent_level was null\00"
define void @ic_decl_func_print(i32* %0, %struct.ic_decl_func* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca %struct.ic_decl_func*
%6 = alloca i32*
store i32* %0, i32** %4
store %struct.ic_decl_func* %1, %struct.ic_decl_func** %5
store i32* %2, i32** %6
%7 = load %struct.ic_decl_func*, %struct.ic_decl_func** %5
%8 = icmp ne %struct.ic_decl_func* %7, null
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = call i32 @puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %29
11: ; preds = %3
%12 = load i32*, i32** %6
%13 = icmp ne i32* %12, null
br i1 %13, label %16, label %14
14: ; preds = %11
%15 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
br label %29
16: ; preds = %11
%17 = load i32*, i32** %4
%18 = load i32*, i32** %6
%19 = load i32, i32* %18
%20 = call i32 @ic_parse_print_indent(i32* %17, i32 %19)
%21 = load i32*, i32** %4
%22 = load %struct.ic_decl_func*, %struct.ic_decl_func** %5
%23 = load i32*, i32** %6
%24 = call i32 @ic_decl_func_print_header(i32* %21, %struct.ic_decl_func* %22, i32* %23)
%25 = load i32*, i32** %4
%26 = load %struct.ic_decl_func*, %struct.ic_decl_func** %5
%27 = load i32*, i32** %6
%28 = call i32 @ic_decl_func_print_body(i32* %25, %struct.ic_decl_func* %26, i32* %27)
br label %29
29: ; preds = %16, %14, %9
ret void
}

LLVM IR (-O2):
%struct.ic_decl_func = type { i32 }
@.str = [35 x i8] c"ic_decl_func_print: fdecl was null\00"
@.str.1 = [42 x i8] c"ic_decl_func_print: indent_level was null\00"
define void @ic_decl_func_print(i32* %0, %struct.ic_decl_func* %1, i32* %2) {
%4 = icmp eq %struct.ic_decl_func* %1, null
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %16
7: ; preds = %3
%8 = icmp eq i32* %2, null
br i1 %8, label %9, label %11
9: ; preds = %7
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
br label %16
11: ; preds = %7
%12 = load i32, i32* %2
%13 = tail call i32 @ic_parse_print_indent(i32* %0, i32 %12)
%14 = tail call i32 @ic_decl_func_print_header(i32* %0, %struct.ic_decl_func* %1, i32* %2)
%15 = tail call i32 @ic_decl_func_print_body(i32* %0, %struct.ic_decl_func* %1, i32* %2)
br label %16
16: ; preds = %11, %9, %5
ret void
}