#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
void http_status_to_string(int status, char *buff) {
  switch (status) {
  case 100:
    strcpy(buff, "100 Continue");
    break;
  case 101:
    strcpy(buff, "101 Switching Protocols");
    break;
  case 300:
    strcpy(buff, "300 Multiple Choices");
    break;
  case 301:
    strcpy(buff, "301 Moved Permanently");
    break;
  case 302:
    strcpy(buff, "302 Found");
    break;
  case 303:
    strcpy(buff, "303 See Other");
    break;
  case 304:
    strcpy(buff, "304 Not Modified");
    break;
  case 305:
    strcpy(buff, "305 Use Proxy");
    break;
  case 306:
    strcpy(buff, "306 Unused");
    break;
  case 307:
    strcpy(buff, "307 Temporary Redirect");
    break;
  case 400:
    strcpy(buff, "400 Bad Request");
    break;
  case 401:
    strcpy(buff, "401 Unauthorized");
    break;
  case 402:
    strcpy(buff, "402 Payment Required");
    break;
  case 403:
    strcpy(buff, "403 Forbidden");
    break;
  case 404:
    strcpy(buff, "404 Not Found");
    break;
  case 405:
    strcpy(buff, "405 Method Not Allowed");
    break;
  case 406:
    strcpy(buff, "406 Not Acceptable");
    break;
  case 407:
    strcpy(buff, "407 Proxy Authentication Required");
    break;
  case 408:
    strcpy(buff, "408 Request Timeout");
    break;
  case 409:
    strcpy(buff, "409 Conflict");
    break;
  case 410:
    strcpy(buff, "410 Gone");
    break;
  case 411:
    strcpy(buff, "411 Length Required");
    break;
  case 412:
    strcpy(buff, "412 Precondition Failed");
    break;
  case 413:
    strcpy(buff, "413 Request Entity Too Large");
    break;
  case 414:
    strcpy(buff, "414 Request-url Too Long");
    break;
  case 415:
    strcpy(buff, "415 Unsupported Media Type");
    break;
  case 417:
    strcpy(buff, "417 Expectation Failed");
    break;
  case 500:
    strcpy(buff, "500 Internal Server Error");
    break;
  case 501:
    strcpy(buff, "501 Not Implemented");
    break;
  case 502:
    strcpy(buff, "502 Bad Gateway");
    break;
  case 503:
    strcpy(buff, "503 Service Unavailable");
    break;
  case 504:
    strcpy(buff, "504 Gateway Timeout");
    break;
  case 505:
    strcpy(buff, "505 HTTP Version Not Supported");
    break;
  default:
    sprintf(buff, "%d", status);
    break;
  }
}


