#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 */

/* Variables and functions */
int FindMatches(char *, char *, char ***);
scalar_t__ SplitPath(char *, char **, char **);
int /*<<< orphan*/ free(char *);
int el_filename_list_possib(char *pathname, char ***av) {
  char *dir;
  char *file;
  int ac;
  if (SplitPath(pathname, &dir, &file) < 0)
    return 0;
  ac = FindMatches(dir, file, av);
  free(dir);
  free(file);
  return ac;
}


x86 assembly (clang, -O0):
<el_filename_list_possib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x28(%rbp),%rdx
call   1050 <SplitPath@plt>
cmp    $0x0,%rax
jge    1167 <el_filename_list_possib+0x37>
movl   $0x0,-0x4(%rbp)
jmp    1193 <el_filename_list_possib+0x63>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <FindMatches@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<el_filename_list_possib>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <SplitPath@plt>
test   %rax,%rax
js     1172 <el_filename_list_possib+0x42>
mov    0x8(%rsp),%rdi
mov    (%rsp),%rsi
mov    %rbx,%rdx
call   1040 <FindMatches@plt>
mov    %eax,%ebx
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
jmp    1174 <el_filename_list_possib+0x44>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @el_filename_list_possib(i8* %0, i8*** %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8***
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %4
store i8*** %1, i8**** %5
%9 = load i8*, i8** %4
%10 = call i64 @SplitPath(i8* %9, i8** %6, i8** %7)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 0, i32* %3
br label %23
13: ; preds = %2
%14 = load i8*, i8** %6
%15 = load i8*, i8** %7
%16 = load i8***, i8**** %5
%17 = call i32 @FindMatches(i8* %14, i8* %15, i8*** %16)
store i32 %17, i32* %8
%18 = load i8*, i8** %6
%19 = call i32 @free(i8* %18)
%20 = load i8*, i8** %7
%21 = call i32 @free(i8* %20)
%22 = load i32, i32* %8
store i32 %22, i32* %3
br label %23
23: ; preds = %13, %12
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @el_filename_list_possib(i8* %0, i8*** %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = bitcast i8** %3 to i8*
%6 = bitcast i8** %4 to i8*
%7 = call i64 @SplitPath(i8* %0, i8** %3, i8** %4)
%8 = icmp slt i64 %7, 0
br i1 %8, label %17, label %9
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i32 @FindMatches(i8* %10, i8* %11, i8*** %1)
%13 = load i8*, i8** %3
%14 = call i32 @free(i8* %13)
%15 = load i8*, i8** %4
%16 = call i32 @free(i8* %15)
br label %17
17: ; preds = %2, %9
%18 = phi i32 [ %12, %9 ], [ 0, %2 ]
ret i32 %18
}