#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 *, ...);
void notImplementedOption(char *stream, char *connection, char *contenttype) {
  sprintf(stream, "HTTP/1.1 501 No Implemented\r\n");
  sprintf(stream, "%sServer: My_server\r\n", stream);
  sprintf(stream, "%sContent-Length: 23\r\n", stream);
  sprintf(stream, "%sConnection: %s\r\n", stream, connection);
  sprintf(stream, "%sContent-Type: %s\r\n", stream, contenttype);
  sprintf(stream, "%s\r\n", stream);
  sprintf(stream, "%sMethod not implemented\n", stream);
}


x86 assembly (clang, -O0):
<notImplementedOption>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed1(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xed6(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xecf(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xec9(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<notImplementedOption>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
movups 0xee9(%rip),%xmm0
movups %xmm0,0xe(%rdi)
movups 0xed0(%rip),%xmm0
movups %xmm0,(%rdi)
lea    0xee4(%rip),%rsi
mov    %rdi,%rdx
xor    %eax,%eax
call   1030 <sprintf@plt>
lea    0xee9(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <sprintf@plt>
lea    0xeec(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1030 <sprintf@plt>
lea    0xee8(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <sprintf@plt>
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <sprintf@plt>
lea    0xed2(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"HTTP/1.1 501 No Implemented\0D\0A\00"
@.str.1 = [22 x i8] c"%sServer: My_server\0D\0A\00"
@.str.2 = [23 x i8] c"%sContent-Length: 23\0D\0A\00"
@.str.3 = [19 x i8] c"%sConnection: %s\0D\0A\00"
@.str.4 = [21 x i8] c"%sContent-Type: %s\0D\0A\00"
@.str.5 = [5 x i8] c"%s\0D\0A\00"
@.str.6 = [26 x i8] c"%sMethod not implemented\0A\00"
define void @notImplementedOption(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%9 = load i8*, i8** %4
%10 = load i8*, i8** %4
%11 = call i32 (i8*, i8*, ...) @sprintf(i8* %9, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = load i8*, i8** %4
%13 = load i8*, i8** %4
%14 = call i32 (i8*, i8*, ...) @sprintf(i8* %12, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %13)
%15 = load i8*, i8** %4
%16 = load i8*, i8** %4
%17 = load i8*, i8** %5
%18 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %16, i8* %17)
%19 = load i8*, i8** %4
%20 = load i8*, i8** %4
%21 = load i8*, i8** %6
%22 = call i32 (i8*, i8*, ...) @sprintf(i8* %19, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i8* %20, i8* %21)
%23 = load i8*, i8** %4
%24 = load i8*, i8** %4
%25 = call i32 (i8*, i8*, ...) @sprintf(i8* %23, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* %24)
%26 = load i8*, i8** %4
%27 = load i8*, i8** %4
%28 = call i32 (i8*, i8*, ...) @sprintf(i8* %26, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), i8* %27)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"HTTP/1.1 501 No Implemented\0D\0A\00"
@.str.1 = [22 x i8] c"%sServer: My_server\0D\0A\00"
@.str.2 = [23 x i8] c"%sContent-Length: 23\0D\0A\00"
@.str.3 = [19 x i8] c"%sConnection: %s\0D\0A\00"
@.str.4 = [21 x i8] c"%sContent-Type: %s\0D\0A\00"
@.str.5 = [5 x i8] c"%s\0D\0A\00"
@.str.6 = [26 x i8] c"%sMethod not implemented\0A\00"
define void @notImplementedOption(i8* %0, i8* %1, i8* %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(30) %0, i8* align 1 dereferenceable(30) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 30, i1 false)
%4 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%5 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%6 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %0, i8* %1)
%7 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i8* %0, i8* %2)
%8 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* %0)
%9 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), i8* %0)
ret void
}