#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 send_options_res(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, "Allow: GET HEAD OPTIONS\r\n",
       sizeof "Allow: GET HEAD OPTIONS\r\n" - 1, 0);
  send(client, "Content-Length: 0\r\n", sizeof "Content-Length: 0\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);
}


x86 assembly (clang, -O0):
<send_options_res>:
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    $0x19,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
mov    $0x13,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
mov    -0x4(%rbp),%edi
lea    0xed9(%rip),%rsi
mov    $0x27,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
mov    -0x4(%rbp),%edi
lea    0xeeb(%rip),%rsi
mov    $0x14,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_options_res>:
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    $0x19,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
lea    0xeeb(%rip),%rsi
mov    %ebx,%edi
mov    $0x13,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
lea    0xeea(%rip),%rsi
mov    %ebx,%edi
mov    $0x27,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
lea    0xefd(%rip),%rsi
mov    %ebx,%edi
mov    $0x14,%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 = [26 x i8] c"Allow: GET HEAD OPTIONS\0D\0A\00"
@.str.2 = [20 x i8] c"Content-Length: 0\0D\0A\00"
@.str.3 = [40 x i8] c"Content-Type: text/html;charset=UTF-8\0D\0A\00"
@.str.4 = [21 x i8] c"Pragma: no-cache\0D\0A\0D\0A\00"
define void @send_options_res(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 ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 25, i32 0)
%9 = load i32, i32* %2
%10 = call i32 @send(i32 %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 19, i32 0)
%11 = load i32, i32* %2
%12 = call i32 @send(i32 %11, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), i32 39, i32 0)
%13 = load i32, i32* %2
%14 = call i32 @send(i32 %13, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 20, 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 = [26 x i8] c"Allow: GET HEAD OPTIONS\0D\0A\00"
@.str.2 = [20 x i8] c"Content-Length: 0\0D\0A\00"
@.str.3 = [40 x i8] c"Content-Type: text/html;charset=UTF-8\0D\0A\00"
@.str.4 = [21 x i8] c"Pragma: no-cache\0D\0A\0D\0A\00"
define void @send_options_res(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 ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 25, i32 0)
%5 = tail call i32 @send(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 19, i32 0)
%6 = tail call i32 @send(i32 %0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), i32 39, i32 0)
%7 = tail call i32 @send(i32 %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 20, i32 0)
ret void
}