#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 /*<<< orphan*/ mlt_environment_set(char *, char *);
scalar_t__ strstr(char const *, char *);
void set_mlt_normalisation(const char *profile_name) {
  if (profile_name) {
    if (strstr(profile_name, "_ntsc") || strstr(profile_name, "_60") ||
        strstr(profile_name, "_5994") || strstr(profile_name, "_2997") ||
        strstr(profile_name, "_30")) {
      mlt_environment_set("MLT_NORMALISATION", "NTSC");
    } else if (strstr(profile_name, "_pal") || strstr(profile_name, "_50") ||
               strstr(profile_name, "_25")) {
      mlt_environment_set("MLT_NORMALISATION", "PAL");
    }
  }
}


x86 assembly (clang, -O0):
<set_mlt_normalisation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     123c <set_mlt_normalisation+0x11c>
mov    -0x8(%rbp),%rdi
lea    0xebe(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
jne    11b9 <set_mlt_normalisation+0x99>
mov    -0x8(%rbp),%rdi
lea    0xeaa(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
jne    11b9 <set_mlt_normalisation+0x99>
mov    -0x8(%rbp),%rdi
lea    0xe94(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
jne    11b9 <set_mlt_normalisation+0x99>
mov    -0x8(%rbp),%rdi
lea    0xe80(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
jne    11b9 <set_mlt_normalisation+0x99>
mov    -0x8(%rbp),%rdi
lea    0xe6c(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     11d1 <set_mlt_normalisation+0xb1>
lea    0xe5a(%rip),%rdi
lea    0xe65(%rip),%rsi
call   1030 <mlt_environment_set@plt>
jmp    1237 <set_mlt_normalisation+0x117>
mov    -0x8(%rbp),%rdi
lea    0xe55(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
jne    121f <set_mlt_normalisation+0xff>
mov    -0x8(%rbp),%rdi
lea    0xe40(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
jne    121f <set_mlt_normalisation+0xff>
mov    -0x8(%rbp),%rdi
lea    0xe2a(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1232 <set_mlt_normalisation+0x112>
lea    0xdf4(%rip),%rdi
lea    0xe11(%rip),%rsi
call   1030 <mlt_environment_set@plt>
jmp    1237 <set_mlt_normalisation+0x117>
jmp    123c <set_mlt_normalisation+0x11c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_mlt_normalisation>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     11f5 <set_mlt_normalisation+0xd5>
mov    %rdi,%rbx
lea    0xec9(%rip),%rsi
call   1040 <strstr@plt>
lea    0xee9(%rip),%r14
test   %rax,%rax
jne    11df <set_mlt_normalisation+0xbf>
lea    0xeb3(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
jne    11df <set_mlt_normalisation+0xbf>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
jne    11df <set_mlt_normalisation+0xbf>
lea    0xe95(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
jne    11df <set_mlt_normalisation+0xbf>
lea    0xe87(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
jne    11df <set_mlt_normalisation+0xbf>
lea    0xe8e(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
lea    0xe8c(%rip),%r14
test   %rax,%rax
jne    11df <set_mlt_normalisation+0xbf>
lea    0xe78(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
jne    11df <set_mlt_normalisation+0xbf>
lea    0xe68(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     11f5 <set_mlt_normalisation+0xd5>
lea    0xe34(%rip),%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <mlt_environment_set@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"_ntsc\00"
@.str.1 = [4 x i8] c"_60\00"
@.str.2 = [6 x i8] c"_5994\00"
@.str.3 = [6 x i8] c"_2997\00"
@.str.4 = [4 x i8] c"_30\00"
@.str.5 = [18 x i8] c"MLT_NORMALISATION\00"
@.str.6 = [5 x i8] c"NTSC\00"
@.str.7 = [5 x i8] c"_pal\00"
@.str.8 = [4 x i8] c"_50\00"
@.str.9 = [4 x i8] c"_25\00"
@.str.10 = [4 x i8] c"PAL\00"
define void @set_mlt_normalisation(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %43
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i64 @strstr(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i64 %7, 0
br i1 %8, label %25, label %9
9: ; preds = %5
%10 = load i8*, i8** %2
%11 = call i64 @strstr(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp ne i64 %11, 0
br i1 %12, label %25, label %13
13: ; preds = %9
%14 = load i8*, i8** %2
%15 = call i64 @strstr(i8* %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%16 = icmp ne i64 %15, 0
br i1 %16, label %25, label %17
17: ; preds = %13
%18 = load i8*, i8** %2
%19 = call i64 @strstr(i8* %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%20 = icmp ne i64 %19, 0
br i1 %20, label %25, label %21
21: ; preds = %17
%22 = load i8*, i8** %2
%23 = call i64 @strstr(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %21, %17, %13, %9, %5
%26 = call i32 @mlt_environment_set(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %42
27: ; preds = %21
%28 = load i8*, i8** %2
%29 = call i64 @strstr(i8* %28, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%30 = icmp ne i64 %29, 0
br i1 %30, label %39, label %31
31: ; preds = %27
%32 = load i8*, i8** %2
%33 = call i64 @strstr(i8* %32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%34 = icmp ne i64 %33, 0
br i1 %34, label %39, label %35
35: ; preds = %31
%36 = load i8*, i8** %2
%37 = call i64 @strstr(i8* %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %35, %31, %27
%40 = call i32 @mlt_environment_set(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
br label %41
41: ; preds = %39, %35
br label %42
42: ; preds = %41, %25
br label %43
43: ; preds = %42, %1
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"_ntsc\00"
@.str.1 = [4 x i8] c"_60\00"
@.str.2 = [6 x i8] c"_5994\00"
@.str.3 = [6 x i8] c"_2997\00"
@.str.4 = [4 x i8] c"_30\00"
@.str.5 = [18 x i8] c"MLT_NORMALISATION\00"
@.str.6 = [5 x i8] c"NTSC\00"
@.str.7 = [5 x i8] c"_pal\00"
@.str.8 = [4 x i8] c"_50\00"
@.str.9 = [4 x i8] c"_25\00"
@.str.10 = [4 x i8] c"PAL\00"
define void @set_mlt_normalisation(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %30, label %3
3: ; preds = %1
%4 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %27
6: ; preds = %3
%7 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %27
9: ; preds = %6
%10 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %27
12: ; preds = %9
%13 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %27
15: ; preds = %12
%16 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %27
18: ; preds = %15
%19 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %27
21: ; preds = %18
%22 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %18, %21, %24, %3, %6, %9, %12, %15
%28 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), %15 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), %12 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), %9 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), %6 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), %3 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), %24 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), %21 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), %18 ]
%29 = tail call i32 @mlt_environment_set(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8* %28)
br label %30
30: ; preds = %27, %24, %1
ret void
}