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

/* Variables and functions */
char *ctime(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void print_head(FILE *out, const char *myname) {
  time_t t = time(NULL);
  fprintf(out, "/*\n * %s, %s *\n", myname, ctime(&t));
  fprintf(out, " * DO NOT EDIT - this file is automatically generated!\n"
               " */\n");
  fprintf(out, "\n");
  fprintf(out, "/*                                                             "
               "         \n"
               " * This file belongs to FreeMiNT. It's not in the original "
               "MiNT 1.12    \n"
               " * distribution. See the file CHANGES for a detailed log of "
               "changes.    \n"
               " *                                                             "
               "         \n"
               " *                                                             "
               "         \n"
               " * Copyright 2000-2005 Frank Naumann <fnaumann@freemint.de>    "
               "         \n"
               " * All rights reserved.                                        "
               "         \n"
               " *                                                             "
               "         \n"
               " * Please send suggestions, patches or bug reports to me or    "
               "         \n"
               " * the MiNT mailing list.                                      "
               "         \n"
               " *                                                             "
               "         \n"
               " *                                                             "
               "         \n"
               " * This file is free software; you can redistribute it and/or "
               "modify    \n"
               " * it under the terms of the GNU General Public License as "
               "published by \n"
               " * the Free Software Foundation; either version 2, or (at your "
               "option)  \n"
               " * any later version.                                          "
               "         \n"
               " *                                                             "
               "         \n"
               " * This file is distributed in the hope that it will be "
               "useful,         \n"
               " * but WITHOUT ANY WARRANTY; without even the implied warranty "
               "of       \n"
               " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See "
               "the        \n"
               " * GNU General Public License for more details.                "
               "         \n"
               " *                                                             "
               "         \n"
               " * You should have received a copy of the GNU General Public "
               "License    \n"
               " * along with this program; if not, write to the Free Software "
               "         \n"
               " * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   "
               "         \n"
               " *                                                             "
               "         \n"
               " */                                                            "
               "         \n");
  fprintf(out, "\n");
}


x86 assembly (clang, -O0):
<print_head>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <ctime@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    %rax,%rcx
lea    0xe89(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe87(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1663(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe9f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x163f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_head>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <ctime@plt>
lea    0xe8a(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe83(%rip),%rdi
mov    $0x3b,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1040 <fputc@plt>
lea    0xe99(%rip),%rdi
mov    $0x7b3,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1040 <fputc@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [16 x i8] c"/*\0A * %s, %s *\0A\00"
@.str.1 = [60 x i8] c" * DO NOT EDIT - this file is automatically generated!\0A */\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [1972 x i8] c"/* \0A * This file belongs to FreeMiNT. It's not in the original MiNT 1.12 \0A * distribution. See the file CHANGES for a detailed log of changes. \0A * \0A * \0A * Copyright 2000-2005 Frank Naumann <fnaumann@freemint.de> \0A * All rights reserved. \0A * \0A * Please send suggestions, patches or bug reports to me or \0A * the MiNT mailing list. \0A * \0A * \0A * This file is free software; you can redistribute it and/or modify \0A * it under the terms of the GNU General Public License as published by \0A * the Free Software Foundation; either version 2, or (at your option) \0A * any later version. \0A * \0A * This file is distributed in the hope that it will be useful, \0A * but WITHOUT ANY WARRANTY; without even the implied warranty of \0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \0A * GNU General Public License for more details. \0A * \0A * You should have received a copy of the GNU General Public License \0A * along with this program; if not, write to the Free Software \0A * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. \0A * \0A */ \0A\00"
define void @print_head(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = call i32 @time(i32* null)
store i32 %6, i32* %5
%7 = load i32*, i32** %3
%8 = load i8*, i8** %4
%9 = call i8* @ctime(i32* %5)
%10 = call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
%11 = load i32*, i32** %3
%12 = call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%13 = load i32*, i32** %3
%14 = call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%15 = load i32*, i32** %3
%16 = call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([1972 x i8], [1972 x i8]* @.str.3, i64 0, i64 0))
%17 = load i32*, i32** %3
%18 = call i32 (i32*, i8*, ...) @fprintf(i32* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"/*\0A * %s, %s *\0A\00"
@.str.1 = [60 x i8] c" * DO NOT EDIT - this file is automatically generated!\0A */\0A\00"
@.str.3 = [1972 x i8] c"/* \0A * This file belongs to FreeMiNT. It's not in the original MiNT 1.12 \0A * distribution. See the file CHANGES for a detailed log of changes. \0A * \0A * \0A * Copyright 2000-2005 Frank Naumann <fnaumann@freemint.de> \0A * All rights reserved. \0A * \0A * Please send suggestions, patches or bug reports to me or \0A * the MiNT mailing list. \0A * \0A * \0A * This file is free software; you can redistribute it and/or modify \0A * it under the terms of the GNU General Public License as published by \0A * the Free Software Foundation; either version 2, or (at your option) \0A * any later version. \0A * \0A * This file is distributed in the hope that it will be useful, \0A * but WITHOUT ANY WARRANTY; without even the implied warranty of \0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \0A * GNU General Public License for more details. \0A * \0A * You should have received a copy of the GNU General Public License \0A * along with this program; if not, write to the Free Software \0A * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. \0A * \0A */ \0A\00"
define void @print_head(i32* nocapture %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call i8* @ctime(i32* %3)
%7 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %6)
%8 = call i64 @fwrite(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0), i64 59, i64 1, i32* %0)
%9 = call i32 @fputc(i32 10, i32* %0)
%10 = call i64 @fwrite(i8* getelementptr inbounds ([1972 x i8], [1972 x i8]* @.str.3, i64 0, i64 0), i64 1971, i64 1, i32* %0)
%11 = call i32 @fputc(i32 10, i32* %0)
ret void
}