const char *lvsStrerror(int rc) {
  switch (rc) {
  case 3 | 0x40000000:
    return "quotation mismatch";
  case 4:
    return "unexpected end of file";
  case 5:
    return "unexpected arguments";
  case 6:
    return "equal (=) expected after command";
  case 7:
    return "missing arguments";
  case 8:
    return "invalid host name or ip address";
  case 9:
    return "invalid argument";
  case 10:
    return "integer expected";
  case 11:
    return "boolean expected";
  case 12:
    return "unknown command";
  case 13:
    return "list expected";
  case 15:
    return "Cannot use both virtual AND failover services";
  case 16:
    return "Bad subnet mask specified";
  }
  return "unknown error";
}


x86 assembly (clang, -O0):
<lvsStrerror>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x4,%eax
je     11f9 <lvsStrerror+0xf9>
jmp    111b <lvsStrerror+0x1b>
mov    -0x10(%rbp),%eax
sub    $0x5,%eax
je     1209 <lvsStrerror+0x109>
jmp    112c <lvsStrerror+0x2c>
mov    -0x10(%rbp),%eax
sub    $0x6,%eax
je     1219 <lvsStrerror+0x119>
jmp    113d <lvsStrerror+0x3d>
mov    -0x10(%rbp),%eax
sub    $0x7,%eax
je     1229 <lvsStrerror+0x129>
jmp    114e <lvsStrerror+0x4e>
mov    -0x10(%rbp),%eax
sub    $0x8,%eax
je     1239 <lvsStrerror+0x139>
jmp    115f <lvsStrerror+0x5f>
mov    -0x10(%rbp),%eax
sub    $0x9,%eax
je     1249 <lvsStrerror+0x149>
jmp    1170 <lvsStrerror+0x70>
mov    -0x10(%rbp),%eax
sub    $0xa,%eax
je     1259 <lvsStrerror+0x159>
jmp    1181 <lvsStrerror+0x81>
mov    -0x10(%rbp),%eax
sub    $0xb,%eax
je     1269 <lvsStrerror+0x169>
jmp    1192 <lvsStrerror+0x92>
mov    -0x10(%rbp),%eax
sub    $0xc,%eax
je     1279 <lvsStrerror+0x179>
jmp    11a3 <lvsStrerror+0xa3>
mov    -0x10(%rbp),%eax
sub    $0xd,%eax
je     1289 <lvsStrerror+0x189>
jmp    11b4 <lvsStrerror+0xb4>
mov    -0x10(%rbp),%eax
sub    $0xf,%eax
je     1299 <lvsStrerror+0x199>
jmp    11c5 <lvsStrerror+0xc5>
mov    -0x10(%rbp),%eax
sub    $0x10,%eax
je     12a9 <lvsStrerror+0x1a9>
jmp    11d6 <lvsStrerror+0xd6>
mov    -0x10(%rbp),%eax
sub    $0x40000003,%eax
jne    12b9 <lvsStrerror+0x1b9>
jmp    11e9 <lvsStrerror+0xe9>
lea    0xe10(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12c4 <lvsStrerror+0x1c4>
lea    0xe13(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12c4 <lvsStrerror+0x1c4>
lea    0xe1a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12c4 <lvsStrerror+0x1c4>
lea    0xe1f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12c4 <lvsStrerror+0x1c4>
lea    0xe30(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12c4 <lvsStrerror+0x1c4>
lea    0xe32(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12c4 <lvsStrerror+0x1c4>
lea    0xe42(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12c4 <lvsStrerror+0x1c4>
lea    0xe43(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12c4 <lvsStrerror+0x1c4>
lea    0xe44(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12c4 <lvsStrerror+0x1c4>
lea    0xe45(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12c4 <lvsStrerror+0x1c4>
lea    0xe45(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12c4 <lvsStrerror+0x1c4>
lea    0xe43(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12c4 <lvsStrerror+0x1c4>
lea    0xe61(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12c4 <lvsStrerror+0x1c4>
lea    0xe6b(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lvsStrerror>:
lea    -0x4(%rdi),%eax
cmp    $0xc,%eax
ja     1120 <lvsStrerror+0x20>
lea    0xef1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf28(%rip),%rax
ret
cmp    $0x40000003,%edi
jne    1130 <lvsStrerror+0x30>
lea    0xf05(%rip),%rax
ret
lea    0x1028(%rip),%rax
ret
lea    0xf1f(%rip),%rax
ret
lea    0xf2c(%rip),%rax
ret
lea    0xf45(%rip),%rax
ret
lea    0xf4f(%rip),%rax
ret
lea    0xf67(%rip),%rax
ret
lea    0xf70(%rip),%rax
ret
lea    0xf79(%rip),%rax
ret
lea    0xf82(%rip),%rax
ret
lea    0xf8a(%rip),%rax
ret
lea    0xf90(%rip),%rax
ret
lea    0xfb6(%rip),%rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"quotation mismatch\00"
@.str.1 = [23 x i8] c"unexpected end of file\00"
@.str.2 = [21 x i8] c"unexpected arguments\00"
@.str.3 = [33 x i8] c"equal (=) expected after command\00"
@.str.4 = [18 x i8] c"missing arguments\00"
@.str.5 = [32 x i8] c"invalid host name or ip address\00"
@.str.6 = [17 x i8] c"invalid argument\00"
@.str.7 = [17 x i8] c"integer expected\00"
@.str.8 = [17 x i8] c"boolean expected\00"
@.str.9 = [16 x i8] c"unknown command\00"
@.str.10 = [14 x i8] c"list expected\00"
@.str.11 = [46 x i8] c"Cannot use both virtual AND failover services\00"
@.str.12 = [26 x i8] c"Bad subnet mask specified\00"
@.str.13 = [14 x i8] c"unknown error\00"
define i8* @lvsStrerror(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %18 [
i32 1073741827, label %5
i32 4, label %6
i32 5, label %7
i32 6, label %8
i32 7, label %9
i32 8, label %10
i32 9, label %11
i32 10, label %12
i32 11, label %13
i32 12, label %14
i32 13, label %15
i32 15, label %16
i32 16, label %17
]
5: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8** %2
br label %19
6: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %19
7: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %19
8: ; preds = %1
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %19
9: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %19
10: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %19
11: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %19
12: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %19
13: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %19
14: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %19
15: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %19
16: ; preds = %1
store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %19
17: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %19
18: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %19
19: ; preds = %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
@.str = [19 x i8] c"quotation mismatch\00"
@.str.1 = [23 x i8] c"unexpected end of file\00"
@.str.2 = [21 x i8] c"unexpected arguments\00"
@.str.3 = [33 x i8] c"equal (=) expected after command\00"
@.str.4 = [18 x i8] c"missing arguments\00"
@.str.5 = [32 x i8] c"invalid host name or ip address\00"
@.str.6 = [17 x i8] c"invalid argument\00"
@.str.7 = [17 x i8] c"integer expected\00"
@.str.8 = [17 x i8] c"boolean expected\00"
@.str.9 = [16 x i8] c"unknown command\00"
@.str.10 = [14 x i8] c"list expected\00"
@.str.11 = [46 x i8] c"Cannot use both virtual AND failover services\00"
@.str.12 = [26 x i8] c"Bad subnet mask specified\00"
@.str.13 = [14 x i8] c"unknown error\00"
define i8* @lvsStrerror(i32 %0) {
switch i32 %0, label %14 [
i32 1073741827, label %15
i32 4, label %2
i32 5, label %3
i32 6, label %4
i32 7, label %5
i32 8, label %6
i32 9, label %7
i32 10, label %8
i32 11, label %9
i32 12, label %10
i32 13, label %11
i32 15, label %12
i32 16, label %13
]
2: ; preds = %1
br label %15
3: ; preds = %1
br label %15
4: ; preds = %1
br label %15
5: ; preds = %1
br label %15
6: ; preds = %1
br label %15
7: ; preds = %1
br label %15
8: ; preds = %1
br label %15
9: ; preds = %1
br label %15
10: ; preds = %1
br label %15
11: ; preds = %1
br label %15
12: ; preds = %1
br label %15
13: ; preds = %1
br label %15
14: ; preds = %1
br label %15
15: ; preds = %1, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%16 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([46 x i8], [46 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %16
}