#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 time_t;
struct tm {
  int tm_hour;
  int tm_mday;
  int tm_mon;
  int tm_year;
  int tm_wday;
  scalar_t__ tm_min;
  scalar_t__ tm_sec;
};

/* Variables and functions */
int /*<<< orphan*/ allDigits(char *);
int atoi(char *);
int /*<<< orphan*/ exit(int);
struct tm *localtime(int *);
int mktime(struct tm *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  int startYear = -1;
  int endYear = -1;
  if (argc != 3) {
    usage();
    exit(1);
  }
  startYear = atoi(argv[1]);
  endYear = atoi(argv[2]);
  if (!allDigits(argv[1]) || startYear == 0) {
    printf("%s contains non-digit characters.\n", argv[1]);
    exit(1);
  } else if (!allDigits(argv[2]) || endYear == 0) {
    printf("%s contains non-digit characters.\n", argv[2]);
    exit(1);
  } else if (startYear > endYear) {
    printf("startYear %d is larger than endYear %d.\n", startYear, endYear);
    exit(1);
  }
  if (startYear <= 1900) {
    printf("Please enter year after 1900.\n");
    exit(1);
  }
  int weeknum = 52;
  int k;
  for (k = startYear - 1; k <= endYear; k++) {
    struct tm start;
    start.tm_sec = 0;
    start.tm_min = 0;
    start.tm_hour = 1;
    start.tm_mday = 1;
    start.tm_mon = 0;
    start.tm_year = k - 1900;
    time_t rawtime = mktime(&start);
    int yearDays = 365;
    int leapYear = 0;
    if ((k % 4) == 0 && (k % 400) != 0) {
      yearDays = 366;
      leapYear = 1;
    }
    int firstMonday = 1;
    int i;
    for (i = 1; i <= yearDays; i++) {
      struct tm *info = localtime(&rawtime);
      if (info->tm_wday == 1) {
        if (firstMonday) {
          weeknum = 1;
          firstMonday = 0;
        } else
          weeknum++;
      }
      if (k != startYear - 1)
        printf("%02d/%02d/%d %d %d %d %d %d %d\n", info->tm_mon + 1,
               info->tm_mday, 1900 + info->tm_year, info->tm_mday,
               info->tm_mon + 1, 1900 + info->tm_year, info->tm_wday + 1,
               weeknum, leapYear);
      rawtime += 86400;
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x88,%rsp
movl   $0x0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
movl   $0xffffffff,-0x20(%rbp)
cmpl   $0x3,-0x10(%rbp)
je     11b3 <main+0x43>
mov    $0x0,%al
call   1060 <usage@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
call   1070 <allDigits@plt>
cmp    $0x0,%eax
je     11f3 <main+0x83>
cmpl   $0x0,-0x1c(%rbp)
jne    1213 <main+0xa3>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rdi
call   1070 <allDigits@plt>
cmp    $0x0,%eax
je     1233 <main+0xc3>
cmpl   $0x0,-0x20(%rbp)
jne    1253 <main+0xe3>
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xdbe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    127d <main+0x10d>
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
jmp    1282 <main+0x112>
jmp    1287 <main+0x117>
cmpl   $0x76c,-0x1c(%rbp)
jg     12ac <main+0x13c>
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
movl   $0x34,-0x24(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     1456 <main+0x2e6>
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movl   $0x1,-0x50(%rbp)
movl   $0x1,-0x4c(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x28(%rbp),%eax
sub    $0x76c,%eax
mov    %eax,-0x44(%rbp)
lea    -0x50(%rbp),%rdi
call   1050 <mktime@plt>
mov    %eax,-0x54(%rbp)
movl   $0x16d,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x28(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1348 <main+0x1d8>
mov    -0x28(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1348 <main+0x1d8>
movl   $0x16e,-0x58(%rbp)
movl   $0x1,-0x5c(%rbp)
movl   $0x1,-0x60(%rbp)
movl   $0x1,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x58(%rbp),%eax
jg     1443 <main+0x2d3>
lea    -0x54(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
cmpl   $0x1,0x10(%rax)
jne    13a8 <main+0x238>
cmpl   $0x0,-0x60(%rbp)
je     139a <main+0x22a>
movl   $0x1,-0x24(%rbp)
movl   $0x0,-0x60(%rbp)
jmp    13a3 <main+0x233>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    13a8 <main+0x238>
mov    -0x28(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     142a <main+0x2ba>
mov    -0x70(%rbp),%rax
mov    0x8(%rax),%esi
add    $0x1,%esi
mov    -0x70(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x70(%rbp),%rax
mov    0xc(%rax),%ecx
add    $0x76c,%ecx
mov    -0x70(%rbp),%rax
mov    0x4(%rax),%r8d
mov    -0x70(%rbp),%rax
mov    0x8(%rax),%r9d
add    $0x1,%r9d
mov    -0x70(%rbp),%rax
mov    0xc(%rax),%ebx
add    $0x76c,%ebx
mov    -0x70(%rbp),%rax
mov    0x10(%rax),%r11d
add    $0x1,%r11d
mov    -0x24(%rbp),%r10d
mov    -0x5c(%rbp),%eax
lea    0xc59(%rip),%rdi
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x54(%rbp),%eax
add    $0x15180,%eax
mov    %eax,-0x54(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1356 <main+0x1e6>
jmp    1448 <main+0x2d8>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12bc <main+0x14c>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
cmp    $0x3,%edi
jne    1340 <main+0x1c0>
mov    %rsi,%r14
mov    0x8(%rsi),%r15
mov    %r15,%rdi
call   1090 <atoi@plt>
mov    %eax,%ebx
mov    0x10(%r14),%rdi
call   1090 <atoi@plt>
mov    %eax,%ebp
mov    %r15,%rdi
call   1080 <allDigits@plt>
test   %eax,%eax
je     1351 <main+0x1d1>
test   %ebx,%ebx
je     1351 <main+0x1d1>
mov    0x10(%r14),%rdi
call   1080 <allDigits@plt>
test   %eax,%eax
je     1357 <main+0x1d7>
test   %ebp,%ebp
je     1357 <main+0x1d7>
cmp    %ebp,%ebx
jg     1373 <main+0x1f3>
cmp    $0x76c,%ebx
jle    138f <main+0x20f>
add    $0xffffffff,%ebx
mov    %ebx,0xc(%rsp)
cmp    %ebp,%ebx
jle    1214 <main+0x94>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x34,%r13d
mov    0xc(%rsp),%eax
mov    %eax,%r12d
mov    %ebp,0x14(%rsp)
jmp    1241 <main+0xc1>
nopw   0x0(%rax,%rax,1)
lea    0x1(%r12),%eax
mov    0x14(%rsp),%ebp
cmp    %ebp,%r12d
mov    %eax,%r12d
je     1203 <main+0x83>
lea    0x38(%rsp),%rax
xorps  %xmm0,%xmm0
movups %xmm0,(%rax)
movabs $0x100000001,%rax
mov    %rax,0x20(%rsp)
movl   $0x0,0x28(%rsp)
lea    -0x76c(%r12),%eax
ff
mov    %eax,0x2c(%rsp)
lea    0x20(%rsp),%rdi
call   1060 <mktime@plt>
mov    %eax,0x10(%rsp)
test   $0x3,%r12b
setne  %al
imul   $0xc28f5c29,%r12d,%ecx
add    $0x51eb850,%ecx
ror    $0x4,%ecx
cmp    $0xa3d70b,%ecx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
xor    $0x1,%cl
movzbl %cl,%ecx
mov    %rcx,0x18(%rsp)
mov    $0x16e,%ebp
sub    %eax,%ebp
mov    $0x1,%r14d
jmp    12d1 <main+0x151>
nopl   0x0(%rax)
addl   $0x15180,0x10(%rsp)
add    $0xffffffff,%ebp
je     1230 <main+0xb0>
mov    %r13d,%r15d
lea    0x10(%rsp),%rdi
call   1030 <localtime@plt>
lea    0x1(%r15),%r13d
test   %r14d,%r14d
mov    $0x1,%ecx
cmovne %ecx,%r13d
mov    0x10(%rax),%ebx
cmp    $0x1,%ebx
cmovne %r15d,%r13d
mov    $0x0,%ecx
cmove  %ecx,%r14d
cmp    0xc(%rsp),%r12d
je     12c0 <main+0x140>
mov    0x4(%rax),%edx
mov    0x8(%rax),%esi
add    $0x1,%esi
mov    0xc(%rax),%ecx
mov    $0x76c,%eax
add    %eax,%ecx
add    $0x1,%ebx
lea    0xd37(%rip),%rdi
mov    %edx,%r8d
mov    %esi,%r9d
xor    %eax,%eax
push   0x18(%rsp)
push   %r13
push   %rbx
push   %rcx
call   1050 <printf@plt>
add    $0x20,%rsp
jmp    12c0 <main+0x140>
xor    %eax,%eax
call   1070 <usage@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    0x8(%r14),%rsi
jmp    135b <main+0x1db>
mov    0x10(%r14),%rsi
lea    0xcae(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
lea    0xcb9(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
lea    0xce6(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32, i32, i32, i64, i64 }
@.str = [35 x i8] c"%s contains non-digit characters.\0A\00"
@.str.1 = [41 x i8] c"startYear %d is larger than endYear %d.\0A\00"
@.str.2 = [31 x i8] c"Please enter year after 1900.\0A\00"
@.str.3 = [32 x i8] c"%02d/%02d/%d %d %d %d %d %d %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.tm
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca %struct.tm*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -1, i32* %6
store i32 -1, i32* %7
%17 = load i32, i32* %4
%18 = icmp ne i32 %17, 3
br i1 %18, label %19, label %22
19: ; preds = %2
%20 = call i32 (...) @usage()
%21 = call i32 @exit(i32 1)
unreachable
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32 @atoi(i8* %25)
store i32 %26, i32* %6
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 2
%29 = load i8*, i8** %28
%30 = call i32 @atoi(i8* %29)
store i32 %30, i32* %7
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i32 @allDigits(i8* %33)
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %39
36: ; preds = %22
%37 = load i32, i32* %6
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %45
39: ; preds = %36, %22
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 1
%42 = load i8*, i8** %41
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %42)
%44 = call i32 @exit(i32 1)
unreachable
45: ; preds = %36
%46 = load i8**, i8*** %5
%47 = getelementptr inbounds i8*, i8** %46, i64 2
%48 = load i8*, i8** %47
%49 = call i32 @allDigits(i8* %48)
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %45
%52 = load i32, i32* %7
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %60
54: ; preds = %51, %45
%55 = load i8**, i8*** %5
%56 = getelementptr inbounds i8*, i8** %55, i64 2
%57 = load i8*, i8** %56
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %57)
%59 = call i32 @exit(i32 1)
unreachable
60: ; preds = %51
%61 = load i32, i32* %6
%62 = load i32, i32* %7
%63 = icmp sgt i32 %61, %62
br i1 %63, label %64, label %69
64: ; preds = %60
%65 = load i32, i32* %6
%66 = load i32, i32* %7
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %65, i32 %66)
%68 = call i32 @exit(i32 1)
unreachable
69: ; preds = %60
br label %70
70: ; preds = %69
br label %71
71: ; preds = %70
%72 = load i32, i32* %6
%73 = icmp sle i32 %72, 1900
br i1 %73, label %74, label %77
74: ; preds = %71
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%76 = call i32 @exit(i32 1)
unreachable
77: ; preds = %71
store i32 52, i32* %8
%78 = load i32, i32* %6
%79 = sub nsw i32 %78, 1
store i32 %79, i32* %9
br label %80
80: ; preds = %163, %77
%81 = load i32, i32* %9
%82 = load i32, i32* %7
%83 = icmp sle i32 %81, %82
br i1 %83, label %84, label %166
84: ; preds = %80
%85 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 6
store i64 0, i64* %85
%86 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 5
store i64 0, i64* %86
%87 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 0
store i32 1, i32* %87
%88 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 1
store i32 1, i32* %88
%89 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 2
store i32 0, i32* %89
%90 = load i32, i32* %9
%91 = sub nsw i32 %90, 1900
%92 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 3
store i32 %91, i32* %92
%93 = call i32 @mktime(%struct.tm* %10)
store i32 %93, i32* %11
store i32 365, i32* %12
store i32 0, i32* %13
%94 = load i32, i32* %9
%95 = srem i32 %94, 4
%96 = icmp eq i32 %95, 0
br i1 %96, label %97, label %102
97: ; preds = %84
%98 = load i32, i32* %9
%99 = srem i32 %98, 400
%100 = icmp ne i32 %99, 0
br i1 %100, label %101, label %102
101: ; preds = %97
store i32 366, i32* %12
store i32 1, i32* %13
br label %102
102: ; preds = %101, %97, %84
store i32 1, i32* %14
store i32 1, i32* %15
br label %103
103: ; preds = %159, %102
%104 = load i32, i32* %15
%105 = load i32, i32* %12
%106 = icmp sle i32 %104, %105
br i1 %106, label %107, label %162
107: ; preds = %103
%108 = call %struct.tm* @localtime(i32* %11)
store %struct.tm* %108, %struct.tm** %16
%109 = load %struct.tm*, %struct.tm** %16
%110 = getelementptr inbounds %struct.tm, %struct.tm* %109, i32 0, i32 4
%111 = load i32, i32* %110
%112 = icmp eq i32 %111, 1
br i1 %112, label %113, label %121
113: ; preds = %107
%114 = load i32, i32* %14
%115 = icmp ne i32 %114, 0
br i1 %115, label %116, label %117
116: ; preds = %113
store i32 1, i32* %8
store i32 0, i32* %14
br label %120
117: ; preds = %113
%118 = load i32, i32* %8
%119 = add nsw i32 %118, 1
store i32 %119, i32* %8
br label %120
120: ; preds = %117, %116
br label %121
121: ; preds = %120, %107
%122 = load i32, i32* %9
%123 = load i32, i32* %6
%124 = sub nsw i32 %123, 1
%125 = icmp ne i32 %122, %124
br i1 %125, label %126, label %156
126: ; preds = %121
%127 = load %struct.tm*, %struct.tm** %16
%128 = getelementptr inbounds %struct.tm, %struct.tm* %127, i32 0, i32 2
%129 = load i32, i32* %128
%130 = add nsw i32 %129, 1
%131 = load %struct.tm*, %struct.tm** %16
%132 = getelementptr inbounds %struct.tm, %struct.tm* %131, i32 0, i32 1
%133 = load i32, i32* %132
%134 = load %struct.tm*, %struct.tm** %16
%135 = getelementptr inbounds %struct.tm, %struct.tm* %134, i32 0, i32 3
%136 = load i32, i32* %135
%137 = add nsw i32 1900, %136
%138 = load %struct.tm*, %struct.tm** %16
%139 = getelementptr inbounds %struct.tm, %struct.tm* %138, i32 0, i32 1
%140 = load i32, i32* %139
%141 = load %struct.tm*, %struct.tm** %16
%142 = getelementptr inbounds %struct.tm, %struct.tm* %141, i32 0, i32 2
%143 = load i32, i32* %142
%144 = add nsw i32 %143, 1
%145 = load %struct.tm*, %struct.tm** %16
%146 = getelementptr inbounds %struct.tm, %struct.tm* %145, i32 0, i32 3
%147 = load i32, i32* %146
%148 = add nsw i32 1900, %147
%149 = load %struct.tm*, %struct.tm** %16
%150 = getelementptr inbounds %struct.tm, %struct.tm* %149, i32 0, i32 4
%151 = load i32, i32* %150
%152 = add nsw i32 %151, 1
%153 = load i32, i32* %8
%154 = load i32, i32* %13
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %130, i32 %133, i32 %137, i32 %140, i32 %144, i32 %148, i32 %152, i32 %153, i32 %154)
br label %156
156: ; preds = %126, %121
%157 = load i32, i32* %11
%158 = add nsw i32 %157, 86400
store i32 %158, i32* %11
br label %159
159: ; preds = %156
%160 = load i32, i32* %15
%161 = add nsw i32 %160, 1
store i32 %161, i32* %15
br label %103
162: ; preds = %103
br label %163
163: ; preds = %162
%164 = load i32, i32* %9
%165 = add nsw i32 %164, 1
store i32 %165, i32* %9
br label %80
166: ; preds = %80
ret i32 0
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32, i32, i32, i64, i64 }
@.str = [35 x i8] c"%s contains non-digit characters.\0A\00"
@.str.1 = [41 x i8] c"startYear %d is larger than endYear %d.\0A\00"
@.str.3 = [32 x i8] c"%02d/%02d/%d %d %d %d %d %d %d\0A\00"
@str = [30 x i8] c"Please enter year after 1900.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.tm
%4 = alloca i32
%5 = icmp eq i32 %0, 3
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 (...) @usage()
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @atoi(i8* %11)
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = load i8*, i8** %13
%15 = tail call i32 @atoi(i8* %14)
%16 = tail call i32 @allDigits(i8* %11)
%17 = icmp eq i32 %16, 0
%18 = icmp eq i32 %12, 0
%19 = select i1 %17, i1 true, i1 %18
br i1 %19, label %20, label %24
20: ; preds = %9
%21 = load i8*, i8** %10
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %21)
%23 = tail call i32 @exit(i32 1)
unreachable
24: ; preds = %9
%25 = load i8*, i8** %13
%26 = tail call i32 @allDigits(i8* %25)
%27 = icmp eq i32 %26, 0
%28 = icmp eq i32 %15, 0
%29 = select i1 %27, i1 true, i1 %28
br i1 %29, label %30, label %34
30: ; preds = %24
%31 = load i8*, i8** %13
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %31)
%33 = tail call i32 @exit(i32 1)
unreachable
34: ; preds = %24
%35 = icmp sgt i32 %12, %15
br i1 %35, label %36, label %39
36: ; preds = %34
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %15)
%38 = tail call i32 @exit(i32 1)
unreachable
39: ; preds = %34
%40 = icmp slt i32 %12, 1901
br i1 %40, label %41, label %44
41: ; preds = %39
%42 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%43 = tail call i32 @exit(i32 1)
unreachable
44: ; preds = %39
%45 = add nsw i32 %12, -1
%46 = icmp sgt i32 %45, %15
br i1 %46, label %103, label %47
47: ; preds = %44
%48 = bitcast %struct.tm* %3 to i8*
%49 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 5
%50 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 0
%51 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 1
%52 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 2
%53 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 3
%54 = bitcast i32* %4 to i8*
%55 = bitcast i64* %49 to i8*
br label %56
56: ; preds = %47, %100
%57 = phi i32 [ %45, %47 ], [ %101, %100 ]
%58 = phi i32 [ 52, %47 ], [ %82, %100 ]
store i32 1, i32* %50
store i32 1, i32* %51
store i32 0, i32* %52
%59 = add nsw i32 %57, -1900
store i32 %59, i32* %53
%60 = call i32 @mktime(%struct.tm* %3)
store i32 %60, i32* %4
%61 = and i32 %57, 3
%62 = icmp ne i32 %61, 0
%63 = srem i32 %57, 400
%64 = icmp eq i32 %63, 0
%65 = or i1 %62, %64
%66 = or i1 %62, %64
%67 = xor i1 %66, true
%68 = zext i1 %67 to i32
%69 = icmp eq i32 %57, %45
%70 = select i1 %65, i32 366, i32 367
br label %71
71: ; preds = %56, %95
%72 = phi i32 [ 1, %56 ], [ %98, %95 ]
%73 = phi i32 [ 1, %56 ], [ %83, %95 ]
%74 = phi i32 [ %58, %56 ], [ %82, %95 ]
%75 = call %struct.tm* @localtime(i32* %4)
%76 = getelementptr inbounds %struct.tm, %struct.tm* %75, i64 0, i32 4
%77 = load i32, i32* %76
%78 = icmp eq i32 %77, 1
%79 = icmp eq i32 %73, 0
%80 = add nsw i32 %74, 1
%81 = select i1 %79, i32 %80, i32 1
%82 = select i1 %78, i32 %81, i32 %74
%83 = select i1 %78, i32 0, i32 %73
br i1 %69, label %95, label %84
84: ; preds = %71
%85 = getelementptr inbounds %struct.tm, %struct.tm* %75, i64 0, i32 2
%86 = load i32, i32* %85
%87 = add nsw i32 %86, 1
%88 = getelementptr inbounds %struct.tm, %struct.tm* %75, i64 0, i32 1
%89 = load i32, i32* %88
%90 = getelementptr inbounds %struct.tm, %struct.tm* %75, i64 0, i32 3
%91 = load i32, i32* %90
%92 = add nsw i32 %91, 1900
%93 = add nsw i32 %77, 1
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %87, i32 %89, i32 %92, i32 %89, i32 %87, i32 %92, i32 %93, i32 %82, i32 %68)
br label %95
95: ; preds = %84, %71
%96 = load i32, i32* %4
%97 = add nsw i32 %96, 86400
store i32 %97, i32* %4
%98 = add nuw nsw i32 %72, 1
%99 = icmp eq i32 %98, %70
br i1 %99, label %100, label %71
100: ; preds = %95
%101 = add i32 %57, 1
%102 = icmp eq i32 %57, %15
br i1 %102, label %103, label %56
103: ; preds = %100, %44
ret i32 0
}