#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *);
unsigned int ntohl(unsigned int);
int print_encoded_mime_type(FILE *fp, char *hdr, int hdrlen,
                            unsigned int *payload, int paylen, char *prefix) {
  unsigned int type;
  char *chtype, *chsubtype;
  type = ntohl(*payload);
  switch (type >> 16) {
  case 1:
    chtype = "text";
    break;
  case 2:
    chtype = "message";
    break;
  case 3:
    chtype = "application";
    break;
  case 4:
    chtype = "multipart";
    break;
  case 0xfe:
    chtype = "all";
    break;
  case 0xff:
    chtype = "unknown";
    break;
  default:
    chtype = "(didn't know this type existed)";
    break;
  }
  switch (type & 0xFF) {
  case 1:
    chsubtype = "SUBTYPE_PLAIN";
    break;
  case 2:
    chsubtype = "SUBTYPE_CPIM";
    break;
  case 3:
    chsubtype = "SUBTYPE_SDP";
    break;
  case 4:
    chsubtype = "SUBTYPE_CPLXML";
    break;
  case 5:
    chsubtype = "SUBTYPE_PIDFXML";
    break;
  case 6:
    chsubtype = "SUBTYPE_RLMIXML";
    break;
  case 7:
    chsubtype = "SUBTYPE_RELATED";
    break;
  case 8:
    chsubtype = "SUBTYPE_LPIDFXML";
    break;
  case 9:
    chsubtype = "SUBTYPE_XPIDFXML";
    break;
  case 10:
    chsubtype = "SUBTYPE_WATCHERINFOXML";
    break;
  case 11:
    chsubtype = "SUBTYPE_EXTERNAL_BODY";
    break;
  case 12:
    chsubtype = "SUBTYPE_XML_MSRTC_PIDF";
    break;
  case 0xfe:
    chsubtype = "SUBTYPE_ALL";
    break;
  case 0xff:
    chsubtype = "SUBTYPE_UNKNOWN";
    break;
  default:
    chsubtype = "(didnt know this subtype existed)";
  }
  fprintf(fp, "%sTYPE:[%s]\n", prefix, chtype);
  fprintf(fp, "%sSUBTYPE:[%s]\n", prefix, chsubtype);
  return 0;
}


