char *StreamType(unsigned char stream_type) {
  if (stream_type == 0x00)
    return "ITU-T | ISO/IEC reserved";
  else if (stream_type == 0x01)
    return "ISO/IEC 11172-2 Video";
  else if (stream_type == 0x02)
    return "ITU-T Rec. H.262 | ISO/IEC 13818-2 Video";
  else if (stream_type == 0x03)
    return "ISO/IEC 11172-3 Audio";
  else if (stream_type == 0x04)
    return "ISO/IEC 13818-3 Audio";
  else if (stream_type == 0x05)
    return "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections";
  else if (stream_type == 0x06)
    return "ITU-T Rec. H.222.0 | ISO/IEC 13818-3 PES private data";
  else if (stream_type == 0x07)
    return "ISO/IEC 13522 MHEG";
  else if (stream_type == 0x08)
    return "DSM CC";
  else if (stream_type == 0x09)
    return "ITU-T Rec. H.222.1";
  else if (stream_type == 0x0A)
    return "ISO/IEC 13818-6 Type A";
  else if (stream_type == 0x0B)
    return "ISO/IEC 13818-6 Type B";
  else if (stream_type == 0x0C)
    return "ISO/IEC 13818-6 Type C";
  else if (stream_type == 0x0D)
    return "ISO/IEC 13818-6 Type D";
  else if (stream_type == 0x0E)
    return "ISO/IEC 13818-1 auxiliary";
  else if (stream_type >= 0x80)
    return "User private";
  else
    return "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 reserved";
}


