#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*/ time_t;
struct tm {
  int tm_year;
  int tm_mon;
  int tm_mday;
  int tm_hour;
  int tm_min;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int, int, int,
                           int);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void html_write_footer(FILE *filename) {
  time_t secondes;
  struct tm instant;
  time(&secondes);
  instant = *localtime(&secondes);
  fputs("\n\t</center>\n\t<hr>\n\t<u><b>Disclaimer:</b></u>", filename);
  fputs(
      "\n\t<br/><br/><i>This material is presented to ensure timely "
      "dissemination of scholarly and technical work. Copyright and all rights "
      "therein are retained by authors or by other copyright holders.</i>",
      filename);
  fputs("\n\t<hr>\n\tLast updated: ", filename);
  fprintf(filename, "<i>%02d/%02d/%d - %02d:%02d</i>\n", instant.tm_year + 1900,
          instant.tm_mon + 1, instant.tm_mday, instant.tm_hour, instant.tm_min);
  fputs("\t<hr>\n\tGenerated from <i>BibT<sub>E</sub>X</i> by <a "
        "href=\"http://echambon.contact.free.fr/en/bibgerhtm.php\" "
        "target=\"blank\"><em>bibgerhtm</em></a>, itself inspired by <a "
        "href=\"http://www-sop.inria.fr/epidaure/personnel/malandain/codes/"
        "bibtex2html.html\" "
        "target=\"blank\"><em>bibtex2html</em></a>.\n</body>\n</html>",
        filename);
}


