const char *cceph_errno_str(int err_no) {
  switch (err_no) {
  case 0:
    return "OK";
  case (-1001):
    return "ConnectionNotFound";
  case (-1002):
    return "ConnectionClosed";
  case (-1003):
    return "WriteConnectionError";
  case (-1004):
    return "UnknownOp";
  case (-1005):
    return "NotEnoughServer";
  case (-1006):
    return "WrongClientID";
  case (-1007):
    return "NoEnoughMemory";
  case (-1008):
    return "CollectionAlreadyExist";
  case (-1009):
    return "CollectionNotExist";
  case (-1010):
    return "ObjectAlreadyExist";
  case (-1011):
    return "ObjectNotExist";
  case (-1012):
    return "MapNodeAlreadyExist";
  case (-1013):
    return "MapNodeNotExist";
  case (-1014):
    return "UnknownOsOp";
  }
  return "UnknowError";
}


x86 assembly (clang, -O0):
<cceph_errno_str>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0xfffffc0a,%eax
je     1304 <cceph_errno_str+0x204>
jmp    111d <cceph_errno_str+0x1d>
mov    -0x10(%rbp),%eax
sub    $0xfffffc0b,%eax
je     12f4 <cceph_errno_str+0x1f4>
jmp    1130 <cceph_errno_str+0x30>
mov    -0x10(%rbp),%eax
sub    $0xfffffc0c,%eax
je     12e4 <cceph_errno_str+0x1e4>
jmp    1143 <cceph_errno_str+0x43>
mov    -0x10(%rbp),%eax
sub    $0xfffffc0d,%eax
je     12d4 <cceph_errno_str+0x1d4>
jmp    1156 <cceph_errno_str+0x56>
mov    -0x10(%rbp),%eax
sub    $0xfffffc0e,%eax
je     12c4 <cceph_errno_str+0x1c4>
jmp    1169 <cceph_errno_str+0x69>
mov    -0x10(%rbp),%eax
sub    $0xfffffc0f,%eax
je     12b4 <cceph_errno_str+0x1b4>
jmp    117c <cceph_errno_str+0x7c>
mov    -0x10(%rbp),%eax
sub    $0xfffffc10,%eax
je     12a4 <cceph_errno_str+0x1a4>
jmp    118f <cceph_errno_str+0x8f>
mov    -0x10(%rbp),%eax
sub    $0xfffffc11,%eax
je     1294 <cceph_errno_str+0x194>
jmp    11a2 <cceph_errno_str+0xa2>
mov    -0x10(%rbp),%eax
sub    $0xfffffc12,%eax
je     1284 <cceph_errno_str+0x184>
jmp    11b5 <cceph_errno_str+0xb5>
mov    -0x10(%rbp),%eax
sub    $0xfffffc13,%eax
je     1274 <cceph_errno_str+0x174>
jmp    11c8 <cceph_errno_str+0xc8>
mov    -0x10(%rbp),%eax
sub    $0xfffffc14,%eax
je     1264 <cceph_errno_str+0x164>
jmp    11db <cceph_errno_str+0xdb>
mov    -0x10(%rbp),%eax
sub    $0xfffffc15,%eax
je     1254 <cceph_errno_str+0x154>
jmp    11ee <cceph_errno_str+0xee>
mov    -0x10(%rbp),%eax
sub    $0xfffffc16,%eax
je     1244 <cceph_errno_str+0x144>
jmp    1201 <cceph_errno_str+0x101>
mov    -0x10(%rbp),%eax
sub    $0xfffffc17,%eax
je     1234 <cceph_errno_str+0x134>
jmp    1214 <cceph_errno_str+0x114>
mov    -0x10(%rbp),%eax
test   %eax,%eax
jne    1314 <cceph_errno_str+0x214>
jmp    1224 <cceph_errno_str+0x124>
lea    0xdd5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdc8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdcb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdcc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdd1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdcb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdcb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdc9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdc8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdcf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdd2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdd5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdd4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdd8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdd8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    131f <cceph_errno_str+0x21f>
lea    0xdd4(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cceph_errno_str>:
lea    0x3f6(%rdi),%eax
cmp    $0xd,%eax
ja     1123 <cceph_errno_str+0x23>
lea    0xeee(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xff9(%rip),%rax
ret
test   %edi,%edi
jne    1197 <cceph_errno_str+0x97>
lea    0xf0a(%rip),%rax
ret
lea    0xfd5(%rip),%rax
ret
lea    0xfb9(%rip),%rax
ret
lea    0xfa2(%rip),%rax
ret
lea    0xf87(%rip),%rax
ret
lea    0xf6c(%rip),%rax
ret
lea    0xf4d(%rip),%rax
ret
lea    0xf36(%rip),%rax
ret
lea    0xf20(%rip),%rax
ret
lea    0xf08(%rip),%rax
ret
lea    0xef6(%rip),%rax
ret
lea    0xed9(%rip),%rax
ret
lea    0xec0(%rip),%rax
ret
lea    0xea5(%rip),%rax
ret
lea    0xf89(%rip),%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"OK\00"
@.str.1 = [19 x i8] c"ConnectionNotFound\00"
@.str.2 = [17 x i8] c"ConnectionClosed\00"
@.str.3 = [21 x i8] c"WriteConnectionError\00"
@.str.4 = [10 x i8] c"UnknownOp\00"
@.str.5 = [16 x i8] c"NotEnoughServer\00"
@.str.6 = [14 x i8] c"WrongClientID\00"
@.str.7 = [15 x i8] c"NoEnoughMemory\00"
@.str.8 = [23 x i8] c"CollectionAlreadyExist\00"
@.str.9 = [19 x i8] c"CollectionNotExist\00"
@.str.10 = [19 x i8] c"ObjectAlreadyExist\00"
@.str.11 = [15 x i8] c"ObjectNotExist\00"
@.str.12 = [20 x i8] c"MapNodeAlreadyExist\00"
@.str.13 = [16 x i8] c"MapNodeNotExist\00"
@.str.14 = [12 x i8] c"UnknownOsOp\00"
@.str.15 = [12 x i8] c"UnknowError\00"
define i8* @cceph_errno_str(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %20 [
i32 0, label %5
i32 -1001, label %6
i32 -1002, label %7
i32 -1003, label %8
i32 -1004, label %9
i32 -1005, label %10
i32 -1006, label %11
i32 -1007, label %12
i32 -1008, label %13
i32 -1009, label %14
i32 -1010, label %15
i32 -1011, label %16
i32 -1012, label %17
i32 -1013, label %18
i32 -1014, label %19
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %21
6: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %21
7: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %21
8: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %21
9: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %21
10: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %21
11: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %21
12: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %21
13: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %21
14: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %21
15: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %21
16: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %21
17: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %21
18: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %21
19: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %21
20: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %21
21: ; preds = %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%22 = load i8*, i8** %2
ret i8* %22
}

LLVM IR (-O2):
@.str = [3 x i8] c"OK\00"
@.str.1 = [19 x i8] c"ConnectionNotFound\00"
@.str.2 = [17 x i8] c"ConnectionClosed\00"
@.str.3 = [21 x i8] c"WriteConnectionError\00"
@.str.4 = [10 x i8] c"UnknownOp\00"
@.str.5 = [16 x i8] c"NotEnoughServer\00"
@.str.6 = [14 x i8] c"WrongClientID\00"
@.str.7 = [15 x i8] c"NoEnoughMemory\00"
@.str.8 = [23 x i8] c"CollectionAlreadyExist\00"
@.str.9 = [19 x i8] c"CollectionNotExist\00"
@.str.10 = [19 x i8] c"ObjectAlreadyExist\00"
@.str.11 = [15 x i8] c"ObjectNotExist\00"
@.str.12 = [20 x i8] c"MapNodeAlreadyExist\00"
@.str.13 = [16 x i8] c"MapNodeNotExist\00"
@.str.14 = [12 x i8] c"UnknownOsOp\00"
@.str.15 = [12 x i8] c"UnknowError\00"
define i8* @cceph_errno_str(i32 %0) {
switch i32 %0, label %16 [
i32 0, label %17
i32 -1001, label %2
i32 -1002, label %3
i32 -1003, label %4
i32 -1004, label %5
i32 -1005, label %6
i32 -1006, label %7
i32 -1007, label %8
i32 -1008, label %9
i32 -1009, label %10
i32 -1010, label %11
i32 -1011, label %12
i32 -1012, label %13
i32 -1013, label %14
i32 -1014, label %15
]
2: ; preds = %1
br label %17
3: ; preds = %1
br label %17
4: ; preds = %1
br label %17
5: ; preds = %1
br label %17
6: ; preds = %1
br label %17
7: ; preds = %1
br label %17
8: ; preds = %1
br label %17
9: ; preds = %1
br label %17
10: ; preds = %1
br label %17
11: ; preds = %1
br label %17
12: ; preds = %1
br label %17
13: ; preds = %1
br label %17
14: ; preds = %1
br label %17
15: ; preds = %1
br label %17
16: ; preds = %1
br label %17
17: ; preds = %1, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%18 = phi i8* [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %18
}