#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__ strcmp(char *, char *);
int /*<<< orphan*/ stringToUpper(char *);
char *estensione2Linguaggio(char *sEstensione) {
  char *sRet;
  stringToUpper(sEstensione);
  if (strcmp(sEstensione, "C") == 0)
    sRet = "C";
  else if ((strcmp(sEstensione, "O") == 0) || (strcmp(sEstensione, "OUT") == 0))
    sRet = "C (binary)";
  else if ((strcmp(sEstensione, "H") == 0))
    sRet = "C";
  else if ((strcmp(sEstensione, "CONF") == 0))
    sRet = "Config file";
  else if ((strcmp(sEstensione, "PHP") == 0))
    sRet = "Php";
  else if ((strcmp(sEstensione, "HTML") == 0))
    sRet = "Html";
  else if ((strcmp(sEstensione, "JS") == 0))
    sRet = "Javascript";
  else if ((strcmp(sEstensione, "JAVA") == 0))
    sRet = "Java";
  else if ((strcmp(sEstensione, "PY") == 0))
    sRet = "Python";
  else
    sRet = "Unknown";
  return sRet;
}


x86 assembly (clang, -O0):
<estensione2Linguaggio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <stringToUpper@plt>
mov    -0x8(%rbp),%rdi
lea    0xec0(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    115f <estensione2Linguaggio+0x3f>
lea    0xeaa(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12fc <estensione2Linguaggio+0x1dc>
mov    -0x8(%rbp),%rdi
lea    0xe98(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     1193 <estensione2Linguaggio+0x73>
mov    -0x8(%rbp),%rdi
lea    0xe80(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11a3 <estensione2Linguaggio+0x83>
lea    0xe6e(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f7 <estensione2Linguaggio+0x1d7>
mov    -0x8(%rbp),%rdi
lea    0xe65(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11cd <estensione2Linguaggio+0xad>
lea    0xe3c(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f2 <estensione2Linguaggio+0x1d2>
mov    -0x8(%rbp),%rdi
lea    0xe3d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11f7 <estensione2Linguaggio+0xd7>
lea    0xe2c(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ed <estensione2Linguaggio+0x1cd>
mov    -0x8(%rbp),%rdi
lea    0xe24(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1221 <estensione2Linguaggio+0x101>
lea    0xe12(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12e8 <estensione2Linguaggio+0x1c8>
mov    -0x8(%rbp),%rdi
lea    0xe02(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    124b <estensione2Linguaggio+0x12b>
lea    0xdf1(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12e3 <estensione2Linguaggio+0x1c3>
mov    -0x8(%rbp),%rdi
lea    0xde2(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1275 <estensione2Linguaggio+0x155>
lea    0xdcf(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12de <estensione2Linguaggio+0x1be>
mov    -0x8(%rbp),%rdi
lea    0xdc6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    129f <estensione2Linguaggio+0x17f>
lea    0xdb5(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12d9 <estensione2Linguaggio+0x1b9>
mov    -0x8(%rbp),%rdi
lea    0xda6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    12c9 <estensione2Linguaggio+0x1a9>
lea    0xd93(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12d4 <estensione2Linguaggio+0x1b4>
lea    0xd8a(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12d9 <estensione2Linguaggio+0x1b9>
jmp    12de <estensione2Linguaggio+0x1be>
jmp    12e3 <estensione2Linguaggio+0x1c3>
jmp    12e8 <estensione2Linguaggio+0x1c8>
jmp    12ed <estensione2Linguaggio+0x1cd>
jmp    12f2 <estensione2Linguaggio+0x1d2>
jmp    12f7 <estensione2Linguaggio+0x1d7>
jmp    12fc <estensione2Linguaggio+0x1dc>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estensione2Linguaggio>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1040 <stringToUpper@plt>
lea    0xecc(%rip),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1228 <estensione2Linguaggio+0x108>
lea    0xeb3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
lea    0xeaa(%rip),%r14
test   %rax,%rax
je     122b <estensione2Linguaggio+0x10b>
lea    0xe96(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     122b <estensione2Linguaggio+0x10b>
lea    0xe8d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %r15,%r14
test   %rax,%rax
je     122b <estensione2Linguaggio+0x10b>
lea    0xe74(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1234 <estensione2Linguaggio+0x114>
lea    0xe6d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     123d <estensione2Linguaggio+0x11d>
lea    0xe61(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1246 <estensione2Linguaggio+0x126>
lea    0xe57(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     124f <estensione2Linguaggio+0x12f>
lea    0xe51(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1258 <estensione2Linguaggio+0x138>
lea    0xe47(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
lea    0xe38(%rip),%rax
lea    0xe38(%rip),%r14
cmove  %rax,%r14
jmp    122b <estensione2Linguaggio+0x10b>
mov    %r15,%r14
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xddf(%rip),%r14
jmp    122b <estensione2Linguaggio+0x10b>
lea    0xde6(%rip),%r14
jmp    122b <estensione2Linguaggio+0x10b>
lea    0xde6(%rip),%r14
jmp    122b <estensione2Linguaggio+0x10b>
lea    0xde5(%rip),%r14
jmp    122b <estensione2Linguaggio+0x10b>
lea    0xdec(%rip),%r14
jmp    122b <estensione2Linguaggio+0x10b>

LLVM IR (-O0):
@.str = [2 x i8] c"C\00"
@.str.1 = [2 x i8] c"O\00"
@.str.2 = [4 x i8] c"OUT\00"
@.str.3 = [11 x i8] c"C (binary)\00"
@.str.4 = [2 x i8] c"H\00"
@.str.5 = [5 x i8] c"CONF\00"
@.str.6 = [12 x i8] c"Config file\00"
@.str.7 = [4 x i8] c"PHP\00"
@.str.8 = [4 x i8] c"Php\00"
@.str.9 = [5 x i8] c"HTML\00"
@.str.10 = [5 x i8] c"Html\00"
@.str.11 = [3 x i8] c"JS\00"
@.str.12 = [11 x i8] c"Javascript\00"
@.str.13 = [5 x i8] c"JAVA\00"
@.str.14 = [5 x i8] c"Java\00"
@.str.15 = [3 x i8] c"PY\00"
@.str.16 = [7 x i8] c"Python\00"
@.str.17 = [8 x i8] c"Unknown\00"
define i8* @estensione2Linguaggio(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stringToUpper(i8* %4)
%6 = load i8*, i8** %2
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %3
br label %63
10: ; preds = %1
%11 = load i8*, i8** %2
%12 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8*, i8** %2
%16 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %14, %10
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %62
19: ; preds = %14
%20 = load i8*, i8** %2
%21 = call i64 @strcmp(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %19
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %3
br label %61
24: ; preds = %19
%25 = load i8*, i8** %2
%26 = call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %24
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %60
29: ; preds = %24
%30 = load i8*, i8** %2
%31 = call i64 @strcmp(i8* %30, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %29
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %59
34: ; preds = %29
%35 = load i8*, i8** %2
%36 = call i64 @strcmp(i8* %35, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %39
38: ; preds = %34
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8** %3
br label %58
39: ; preds = %34
%40 = load i8*, i8** %2
%41 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %44
43: ; preds = %39
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i8** %3
br label %57
44: ; preds = %39
%45 = load i8*, i8** %2
%46 = call i64 @strcmp(i8* %45, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %49
48: ; preds = %44
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i8** %3
br label %56
49: ; preds = %44
%50 = load i8*, i8** %2
%51 = call i64 @strcmp(i8* %50, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0))
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %54
53: ; preds = %49
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i8** %3
br label %55
54: ; preds = %49
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0), i8** %3
br label %55
55: ; preds = %54, %53
br label %56
56: ; preds = %55, %48
br label %57
57: ; preds = %56, %43
br label %58
58: ; preds = %57, %38
br label %59
59: ; preds = %58, %33
br label %60
60: ; preds = %59, %28
br label %61
61: ; preds = %60, %23
br label %62
62: ; preds = %61, %18
br label %63
63: ; preds = %62, %9
%64 = load i8*, i8** %3
ret i8* %64
}

LLVM IR (-O2):
@.str = [2 x i8] c"C\00"
@.str.1 = [2 x i8] c"O\00"
@.str.2 = [4 x i8] c"OUT\00"
@.str.3 = [11 x i8] c"C (binary)\00"
@.str.4 = [2 x i8] c"H\00"
@.str.5 = [5 x i8] c"CONF\00"
@.str.6 = [12 x i8] c"Config file\00"
@.str.7 = [4 x i8] c"PHP\00"
@.str.8 = [4 x i8] c"Php\00"
@.str.9 = [5 x i8] c"HTML\00"
@.str.10 = [5 x i8] c"Html\00"
@.str.11 = [3 x i8] c"JS\00"
@.str.12 = [11 x i8] c"Javascript\00"
@.str.13 = [5 x i8] c"JAVA\00"
@.str.14 = [5 x i8] c"Java\00"
@.str.15 = [3 x i8] c"PY\00"
@.str.16 = [7 x i8] c"Python\00"
@.str.17 = [8 x i8] c"Unknown\00"
define i8* @estensione2Linguaggio(i8* %0) {
%2 = tail call i32 @stringToUpper(i8* %0)
%3 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %33, label %5
5: ; preds = %1
%6 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %33, label %8
8: ; preds = %5
%9 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %33, label %11
11: ; preds = %8
%12 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %33, label %14
14: ; preds = %11
%15 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %33, label %17
17: ; preds = %14
%18 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %33, label %20
20: ; preds = %17
%21 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %33, label %23
23: ; preds = %20
%24 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %33, label %26
26: ; preds = %23
%27 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %33, label %29
29: ; preds = %26
%30 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
%32 = select i1 %31, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0)
br label %33
33: ; preds = %29, %26, %23, %20, %17, %14, %11, %5, %8, %1
%34 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), %8 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %11 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), %14 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), %17 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), %20 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), %23 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), %26 ], [ %32, %29 ]
ret i8* %34
}