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

/* Variables and functions */
int /*<<< orphan*/ fill_string(char *, int, char);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void print_report_header(FILE *file_pointer, int *line_counter,
                         int *page_counter, char *title, int print_date,
                         int print_page) {
  char blankline[100], classline[100], headerline[100], pageline[100],
      temp[100], time_string[100];
  int i, l1, l2, l3, print_title = 1;
  struct tm *time_of_day;
  time_t seconds;
  time(&seconds);
  time_of_day = localtime(&seconds);
  sprintf(time_string, "%d-%d-%d\0", time_of_day->tm_mon + 1,
          time_of_day->tm_mday, time_of_day->tm_year);
  if (title[0] == '\0')
    print_title = 0;
  fill_string(headerline, 100, '\0');
  fill_string(pageline, 100, '\0');
  if (print_page) {
    l3 = 85 - 10 - 5 - 5 - 9;
    pageline[0] = '\n';
    for (i = 1; i < l3; i++)
      pageline[i] = ' ';
    sprintf(temp, "%4d", *page_counter);
    strcat(pageline, "Page ");
    strcat(pageline, temp);
  } else
    strcpy(pageline, "\n");
  if (print_title == 0 && print_date == 0)
    strcpy(headerline, "\n");
  if (print_title == 0 && print_date == 1) {
    l1 = strlen(time_string);
    l3 = 85 - 10 - 5 - 5 - l1;
    headerline[0] = '\n';
    for (i = 1; i < l3; i++)
      headerline[i] = ' ';
    strcat(headerline, time_string);
  }
  if (print_title == 1 && print_date == 0) {
    l1 = strlen(title);
    l3 = 85 - 10 - 5 - 5 - l1;
    headerline[0] = '\n';
    for (i = 1; i < l3; i++)
      headerline[i] = ' ';
    strcat(headerline, title);
  }
  if (print_title == 1 && print_date == 1) {
    strcpy(temp, title);
    strcat(temp, " - ");
    strcat(temp, time_string);
    l1 = strlen(temp);
    l3 = 85 - 10 - 5 - 5 - l1;
    headerline[0] = '\n';
    for (i = 1; i < l3; i++)
      headerline[i] = ' ';
    strcat(headerline, temp);
  }
  strcpy(blankline, "\n");
  sprintf(classline, "\n");
  fputs(blankline, file_pointer);
  fputs(classline, file_pointer);
  fputs(headerline, file_pointer);
  fputs(pageline, file_pointer);
  fputs(blankline, file_pointer);
  *line_counter = 5;
}


