#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 */
typedef int uint8_t;

/* Variables and functions */
const char *prv_status_to_string(int status) {
  switch (status) {
  case ((uint8_t)0x00):
    return "COAP_NO_ERROR";
  case ((uint8_t)0x01):
    return "COAP_IGNORE";
  case ((uint8_t)0x41):
    return "COAP_201_CREATED";
  case ((uint8_t)0x42):
    return "COAP_202_DELETED";
  case ((uint8_t)0x44):
    return "COAP_204_CHANGED";
  case ((uint8_t)0x45):
    return "COAP_205_CONTENT";
  case ((uint8_t)0x80):
    return "COAP_400_BAD_REQUEST";
  case ((uint8_t)0x81):
    return "COAP_401_UNAUTHORIZED";
  case ((uint8_t)0x84):
    return "COAP_404_NOT_FOUND";
  case ((uint8_t)0x85):
    return "COAP_405_METHOD_NOT_ALLOWED";
  case ((uint8_t)0x86):
    return "COAP_406_NOT_ACCEPTABLE";
  case ((uint8_t)0xA0):
    return "COAP_500_INTERNAL_SERVER_ERROR";
  case ((uint8_t)0xA1):
    return "COAP_501_NOT_IMPLEMENTED";
  case ((uint8_t)0xA3):
    return "COAP_503_SERVICE_UNAVAILABLE";
  default:
    return "";
  }
}


