#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 */
scalar_t__ matches(char const *, char *);
char *path_getextension(char const *);
scalar_t__ prj_is_buildaction(int /*<<< orphan*/ *);
int /*<<< orphan*/ prj_select_file(char const *);
int /*<<< orphan*/ prj_set_buildaction(char *);
const char *assignContentFiles(const char *name) {
  const char *ext = path_getextension(name);
  prj_select_file(name);
  if (prj_is_buildaction(NULL) &&
      (matches(ext, ".asax") || matches(ext, ".aspx")))
    prj_set_buildaction("Content");
  return NULL;
}


x86 assembly (clang, -O0):
<assignContentFiles>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <path_getextension@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <prj_select_file@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1060 <prj_is_buildaction@plt>
cmp    $0x0,%rax
je     11c5 <assignContentFiles+0x75>
mov    -0x10(%rbp),%rdi
lea    0xe70(%rip),%rsi
call   1040 <matches@plt>
cmp    $0x0,%rax
jne    11b9 <assignContentFiles+0x69>
mov    -0x10(%rbp),%rdi
lea    0xe5c(%rip),%rsi
call   1040 <matches@plt>
cmp    $0x0,%rax
je     11c5 <assignContentFiles+0x75>
lea    0xe4c(%rip),%rdi
call   1070 <prj_set_buildaction@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assignContentFiles>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1050 <path_getextension@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <prj_select_file@plt>
xor    %edi,%edi
call   1060 <prj_is_buildaction@plt>
test   %rax,%rax
je     11a7 <assignContentFiles+0x57>
lea    0xe86(%rip),%rsi
mov    %r14,%rdi
call   1040 <matches@plt>
test   %rax,%rax
jne    119b <assignContentFiles+0x4b>
lea    0xe78(%rip),%rsi
mov    %r14,%rdi
call   1040 <matches@plt>
test   %rax,%rax
je     11a7 <assignContentFiles+0x57>
lea    0xe6a(%rip),%rdi
call   1070 <prj_set_buildaction@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c".asax\00"
@.str.1 = [6 x i8] c".aspx\00"
@.str.2 = [8 x i8] c"Content\00"
define i8* @assignContentFiles(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @path_getextension(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %2
%7 = call i32 @prj_select_file(i8* %6)
%8 = call i64 @prj_is_buildaction(i32* null)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %20
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = call i64 @matches(i8* %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%13 = icmp ne i64 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8*, i8** %3
%16 = call i64 @matches(i8* %15, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %14, %10
%19 = call i32 @prj_set_buildaction(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %20
20: ; preds = %18, %14, %1
ret i8* null
}

LLVM IR (-O2):
@.str = [6 x i8] c".asax\00"
@.str.1 = [6 x i8] c".aspx\00"
@.str.2 = [8 x i8] c"Content\00"
define noalias i8* @assignContentFiles(i8* %0) {
%2 = tail call i8* @path_getextension(i8* %0)
%3 = tail call i32 @prj_select_file(i8* %0)
%4 = tail call i64 @prj_is_buildaction(i32* null)
%5 = icmp eq i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = tail call i64 @matches(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = tail call i64 @matches(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %9, %6
%13 = tail call i32 @prj_set_buildaction(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %9, %1
ret i8* null
}