const char *get_desc(unsigned int index) {
  const static char *strs[] = {
      "Not found",           "Exists already", "Out of space",
      "Invalidated archive", "Unacceptable",   "Verification Failure",
      "Not supported",       "Unknown",        "Success,"};
  if (index == 0)
    return strs[8];
  if (index >= 100 && index < 180)
    return strs[0];
  else if (index >= 180 && index < 200)
    return strs[1];
  else if (index >= 200 && index < 220)
    return strs[2];
  else if (index >= 220 && index < 230)
    return strs[3];
  else if (index >= 230 && index < 340)
    return strs[4];
  else if (index >= 390 && index < 400)
    return strs[5];
  else if (index >= 760 && index < 780)
    return strs[6];
  return strs[7];
}


x86 assembly (clang, -O0):
<get_desc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1121 <get_desc+0x21>
mov    0x2f58(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126d <get_desc+0x16d>
cmpl   $0x64,-0xc(%rbp)
jb     1148 <get_desc+0x48>
cmpl   $0xb4,-0xc(%rbp)
jae    1148 <get_desc+0x48>
mov    0x2ef1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126d <get_desc+0x16d>
cmpl   $0xb4,-0xc(%rbp)
jb     1172 <get_desc+0x72>
cmpl   $0xc8,-0xc(%rbp)
jae    1172 <get_desc+0x72>
mov    0x2ecf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126d <get_desc+0x16d>
cmpl   $0xc8,-0xc(%rbp)
jb     119c <get_desc+0x9c>
cmpl   $0xdc,-0xc(%rbp)
jae    119c <get_desc+0x9c>
mov    0x2ead(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126d <get_desc+0x16d>
cmpl   $0xdc,-0xc(%rbp)
jb     11c6 <get_desc+0xc6>
cmpl   $0xe6,-0xc(%rbp)
jae    11c6 <get_desc+0xc6>
mov    0x2e8b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126d <get_desc+0x16d>
cmpl   $0xe6,-0xc(%rbp)
jb     11f0 <get_desc+0xf0>
cmpl   $0x154,-0xc(%rbp)
jae    11f0 <get_desc+0xf0>
mov    0x2e69(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126d <get_desc+0x16d>
cmpl   $0x186,-0xc(%rbp)
jb     121a <get_desc+0x11a>
cmpl   $0x190,-0xc(%rbp)
jae    121a <get_desc+0x11a>
mov    0x2e47(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126d <get_desc+0x16d>
cmpl   $0x2f8,-0xc(%rbp)
jb     1244 <get_desc+0x144>
cmpl   $0x30c,-0xc(%rbp)
jae    1244 <get_desc+0x144>
mov    0x2e25(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126d <get_desc+0x16d>
jmp    1249 <get_desc+0x149>
jmp    124e <get_desc+0x14e>
jmp    1253 <get_desc+0x153>
jmp    1258 <get_desc+0x158>
jmp    125d <get_desc+0x15d>
jmp    1262 <get_desc+0x162>
mov    0x2dff(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_desc>:
test   %edi,%edi
je     1114 <get_desc+0x14>
lea    -0x64(%rdi),%eax
cmp    $0x50,%eax
jae    111c <get_desc+0x1c>
lea    0xeed(%rip),%rax
ret
lea    0xf57(%rip),%rax
ret
lea    -0xb4(%rdi),%eax
cmp    $0x14,%eax
jae    112f <get_desc+0x2f>
lea    0xedc(%rip),%rax
ret
lea    -0xc8(%rdi),%eax
cmp    $0x14,%eax
jae    1142 <get_desc+0x42>
lea    0xed8(%rip),%rax
ret
lea    -0xdc(%rdi),%eax
cmp    $0xa,%eax
jae    1155 <get_desc+0x55>
lea    0xed2(%rip),%rax
ret
lea    -0xe6(%rdi),%eax
cmp    $0x6e,%eax
jae    1168 <get_desc+0x68>
lea    0xed3(%rip),%rax
ret
lea    -0x186(%rdi),%eax
cmp    $0xa,%eax
jae    117b <get_desc+0x7b>
lea    0xecd(%rip),%rax
ret
add    $0xfffffd08,%edi
cmp    $0x14,%edi
lea    0xed1(%rip),%rcx
lea    0xed8(%rip),%rax
cmovb  %rcx,%rax
ret

LLVM IR (-O0):
@get_desc.strs = internal global [9 x i8*] [i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i32 0, i32 0)]
@.str = [10 x i8] c"Not found\00"
@.str.1 = [15 x i8] c"Exists already\00"
@.str.2 = [13 x i8] c"Out of space\00"
@.str.3 = [20 x i8] c"Invalidated archive\00"
@.str.4 = [13 x i8] c"Unacceptable\00"
@.str.5 = [21 x i8] c"Verification Failure\00"
@.str.6 = [14 x i8] c"Not supported\00"
@.str.7 = [8 x i8] c"Unknown\00"
@.str.8 = [9 x i8] c"Success,\00"
define i8* @get_desc(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i8*, i8** getelementptr inbounds ([9 x i8*], [9 x i8*]* @get_desc.strs, i64 0, i64 8)
store i8* %7, i8** %2
br label %72
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp uge i32 %9, 100
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp ult i32 %12, 180
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = load i8*, i8** getelementptr inbounds ([9 x i8*], [9 x i8*]* @get_desc.strs, i64 0, i64 0)
store i8* %15, i8** %2
br label %72
16: ; preds = %11, %8
%17 = load i32, i32* %3
%18 = icmp uge i32 %17, 180
br i1 %18, label %19, label %24
19: ; preds = %16
%20 = load i32, i32* %3
%21 = icmp ult i32 %20, 200
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = load i8*, i8** getelementptr inbounds ([9 x i8*], [9 x i8*]* @get_desc.strs, i64 0, i64 1)
store i8* %23, i8** %2
br label %72
24: ; preds = %19, %16
%25 = load i32, i32* %3
%26 = icmp uge i32 %25, 200
br i1 %26, label %27, label %32
27: ; preds = %24
%28 = load i32, i32* %3
%29 = icmp ult i32 %28, 220
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = load i8*, i8** getelementptr inbounds ([9 x i8*], [9 x i8*]* @get_desc.strs, i64 0, i64 2)
store i8* %31, i8** %2
br label %72
32: ; preds = %27, %24
%33 = load i32, i32* %3
%34 = icmp uge i32 %33, 220
br i1 %34, label %35, label %40
35: ; preds = %32
%36 = load i32, i32* %3
%37 = icmp ult i32 %36, 230
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = load i8*, i8** getelementptr inbounds ([9 x i8*], [9 x i8*]* @get_desc.strs, i64 0, i64 3)
store i8* %39, i8** %2
br label %72
40: ; preds = %35, %32
%41 = load i32, i32* %3
%42 = icmp uge i32 %41, 230
br i1 %42, label %43, label %48
43: ; preds = %40
%44 = load i32, i32* %3
%45 = icmp ult i32 %44, 340
br i1 %45, label %46, label %48
46: ; preds = %43
%47 = load i8*, i8** getelementptr inbounds ([9 x i8*], [9 x i8*]* @get_desc.strs, i64 0, i64 4)
store i8* %47, i8** %2
br label %72
48: ; preds = %43, %40
%49 = load i32, i32* %3
%50 = icmp uge i32 %49, 390
br i1 %50, label %51, label %56
51: ; preds = %48
%52 = load i32, i32* %3
%53 = icmp ult i32 %52, 400
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = load i8*, i8** getelementptr inbounds ([9 x i8*], [9 x i8*]* @get_desc.strs, i64 0, i64 5)
store i8* %55, i8** %2
br label %72
56: ; preds = %51, %48
%57 = load i32, i32* %3
%58 = icmp uge i32 %57, 760
br i1 %58, label %59, label %64
59: ; preds = %56
%60 = load i32, i32* %3
%61 = icmp ult i32 %60, 780
br i1 %61, label %62, label %64
62: ; preds = %59
%63 = load i8*, i8** getelementptr inbounds ([9 x i8*], [9 x i8*]* @get_desc.strs, i64 0, i64 6)
store i8* %63, i8** %2
br label %72
64: ; preds = %59, %56
br label %65
65: ; preds = %64
br label %66
66: ; preds = %65
br label %67
67: ; preds = %66
br label %68
68: ; preds = %67
br label %69
69: ; preds = %68
br label %70
70: ; preds = %69
%71 = load i8*, i8** getelementptr inbounds ([9 x i8*], [9 x i8*]* @get_desc.strs, i64 0, i64 7)
store i8* %71, i8** %2
br label %72
72: ; preds = %70, %62, %54, %46, %38, %30, %22, %14, %6
%73 = load i8*, i8** %2
ret i8* %73
}

LLVM IR (-O2):
@.str = [10 x i8] c"Not found\00"
@.str.1 = [15 x i8] c"Exists already\00"
@.str.2 = [13 x i8] c"Out of space\00"
@.str.3 = [20 x i8] c"Invalidated archive\00"
@.str.4 = [13 x i8] c"Unacceptable\00"
@.str.5 = [21 x i8] c"Verification Failure\00"
@.str.6 = [14 x i8] c"Not supported\00"
@.str.7 = [8 x i8] c"Unknown\00"
@.str.8 = [9 x i8] c"Success,\00"
define i8* @get_desc(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %25, label %3
3: ; preds = %1
%4 = add i32 %0, -100
%5 = icmp ult i32 %4, 80
br i1 %5, label %25, label %6
6: ; preds = %3
%7 = add i32 %0, -180
%8 = icmp ult i32 %7, 20
br i1 %8, label %25, label %9
9: ; preds = %6
%10 = add i32 %0, -200
%11 = icmp ult i32 %10, 20
br i1 %11, label %25, label %12
12: ; preds = %9
%13 = add i32 %0, -220
%14 = icmp ult i32 %13, 10
br i1 %14, label %25, label %15
15: ; preds = %12
%16 = add i32 %0, -230
%17 = icmp ult i32 %16, 110
br i1 %17, label %25, label %18
18: ; preds = %15
%19 = add i32 %0, -390
%20 = icmp ult i32 %19, 10
br i1 %20, label %25, label %21
21: ; preds = %18
%22 = add i32 %0, -760
%23 = icmp ult i32 %22, 20
%24 = select i1 %23, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0)
br label %25
25: ; preds = %21, %18, %15, %12, %9, %6, %3, %1
%26 = phi i8* [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), %1 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), %3 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), %6 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), %9 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), %12 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), %15 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), %18 ], [ %24, %21 ]
ret i8* %26
}