char *http_get_response_message(int status_code) {
  switch (status_code) {
  case 100:
    return "Continue";
  case 200:
    return "OK";
  case 301:
    return "Moved Permanently";
  case 302:
    return "Found";
  case 304:
    return "Not Modified";
  case 400:
    return "Bad Request";
  case 401:
    return "Unauthorized";
  case 403:
    return "Forbidden";
  case 404:
    return "Not Found";
  case 405:
    return "Method Not Allowed";
  default:
    return "Internal Server Error";
  }
}


x86 assembly (clang, -O0):
<http_get_response_message>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x64,%eax
je     11c6 <http_get_response_message+0xc6>
jmp    111b <http_get_response_message+0x1b>
mov    -0x10(%rbp),%eax
sub    $0xc8,%eax
je     11d6 <http_get_response_message+0xd6>
jmp    112e <http_get_response_message+0x2e>
mov    -0x10(%rbp),%eax
sub    $0x12d,%eax
je     11e6 <http_get_response_message+0xe6>
jmp    1141 <http_get_response_message+0x41>
mov    -0x10(%rbp),%eax
sub    $0x12e,%eax
je     11f6 <http_get_response_message+0xf6>
jmp    1154 <http_get_response_message+0x54>
mov    -0x10(%rbp),%eax
sub    $0x130,%eax
je     1206 <http_get_response_message+0x106>
jmp    1167 <http_get_response_message+0x67>
mov    -0x10(%rbp),%eax
sub    $0x190,%eax
je     1216 <http_get_response_message+0x116>
jmp    117a <http_get_response_message+0x7a>
mov    -0x10(%rbp),%eax
sub    $0x191,%eax
je     1226 <http_get_response_message+0x126>
jmp    118d <http_get_response_message+0x8d>
mov    -0x10(%rbp),%eax
sub    $0x193,%eax
je     1236 <http_get_response_message+0x136>
jmp    11a0 <http_get_response_message+0xa0>
mov    -0x10(%rbp),%eax
sub    $0x194,%eax
je     1246 <http_get_response_message+0x146>
jmp    11b3 <http_get_response_message+0xb3>
mov    -0x10(%rbp),%eax
sub    $0x195,%eax
je     1256 <http_get_response_message+0x156>
jmp    1266 <http_get_response_message+0x166>
lea    0xe33(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1271 <http_get_response_message+0x171>
lea    0xe2c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1271 <http_get_response_message+0x171>
lea    0xe1f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1271 <http_get_response_message+0x171>
lea    0xe55(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1271 <http_get_response_message+0x171>
lea    0xe11(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1271 <http_get_response_message+0x171>
lea    0xe0e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1271 <http_get_response_message+0x171>
lea    0xe0a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1271 <http_get_response_message+0x171>
lea    0xe07(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1271 <http_get_response_message+0x171>
lea    0xe01(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1271 <http_get_response_message+0x171>
lea    0xdfb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1271 <http_get_response_message+0x171>
lea    0xdfe(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_get_response_message>:
cmp    $0x12d,%edi
jg     1125 <http_get_response_message+0x25>
cmp    $0x64,%edi
je     1160 <http_get_response_message+0x60>
cmp    $0xc8,%edi
je     1168 <http_get_response_message+0x68>
cmp    $0x12d,%edi
jne    1170 <http_get_response_message+0x70>
lea    0xf00(%rip),%rax
ret
lea    -0x190(%rdi),%eax
cmp    $0x5,%eax
ja     1148 <http_get_response_message+0x48>
lea    0xec9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xefc(%rip),%rax
ret
cmp    $0x12e,%edi
je     1198 <http_get_response_message+0x98>
cmp    $0x130,%edi
jne    1170 <http_get_response_message+0x70>
lea    0xed7(%rip),%rax
ret
lea    0xeb1(%rip),%rax
ret
lea    0xeb2(%rip),%rax
ret
lea    0xf0c(%rip),%rax
ret
lea    0xed0(%rip),%rax
ret
lea    0xed5(%rip),%rax
ret
lea    0xed7(%rip),%rax
ret
lea    0xed9(%rip),%rax
ret
lea    0xecb(%rip),%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Continue\00"
@.str.1 = [3 x i8] c"OK\00"
@.str.2 = [18 x i8] c"Moved Permanently\00"
@.str.3 = [6 x i8] c"Found\00"
@.str.4 = [13 x i8] c"Not Modified\00"
@.str.5 = [12 x i8] c"Bad Request\00"
@.str.6 = [13 x i8] c"Unauthorized\00"
@.str.7 = [10 x i8] c"Forbidden\00"
@.str.8 = [10 x i8] c"Not Found\00"
@.str.9 = [19 x i8] c"Method Not Allowed\00"
@.str.10 = [22 x i8] c"Internal Server Error\00"
define i8* @http_get_response_message(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %15 [
i32 100, label %5
i32 200, label %6
i32 301, label %7
i32 302, label %8
i32 304, label %9
i32 400, label %10
i32 401, label %11
i32 403, label %12
i32 404, label %13
i32 405, label %14
]
5: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %2
br label %16
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %16
7: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %16
8: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %16
9: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %16
10: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %16
11: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %16
12: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %16
13: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %16
14: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %16
15: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %16
16: ; preds = %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
@.str = [9 x i8] c"Continue\00"
@.str.1 = [3 x i8] c"OK\00"
@.str.2 = [18 x i8] c"Moved Permanently\00"
@.str.3 = [6 x i8] c"Found\00"
@.str.4 = [13 x i8] c"Not Modified\00"
@.str.5 = [12 x i8] c"Bad Request\00"
@.str.6 = [13 x i8] c"Unauthorized\00"
@.str.7 = [10 x i8] c"Forbidden\00"
@.str.8 = [10 x i8] c"Not Found\00"
@.str.9 = [19 x i8] c"Method Not Allowed\00"
@.str.10 = [22 x i8] c"Internal Server Error\00"
define i8* @http_get_response_message(i32 %0) {
switch i32 %0, label %11 [
i32 100, label %12
i32 200, label %2
i32 301, label %3
i32 302, label %4
i32 304, label %5
i32 400, label %6
i32 401, label %7
i32 403, label %8
i32 404, label %9
i32 405, label %10
]
2: ; preds = %1
br label %12
3: ; preds = %1
br label %12
4: ; preds = %1
br label %12
5: ; preds = %1
br label %12
6: ; preds = %1
br label %12
7: ; preds = %1
br label %12
8: ; preds = %1
br label %12
9: ; preds = %1
br label %12
10: ; preds = %1
br label %12
11: ; preds = %1
br label %12
12: ; preds = %1, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%13 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([19 x i8], [19 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 ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %13
}