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

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
scalar_t__ xbf_initialized(struct xbf *);
int /*<<< orphan*/ xbf_print_fp(int /*<<< orphan*/, struct xbf *);
void xbf_print(struct xbf *xbf) {
  do {
    assert(xbf != NULL && "xbf can't be NULL here");
    assert(xbf_initialized(xbf) != 0 && "xbf_initialized() must be called");
  } while (0);
  xbf_print_fp(stdout, xbf);
}


x86 assembly (clang, -O0):
<xbf_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1156 <xbf_print+0x26>
mov    $0x1,%al
mov    %al,-0x9(%rbp)
jmp    1156 <xbf_print+0x26>
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1050 <xbf_initialized@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0xa(%rbp)
je     1188 <xbf_print+0x58>
mov    $0x1,%al
mov    %al,-0xa(%rbp)
jmp    1188 <xbf_print+0x58>
mov    -0xa(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2e44(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <xbf_print_fp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xbf_print>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1050 <xbf_initialized@plt>
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1040 <assert@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <xbf_print_fp@plt>

LLVM IR (-O0):
%struct.xbf = type { i32 }
@.str = [23 x i8] c"xbf can't be NULL here\00"
@.str.1 = [33 x i8] c"xbf_initialized() must be called\00"
@stdout = global i32 0
define void @xbf_print(%struct.xbf* %0) {
%2 = alloca %struct.xbf*
store %struct.xbf* %0, %struct.xbf** %2
br label %3
3: ; preds = %1
%4 = load %struct.xbf*, %struct.xbf** %2
%5 = icmp ne %struct.xbf* %4, null
br i1 %5, label %6, label %7
6: ; preds = %3
br label %7
7: ; preds = %6, %3
%8 = phi i1 [ false, %3 ], [ true, %6 ]
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load %struct.xbf*, %struct.xbf** %2
%12 = call i64 @xbf_initialized(%struct.xbf* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %7
br label %15
15: ; preds = %14, %7
%16 = phi i1 [ false, %7 ], [ true, %14 ]
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
br label %19
19: ; preds = %15
%20 = load i32, i32* @stdout
%21 = load %struct.xbf*, %struct.xbf** %2
%22 = call i32 @xbf_print_fp(i32 %20, %struct.xbf* %21)
ret void
}

LLVM IR (-O2):
%struct.xbf = type { i32 }
@stdout = global i32 0
define void @xbf_print(%struct.xbf* %0) {
%2 = icmp ne %struct.xbf* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i64 @xbf_initialized(%struct.xbf* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = load i32, i32* @stdout
%10 = tail call i32 @xbf_print_fp(i32 %9, %struct.xbf* %0)
ret void
}