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

/* Variables and functions */
int /*<<< orphan*/ puts(char *);
unsigned int ic_b2c_compile_type_body(struct ic_kludge *kludge,
                                      struct ic_decl_type *tdecl, FILE *f) {
  if (!kludge) {
    puts("ic_b2c_compile_types_body: kludge was null");
    return 0;
  }
  if (!tdecl) {
    puts("ic_b2c_compile_types_body: tdecl was null");
    return 0;
  }
  if (!f) {
    puts("ic_b2c_compile_types_body: file was null");
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<ic_b2c_compile_type_body>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1147 <ic_b2c_compile_type_body+0x37>
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    1194 <ic_b2c_compile_type_body+0x84>
cmpq   $0x0,-0x18(%rbp)
jne    116a <ic_b2c_compile_type_body+0x5a>
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    1194 <ic_b2c_compile_type_body+0x84>
cmpq   $0x0,-0x20(%rbp)
jne    118d <ic_b2c_compile_type_body+0x7d>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    1194 <ic_b2c_compile_type_body+0x84>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ic_b2c_compile_type_body>:
test   %rdi,%rdi
je     1125 <ic_b2c_compile_type_body+0x15>
test   %rsi,%rsi
je     112e <ic_b2c_compile_type_body+0x1e>
mov    $0x1,%eax
test   %rdx,%rdx
je     1137 <ic_b2c_compile_type_body+0x27>
ret
lea    0xed4(%rip),%rdi
jmp    113e <ic_b2c_compile_type_body+0x2e>
lea    0xef6(%rip),%rdi
jmp    113e <ic_b2c_compile_type_body+0x2e>
lea    0xf17(%rip),%rdi
push   %rax
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
%struct.ic_kludge = type { i32 }
%struct.ic_decl_type = type { i32 }
@.str = [43 x i8] c"ic_b2c_compile_types_body: kludge was null\00"
@.str.1 = [42 x i8] c"ic_b2c_compile_types_body: tdecl was null\00"
@.str.2 = [41 x i8] c"ic_b2c_compile_types_body: file was null\00"
define i32 @ic_b2c_compile_type_body(%struct.ic_kludge* %0, %struct.ic_decl_type* %1, i32* %2) {
%4 = alloca i32
%5 = alloca %struct.ic_kludge*
%6 = alloca %struct.ic_decl_type*
%7 = alloca i32*
store %struct.ic_kludge* %0, %struct.ic_kludge** %5
store %struct.ic_decl_type* %1, %struct.ic_decl_type** %6
store i32* %2, i32** %7
%8 = load %struct.ic_kludge*, %struct.ic_kludge** %5
%9 = icmp ne %struct.ic_kludge* %8, null
br i1 %9, label %12, label %10
10: ; preds = %3
%11 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %4
br label %23
12: ; preds = %3
%13 = load %struct.ic_decl_type*, %struct.ic_decl_type** %6
%14 = icmp ne %struct.ic_decl_type* %13, null
br i1 %14, label %17, label %15
15: ; preds = %12
%16 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %4
br label %23
17: ; preds = %12
%18 = load i32*, i32** %7
%19 = icmp ne i32* %18, null
br i1 %19, label %22, label %20
20: ; preds = %17
%21 = call i32 @puts(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %4
br label %23
22: ; preds = %17
store i32 1, i32* %4
br label %23
23: ; preds = %22, %20, %15, %10
%24 = load i32, i32* %4
ret i32 %24
}

LLVM IR (-O2):
%struct.ic_kludge = type { i32 }
%struct.ic_decl_type = type { i32 }
@.str = [43 x i8] c"ic_b2c_compile_types_body: kludge was null\00"
@.str.1 = [42 x i8] c"ic_b2c_compile_types_body: tdecl was null\00"
@.str.2 = [41 x i8] c"ic_b2c_compile_types_body: file was null\00"
define i32 @ic_b2c_compile_type_body(%struct.ic_kludge* readnone %0, %struct.ic_decl_type* readnone %1, i32* readnone %2) {
%4 = icmp eq %struct.ic_kludge* %0, null
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = icmp eq %struct.ic_decl_type* %1, null
br i1 %6, label %9, label %7
7: ; preds = %5
%8 = icmp eq i32* %2, null
br i1 %8, label %9, label %12
9: ; preds = %7, %5, %3
%10 = phi i8* [ getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), %3 ], [ getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), %5 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0), %7 ]
%11 = tail call i32 @puts(i8* dereferenceable(1) %10)
br label %12
12: ; preds = %9, %7
%13 = phi i32 [ 1, %7 ], [ 0, %9 ]
ret i32 %13
}