#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 */
typedef int /*<<< orphan*/ list_ext;

/* Variables and functions */
int check_path_against_extension_list(char const *, char const **, int);
int is_path_video_file(const char *path) {
  const char *list_ext[] = {"avi", "mp4", "mkv", "mov", "webm", "m2ts", "flv"};
  return check_path_against_extension_list(path, list_ext,
                                           sizeof(list_ext) / sizeof(char *));
}


x86 assembly (clang, -O0):
<is_path_video_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
lea    0x2ca9(%rip),%rsi
mov    $0x38,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x7,%edx
call   1040 <check_path_against_extension_list@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_path_video_file>:
sub    $0x38,%rsp
mov    0x2cf5(%rip),%rax
mov    %rax,0x30(%rsp)
movaps 0x2cd9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x2cbd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2ca1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x7,%edx
call   1030 <check_path_against_extension_list@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"avi\00"
@.str.1 = [4 x i8] c"mp4\00"
@.str.2 = [4 x i8] c"mkv\00"
@.str.3 = [4 x i8] c"mov\00"
@.str.4 = [5 x i8] c"webm\00"
@.str.5 = [5 x i8] c"m2ts\00"
@.str.6 = [4 x i8] c"flv\00"
@__const.is_path_video_file.list_ext = [7 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0)]
define i32 @is_path_video_file(i8* %0) {
%2 = alloca i8*
%3 = alloca [7 x i8*]
store i8* %0, i8** %2
%4 = bitcast [7 x i8*]* %3 to i8*
%5 = load i8*, i8** %2
%6 = getelementptr inbounds [7 x i8*], [7 x i8*]* %3, i64 0, i64 0
%7 = call i32 @check_path_against_extension_list(i8* %5, i8** %6, i32 7)
ret i32 %7
}

LLVM IR (-O2):
@.str = [4 x i8] c"avi\00"
@.str.1 = [4 x i8] c"mp4\00"
@.str.2 = [4 x i8] c"mkv\00"
@.str.3 = [4 x i8] c"mov\00"
@.str.4 = [5 x i8] c"webm\00"
@.str.5 = [5 x i8] c"m2ts\00"
@.str.6 = [4 x i8] c"flv\00"
@__const.is_path_video_file.list_ext = [7 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0)]
define i32 @is_path_video_file(i8* %0) {
%2 = alloca [7 x i8*]
%3 = bitcast [7 x i8*]* %2 to i8*
%4 = getelementptr inbounds [7 x i8*], [7 x i8*]* %2, i64 0, i64 0
%5 = call i32 @check_path_against_extension_list(i8* %0, i8** %4, i32 7)
ret i32 %5
}