#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*/ write(int, char *, int);
main() {
  write(1, "HTTP", 4);
  write(1, "/1.0", 4);
  write(1, " 200", 4);
  write(1, " OK\r\n", 5);
  write(1, "TOTO: 1\r\n", 9);
  write(1, "Hdr2: 2\r\n", 9);
  write(1, "Hdr3:", 5);
  write(1, " 2\r\n", 4);
  write(1, "\r\n\r\n", 4);
  write(1, "DATA\r\n", 6);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xecf(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xebe(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xead(%rip),%rsi
mov    $0x5,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xe9d(%rip),%rsi
mov    $0x9,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xe91(%rip),%rsi
mov    $0x9,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xe85(%rip),%rsi
mov    $0x5,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xe6a(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xe5f(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    $0x1,%edi
lea    0xe4e(%rip),%rsi
mov    $0x6,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
call   1030 <write@plt>
lea    0xed7(%rip),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
call   1030 <write@plt>
lea    0xec6(%rip),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
call   1030 <write@plt>
lea    0xeb5(%rip),%rsi
mov    $0x1,%edi
mov    $0x5,%edx
call   1030 <write@plt>
lea    0xea5(%rip),%rsi
mov    $0x1,%edi
mov    $0x9,%edx
call   1030 <write@plt>
lea    0xe99(%rip),%rsi
mov    $0x1,%edi
mov    $0x9,%edx
call   1030 <write@plt>
lea    0xe8d(%rip),%rsi
mov    $0x1,%edi
mov    $0x5,%edx
call   1030 <write@plt>
lea    0xe72(%rip),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
call   1030 <write@plt>
lea    0xe67(%rip),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
call   1030 <write@plt>
lea    0xe56(%rip),%rsi
mov    $0x1,%edi
mov    $0x6,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"HTTP\00"
@.str.1 = [5 x i8] c"/1.0\00"
@.str.2 = [5 x i8] c" 200\00"
@.str.3 = [6 x i8] c" OK\0D\0A\00"
@.str.4 = [10 x i8] c"TOTO: 1\0D\0A\00"
@.str.5 = [10 x i8] c"Hdr2: 2\0D\0A\00"
@.str.6 = [6 x i8] c"Hdr3:\00"
@.str.7 = [5 x i8] c" 2\0D\0A\00"
@.str.8 = [5 x i8] c"\0D\0A\0D\0A\00"
@.str.9 = [7 x i8] c"DATA\0D\0A\00"
define i32 @main() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4)
%3 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 4)
%4 = call i32 @write(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 5)
%5 = call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 9)
%6 = call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 9)
%7 = call i32 @write(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 5)
%8 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 4)
%9 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 4)
%10 = call i32 @write(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 6)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"HTTP\00"
@.str.1 = [5 x i8] c"/1.0\00"
@.str.2 = [5 x i8] c" 200\00"
@.str.3 = [6 x i8] c" OK\0D\0A\00"
@.str.4 = [10 x i8] c"TOTO: 1\0D\0A\00"
@.str.5 = [10 x i8] c"Hdr2: 2\0D\0A\00"
@.str.6 = [6 x i8] c"Hdr3:\00"
@.str.7 = [5 x i8] c" 2\0D\0A\00"
@.str.8 = [5 x i8] c"\0D\0A\0D\0A\00"
@.str.9 = [7 x i8] c"DATA\0D\0A\00"
define i32 @main() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4)
%3 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 4)
%4 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 5)
%5 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 9)
%6 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 9)
%7 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 5)
%8 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 4)
%9 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 4)
%10 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 6)
ret i32 0
}