const char *janus_get_api_error(int error) {
  switch (error) {
  case 0:
    return "Success";
  case 403:
    return "Unauthorized request (wrong or missing secret)";
  case 490:
    return "Unknown error";
  case 450:
    return "Use GET";
  case 451:
    return "Use POST";
  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)";
  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     12bc <janus_get_api_error+0x1bc>
jmp    111a <janus_get_api_error+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x193,%eax
je     12cc <janus_get_api_error+0x1cc>
jmp    112d <janus_get_api_error+0x2d>
mov    -0x10(%rbp),%eax
sub    $0x1c2,%eax
je     12ec <janus_get_api_error+0x1ec>
jmp    1140 <janus_get_api_error+0x40>
mov    -0x10(%rbp),%eax
sub    $0x1c3,%eax
je     12fc <janus_get_api_error+0x1fc>
jmp    1153 <janus_get_api_error+0x53>
mov    -0x10(%rbp),%eax
sub    $0x1c4,%eax
je     130c <janus_get_api_error+0x20c>
jmp    1166 <janus_get_api_error+0x66>
mov    -0x10(%rbp),%eax
sub    $0x1c5,%eax
je     131c <janus_get_api_error+0x21c>
jmp    1179 <janus_get_api_error+0x79>
mov    -0x10(%rbp),%eax
sub    $0x1c6,%eax
je     132c <janus_get_api_error+0x22c>
jmp    118c <janus_get_api_error+0x8c>
mov    -0x10(%rbp),%eax
sub    $0x1c7,%eax
je     133c <janus_get_api_error+0x23c>
jmp    119f <janus_get_api_error+0x9f>
mov    -0x10(%rbp),%eax
sub    $0x1c8,%eax
je     134c <janus_get_api_error+0x24c>
jmp    11b2 <janus_get_api_error+0xb2>
mov    -0x10(%rbp),%eax
sub    $0x1c9,%eax
je     135c <janus_get_api_error+0x25c>
jmp    11c5 <janus_get_api_error+0xc5>
mov    -0x10(%rbp),%eax
sub    $0x1ca,%eax
je     136c <janus_get_api_error+0x26c>
jmp    11d8 <janus_get_api_error+0xd8>
mov    -0x10(%rbp),%eax
sub    $0x1cb,%eax
je     137c <janus_get_api_error+0x27c>
jmp    11eb <janus_get_api_error+0xeb>
mov    -0x10(%rbp),%eax
sub    $0x1cc,%eax
je     138c <janus_get_api_error+0x28c>
jmp    11fe <janus_get_api_error+0xfe>
mov    -0x10(%rbp),%eax
sub    $0x1cd,%eax
je     139c <janus_get_api_error+0x29c>
jmp    1211 <janus_get_api_error+0x111>
mov    -0x10(%rbp),%eax
sub    $0x1ce,%eax
je     13ac <janus_get_api_error+0x2ac>
jmp    1224 <janus_get_api_error+0x124>
mov    -0x10(%rbp),%eax
sub    $0x1cf,%eax
je     13bc <janus_get_api_error+0x2bc>
jmp    1237 <janus_get_api_error+0x137>
mov    -0x10(%rbp),%eax
sub    $0x1d0,%eax
je     13cc <janus_get_api_error+0x2cc>
jmp    124a <janus_get_api_error+0x14a>
mov    -0x10(%rbp),%eax
sub    $0x1d1,%eax
je     13dc <janus_get_api_error+0x2dc>
jmp    125d <janus_get_api_error+0x15d>
mov    -0x10(%rbp),%eax
sub    $0x1d2,%eax
je     13ec <janus_get_api_error+0x2ec>
jmp    1270 <janus_get_api_error+0x170>
mov    -0x10(%rbp),%eax
sub    $0x1d3,%eax
je     13fc <janus_get_api_error+0x2fc>
jmp    1283 <janus_get_api_error+0x183>
mov    -0x10(%rbp),%eax
sub    $0x1d4,%eax
je     140c <janus_get_api_error+0x30c>
jmp    1296 <janus_get_api_error+0x196>
mov    -0x10(%rbp),%eax
sub    $0x1d5,%eax
je     141c <janus_get_api_error+0x31c>
jmp    12a9 <janus_get_api_error+0x1a9>
mov    -0x10(%rbp),%eax
sub    $0x1ea,%eax
je     12dc <janus_get_api_error+0x1dc>
jmp    142c <janus_get_api_error+0x32c>
lea    0xd3d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd35(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd54(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd52(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd4a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd43(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd43(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd43(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd40(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd44(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd4e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd5c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd5e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd5f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd60(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd67(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd77(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd83(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd89(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd85(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd84(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd89(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xd93(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1437 <janus_get_api_error+0x337>
lea    0xc04(%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    0x1061(%rip),%rax
ret
lea    0x1067(%rip),%rax
ret
lea    0x1067(%rip),%rax
ret
lea    0x1068(%rip),%rax
ret
lea    0x1070(%rip),%rax
ret
lea    0x1078(%rip),%rax
ret
lea    0x107d(%rip),%rax
ret
lea    0x1089(%rip),%rax
ret
lea    0x109b(%rip),%rax
ret
lea    0x10b1(%rip),%rax
ret
lea    0x10bb(%rip),%rax
ret
lea    0x10c4(%rip),%rax
ret
lea    0x10cd(%rip),%rax
ret
lea    0x10dc(%rip),%rax
ret
lea    0x10f4(%rip),%rax
ret
lea    0x1108(%rip),%rax
ret
lea    0x1116(%rip),%rax
ret
lea    0x111a(%rip),%rax
ret
lea    0x1121(%rip),%rax
ret
lea    0x112e(%rip),%rax
ret
lea    0x1140(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Success\00"
@.str.1 = [47 x i8] c"Unauthorized request (wrong or missing secret)\00"
@.str.2 = [14 x i8] c"Unknown error\00"
@.str.3 = [8 x i8] c"Use GET\00"
@.str.4 = [9 x i8] c"Use POST\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"
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 %28 [
i32 0, label %5
i32 403, label %6
i32 490, label %7
i32 450, label %8
i32 451, 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
]
5: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %29
6: ; preds = %1
store i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %29
7: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %29
8: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %29
9: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %29
10: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %29
11: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %29
12: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %29
13: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %29
14: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %29
15: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %29
16: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %29
17: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %29
18: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %29
19: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %29
20: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %29
21: ; preds = %1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %29
22: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %29
23: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %29
24: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %29
25: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %29
26: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %29
27: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %29
28: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %29
29: ; preds = %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%30 = load i8*, i8** %2
ret i8* %30
}

LLVM IR (-O2):
@.str = [8 x i8] c"Success\00"
@.str.1 = [47 x i8] c"Unauthorized request (wrong or missing secret)\00"
@.str.2 = [14 x i8] c"Unknown error\00"
@.str.3 = [8 x i8] c"Use GET\00"
@.str.4 = [9 x i8] c"Use POST\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"
define i8* @janus_get_api_error(i32 %0) {
switch i32 %0, label %24 [
i32 0, label %25
i32 403, label %2
i32 490, label %3
i32 450, label %4
i32 451, 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
]
2: ; preds = %1
br label %25
3: ; preds = %1
br label %25
4: ; preds = %1
br label %25
5: ; preds = %1
br label %25
6: ; preds = %1
br label %25
7: ; preds = %1
br label %25
8: ; preds = %1
br label %25
9: ; preds = %1
br label %25
10: ; preds = %1
br label %25
11: ; preds = %1
br label %25
12: ; preds = %1
br label %25
13: ; preds = %1
br label %25
14: ; preds = %1
br label %25
15: ; preds = %1
br label %25
16: ; preds = %1
br label %25
17: ; preds = %1
br label %25
18: ; preds = %1
br label %25
19: ; preds = %1
br label %25
20: ; preds = %1
br label %25
21: ; preds = %1
br label %25
22: ; preds = %1
br label %25
23: ; preds = %1
br label %25
24: ; preds = %1
br label %25
25: ; preds = %1, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%26 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, 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 ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([47 x i8], [47 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* %26
}