x86 assembly (clang, -O0):
<print_encoded_mime_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
call   1040 <ntohl@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
shr    $0x10,%eax
mov    %eax,-0x4c(%rbp)
sub    $0x1,%eax
je     11bd <print_encoded_mime_type+0x9d>
jmp    1164 <print_encoded_mime_type+0x44>
mov    -0x4c(%rbp),%eax
sub    $0x2,%eax
je     11cd <print_encoded_mime_type+0xad>
jmp    1175 <print_encoded_mime_type+0x55>
mov    -0x4c(%rbp),%eax
sub    $0x3,%eax
je     11dd <print_encoded_mime_type+0xbd>
jmp    1186 <print_encoded_mime_type+0x66>
mov    -0x4c(%rbp),%eax
sub    $0x4,%eax
je     11ed <print_encoded_mime_type+0xcd>
jmp    1197 <print_encoded_mime_type+0x77>
mov    -0x4c(%rbp),%eax
sub    $0xfe,%eax
je     11fd <print_encoded_mime_type+0xdd>
jmp    11aa <print_encoded_mime_type+0x8a>
mov    -0x4c(%rbp),%eax
sub    $0xff,%eax
je     120d <print_encoded_mime_type+0xed>
jmp    121d <print_encoded_mime_type+0xfd>
lea    0xe3c(%rip),%rax
mov    %rax,-0x40(%rbp)
jmp    1228 <print_encoded_mime_type+0x108>
lea    0xe31(%rip),%rax
mov    %rax,-0x40(%rbp)
jmp    1228 <print_encoded_mime_type+0x108>
lea    0xe29(%rip),%rax
mov    %rax,-0x40(%rbp)
jmp    1228 <print_encoded_mime_type+0x108>
lea    0xe25(%rip),%rax
mov    %rax,-0x40(%rbp)
jmp    1228 <print_encoded_mime_type+0x108>
lea    0xe1f(%rip),%rax
mov    %rax,-0x40(%rbp)
jmp    1228 <print_encoded_mime_type+0x108>
lea    0xe13(%rip),%rax
mov    %rax,-0x40(%rbp)
jmp    1228 <print_encoded_mime_type+0x108>
lea    0xe0b(%rip),%rax
mov    %rax,-0x40(%rbp)
movzbl -0x34(%rbp),%eax
mov    %eax,-0x50(%rbp)
sub    $0x1,%eax
je     131e <print_encoded_mime_type+0x1fe>
jmp    123d <print_encoded_mime_type+0x11d>
mov    -0x50(%rbp),%eax
sub    $0x2,%eax
je     132e <print_encoded_mime_type+0x20e>
jmp    124e <print_encoded_mime_type+0x12e>
mov    -0x50(%rbp),%eax
sub    $0x3,%eax
je     133e <print_encoded_mime_type+0x21e>
jmp    125f <print_encoded_mime_type+0x13f>
mov    -0x50(%rbp),%eax
sub    $0x4,%eax
je     134e <print_encoded_mime_type+0x22e>
jmp    1270 <print_encoded_mime_type+0x150>
mov    -0x50(%rbp),%eax
sub    $0x5,%eax
je     135e <print_encoded_mime_type+0x23e>
jmp    1281 <print_encoded_mime_type+0x161>
mov    -0x50(%rbp),%eax
sub    $0x6,%eax
je     136e <print_encoded_mime_type+0x24e>
jmp    1292 <print_encoded_mime_type+0x172>
mov    -0x50(%rbp),%eax
sub    $0x7,%eax
je     137e <print_encoded_mime_type+0x25e>
jmp    12a3 <print_encoded_mime_type+0x183>
mov    -0x50(%rbp),%eax
sub    $0x8,%eax
je     138e <print_encoded_mime_type+0x26e>
jmp    12b4 <print_encoded_mime_type+0x194>
mov    -0x50(%rbp),%eax
sub    $0x9,%eax
je     139e <print_encoded_mime_type+0x27e>
jmp    12c5 <print_encoded_mime_type+0x1a5>
mov    -0x50(%rbp),%eax
sub    $0xa,%eax
je     13ae <print_encoded_mime_type+0x28e>
jmp    12d6 <print_encoded_mime_type+0x1b6>
mov    -0x50(%rbp),%eax
sub    $0xb,%eax
je     13be <print_encoded_mime_type+0x29e>
jmp    12e7 <print_encoded_mime_type+0x1c7>
mov    -0x50(%rbp),%eax
sub    $0xc,%eax
je     13ce <print_encoded_mime_type+0x2ae>
jmp    12f8 <print_encoded_mime_type+0x1d8>
mov    -0x50(%rbp),%eax
sub    $0xfe,%eax
je     13de <print_encoded_mime_type+0x2be>
jmp    130b <print_encoded_mime_type+0x1eb>
mov    -0x50(%rbp),%eax
sub    $0xff,%eax
je     13ee <print_encoded_mime_type+0x2ce>
jmp    13fe <print_encoded_mime_type+0x2de>
lea    0xd2a(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1409 <print_encoded_mime_type+0x2e9>
lea    0xd28(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1409 <print_encoded_mime_type+0x2e9>
lea    0xd25(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1409 <print_encoded_mime_type+0x2e9>
lea    0xd21(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1409 <print_encoded_mime_type+0x2e9>
lea    0xd20(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1409 <print_encoded_mime_type+0x2e9>
lea    0xd20(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1409 <print_encoded_mime_type+0x2e9>
lea    0xd20(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1409 <print_encoded_mime_type+0x2e9>
lea    0xd20(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1409 <print_encoded_mime_type+0x2e9>
lea    0xd21(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1409 <print_encoded_mime_type+0x2e9>
lea    0xd22(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1409 <print_encoded_mime_type+0x2e9>
lea    0xd29(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1409 <print_encoded_mime_type+0x2e9>
lea    0xd2f(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1409 <print_encoded_mime_type+0x2e9>
lea    0xd36(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1409 <print_encoded_mime_type+0x2e9>
lea    0xd32(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1409 <print_encoded_mime_type+0x2e9>
lea    0xd32(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    -0x40(%rbp),%rcx
lea    0xd3d(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    -0x48(%rbp),%rcx
lea    0xd32(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_encoded_mime_type>:
push   %r15
push   %r14
push   %rbx
mov    %r9,%r14
mov    %rdi,%r15
mov    (%rcx),%edi
call   1040 <ntohl@plt>
mov    %eax,%ecx
shr    $0x10,%ecx
lea    -0x1(%rcx),%edx
cmp    $0x3,%dx
ja     1163 <print_encoded_mime_type+0x43>
lea    0xf05(%rip),%rcx
movzwl %dx,%edx
lea    0xeaf(%rip),%rsi
movslq (%rsi,%rdx,4),%rdx
add    %rsi,%rdx
jmp    *%rdx
lea    0xef0(%rip),%rcx
jmp    11a1 <print_encoded_mime_type+0x81>
movzwl %cx,%ecx
cmp    $0xfe,%ecx
je     1191 <print_encoded_mime_type+0x71>
cmp    $0xff,%ecx
jne    119a <print_encoded_mime_type+0x7a>
lea    0xef6(%rip),%rcx
jmp    11a1 <print_encoded_mime_type+0x81>
lea    0xed3(%rip),%rcx
jmp    11a1 <print_encoded_mime_type+0x81>
lea    0xed6(%rip),%rcx
jmp    11a1 <print_encoded_mime_type+0x81>
lea    0xed7(%rip),%rcx
jmp    11a1 <print_encoded_mime_type+0x81>
lea    0xeda(%rip),%rcx
add    $0x2,%eax
cmp    $0xe,%al
ja     11bc <print_encoded_mime_type+0x9c>
movsbq %al,%rax
lea    0xe5d(%rip),%rdx
movslq (%rdx,%rax,4),%rbx
add    %rdx,%rbx
jmp    11c3 <print_encoded_mime_type+0xa3>
lea    0xfc0(%rip),%rbx
lea    0xfdb(%rip),%rsi
mov    %r15,%rdi
mov    %r14,%rdx
call   1030 <fprintf@plt>
lea    0xfd6(%rip),%rsi
mov    %r15,%rdi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"text\00"
@.str.1 = [8 x i8] c"message\00"
@.str.2 = [12 x i8] c"application\00"
@.str.3 = [10 x i8] c"multipart\00"
@.str.4 = [4 x i8] c"all\00"
@.str.5 = [8 x i8] c"unknown\00"
@.str.6 = [32 x i8] c"(didn't know this type existed)\00"
@.str.7 = [14 x i8] c"SUBTYPE_PLAIN\00"
@.str.8 = [13 x i8] c"SUBTYPE_CPIM\00"
@.str.9 = [12 x i8] c"SUBTYPE_SDP\00"
@.str.10 = [15 x i8] c"SUBTYPE_CPLXML\00"
@.str.11 = [16 x i8] c"SUBTYPE_PIDFXML\00"
@.str.12 = [16 x i8] c"SUBTYPE_RLMIXML\00"
@.str.13 = [16 x i8] c"SUBTYPE_RELATED\00"
@.str.14 = [17 x i8] c"SUBTYPE_LPIDFXML\00"
@.str.15 = [17 x i8] c"SUBTYPE_XPIDFXML\00"
@.str.16 = [23 x i8] c"SUBTYPE_WATCHERINFOXML\00"
@.str.17 = [22 x i8] c"SUBTYPE_EXTERNAL_BODY\00"
@.str.18 = [23 x i8] c"SUBTYPE_XML_MSRTC_PIDF\00"
@.str.19 = [12 x i8] c"SUBTYPE_ALL\00"
@.str.20 = [16 x i8] c"SUBTYPE_UNKNOWN\00"
@.str.21 = [34 x i8] c"(didnt know this subtype existed)\00"
@.str.22 = [13 x i8] c"%sTYPE:[%s]\0A\00"
@.str.23 = [16 x i8] c"%sSUBTYPE:[%s]\0A\00"
define i32 @print_encoded_mime_type(i32* %0, i8* %1, i32 %2, i32* %3, i32 %4, i8* %5) {
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i8*
store i32* %0, i32** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32* %3, i32** %10
store i32 %4, i32* %11
store i8* %5, i8** %12
%16 = load i32*, i32** %10
%17 = load i32, i32* %16
%18 = call i32 @ntohl(i32 %17)
store i32 %18, i32* %13
%19 = load i32, i32* %13
%20 = lshr i32 %19, 16
switch i32 %20, label %27 [
i32 1, label %21
i32 2, label %22
i32 3, label %23
i32 4, label %24
i32 254, label %25
i32 255, label %26
]
21: ; preds = %6
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %14
br label %28
22: ; preds = %6
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %14
br label %28
23: ; preds = %6
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8** %14
br label %28
24: ; preds = %6
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8** %14
br label %28
25: ; preds = %6
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8** %14
br label %28
26: ; preds = %6
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8** %14
br label %28
27: ; preds = %6
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), i8** %14
br label %28
28: ; preds = %27, %26, %25, %24, %23, %22, %21
%29 = load i32, i32* %13
%30 = and i32 %29, 255
switch i32 %30, label %45 [
i32 1, label %31
i32 2, label %32
i32 3, label %33
i32 4, label %34
i32 5, label %35
i32 6, label %36
i32 7, label %37
i32 8, label %38
i32 9, label %39
i32 10, label %40
i32 11, label %41
i32 12, label %42
i32 254, label %43
i32 255, label %44
]
31: ; preds = %28
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8** %15
br label %46
32: ; preds = %28
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8** %15
br label %46
33: ; preds = %28
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i8** %15
br label %46
34: ; preds = %28
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i8** %15
br label %46
35: ; preds = %28
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i8** %15
br label %46
36: ; preds = %28
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i8** %15
br label %46
37: ; preds = %28
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i8** %15
br label %46
38: ; preds = %28
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0), i8** %15
br label %46
39: ; preds = %28
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), i8** %15
br label %46
40: ; preds = %28
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0), i8** %15
br label %46
41: ; preds = %28
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.17, i64 0, i64 0), i8** %15
br label %46
42: ; preds = %28
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0), i8** %15
br label %46
43: ; preds = %28
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), i8** %15
br label %46
44: ; preds = %28
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.20, i64 0, i64 0), i8** %15
br label %46
45: ; preds = %28
store i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.21, i64 0, i64 0), i8** %15
br label %46
46: ; preds = %45, %44, %43, %42, %41, %40, %39, %38, %37, %36, %35, %34, %33, %32, %31
%47 = load i32*, i32** %7
%48 = load i8*, i8** %12
%49 = load i8*, i8** %14
%50 = call i32 @fprintf(i32* %47, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.22, i64 0, i64 0), i8* %48, i8* %49)
%51 = load i32*, i32** %7
%52 = load i8*, i8** %12
%53 = load i8*, i8** %15
%54 = call i32 @fprintf(i32* %51, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.23, i64 0, i64 0), i8* %52, i8* %53)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"text\00"
@.str.1 = [8 x i8] c"message\00"
@.str.2 = [12 x i8] c"application\00"
@.str.3 = [10 x i8] c"multipart\00"
@.str.4 = [4 x i8] c"all\00"
@.str.5 = [8 x i8] c"unknown\00"
@.str.6 = [32 x i8] c"(didn't know this type existed)\00"
@.str.7 = [14 x i8] c"SUBTYPE_PLAIN\00"
@.str.8 = [13 x i8] c"SUBTYPE_CPIM\00"
@.str.9 = [12 x i8] c"SUBTYPE_SDP\00"
@.str.10 = [15 x i8] c"SUBTYPE_CPLXML\00"
@.str.11 = [16 x i8] c"SUBTYPE_PIDFXML\00"
@.str.12 = [16 x i8] c"SUBTYPE_RLMIXML\00"
@.str.13 = [16 x i8] c"SUBTYPE_RELATED\00"
@.str.14 = [17 x i8] c"SUBTYPE_LPIDFXML\00"
@.str.15 = [17 x i8] c"SUBTYPE_XPIDFXML\00"
@.str.16 = [23 x i8] c"SUBTYPE_WATCHERINFOXML\00"
@.str.17 = [22 x i8] c"SUBTYPE_EXTERNAL_BODY\00"
@.str.18 = [23 x i8] c"SUBTYPE_XML_MSRTC_PIDF\00"
@.str.19 = [12 x i8] c"SUBTYPE_ALL\00"
@.str.20 = [16 x i8] c"SUBTYPE_UNKNOWN\00"
@.str.21 = [34 x i8] c"(didnt know this subtype existed)\00"
@.str.22 = [13 x i8] c"%sTYPE:[%s]\0A\00"
@.str.23 = [16 x i8] c"%sSUBTYPE:[%s]\0A\00"
@reltable.print_encoded_mime_type = [15 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.19 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.20 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([34 x i8]* @.str.21 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.7 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.8 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.9 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.10 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.11 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.12 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.13 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.14 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.15 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.16 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.17 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.18 to i64), i64 ptrtoint ([15 x i32]* @reltable.print_encoded_mime_type to i64)) to i32)]
define i32 @print_encoded_mime_type(i32* nocapture %0, i8* nocapture readnone %1, i32 %2, i32* nocapture %3, i32 %4, i8* %5) {
%7 = load i32, i32* %3
%8 = tail call i32 @ntohl(i32 %7)
%9 = lshr i32 %8, 16
%10 = trunc i32 %9 to i16
switch i16 %10, label %16 [
i16 1, label %17
i16 2, label %11
i16 3, label %12
i16 4, label %13
i16 254, label %14
i16 255, label %15
]
11: ; preds = %6
br label %17
12: ; preds = %6
br label %17
13: ; preds = %6
br label %17
14: ; preds = %6
br label %17
15: ; preds = %6
br label %17
16: ; preds = %6
br label %17
17: ; preds = %6, %16, %15, %14, %13, %12, %11
%18 = phi i8* [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), %16 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), %15 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), %14 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), %13 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), %12 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %11 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), %6 ]
%19 = trunc i32 %8 to i8
%20 = add i8 %19, 2
%21 = icmp ult i8 %20, 15
br i1 %21, label %22, label %26
22: ; preds = %17
%23 = sext i8 %20 to i64
%24 = shl i64 %23, 2
%25 = call i8* @llvm.load.relative.i64(i8* bitcast ([15 x i32]* @reltable.print_encoded_mime_type to i8*), i64 %24)
br label %26
26: ; preds = %17, %22
%27 = phi i8* [ %25, %22 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.21, i64 0, i64 0), %17 ]
%28 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.22, i64 0, i64 0), i8* %5, i8* %18)
%29 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.23, i64 0, i64 0), i8* %5, i8* %27)
ret i32 0
}