const char *janus_get_api_error(int error) {
  switch (error) {
  case 0:
    return "Success";
  case 403:
    return "Unauthorized request (wrong or missing secret/token)";
  case 405:
    return "Unauthorized access to plugin (token is not allowed to)";
  case 490:
    return "Unknown error";
  case 450:
    return "Transport specific error";
  case 452:
    return "Missing request";
  case 453:
    return "Unknown request";
  case 454:
    return "Invalid JSON";
  case 455:
    return "Invalid JSON Object";
  case 456:
    return "Missing mandatory element";
  case 457:
    return "Invalid path for this request";
  case 458:
    return "Session not found";
  case 459:
    return "Handle not found";
  case 460:
    return "Plugin not found";
  case 461:
    return "Error attaching plugin";
  case 462:
    return "Error sending message to plugin";
  case 463:
    return "Error detaching from plugin";
  case 464:
    return "Unsupported JSEP type";
  case 465:
    return "Invalid SDP";
  case 466:
    return "Invalid stream";
  case 467:
    return "Invalid element type";
  case 468:
    return "Session ID already in use";
  case 469:
    return "Unexpected ANSWER (no OFFER)";
  case 470:
    return "Token not found";
  default:
    return "Unknown error";
  }
  return "Unknown error";
}


x86 assembly (clang, -O0):
<janus_get_api_error>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     12cf <janus_get_api_error+0x1cf>
jmp    111a <janus_get_api_error+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x193,%eax
je     12df <janus_get_api_error+0x1df>
jmp    112d <janus_get_api_error+0x2d>
mov    -0x10(%rbp),%eax
sub    $0x195,%eax
je     12ef <janus_get_api_error+0x1ef>
jmp    1140 <janus_get_api_error+0x40>
mov    -0x10(%rbp),%eax
sub    $0x1c2,%eax
je     130f <janus_get_api_error+0x20f>
jmp    1153 <janus_get_api_error+0x53>
mov    -0x10(%rbp),%eax
sub    $0x1c4,%eax
je     131f <janus_get_api_error+0x21f>
jmp    1166 <janus_get_api_error+0x66>
mov    -0x10(%rbp),%eax
sub    $0x1c5,%eax
je     132f <janus_get_api_error+0x22f>
jmp    1179 <janus_get_api_error+0x79>
mov    -0x10(%rbp),%eax
sub    $0x1c6,%eax
je     133f <janus_get_api_error+0x23f>
jmp    118c <janus_get_api_error+0x8c>
mov    -0x10(%rbp),%eax
sub    $0x1c7,%eax
je     134f <janus_get_api_error+0x24f>
jmp    119f <janus_get_api_error+0x9f>
mov    -0x10(%rbp),%eax
sub    $0x1c8,%eax
je     135f <janus_get_api_error+0x25f>
jmp    11b2 <janus_get_api_error+0xb2>
mov    -0x10(%rbp),%eax
sub    $0x1c9,%eax
je     136f <janus_get_api_error+0x26f>
jmp    11c5 <janus_get_api_error+0xc5>
mov    -0x10(%rbp),%eax
sub    $0x1ca,%eax
je     137f <janus_get_api_error+0x27f>
jmp    11d8 <janus_get_api_error+0xd8>
mov    -0x10(%rbp),%eax
sub    $0x1cb,%eax
je     138f <janus_get_api_error+0x28f>
jmp    11eb <janus_get_api_error+0xeb>
mov    -0x10(%rbp),%eax
sub    $0x1cc,%eax
je     139f <janus_get_api_error+0x29f>
jmp    11fe <janus_get_api_error+0xfe>
mov    -0x10(%rbp),%eax
sub    $0x1cd,%eax
je     13af <janus_get_api_error+0x2af>
jmp    1211 <janus_get_api_error+0x111>
mov    -0x10(%rbp),%eax
sub    $0x1ce,%eax
je     13bf <janus_get_api_error+0x2bf>
jmp    1224 <janus_get_api_error+0x124>
mov    -0x10(%rbp),%eax
sub    $0x1cf,%eax
je     13cf <janus_get_api_error+0x2cf>
jmp    1237 <janus_get_api_error+0x137>
mov    -0x10(%rbp),%eax
sub    $0x1d0,%eax
je     13df <janus_get_api_error+0x2df>
jmp    124a <janus_get_api_error+0x14a>
mov    -0x10(%rbp),%eax
sub    $0x1d1,%eax
je     13ef <janus_get_api_error+0x2ef>
jmp    125d <janus_get_api_error+0x15d>
mov    -0x10(%rbp),%eax
sub    $0x1d2,%eax
je     13ff <janus_get_api_error+0x2ff>
jmp    1270 <janus_get_api_error+0x170>
mov    -0x10(%rbp),%eax
sub    $0x1d3,%eax
je     140f <janus_get_api_error+0x30f>
jmp    1283 <janus_get_api_error+0x183>
mov    -0x10(%rbp),%eax
sub    $0x1d4,%eax
je     141f <janus_get_api_error+0x31f>
jmp    1296 <janus_get_api_error+0x196>
mov    -0x10(%rbp),%eax
sub    $0x1d5,%eax
je     142f <janus_get_api_error+0x32f>
jmp    12a9 <janus_get_api_error+0x1a9>
mov    -0x10(%rbp),%eax
sub    $0x1d6,%eax
je     143f <janus_get_api_error+0x33f>
jmp    12bc <janus_get_api_error+0x1bc>
mov    -0x10(%rbp),%eax
sub    $0x1ea,%eax
je     12ff <janus_get_api_error+0x1ff>
jmp    144f <janus_get_api_error+0x34f>
lea    0xd2a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd22(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd47(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd6f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd6d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd76(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd76(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd76(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd73(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd77(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd81(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd8f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd91(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd92(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd93(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xd9a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xdaa(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xdb6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xdbc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xdb8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xdb7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xdbc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xdc6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xdd3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    145a <janus_get_api_error+0x35a>
lea    0xc1f(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<janus_get_api_error>:
lea    -0x193(%rdi),%eax
cmp    $0x57,%eax
ja     1123 <janus_get_api_error+0x23>
lea    0xeee(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1046(%rip),%rax
ret
test   %edi,%edi
jne    112f <janus_get_api_error+0x2f>
lea    0x1032(%rip),%rax
ret
lea    0x109f(%rip),%rax
ret
lea    0x105f(%rip),%rax
ret
lea    0x109d(%rip),%rax
ret
lea    0x10ae(%rip),%rax
ret
lea    0x10b6(%rip),%rax
ret
lea    0x10be(%rip),%rax
ret
lea    0x10c3(%rip),%rax
ret
lea    0x10cf(%rip),%rax
ret
lea    0x10e1(%rip),%rax
ret
lea    0x10f7(%rip),%rax
ret
lea    0x1101(%rip),%rax
ret
lea    0x110a(%rip),%rax
ret
lea    0x1113(%rip),%rax
ret
lea    0x1122(%rip),%rax
ret
lea    0x113a(%rip),%rax
ret
lea    0x114e(%rip),%rax
ret
lea    0x115c(%rip),%rax
ret
lea    0x1160(%rip),%rax
ret
lea    0x1167(%rip),%rax
ret
lea    0x1174(%rip),%rax
ret
lea    0x1186(%rip),%rax
ret
lea    0x119b(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Success\00"
@.str.1 = [53 x i8] c"Unauthorized request (wrong or missing secret/token)\00"
@.str.2 = [56 x i8] c"Unauthorized access to plugin (token is not allowed to)\00"
@.str.3 = [14 x i8] c"Unknown error\00"
@.str.4 = [25 x i8] c"Transport specific error\00"
@.str.5 = [16 x i8] c"Missing request\00"
@.str.6 = [16 x i8] c"Unknown request\00"
@.str.7 = [13 x i8] c"Invalid JSON\00"
@.str.8 = [20 x i8] c"Invalid JSON Object\00"
@.str.9 = [26 x i8] c"Missing mandatory element\00"
@.str.10 = [30 x i8] c"Invalid path for this request\00"
@.str.11 = [18 x i8] c"Session not found\00"
@.str.12 = [17 x i8] c"Handle not found\00"
@.str.13 = [17 x i8] c"Plugin not found\00"
@.str.14 = [23 x i8] c"Error attaching plugin\00"
@.str.15 = [32 x i8] c"Error sending message to plugin\00"
@.str.16 = [28 x i8] c"Error detaching from plugin\00"
@.str.17 = [22 x i8] c"Unsupported JSEP type\00"
@.str.18 = [12 x i8] c"Invalid SDP\00"
@.str.19 = [15 x i8] c"Invalid stream\00"
@.str.20 = [21 x i8] c"Invalid element type\00"
@.str.21 = [26 x i8] c"Session ID already in use\00"
@.str.22 = [29 x i8] c"Unexpected ANSWER (no OFFER)\00"
@.str.23 = [16 x i8] c"Token not found\00"
define i8* @janus_get_api_error(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %29 [
i32 0, label %5
i32 403, label %6
i32 405, label %7
i32 490, label %8
i32 450, label %9
i32 452, label %10
i32 453, label %11
i32 454, label %12
i32 455, label %13
i32 456, label %14
i32 457, label %15
i32 458, label %16
i32 459, label %17
i32 460, label %18
i32 461, label %19
i32 462, label %20
i32 463, label %21
i32 464, label %22
i32 465, label %23
i32 466, label %24
i32 467, label %25
i32 468, label %26
i32 469, label %27
i32 470, label %28
]
5: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %30
6: ; preds = %1
store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %30
7: ; preds = %1
store i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %30
8: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %30
9: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %30
10: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %30
11: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %30
12: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %30
13: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %30
14: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %30
15: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %30
16: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %30
17: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %30
18: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %30
19: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %30
20: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %30
21: ; preds = %1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %30
22: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %30
23: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %30
24: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %30
25: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %30
26: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %30
27: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %30
28: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.23, i64 0, i64 0), i8** %2
br label %30
29: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %30
30: ; preds = %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%31 = load i8*, i8** %2
ret i8* %31
}

LLVM IR (-O2):
@.str = [8 x i8] c"Success\00"
@.str.1 = [53 x i8] c"Unauthorized request (wrong or missing secret/token)\00"
@.str.2 = [56 x i8] c"Unauthorized access to plugin (token is not allowed to)\00"
@.str.3 = [14 x i8] c"Unknown error\00"
@.str.4 = [25 x i8] c"Transport specific error\00"
@.str.5 = [16 x i8] c"Missing request\00"
@.str.6 = [16 x i8] c"Unknown request\00"
@.str.7 = [13 x i8] c"Invalid JSON\00"
@.str.8 = [20 x i8] c"Invalid JSON Object\00"
@.str.9 = [26 x i8] c"Missing mandatory element\00"
@.str.10 = [30 x i8] c"Invalid path for this request\00"
@.str.11 = [18 x i8] c"Session not found\00"
@.str.12 = [17 x i8] c"Handle not found\00"
@.str.13 = [17 x i8] c"Plugin not found\00"
@.str.14 = [23 x i8] c"Error attaching plugin\00"
@.str.15 = [32 x i8] c"Error sending message to plugin\00"
@.str.16 = [28 x i8] c"Error detaching from plugin\00"
@.str.17 = [22 x i8] c"Unsupported JSEP type\00"
@.str.18 = [12 x i8] c"Invalid SDP\00"
@.str.19 = [15 x i8] c"Invalid stream\00"
@.str.20 = [21 x i8] c"Invalid element type\00"
@.str.21 = [26 x i8] c"Session ID already in use\00"
@.str.22 = [29 x i8] c"Unexpected ANSWER (no OFFER)\00"
@.str.23 = [16 x i8] c"Token not found\00"
define i8* @janus_get_api_error(i32 %0) {
switch i32 %0, label %25 [
i32 0, label %26
i32 403, label %2
i32 405, label %3
i32 490, label %4
i32 450, label %5
i32 452, label %6
i32 453, label %7
i32 454, label %8
i32 455, label %9
i32 456, label %10
i32 457, label %11
i32 458, label %12
i32 459, label %13
i32 460, label %14
i32 461, label %15
i32 462, label %16
i32 463, label %17
i32 464, label %18
i32 465, label %19
i32 466, label %20
i32 467, label %21
i32 468, label %22
i32 469, label %23
i32 470, label %24
]
2: ; preds = %1
br label %26
3: ; preds = %1
br label %26
4: ; preds = %1
br label %26
5: ; preds = %1
br label %26
6: ; preds = %1
br label %26
7: ; preds = %1
br label %26
8: ; preds = %1
br label %26
9: ; preds = %1
br label %26
10: ; preds = %1
br label %26
11: ; preds = %1
br label %26
12: ; preds = %1
br label %26
13: ; preds = %1
br label %26
14: ; preds = %1
br label %26
15: ; preds = %1
br label %26
16: ; preds = %1
br label %26
17: ; preds = %1
br label %26
18: ; preds = %1
br label %26
19: ; preds = %1
br label %26
20: ; preds = %1
br label %26
21: ; preds = %1
br label %26
22: ; preds = %1
br label %26
23: ; preds = %1
br label %26
24: ; preds = %1
br label %26
25: ; preds = %1
br label %26
26: ; preds = %1, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%27 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), %25 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.23, i64 0, i64 0), %24 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.22, i64 0, i64 0), %23 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.21, i64 0, i64 0), %22 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0), %21 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0), %20 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), %19 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0), %17 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([16 x i8], [16 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 ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([56 x i8], [56 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([53 x i8], [53 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* %27
}