#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 */
char const *strerror(int);
const char *nn_err_strerror(int errnum) {
  switch (errnum) {
  case (156384712 + 1):
    return "Not supported";
  case (156384712 + 2):
    return "Protocol not supported";
  case (156384712 + 3):
    return "No buffer space available";
  case (156384712 + 4):
    return "Network is down";
  case (156384712 + 5):
    return "Address in use";
  case (156384712 + 6):
    return "Address not available";
  case (156384712 + 7):
    return "Connection refused";
  case (156384712 + 8):
    return "Operation in progress";
  case (156384712 + 9):
    return "Not a socket";
  case (156384712 + 10):
    return "Address family not supported";
  case (156384712 + 11):
    return "Protocol error";
  case (156384712 + 53):
    return "Nanomsg library was terminated";
  case (156384712 + 54):
    return "Operation cannot be performed in this state";
  default:
    return strerror(errnum);
  }
}


x86 assembly (clang, -O0):
<nn_err_strerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xf6adc237,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x35,%eax
ja     1216 <nn_err_strerror+0x106>
mov    -0x18(%rbp),%rax
lea    0xec3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf8b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1222 <nn_err_strerror+0x112>
lea    0xf89(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1222 <nn_err_strerror+0x112>
lea    0xf90(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1222 <nn_err_strerror+0x112>
lea    0xf9a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1222 <nn_err_strerror+0x112>
lea    0xf9a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1222 <nn_err_strerror+0x112>
lea    0xf99(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1222 <nn_err_strerror+0x112>
lea    0xf9f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1222 <nn_err_strerror+0x112>
lea    0xfa2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1222 <nn_err_strerror+0x112>
lea    0xfa8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1222 <nn_err_strerror+0x112>
lea    0xfa5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1222 <nn_err_strerror+0x112>
lea    0xfb2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1222 <nn_err_strerror+0x112>
lea    0xfb1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1222 <nn_err_strerror+0x112>
lea    0xfc0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1222 <nn_err_strerror+0x112>
mov    -0xc(%rbp),%edi
call   1030 <strerror@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nn_err_strerror>:
lea    -0x9523dc9(%rdi),%ecx
cmp    $0x35,%ecx
ja     1182 <nn_err_strerror+0x72>
lea    0xfb6(%rip),%rax
lea    0xed7(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xfad(%rip),%rax
ret
lea    0xfbc(%rip),%rax
ret
lea    0xfce(%rip),%rax
ret
lea    0xfd6(%rip),%rax
ret
lea    0xfdd(%rip),%rax
ret
lea    0xfeb(%rip),%rax
ret
lea    0xff6(%rip),%rax
ret
lea    0x1004(%rip),%rax
ret
lea    0x1009(%rip),%rax
ret
lea    0x101e(%rip),%rax
ret
jmp    1030 <strerror@plt>
lea    0x1020(%rip),%rax
ret
lea    0x1037(%rip),%rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Not supported\00"
@.str.1 = [23 x i8] c"Protocol not supported\00"
@.str.2 = [26 x i8] c"No buffer space available\00"
@.str.3 = [16 x i8] c"Network is down\00"
@.str.4 = [15 x i8] c"Address in use\00"
@.str.5 = [22 x i8] c"Address not available\00"
@.str.6 = [19 x i8] c"Connection refused\00"
@.str.7 = [22 x i8] c"Operation in progress\00"
@.str.8 = [13 x i8] c"Not a socket\00"
@.str.9 = [29 x i8] c"Address family not supported\00"
@.str.10 = [15 x i8] c"Protocol error\00"
@.str.11 = [31 x i8] c"Nanomsg library was terminated\00"
@.str.12 = [44 x i8] c"Operation cannot be performed in this state\00"
define i8* @nn_err_strerror(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %18 [
i32 156384713, label %5
i32 156384714, label %6
i32 156384715, label %7
i32 156384716, label %8
i32 156384717, label %9
i32 156384718, label %10
i32 156384719, label %11
i32 156384720, label %12
i32 156384721, label %13
i32 156384722, label %14
i32 156384723, label %15
i32 156384765, label %16
i32 156384766, label %17
]
5: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
br label %21
6: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %21
7: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %21
8: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %21
9: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %21
10: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %21
11: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %21
12: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %21
13: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %21
14: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %21
15: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %21
16: ; preds = %1
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %21
17: ; preds = %1
store i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %21
18: ; preds = %1
%19 = load i32, i32* %3
%20 = call i8* @strerror(i32 %19)
store i8* %20, i8** %2
br label %21
21: ; preds = %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 = [14 x i8] c"Not supported\00"
@.str.1 = [23 x i8] c"Protocol not supported\00"
@.str.2 = [26 x i8] c"No buffer space available\00"
@.str.3 = [16 x i8] c"Network is down\00"
@.str.4 = [15 x i8] c"Address in use\00"
@.str.5 = [22 x i8] c"Address not available\00"
@.str.6 = [19 x i8] c"Connection refused\00"
@.str.7 = [22 x i8] c"Operation in progress\00"
@.str.8 = [13 x i8] c"Not a socket\00"
@.str.9 = [29 x i8] c"Address family not supported\00"
@.str.10 = [15 x i8] c"Protocol error\00"
@.str.11 = [31 x i8] c"Nanomsg library was terminated\00"
@.str.12 = [44 x i8] c"Operation cannot be performed in this state\00"
define i8* @nn_err_strerror(i32 %0) {
switch i32 %0, label %14 [
i32 156384713, label %16
i32 156384714, label %2
i32 156384715, label %3
i32 156384716, label %4
i32 156384717, label %5
i32 156384718, label %6
i32 156384719, label %7
i32 156384720, label %8
i32 156384721, label %9
i32 156384722, label %10
i32 156384723, label %11
i32 156384765, label %12
i32 156384766, label %13
]
2: ; preds = %1
br label %16
3: ; preds = %1
br label %16
4: ; preds = %1
br label %16
5: ; preds = %1
br label %16
6: ; preds = %1
br label %16
7: ; preds = %1
br label %16
8: ; preds = %1
br label %16
9: ; preds = %1
br label %16
10: ; preds = %1
br label %16
11: ; preds = %1
br label %16
12: ; preds = %1
br label %16
13: ; preds = %1
br label %16
14: ; preds = %1
%15 = tail call i8* @strerror(i32 %0)
br label %16
16: ; preds = %1, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%17 = phi i8* [ %15, %14 ], [ getelementptr inbounds ([44 x i8], [44 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([15 x i8], [15 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 ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([26 x i8], [26 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 ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %17
}