#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ java_script_src(int /*<<< orphan*/ *);
int /*<<< orphan*/ send_headers(int /*<<< orphan*/ *, int, char *,
                                int /*<<< orphan*/ *, char *, int, int);
int /*<<< orphan*/ style_sheet(int /*<<< orphan*/ *);
void web_page_header(FILE *f) {
  send_headers(f, 200, "OK", NULL, "text/html", -1, -1);
  fprintf(f, "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" "
             "\"http://www.w3.org/TR/html4/strict.dtd\">\r\n");
  fprintf(f, "<html><head><title>Relay Card Control</title>\r\n");
  style_sheet(f);
  java_script_src(f);
  fprintf(f, "</head>\r\n");
  fprintf(
      f,
      "<body><table style=\"text-align: left; width: 460px; background-color: "
      "#2196F3; font-family: Helvetica,Arial,sans-serif; font-weight: bold; "
      "color: white;\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\r\n");
  fprintf(f, "<tbody><tr><td>\r\n");
  fprintf(f, "<span style=\"vertical-align: top; font-size: 48px;\">Relay Card "
             "Control</span><br>\r\n");
  fprintf(f, "<span style=\"font-size: 16px; color: rgb(204, 255, "
             "255);\">Remote relay card control <span style=\"font-style: "
             "italic; color: white;\">made easy</span></span>\r\n");
  fprintf(f, "</td></tr></tbody></table><br>\r\n");
}


x86 assembly (clang, -O0):
<web_page_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xc8,%esi
lea    0xea4(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
lea    0xe9c(%rip),%r8
mov    $0xffffffff,%r9d
movl   $0xffffffff,(%rsp)
call   1040 <send_headers@plt>
mov    -0x8(%rbp),%rdi
lea    0xe89(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed6(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1050 <style_sheet@plt>
mov    -0x8(%rbp),%rdi
call   1030 <java_script_src@plt>
mov    -0x8(%rbp),%rdi
lea    0xee4(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xede(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf96(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf98(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfdc(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x106a(%rip),%rsi
call   1060 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<web_page_header>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movl   $0xffffffff,(%rsp)
lea    0xeaa(%rip),%rdx
lea    0xea6(%rip),%r8
mov    $0xc8,%esi
xor    %ecx,%ecx
mov    $0xffffffff,%r9d
call   1040 <send_headers@plt>
lea    0xe97(%rip),%rdi
mov    $0x5c,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xedb(%rip),%rdi
mov    $0x2f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %rbx,%rdi
call   1050 <style_sheet@plt>
mov    %rbx,%rdi
call   1030 <java_script_src@plt>
lea    0xee2(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xed3(%rip),%rdi
mov    $0xc7,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xf82(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xf7b(%rip),%rdi
mov    $0x53,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xfb6(%rip),%rdi
mov    $0x9d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0x103b(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
add    $0x10,%rsp
pop    %rbx
jmp    1060 <fwrite@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"OK\00"
@.str.1 = [10 x i8] c"text/html\00"
@.str.2 = [93 x i8] c"<!DOCTYPE html PUBLIC \22-//W3C//DTD HTML 4.01//EN\22 \22http://www.w3.org/TR/html4/strict.dtd\22>\0D\0A\00"
@.str.3 = [48 x i8] c"<html><head><title>Relay Card Control</title>\0D\0A\00"
@.str.4 = [10 x i8] c"</head>\0D\0A\00"
@.str.5 = [200 x i8] c"<body><table style=\22text-align: left; width: 460px; background-color:F3; font-family: Helvetica,Arial,sans-serif; font-weight: bold; color: white;\22 border=\220\22 cellpadding=\222\22 cellspacing=\222\22>\0D\0A\00"
@.str.6 = [18 x i8] c"<tbody><tr><td>\0D\0A\00"
@.str.7 = [84 x i8] c"<span style=\22vertical-align: top; font-size: 48px;\22>Relay Card Control</span><br>\0D\0A\00"
@.str.8 = [158 x i8] c"<span style=\22font-size: 16px; color: rgb(204, 255, 255);\22>Remote relay card control <span style=\22font-style: italic; color: white;\22>made easy</span></span>\0D\0A\00"
@.str.9 = [33 x i8] c"</td></tr></tbody></table><br>\0D\0A\00"
define void @web_page_header(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @send_headers(i32* %3, i32 200, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* null, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 -1, i32 -1)
%5 = load i32*, i32** %2
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32*, i32** %2
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32*, i32** %2
%10 = call i32 @style_sheet(i32* %9)
%11 = load i32*, i32** %2
%12 = call i32 @java_script_src(i32* %11)
%13 = load i32*, i32** %2
%14 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%15 = load i32*, i32** %2
%16 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str.5, i64 0, i64 0))
%17 = load i32*, i32** %2
%18 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%19 = load i32*, i32** %2
%20 = call i32 @fprintf(i32* %19, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.7, i64 0, i64 0))
%21 = load i32*, i32** %2
%22 = call i32 @fprintf(i32* %21, i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.8, i64 0, i64 0))
%23 = load i32*, i32** %2
%24 = call i32 @fprintf(i32* %23, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"OK\00"
@.str.1 = [10 x i8] c"text/html\00"
@.str.2 = [93 x i8] c"<!DOCTYPE html PUBLIC \22-//W3C//DTD HTML 4.01//EN\22 \22http://www.w3.org/TR/html4/strict.dtd\22>\0D\0A\00"
@.str.3 = [48 x i8] c"<html><head><title>Relay Card Control</title>\0D\0A\00"
@.str.4 = [10 x i8] c"</head>\0D\0A\00"
@.str.5 = [200 x i8] c"<body><table style=\22text-align: left; width: 460px; background-color:F3; font-family: Helvetica,Arial,sans-serif; font-weight: bold; color: white;\22 border=\220\22 cellpadding=\222\22 cellspacing=\222\22>\0D\0A\00"
@.str.6 = [18 x i8] c"<tbody><tr><td>\0D\0A\00"
@.str.7 = [84 x i8] c"<span style=\22vertical-align: top; font-size: 48px;\22>Relay Card Control</span><br>\0D\0A\00"
@.str.8 = [158 x i8] c"<span style=\22font-size: 16px; color: rgb(204, 255, 255);\22>Remote relay card control <span style=\22font-style: italic; color: white;\22>made easy</span></span>\0D\0A\00"
@.str.9 = [33 x i8] c"</td></tr></tbody></table><br>\0D\0A\00"
define void @web_page_header(i32* %0) {
%2 = tail call i32 @send_headers(i32* %0, i32 200, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* null, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 -1, i32 -1)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.2, i64 0, i64 0), i64 92, i64 1, i32* %0)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0), i64 47, i64 1, i32* %0)
%5 = tail call i32 @style_sheet(i32* %0)
%6 = tail call i32 @java_script_src(i32* %0)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i64 9, i64 1, i32* %0)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str.5, i64 0, i64 0), i64 199, i64 1, i32* %0)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i64 17, i64 1, i32* %0)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.7, i64 0, i64 0), i64 83, i64 1, i32* %0)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.8, i64 0, i64 0), i64 157, i64 1, i32* %0)
%12 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0), i64 32, i64 1, i32* %0)
ret void
}