#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*/ send(int, char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ send_date(int);
void page404(int client) {
  send_date(client);
  send(client, "Server: Light Web Server for cgi V1.1.5\r\n",
       sizeof("Server: Light Web Server for cgi V1.1.5\r\n") - 1, 0);
  send(client, "Content-Length: 16\r\n", sizeof "Content-Length: 16\r\n" - 1,
       0);
  send(client, "Content-Type: text/html;charset=UTF-8\r\n",
       sizeof "Content-Type: text/html;charset=UTF-8\r\n" - 1, 0);
  send(client, "Pragma: no-cache\r\n\r\n",
       sizeof "Pragma: no-cache\r\n\r\n" - 1, 0);
  send(client, "<body>404</body>", sizeof "<body>404</body>" - 1, 0);
}


x86 assembly (clang, -O0):
<page404>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <send_date@plt>
mov    -0x4(%rbp),%edi
lea    0xec3(%rip),%rsi
mov    $0x29,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
mov    -0x4(%rbp),%edi
lea    0xed7(%rip),%rsi
mov    $0x14,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
mov    -0x4(%rbp),%edi
lea    0xed6(%rip),%rsi
mov    $0x27,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
mov    -0x4(%rbp),%edi
lea    0xee8(%rip),%rsi
mov    $0x14,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
mov    -0x4(%rbp),%edi
lea    0xee7(%rip),%rsi
mov    $0x10,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<page404>:
push   %rbx
mov    %edi,%ebx
call   1040 <send_date@plt>
lea    0xed1(%rip),%rsi
mov    %ebx,%edi
mov    $0x29,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
lea    0xee6(%rip),%rsi
mov    %ebx,%edi
mov    $0x14,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
lea    0xee6(%rip),%rsi
mov    %ebx,%edi
mov    $0x27,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
lea    0xef9(%rip),%rsi
mov    %ebx,%edi
mov    $0x14,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
lea    0xef9(%rip),%rsi
mov    %ebx,%edi
mov    $0x10,%edx
xor    %ecx,%ecx
pop    %rbx
jmp    1030 <send@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Server: Light Web Server for cgi V1.1.5\0D\0A\00"
@.str.1 = [21 x i8] c"Content-Length: 16\0D\0A\00"
@.str.2 = [40 x i8] c"Content-Type: text/html;charset=UTF-8\0D\0A\00"
@.str.3 = [21 x i8] c"Pragma: no-cache\0D\0A\0D\0A\00"
@.str.4 = [17 x i8] c"<body>404</body>\00"
define void @page404(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @send_date(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @send(i32 %5, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 41, i32 0)
%7 = load i32, i32* %2
%8 = call i32 @send(i32 %7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 20, i32 0)
%9 = load i32, i32* %2
%10 = call i32 @send(i32 %9, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i32 39, i32 0)
%11 = load i32, i32* %2
%12 = call i32 @send(i32 %11, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 20, i32 0)
%13 = load i32, i32* %2
%14 = call i32 @send(i32 %13, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 16, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Server: Light Web Server for cgi V1.1.5\0D\0A\00"
@.str.1 = [21 x i8] c"Content-Length: 16\0D\0A\00"
@.str.2 = [40 x i8] c"Content-Type: text/html;charset=UTF-8\0D\0A\00"
@.str.3 = [21 x i8] c"Pragma: no-cache\0D\0A\0D\0A\00"
@.str.4 = [17 x i8] c"<body>404</body>\00"
define void @page404(i32 %0) {
%2 = tail call i32 @send_date(i32 %0)
%3 = tail call i32 @send(i32 %0, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 41, i32 0)
%4 = tail call i32 @send(i32 %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 20, i32 0)
%5 = tail call i32 @send(i32 %0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i32 39, i32 0)
%6 = tail call i32 @send(i32 %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 20, i32 0)
%7 = tail call i32 @send(i32 %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 16, i32 0)
ret void
}