x86 assembly (clang, -O0):
<http_status_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x64,%eax
je     13a1 <http_status_to_string+0x281>
jmp    1143 <http_status_to_string+0x23>
mov    -0x14(%rbp),%eax
sub    $0x65,%eax
je     13b6 <http_status_to_string+0x296>
jmp    1154 <http_status_to_string+0x34>
mov    -0x14(%rbp),%eax
sub    $0x12c,%eax
je     13cb <http_status_to_string+0x2ab>
jmp    1167 <http_status_to_string+0x47>
mov    -0x14(%rbp),%eax
sub    $0x12d,%eax
je     13e0 <http_status_to_string+0x2c0>
jmp    117a <http_status_to_string+0x5a>
mov    -0x14(%rbp),%eax
sub    $0x12e,%eax
je     13f5 <http_status_to_string+0x2d5>
jmp    118d <http_status_to_string+0x6d>
mov    -0x14(%rbp),%eax
sub    $0x12f,%eax
je     140a <http_status_to_string+0x2ea>
jmp    11a0 <http_status_to_string+0x80>
mov    -0x14(%rbp),%eax
sub    $0x130,%eax
je     141f <http_status_to_string+0x2ff>
jmp    11b3 <http_status_to_string+0x93>
mov    -0x14(%rbp),%eax
sub    $0x131,%eax
je     1434 <http_status_to_string+0x314>
jmp    11c6 <http_status_to_string+0xa6>
mov    -0x14(%rbp),%eax
sub    $0x132,%eax
je     1449 <http_status_to_string+0x329>
jmp    11d9 <http_status_to_string+0xb9>
mov    -0x14(%rbp),%eax
sub    $0x133,%eax
je     145e <http_status_to_string+0x33e>
jmp    11ec <http_status_to_string+0xcc>
mov    -0x14(%rbp),%eax
sub    $0x190,%eax
je     1473 <http_status_to_string+0x353>
jmp    11ff <http_status_to_string+0xdf>
mov    -0x14(%rbp),%eax
sub    $0x191,%eax
je     1488 <http_status_to_string+0x368>
jmp    1212 <http_status_to_string+0xf2>
mov    -0x14(%rbp),%eax
sub    $0x192,%eax
je     149d <http_status_to_string+0x37d>
jmp    1225 <http_status_to_string+0x105>
mov    -0x14(%rbp),%eax
sub    $0x193,%eax
je     14b2 <http_status_to_string+0x392>
jmp    1238 <http_status_to_string+0x118>
mov    -0x14(%rbp),%eax
sub    $0x194,%eax
je     14c7 <http_status_to_string+0x3a7>
jmp    124b <http_status_to_string+0x12b>
mov    -0x14(%rbp),%eax
sub    $0x195,%eax
je     14dc <http_status_to_string+0x3bc>
jmp    125e <http_status_to_string+0x13e>
mov    -0x14(%rbp),%eax
sub    $0x196,%eax
je     14f1 <http_status_to_string+0x3d1>
jmp    1271 <http_status_to_string+0x151>
mov    -0x14(%rbp),%eax
sub    $0x197,%eax
je     1506 <http_status_to_string+0x3e6>
jmp    1284 <http_status_to_string+0x164>
mov    -0x14(%rbp),%eax
sub    $0x198,%eax
je     151b <http_status_to_string+0x3fb>
jmp    1297 <http_status_to_string+0x177>
mov    -0x14(%rbp),%eax
sub    $0x199,%eax
je     1530 <http_status_to_string+0x410>
jmp    12aa <http_status_to_string+0x18a>
mov    -0x14(%rbp),%eax
sub    $0x19a,%eax
je     1545 <http_status_to_string+0x425>
jmp    12bd <http_status_to_string+0x19d>
mov    -0x14(%rbp),%eax
sub    $0x19b,%eax
je     155a <http_status_to_string+0x43a>
jmp    12d0 <http_status_to_string+0x1b0>
mov    -0x14(%rbp),%eax
sub    $0x19c,%eax
je     156f <http_status_to_string+0x44f>
jmp    12e3 <http_status_to_string+0x1c3>
mov    -0x14(%rbp),%eax
sub    $0x19d,%eax
je     1584 <http_status_to_string+0x464>
jmp    12f6 <http_status_to_string+0x1d6>
mov    -0x14(%rbp),%eax
sub    $0x19e,%eax
je     1599 <http_status_to_string+0x479>
jmp    1309 <http_status_to_string+0x1e9>
mov    -0x14(%rbp),%eax
sub    $0x19f,%eax
je     15ae <http_status_to_string+0x48e>
jmp    131c <http_status_to_string+0x1fc>
mov    -0x14(%rbp),%eax
sub    $0x1a1,%eax
je     15c3 <http_status_to_string+0x4a3>
jmp    132f <http_status_to_string+0x20f>
mov    -0x14(%rbp),%eax
sub    $0x1f4,%eax
je     15d8 <http_status_to_string+0x4b8>
jmp    1342 <http_status_to_string+0x222>
mov    -0x14(%rbp),%eax
sub    $0x1f5,%eax
je     15ed <http_status_to_string+0x4cd>
jmp    1355 <http_status_to_string+0x235>
mov    -0x14(%rbp),%eax
sub    $0x1f6,%eax
je     1602 <http_status_to_string+0x4e2>
jmp    1368 <http_status_to_string+0x248>
mov    -0x14(%rbp),%eax
sub    $0x1f7,%eax
je     1617 <http_status_to_string+0x4f7>
jmp    137b <http_status_to_string+0x25b>
mov    -0x14(%rbp),%eax
sub    $0x1f8,%eax
je     162c <http_status_to_string+0x50c>
jmp    138e <http_status_to_string+0x26e>
mov    -0x14(%rbp),%eax
sub    $0x1f9,%eax
je     1641 <http_status_to_string+0x521>
jmp    1656 <http_status_to_string+0x536>
mov    -0x10(%rbp),%rdi
lea    0xc54(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc4c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc4f(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc4f(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc50(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc45(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc3e(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc3a(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc33(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc29(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc2b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc26(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc22(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc22(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc1b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc14(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc16(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc14(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc21(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc20(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc18(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc0c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc0b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc0e(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc16(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc1a(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc20(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc22(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc27(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc26(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc21(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc24(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
lea    0xc23(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1669 <http_status_to_string+0x549>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xc2a(%rip),%rsi
call   1040 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_status_to_string>:
mov    %edi,%edx
lea    -0x12c(%rdx),%eax
cmp    $0xcd,%eax
ja     114b <http_status_to_string+0x2b>
lea    0xeca(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1217(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
cmp    $0x65,%edx
je     12b5 <http_status_to_string+0x195>
cmp    $0x64,%edx
jne    1165 <http_status_to_string+0x45>
lea    0x11d8(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x145a(%rip),%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1040 <sprintf@plt>
lea    0x11f4(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x11fe(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x11fc(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x11fe(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1203(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1205(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1204(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x120f(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1213(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1218(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1221(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1223(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1225(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1230(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1237(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x124d(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1255(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1259(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1259(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1264(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1273(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1287(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1297(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x12a9(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x12b7(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x12c8(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x12d3(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x12da(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x12e9(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x12f4(%rip),%rax
jmp    12bc <http_status_to_string+0x19c>
lea    0x1089(%rip),%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"100 Continue\00"
@.str.1 = [24 x i8] c"101 Switching Protocols\00"
@.str.2 = [21 x i8] c"300 Multiple Choices\00"
@.str.3 = [22 x i8] c"301 Moved Permanently\00"
@.str.4 = [10 x i8] c"302 Found\00"
@.str.5 = [14 x i8] c"303 See Other\00"
@.str.6 = [17 x i8] c"304 Not Modified\00"
@.str.7 = [14 x i8] c"305 Use Proxy\00"
@.str.8 = [11 x i8] c"306 Unused\00"
@.str.9 = [23 x i8] c"307 Temporary Redirect\00"
@.str.10 = [16 x i8] c"400 Bad Request\00"
@.str.11 = [17 x i8] c"401 Unauthorized\00"
@.str.12 = [21 x i8] c"402 Payment Required\00"
@.str.13 = [14 x i8] c"403 Forbidden\00"
@.str.14 = [14 x i8] c"404 Not Found\00"
@.str.15 = [23 x i8] c"405 Method Not Allowed\00"
@.str.16 = [19 x i8] c"406 Not Acceptable\00"
@.str.17 = [34 x i8] c"407 Proxy Authentication Required\00"
@.str.18 = [20 x i8] c"408 Request Timeout\00"
@.str.19 = [13 x i8] c"409 Conflict\00"
@.str.20 = [9 x i8] c"410 Gone\00"
@.str.21 = [20 x i8] c"411 Length Required\00"
@.str.22 = [24 x i8] c"412 Precondition Failed\00"
@.str.23 = [29 x i8] c"413 Request Entity Too Large\00"
@.str.24 = [25 x i8] c"414 Request-url Too Long\00"
@.str.25 = [27 x i8] c"415 Unsupported Media Type\00"
@.str.26 = [23 x i8] c"417 Expectation Failed\00"
@.str.27 = [26 x i8] c"500 Internal Server Error\00"
@.str.28 = [20 x i8] c"501 Not Implemented\00"
@.str.29 = [16 x i8] c"502 Bad Gateway\00"
@.str.30 = [24 x i8] c"503 Service Unavailable\00"
@.str.31 = [20 x i8] c"504 Gateway Timeout\00"
@.str.32 = [31 x i8] c"505 HTTP Version Not Supported\00"
@.str.33 = [3 x i8] c"%d\00"
define void @http_status_to_string(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
switch i32 %5, label %105 [
i32 100, label %6
i32 101, label %9
i32 300, label %12
i32 301, label %15
i32 302, label %18
i32 303, label %21
i32 304, label %24
i32 305, label %27
i32 306, label %30
i32 307, label %33
i32 400, label %36
i32 401, label %39
i32 402, label %42
i32 403, label %45
i32 404, label %48
i32 405, label %51
i32 406, label %54
i32 407, label %57
i32 408, label %60
i32 409, label %63
i32 410, label %66
i32 411, label %69
i32 412, label %72
i32 413, label %75
i32 414, label %78
i32 415, label %81
i32 417, label %84
i32 500, label %87
i32 501, label %90
i32 502, label %93
i32 503, label %96
i32 504, label %99
i32 505, label %102
]
6: ; preds = %2
%7 = load i8*, i8** %4
%8 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %109
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = call i32 @strcpy(i8* %10, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %109
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = call i32 @strcpy(i8* %13, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %109
15: ; preds = %2
%16 = load i8*, i8** %4
%17 = call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %109
18: ; preds = %2
%19 = load i8*, i8** %4
%20 = call i32 @strcpy(i8* %19, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %109
21: ; preds = %2
%22 = load i8*, i8** %4
%23 = call i32 @strcpy(i8* %22, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
br label %109
24: ; preds = %2
%25 = load i8*, i8** %4
%26 = call i32 @strcpy(i8* %25, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
br label %109
27: ; preds = %2
%28 = load i8*, i8** %4
%29 = call i32 @strcpy(i8* %28, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
br label %109
30: ; preds = %2
%31 = load i8*, i8** %4
%32 = call i32 @strcpy(i8* %31, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
br label %109
33: ; preds = %2
%34 = load i8*, i8** %4
%35 = call i32 @strcpy(i8* %34, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0))
br label %109
36: ; preds = %2
%37 = load i8*, i8** %4
%38 = call i32 @strcpy(i8* %37, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
br label %109
39: ; preds = %2
%40 = load i8*, i8** %4
%41 = call i32 @strcpy(i8* %40, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
br label %109
42: ; preds = %2
%43 = load i8*, i8** %4
%44 = call i32 @strcpy(i8* %43, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0))
br label %109
45: ; preds = %2
%46 = load i8*, i8** %4
%47 = call i32 @strcpy(i8* %46, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0))
br label %109
48: ; preds = %2
%49 = load i8*, i8** %4
%50 = call i32 @strcpy(i8* %49, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
br label %109
51: ; preds = %2
%52 = load i8*, i8** %4
%53 = call i32 @strcpy(i8* %52, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0))
br label %109
54: ; preds = %2
%55 = load i8*, i8** %4
%56 = call i32 @strcpy(i8* %55, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0))
br label %109
57: ; preds = %2
%58 = load i8*, i8** %4
%59 = call i32 @strcpy(i8* %58, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.17, i64 0, i64 0))
br label %109
60: ; preds = %2
%61 = load i8*, i8** %4
%62 = call i32 @strcpy(i8* %61, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.18, i64 0, i64 0))
br label %109
63: ; preds = %2
%64 = load i8*, i8** %4
%65 = call i32 @strcpy(i8* %64, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0))
br label %109
66: ; preds = %2
%67 = load i8*, i8** %4
%68 = call i32 @strcpy(i8* %67, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
br label %109
69: ; preds = %2
%70 = load i8*, i8** %4
%71 = call i32 @strcpy(i8* %70, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))
br label %109
72: ; preds = %2
%73 = load i8*, i8** %4
%74 = call i32 @strcpy(i8* %73, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0))
br label %109
75: ; preds = %2
%76 = load i8*, i8** %4
%77 = call i32 @strcpy(i8* %76, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.23, i64 0, i64 0))
br label %109
78: ; preds = %2
%79 = load i8*, i8** %4
%80 = call i32 @strcpy(i8* %79, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.24, i64 0, i64 0))
br label %109
81: ; preds = %2
%82 = load i8*, i8** %4
%83 = call i32 @strcpy(i8* %82, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.25, i64 0, i64 0))
br label %109
84: ; preds = %2
%85 = load i8*, i8** %4
%86 = call i32 @strcpy(i8* %85, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.26, i64 0, i64 0))
br label %109
87: ; preds = %2
%88 = load i8*, i8** %4
%89 = call i32 @strcpy(i8* %88, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.27, i64 0, i64 0))
br label %109
90: ; preds = %2
%91 = load i8*, i8** %4
%92 = call i32 @strcpy(i8* %91, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.28, i64 0, i64 0))
br label %109
93: ; preds = %2
%94 = load i8*, i8** %4
%95 = call i32 @strcpy(i8* %94, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.29, i64 0, i64 0))
br label %109
96: ; preds = %2
%97 = load i8*, i8** %4
%98 = call i32 @strcpy(i8* %97, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.30, i64 0, i64 0))
br label %109
99: ; preds = %2
%100 = load i8*, i8** %4
%101 = call i32 @strcpy(i8* %100, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.31, i64 0, i64 0))
br label %109
102: ; preds = %2
%103 = load i8*, i8** %4
%104 = call i32 @strcpy(i8* %103, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.32, i64 0, i64 0))
br label %109
105: ; preds = %2
%106 = load i8*, i8** %4
%107 = load i32, i32* %3
%108 = call i32 @sprintf(i8* %106, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.33, i64 0, i64 0), i32 %107)
br label %109
109: ; preds = %105, %102, %99, %96, %93, %90, %87, %84, %81, %78, %75, %72, %69, %66, %63, %60, %57, %54, %51, %48, %45, %42, %39, %36, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"100 Continue\00"
@.str.1 = [24 x i8] c"101 Switching Protocols\00"
@.str.2 = [21 x i8] c"300 Multiple Choices\00"
@.str.3 = [22 x i8] c"301 Moved Permanently\00"
@.str.4 = [10 x i8] c"302 Found\00"
@.str.5 = [14 x i8] c"303 See Other\00"
@.str.6 = [17 x i8] c"304 Not Modified\00"
@.str.7 = [14 x i8] c"305 Use Proxy\00"
@.str.8 = [11 x i8] c"306 Unused\00"
@.str.9 = [23 x i8] c"307 Temporary Redirect\00"
@.str.10 = [16 x i8] c"400 Bad Request\00"
@.str.11 = [17 x i8] c"401 Unauthorized\00"
@.str.12 = [21 x i8] c"402 Payment Required\00"
@.str.13 = [14 x i8] c"403 Forbidden\00"
@.str.14 = [14 x i8] c"404 Not Found\00"
@.str.15 = [23 x i8] c"405 Method Not Allowed\00"
@.str.16 = [19 x i8] c"406 Not Acceptable\00"
@.str.17 = [34 x i8] c"407 Proxy Authentication Required\00"
@.str.18 = [20 x i8] c"408 Request Timeout\00"
@.str.19 = [13 x i8] c"409 Conflict\00"
@.str.20 = [9 x i8] c"410 Gone\00"
@.str.21 = [20 x i8] c"411 Length Required\00"
@.str.22 = [24 x i8] c"412 Precondition Failed\00"
@.str.23 = [29 x i8] c"413 Request Entity Too Large\00"
@.str.24 = [25 x i8] c"414 Request-url Too Long\00"
@.str.25 = [27 x i8] c"415 Unsupported Media Type\00"
@.str.26 = [23 x i8] c"417 Expectation Failed\00"
@.str.27 = [26 x i8] c"500 Internal Server Error\00"
@.str.28 = [20 x i8] c"501 Not Implemented\00"
@.str.29 = [16 x i8] c"502 Bad Gateway\00"
@.str.30 = [24 x i8] c"503 Service Unavailable\00"
@.str.31 = [20 x i8] c"504 Gateway Timeout\00"
@.str.32 = [31 x i8] c"505 HTTP Version Not Supported\00"
@.str.33 = [3 x i8] c"%d\00"
define void @http_status_to_string(i32 %0, i8* %1) {
switch i32 %0, label %69 [
i32 100, label %3
i32 101, label %5
i32 300, label %7
i32 301, label %9
i32 302, label %11
i32 303, label %13
i32 304, label %15
i32 305, label %17
i32 306, label %19
i32 307, label %21
i32 400, label %23
i32 401, label %25
i32 402, label %27
i32 403, label %29
i32 404, label %31
i32 405, label %33
i32 406, label %35
i32 407, label %37
i32 408, label %39
i32 409, label %41
i32 410, label %43
i32 411, label %45
i32 412, label %47
i32 413, label %49
i32 414, label %51
i32 415, label %53
i32 417, label %55
i32 500, label %57
i32 501, label %59
i32 502, label %61
i32 503, label %63
i32 504, label %65
i32 505, label %67
]
3: ; preds = %2
%4 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %71
5: ; preds = %2
%6 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %71
7: ; preds = %2
%8 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %71
9: ; preds = %2
%10 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %71
11: ; preds = %2
%12 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %71
13: ; preds = %2
%14 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
br label %71
15: ; preds = %2
%16 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
br label %71
17: ; preds = %2
%18 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0))
br label %71
19: ; preds = %2
%20 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
br label %71
21: ; preds = %2
%22 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0))
br label %71
23: ; preds = %2
%24 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
br label %71
25: ; preds = %2
%26 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
br label %71
27: ; preds = %2
%28 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0))
br label %71
29: ; preds = %2
%30 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.13, i64 0, i64 0))
br label %71
31: ; preds = %2
%32 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
br label %71
33: ; preds = %2
%34 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0))
br label %71
35: ; preds = %2
%36 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0))
br label %71
37: ; preds = %2
%38 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.17, i64 0, i64 0))
br label %71
39: ; preds = %2
%40 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.18, i64 0, i64 0))
br label %71
41: ; preds = %2
%42 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0))
br label %71
43: ; preds = %2
%44 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0))
br label %71
45: ; preds = %2
%46 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0))
br label %71
47: ; preds = %2
%48 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.22, i64 0, i64 0))
br label %71
49: ; preds = %2
%50 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.23, i64 0, i64 0))
br label %71
51: ; preds = %2
%52 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.24, i64 0, i64 0))
br label %71
53: ; preds = %2
%54 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.25, i64 0, i64 0))
br label %71
55: ; preds = %2
%56 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.26, i64 0, i64 0))
br label %71
57: ; preds = %2
%58 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.27, i64 0, i64 0))
br label %71
59: ; preds = %2
%60 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.28, i64 0, i64 0))
br label %71
61: ; preds = %2
%62 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.29, i64 0, i64 0))
br label %71
63: ; preds = %2
%64 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.30, i64 0, i64 0))
br label %71
65: ; preds = %2
%66 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.31, i64 0, i64 0))
br label %71
67: ; preds = %2
%68 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.32, i64 0, i64 0))
br label %71
69: ; preds = %2
%70 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.33, i64 0, i64 0), i32 %0)
br label %71
71: ; preds = %69, %67, %65, %63, %61, %59, %57, %55, %53, %51, %49, %47, %45, %43, %41, %39, %37, %35, %33, %31, %29, %27, %25, %23, %21, %19, %17, %15, %13, %11, %9, %7, %5, %3
ret void
}