x86 assembly (clang, -O0):
<prv_status_to_string>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     1207 <prv_status_to_string+0x107>
jmp    111a <prv_status_to_string+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     1217 <prv_status_to_string+0x117>
jmp    112b <prv_status_to_string+0x2b>
mov    -0x10(%rbp),%eax
sub    $0x41,%eax
je     1227 <prv_status_to_string+0x127>
jmp    113c <prv_status_to_string+0x3c>
mov    -0x10(%rbp),%eax
sub    $0x42,%eax
je     1237 <prv_status_to_string+0x137>
jmp    114d <prv_status_to_string+0x4d>
mov    -0x10(%rbp),%eax
sub    $0x44,%eax
je     1247 <prv_status_to_string+0x147>
jmp    115e <prv_status_to_string+0x5e>
mov    -0x10(%rbp),%eax
sub    $0x45,%eax
je     1257 <prv_status_to_string+0x157>
jmp    116f <prv_status_to_string+0x6f>
mov    -0x10(%rbp),%eax
sub    $0x80,%eax
je     1267 <prv_status_to_string+0x167>
jmp    1182 <prv_status_to_string+0x82>
mov    -0x10(%rbp),%eax
sub    $0x81,%eax
je     1277 <prv_status_to_string+0x177>
jmp    1195 <prv_status_to_string+0x95>
mov    -0x10(%rbp),%eax
sub    $0x84,%eax
je     1287 <prv_status_to_string+0x187>
jmp    11a8 <prv_status_to_string+0xa8>
mov    -0x10(%rbp),%eax
sub    $0x85,%eax
je     1297 <prv_status_to_string+0x197>
jmp    11bb <prv_status_to_string+0xbb>
mov    -0x10(%rbp),%eax
sub    $0x86,%eax
je     12a7 <prv_status_to_string+0x1a7>
jmp    11ce <prv_status_to_string+0xce>
mov    -0x10(%rbp),%eax
sub    $0xa0,%eax
je     12b7 <prv_status_to_string+0x1b7>
jmp    11e1 <prv_status_to_string+0xe1>
mov    -0x10(%rbp),%eax
sub    $0xa1,%eax
je     12c7 <prv_status_to_string+0x1c7>
jmp    11f4 <prv_status_to_string+0xf4>
mov    -0x10(%rbp),%eax
sub    $0xa3,%eax
je     12d7 <prv_status_to_string+0x1d7>
jmp    12e7 <prv_status_to_string+0x1e7>
lea    0xdf2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12f2 <prv_status_to_string+0x1f2>
lea    0xdf0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12f2 <prv_status_to_string+0x1f2>
lea    0xdec(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12f2 <prv_status_to_string+0x1f2>
lea    0xded(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12f2 <prv_status_to_string+0x1f2>
lea    0xdee(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12f2 <prv_status_to_string+0x1f2>
lea    0xdef(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12f2 <prv_status_to_string+0x1f2>
lea    0xdf0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12f2 <prv_status_to_string+0x1f2>
lea    0xdf5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12f2 <prv_status_to_string+0x1f2>
lea    0xdfb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12f2 <prv_status_to_string+0x1f2>
lea    0xdfe(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12f2 <prv_status_to_string+0x1f2>
lea    0xe0a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12f2 <prv_status_to_string+0x1f2>
lea    0xe12(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12f2 <prv_status_to_string+0x1f2>
lea    0xe21(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12f2 <prv_status_to_string+0x1f2>
lea    0xe2a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12f2 <prv_status_to_string+0x1f2>
lea    0xd5e(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prv_status_to_string>:
lea    -0x41(%rdi),%eax
cmp    $0x62,%eax
ja     1120 <prv_status_to_string+0x20>
lea    0xef1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1087(%rip),%rax
ret
test   %edi,%edi
je     1191 <prv_status_to_string+0x91>
cmp    $0x1,%edi
jne    1131 <prv_status_to_string+0x31>
lea    0x106a(%rip),%rax
ret
lea    0x10a0(%rip),%rax
ret
lea    0x1077(%rip),%rax
ret
lea    0x1080(%rip),%rax
ret
lea    0x1089(%rip),%rax
ret
lea    0x1092(%rip),%rax
ret
lea    0x109f(%rip),%rax
ret
lea    0x10ad(%rip),%rax
ret
lea    0x10b8(%rip),%rax
ret
lea    0x10cc(%rip),%rax
ret
lea    0x10dc(%rip),%rax
ret
lea    0x10f3(%rip),%rax
ret
lea    0x1104(%rip),%rax
ret
lea    0xff4(%rip),%rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"COAP_NO_ERROR\00"
@.str.1 = [12 x i8] c"COAP_IGNORE\00"
@.str.2 = [17 x i8] c"COAP_201_CREATED\00"
@.str.3 = [17 x i8] c"COAP_202_DELETED\00"
@.str.4 = [17 x i8] c"COAP_204_CHANGED\00"
@.str.5 = [17 x i8] c"COAP_205_CONTENT\00"
@.str.6 = [21 x i8] c"COAP_400_BAD_REQUEST\00"
@.str.7 = [22 x i8] c"COAP_401_UNAUTHORIZED\00"
@.str.8 = [19 x i8] c"COAP_404_NOT_FOUND\00"
@.str.9 = [28 x i8] c"COAP_405_METHOD_NOT_ALLOWED\00"
@.str.10 = [24 x i8] c"COAP_406_NOT_ACCEPTABLE\00"
@.str.11 = [31 x i8] c"COAP_500_INTERNAL_SERVER_ERROR\00"
@.str.12 = [25 x i8] c"COAP_501_NOT_IMPLEMENTED\00"
@.str.13 = [29 x i8] c"COAP_503_SERVICE_UNAVAILABLE\00"
@.str.14 = [1 x i8] zeroinitializer
define i8* @prv_status_to_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %19 [
i32 0, label %5
i32 1, label %6
i32 65, label %7
i32 66, label %8
i32 68, label %9
i32 69, label %10
i32 128, label %11
i32 129, label %12
i32 132, label %13
i32 133, label %14
i32 134, label %15
i32 160, label %16
i32 161, label %17
i32 163, label %18
]
5: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
br label %20
6: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %20
7: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %20
8: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %20
9: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %20
10: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %20
11: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %20
12: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %20
13: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %20
14: ; preds = %1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %20
15: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %20
16: ; preds = %1
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %20
17: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %20
18: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %20
19: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %20
20: ; preds = %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
@.str = [14 x i8] c"COAP_NO_ERROR\00"
@.str.1 = [12 x i8] c"COAP_IGNORE\00"
@.str.2 = [17 x i8] c"COAP_201_CREATED\00"
@.str.3 = [17 x i8] c"COAP_202_DELETED\00"
@.str.4 = [17 x i8] c"COAP_204_CHANGED\00"
@.str.5 = [17 x i8] c"COAP_205_CONTENT\00"
@.str.6 = [21 x i8] c"COAP_400_BAD_REQUEST\00"
@.str.7 = [22 x i8] c"COAP_401_UNAUTHORIZED\00"
@.str.8 = [19 x i8] c"COAP_404_NOT_FOUND\00"
@.str.9 = [28 x i8] c"COAP_405_METHOD_NOT_ALLOWED\00"
@.str.10 = [24 x i8] c"COAP_406_NOT_ACCEPTABLE\00"
@.str.11 = [31 x i8] c"COAP_500_INTERNAL_SERVER_ERROR\00"
@.str.12 = [25 x i8] c"COAP_501_NOT_IMPLEMENTED\00"
@.str.13 = [29 x i8] c"COAP_503_SERVICE_UNAVAILABLE\00"
@.str.14 = [1 x i8] zeroinitializer
define i8* @prv_status_to_string(i32 %0) {
switch i32 %0, label %15 [
i32 0, label %16
i32 1, label %2
i32 65, label %3
i32 66, label %4
i32 68, label %5
i32 69, label %6
i32 128, label %7
i32 129, label %8
i32 132, label %9
i32 133, label %10
i32 134, label %11
i32 160, label %12
i32 161, label %13
i32 163, label %14
]
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
br label %16
15: ; preds = %1
br label %16
16: ; preds = %1, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%17 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([25 x i8], [25 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 ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([19 x i8], [19 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 ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([12 x i8], [12 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
}