x86 assembly (clang, -O0):
<StreamType>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jne    1127 <StreamType+0x27>
lea    0xee2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0x1,%eax
jne    1144 <StreamType+0x44>
lea    0xede(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0x2,%eax
jne    1161 <StreamType+0x61>
lea    0xed7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0x3,%eax
jne    117e <StreamType+0x7e>
lea    0xee3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0x4,%eax
jne    119b <StreamType+0x9b>
lea    0xedc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0x5,%eax
jne    11b8 <StreamType+0xb8>
lea    0xed5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0x6,%eax
jne    11d5 <StreamType+0xd5>
lea    0xeee(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0x7,%eax
jne    11f2 <StreamType+0xf2>
lea    0xf07(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0x8,%eax
jne    120f <StreamType+0x10f>
lea    0xefd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0x9,%eax
jne    122c <StreamType+0x12c>
lea    0xee7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0xa,%eax
jne    1249 <StreamType+0x149>
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0xb,%eax
jne    1266 <StreamType+0x166>
lea    0xed7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0xc,%eax
jne    1283 <StreamType+0x183>
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0xd,%eax
jne    12a0 <StreamType+0x1a0>
lea    0xecb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0xe,%eax
jne    12bd <StreamType+0x1bd>
lea    0xec5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
movzbl -0x9(%rbp),%eax
cmp    $0x80,%eax
jl     12dc <StreamType+0x1dc>
lea    0xec0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e7 <StreamType+0x1e7>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<StreamType>:
cmp    $0xf,%dil
jae    1119 <StreamType+0x19>
movsbq %dil,%rax
lea    0x10bf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
test   %dil,%dil
lea    0x1070(%rip),%rcx
lea    0x1076(%rip),%rax
cmovs  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [25 x i8] c"ITU-T | ISO/IEC reserved\00"
@.str.1 = [22 x i8] c"ISO/IEC 11172-2 Video\00"
@.str.2 = [41 x i8] c"ITU-T Rec. H.262 | ISO/IEC 13818-2 Video\00"
@.str.3 = [22 x i8] c"ISO/IEC 11172-3 Audio\00"
@.str.4 = [22 x i8] c"ISO/IEC 13818-3 Audio\00"
@.str.5 = [54 x i8] c"ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections\00"
@.str.6 = [54 x i8] c"ITU-T Rec. H.222.0 | ISO/IEC 13818-3 PES private data\00"
@.str.7 = [19 x i8] c"ISO/IEC 13522 MHEG\00"
@.str.8 = [7 x i8] c"DSM CC\00"
@.str.9 = [19 x i8] c"ITU-T Rec. H.222.1\00"
@.str.10 = [23 x i8] c"ISO/IEC 13818-6 Type A\00"
@.str.11 = [23 x i8] c"ISO/IEC 13818-6 Type B\00"
@.str.12 = [23 x i8] c"ISO/IEC 13818-6 Type C\00"
@.str.13 = [23 x i8] c"ISO/IEC 13818-6 Type D\00"
@.str.14 = [26 x i8] c"ISO/IEC 13818-1 auxiliary\00"
@.str.15 = [13 x i8] c"User private\00"
@.str.16 = [46 x i8] c"ITU-T Rec. H.222.0 | ISO/IEC 13818-1 reserved\00"
define i8* @StreamType(i8 zeroext %0) {
%2 = alloca i8*
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8** %2
br label %84
8: ; preds = %1
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %13
12: ; preds = %8
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %84
13: ; preds = %8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = icmp eq i32 %15, 2
br i1 %16, label %17, label %18
17: ; preds = %13
store i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %84
18: ; preds = %13
%19 = load i8, i8* %3
%20 = zext i8 %19 to i32
%21 = icmp eq i32 %20, 3
br i1 %21, label %22, label %23
22: ; preds = %18
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %84
23: ; preds = %18
%24 = load i8, i8* %3
%25 = zext i8 %24 to i32
%26 = icmp eq i32 %25, 4
br i1 %26, label %27, label %28
27: ; preds = %23
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %84
28: ; preds = %23
%29 = load i8, i8* %3
%30 = zext i8 %29 to i32
%31 = icmp eq i32 %30, 5
br i1 %31, label %32, label %33
32: ; preds = %28
store i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %84
33: ; preds = %28
%34 = load i8, i8* %3
%35 = zext i8 %34 to i32
%36 = icmp eq i32 %35, 6
br i1 %36, label %37, label %38
37: ; preds = %33
store i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %84
38: ; preds = %33
%39 = load i8, i8* %3
%40 = zext i8 %39 to i32
%41 = icmp eq i32 %40, 7
br i1 %41, label %42, label %43
42: ; preds = %38
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %84
43: ; preds = %38
%44 = load i8, i8* %3
%45 = zext i8 %44 to i32
%46 = icmp eq i32 %45, 8
br i1 %46, label %47, label %48
47: ; preds = %43
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %84
48: ; preds = %43
%49 = load i8, i8* %3
%50 = zext i8 %49 to i32
%51 = icmp eq i32 %50, 9
br i1 %51, label %52, label %53
52: ; preds = %48
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %84
53: ; preds = %48
%54 = load i8, i8* %3
%55 = zext i8 %54 to i32
%56 = icmp eq i32 %55, 10
br i1 %56, label %57, label %58
57: ; preds = %53
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %84
58: ; preds = %53
%59 = load i8, i8* %3
%60 = zext i8 %59 to i32
%61 = icmp eq i32 %60, 11
br i1 %61, label %62, label %63
62: ; preds = %58
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %84
63: ; preds = %58
%64 = load i8, i8* %3
%65 = zext i8 %64 to i32
%66 = icmp eq i32 %65, 12
br i1 %66, label %67, label %68
67: ; preds = %63
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %84
68: ; preds = %63
%69 = load i8, i8* %3
%70 = zext i8 %69 to i32
%71 = icmp eq i32 %70, 13
br i1 %71, label %72, label %73
72: ; preds = %68
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %84
73: ; preds = %68
%74 = load i8, i8* %3
%75 = zext i8 %74 to i32
%76 = icmp eq i32 %75, 14
br i1 %76, label %77, label %78
77: ; preds = %73
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %84
78: ; preds = %73
%79 = load i8, i8* %3
%80 = zext i8 %79 to i32
%81 = icmp sge i32 %80, 128
br i1 %81, label %82, label %83
82: ; preds = %78
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %84
83: ; preds = %78
store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %84
84: ; preds = %83, %82, %77, %72, %67, %62, %57, %52, %47, %42, %37, %32, %27, %22, %17, %12, %7
%85 = load i8*, i8** %2
ret i8* %85
}

LLVM IR (-O2):
@.str = [25 x i8] c"ITU-T | ISO/IEC reserved\00"
@.str.1 = [22 x i8] c"ISO/IEC 11172-2 Video\00"
@.str.2 = [41 x i8] c"ITU-T Rec. H.262 | ISO/IEC 13818-2 Video\00"
@.str.3 = [22 x i8] c"ISO/IEC 11172-3 Audio\00"
@.str.4 = [22 x i8] c"ISO/IEC 13818-3 Audio\00"
@.str.5 = [54 x i8] c"ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private_sections\00"
@.str.6 = [54 x i8] c"ITU-T Rec. H.222.0 | ISO/IEC 13818-3 PES private data\00"
@.str.7 = [19 x i8] c"ISO/IEC 13522 MHEG\00"
@.str.8 = [7 x i8] c"DSM CC\00"
@.str.9 = [19 x i8] c"ITU-T Rec. H.222.1\00"
@.str.10 = [23 x i8] c"ISO/IEC 13818-6 Type A\00"
@.str.11 = [23 x i8] c"ISO/IEC 13818-6 Type B\00"
@.str.12 = [23 x i8] c"ISO/IEC 13818-6 Type C\00"
@.str.13 = [23 x i8] c"ISO/IEC 13818-6 Type D\00"
@.str.14 = [26 x i8] c"ISO/IEC 13818-1 auxiliary\00"
@.str.15 = [13 x i8] c"User private\00"
@.str.16 = [46 x i8] c"ITU-T Rec. H.222.0 | ISO/IEC 13818-1 reserved\00"
@reltable.StreamType = [15 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.1 to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([41 x i8]* @.str.2 to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.3 to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.4 to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([54 x i8]* @.str.5 to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([54 x i8]* @.str.6 to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.7 to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.8 to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.9 to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.10 to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.11 to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.12 to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.13 to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @.str.14 to i64), i64 ptrtoint ([15 x i32]* @reltable.StreamType to i64)) to i32)]
define i8* @StreamType(i8 zeroext %0) {
%2 = icmp ult i8 %0, 15
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = icmp slt i8 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.16, i64 0, i64 0)
br label %10
6: ; preds = %1
%7 = sext i8 %0 to i64
%8 = shl i64 %7, 2
%9 = call i8* @llvm.load.relative.i64(i8* bitcast ([15 x i32]* @reltable.StreamType to i8*), i64 %8)
br label %10
10: ; preds = %6, %3
%11 = phi i8* [ %5, %3 ], [ %9, %6 ]
ret i8* %11
}