#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 nameidata {
  int dummy;
};
struct dentry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ lock_dentry(struct dentry *);
int /*<<< orphan*/ print_entry_location();
int /*<<< orphan*/ print_exit_status(int);
int unionfs_d_revalidate(struct dentry *, struct nameidata *);
int /*<<< orphan*/ unlock_dentry(struct dentry *);
int unionfs_d_revalidate_wrap(struct dentry *dentry, struct nameidata *nd) {
  int err;
  print_entry_location();
  lock_dentry(dentry);
  err = unionfs_d_revalidate(dentry, nd);
  unlock_dentry(dentry);
  print_exit_status(err);
  return err;
}


x86 assembly (clang, -O0):
<unionfs_d_revalidate_wrap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <print_entry_location@plt>
mov    -0x8(%rbp),%rdi
call   1070 <lock_dentry@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <unionfs_d_revalidate@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <unlock_dentry@plt>
mov    -0x14(%rbp),%edi
call   1060 <print_exit_status@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unionfs_d_revalidate_wrap>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <print_entry_location@plt>
mov    %rbx,%rdi
call   1070 <lock_dentry@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <unionfs_d_revalidate@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <unlock_dentry@plt>
mov    %ebp,%edi
call   1060 <print_exit_status@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.dentry = type { i32 }
%struct.nameidata = type { i32 }
define i32 @unionfs_d_revalidate_wrap(%struct.dentry* %0, %struct.nameidata* %1) {
%3 = alloca %struct.dentry*
%4 = alloca %struct.nameidata*
%5 = alloca i32
store %struct.dentry* %0, %struct.dentry** %3
store %struct.nameidata* %1, %struct.nameidata** %4
%6 = call i32 (...) @print_entry_location()
%7 = load %struct.dentry*, %struct.dentry** %3
%8 = call i32 @lock_dentry(%struct.dentry* %7)
%9 = load %struct.dentry*, %struct.dentry** %3
%10 = load %struct.nameidata*, %struct.nameidata** %4
%11 = call i32 @unionfs_d_revalidate(%struct.dentry* %9, %struct.nameidata* %10)
store i32 %11, i32* %5
%12 = load %struct.dentry*, %struct.dentry** %3
%13 = call i32 @unlock_dentry(%struct.dentry* %12)
%14 = load i32, i32* %5
%15 = call i32 @print_exit_status(i32 %14)
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
%struct.dentry = type { i32 }
%struct.nameidata = type { i32 }
define i32 @unionfs_d_revalidate_wrap(%struct.dentry* %0, %struct.nameidata* %1) {
%3 = tail call i32 (...) @print_entry_location()
%4 = tail call i32 @lock_dentry(%struct.dentry* %0)
%5 = tail call i32 @unionfs_d_revalidate(%struct.dentry* %0, %struct.nameidata* %1)
%6 = tail call i32 @unlock_dentry(%struct.dentry* %0)
%7 = tail call i32 @print_exit_status(i32 %5)
ret i32 %5
}