#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 qstr {
  int dummy;
};
struct inode {
  int dummy;
};

/* Variables and functions */
int hfsplus_init_acl(struct inode *, struct inode *);
int hfsplus_init_security(struct inode *, struct inode *, struct qstr const *);
int hfsplus_init_inode_security(struct inode *inode, struct inode *dir,
                                const struct qstr *qstr) {
  int err;
  err = hfsplus_init_acl(inode, dir);
  if (!err)
    err = hfsplus_init_security(inode, dir, qstr);
  return err;
}


x86 assembly (clang, -O0):
<hfsplus_init_inode_security>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <hfsplus_init_acl@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1162 <hfsplus_init_inode_security+0x42>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <hfsplus_init_security@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hfsplus_init_inode_security>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <hfsplus_init_acl@plt>
test   %eax,%eax
je     113d <hfsplus_init_inode_security+0x1d>
pop    %rbx
pop    %r14
pop    %r15
ret
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <hfsplus_init_security@plt>

LLVM IR (-O0):
%struct.inode = type { i32 }
%struct.qstr = type { i32 }
define i32 @hfsplus_init_inode_security(%struct.inode* %0, %struct.inode* %1, %struct.qstr* %2) {
%4 = alloca %struct.inode*
%5 = alloca %struct.inode*
%6 = alloca %struct.qstr*
%7 = alloca i32
store %struct.inode* %0, %struct.inode** %4
store %struct.inode* %1, %struct.inode** %5
store %struct.qstr* %2, %struct.qstr** %6
%8 = load %struct.inode*, %struct.inode** %4
%9 = load %struct.inode*, %struct.inode** %5
%10 = call i32 @hfsplus_init_acl(%struct.inode* %8, %struct.inode* %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = icmp ne i32 %11, 0
br i1 %12, label %18, label %13
13: ; preds = %3
%14 = load %struct.inode*, %struct.inode** %4
%15 = load %struct.inode*, %struct.inode** %5
%16 = load %struct.qstr*, %struct.qstr** %6
%17 = call i32 @hfsplus_init_security(%struct.inode* %14, %struct.inode* %15, %struct.qstr* %16)
store i32 %17, i32* %7
br label %18
18: ; preds = %13, %3
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
%struct.inode = type { i32 }
%struct.qstr = type { i32 }
define i32 @hfsplus_init_inode_security(%struct.inode* %0, %struct.inode* %1, %struct.qstr* %2) {
%4 = tail call i32 @hfsplus_init_acl(%struct.inode* %0, %struct.inode* %1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @hfsplus_init_security(%struct.inode* %0, %struct.inode* %1, %struct.qstr* %2)
br label %8
8: ; preds = %6, %3
%9 = phi i32 [ %4, %3 ], [ %7, %6 ]
ret i32 %9
}