#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*/ fputs(char const *, int /*<<< orphan*/ *);
void print_todo_header(FILE *f) {
  const char *todo_header =
      "%------------------------------------------------------------------\n"
      "() CategoryName eq {\n"
      "        /CategoryName (All Categories) def\n"
      "}\n"
      "/Ytitle 785 def\n"
      "/Ytop Ytitle 20 sub def\n"
      "/PageNo 0 def\n"
      "\n"
      "/IndentDone 30 def\n"
      "/IndentPriority IndentDone fontsize 1.5 mul add def\n"
      "/IndentDate     IndentDone fontsize 3   mul add def\n"
      "/IndentText     IndentDone fontsize 9.5 mul add def\n"
      "/fsize fontsize 1.2 mul def\n"
      "\n"
      "%-----------------------------------------\n"
      "\n"
      "/NewPage {\n"
      "        PageNo 0 ne { showpage } if\n"
      "        /PageNo PageNo 1 add def\n"
      "        ScaleY ScaleX Min dup scale\n"
      "        /Y Ytop def\n"
      "        /Times-Roman-ISOLatin1 findfont fsize 1.5 mul scalefont setfont "
      "\n"
      "         0 Ytitle A4Y CategoryName CenterText\n"
      "        /Times-Roman-ISOLatin1 findfont fsize scalefont setfont \n"
      "        IndentDone Ytitle m (To Do List) show\n"
      "        /PageString 8 string def\n"
      "        (Page: ) PageString copy\n"
      "        PageString 5 PageNo nstr cvs putinterval\n"
      "        A4Y IndentDone sub Ytitle PageString RightText\n"
      "        2 slw\n"
      "        IndentDone Ytitle 3 sub m A4Y IndentDone sub Ytitle 3 sub l"
      " stroke\n"
      "        0 slw\n"
      "} def\n"
      "\n"
      "%-----------------------------------------\n"
      "\n"
      "/incY { /Y Y linespacing 1.2 mul sub def Y 30 lt {NewPage} if } def\n"
      "\n"
      "%-----------------------------------------\n"
      "\n"
      "/Todo {\n"
      "        /Note edef\n"
      "        /Text edef\n"
      "        /Date edef\n"
      "        /Priority edef\n"
      "        /Done edef\n"
      "        PageNo 0 eq { NewPage } { incY } ifelse\n"
      "        IndentDone Y 0.9 fsize mul dup\n"
      "        Done { rectfill } { rectstroke } ifelse\n"
      "        /Courier-Bold-ISOLatin1 findfont fsize scalefont setfont \n"
      "        IndentPriority Y m Priority nstr cvs show\n"
      "        /Courier-ISOLatin1 findfont fsize scalefont setfont \n"
      "        IndentDate Y m Date show\n"
      "        IndentText Y m Text show\n"
      "        () Note ne {\n"
      "                incY\n"
      "                /Courier-ISOLatin1 findfont fsize scalefont setfont \n"
      "                gsave\n"
      "                IndentText 2 sub Y 2 sub A4Y IndentText IndentDone\n"
      "                add sub linespacing 1.2 mul rectclip\n"
      "                IndentText Y m Note show\n"
      "                grestore\n"
      "        } if\n"
      "} def\n";
  fputs(todo_header, f);
}


