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

/* Variables and functions */
int ndb_osdep_setExtraData(struct ndb_s_fileentry *, char const *,
                           int /*<<< orphan*/ *, int, char *);
int /*<<< orphan*/ ndb_unix_setPathAttr(struct ndb_s_fileentry *, char const *);
int ndb_osdep_setMetaData(struct ndb_s_fileentry *pFile,
                          const char *sDefaultPath, FILE *fArchive,
                          int opt_testintegrity, int opt_ignoreextra,
                          char *sText) {
  int retval = 0;
  ndb_unix_setPathAttr(pFile, sDefaultPath);
  if (opt_ignoreextra == 0)
    retval = ndb_osdep_setExtraData(pFile, sDefaultPath, fArchive,
                                    opt_testintegrity, sText);
  return retval;
}


x86 assembly (clang, -O0):
<ndb_osdep_setMetaData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ndb_unix_setPathAttr@plt>
cmpl   $0x0,-0x20(%rbp)
jne    1178 <ndb_osdep_setMetaData+0x58>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
call   1040 <ndb_osdep_setExtraData@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ndb_osdep_setMetaData>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8d,%r13d
mov    %ecx,%r15d
mov    %rdx,%r12
mov    %rsi,%rbp
mov    %rdi,%rbx
call   1030 <ndb_unix_setPathAttr@plt>
test   %r13d,%r13d
je     1158 <ndb_osdep_setMetaData+0x38>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
mov    %r15d,%ecx
mov    %r14,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <ndb_osdep_setExtraData@plt>

LLVM IR (-O0):
%struct.ndb_s_fileentry = type { i32 }
define i32 @ndb_osdep_setMetaData(%struct.ndb_s_fileentry* %0, i8* %1, i32* %2, i32 %3, i32 %4, i8* %5) {
%7 = alloca %struct.ndb_s_fileentry*
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
store %struct.ndb_s_fileentry* %0, %struct.ndb_s_fileentry** %7
store i8* %1, i8** %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i8* %5, i8** %12
store i32 0, i32* %13
%14 = load %struct.ndb_s_fileentry*, %struct.ndb_s_fileentry** %7
%15 = load i8*, i8** %8
%16 = call i32 @ndb_unix_setPathAttr(%struct.ndb_s_fileentry* %14, i8* %15)
%17 = load i32, i32* %11
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %26
19: ; preds = %6
%20 = load %struct.ndb_s_fileentry*, %struct.ndb_s_fileentry** %7
%21 = load i8*, i8** %8
%22 = load i32*, i32** %9
%23 = load i32, i32* %10
%24 = load i8*, i8** %12
%25 = call i32 @ndb_osdep_setExtraData(%struct.ndb_s_fileentry* %20, i8* %21, i32* %22, i32 %23, i8* %24)
store i32 %25, i32* %13
br label %26
26: ; preds = %19, %6
%27 = load i32, i32* %13
ret i32 %27
}

LLVM IR (-O2):
%struct.ndb_s_fileentry = type { i32 }
define i32 @ndb_osdep_setMetaData(%struct.ndb_s_fileentry* %0, i8* %1, i32* %2, i32 %3, i32 %4, i8* %5) {
%7 = tail call i32 @ndb_unix_setPathAttr(%struct.ndb_s_fileentry* %0, i8* %1)
%8 = icmp eq i32 %4, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 @ndb_osdep_setExtraData(%struct.ndb_s_fileentry* %0, i8* %1, i32* %2, i32 %3, i8* %5)
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %10, %9 ], [ 0, %6 ]
ret i32 %12
}