x86 assembly (clang, -O0):
<print_report_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2f0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
movl   $0x1,-0x2d4(%rbp)
lea    -0x2e4(%rbp),%rdi
call   1070 <time@plt>
lea    -0x2e4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x2e0(%rbp)
lea    -0x2c0(%rbp),%rdi
mov    -0x2e0(%rbp),%rax
mov    (%rax),%edx
add    $0x1,%edx
mov    -0x2e0(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x2e0(%rbp),%rax
mov    0x8(%rax),%r8d
lea    0xe05(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    121c <print_report_header+0x9c>
movl   $0x0,-0x2d4(%rbp)
lea    -0x170(%rbp),%rdi
mov    $0x64,%esi
xor    %edx,%edx
call   1080 <fill_string@plt>
lea    -0x1e0(%rbp),%rdi
mov    $0x64,%esi
xor    %edx,%edx
call   1080 <fill_string@plt>
cmpl   $0x0,-0x28(%rbp)
je     12e2 <print_report_header+0x162>
movl   $0x38,-0x2d0(%rbp)
movb   $0xa,-0x1e0(%rbp)
movl   $0x1,-0x2c4(%rbp)
mov    -0x2c4(%rbp),%eax
cmp    -0x2d0(%rbp),%eax
jge    129c <print_report_header+0x11c>
movslq -0x2c4(%rbp),%rax
movb   $0x20,-0x1e0(%rbp,%rax,1)
20
mov    -0x2c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c4(%rbp)
jmp    1267 <print_report_header+0xe7>
lea    -0x250(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
lea    0xd5a(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
lea    -0x1e0(%rbp),%rdi
lea    0xd49(%rip),%rsi
call   1090 <strcat@plt>
lea    -0x1e0(%rbp),%rdi
lea    -0x250(%rbp),%rsi
call   1090 <strcat@plt>
jmp    12f5 <print_report_header+0x175>
lea    -0x1e0(%rbp),%rdi
lea    0xd24(%rip),%rsi
call   1040 <strcpy@plt>
cmpl   $0x0,-0x2d4(%rbp)
jne    131f <print_report_header+0x19f>
cmpl   $0x0,-0x24(%rbp)
jne    131f <print_report_header+0x19f>
lea    -0x170(%rbp),%rdi
lea    0xcfa(%rip),%rsi
call   1040 <strcpy@plt>
cmpl   $0x0,-0x2d4(%rbp)
jne    13b2 <print_report_header+0x232>
cmpl   $0x1,-0x24(%rbp)
jne    13b2 <print_report_header+0x232>
lea    -0x2c0(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x2c8(%rbp)
mov    $0x41,%eax
sub    -0x2c8(%rbp),%eax
mov    %eax,-0x2d0(%rbp)
movb   $0xa,-0x170(%rbp)
movl   $0x1,-0x2c4(%rbp)
mov    -0x2c4(%rbp),%eax
cmp    -0x2d0(%rbp),%eax
jge    139f <print_report_header+0x21f>
movslq -0x2c4(%rbp),%rax
movb   $0x20,-0x170(%rbp,%rax,1)
20
mov    -0x2c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c4(%rbp)
jmp    136a <print_report_header+0x1ea>
lea    -0x170(%rbp),%rdi
lea    -0x2c0(%rbp),%rsi
call   1090 <strcat@plt>
cmpl   $0x1,-0x2d4(%rbp)
jne    143f <print_report_header+0x2bf>
cmpl   $0x0,-0x24(%rbp)
jne    143f <print_report_header+0x2bf>
mov    -0x20(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x2c8(%rbp)
mov    $0x41,%eax
sub    -0x2c8(%rbp),%eax
mov    %eax,-0x2d0(%rbp)
movb   $0xa,-0x170(%rbp)
movl   $0x1,-0x2c4(%rbp)
mov    -0x2c4(%rbp),%eax
cmp    -0x2d0(%rbp),%eax
jge    142f <print_report_header+0x2af>
movslq -0x2c4(%rbp),%rax
movb   $0x20,-0x170(%rbp,%rax,1)
20
mov    -0x2c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c4(%rbp)
jmp    13fa <print_report_header+0x27a>
lea    -0x170(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1090 <strcat@plt>
cmpl   $0x1,-0x2d4(%rbp)
jne    1508 <print_report_header+0x388>
cmpl   $0x1,-0x24(%rbp)
jne    1508 <print_report_header+0x388>
lea    -0x250(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x250(%rbp),%rdi
lea    0xba2(%rip),%rsi
call   1090 <strcat@plt>
lea    -0x250(%rbp),%rdi
lea    -0x2c0(%rbp),%rsi
call   1090 <strcat@plt>
lea    -0x250(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x2c8(%rbp)
mov    $0x41,%eax
sub    -0x2c8(%rbp),%eax
mov    %eax,-0x2d0(%rbp)
movb   $0xa,-0x170(%rbp)
movl   $0x1,-0x2c4(%rbp)
mov    -0x2c4(%rbp),%eax
cmp    -0x2d0(%rbp),%eax
jge    14f5 <print_report_header+0x375>
movslq -0x2c4(%rbp),%rax
movb   $0x20,-0x170(%rbp,%rax,1)
20
mov    -0x2c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c4(%rbp)
jmp    14c0 <print_report_header+0x340>
lea    -0x170(%rbp),%rdi
lea    -0x250(%rbp),%rsi
call   1090 <strcat@plt>
lea    -0x90(%rbp),%rdi
lea    0xafe(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x100(%rbp),%rdi
lea    0xaeb(%rip),%rsi
mov    $0x0,%al
call   10a0 <sprintf@plt>
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <fputs@plt>
lea    -0x100(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <fputs@plt>
lea    -0x170(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <fputs@plt>
lea    -0x1e0(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <fputs@plt>
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <fputs@plt>
mov    -0x10(%rbp),%rax
movl   $0x5,(%rax)
add    $0x2f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_report_header>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2b8,%rsp
mov    %r9d,%ebx
mov    %r8d,0x18(%rsp)
mov    %rcx,%rbp
mov    %rdx,%r12
mov    %rsi,0x10(%rsp)
mov    %rdi,%r13
lea    0x1c(%rsp),%r14
mov    %r14,%rdi
call   1080 <time@plt>
mov    %r14,%rdi
call   1030 <localtime@plt>
mov    (%rax),%edx
mov    0x4(%rax),%ecx
add    $0x1,%edx
mov    0x8(%rax),%r8d
lea    0xe31(%rip),%rsi
lea    0x100(%rsp),%rdi
xor    %eax,%eax
call   10b0 <sprintf@plt>
mov    %rbp,0x8(%rsp)
mov    0x0(%rbp),%r15b
test   %r15b,%r15b
setne  %r14b
lea    0x20(%rsp),%rdi
mov    $0x64,%esi
xor    %edx,%edx
call   1090 <fill_string@plt>
lea    0x90(%rsp),%rdi
mov    $0x64,%esi
xor    %edx,%edx
call   1090 <fill_string@plt>
test   %ebx,%ebx
je     12a1 <print_report_header+0x111>
movb   $0xa,0x90(%rsp)
0a
movaps 0xdca(%rip),%xmm0
movups %xmm0,0x91(%rsp)
movups %xmm0,0xa1(%rsp)
movups %xmm0,0xb1(%rsp)
movabs $0x2020202020202020,%rax
20 20 20
mov    %rax,0xc0(%rsp)
mov    (%r12),%edx
lea    0xdaf(%rip),%rsi
lea    0x170(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   10b0 <sprintf@plt>
lea    0xd9a(%rip),%rsi
lea    0x90(%rsp),%rbp
mov    %rbp,%rdi
call   10a0 <strcat@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   10a0 <strcat@plt>
jmp    12b5 <print_report_header+0x125>
lea    0xd7c(%rip),%rsi
lea    0x90(%rsp),%rdi
call   1040 <strcpy@plt>
mov    0x18(%rsp),%ebp
test   %ebp,%ebp
jne    12d7 <print_report_header+0x147>
test   %r15b,%r15b
jne    12d7 <print_report_header+0x147>
lea    0xd5b(%rip),%rsi
lea    0x20(%rsp),%rdi
call   1040 <strcpy@plt>
xor    %ebx,%ebx
jmp    133f <print_report_header+0x1af>
cmp    $0x1,%ebp
sete   %bl
jne    133f <print_report_header+0x1af>
test   %r15b,%r15b
mov    0x10(%rsp),%r15
mov    0x8(%rsp),%r12
jne    1349 <print_report_header+0x1b9>
lea    0x100(%rsp),%rdi
call   1050 <strlen@plt>
movb   $0xa,0x20(%rsp)
cmp    $0x3f,%eax
jg     1329 <print_report_header+0x199>
mov    $0x41,%ecx
sub    %eax,%ecx
lea    0x21(%rsp),%rdi
cmp    $0x3,%ecx
mov    $0x2,%edx
cmovge %ecx,%edx
add    $0xffffffff,%edx
mov    $0x20,%esi
call   1070 <memset@plt>
lea    0x20(%rsp),%rdi
lea    0x100(%rsp),%rsi
call   10a0 <strcat@plt>
mov    $0x1,%bl
jmp    1349 <print_report_header+0x1b9>
mov    0x10(%rsp),%r15
mov    0x8(%rsp),%r12
test   %ebp,%ebp
setne  %al
mov    %r14d,%ecx
xor    $0x1,%cl
or     %al,%cl
jne    139b <print_report_header+0x20b>
mov    %r12,%rdi
call   1050 <strlen@plt>
movb   $0xa,0x20(%rsp)
cmp    $0x3f,%eax
jg     138e <print_report_header+0x1fe>
mov    $0x41,%ecx
sub    %eax,%ecx
lea    0x21(%rsp),%rdi
cmp    $0x3,%ecx
mov    $0x2,%edx
cmovge %ecx,%edx
add    $0xffffffff,%edx
mov    $0x20,%esi
call   1070 <memset@plt>
lea    0x20(%rsp),%rdi
mov    %r12,%rsi
call   10a0 <strcat@plt>
and    %r14b,%bl
cmp    $0x1,%bl
jne    141d <print_report_header+0x28d>
lea    0x170(%rsp),%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <strcpy@plt>
lea    0xc69(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strcat@plt>
lea    0x100(%rsp),%rsi
mov    %rbx,%rdi
call   10a0 <strcat@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
movb   $0xa,0x20(%rsp)
cmp    $0x3f,%eax
jg     140b <print_report_header+0x27b>
mov    $0x41,%ecx
sub    %eax,%ecx
lea    0x21(%rsp),%rdi
cmp    $0x3,%ecx
mov    $0x2,%edx
cmovge %ecx,%edx
add    $0xffffffff,%edx
mov    $0x20,%esi
call   1070 <memset@plt>
lea    0x20(%rsp),%rdi
lea    0x170(%rsp),%rsi
call   10a0 <strcat@plt>
lea    0xc00(%rip),%rsi
lea    0x250(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strcpy@plt>
movw   $0xa,0x1e0(%rsp)
mov    %rbx,%rdi
mov    %r13,%rsi
call   1060 <fputs@plt>
lea    0x1e0(%rsp),%rdi
mov    %r13,%rsi
call   1060 <fputs@plt>
lea    0x20(%rsp),%rdi
mov    %r13,%rsi
call   1060 <fputs@plt>
lea    0x90(%rsp),%rdi
mov    %r13,%rsi
call   1060 <fputs@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1060 <fputs@plt>
movl   $0x5,(%r15)
add    $0x2b8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
@.str = [10 x i8] c"%d-%d-%d\00\00"
@.str.1 = [4 x i8] c"%4d\00"
@.str.2 = [6 x i8] c"Page \00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [4 x i8] c" - \00"
define void @print_report_header(i32* %0, i32* %1, i32* %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca [100 x i8]
%14 = alloca [100 x i8]
%15 = alloca [100 x i8]
%16 = alloca [100 x i8]
%17 = alloca [100 x i8]
%18 = alloca [100 x i8]
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca %struct.tm*
%25 = alloca i32
store i32* %0, i32** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
store i32 1, i32* %23
%26 = call i32 @time(i32* %25)
%27 = call %struct.tm* @localtime(i32* %25)
store %struct.tm* %27, %struct.tm** %24
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%29 = load %struct.tm*, %struct.tm** %24
%30 = getelementptr inbounds %struct.tm, %struct.tm* %29, i32 0, i32 0
%31 = load i32, i32* %30
%32 = add nsw i32 %31, 1
%33 = load %struct.tm*, %struct.tm** %24
%34 = getelementptr inbounds %struct.tm, %struct.tm* %33, i32 0, i32 1
%35 = load i32, i32* %34
%36 = load %struct.tm*, %struct.tm** %24
%37 = getelementptr inbounds %struct.tm, %struct.tm* %36, i32 0, i32 2
%38 = load i32, i32* %37
%39 = call i32 (i8*, i8*, ...) @sprintf(i8* %28, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %32, i32 %35, i32 %38)
%40 = load i8*, i8** %10
%41 = getelementptr inbounds i8, i8* %40, i64 0
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 0
br i1 %44, label %45, label %46
45: ; preds = %6
store i32 0, i32* %23
br label %46
46: ; preds = %45, %6
%47 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%48 = call i32 @fill_string(i8* %47, i32 100, i8 signext 0)
%49 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i64 0, i64 0
%50 = call i32 @fill_string(i8* %49, i32 100, i8 signext 0)
%51 = load i32, i32* %12
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %76
53: ; preds = %46
store i32 56, i32* %22
%54 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i64 0, i64 0
store i8 10, i8* %54
store i32 1, i32* %19
br label %55
55: ; preds = %63, %53
%56 = load i32, i32* %19
%57 = load i32, i32* %22
%58 = icmp slt i32 %56, %57
br i1 %58, label %59, label %66
59: ; preds = %55
%60 = load i32, i32* %19
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i64 0, i64 %61
store i8 32, i8* %62
br label %63
63: ; preds = %59
%64 = load i32, i32* %19
%65 = add nsw i32 %64, 1
store i32 %65, i32* %19
br label %55
66: ; preds = %55
%67 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%68 = load i32*, i32** %9
%69 = load i32, i32* %68
%70 = call i32 (i8*, i8*, ...) @sprintf(i8* %67, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %69)
%71 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i64 0, i64 0
%72 = call i32 @strcat(i8* %71, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%73 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i64 0, i64 0
%74 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%75 = call i32 @strcat(i8* %73, i8* %74)
br label %79
76: ; preds = %46
%77 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i64 0, i64 0
%78 = call i32 @strcpy(i8* %77, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %79
79: ; preds = %76, %66
%80 = load i32, i32* %23
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %88
82: ; preds = %79
%83 = load i32, i32* %11
%84 = icmp eq i32 %83, 0
br i1 %84, label %85, label %88
85: ; preds = %82
%86 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%87 = call i32 @strcpy(i8* %86, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %88
88: ; preds = %85, %82, %79
%89 = load i32, i32* %23
%90 = icmp eq i32 %89, 0
br i1 %90, label %91, label %115
91: ; preds = %88
%92 = load i32, i32* %11
%93 = icmp eq i32 %92, 1
br i1 %93, label %94, label %115
94: ; preds = %91
%95 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%96 = call i32 @strlen(i8* %95)
store i32 %96, i32* %20
%97 = load i32, i32* %20
%98 = sub nsw i32 65, %97
store i32 %98, i32* %22
%99 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
store i8 10, i8* %99
store i32 1, i32* %19
br label %100
100: ; preds = %108, %94
%101 = load i32, i32* %19
%102 = load i32, i32* %22
%103 = icmp slt i32 %101, %102
br i1 %103, label %104, label %111
104: ; preds = %100
%105 = load i32, i32* %19
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 %106
store i8 32, i8* %107
br label %108
108: ; preds = %104
%109 = load i32, i32* %19
%110 = add nsw i32 %109, 1
store i32 %110, i32* %19
br label %100
111: ; preds = %100
%112 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%113 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%114 = call i32 @strcat(i8* %112, i8* %113)
br label %115
115: ; preds = %111, %91, %88
%116 = load i32, i32* %23
%117 = icmp eq i32 %116, 1
br i1 %117, label %118, label %142
118: ; preds = %115
%119 = load i32, i32* %11
%120 = icmp eq i32 %119, 0
br i1 %120, label %121, label %142
121: ; preds = %118
%122 = load i8*, i8** %10
%123 = call i32 @strlen(i8* %122)
store i32 %123, i32* %20
%124 = load i32, i32* %20
%125 = sub nsw i32 65, %124
store i32 %125, i32* %22
%126 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
store i8 10, i8* %126
store i32 1, i32* %19
br label %127
127: ; preds = %135, %121
%128 = load i32, i32* %19
%129 = load i32, i32* %22
%130 = icmp slt i32 %128, %129
br i1 %130, label %131, label %138
131: ; preds = %127
%132 = load i32, i32* %19
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 %133
store i8 32, i8* %134
br label %135
135: ; preds = %131
%136 = load i32, i32* %19
%137 = add nsw i32 %136, 1
store i32 %137, i32* %19
br label %127
138: ; preds = %127
%139 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%140 = load i8*, i8** %10
%141 = call i32 @strcat(i8* %139, i8* %140)
br label %142
142: ; preds = %138, %118, %115
%143 = load i32, i32* %23
%144 = icmp eq i32 %143, 1
br i1 %144, label %145, label %177
145: ; preds = %142
%146 = load i32, i32* %11
%147 = icmp eq i32 %146, 1
br i1 %147, label %148, label %177
148: ; preds = %145
%149 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%150 = load i8*, i8** %10
%151 = call i32 @strcpy(i8* %149, i8* %150)
%152 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%153 = call i32 @strcat(i8* %152, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%154 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%155 = getelementptr inbounds [100 x i8], [100 x i8]* %18, i64 0, i64 0
%156 = call i32 @strcat(i8* %154, i8* %155)
%157 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%158 = call i32 @strlen(i8* %157)
store i32 %158, i32* %20
%159 = load i32, i32* %20
%160 = sub nsw i32 65, %159
store i32 %160, i32* %22
%161 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
store i8 10, i8* %161
store i32 1, i32* %19
br label %162
162: ; preds = %170, %148
%163 = load i32, i32* %19
%164 = load i32, i32* %22
%165 = icmp slt i32 %163, %164
br i1 %165, label %166, label %173
166: ; preds = %162
%167 = load i32, i32* %19
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 %168
store i8 32, i8* %169
br label %170
170: ; preds = %166
%171 = load i32, i32* %19
%172 = add nsw i32 %171, 1
store i32 %172, i32* %19
br label %162
173: ; preds = %162
%174 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%175 = getelementptr inbounds [100 x i8], [100 x i8]* %17, i64 0, i64 0
%176 = call i32 @strcat(i8* %174, i8* %175)
br label %177
177: ; preds = %173, %145, %142
%178 = getelementptr inbounds [100 x i8], [100 x i8]* %13, i64 0, i64 0
%179 = call i32 @strcpy(i8* %178, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%180 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 0
%181 = call i32 (i8*, i8*, ...) @sprintf(i8* %180, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%182 = getelementptr inbounds [100 x i8], [100 x i8]* %13, i64 0, i64 0
%183 = load i32*, i32** %7
%184 = call i32 @fputs(i8* %182, i32* %183)
%185 = getelementptr inbounds [100 x i8], [100 x i8]* %14, i64 0, i64 0
%186 = load i32*, i32** %7
%187 = call i32 @fputs(i8* %185, i32* %186)
%188 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%189 = load i32*, i32** %7
%190 = call i32 @fputs(i8* %188, i32* %189)
%191 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i64 0, i64 0
%192 = load i32*, i32** %7
%193 = call i32 @fputs(i8* %191, i32* %192)
%194 = getelementptr inbounds [100 x i8], [100 x i8]* %13, i64 0, i64 0
%195 = load i32*, i32** %7
%196 = call i32 @fputs(i8* %194, i32* %195)
%197 = load i32*, i32** %8
store i32 5, i32* %197
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
@.str = [10 x i8] c"%d-%d-%d\00\00"
@.str.1 = [4 x i8] c"%4d\00"
@.str.2 = [6 x i8] c"Page \00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [4 x i8] c" - \00"
define void @print_report_header(i32* nocapture %0, i32* nocapture writeonly %1, i32* nocapture %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca [100 x i8]
%8 = alloca [100 x i8]
%9 = alloca [100 x i8]
%10 = alloca [100 x i8]
%11 = alloca [100 x i8]
%12 = alloca [100 x i8]
%13 = alloca i32
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %8, i64 0, i64 0
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 0
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%20 = bitcast i32* %13 to i8*
%21 = call i32 @time(i32* %13)
%22 = call %struct.tm* @localtime(i32* %13)
%23 = getelementptr inbounds %struct.tm, %struct.tm* %22, i64 0, i32 0
%24 = load i32, i32* %23
%25 = add nsw i32 %24, 1
%26 = getelementptr inbounds %struct.tm, %struct.tm* %22, i64 0, i32 1
%27 = load i32, i32* %26
%28 = getelementptr inbounds %struct.tm, %struct.tm* %22, i64 0, i32 2
%29 = load i32, i32* %28
%30 = call i32 (i8*, i8*, ...) @sprintf(i8* %19, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %25, i32 %27, i32 %29)
%31 = load i8, i8* %3
%32 = icmp eq i8 %31, 0
%33 = xor i1 %32, true
%34 = call i32 @fill_string(i8* %16, i32 100, i8 signext 0)
%35 = call i32 @fill_string(i8* %17, i32 100, i8 signext 0)
%36 = icmp eq i32 %5, 0
br i1 %36, label %43, label %37
37: ; preds = %6
store i8 10, i8* %17
%38 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i64 0, i64 1
%39 = load i32, i32* %2
%40 = call i32 (i8*, i8*, ...) @sprintf(i8* %18, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %39)
%41 = call i32 @strcat(i8* %17, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%42 = call i32 @strcat(i8* %17, i8* %18)
br label %45
43: ; preds = %6
%44 = call i32 @strcpy(i8* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %45
45: ; preds = %43, %37
%46 = icmp eq i32 %4, 0
%47 = and i1 %46, %32
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %64
50: ; preds = %45
%51 = icmp eq i32 %4, 1
%52 = and i1 %51, %32
br i1 %52, label %53, label %64
53: ; preds = %50
%54 = call i32 @strlen(i8* %19)
store i8 10, i8* %16
%55 = icmp slt i32 %54, 64
br i1 %55, label %56, label %62
56: ; preds = %53
%57 = sub i32 65, %54
%58 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 1
%59 = call i32 @llvm.smax.i32(i32 %57, i32 2)
%60 = add nsw i32 %59, -1
%61 = zext i32 %60 to i64
br label %62
62: ; preds = %56, %53
%63 = call i32 @strcat(i8* %16, i8* %19)
br label %64
64: ; preds = %48, %62, %50
%65 = phi i1 [ false, %48 ], [ true, %62 ], [ %51, %50 ]
%66 = and i1 %46, %33
br i1 %66, label %67, label %78
67: ; preds = %64
%68 = call i32 @strlen(i8* %3)
store i8 10, i8* %16
%69 = icmp slt i32 %68, 64
br i1 %69, label %70, label %76
70: ; preds = %67
%71 = sub i32 65, %68
%72 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 1
%73 = call i32 @llvm.smax.i32(i32 %71, i32 2)
%74 = add nsw i32 %73, -1
%75 = zext i32 %74 to i64
br label %76
76: ; preds = %70, %67
%77 = call i32 @strcat(i8* %16, i8* %3)
br label %78
78: ; preds = %76, %64
%79 = and i1 %65, %33
br i1 %79, label %80, label %94
80: ; preds = %78
%81 = call i32 @strcpy(i8* %18, i8* %3)
%82 = call i32 @strcat(i8* %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%83 = call i32 @strcat(i8* %18, i8* %19)
%84 = call i32 @strlen(i8* %18)
store i8 10, i8* %16
%85 = icmp slt i32 %84, 64
br i1 %85, label %86, label %92
86: ; preds = %80
%87 = sub i32 65, %84
%88 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 1
%89 = call i32 @llvm.smax.i32(i32 %87, i32 2)
%90 = add nsw i32 %89, -1
%91 = zext i32 %90 to i64
br label %92
92: ; preds = %86, %80
%93 = call i32 @strcat(i8* %16, i8* %18)
br label %94
94: ; preds = %92, %78
%95 = call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%96 = bitcast [100 x i8]* %8 to i16*
store i16 10, i16* %96
%97 = call i32 @fputs(i8* %14, i32* %0)
%98 = call i32 @fputs(i8* %15, i32* %0)
%99 = call i32 @fputs(i8* %16, i32* %0)
%100 = call i32 @fputs(i8* %17, i32* %0)
%101 = call i32 @fputs(i8* %14, i32* %0)
store i32 5, i32* %1
ret void
}