char *get_db_version(int version) {
  char *name;
  switch (version) {
  case 0x02:
    name = "FoxBase";
    break;
  case 0x03:
    name = "FoxBase+/dBASE III+";
    break;
  case 0x04:
    name = "dBASE IV";
    break;
  case 0x05:
    name = "dBASE 5.0";
    break;
  case 0x83:
    name = "FoxBase+/dBASE III+";
    break;
  case 0x8B:
    name = "dBASE IV";
    break;
  case 0x30:
    name = "Visual FoxPro";
    break;
  case 0xF5:
    name = "FoxPro 2.0";
    break;
  }
  return name;
}


x86 assembly (clang, -O0):
<get_db_version>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x2,%eax
je     1198 <get_db_version+0x98>
jmp    111b <get_db_version+0x1b>
mov    -0x14(%rbp),%eax
sub    $0x3,%eax
je     11a8 <get_db_version+0xa8>
jmp    112c <get_db_version+0x2c>
mov    -0x14(%rbp),%eax
sub    $0x4,%eax
je     11b8 <get_db_version+0xb8>
jmp    113d <get_db_version+0x3d>
mov    -0x14(%rbp),%eax
sub    $0x5,%eax
je     11c8 <get_db_version+0xc8>
jmp    114e <get_db_version+0x4e>
mov    -0x14(%rbp),%eax
sub    $0x30,%eax
je     11f8 <get_db_version+0xf8>
jmp    115f <get_db_version+0x5f>
mov    -0x14(%rbp),%eax
sub    $0x83,%eax
je     11d8 <get_db_version+0xd8>
jmp    1172 <get_db_version+0x72>
mov    -0x14(%rbp),%eax
sub    $0x8b,%eax
je     11e8 <get_db_version+0xe8>
jmp    1185 <get_db_version+0x85>
mov    -0x14(%rbp),%eax
sub    $0xf5,%eax
je     1208 <get_db_version+0x108>
jmp    1213 <get_db_version+0x113>
lea    0xe61(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1213 <get_db_version+0x113>
lea    0xe59(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1213 <get_db_version+0x113>
lea    0xe5d(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1213 <get_db_version+0x113>
lea    0xe56(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1213 <get_db_version+0x113>
lea    0xe29(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1213 <get_db_version+0x113>
lea    0xe2d(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1213 <get_db_version+0x113>
lea    0xe30(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1213 <get_db_version+0x113>
lea    0xe2e(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_db_version>:
lea    0xef9(%rip),%rax
cmp    $0x2f,%edi
jle    1122 <get_db_version+0x22>
cmp    $0x8a,%edi
jg     1139 <get_db_version+0x39>
cmp    $0x30,%edi
je     1161 <get_db_version+0x61>
cmp    $0x83,%edi
je     1151 <get_db_version+0x51>
ret
cmp    $0x3,%edi
je     1151 <get_db_version+0x51>
cmp    $0x4,%edi
je     1159 <get_db_version+0x59>
cmp    $0x5,%edi
jne    1121 <get_db_version+0x21>
lea    0xeed(%rip),%rax
ret
cmp    $0x8b,%edi
je     1159 <get_db_version+0x59>
cmp    $0xf5,%edi
jne    1121 <get_db_version+0x21>
lea    0xeed(%rip),%rax
ret
lea    0xeb0(%rip),%rax
ret
lea    0xebc(%rip),%rax
ret
lea    0xec7(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"FoxBase\00"
@.str.1 = [20 x i8] c"FoxBase+/dBASE III+\00"
@.str.2 = [9 x i8] c"dBASE IV\00"
@.str.3 = [10 x i8] c"dBASE 5.0\00"
@.str.4 = [14 x i8] c"Visual FoxPro\00"
@.str.5 = [11 x i8] c"FoxPro 2.0\00"
define i8* @get_db_version(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %13 [
i32 2, label %5
i32 3, label %6
i32 4, label %7
i32 5, label %8
i32 131, label %9
i32 139, label %10
i32 48, label %11
i32 245, label %12
]
5: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
br label %13
6: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %13
7: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %13
8: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %13
9: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %13
10: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %13
11: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %13
12: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %13
13: ; preds = %1, %12, %11, %10, %9, %8, %7, %6, %5
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [8 x i8] c"FoxBase\00"
@.str.1 = [20 x i8] c"FoxBase+/dBASE III+\00"
@.str.2 = [9 x i8] c"dBASE IV\00"
@.str.3 = [10 x i8] c"dBASE 5.0\00"
@.str.4 = [14 x i8] c"Visual FoxPro\00"
@.str.5 = [11 x i8] c"FoxPro 2.0\00"
define i8* @get_db_version(i32 %0) {
switch i32 %0, label %9 [
i32 245, label %8
i32 3, label %2
i32 4, label %3
i32 5, label %4
i32 131, label %5
i32 139, label %6
i32 48, label %7
]
2: ; preds = %1
br label %9
3: ; preds = %1
br label %9
4: ; preds = %1
br label %9
5: ; preds = %1
br label %9
6: ; preds = %1
br label %9
7: ; preds = %1
br label %9
8: ; preds = %1
br label %9
9: ; preds = %1, %8, %7, %6, %5, %4, %3, %2
%10 = phi i8* [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), %8 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), %7 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), %6 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), %5 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %10
}