char *status_text(int status) {
  char *status_text;
  switch (status) {
  case 200:
    status_text = "Ok";
    break;
  case 201:
    status_text = "Created";
    break;
  case 202:
    status_text = "Accepted";
    break;
  case 304:
    status_text = "Not Modified";
    break;
  case 301:
    status_text = "Moved Permanently";
    break;
  case 302:
    status_text = "Found";
    break;
  case 400:
    status_text = "Bad Request";
    break;
  case 401:
    status_text = "Unauthorized";
    break;
  case 403:
    status_text = "Forbidden";
    break;
  case 404:
    status_text = "Not Found";
    break;
  case 405:
    status_text = "Method Not Allowed";
    break;
  case 500:
    status_text = "Internal Server Error";
    break;
  case 501:
    status_text = "Not Implemented";
    break;
  case 505:
    status_text = "HTTP Version Not Supported";
    break;
  default:
    status_text = "Unknown";
  }
  return status_text;
}


x86 assembly (clang, -O0):
<status_text>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0xc8,%eax
je     1214 <status_text+0x114>
jmp    111d <status_text+0x1d>
mov    -0x14(%rbp),%eax
sub    $0xc9,%eax
je     1224 <status_text+0x124>
jmp    1130 <status_text+0x30>
mov    -0x14(%rbp),%eax
sub    $0xca,%eax
je     1234 <status_text+0x134>
jmp    1143 <status_text+0x43>
mov    -0x14(%rbp),%eax
sub    $0x12d,%eax
je     1254 <status_text+0x154>
jmp    1156 <status_text+0x56>
mov    -0x14(%rbp),%eax
sub    $0x12e,%eax
je     1264 <status_text+0x164>
jmp    1169 <status_text+0x69>
mov    -0x14(%rbp),%eax
sub    $0x130,%eax
je     1244 <status_text+0x144>
jmp    117c <status_text+0x7c>
mov    -0x14(%rbp),%eax
sub    $0x190,%eax
je     1274 <status_text+0x174>
jmp    118f <status_text+0x8f>
mov    -0x14(%rbp),%eax
sub    $0x191,%eax
je     1284 <status_text+0x184>
jmp    11a2 <status_text+0xa2>
mov    -0x14(%rbp),%eax
sub    $0x193,%eax
je     1294 <status_text+0x194>
jmp    11b5 <status_text+0xb5>
mov    -0x14(%rbp),%eax
sub    $0x194,%eax
je     12a4 <status_text+0x1a4>
jmp    11c8 <status_text+0xc8>
mov    -0x14(%rbp),%eax
sub    $0x195,%eax
je     12b4 <status_text+0x1b4>
jmp    11db <status_text+0xdb>
mov    -0x14(%rbp),%eax
sub    $0x1f4,%eax
je     12c4 <status_text+0x1c4>
jmp    11ee <status_text+0xee>
mov    -0x14(%rbp),%eax
sub    $0x1f5,%eax
je     12d4 <status_text+0x1d4>
jmp    1201 <status_text+0x101>
mov    -0x14(%rbp),%eax
sub    $0x1f9,%eax
je     12e4 <status_text+0x1e4>
jmp    12f4 <status_text+0x1f4>
lea    0xde5(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ff <status_text+0x1ff>
lea    0xdd8(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ff <status_text+0x1ff>
lea    0xdd0(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ff <status_text+0x1ff>
lea    0xdc9(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ff <status_text+0x1ff>
lea    0xdc6(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ff <status_text+0x1ff>
lea    0xdef(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ff <status_text+0x1ff>
lea    0xdb8(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ff <status_text+0x1ff>
lea    0xdb4(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ff <status_text+0x1ff>
lea    0xdb1(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ff <status_text+0x1ff>
lea    0xdab(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ff <status_text+0x1ff>
lea    0xda5(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ff <status_text+0x1ff>
lea    0xda8(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ff <status_text+0x1ff>
lea    0xdae(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ff <status_text+0x1ff>
lea    0xdae(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12ff <status_text+0x1ff>
lea    0xdb9(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<status_text>:
cmp    $0x18f,%edi
jle    1137 <status_text+0x37>
cmp    $0x1f3,%edi
jg     1163 <status_text+0x63>
add    $0xfffffe70,%edi
cmp    $0x5,%edi
ja     11f3 <status_text+0xf3>
lea    0xeda(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xf15(%rip),%rax
ret
cmp    $0x12c,%edi
jg     1183 <status_text+0x83>
cmp    $0xc8,%edi
je     11c3 <status_text+0xc3>
cmp    $0xc9,%edi
je     11cb <status_text+0xcb>
cmp    $0xca,%edi
jne    11f3 <status_text+0xf3>
lea    0xec1(%rip),%rax
ret
cmp    $0x1f4,%edi
je     11d3 <status_text+0xd3>
cmp    $0x1f5,%edi
je     11db <status_text+0xdb>
cmp    $0x1f9,%edi
jne    11f3 <status_text+0xf3>
lea    0xf2f(%rip),%rax
ret
cmp    $0x12d,%edi
je     11e3 <status_text+0xe3>
cmp    $0x12e,%edi
je     11eb <status_text+0xeb>
cmp    $0x130,%edi
jne    11f3 <status_text+0xf3>
lea    0xe8a(%rip),%rax
ret
lea    0xead(%rip),%rax
ret
lea    0xeb2(%rip),%rax
ret
lea    0xeb4(%rip),%rax
ret
lea    0xeb6(%rip),%rax
ret
lea    0xe4e(%rip),%rax
ret
lea    0xe49(%rip),%rax
ret
lea    0xeb1(%rip),%rax
ret
lea    0xebf(%rip),%rax
ret
lea    0xe4f(%rip),%rax
ret
lea    0xe80(%rip),%rax
ret
lea    0xed2(%rip),%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"Ok\00"
@.str.1 = [8 x i8] c"Created\00"
@.str.2 = [9 x i8] c"Accepted\00"
@.str.3 = [13 x i8] c"Not Modified\00"
@.str.4 = [18 x i8] c"Moved Permanently\00"
@.str.5 = [6 x i8] c"Found\00"
@.str.6 = [12 x i8] c"Bad Request\00"
@.str.7 = [13 x i8] c"Unauthorized\00"
@.str.8 = [10 x i8] c"Forbidden\00"
@.str.9 = [10 x i8] c"Not Found\00"
@.str.10 = [19 x i8] c"Method Not Allowed\00"
@.str.11 = [22 x i8] c"Internal Server Error\00"
@.str.12 = [16 x i8] c"Not Implemented\00"
@.str.13 = [27 x i8] c"HTTP Version Not Supported\00"
@.str.14 = [8 x i8] c"Unknown\00"
define i8* @status_text(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %19 [
i32 200, label %5
i32 201, label %6
i32 202, label %7
i32 304, label %8
i32 301, label %9
i32 302, label %10
i32 400, label %11
i32 401, label %12
i32 403, label %13
i32 404, label %14
i32 405, label %15
i32 500, label %16
i32 501, label %17
i32 505, label %18
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %3
br label %20
6: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %20
7: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %20
8: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %20
9: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %20
10: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %20
11: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %20
12: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8** %3
br label %20
13: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %20
14: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8** %3
br label %20
15: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i8** %3
br label %20
16: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), i8** %3
br label %20
17: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i8** %3
br label %20
18: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i64 0, i64 0), i8** %3
br label %20
19: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), i8** %3
br label %20
20: ; preds = %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%21 = load i8*, i8** %3
ret i8* %21
}

LLVM IR (-O2):
@.str = [3 x i8] c"Ok\00"
@.str.1 = [8 x i8] c"Created\00"
@.str.2 = [9 x i8] c"Accepted\00"
@.str.3 = [13 x i8] c"Not Modified\00"
@.str.4 = [18 x i8] c"Moved Permanently\00"
@.str.5 = [6 x i8] c"Found\00"
@.str.6 = [12 x i8] c"Bad Request\00"
@.str.7 = [13 x i8] c"Unauthorized\00"
@.str.8 = [10 x i8] c"Forbidden\00"
@.str.9 = [10 x i8] c"Not Found\00"
@.str.10 = [19 x i8] c"Method Not Allowed\00"
@.str.11 = [22 x i8] c"Internal Server Error\00"
@.str.12 = [16 x i8] c"Not Implemented\00"
@.str.13 = [27 x i8] c"HTTP Version Not Supported\00"
@.str.14 = [8 x i8] c"Unknown\00"
define i8* @status_text(i32 %0) {
switch i32 %0, label %15 [
i32 200, label %16
i32 201, label %2
i32 202, label %3
i32 304, label %4
i32 301, label %5
i32 302, label %6
i32 400, label %7
i32 401, label %8
i32 403, label %9
i32 404, label %10
i32 405, label %11
i32 500, label %12
i32 501, label %13
i32 505, 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 ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([10 x i8], [10 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 ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([8 x i8], [8 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* %17
}