x86 assembly (clang, -O0):
<print_todo_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_todo_header>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x80f,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [2064 x i8] c"%------------------------------------------------------------------\0A() CategoryName eq {\0A /CategoryName (All Categories) def\0A}\0A/Ytitle 785 def\0A/Ytop Ytitle 20 sub def\0A/PageNo 0 def\0A\0A/IndentDone 30 def\0A/IndentPriority IndentDone fontsize 1.5 mul add def\0A/IndentDate IndentDone fontsize 3 mul add def\0A/IndentText IndentDone fontsize 9.5 mul add def\0A/fsize fontsize 1.2 mul def\0A\0A%-----------------------------------------\0A\0A/NewPage {\0A PageNo 0 ne { showpage } if\0A /PageNo PageNo 1 add def\0A ScaleY ScaleX Min dup scale\0A /Y Ytop def\0A /Times-Roman-ISOLatin1 findfont fsize 1.5 mul scalefont setfont \0A 0 Ytitle A4Y CategoryName CenterText\0A /Times-Roman-ISOLatin1 findfont fsize scalefont setfont \0A IndentDone Ytitle m (To Do List) show\0A /PageString 8 string def\0A (Page: ) PageString copy\0A PageString 5 PageNo nstr cvs putinterval\0A A4Y IndentDone sub Ytitle PageString RightText\0A 2 slw\0A IndentDone Ytitle 3 sub m A4Y IndentDone sub Ytitle 3 sub l stroke\0A 0 slw\0A} def\0A\0A%-----------------------------------------\0A\0A/incY { /Y Y linespacing 1.2 mul sub def Y 30 lt {NewPage} if } def\0A\0A%-----------------------------------------\0A\0A/Todo {\0A /Note edef\0A /Text edef\0A /Date edef\0A /Priority edef\0A /Done edef\0A PageNo 0 eq { NewPage } { incY } ifelse\0A IndentDone Y 0.9 fsize mul dup\0A Done { rectfill } { rectstroke } ifelse\0A /Courier-Bold-ISOLatin1 findfont fsize scalefont setfont \0A IndentPriority Y m Priority nstr cvs show\0A /Courier-ISOLatin1 findfont fsize scalefont setfont \0A IndentDate Y m Date show\0A IndentText Y m Text show\0A () Note ne {\0A incY\0A /Courier-ISOLatin1 findfont fsize scalefont setfont \0A gsave\0A IndentText 2 sub Y 2 sub A4Y IndentText IndentDone\0A add sub linespacing 1.2 mul rectclip\0A IndentText Y m Note show\0A grestore\0A } if\0A} def\0A\00"
define void @print_todo_header(i32* %0) {
%2 = alloca i32*
%3 = alloca i8*
store i32* %0, i32** %2
store i8* getelementptr inbounds ([2064 x i8], [2064 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
%5 = load i32*, i32** %2
%6 = call i32 @fputs(i8* %4, i32* %5)
ret void
}

LLVM IR (-O2):
@.str = [2064 x i8] c"%------------------------------------------------------------------\0A() CategoryName eq {\0A /CategoryName (All Categories) def\0A}\0A/Ytitle 785 def\0A/Ytop Ytitle 20 sub def\0A/PageNo 0 def\0A\0A/IndentDone 30 def\0A/IndentPriority IndentDone fontsize 1.5 mul add def\0A/IndentDate IndentDone fontsize 3 mul add def\0A/IndentText IndentDone fontsize 9.5 mul add def\0A/fsize fontsize 1.2 mul def\0A\0A%-----------------------------------------\0A\0A/NewPage {\0A PageNo 0 ne { showpage } if\0A /PageNo PageNo 1 add def\0A ScaleY ScaleX Min dup scale\0A /Y Ytop def\0A /Times-Roman-ISOLatin1 findfont fsize 1.5 mul scalefont setfont \0A 0 Ytitle A4Y CategoryName CenterText\0A /Times-Roman-ISOLatin1 findfont fsize scalefont setfont \0A IndentDone Ytitle m (To Do List) show\0A /PageString 8 string def\0A (Page: ) PageString copy\0A PageString 5 PageNo nstr cvs putinterval\0A A4Y IndentDone sub Ytitle PageString RightText\0A 2 slw\0A IndentDone Ytitle 3 sub m A4Y IndentDone sub Ytitle 3 sub l stroke\0A 0 slw\0A} def\0A\0A%-----------------------------------------\0A\0A/incY { /Y Y linespacing 1.2 mul sub def Y 30 lt {NewPage} if } def\0A\0A%-----------------------------------------\0A\0A/Todo {\0A /Note edef\0A /Text edef\0A /Date edef\0A /Priority edef\0A /Done edef\0A PageNo 0 eq { NewPage } { incY } ifelse\0A IndentDone Y 0.9 fsize mul dup\0A Done { rectfill } { rectstroke } ifelse\0A /Courier-Bold-ISOLatin1 findfont fsize scalefont setfont \0A IndentPriority Y m Priority nstr cvs show\0A /Courier-ISOLatin1 findfont fsize scalefont setfont \0A IndentDate Y m Date show\0A IndentText Y m Text show\0A () Note ne {\0A incY\0A /Courier-ISOLatin1 findfont fsize scalefont setfont \0A gsave\0A IndentText 2 sub Y 2 sub A4Y IndentText IndentDone\0A add sub linespacing 1.2 mul rectclip\0A IndentText Y m Note show\0A grestore\0A } if\0A} def\0A\00"
define void @print_todo_header(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([2064 x i8], [2064 x i8]* @.str, i64 0, i64 0), i64 2063, i64 1, i32* %0)
ret void
}