#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
const char *strupnperror(int err) {
  const char *s = NULL;
  switch (err) {
  case 401:
    s = "Invalid Action";
    break;
  case 402:
    s = "Invalid Args";
    break;
  case 501:
    s = "Action Failed";
    break;
  case 713:
    s = "SpecifiedArrayIndexInvalid";
    break;
  case 714:
    s = "NoSuchEntryInArray";
    break;
  case 715:
    s = "WildCardNotPermittedInSrcIP";
    break;
  case 716:
    s = "WildCardNotPermittedInExtPort";
    break;
  case 718:
    s = "ConflictInMappingEntry";
    break;
  case 724:
    s = "SamePortValuesRequired";
    break;
  case 725:
    s = "OnlyPermanentLeasesSupported";
    break;
  case 726:
    s = "RemoteHostOnlySupportsWildcard";
    break;
  case 727:
    s = "ExternalPortOnlySupportsWildcard";
    break;
  default:
    s = NULL;
  }
  return s;
}


x86 assembly (clang, -O0):
<strupnperror>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x191,%eax
je     11f6 <strupnperror+0xf6>
jmp    1125 <strupnperror+0x25>
mov    -0x14(%rbp),%eax
sub    $0x192,%eax
je     1206 <strupnperror+0x106>
jmp    1138 <strupnperror+0x38>
mov    -0x14(%rbp),%eax
sub    $0x1f5,%eax
je     1216 <strupnperror+0x116>
jmp    114b <strupnperror+0x4b>
mov    -0x14(%rbp),%eax
sub    $0x2c9,%eax
je     1226 <strupnperror+0x126>
jmp    115e <strupnperror+0x5e>
mov    -0x14(%rbp),%eax
sub    $0x2ca,%eax
je     1236 <strupnperror+0x136>
jmp    1171 <strupnperror+0x71>
mov    -0x14(%rbp),%eax
sub    $0x2cb,%eax
je     1246 <strupnperror+0x146>
jmp    1184 <strupnperror+0x84>
mov    -0x14(%rbp),%eax
sub    $0x2cc,%eax
je     1256 <strupnperror+0x156>
jmp    1197 <strupnperror+0x97>
mov    -0x14(%rbp),%eax
sub    $0x2ce,%eax
je     1266 <strupnperror+0x166>
jmp    11aa <strupnperror+0xaa>
mov    -0x14(%rbp),%eax
sub    $0x2d4,%eax
je     1276 <strupnperror+0x176>
jmp    11bd <strupnperror+0xbd>
mov    -0x14(%rbp),%eax
sub    $0x2d5,%eax
je     1286 <strupnperror+0x186>
jmp    11d0 <strupnperror+0xd0>
mov    -0x14(%rbp),%eax
sub    $0x2d6,%eax
je     1296 <strupnperror+0x196>
jmp    11e3 <strupnperror+0xe3>
mov    -0x14(%rbp),%eax
sub    $0x2d7,%eax
je     12a6 <strupnperror+0x1a6>
jmp    12b6 <strupnperror+0x1b6>
lea    0xe03(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12be <strupnperror+0x1be>
lea    0xe02(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12be <strupnperror+0x1be>
lea    0xdff(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12be <strupnperror+0x1be>
lea    0xdfd(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12be <strupnperror+0x1be>
lea    0xe08(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12be <strupnperror+0x1be>
lea    0xe0b(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12be <strupnperror+0x1be>
lea    0xe17(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12be <strupnperror+0x1be>
lea    0xe25(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12be <strupnperror+0x1be>
lea    0xe2c(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12be <strupnperror+0x1be>
lea    0xe33(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12be <strupnperror+0x1be>
lea    0xe40(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12be <strupnperror+0x1be>
lea    0xe4f(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12be <strupnperror+0x1be>
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strupnperror>:
cmp    $0x2c8,%edi
jle    112f <strupnperror+0x2f>
add    $0xfffffd37,%edi
cmp    $0xe,%edi
ja     119f <strupnperror+0x9f>
lea    0xee2(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xf38(%rip),%rax
ret
cmp    $0x191,%edi
je     118f <strupnperror+0x8f>
cmp    $0x192,%edi
je     1197 <strupnperror+0x97>
cmp    $0x1f5,%edi
jne    119f <strupnperror+0x9f>
lea    0xf0a(%rip),%rax
ret
lea    0xf2b(%rip),%rax
ret
lea    0xf36(%rip),%rax
ret
lea    0xf4a(%rip),%rax
ret
lea    0xf60(%rip),%rax
ret
lea    0xf6f(%rip),%rax
ret
lea    0xf7e(%rip),%rax
ret
lea    0xf93(%rip),%rax
ret
lea    0xfaa(%rip),%rax
ret
lea    0xea6(%rip),%rax
ret
lea    0xead(%rip),%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Invalid Action\00"
@.str.1 = [13 x i8] c"Invalid Args\00"
@.str.2 = [14 x i8] c"Action Failed\00"
@.str.3 = [27 x i8] c"SpecifiedArrayIndexInvalid\00"
@.str.4 = [19 x i8] c"NoSuchEntryInArray\00"
@.str.5 = [28 x i8] c"WildCardNotPermittedInSrcIP\00"
@.str.6 = [30 x i8] c"WildCardNotPermittedInExtPort\00"
@.str.7 = [23 x i8] c"ConflictInMappingEntry\00"
@.str.8 = [23 x i8] c"SamePortValuesRequired\00"
@.str.9 = [29 x i8] c"OnlyPermanentLeasesSupported\00"
@.str.10 = [31 x i8] c"RemoteHostOnlySupportsWildcard\00"
@.str.11 = [33 x i8] c"ExternalPortOnlySupportsWildcard\00"
define i8* @strupnperror(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* null, i8** %3
%4 = load i32, i32* %2
switch i32 %4, label %17 [
i32 401, label %5
i32 402, label %6
i32 501, label %7
i32 713, label %8
i32 714, label %9
i32 715, label %10
i32 716, label %11
i32 718, label %12
i32 724, label %13
i32 725, label %14
i32 726, label %15
i32 727, label %16
]
5: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %3
br label %18
6: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %18
7: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %18
8: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %18
9: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %18
10: ; preds = %1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %18
11: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %18
12: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i8** %3
br label %18
13: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %18
14: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i8** %3
br label %18
15: ; preds = %1
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), i8** %3
br label %18
16: ; preds = %1
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), i8** %3
br label %18
17: ; preds = %1
store i8* null, i8** %3
br label %18
18: ; preds = %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
@.str = [15 x i8] c"Invalid Action\00"
@.str.1 = [13 x i8] c"Invalid Args\00"
@.str.2 = [14 x i8] c"Action Failed\00"
@.str.3 = [27 x i8] c"SpecifiedArrayIndexInvalid\00"
@.str.4 = [19 x i8] c"NoSuchEntryInArray\00"
@.str.5 = [28 x i8] c"WildCardNotPermittedInSrcIP\00"
@.str.6 = [30 x i8] c"WildCardNotPermittedInExtPort\00"
@.str.7 = [23 x i8] c"ConflictInMappingEntry\00"
@.str.8 = [23 x i8] c"SamePortValuesRequired\00"
@.str.9 = [29 x i8] c"OnlyPermanentLeasesSupported\00"
@.str.10 = [31 x i8] c"RemoteHostOnlySupportsWildcard\00"
@.str.11 = [33 x i8] c"ExternalPortOnlySupportsWildcard\00"
define i8* @strupnperror(i32 %0) {
switch i32 %0, label %13 [
i32 401, label %14
i32 402, label %2
i32 501, label %3
i32 713, label %4
i32 714, label %5
i32 715, label %6
i32 716, label %7
i32 718, label %8
i32 724, label %9
i32 725, label %10
i32 726, label %11
i32 727, label %12
]
2: ; preds = %1
br label %14
3: ; preds = %1
br label %14
4: ; preds = %1
br label %14
5: ; preds = %1
br label %14
6: ; preds = %1
br label %14
7: ; preds = %1
br label %14
8: ; preds = %1
br label %14
9: ; preds = %1
br label %14
10: ; preds = %1
br label %14
11: ; preds = %1
br label %14
12: ; preds = %1
br label %14
13: ; preds = %1
br label %14
14: ; preds = %1, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%15 = phi i8* [ null, %13 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([29 x i8], [29 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 ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([27 x i8], [27 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 ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %15
}