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

/* Variables and functions */
int /*<<< orphan*/ ic_decl_type_struct_print_body(int /*<<< orphan*/ *,
                                                  struct ic_decl_type_struct *,
                                                  unsigned int *);
int /*<<< orphan*/
ic_decl_type_struct_print_header(int /*<<< orphan*/ *,
                                 struct ic_decl_type_struct *, unsigned int *);
int /*<<< orphan*/ puts(char *);
void ic_decl_type_struct_print(FILE *fd, struct ic_decl_type_struct *tdecl,
                               unsigned int *indent_level) {
  if (!tdecl) {
    puts("ic_decl_type_struct_print: tdecl was null");
    return;
  }
  if (!indent_level) {
    puts("ic_decl_type_struct_print: indent_level was null");
    return;
  }
  ic_decl_type_struct_print_header(fd, tdecl, indent_level);
  ic_decl_type_struct_print_body(fd, tdecl, indent_level);
}


x86 assembly (clang, -O0):
<ic_decl_type_struct_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    1160 <ic_decl_type_struct_print+0x30>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
jmp    119e <ic_decl_type_struct_print+0x6e>
cmpq   $0x0,-0x18(%rbp)
jne    117c <ic_decl_type_struct_print+0x4c>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
jmp    119e <ic_decl_type_struct_print+0x6e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <ic_decl_type_struct_print_header@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <ic_decl_type_struct_print_body@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ic_decl_type_struct_print>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1163 <ic_decl_type_struct_print+0x33>
mov    %rdx,%r14
test   %rdx,%rdx
je     116c <ic_decl_type_struct_print+0x3c>
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %r14,%rdx
call   1040 <ic_decl_type_struct_print_header@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <ic_decl_type_struct_print_body@plt>
lea    0xe96(%rip),%rdi
jmp    1173 <ic_decl_type_struct_print+0x43>
lea    0xeb7(%rip),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <puts@plt>

LLVM IR (-O0):
%struct.ic_decl_type_struct = type { i32 }
@.str = [42 x i8] c"ic_decl_type_struct_print: tdecl was null\00"
@.str.1 = [49 x i8] c"ic_decl_type_struct_print: indent_level was null\00"
define void @ic_decl_type_struct_print(i32* %0, %struct.ic_decl_type_struct* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca %struct.ic_decl_type_struct*
%6 = alloca i32*
store i32* %0, i32** %4
store %struct.ic_decl_type_struct* %1, %struct.ic_decl_type_struct** %5
store i32* %2, i32** %6
%7 = load %struct.ic_decl_type_struct*, %struct.ic_decl_type_struct** %5
%8 = icmp ne %struct.ic_decl_type_struct* %7, null
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %25
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 ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
br label %25
16: ; preds = %11
%17 = load i32*, i32** %4
%18 = load %struct.ic_decl_type_struct*, %struct.ic_decl_type_struct** %5
%19 = load i32*, i32** %6
%20 = call i32 @ic_decl_type_struct_print_header(i32* %17, %struct.ic_decl_type_struct* %18, i32* %19)
%21 = load i32*, i32** %4
%22 = load %struct.ic_decl_type_struct*, %struct.ic_decl_type_struct** %5
%23 = load i32*, i32** %6
%24 = call i32 @ic_decl_type_struct_print_body(i32* %21, %struct.ic_decl_type_struct* %22, i32* %23)
br label %25
25: ; preds = %16, %14, %9
ret void
}

LLVM IR (-O2):
%struct.ic_decl_type_struct = type { i32 }
@.str = [42 x i8] c"ic_decl_type_struct_print: tdecl was null\00"
@.str.1 = [49 x i8] c"ic_decl_type_struct_print: indent_level was null\00"
define void @ic_decl_type_struct_print(i32* %0, %struct.ic_decl_type_struct* %1, i32* %2) {
%4 = icmp eq %struct.ic_decl_type_struct* %1, null
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %14
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 ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
br label %14
11: ; preds = %7
%12 = tail call i32 @ic_decl_type_struct_print_header(i32* %0, %struct.ic_decl_type_struct* %1, i32* %2)
%13 = tail call i32 @ic_decl_type_struct_print_body(i32* %0, %struct.ic_decl_type_struct* %1, i32* %2)
br label %14
14: ; preds = %11, %9, %5
ret void
}