#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*/ fputs(char *, int /*<<< orphan*/ *);
void html_write_header(FILE *filename, char *title, char *author_name) {
  fputs("<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta "
        "charset=\"utf-8\">\n",
        filename);
  fprintf(filename,
          "\t<meta name=\"keywords\" lang=\"en\" content=\"bibgerhtm, "
          "bibliography, article, report, %s\">\n",
          author_name);
  fprintf(filename, "\t<meta name=\"generator\" content=\"bibgerhtm b%d\">",
          20150717);
  fputs("\n\t<link href=\"style.css\" rel=\"stylesheet\" type=\"text/css\">\n",
        filename);
  fprintf(filename, "\t<title>%s</title>\n", title);
  fputs("</head>\n<body>\n\t<center>\n", filename);
}


x86 assembly (clang, -O0):
<html_write_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec1(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xeee(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf36(%rip),%rsi
mov    $0x13379bd,%edx
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf50(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xf78(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf7a(%rip),%rdi
call   1030 <fputs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<html_write_header>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecb(%rip),%rdi
mov    $0x40,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xef3(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xf39(%rip),%rsi
mov    %rbx,%rdi
mov    $0x13379bd,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xf54(%rip),%rdi
mov    $0x3b,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf77(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xf77(%rip),%rdi
mov    $0x19,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"<!DOCTYPE html>\0A<html lang=\22en\22>\0A<head>\0A\09<meta charset=\22utf-8\22>\0A\00"
@.str.1 = [90 x i8] c"\09<meta name=\22keywords\22 lang=\22en\22 content=\22bibgerhtm, bibliography, article, report, %s\22>\0A\00"
@.str.2 = [49 x i8] c"\09<meta name=\22generator\22 content=\22bibgerhtm b%d\22>\00"
@.str.3 = [60 x i8] c"\0A\09<link href=\22style.css\22 rel=\22stylesheet\22 type=\22text/css\22>\0A\00"
@.str.4 = [20 x i8] c"\09<title>%s</title>\0A\00"
@.str.5 = [26 x i8] c"</head>\0A<body>\0A\09<center>\0A\00"
define void @html_write_header(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = call i32 @fputs(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i32* %7)
%9 = load i32*, i32** %4
%10 = load i8*, i8** %6
%11 = call i32 (i32*, i8*, ...) @fprintf(i32* %9, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = load i32*, i32** %4
%13 = call i32 (i32*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), i32 20150717)
%14 = load i32*, i32** %4
%15 = call i32 @fputs(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0), i32* %14)
%16 = load i32*, i32** %4
%17 = load i8*, i8** %5
%18 = call i32 (i32*, i8*, ...) @fprintf(i32* %16, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* %17)
%19 = load i32*, i32** %4
%20 = call i32 @fputs(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i32* %19)
ret void
}

LLVM IR (-O2):
@.str = [65 x i8] c"<!DOCTYPE html>\0A<html lang=\22en\22>\0A<head>\0A\09<meta charset=\22utf-8\22>\0A\00"
@.str.1 = [90 x i8] c"\09<meta name=\22keywords\22 lang=\22en\22 content=\22bibgerhtm, bibliography, article, report, %s\22>\0A\00"
@.str.2 = [49 x i8] c"\09<meta name=\22generator\22 content=\22bibgerhtm b%d\22>\00"
@.str.3 = [60 x i8] c"\0A\09<link href=\22style.css\22 rel=\22stylesheet\22 type=\22text/css\22>\0A\00"
@.str.4 = [20 x i8] c"\09<title>%s</title>\0A\00"
@.str.5 = [26 x i8] c"</head>\0A<body>\0A\09<center>\0A\00"
define void @html_write_header(i32* nocapture %0, i8* %1, i8* %2) {
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i64 64, i64 1, i32* %0)
%5 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%6 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), i32 20150717)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0), i64 59, i64 1, i32* %0)
%8 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* %1)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i64 25, i64 1, i32* %0)
ret void
}