#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 *vn_status_message(int code) {
  const char *msg = NULL;
  switch (code) {
  case 200:
    msg = "OK";
    break;
  case 400:
    msg = "Bad Request";
    break;
  case 401:
    msg = "Unauthorized";
    break;
  case 403:
    msg = "Forbidden";
    break;
  case 404:
    msg = "Not Found";
    break;
  case 500:
    msg = "Internal Server Error";
    break;
  case 503:
    msg = "Service Unavailable";
    break;
  default:
    msg = "OK";
  }
  return msg;
}


x86 assembly (clang, -O0):
<vn_status_message>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0xc8,%eax
je     1197 <vn_status_message+0x97>
jmp    1125 <vn_status_message+0x25>
mov    -0x14(%rbp),%eax
sub    $0x190,%eax
je     11a7 <vn_status_message+0xa7>
jmp    1138 <vn_status_message+0x38>
mov    -0x14(%rbp),%eax
sub    $0x191,%eax
je     11b7 <vn_status_message+0xb7>
jmp    114b <vn_status_message+0x4b>
mov    -0x14(%rbp),%eax
sub    $0x193,%eax
je     11c7 <vn_status_message+0xc7>
jmp    115e <vn_status_message+0x5e>
mov    -0x14(%rbp),%eax
sub    $0x194,%eax
je     11d7 <vn_status_message+0xd7>
jmp    1171 <vn_status_message+0x71>
mov    -0x14(%rbp),%eax
sub    $0x1f4,%eax
je     11e7 <vn_status_message+0xe7>
jmp    1184 <vn_status_message+0x84>
mov    -0x14(%rbp),%eax
sub    $0x1f7,%eax
je     11f7 <vn_status_message+0xf7>
jmp    1207 <vn_status_message+0x107>
lea    0xe62(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1212 <vn_status_message+0x112>
lea    0xe55(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1212 <vn_status_message+0x112>
lea    0xe51(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1212 <vn_status_message+0x112>
lea    0xe4e(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1212 <vn_status_message+0x112>
lea    0xe48(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1212 <vn_status_message+0x112>
lea    0xe42(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1212 <vn_status_message+0x112>
lea    0xe48(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1212 <vn_status_message+0x112>
lea    0xdf2(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vn_status_message>:
lea    0xf0d(%rip),%rax
lea    -0x190(%rdi),%ecx
cmp    $0x4,%ecx
ja     112a <vn_status_message+0x2a>
lea    0xee7(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xeee(%rip),%rax
ret
cmp    $0x1f4,%edi
je     115a <vn_status_message+0x5a>
cmp    $0x1f7,%edi
jne    1161 <vn_status_message+0x61>
lea    0xf19(%rip),%rax
ret
lea    0xeda(%rip),%rax
ret
lea    0xedf(%rip),%rax
ret
lea    0xee1(%rip),%rax
ret
lea    0xee3(%rip),%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"OK\00"
@.str.1 = [12 x i8] c"Bad Request\00"
@.str.2 = [13 x i8] c"Unauthorized\00"
@.str.3 = [10 x i8] c"Forbidden\00"
@.str.4 = [10 x i8] c"Not Found\00"
@.str.5 = [22 x i8] c"Internal Server Error\00"
@.str.6 = [20 x i8] c"Service Unavailable\00"
define i8* @vn_status_message(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 %12 [
i32 200, label %5
i32 400, label %6
i32 401, label %7
i32 403, label %8
i32 404, label %9
i32 500, label %10
i32 503, label %11
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3
br label %13
6: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %13
7: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %13
8: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %13
9: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %13
10: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %13
11: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %13
12: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3
br label %13
13: ; preds = %12, %11, %10, %9, %8, %7, %6, %5
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"OK\00"
@.str.1 = [12 x i8] c"Bad Request\00"
@.str.2 = [13 x i8] c"Unauthorized\00"
@.str.3 = [10 x i8] c"Forbidden\00"
@.str.4 = [10 x i8] c"Not Found\00"
@.str.5 = [22 x i8] c"Internal Server Error\00"
@.str.6 = [20 x i8] c"Service Unavailable\00"
define i8* @vn_status_message(i32 %0) {
switch i32 %0, label %8 [
i32 503, label %7
i32 400, label %2
i32 401, label %3
i32 403, label %4
i32 404, label %5
i32 500, label %6
]
2: ; preds = %1
br label %8
3: ; preds = %1
br label %8
4: ; preds = %1
br label %8
5: ; preds = %1
br label %8
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %6, %5, %4, %3, %2
%9 = phi i8* [ getelementptr inbounds ([20 x i8], [20 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 ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([13 x i8], [13 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 ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %9
}