#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 */
scalar_t__ GetDay(int, int, int);
scalar_t__ WeekGetDay(int, int, int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int main(void) {
  int M, Y;
  FILE *file;
  file = fopen("times.h", "w");
  if (file == NULL)
    return 0;
  fprintf(file, "static time_t TimeDays[10][13] = { \n");
  Y = 1997;
  while (Y < 2007) {
    M = 0;
    fprintf(file, " { ");
    while (M < 12) {
      fprintf(file, "%i", (int)GetDay(1, M, Y));
      fprintf(file, ",\t");
      M++;
    }
    fprintf(file, "%i } ", (int)GetDay(1, 0, Y + 1));
    if (Y != 2006)
      fprintf(file, ",");
    fprintf(file, "\n");
    Y++;
  }
  fprintf(file, "};\n");
  fprintf(file, "static int WeekDays[10][13] = { \n");
  Y = 1997;
  while (Y < 2007) {
    M = 0;
    fprintf(file, " { ");
    while (M < 12) {
      fprintf(file, "%i", (int)WeekGetDay(1, M, Y));
      fprintf(file, ",\t");
      M++;
    }
    fprintf(file, "%i } ", (int)WeekGetDay(1, 0, Y + 1));
    if (Y != 2006)
      fprintf(file, ",");
    fprintf(file, "\n");
    Y++;
  }
  fprintf(file, "};\n");
  fprintf(file, "#define KHTTPD_YEAROFFSET   1997\n");
  fprintf(file, "#define KHTTPD_NUMYEARS     10\n");
  (void)fclose(file);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
lea    0xe9b(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    118d <main+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    13e9 <main+0x299>
mov    -0x18(%rbp),%rdi
lea    0xe72(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x7cd,-0xc(%rbp)
cmpl   $0x7d7,-0xc(%rbp)
jge    128f <main+0x13f>
movl   $0x0,-0x8(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe6a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
cmpl   $0xc,-0x8(%rbp)
jge    1222 <main+0xd2>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0x1,%edi
call   1070 <GetDay@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%edx
lea    0xe38(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xe29(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11cc <main+0x7c>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%edx
add    $0x1,%edx
mov    $0x1,%edi
xor    %esi,%esi
call   1070 <GetDay@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%edx
lea    0xdf0(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
cmpl   $0x7d6,-0xc(%rbp)
je     126f <main+0x11f>
mov    -0x18(%rbp),%rdi
lea    0xdd7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xdb3(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a6 <main+0x56>
mov    -0x18(%rbp),%rdi
lea    0xda7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xd99(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x7cd,-0xc(%rbp)
cmpl   $0x7d7,-0xc(%rbp)
jge    13a3 <main+0x253>
movl   $0x0,-0x8(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xd56(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
cmpl   $0xc,-0x8(%rbp)
jge    1336 <main+0x1e6>
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0x1,%edi
call   1030 <WeekGetDay@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%edx
lea    0xd24(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xd15(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12e0 <main+0x190>
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0xc(%rbp),%edx
add    $0x1,%edx
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <WeekGetDay@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%edx
lea    0xcdc(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
cmpl   $0x7d6,-0xc(%rbp)
je     1383 <main+0x233>
mov    -0x18(%rbp),%rdi
lea    0xcc3(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xc9f(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12ba <main+0x16a>
mov    -0x18(%rbp),%rdi
lea    0xc93(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xca7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xcb7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xe7e(%rip),%rdi
lea    0xe7f(%rip),%rsi
call   1070 <fopen@plt>
test   %rax,%rax
je     13f6 <main+0x286>
mov    %rax,%rbx
lea    0xe69(%rip),%rdi
mov    $0x24,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1090 <fwrite@plt>
mov    $0x7cd,%r13d
lea    0xe73(%rip),%r15
lea    0xe6f(%rip),%r12
nopw   0x0(%rax,%rax,1)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xe4e(%rip),%rdi
mov    %rbx,%rcx
call   1090 <fwrite@plt>
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
mov    %ebp,%esi
mov    %r13d,%edx
call   1080 <GetDay@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r12,%rdi
mov    %rbx,%rcx
call   1090 <fwrite@plt>
add    $0x1,%ebp
cmp    $0xc,%ebp
jne    11f0 <main+0x80>
lea    0x1(%r13),%r14d
mov    $0x1,%edi
xor    %esi,%esi
mov    %r14d,%edx
call   1080 <GetDay@plt>
mov    %rbx,%rdi
lea    0xdf1(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
cmp    $0x7d6,%r13d
je     1286 <main+0x116>
mov    $0x2c,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
mov    %r14d,%r13d
cmp    $0x7d7,%r14d
jne    11d0 <main+0x60>
jmp    1293 <main+0x123>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
lea    0xda5(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
lea    0xd90(%rip),%rdi
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
mov    $0x7cd,%r13d
lea    0xd61(%rip),%r15
lea    0xd5d(%rip),%r12
nopl   0x0(%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xd3e(%rip),%rdi
mov    %rbx,%rcx
call   1090 <fwrite@plt>
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
mov    %ebp,%esi
mov    %r13d,%edx
call   1030 <WeekGetDay@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x2,%esi
mov    $0x1,%edx
mov    %r12,%rdi
mov    %rbx,%rcx
call   1090 <fwrite@plt>
add    $0x1,%ebp
cmp    $0xc,%ebp
jne    1300 <main+0x190>
lea    0x1(%r13),%r14d
mov    $0x1,%edi
xor    %esi,%esi
mov    %r14d,%edx
call   1030 <WeekGetDay@plt>
mov    %rbx,%rdi
lea    0xce1(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
cmp    $0x7d6,%r13d
je     1396 <main+0x226>
mov    $0x2c,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
mov    %r14d,%r13d
cmp    $0x7d7,%r14d
jne    12e0 <main+0x170>
jmp    13a3 <main+0x233>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
lea    0xc95(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
lea    0xca2(%rip),%rdi
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
lea    0xcab(%rip),%rdi
mov    $0x1f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"times.h\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [37 x i8] c"static time_t TimeDays[10][13] = { \0A\00"
@.str.3 = [4 x i8] c" { \00"
@.str.4 = [3 x i8] c"%i\00"
@.str.5 = [3 x i8] c",\09\00"
@.str.6 = [6 x i8] c"%i } \00"
@.str.7 = [2 x i8] c",\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [4 x i8] c"};\0A\00"
@.str.10 = [34 x i8] c"static int WeekDays[10][13] = { \0A\00"
@.str.11 = [34 x i8] c"#define KHTTPD_YEAROFFSET 1997\0A\00"
@.str.12 = [32 x i8] c"#define KHTTPD_NUMYEARS 10\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
store i32 0, i32* %1
%5 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %5, i32** %4
%6 = load i32*, i32** %4
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 0, i32* %1
br label %100
9: ; preds = %0
%10 = load i32*, i32** %4
%11 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
store i32 1997, i32* %3
br label %12
12: ; preds = %44, %9
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 2007
br i1 %14, label %15, label %49
15: ; preds = %12
store i32 0, i32* %2
%16 = load i32*, i32** %4
%17 = call i32 (i32*, i8*, ...) @fprintf(i32* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %18
18: ; preds = %21, %15
%19 = load i32, i32* %2
%20 = icmp slt i32 %19, 12
br i1 %20, label %21, label %32
21: ; preds = %18
%22 = load i32*, i32** %4
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = call i64 @GetDay(i32 1, i32 %23, i32 %24)
%26 = trunc i64 %25 to i32
%27 = call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %26)
%28 = load i32*, i32** %4
%29 = call i32 (i32*, i8*, ...) @fprintf(i32* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%30 = load i32, i32* %2
%31 = add nsw i32 %30, 1
store i32 %31, i32* %2
br label %18
32: ; preds = %18
%33 = load i32*, i32** %4
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 1
%36 = call i64 @GetDay(i32 1, i32 0, i32 %35)
%37 = trunc i64 %36 to i32
%38 = call i32 (i32*, i8*, ...) @fprintf(i32* %33, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 %37)
%39 = load i32, i32* %3
%40 = icmp ne i32 %39, 2006
br i1 %40, label %41, label %44
41: ; preds = %32
%42 = load i32*, i32** %4
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %44
44: ; preds = %41, %32
%45 = load i32*, i32** %4
%46 = call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%47 = load i32, i32* %3
%48 = add nsw i32 %47, 1
store i32 %48, i32* %3
br label %12
49: ; preds = %12
%50 = load i32*, i32** %4
%51 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%52 = load i32*, i32** %4
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %52, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0))
store i32 1997, i32* %3
br label %54
54: ; preds = %86, %49
%55 = load i32, i32* %3
%56 = icmp slt i32 %55, 2007
br i1 %56, label %57, label %91
57: ; preds = %54
store i32 0, i32* %2
%58 = load i32*, i32** %4
%59 = call i32 (i32*, i8*, ...) @fprintf(i32* %58, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %60
60: ; preds = %63, %57
%61 = load i32, i32* %2
%62 = icmp slt i32 %61, 12
br i1 %62, label %63, label %74
63: ; preds = %60
%64 = load i32*, i32** %4
%65 = load i32, i32* %2
%66 = load i32, i32* %3
%67 = call i64 @WeekGetDay(i32 1, i32 %65, i32 %66)
%68 = trunc i64 %67 to i32
%69 = call i32 (i32*, i8*, ...) @fprintf(i32* %64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %68)
%70 = load i32*, i32** %4
%71 = call i32 (i32*, i8*, ...) @fprintf(i32* %70, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%72 = load i32, i32* %2
%73 = add nsw i32 %72, 1
store i32 %73, i32* %2
br label %60
74: ; preds = %60
%75 = load i32*, i32** %4
%76 = load i32, i32* %3
%77 = add nsw i32 %76, 1
%78 = call i64 @WeekGetDay(i32 1, i32 0, i32 %77)
%79 = trunc i64 %78 to i32
%80 = call i32 (i32*, i8*, ...) @fprintf(i32* %75, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 %79)
%81 = load i32, i32* %3
%82 = icmp ne i32 %81, 2006
br i1 %82, label %83, label %86
83: ; preds = %74
%84 = load i32*, i32** %4
%85 = call i32 (i32*, i8*, ...) @fprintf(i32* %84, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %86
86: ; preds = %83, %74
%87 = load i32*, i32** %4
%88 = call i32 (i32*, i8*, ...) @fprintf(i32* %87, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%89 = load i32, i32* %3
%90 = add nsw i32 %89, 1
store i32 %90, i32* %3
br label %54
91: ; preds = %54
%92 = load i32*, i32** %4
%93 = call i32 (i32*, i8*, ...) @fprintf(i32* %92, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%94 = load i32*, i32** %4
%95 = call i32 (i32*, i8*, ...) @fprintf(i32* %94, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.11, i64 0, i64 0))
%96 = load i32*, i32** %4
%97 = call i32 (i32*, i8*, ...) @fprintf(i32* %96, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0))
%98 = load i32*, i32** %4
%99 = call i32 @fclose(i32* %98)
store i32 0, i32* %1
br label %100
100: ; preds = %91, %8
%101 = load i32, i32* %1
ret i32 %101
}

LLVM IR (-O2):
@.str = [8 x i8] c"times.h\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [37 x i8] c"static time_t TimeDays[10][13] = { \0A\00"
@.str.3 = [4 x i8] c" { \00"
@.str.4 = [3 x i8] c"%i\00"
@.str.5 = [3 x i8] c",\09\00"
@.str.6 = [6 x i8] c"%i } \00"
@.str.9 = [4 x i8] c"};\0A\00"
@.str.10 = [34 x i8] c"static int WeekDays[10][13] = { \0A\00"
@.str.11 = [34 x i8] c"#define KHTTPD_YEAROFFSET 1997\0A\00"
@.str.12 = [32 x i8] c"#define KHTTPD_NUMYEARS 10\0A\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %59, label %3
3: ; preds = %0
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i64 36, i64 1, i32* %1)
br label %5
5: ; preds = %3, %24
%6 = phi i32 [ 1997, %3 ], [ %17, %24 ]
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 3, i64 1, i32* %1)
br label %8
8: ; preds = %5, %8
%9 = phi i32 [ 0, %5 ], [ %14, %8 ]
%10 = tail call i64 @GetDay(i32 1, i32 %9, i32 %6)
%11 = trunc i64 %10 to i32
%12 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %11)
%13 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i64 2, i64 1, i32* %1)
%14 = add nuw nsw i32 %9, 1
%15 = icmp eq i32 %14, 12
br i1 %15, label %16, label %8
16: ; preds = %8
%17 = add nuw nsw i32 %6, 1
%18 = tail call i64 @GetDay(i32 1, i32 0, i32 %17)
%19 = trunc i64 %18 to i32
%20 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 %19)
%21 = icmp eq i32 %6, 2006
br i1 %21, label %22, label %24
22: ; preds = %16
%23 = tail call i32 @fputc(i32 10, i32* %1)
br label %28
24: ; preds = %16
%25 = tail call i32 @fputc(i32 44, i32* %1)
%26 = tail call i32 @fputc(i32 10, i32* %1)
%27 = icmp eq i32 %17, 2007
br i1 %27, label %28, label %5
28: ; preds = %24, %22
%29 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i64 3, i64 1, i32* %1)
%30 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0), i64 33, i64 1, i32* %1)
br label %31
31: ; preds = %28, %50
%32 = phi i32 [ 1997, %28 ], [ %43, %50 ]
%33 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64 3, i64 1, i32* %1)
br label %34
34: ; preds = %31, %34
%35 = phi i32 [ 0, %31 ], [ %40, %34 ]
%36 = tail call i64 @WeekGetDay(i32 1, i32 %35, i32 %32)
%37 = trunc i64 %36 to i32
%38 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %37)
%39 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i64 2, i64 1, i32* %1)
%40 = add nuw nsw i32 %35, 1
%41 = icmp eq i32 %40, 12
br i1 %41, label %42, label %34
42: ; preds = %34
%43 = add nuw nsw i32 %32, 1
%44 = tail call i64 @WeekGetDay(i32 1, i32 0, i32 %43)
%45 = trunc i64 %44 to i32
%46 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 %45)
%47 = icmp eq i32 %32, 2006
br i1 %47, label %48, label %50
48: ; preds = %42
%49 = tail call i32 @fputc(i32 10, i32* %1)
br label %54
50: ; preds = %42
%51 = tail call i32 @fputc(i32 44, i32* %1)
%52 = tail call i32 @fputc(i32 10, i32* %1)
%53 = icmp eq i32 %43, 2007
br i1 %53, label %54, label %31
54: ; preds = %50, %48
%55 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i64 3, i64 1, i32* %1)
%56 = tail call i64 @fwrite(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.11, i64 0, i64 0), i64 33, i64 1, i32* %1)
%57 = tail call i64 @fwrite(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0), i64 31, i64 1, i32* %1)
%58 = tail call i32 @fclose(i32* %1)
br label %59
59: ; preds = %0, %54
ret i32 0
}