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

/* Variables and functions */
int /*<<< orphan*/ DLNPair(struct dentry *);
int /*<<< orphan*/ LKTRTrace(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ TraceErr(int);
int au_is_subdir(struct dentry *, struct dentry *);
int do_is_overlap(struct super_block *sb, struct dentry *hidden_d1,
                  struct dentry *hidden_d2) {
  int err;
  LKTRTrace("%.*s, %.*s\n", DLNPair(hidden_d1), DLNPair(hidden_d2));
  err = au_is_subdir(hidden_d1, hidden_d2);
  TraceErr(err);
  return err;
}


x86 assembly (clang, -O0):
<do_is_overlap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <DLNPair@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <DLNPair@plt>
mov    -0x20(%rbp),%esi
mov    %eax,%edx
lea    0xe8b(%rip),%rdi
call   1060 <LKTRTrace@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <au_is_subdir@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1050 <TraceErr@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_is_overlap>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rsi,%rdi
call   1030 <DLNPair@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1030 <DLNPair@plt>
lea    0xe9d(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1060 <LKTRTrace@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <au_is_subdir@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1050 <TraceErr@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.super_block = type { i32 }
%struct.dentry = type { i32 }
@.str = [12 x i8] c"%.*s, %.*s\0A\00"
define i32 @do_is_overlap(%struct.super_block* %0, %struct.dentry* %1, %struct.dentry* %2) {
%4 = alloca %struct.super_block*
%5 = alloca %struct.dentry*
%6 = alloca %struct.dentry*
%7 = alloca i32
store %struct.super_block* %0, %struct.super_block** %4
store %struct.dentry* %1, %struct.dentry** %5
store %struct.dentry* %2, %struct.dentry** %6
%8 = load %struct.dentry*, %struct.dentry** %5
%9 = call i32 @DLNPair(%struct.dentry* %8)
%10 = load %struct.dentry*, %struct.dentry** %6
%11 = call i32 @DLNPair(%struct.dentry* %10)
%12 = call i32 @LKTRTrace(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %11)
%13 = load %struct.dentry*, %struct.dentry** %5
%14 = load %struct.dentry*, %struct.dentry** %6
%15 = call i32 @au_is_subdir(%struct.dentry* %13, %struct.dentry* %14)
store i32 %15, i32* %7
%16 = load i32, i32* %7
%17 = call i32 @TraceErr(i32 %16)
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
%struct.super_block = type { i32 }
%struct.dentry = type { i32 }
@.str = [12 x i8] c"%.*s, %.*s\0A\00"
define i32 @do_is_overlap(%struct.super_block* nocapture readnone %0, %struct.dentry* %1, %struct.dentry* %2) {
%4 = tail call i32 @DLNPair(%struct.dentry* %1)
%5 = tail call i32 @DLNPair(%struct.dentry* %2)
%6 = tail call i32 @LKTRTrace(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = tail call i32 @au_is_subdir(%struct.dentry* %1, %struct.dentry* %2)
%8 = tail call i32 @TraceErr(i32 %7)
ret i32 %7
}