#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 stat {
  int dummy;
};

/* Variables and functions */
#define FTW_F 128
int /*<<< orphan*/ isVideoFile(char const *);
int /*<<< orphan*/ isVisible(char const *);
int /*<<< orphan*/ processFile(char const *, struct stat const *);
int processEntry(const char *path, const struct stat *fileStat,
                 const int typeflag) {
  switch (typeflag) {
  case FTW_F:
    if (isVisible(path) && isVideoFile(path)) {
      processFile(&path[1], fileStat);
    }
    break;
  default:
    break;
  }
  return (0);
}


x86 assembly (clang, -O0):
<processEntry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x80,%eax
jne    1190 <processEntry+0x60>
jmp    1156 <processEntry+0x26>
mov    -0x8(%rbp),%rdi
call   1050 <isVisible@plt>
cmp    $0x0,%eax
je     118b <processEntry+0x5b>
mov    -0x8(%rbp),%rdi
call   1040 <isVideoFile@plt>
cmp    $0x0,%eax
je     118b <processEntry+0x5b>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <processFile@plt>
jmp    1195 <processEntry+0x65>
jmp    1195 <processEntry+0x65>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processEntry>:
push   %r14
push   %rbx
push   %rax
cmp    $0x80,%edx
jne    1166 <processEntry+0x36>
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <isVisible@plt>
test   %eax,%eax
je     1166 <processEntry+0x36>
mov    %rbx,%rdi
call   1040 <isVideoFile@plt>
test   %eax,%eax
je     1166 <processEntry+0x36>
add    $0x1,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <processFile@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @processEntry(i8* %0, %struct.stat* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca %struct.stat*
%6 = alloca i32
store i8* %0, i8** %4
store %struct.stat* %1, %struct.stat** %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
switch i32 %7, label %22 [
i32 128, label %8
]
8: ; preds = %3
%9 = load i8*, i8** %4
%10 = call i32 @isVisible(i8* %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = load i8*, i8** %4
%14 = call i32 @isVideoFile(i8* %13)
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 1
%19 = load %struct.stat*, %struct.stat** %5
%20 = call i32 @processFile(i8* %18, %struct.stat* %19)
br label %21
21: ; preds = %16, %12, %8
br label %23
22: ; preds = %3
br label %23
23: ; preds = %22, %21
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @processEntry(i8* %0, %struct.stat* %1, i32 %2) {
%4 = icmp eq i32 %2, 128
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = tail call i32 @isVisible(i8* %0)
%7 = icmp eq i32 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %5
%9 = tail call i32 @isVideoFile(i8* %0)
%10 = icmp eq i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = getelementptr inbounds i8, i8* %0, i64 1
%13 = tail call i32 @processFile(i8* %12, %struct.stat* %1)
br label %14
14: ; preds = %3, %5, %8, %11
ret i32 0
}