x86 assembly (clang, -O0):
<html_write_footer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1060 <time@plt>
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
mov    (%rax),%rcx
mov    %rcx,-0x20(%rbp)
mov    0x8(%rax),%rcx
mov    %rcx,-0x18(%rbp)
mov    0x10(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xe82(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x8(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x8(%rbp),%rsi
lea    0xf55(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%edx
add    $0x76c,%edx
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
mov    -0x18(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x10(%rbp),%eax
lea    0xf42(%rip),%rsi
mov    %eax,(%rsp)
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf50(%rip),%rdi
call   1040 <fputs@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<html_write_footer>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
lea    0x14(%rsp),%rbp
mov    %rbp,%rdi
call   1050 <time@plt>
mov    %rbp,%rdi
call   1030 <localtime@plt>
mov    0x4(%rax),%r12d
mov    0x8(%rax),%r15d
mov    0xc(%rax),%r14d
mov    0x10(%rax),%r13d
mov    $0x76c,%ebp
add    (%rax),%ebp
lea    0xe7c(%rip),%rdi
mov    $0x2c,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe90(%rip),%rdi
mov    $0xc5,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xf3d(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
add    $0x1,%r12d
mov    %r13d,(%rsp)
lea    0xf33(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %r14d,%r9d
call   1040 <fprintf@plt>
lea    0xf3a(%rip),%rdi
mov    $0x135,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32, i32, i32 }
@.str = [45 x i8] c"\0A\09</center>\0A\09<hr>\0A\09<u><b>Disclaimer:</b></u>\00"
@.str.1 = [198 x i8] c"\0A\09<br/><br/><i>This material is presented to ensure timely dissemination of scholarly and technical work. Copyright and all rights therein are retained by authors or by other copyright holders.</i>\00"
@.str.2 = [23 x i8] c"\0A\09<hr>\0A\09Last updated: \00"
@.str.3 = [33 x i8] c"<i>%02d/%02d/%d - %02d:%02d</i>\0A\00"
@.str.4 = [310 x i8] c"\09<hr>\0A\09Generated from <i>BibT<sub>E</sub>X</i> by <a href=\22http://echambon.contact.free.fr/en/bibgerhtm.php\22 target=\22blank\22><em>bibgerhtm</em></a>, itself inspired by <a href=\22http://www-sop.inria.fr/epidaure/personnel/malandain/codes/bibtex2html.html\22 target=\22blank\22><em>bibtex2html</em></a>.\0A</body>\0A</html>\00"
define void @html_write_footer(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca %struct.tm
store i32* %0, i32** %2
%5 = call i32 @time(i32* %3)
%6 = call %struct.tm* @localtime(i32* %3)
%7 = bitcast %struct.tm* %4 to i8*
%8 = bitcast %struct.tm* %6 to i8*
%9 = load i32*, i32** %2
%10 = call i32 @fputs(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32* %9)
%11 = load i32*, i32** %2
%12 = call i32 @fputs(i8* getelementptr inbounds ([198 x i8], [198 x i8]* @.str.1, i64 0, i64 0), i32* %11)
%13 = load i32*, i32** %2
%14 = call i32 @fputs(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32* %13)
%15 = load i32*, i32** %2
%16 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
%17 = load i32, i32* %16
%18 = add nsw i32 %17, 1900
%19 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 1
%20 = load i32, i32* %19
%21 = add nsw i32 %20, 1
%22 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 2
%23 = load i32, i32* %22
%24 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 3
%25 = load i32, i32* %24
%26 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 4
%27 = load i32, i32* %26
%28 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 %18, i32 %21, i32 %23, i32 %25, i32 %27)
%29 = load i32*, i32** %2
%30 = call i32 @fputs(i8* getelementptr inbounds ([310 x i8], [310 x i8]* @.str.4, i64 0, i64 0), i32* %29)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32, i32, i32 }
@.str = [45 x i8] c"\0A\09</center>\0A\09<hr>\0A\09<u><b>Disclaimer:</b></u>\00"
@.str.1 = [198 x i8] c"\0A\09<br/><br/><i>This material is presented to ensure timely dissemination of scholarly and technical work. Copyright and all rights therein are retained by authors or by other copyright holders.</i>\00"
@.str.2 = [23 x i8] c"\0A\09<hr>\0A\09Last updated: \00"
@.str.3 = [33 x i8] c"<i>%02d/%02d/%d - %02d:%02d</i>\0A\00"
@.str.4 = [310 x i8] c"\09<hr>\0A\09Generated from <i>BibT<sub>E</sub>X</i> by <a href=\22http://echambon.contact.free.fr/en/bibgerhtm.php\22 target=\22blank\22><em>bibgerhtm</em></a>, itself inspired by <a href=\22http://www-sop.inria.fr/epidaure/personnel/malandain/codes/bibtex2html.html\22 target=\22blank\22><em>bibtex2html</em></a>.\0A</body>\0A</html>\00"
define void @html_write_footer(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @time(i32* %2)
%5 = call %struct.tm* @localtime(i32* %2)
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i64 0, i32 0
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.tm, %struct.tm* %5, i64 0, i32 1
%9 = load i32, i32* %8
%10 = getelementptr inbounds %struct.tm, %struct.tm* %5, i64 0, i32 2
%11 = load i32, i32* %10
%12 = getelementptr inbounds %struct.tm, %struct.tm* %5, i64 0, i32 3
%13 = load i32, i32* %12
%14 = getelementptr inbounds %struct.tm, %struct.tm* %5, i64 0, i32 4
%15 = load i32, i32* %14
%16 = call i64 @fwrite(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i64 44, i64 1, i32* %0)
%17 = call i64 @fwrite(i8* getelementptr inbounds ([198 x i8], [198 x i8]* @.str.1, i64 0, i64 0), i64 197, i64 1, i32* %0)
%18 = call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i64 22, i64 1, i32* %0)
%19 = add nsw i32 %7, 1900
%20 = add nsw i32 %9, 1
%21 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 %19, i32 %20, i32 %11, i32 %13, i32 %15)
%22 = call i64 @fwrite(i8* getelementptr inbounds ([310 x i8], [310 x i8]* @.str.4, i64 0, i64 0), i64 309, i64 1, i32* %0)
ret void
}