char const *picohttpStatusString(int code) {
  switch (code) {
  case 200:
    return "OK";
  case 400:
    return "Bad Request";
  case 401:
    return "Unauthorized";
  case 403:
    return "Forbidden";
  case 404:
    return "Not Found";
  case 414:
    return "Request URI Too Long";
  case 422:
    return "Unprocessable Entity";
  case 500:
    return "Internal Server Error";
  case 501:
    return "Not Implemented";
  case 505:
    return "HTTP Version Not Supported";
  }
  return "...";
}


x86 assembly (clang, -O0):
<picohttpStatusString>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0xc8,%eax
je     11c8 <picohttpStatusString+0xc8>
jmp    111d <picohttpStatusString+0x1d>
mov    -0x10(%rbp),%eax
sub    $0x190,%eax
je     11d8 <picohttpStatusString+0xd8>
jmp    1130 <picohttpStatusString+0x30>
mov    -0x10(%rbp),%eax
sub    $0x191,%eax
je     11e8 <picohttpStatusString+0xe8>
jmp    1143 <picohttpStatusString+0x43>
mov    -0x10(%rbp),%eax
sub    $0x193,%eax
je     11f8 <picohttpStatusString+0xf8>
jmp    1156 <picohttpStatusString+0x56>
mov    -0x10(%rbp),%eax
sub    $0x194,%eax
je     1208 <picohttpStatusString+0x108>
jmp    1169 <picohttpStatusString+0x69>
mov    -0x10(%rbp),%eax
sub    $0x19e,%eax
je     1218 <picohttpStatusString+0x118>
jmp    117c <picohttpStatusString+0x7c>
mov    -0x10(%rbp),%eax
sub    $0x1a6,%eax
je     1228 <picohttpStatusString+0x128>
jmp    118f <picohttpStatusString+0x8f>
mov    -0x10(%rbp),%eax
sub    $0x1f4,%eax
je     1238 <picohttpStatusString+0x138>
jmp    11a2 <picohttpStatusString+0xa2>
mov    -0x10(%rbp),%eax
sub    $0x1f5,%eax
je     1248 <picohttpStatusString+0x148>
jmp    11b5 <picohttpStatusString+0xb5>
mov    -0x10(%rbp),%eax
sub    $0x1f9,%eax
je     1258 <picohttpStatusString+0x158>
jmp    1268 <picohttpStatusString+0x168>
lea    0xe31(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1273 <picohttpStatusString+0x173>
lea    0xe24(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1273 <picohttpStatusString+0x173>
lea    0xe20(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1273 <picohttpStatusString+0x173>
lea    0xe1d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1273 <picohttpStatusString+0x173>
lea    0xe17(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1273 <picohttpStatusString+0x173>
lea    0xe11(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1273 <picohttpStatusString+0x173>
lea    0xe16(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1273 <picohttpStatusString+0x173>
lea    0xe1b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1273 <picohttpStatusString+0x173>
lea    0xe21(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1273 <picohttpStatusString+0x173>
lea    0xe21(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1273 <picohttpStatusString+0x173>
lea    0xe2c(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<picohttpStatusString>:
cmp    $0x1f3,%edi
jg     112b <picohttpStatusString+0x2b>
lea    -0x190(%rdi),%eax
cmp    $0x16,%eax
ja     114b <picohttpStatusString+0x4b>
lea    0xee6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf35(%rip),%rax
ret
cmp    $0x1f4,%edi
je     118b <picohttpStatusString+0x8b>
cmp    $0x1f5,%edi
je     1193 <picohttpStatusString+0x93>
cmp    $0x1f9,%edi
jne    115b <picohttpStatusString+0x5b>
lea    0xf92(%rip),%rax
ret
cmp    $0xc8,%edi
jne    115b <picohttpStatusString+0x5b>
lea    0xf02(%rip),%rax
ret
lea    0xf95(%rip),%rax
ret
lea    0xf01(%rip),%rax
ret
lea    0xf06(%rip),%rax
ret
lea    0xf08(%rip),%rax
ret
lea    0xf0a(%rip),%rax
ret
lea    0xf17(%rip),%rax
ret
lea    0xf24(%rip),%rax
ret
lea    0xf32(%rip),%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"OK\00"
@.str.1 = [12 x i8] c"Bad Request\00"
@.str.2 = [13 x i8] c"Unauthorized\00"
@.str.3 = [10 x i8] c"Forbidden\00"
@.str.4 = [10 x i8] c"Not Found\00"
@.str.5 = [21 x i8] c"Request URI Too Long\00"
@.str.6 = [21 x i8] c"Unprocessable Entity\00"
@.str.7 = [22 x i8] c"Internal Server Error\00"
@.str.8 = [16 x i8] c"Not Implemented\00"
@.str.9 = [27 x i8] c"HTTP Version Not Supported\00"
@.str.10 = [4 x i8] c"...\00"
define i8* @picohttpStatusString(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %15 [
i32 200, label %5
i32 400, label %6
i32 401, label %7
i32 403, label %8
i32 404, label %9
i32 414, label %10
i32 422, label %11
i32 500, label %12
i32 501, label %13
i32 505, label %14
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %16
6: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %16
7: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %16
8: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %16
9: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %16
10: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %16
11: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %16
12: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %16
13: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %16
14: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %16
15: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 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 = [3 x i8] c"OK\00"
@.str.1 = [12 x i8] c"Bad Request\00"
@.str.2 = [13 x i8] c"Unauthorized\00"
@.str.3 = [10 x i8] c"Forbidden\00"
@.str.4 = [10 x i8] c"Not Found\00"
@.str.5 = [21 x i8] c"Request URI Too Long\00"
@.str.6 = [21 x i8] c"Unprocessable Entity\00"
@.str.7 = [22 x i8] c"Internal Server Error\00"
@.str.8 = [16 x i8] c"Not Implemented\00"
@.str.9 = [27 x i8] c"HTTP Version Not Supported\00"
@.str.10 = [4 x i8] c"...\00"
define i8* @picohttpStatusString(i32 %0) {
switch i32 %0, label %11 [
i32 200, label %12
i32 400, label %2
i32 401, label %3
i32 403, label %4
i32 404, label %5
i32 414, label %6
i32 422, label %7
i32 500, label %8
i32 501, label %9
i32 505, 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 ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([21 x i8], [21 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 ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([12 x i8], [12 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* %13
}