const char *http_code_phrase(int status) {
  switch (status) {
  case 100:
    return "100 Continue";
  case 200:
    return "200 OK";
  case 204:
    return "204 No Content";
  case 206:
    return "206 Partial Content";
  case 302:
    return "302 Moved";
  case 304:
    return "304 Not Modified";
  case 400:
    return "400 Bad Request";
  case 401:
    return "401 Not Authorized";
  case 403:
    return "403 Forbidden";
  case 404:
    return "404 Not Found";
  case 405:
    return "405 Method Not Allowed";
  case 411:
    return "411 Length Required";
  case 412:
    return "412 Precondition Failed";
  case 414:
    return "414 Request-URI Too Long";
  case 416:
    return "416 Requested Range Not Satisfiable";
  case 417:
    return "417 Expectation Failed";
  case 501:
    return "501 Not Implemented";
  case 503:
    return "503 Service Unavailable";
  case 505:
    return "505 HTTP Version Not Supported";
  default:
    return "500 Internal Server Error";
  }
}


x86 assembly (clang, -O0):
<http_code_phrase>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x64,%eax
je     1271 <http_code_phrase+0x171>
jmp    111b <http_code_phrase+0x1b>
mov    -0x10(%rbp),%eax
sub    $0xc8,%eax
je     1281 <http_code_phrase+0x181>
jmp    112e <http_code_phrase+0x2e>
mov    -0x10(%rbp),%eax
sub    $0xcc,%eax
je     1291 <http_code_phrase+0x191>
jmp    1141 <http_code_phrase+0x41>
mov    -0x10(%rbp),%eax
sub    $0xce,%eax
je     12a1 <http_code_phrase+0x1a1>
jmp    1154 <http_code_phrase+0x54>
mov    -0x10(%rbp),%eax
sub    $0x12e,%eax
je     12b1 <http_code_phrase+0x1b1>
jmp    1167 <http_code_phrase+0x67>
mov    -0x10(%rbp),%eax
sub    $0x130,%eax
je     12c1 <http_code_phrase+0x1c1>
jmp    117a <http_code_phrase+0x7a>
mov    -0x10(%rbp),%eax
sub    $0x190,%eax
je     12d1 <http_code_phrase+0x1d1>
jmp    118d <http_code_phrase+0x8d>
mov    -0x10(%rbp),%eax
sub    $0x191,%eax
je     12e1 <http_code_phrase+0x1e1>
jmp    11a0 <http_code_phrase+0xa0>
mov    -0x10(%rbp),%eax
sub    $0x193,%eax
je     12f1 <http_code_phrase+0x1f1>
jmp    11b3 <http_code_phrase+0xb3>
mov    -0x10(%rbp),%eax
sub    $0x194,%eax
je     1301 <http_code_phrase+0x201>
jmp    11c6 <http_code_phrase+0xc6>
mov    -0x10(%rbp),%eax
sub    $0x195,%eax
je     1311 <http_code_phrase+0x211>
jmp    11d9 <http_code_phrase+0xd9>
mov    -0x10(%rbp),%eax
sub    $0x19b,%eax
je     1321 <http_code_phrase+0x221>
jmp    11ec <http_code_phrase+0xec>
mov    -0x10(%rbp),%eax
sub    $0x19c,%eax
je     1331 <http_code_phrase+0x231>
jmp    11ff <http_code_phrase+0xff>
mov    -0x10(%rbp),%eax
sub    $0x19e,%eax
je     1341 <http_code_phrase+0x241>
jmp    1212 <http_code_phrase+0x112>
mov    -0x10(%rbp),%eax
sub    $0x1a0,%eax
je     1351 <http_code_phrase+0x251>
jmp    1225 <http_code_phrase+0x125>
mov    -0x10(%rbp),%eax
sub    $0x1a1,%eax
je     1361 <http_code_phrase+0x261>
jmp    1238 <http_code_phrase+0x138>
mov    -0x10(%rbp),%eax
sub    $0x1f5,%eax
je     1371 <http_code_phrase+0x271>
jmp    124b <http_code_phrase+0x14b>
mov    -0x10(%rbp),%eax
sub    $0x1f7,%eax
je     1381 <http_code_phrase+0x281>
jmp    125e <http_code_phrase+0x15e>
mov    -0x10(%rbp),%eax
sub    $0x1f9,%eax
je     1391 <http_code_phrase+0x291>
jmp    13a1 <http_code_phrase+0x2a1>
lea    0xd88(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xd85(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xd7c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xd7b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xd7f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xd79(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xd7a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xd7a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xd7d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xd7b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xd79(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xd80(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xd84(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xd8c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xd95(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xda9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xdb0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xdb4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xdbc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13ac <http_code_phrase+0x2ac>
lea    0xdcb(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_code_phrase>:
cmp    $0x12d,%edi
jle    112b <http_code_phrase+0x2b>
lea    -0x190(%rdi),%eax
cmp    $0x69,%eax
ja     1160 <http_code_phrase+0x60>
lea    0xee6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x10d0(%rip),%rax
ret
cmp    $0xcb,%edi
jg     1148 <http_code_phrase+0x48>
cmp    $0x64,%edi
je     117c <http_code_phrase+0x7c>
cmp    $0xc8,%edi
jne    118c <http_code_phrase+0x8c>
lea    0x106e(%rip),%rax
ret
cmp    $0xcc,%edi
je     1184 <http_code_phrase+0x84>
cmp    $0xce,%edi
jne    118c <http_code_phrase+0x8c>
lea    0x106c(%rip),%rax
ret
cmp    $0x12e,%edi
je     11f4 <http_code_phrase+0xf4>
cmp    $0x130,%edi
jne    118c <http_code_phrase+0x8c>
lea    0x106e(%rip),%rax
ret
lea    0x1025(%rip),%rax
ret
lea    0x1031(%rip),%rax
ret
lea    0x1188(%rip),%rax
ret
lea    0x106f(%rip),%rax
ret
lea    0x107a(%rip),%rax
ret
lea    0x1080(%rip),%rax
ret
lea    0x1086(%rip),%rax
ret
lea    0x1095(%rip),%rax
ret
lea    0x10a1(%rip),%rax
ret
lea    0x10b1(%rip),%rax
ret
lea    0x10c2(%rip),%rax
ret
lea    0x10de(%rip),%rax
ret
lea    0x10ed(%rip),%rax
ret
lea    0x10f9(%rip),%rax
ret
lea    0x1109(%rip),%rax
ret
lea    0xfe4(%rip),%rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"100 Continue\00"
@.str.1 = [7 x i8] c"200 OK\00"
@.str.2 = [15 x i8] c"204 No Content\00"
@.str.3 = [20 x i8] c"206 Partial Content\00"
@.str.4 = [10 x i8] c"302 Moved\00"
@.str.5 = [17 x i8] c"304 Not Modified\00"
@.str.6 = [16 x i8] c"400 Bad Request\00"
@.str.7 = [19 x i8] c"401 Not Authorized\00"
@.str.8 = [14 x i8] c"403 Forbidden\00"
@.str.9 = [14 x i8] c"404 Not Found\00"
@.str.10 = [23 x i8] c"405 Method Not Allowed\00"
@.str.11 = [20 x i8] c"411 Length Required\00"
@.str.12 = [24 x i8] c"412 Precondition Failed\00"
@.str.13 = [25 x i8] c"414 Request-URI Too Long\00"
@.str.14 = [36 x i8] c"416 Requested Range Not Satisfiable\00"
@.str.15 = [23 x i8] c"417 Expectation Failed\00"
@.str.16 = [20 x i8] c"501 Not Implemented\00"
@.str.17 = [24 x i8] c"503 Service Unavailable\00"
@.str.18 = [31 x i8] c"505 HTTP Version Not Supported\00"
@.str.19 = [26 x i8] c"500 Internal Server Error\00"
define i8* @http_code_phrase(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %24 [
i32 100, label %5
i32 200, label %6
i32 204, label %7
i32 206, label %8
i32 302, label %9
i32 304, label %10
i32 400, label %11
i32 401, label %12
i32 403, label %13
i32 404, label %14
i32 405, label %15
i32 411, label %16
i32 412, label %17
i32 414, label %18
i32 416, label %19
i32 417, label %20
i32 501, label %21
i32 503, label %22
i32 505, label %23
]
5: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %2
br label %25
6: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %25
7: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %25
8: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %25
9: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %25
10: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %25
11: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %25
12: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %25
13: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %25
14: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %25
15: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %25
16: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %25
17: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %25
18: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %25
19: ; preds = %1
store i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %25
20: ; preds = %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %25
21: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %25
22: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %25
23: ; preds = %1
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %25
24: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %25
25: ; preds = %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%26 = load i8*, i8** %2
ret i8* %26
}

LLVM IR (-O2):
@.str = [13 x i8] c"100 Continue\00"
@.str.1 = [7 x i8] c"200 OK\00"
@.str.2 = [15 x i8] c"204 No Content\00"
@.str.3 = [20 x i8] c"206 Partial Content\00"
@.str.4 = [10 x i8] c"302 Moved\00"
@.str.5 = [17 x i8] c"304 Not Modified\00"
@.str.6 = [16 x i8] c"400 Bad Request\00"
@.str.7 = [19 x i8] c"401 Not Authorized\00"
@.str.8 = [14 x i8] c"403 Forbidden\00"
@.str.9 = [14 x i8] c"404 Not Found\00"
@.str.10 = [23 x i8] c"405 Method Not Allowed\00"
@.str.11 = [20 x i8] c"411 Length Required\00"
@.str.12 = [24 x i8] c"412 Precondition Failed\00"
@.str.13 = [25 x i8] c"414 Request-URI Too Long\00"
@.str.14 = [36 x i8] c"416 Requested Range Not Satisfiable\00"
@.str.15 = [23 x i8] c"417 Expectation Failed\00"
@.str.16 = [20 x i8] c"501 Not Implemented\00"
@.str.17 = [24 x i8] c"503 Service Unavailable\00"
@.str.18 = [31 x i8] c"505 HTTP Version Not Supported\00"
@.str.19 = [26 x i8] c"500 Internal Server Error\00"
define i8* @http_code_phrase(i32 %0) {
switch i32 %0, label %20 [
i32 100, label %21
i32 200, label %2
i32 204, label %3
i32 206, label %4
i32 302, label %5
i32 304, label %6
i32 400, label %7
i32 401, label %8
i32 403, label %9
i32 404, label %10
i32 405, label %11
i32 411, label %12
i32 412, label %13
i32 414, label %14
i32 416, label %15
i32 417, label %16
i32 501, label %17
i32 503, label %18
i32 505, label %19
]
2: ; preds = %1
br label %21
3: ; preds = %1
br label %21
4: ; preds = %1
br label %21
5: ; preds = %1
br label %21
6: ; preds = %1
br label %21
7: ; preds = %1
br label %21
8: ; preds = %1
br label %21
9: ; preds = %1
br label %21
10: ; preds = %1
br label %21
11: ; preds = %1
br label %21
12: ; preds = %1
br label %21
13: ; preds = %1
br label %21
14: ; preds = %1
br label %21
15: ; preds = %1
br label %21
16: ; preds = %1
br label %21
17: ; preds = %1
br label %21
18: ; preds = %1
br label %21
19: ; preds = %1
br label %21
20: ; preds = %1
br label %21
21: ; preds = %1, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%22 = phi i8* [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.19, i64 0, i64 0), %20 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.18, i64 0, i64 0), %19 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i64 0, i64 0), %17 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([19 x i8], [19 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 ([17 x i8], [17 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 ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %22
}