#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*/ strcmp(char *, char *);
int strlen(char *);
char *get_mime_type(char *uri) {
  int len = strlen(uri);
  int dot = len - 1;
  while (dot >= 0 && uri[dot] != '.') {
    dot--;
  }
  if (dot == 0) {
    return NULL;
  }
  if (dot < 0) {
    return "text/html";
  }
  dot++;
  int type_len = len - dot;
  char *type_off = uri + dot;
  switch (type_len) {
  case 4:
    if (!strcmp(type_off, "html") || !strcmp(type_off, "HTML")) {
      return "text/html";
    }
    if (!strcmp(type_off, "jpeg") || !strcmp(type_off, "JPEG")) {
      return "image/jpeg";
    }
    break;
  case 3:
    if (!strcmp(type_off, "htm") || !strcmp(type_off, "HTM")) {
      return "text/html";
    }
    if (!strcmp(type_off, "css") || !strcmp(type_off, "CSS")) {
      return "text/css";
    }
    if (!strcmp(type_off, "png") || !strcmp(type_off, "PNG")) {
      return "image/png";
    }
    if (!strcmp(type_off, "jpg") || !strcmp(type_off, "JPG")) {
      return "image/jpeg";
    }
    if (!strcmp(type_off, "gif") || !strcmp(type_off, "GIF")) {
      return "image/gif";
    }
    if (!strcmp(type_off, "txt") || !strcmp(type_off, "TXT")) {
      return "text/plain";
    }
    break;
  case 2:
    if (!strcmp(type_off, "js") || !strcmp(type_off, "JS")) {
      return "text/javascript";
    }
    break;
  default:
    return "NULL";
    break;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<get_mime_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x18(%rbp)
mov    %al,-0x29(%rbp)
jl     1165 <get_mime_type+0x45>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
setne  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
test   $0x1,%al
jne    1175 <get_mime_type+0x55>
jmp    1183 <get_mime_type+0x63>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1141 <get_mime_type+0x21>
cmpl   $0x0,-0x18(%rbp)
jne    119a <get_mime_type+0x7a>
movq   $0x0,-0x8(%rbp)
jmp    1486 <get_mime_type+0x366>
cmpl   $0x0,-0x18(%rbp)
jge    11b4 <get_mime_type+0x94>
lea    0xe55(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1486 <get_mime_type+0x366>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x30(%rbp)
sub    $0x2,%eax
je     1427 <get_mime_type+0x307>
jmp    11eb <get_mime_type+0xcb>
mov    -0x30(%rbp),%eax
sub    $0x3,%eax
je     1296 <get_mime_type+0x176>
jmp    11fc <get_mime_type+0xdc>
mov    -0x30(%rbp),%eax
sub    $0x4,%eax
jne    146e <get_mime_type+0x34e>
jmp    120d <get_mime_type+0xed>
mov    -0x28(%rbp),%rdi
lea    0xded(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     123f <get_mime_type+0x11f>
mov    -0x28(%rbp),%rdi
lea    0xdd9(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    124f <get_mime_type+0x12f>
lea    0xdba(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1486 <get_mime_type+0x366>
mov    -0x28(%rbp),%rdi
lea    0xdc0(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1281 <get_mime_type+0x161>
mov    -0x28(%rbp),%rdi
lea    0xd9c(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1291 <get_mime_type+0x171>
lea    0xd8c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1486 <get_mime_type+0x366>
jmp    147e <get_mime_type+0x35e>
mov    -0x28(%rbp),%rdi
lea    0xd7e(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     12c8 <get_mime_type+0x1a8>
mov    -0x28(%rbp),%rdi
lea    0xd69(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    12d8 <get_mime_type+0x1b8>
lea    0xd31(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1486 <get_mime_type+0x366>
mov    -0x28(%rbp),%rdi
lea    0xd4d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     130a <get_mime_type+0x1ea>
mov    -0x28(%rbp),%rdi
lea    0xd2b(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    131a <get_mime_type+0x1fa>
lea    0xd1a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1486 <get_mime_type+0x366>
mov    -0x28(%rbp),%rdi
lea    0xd19(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     134c <get_mime_type+0x22c>
mov    -0x28(%rbp),%rdi
lea    0xcf6(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    135c <get_mime_type+0x23c>
lea    0xce5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1486 <get_mime_type+0x366>
mov    -0x28(%rbp),%rdi
lea    0xcdb(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     138e <get_mime_type+0x26e>
mov    -0x28(%rbp),%rdi
lea    0xcc6(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    139e <get_mime_type+0x27e>
lea    0xc7f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1486 <get_mime_type+0x366>
mov    -0x28(%rbp),%rdi
lea    0xcab(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     13d0 <get_mime_type+0x2b0>
mov    -0x28(%rbp),%rdi
lea    0xc88(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    13e0 <get_mime_type+0x2c0>
lea    0xc77(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1486 <get_mime_type+0x366>
mov    -0x28(%rbp),%rdi
lea    0xc6d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1412 <get_mime_type+0x2f2>
mov    -0x28(%rbp),%rdi
lea    0xc58(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1422 <get_mime_type+0x302>
lea    0xc47(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1486 <get_mime_type+0x366>
jmp    147e <get_mime_type+0x35e>
mov    -0x28(%rbp),%rdi
lea    0xc39(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1459 <get_mime_type+0x339>
mov    -0x28(%rbp),%rdi
lea    0xc23(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1469 <get_mime_type+0x349>
lea    0xc11(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1486 <get_mime_type+0x366>
jmp    147e <get_mime_type+0x35e>
lea    0xc0c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1486 <get_mime_type+0x366>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_mime_type>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ecx
lea    (%rcx,%rbx,1),%rdx
add    $0x1,%rdx
mov    $0xffffffff,%ecx
lea    0xebe(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %eax,%eax
jle    133b <get_mime_type+0x21b>
add    $0x1,%ecx
lea    -0x1(%rdx),%rbx
add    $0xffffffff,%eax
cmpb   $0x2e,-0x2(%rdx)
mov    %rbx,%rdx
jne    1150 <get_mime_type+0x30>
test   %eax,%eax
je     1214 <get_mime_type+0xf4>
cmp    $0x2,%ecx
je     11df <get_mime_type+0xbf>
cmp    $0x3,%ecx
je     121c <get_mime_type+0xfc>
cmp    $0x4,%ecx
jne    1334 <get_mime_type+0x214>
lea    0xe74(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xe62(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xe5b(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
lea    0xe46(%rip),%r14
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xe32(%rip),%rsi
jmp    1204 <get_mime_type+0xe4>
lea    0xe85(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
lea    0xe7c(%rip),%r14
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xe6a(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     133b <get_mime_type+0x21b>
xor    %r14d,%r14d
jmp    133b <get_mime_type+0x21b>
lea    0xdfc(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xde9(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xddf(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
lea    0xdcb(%rip),%r14
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xdb8(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xdb8(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
lea    0xda3(%rip),%r14
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xd90(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xd87(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
lea    0xd4a(%rip),%r14
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xd71(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xd6c(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
lea    0xd57(%rip),%r14
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xd48(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xd43(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
lea    0xd3c(%rip),%r14
test   %eax,%eax
je     133b <get_mime_type+0x21b>
lea    0xd2d(%rip),%rsi
jmp    1204 <get_mime_type+0xe4>
lea    0xd46(%rip),%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [10 x i8] c"text/html\00"
@.str.1 = [5 x i8] c"html\00"
@.str.2 = [5 x i8] c"HTML\00"
@.str.3 = [5 x i8] c"jpeg\00"
@.str.4 = [5 x i8] c"JPEG\00"
@.str.5 = [11 x i8] c"image/jpeg\00"
@.str.6 = [4 x i8] c"htm\00"
@.str.7 = [4 x i8] c"HTM\00"
@.str.8 = [4 x i8] c"css\00"
@.str.9 = [4 x i8] c"CSS\00"
@.str.10 = [9 x i8] c"text/css\00"
@.str.11 = [4 x i8] c"png\00"
@.str.12 = [4 x i8] c"PNG\00"
@.str.13 = [10 x i8] c"image/png\00"
@.str.14 = [4 x i8] c"jpg\00"
@.str.15 = [4 x i8] c"JPG\00"
@.str.16 = [4 x i8] c"gif\00"
@.str.17 = [4 x i8] c"GIF\00"
@.str.18 = [10 x i8] c"image/gif\00"
@.str.19 = [4 x i8] c"txt\00"
@.str.20 = [4 x i8] c"TXT\00"
@.str.21 = [11 x i8] c"text/plain\00"
@.str.22 = [3 x i8] c"js\00"
@.str.23 = [3 x i8] c"JS\00"
@.str.24 = [16 x i8] c"text/javascript\00"
@.str.25 = [5 x i8] c"NULL\00"
define i8* @get_mime_type(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 1
store i32 %11, i32* %5
br label %12
12: ; preds = %25, %1
%13 = load i32, i32* %5
%14 = icmp sge i32 %13, 0
br i1 %14, label %15, label %23
15: ; preds = %12
%16 = load i8*, i8** %3
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 46
br label %23
23: ; preds = %15, %12
%24 = phi i1 [ false, %12 ], [ %22, %15 ]
br i1 %24, label %25, label %28
25: ; preds = %23
%26 = load i32, i32* %5
%27 = add nsw i32 %26, -1
store i32 %27, i32* %5
br label %12
28: ; preds = %23
%29 = load i32, i32* %5
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %28
store i8* null, i8** %2
br label %133
32: ; preds = %28
%33 = load i32, i32* %5
%34 = icmp slt i32 %33, 0
br i1 %34, label %35, label %36
35: ; preds = %32
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
br label %133
36: ; preds = %32
%37 = load i32, i32* %5
%38 = add nsw i32 %37, 1
store i32 %38, i32* %5
%39 = load i32, i32* %4
%40 = load i32, i32* %5
%41 = sub nsw i32 %39, %40
store i32 %41, i32* %6
%42 = load i8*, i8** %3
%43 = load i32, i32* %5
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8, i8* %42, i64 %44
store i8* %45, i8** %7
%46 = load i32, i32* %6
switch i32 %46, label %131 [
i32 4, label %47
i32 3, label %66
i32 2, label %121
]
47: ; preds = %36
%48 = load i8*, i8** %7
%49 = call i32 @strcmp(i8* %48, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %55
51: ; preds = %47
%52 = load i8*, i8** %7
%53 = call i32 @strcmp(i8* %52, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%54 = icmp ne i32 %53, 0
br i1 %54, label %56, label %55
55: ; preds = %51, %47
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
br label %133
56: ; preds = %51
%57 = load i8*, i8** %7
%58 = call i32 @strcmp(i8* %57, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %64
60: ; preds = %56
%61 = load i8*, i8** %7
%62 = call i32 @strcmp(i8* %61, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%63 = icmp ne i32 %62, 0
br i1 %63, label %65, label %64
64: ; preds = %60, %56
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %133
65: ; preds = %60
br label %132
66: ; preds = %36
%67 = load i8*, i8** %7
%68 = call i32 @strcmp(i8* %67, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%69 = icmp ne i32 %68, 0
br i1 %69, label %70, label %74
70: ; preds = %66
%71 = load i8*, i8** %7
%72 = call i32 @strcmp(i8* %71, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%73 = icmp ne i32 %72, 0
br i1 %73, label %75, label %74
74: ; preds = %70, %66
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
br label %133
75: ; preds = %70
%76 = load i8*, i8** %7
%77 = call i32 @strcmp(i8* %76, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%78 = icmp ne i32 %77, 0
br i1 %78, label %79, label %83
79: ; preds = %75
%80 = load i8*, i8** %7
%81 = call i32 @strcmp(i8* %80, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%82 = icmp ne i32 %81, 0
br i1 %82, label %84, label %83
83: ; preds = %79, %75
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %133
84: ; preds = %79
%85 = load i8*, i8** %7
%86 = call i32 @strcmp(i8* %85, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%87 = icmp ne i32 %86, 0
br i1 %87, label %88, label %92
88: ; preds = %84
%89 = load i8*, i8** %7
%90 = call i32 @strcmp(i8* %89, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%91 = icmp ne i32 %90, 0
br i1 %91, label %93, label %92
92: ; preds = %88, %84
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %133
93: ; preds = %88
%94 = load i8*, i8** %7
%95 = call i32 @strcmp(i8* %94, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%96 = icmp ne i32 %95, 0
br i1 %96, label %97, label %101
97: ; preds = %93
%98 = load i8*, i8** %7
%99 = call i32 @strcmp(i8* %98, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0))
%100 = icmp ne i32 %99, 0
br i1 %100, label %102, label %101
101: ; preds = %97, %93
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %133
102: ; preds = %97
%103 = load i8*, i8** %7
%104 = call i32 @strcmp(i8* %103, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
%105 = icmp ne i32 %104, 0
br i1 %105, label %106, label %110
106: ; preds = %102
%107 = load i8*, i8** %7
%108 = call i32 @strcmp(i8* %107, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0))
%109 = icmp ne i32 %108, 0
br i1 %109, label %111, label %110
110: ; preds = %106, %102
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %133
111: ; preds = %106
%112 = load i8*, i8** %7
%113 = call i32 @strcmp(i8* %112, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0))
%114 = icmp ne i32 %113, 0
br i1 %114, label %115, label %119
115: ; preds = %111
%116 = load i8*, i8** %7
%117 = call i32 @strcmp(i8* %116, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0))
%118 = icmp ne i32 %117, 0
br i1 %118, label %120, label %119
119: ; preds = %115, %111
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %133
120: ; preds = %115
br label %132
121: ; preds = %36
%122 = load i8*, i8** %7
%123 = call i32 @strcmp(i8* %122, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0))
%124 = icmp ne i32 %123, 0
br i1 %124, label %125, label %129
125: ; preds = %121
%126 = load i8*, i8** %7
%127 = call i32 @strcmp(i8* %126, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0))
%128 = icmp ne i32 %127, 0
br i1 %128, label %130, label %129
129: ; preds = %125, %121
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.24, i64 0, i64 0), i8** %2
br label %133
130: ; preds = %125
br label %132
131: ; preds = %36
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.25, i64 0, i64 0), i8** %2
br label %133
132: ; preds = %130, %120, %65
store i8* null, i8** %2
br label %133
133: ; preds = %132, %131, %129, %119, %110, %101, %92, %83, %74, %64, %55, %35, %31
%134 = load i8*, i8** %2
ret i8* %134
}

LLVM IR (-O2):
@.str = [10 x i8] c"text/html\00"
@.str.1 = [5 x i8] c"html\00"
@.str.2 = [5 x i8] c"HTML\00"
@.str.3 = [5 x i8] c"jpeg\00"
@.str.4 = [5 x i8] c"JPEG\00"
@.str.5 = [11 x i8] c"image/jpeg\00"
@.str.6 = [4 x i8] c"htm\00"
@.str.7 = [4 x i8] c"HTM\00"
@.str.8 = [4 x i8] c"css\00"
@.str.9 = [4 x i8] c"CSS\00"
@.str.10 = [9 x i8] c"text/css\00"
@.str.11 = [4 x i8] c"png\00"
@.str.12 = [4 x i8] c"PNG\00"
@.str.13 = [10 x i8] c"image/png\00"
@.str.14 = [4 x i8] c"jpg\00"
@.str.15 = [4 x i8] c"JPG\00"
@.str.16 = [4 x i8] c"gif\00"
@.str.17 = [4 x i8] c"GIF\00"
@.str.18 = [10 x i8] c"image/gif\00"
@.str.19 = [4 x i8] c"txt\00"
@.str.20 = [4 x i8] c"TXT\00"
@.str.21 = [11 x i8] c"text/plain\00"
@.str.22 = [3 x i8] c"js\00"
@.str.23 = [3 x i8] c"JS\00"
@.str.24 = [16 x i8] c"text/javascript\00"
@.str.25 = [5 x i8] c"NULL\00"
define i8* @get_mime_type(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = zext i32 %2 to i64
br label %4
4: ; preds = %9, %1
%5 = phi i64 [ %6, %9 ], [ %3, %1 ]
%6 = add nsw i64 %5, -1
%7 = trunc i64 %5 to i32
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %76
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %0, i64 %6
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 46
br i1 %12, label %13, label %4
13: ; preds = %9
%14 = trunc i64 %6 to i32
%15 = icmp eq i32 %14, 0
br i1 %15, label %76, label %16
16: ; preds = %13
%17 = trunc i64 %5 to i32
%18 = sub nsw i32 %2, %17
%19 = and i64 %5, 4294967295
%20 = getelementptr inbounds i8, i8* %0, i64 %19
switch i32 %18, label %76 [
i32 4, label %21
i32 3, label %33
i32 2, label %69
]
21: ; preds = %16
%22 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i32 %22, 0
br i1 %23, label %76, label %24
24: ; preds = %21
%25 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%26 = icmp eq i32 %25, 0
br i1 %26, label %76, label %27
27: ; preds = %24
%28 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%29 = icmp eq i32 %28, 0
br i1 %29, label %76, label %30
30: ; preds = %27
%31 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%32 = icmp eq i32 %31, 0
br i1 %32, label %76, label %75
33: ; preds = %16
%34 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%35 = icmp eq i32 %34, 0
br i1 %35, label %76, label %36
36: ; preds = %33
%37 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%38 = icmp eq i32 %37, 0
br i1 %38, label %76, label %39
39: ; preds = %36
%40 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%41 = icmp eq i32 %40, 0
br i1 %41, label %76, label %42
42: ; preds = %39
%43 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%44 = icmp eq i32 %43, 0
br i1 %44, label %76, label %45
45: ; preds = %42
%46 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
%47 = icmp eq i32 %46, 0
br i1 %47, label %76, label %48
48: ; preds = %45
%49 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%50 = icmp eq i32 %49, 0
br i1 %50, label %76, label %51
51: ; preds = %48
%52 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%53 = icmp eq i32 %52, 0
br i1 %53, label %76, label %54
54: ; preds = %51
%55 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0))
%56 = icmp eq i32 %55, 0
br i1 %56, label %76, label %57
57: ; preds = %54
%58 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
%59 = icmp eq i32 %58, 0
br i1 %59, label %76, label %60
60: ; preds = %57
%61 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0))
%62 = icmp eq i32 %61, 0
br i1 %62, label %76, label %63
63: ; preds = %60
%64 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0))
%65 = icmp eq i32 %64, 0
br i1 %65, label %76, label %66
66: ; preds = %63
%67 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0))
%68 = icmp eq i32 %67, 0
br i1 %68, label %76, label %75
69: ; preds = %16
%70 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i64 0, i64 0))
%71 = icmp eq i32 %70, 0
br i1 %71, label %76, label %72
72: ; preds = %69
%73 = tail call i32 @strcmp(i8* %20, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i64 0, i64 0))
%74 = icmp eq i32 %73, 0
br i1 %74, label %76, label %75
75: ; preds = %72, %66, %30
br label %76
76: ; preds = %4, %75, %24, %21, %30, %27, %36, %33, %42, %39, %48, %45, %54, %51, %60, %57, %66, %63, %72, %69, %16, %13
%77 = phi i8* [ null, %13 ], [ null, %75 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %24 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %21 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), %30 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), %27 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %36 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %33 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), %42 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), %39 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), %48 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), %45 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), %54 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), %51 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0), %60 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0), %57 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0), %66 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0), %63 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.24, i64 0, i64 0), %72 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.24, i64 0, i64 0), %69 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.25, i64 0, i64 0), %16 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %4 ]
ret i8* %77
}