char *TapeImage_ArchiveInfo_GetTextID(int Byte) {
  switch (Byte) {
  case 00: {
    return "Full Title";
  }
  case 01: {
    return "Software House/Publisher";
  }
  case 02: {
    return "Author(s)";
  }
  case 03: {
    return "Year of Publication";
  }
  case 04: {
    return "Language";
  }
  case 0x0ff: {
    return "Comments";
  }
  default: {
    return "Unknown";
  }
  }
}


x86 assembly (clang, -O0):
<TapeImage_ArchiveInfo_GetTextID>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     1171 <TapeImage_ArchiveInfo_GetTextID+0x71>
jmp    111a <TapeImage_ArchiveInfo_GetTextID+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     1181 <TapeImage_ArchiveInfo_GetTextID+0x81>
jmp    112b <TapeImage_ArchiveInfo_GetTextID+0x2b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     1191 <TapeImage_ArchiveInfo_GetTextID+0x91>
jmp    113c <TapeImage_ArchiveInfo_GetTextID+0x3c>
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
je     11a1 <TapeImage_ArchiveInfo_GetTextID+0xa1>
jmp    114d <TapeImage_ArchiveInfo_GetTextID+0x4d>
mov    -0x10(%rbp),%eax
sub    $0x4,%eax
je     11b1 <TapeImage_ArchiveInfo_GetTextID+0xb1>
jmp    115e <TapeImage_ArchiveInfo_GetTextID+0x5e>
mov    -0x10(%rbp),%eax
sub    $0xff,%eax
je     11c1 <TapeImage_ArchiveInfo_GetTextID+0xc1>
jmp    11d1 <TapeImage_ArchiveInfo_GetTextID+0xd1>
lea    0xe88(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11dc <TapeImage_ArchiveInfo_GetTextID+0xdc>
lea    0xe83(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11dc <TapeImage_ArchiveInfo_GetTextID+0xdc>
lea    0xe8c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11dc <TapeImage_ArchiveInfo_GetTextID+0xdc>
lea    0xe86(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11dc <TapeImage_ArchiveInfo_GetTextID+0xdc>
lea    0xe8a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11dc <TapeImage_ArchiveInfo_GetTextID+0xdc>
lea    0xe83(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11dc <TapeImage_ArchiveInfo_GetTextID+0xdc>
lea    0xe7c(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TapeImage_ArchiveInfo_GetTextID>:
cmp    $0x4,%edi
ja     1126 <TapeImage_ArchiveInfo_GetTextID+0x26>
lea    0xf08(%rip),%rax
mov    %edi,%ecx
lea    0xeeb(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xefa(%rip),%rax
ret
cmp    $0xff,%edi
jne    114e <TapeImage_ArchiveInfo_GetTextID+0x4e>
lea    0xf2a(%rip),%rax
ret
lea    0xefb(%rip),%rax
ret
lea    0xefd(%rip),%rax
ret
lea    0xf09(%rip),%rax
ret
lea    0xf13(%rip),%rax
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Full Title\00"
@.str.1 = [25 x i8] c"Software House/Publisher\00"
@.str.2 = [10 x i8] c"Author(s)\00"
@.str.3 = [20 x i8] c"Year of Publication\00"
@.str.4 = [9 x i8] c"Language\00"
@.str.5 = [9 x i8] c"Comments\00"
@.str.6 = [8 x i8] c"Unknown\00"
define i8* @TapeImage_ArchiveInfo_GetTextID(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %11 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 255, label %10
]
5: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %2
br label %12
6: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %12
7: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %12
8: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %12
9: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %12
10: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %12
11: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %12
12: ; preds = %11, %10, %9, %8, %7, %6, %5
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
@.str = [11 x i8] c"Full Title\00"
@.str.1 = [25 x i8] c"Software House/Publisher\00"
@.str.2 = [10 x i8] c"Author(s)\00"
@.str.3 = [20 x i8] c"Year of Publication\00"
@.str.4 = [9 x i8] c"Language\00"
@.str.5 = [9 x i8] c"Comments\00"
@.str.6 = [8 x i8] c"Unknown\00"
define i8* @TapeImage_ArchiveInfo_GetTextID(i32 %0) {
switch i32 %0, label %7 [
i32 0, label %8
i32 1, label %2
i32 2, label %3
i32 3, label %4
i32 4, label %5
i32 255, label %6
]
2: ; preds = %1
br label %8
3: ; preds = %1
br label %8
4: ; preds = %1
br label %8
5: ; preds = %1
br label %8
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %6, %5, %4, %3, %2
%9 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %9
}