const char *request_get_respstr(int code) {
  switch (code) {
  case 200:
    return "OK";
  case 302:
    return "Found";
  case 400:
    return "Bad Request";
  case 403:
    return "Forbidden";
  case 404:
    return "Not Found";
  case 405:
    return "Method Not Allowed";
  case 408:
    return "Request Timeout";
  case 413:
    return "Request Entity Too Large";
  case 418:
    return "I'm a teapot";
  case 431:
    return "Request Header Fields Too Large";
  case 500:
    return "Internal Server Error";
  case 501:
    return "Not Implemented";
  case 505:
    return "HTTP Version Not Supported";
  default:
    return "Unknown Response Code";
  }
}


x86 assembly (clang, -O0):
<request_get_respstr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0xc8,%eax
je     1201 <request_get_respstr+0x101>
jmp    111d <request_get_respstr+0x1d>
mov    -0x10(%rbp),%eax
sub    $0x12e,%eax
je     1211 <request_get_respstr+0x111>
jmp    1130 <request_get_respstr+0x30>
mov    -0x10(%rbp),%eax
sub    $0x190,%eax
je     1221 <request_get_respstr+0x121>
jmp    1143 <request_get_respstr+0x43>
mov    -0x10(%rbp),%eax
sub    $0x193,%eax
je     1231 <request_get_respstr+0x131>
jmp    1156 <request_get_respstr+0x56>
mov    -0x10(%rbp),%eax
sub    $0x194,%eax
je     1241 <request_get_respstr+0x141>
jmp    1169 <request_get_respstr+0x69>
mov    -0x10(%rbp),%eax
sub    $0x195,%eax
je     1251 <request_get_respstr+0x151>
jmp    117c <request_get_respstr+0x7c>
mov    -0x10(%rbp),%eax
sub    $0x198,%eax
je     1261 <request_get_respstr+0x161>
jmp    118f <request_get_respstr+0x8f>
mov    -0x10(%rbp),%eax
sub    $0x19d,%eax
je     1271 <request_get_respstr+0x171>
jmp    11a2 <request_get_respstr+0xa2>
mov    -0x10(%rbp),%eax
sub    $0x1a2,%eax
je     1281 <request_get_respstr+0x181>
jmp    11b5 <request_get_respstr+0xb5>
mov    -0x10(%rbp),%eax
sub    $0x1af,%eax
je     1291 <request_get_respstr+0x191>
jmp    11c8 <request_get_respstr+0xc8>
mov    -0x10(%rbp),%eax
sub    $0x1f4,%eax
je     12a1 <request_get_respstr+0x1a1>
jmp    11db <request_get_respstr+0xdb>
mov    -0x10(%rbp),%eax
sub    $0x1f5,%eax
je     12b1 <request_get_respstr+0x1b1>
jmp    11ee <request_get_respstr+0xee>
mov    -0x10(%rbp),%eax
sub    $0x1f9,%eax
je     12c1 <request_get_respstr+0x1c1>
jmp    12d1 <request_get_respstr+0x1d1>
lea    0xdf8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dc <request_get_respstr+0x1dc>
lea    0xe05(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dc <request_get_respstr+0x1dc>
lea    0xddb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dc <request_get_respstr+0x1dc>
lea    0xdd7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dc <request_get_respstr+0x1dc>
lea    0xdd1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dc <request_get_respstr+0x1dc>
lea    0xdcb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dc <request_get_respstr+0x1dc>
lea    0xdce(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dc <request_get_respstr+0x1dc>
lea    0xdce(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dc <request_get_respstr+0x1dc>
lea    0xdd7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dc <request_get_respstr+0x1dc>
lea    0xdd4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dc <request_get_respstr+0x1dc>
lea    0xde4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dc <request_get_respstr+0x1dc>
lea    0xdea(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dc <request_get_respstr+0x1dc>
lea    0xdea(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dc <request_get_respstr+0x1dc>
lea    0xdf5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<request_get_respstr>:
lea    -0x190(%rdi),%eax
cmp    $0x69,%eax
ja     1123 <request_get_respstr+0x23>
lea    0xeee(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1089(%rip),%rax
ret
cmp    $0xc8,%edi
je     1193 <request_get_respstr+0x93>
cmp    $0x12e,%edi
jne    113b <request_get_respstr+0x3b>
lea    0x108b(%rip),%rax
ret
lea    0x1133(%rip),%rax
ret
lea    0x106d(%rip),%rax
ret
lea    0x106f(%rip),%rax
ret
lea    0x1071(%rip),%rax
ret
lea    0x107c(%rip),%rax
ret
lea    0x1084(%rip),%rax
ret
lea    0x1095(%rip),%rax
ret
lea    0x109a(%rip),%rax
ret
lea    0x10b2(%rip),%rax
ret
lea    0x10c0(%rip),%rax
ret
lea    0x10c8(%rip),%rax
ret
lea    0x100e(%rip),%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"OK\00"
@.str.1 = [6 x i8] c"Found\00"
@.str.2 = [12 x i8] c"Bad Request\00"
@.str.3 = [10 x i8] c"Forbidden\00"
@.str.4 = [10 x i8] c"Not Found\00"
@.str.5 = [19 x i8] c"Method Not Allowed\00"
@.str.6 = [16 x i8] c"Request Timeout\00"
@.str.7 = [25 x i8] c"Request Entity Too Large\00"
@.str.8 = [13 x i8] c"I'm a teapot\00"
@.str.9 = [32 x i8] c"Request Header Fields Too Large\00"
@.str.10 = [22 x i8] c"Internal Server Error\00"
@.str.11 = [16 x i8] c"Not Implemented\00"
@.str.12 = [27 x i8] c"HTTP Version Not Supported\00"
@.str.13 = [22 x i8] c"Unknown Response Code\00"
define i8* @request_get_respstr(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %18 [
i32 200, label %5
i32 302, label %6
i32 400, label %7
i32 403, label %8
i32 404, label %9
i32 405, label %10
i32 408, label %11
i32 413, label %12
i32 418, label %13
i32 431, label %14
i32 500, label %15
i32 501, label %16
i32 505, label %17
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %19
6: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %19
7: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %19
8: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %19
9: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %19
10: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %19
11: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %19
12: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %19
13: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %19
14: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %19
15: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %19
16: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %19
17: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %19
18: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %19
19: ; preds = %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
@.str = [3 x i8] c"OK\00"
@.str.1 = [6 x i8] c"Found\00"
@.str.2 = [12 x i8] c"Bad Request\00"
@.str.3 = [10 x i8] c"Forbidden\00"
@.str.4 = [10 x i8] c"Not Found\00"
@.str.5 = [19 x i8] c"Method Not Allowed\00"
@.str.6 = [16 x i8] c"Request Timeout\00"
@.str.7 = [25 x i8] c"Request Entity Too Large\00"
@.str.8 = [13 x i8] c"I'm a teapot\00"
@.str.9 = [32 x i8] c"Request Header Fields Too Large\00"
@.str.10 = [22 x i8] c"Internal Server Error\00"
@.str.11 = [16 x i8] c"Not Implemented\00"
@.str.12 = [27 x i8] c"HTTP Version Not Supported\00"
@.str.13 = [22 x i8] c"Unknown Response Code\00"
define i8* @request_get_respstr(i32 %0) {
switch i32 %0, label %14 [
i32 200, label %15
i32 302, label %2
i32 400, label %3
i32 403, label %4
i32 404, label %5
i32 405, label %6
i32 408, label %7
i32 413, label %8
i32 418, label %9
i32 431, label %10
i32 500, label %11
i32 501, label %12
i32 505, label %13
]
2: ; preds = %1
br label %15
3: ; preds = %1
br label %15
4: ; preds = %1
br label %15
5: ; preds = %1
br label %15
6: ; preds = %1
br label %15
7: ; preds = %1
br label %15
8: ; preds = %1
br label %15
9: ; preds = %1
br label %15
10: ; preds = %1
br label %15
11: ; preds = %1
br label %15
12: ; preds = %1
br label %15
13: ; preds = %1
br label %15
14: ; preds = %1
br label %15
15: ; preds = %1, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%16 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([32 x i8], [32 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 ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([19 x i8], [19 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 ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([6 x i8], [6 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* %16
}