char *httpdefstatus(int code) {
  switch (code) {
  case 200:
    return ("OK");
  case 201:
    return ("Created");
  case 202:
    return ("Accepted");
  case 204:
    return ("No Content");
  case 300:
    return ("Multiple Choices");
  case 301:
    return ("Moved Permanently");
  case 302:
    return ("Found");
  case 303:
    return ("See Other");
  case 304:
    return ("Not Modified");
  case 307:
    return ("Moved Temporarily");
  case 400:
    return ("Bad Request");
  case 401:
    return ("Unauthorized");
  case 403:
    return ("Forbidden");
  case 404:
    return ("Not Found");
  case 500:
    return ("Internal Server Error");
  case 501:
    return ("Not Implemented");
  case 503:
    return ("Service Unavailable");
  default:
    return ("Unknown status");
  }
}


x86 assembly (clang, -O0):
<httpdefstatus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0xc8,%eax
je     124d <httpdefstatus+0x14d>
jmp    111d <httpdefstatus+0x1d>
mov    -0x10(%rbp),%eax
sub    $0xc9,%eax
je     125d <httpdefstatus+0x15d>
jmp    1130 <httpdefstatus+0x30>
mov    -0x10(%rbp),%eax
sub    $0xca,%eax
je     126d <httpdefstatus+0x16d>
jmp    1143 <httpdefstatus+0x43>
mov    -0x10(%rbp),%eax
sub    $0xcc,%eax
je     127d <httpdefstatus+0x17d>
jmp    1156 <httpdefstatus+0x56>
mov    -0x10(%rbp),%eax
sub    $0x12c,%eax
je     128d <httpdefstatus+0x18d>
jmp    1169 <httpdefstatus+0x69>
mov    -0x10(%rbp),%eax
sub    $0x12d,%eax
je     129d <httpdefstatus+0x19d>
jmp    117c <httpdefstatus+0x7c>
mov    -0x10(%rbp),%eax
sub    $0x12e,%eax
je     12ad <httpdefstatus+0x1ad>
jmp    118f <httpdefstatus+0x8f>
mov    -0x10(%rbp),%eax
sub    $0x12f,%eax
je     12bd <httpdefstatus+0x1bd>
jmp    11a2 <httpdefstatus+0xa2>
mov    -0x10(%rbp),%eax
sub    $0x130,%eax
je     12cd <httpdefstatus+0x1cd>
jmp    11b5 <httpdefstatus+0xb5>
mov    -0x10(%rbp),%eax
sub    $0x133,%eax
je     12dd <httpdefstatus+0x1dd>
jmp    11c8 <httpdefstatus+0xc8>
mov    -0x10(%rbp),%eax
sub    $0x190,%eax
je     12ed <httpdefstatus+0x1ed>
jmp    11db <httpdefstatus+0xdb>
mov    -0x10(%rbp),%eax
sub    $0x191,%eax
je     12fd <httpdefstatus+0x1fd>
jmp    11ee <httpdefstatus+0xee>
mov    -0x10(%rbp),%eax
sub    $0x193,%eax
je     130d <httpdefstatus+0x20d>
jmp    1201 <httpdefstatus+0x101>
mov    -0x10(%rbp),%eax
sub    $0x194,%eax
je     131d <httpdefstatus+0x21d>
jmp    1214 <httpdefstatus+0x114>
mov    -0x10(%rbp),%eax
sub    $0x1f4,%eax
je     132d <httpdefstatus+0x22d>
jmp    1227 <httpdefstatus+0x127>
mov    -0x10(%rbp),%eax
sub    $0x1f5,%eax
je     133d <httpdefstatus+0x23d>
jmp    123a <httpdefstatus+0x13a>
mov    -0x10(%rbp),%eax
sub    $0x1f7,%eax
je     134d <httpdefstatus+0x24d>
jmp    135d <httpdefstatus+0x25d>
lea    0xdac(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd9f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd97(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd90(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd8b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd8c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xdde(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd7e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd78(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd75(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd77(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd73(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd70(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd6a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd64(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd6a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd6a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1368 <httpdefstatus+0x268>
lea    0xd6e(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<httpdefstatus>:
cmp    $0x18f,%edi
jg     112b <httpdefstatus+0x2b>
lea    -0x12c(%rdi),%eax
cmp    $0x7,%eax
ja     115a <httpdefstatus+0x5a>
lea    0xefa(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf3d(%rip),%rax
ret
cmp    $0x1f3,%edi
jg     1188 <httpdefstatus+0x88>
add    $0xfffffe70,%edi
cmp    $0x4,%edi
ja     1208 <httpdefstatus+0x108>
lea    0xeeb(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xf5a(%rip),%rax
ret
add    $0xffffff38,%edi
cmp    $0x4,%edi
ja     1208 <httpdefstatus+0x108>
lea    0xed8(%rip),%rax
lea    0xe89(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
lea    0xec4(%rip),%rax
ret
cmp    $0x1f4,%edi
je     11f8 <httpdefstatus+0xf8>
cmp    $0x1f5,%edi
je     1200 <httpdefstatus+0x100>
cmp    $0x1f7,%edi
jne    1208 <httpdefstatus+0x108>
lea    0xf5f(%rip),%rax
ret
lea    0xec9(%rip),%rax
ret
lea    0xf23(%rip),%rax
ret
lea    0xecb(%rip),%rax
ret
lea    0xecd(%rip),%rax
ret
lea    0xed2(%rip),%rax
ret
lea    0xee8(%rip),%rax
ret
lea    0xeed(%rip),%rax
ret
lea    0xeef(%rip),%rax
ret
lea    0xe64(%rip),%rax
ret
lea    0xe65(%rip),%rax
ret
lea    0xee1(%rip),%rax
ret
lea    0xeef(%rip),%rax
ret
lea    0xf0b(%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 = [11 x i8] c"No Content\00"
@.str.4 = [17 x i8] c"Multiple Choices\00"
@.str.5 = [18 x i8] c"Moved Permanently\00"
@.str.6 = [6 x i8] c"Found\00"
@.str.7 = [10 x i8] c"See Other\00"
@.str.8 = [13 x i8] c"Not Modified\00"
@.str.9 = [18 x i8] c"Moved Temporarily\00"
@.str.10 = [12 x i8] c"Bad Request\00"
@.str.11 = [13 x i8] c"Unauthorized\00"
@.str.12 = [10 x i8] c"Forbidden\00"
@.str.13 = [10 x i8] c"Not Found\00"
@.str.14 = [22 x i8] c"Internal Server Error\00"
@.str.15 = [16 x i8] c"Not Implemented\00"
@.str.16 = [20 x i8] c"Service Unavailable\00"
@.str.17 = [15 x i8] c"Unknown status\00"
define i8* @httpdefstatus(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %22 [
i32 200, label %5
i32 201, label %6
i32 202, label %7
i32 204, label %8
i32 300, label %9
i32 301, label %10
i32 302, label %11
i32 303, label %12
i32 304, label %13
i32 307, label %14
i32 400, label %15
i32 401, label %16
i32 403, label %17
i32 404, label %18
i32 500, label %19
i32 501, label %20
i32 503, label %21
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %23
6: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %23
7: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %23
8: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %23
9: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %23
10: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %23
11: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %23
12: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %23
13: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %23
14: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %23
15: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %23
16: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %23
17: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %23
18: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %23
19: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %23
20: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %23
21: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %23
22: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %23
23: ; preds = %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%24 = load i8*, i8** %2
ret i8* %24
}

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 = [11 x i8] c"No Content\00"
@.str.4 = [17 x i8] c"Multiple Choices\00"
@.str.5 = [18 x i8] c"Moved Permanently\00"
@.str.6 = [6 x i8] c"Found\00"
@.str.7 = [10 x i8] c"See Other\00"
@.str.8 = [13 x i8] c"Not Modified\00"
@.str.9 = [18 x i8] c"Moved Temporarily\00"
@.str.10 = [12 x i8] c"Bad Request\00"
@.str.11 = [13 x i8] c"Unauthorized\00"
@.str.12 = [10 x i8] c"Forbidden\00"
@.str.13 = [10 x i8] c"Not Found\00"
@.str.14 = [22 x i8] c"Internal Server Error\00"
@.str.15 = [16 x i8] c"Not Implemented\00"
@.str.16 = [20 x i8] c"Service Unavailable\00"
@.str.17 = [15 x i8] c"Unknown status\00"
define i8* @httpdefstatus(i32 %0) {
switch i32 %0, label %18 [
i32 200, label %19
i32 201, label %2
i32 202, label %3
i32 204, label %4
i32 300, label %5
i32 301, label %6
i32 302, label %7
i32 303, label %8
i32 304, label %9
i32 307, label %10
i32 400, label %11
i32 401, label %12
i32 403, label %13
i32 404, label %14
i32 500, label %15
i32 501, label %16
i32 503, label %17
]
2: ; preds = %1
br label %19
3: ; preds = %1
br label %19
4: ; preds = %1
br label %19
5: ; preds = %1
br label %19
6: ; preds = %1
br label %19
7: ; preds = %1
br label %19
8: ; preds = %1
br label %19
9: ; preds = %1
br label %19
10: ; preds = %1
br label %19
11: ; preds = %1
br label %19
12: ; preds = %1
br label %19
13: ; preds = %1
br label %19
14: ; preds = %1
br label %19
15: ; preds = %1
br label %19
16: ; preds = %1
br label %19
17: ; preds = %1
br label %19
18: ; preds = %1
br label %19
19: ; preds = %1, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%20 = phi i8* [ getelementptr inbounds ([15 x i8], [15 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 ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([18 x i8], [18 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 ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([11 x i8], [11 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* %20
}