#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int leapyear(int);
int main(void) {
  FILE *fin = fopen("friday.in", "r");
  FILE *fout = fopen("friday.out", "w");
  int n, year, i, w;
  int months[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  int weekdays[7] = {0};
  fscanf(fin, "%d", &n);
  w = 2;
  for (year = 1900; year < 1900 + n; ++year) {
    for (i = 0; i < 12; ++i) {
      weekdays[(w + 13 - 1) % 7] += 1;
      if (i == 1 && leapyear(year) == 1) {
        w = (w + 29) % 7;
      } else {
        w = (w + months[i]) % 7;
      }
    }
  }
  for (i = 0; i < 7; ++i) {
    if (i == 6) {
      fprintf(fout, "%d\n", weekdays[i]);
    } else {
      fprintf(fout, "%d ", weekdays[i]);
    }
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe77(%rip),%rdi
lea    0xe7a(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    0xe6c(%rip),%rdi
lea    0xe70(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xe75(%rip),%rsi
mov    $0x30,%edx
call   1060 <memcpy@plt>
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x1c,%edx
call   1030 <memset@plt>
mov    -0x10(%rbp),%rdi
lea    0xe39(%rip),%rsi
lea    -0x1c(%rbp),%rdx
call   1040 <fscanf@plt>
movl   $0x2,-0x28(%rbp)
movl   $0x76c,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x1c(%rbp),%ecx
add    $0x76c,%ecx
cmp    %ecx,%eax
jge    12a8 <main+0x138>
movl   $0x0,-0x24(%rbp)
cmpl   $0xc,-0x24(%rbp)
jge    1295 <main+0x125>
mov    -0x28(%rbp),%eax
add    $0xd,%eax
sub    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    -0x80(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x80(%rbp,%rax,4)
cmpl   $0x1,-0x24(%rbp)
jne    126c <main+0xfc>
mov    -0x20(%rbp),%edi
call   1070 <leapyear@plt>
cmp    $0x1,%eax
jne    126c <main+0xfc>
mov    -0x28(%rbp),%eax
add    $0x1d,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x28(%rbp)
jmp    1282 <main+0x112>
mov    -0x28(%rbp),%eax
movslq -0x24(%rbp),%rcx
add    -0x60(%rbp,%rcx,4),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x28(%rbp)
jmp    1287 <main+0x117>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1212 <main+0xa2>
jmp    129a <main+0x12a>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11f7 <main+0x87>
movl   $0x0,-0x24(%rbp)
cmpl   $0x7,-0x24(%rbp)
jge    130b <main+0x19b>
cmpl   $0x6,-0x24(%rbp)
jne    12e0 <main+0x170>
mov    -0x18(%rbp),%rdi
movslq -0x24(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%edx
lea    0xd46(%rip),%rsi
call   1050 <fprintf@plt>
jmp    12f8 <main+0x188>
mov    -0x18(%rbp),%rdi
movslq -0x24(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%edx
lea    0xd2d(%rip),%rsi
call   1050 <fprintf@plt>
jmp    12fd <main+0x18d>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12af <main+0x13f>
xor    %edi,%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
lea    0xe9f(%rip),%rdi
lea    0xea2(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
lea    0xe95(%rip),%rdi
lea    0xe99(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r14
xorps  %xmm0,%xmm0
movups %xmm0,0xc(%rsp)
movaps %xmm0,(%rsp)
lea    0xe80(%rip),%rsi
lea    0x24(%rsp),%rdx
mov    %rbx,%rdi
call   1030 <fscanf@plt>
xor    %ebp,%ebp
cmpl   $0x0,0x24(%rsp)
jle    15bc <main+0x46c>
mov    $0x76c,%ebx
mov    $0x2,%eax
mov    $0x76b,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xc(%rax),%ecx
imul   $0x24924925,%rcx,%rdx
shr    $0x20,%rdx
sub    %edx,%ecx
shr    %ecx
add    %edx,%ecx
shr    $0x2,%ecx
lea    0x0(,%rcx,8),%edx
sub    %edx,%ecx
add    %eax,%ecx
add    $0xc,%ecx
addl   $0x1,(%rsp,%rcx,4)
mov    %eax,%ecx
add    $0x1f,%ecx
imul   $0x24924925,%rcx,%rdx
shr    $0x20,%rdx
sub    %edx,%ecx
shr    %ecx
add    %edx,%ecx
shr    $0x2,%ecx
lea    0x0(,%rcx,8),%edx
sub    %edx,%ecx
lea    (%rax,%rcx,1),%ebp
add    $0x1f,%ebp
lea    0xc(%rbp),%eax
movzbl %al,%eax
lea    (%rax,%rax,8),%ecx
lea    (%rax,%rcx,4),%ecx
shr    $0x8,%ecx
mov    %eax,%edx
sub    %cl,%dl
shr    %dl
add    %cl,%dl
shr    $0x2,%dl
movzbl %dl,%ecx
lea    0x0(,%rcx,8),%edx
sub    %ecx,%edx
sub    %dl,%al
movzbl %al,%eax
addl   $0x1,(%rsp,%rax,4)
mov    %ebx,%edi
call   1050 <leapyear@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
lea    (%rcx,%rbp,1),%eax
add    %ebp,%ecx
add    $0x1c,%ecx
lea    (%rcx,%rcx,8),%edx
lea    (%rax,%rdx,4),%eax
add    $0x1c,%eax
shr    $0x8,%eax
mov    %ecx,%edx
sub    %al,%dl
shr    %dl
add    %al,%dl
shr    $0x2,%dl
movzbl %dl,%eax
lea    0x0(,%rax,8),%edx
sub    %eax,%edx
sub    %dl,%cl
movzbl %cl,%eax
lea    0xc(%rax),%edx
imul   $0x24924925,%rdx,%rcx
shr    $0x20,%rcx
sub    %ecx,%edx
shr    %edx
add    %ecx,%edx
shr    $0x2,%edx
mov    %eax,%ecx
add    $0x1f,%ecx
lea    0x0(,%rdx,8),%esi
imul   $0x24924925,%rcx,%rdi
shr    $0x20,%rdi
sub    %edi,%ecx
sub    %esi,%edx
shr    %ecx
add    %edi,%ecx
shr    $0x2,%ecx
add    %eax,%edx
add    $0xc,%edx
lea    0x0(,%rcx,8),%esi
addl   $0x1,(%rsp,%rdx,4)
sub    %esi,%ecx
lea    (%rax,%rcx,1),%edx
add    $0x2b,%edx
imul   $0x24924925,%rdx,%rdi
mov    %edx,%esi
shr    $0x20,%rdi
sub    %edi,%esi
shr    %esi
add    %edi,%esi
shr    $0x2,%esi
add    %ecx,%eax
add    $0x3d,%eax
imul   $0x24924925,%rax,%rcx
shr    $0x20,%rcx
mov    %eax,%edi
lea    0x0(,%rsi,8),%ebp
sub    %ecx,%edi
shr    %edi
add    %ecx,%edi
sub    %ebp,%esi
shr    $0x2,%edi
lea    0x0(,%rdi,8),%ecx
sub    %ecx,%edi
add    %edx,%esi
lea    (%rax,%rdi,1),%ecx
add    $0xc,%ecx
addl   $0x1,(%rsp,%rsi,4)
imul   $0x24924925,%rcx,%rsi
shr    $0x20,%rsi
mov    %ecx,%edx
sub    %esi,%edx
shr    %edx
add    %esi,%edx
shr    $0x2,%edx
add    %edi,%eax
add    $0x1f,%eax
lea    0x0(,%rdx,8),%edi
imul   $0x24924925,%rax,%rbp
shr    $0x20,%rbp
mov    %eax,%esi
sub    %ebp,%esi
sub    %edi,%edx
shr    %esi
add    %ebp,%esi
shr    $0x2,%esi
add    %ecx,%edx
lea    0x0(,%rsi,8),%ecx
addl   $0x1,(%rsp,%rdx,4)
sub    %ecx,%esi
lea    (%rax,%rsi,1),%ecx
add    $0xc,%ecx
imul   $0x24924925,%rcx,%rdi
mov    %ecx,%edx
shr    $0x20,%rdi
sub    %edi,%edx
shr    %edx
add    %edi,%edx
shr    $0x2,%edx
add    %esi,%eax
add    $0x1e,%eax
imul   $0x24924925,%rax,%rdi
shr    $0x20,%rdi
mov    %eax,%esi
lea    0x0(,%rdx,8),%ebp
sub    %edi,%esi
shr    %esi
add    %edi,%esi
sub    %ebp,%edx
shr    $0x2,%esi
lea    0x0(,%rsi,8),%edi
sub    %edi,%esi
add    %ecx,%edx
lea    (%rax,%rsi,1),%ecx
add    $0xc,%ecx
addl   $0x1,(%rsp,%rdx,4)
imul   $0x24924925,%rcx,%rdi
shr    $0x20,%rdi
mov    %ecx,%edx
sub    %edi,%edx
shr    %edx
add    %edi,%edx
shr    $0x2,%edx
add    %esi,%eax
add    $0x1f,%eax
lea    0x0(,%rdx,8),%edi
imul   $0x24924925,%rax,%rbp
shr    $0x20,%rbp
mov    %eax,%esi
sub    %ebp,%esi
sub    %edi,%edx
shr    %esi
add    %ebp,%esi
shr    $0x2,%esi
add    %ecx,%edx
lea    0x0(,%rsi,8),%ecx
addl   $0x1,(%rsp,%rdx,4)
sub    %ecx,%esi
lea    (%rax,%rsi,1),%ecx
add    $0xc,%ecx
imul   $0x24924925,%rcx,%rdi
mov    %ecx,%edx
shr    $0x20,%rdi
sub    %edi,%edx
shr    %edx
add    %edi,%edx
shr    $0x2,%edx
add    %esi,%eax
add    $0x1f,%eax
imul   $0x24924925,%rax,%rdi
shr    $0x20,%rdi
mov    %eax,%esi
lea    0x0(,%rdx,8),%ebp
sub    %edi,%esi
shr    %esi
add    %edi,%esi
sub    %ebp,%edx
shr    $0x2,%esi
lea    0x0(,%rsi,8),%edi
sub    %edi,%esi
add    %ecx,%edx
lea    (%rax,%rsi,1),%ecx
add    $0xc,%ecx
addl   $0x1,(%rsp,%rdx,4)
imul   $0x24924925,%rcx,%rdi
shr    $0x20,%rdi
mov    %ecx,%edx
sub    %edi,%edx
shr    %edx
add    %edi,%edx
shr    $0x2,%edx
add    %esi,%eax
add    $0x1e,%eax
lea    0x0(,%rdx,8),%esi
imul   $0x24924925,%rax,%rbp
shr    $0x20,%rbp
mov    %eax,%edi
sub    %ebp,%edi
sub    %esi,%edx
shr    %edi
add    %ebp,%edi
shr    $0x2,%edi
add    %ecx,%edx
lea    0x0(,%rdi,8),%ecx
addl   $0x1,(%rsp,%rdx,4)
sub    %ecx,%edi
lea    (%rax,%rdi,1),%edx
add    $0xc,%edx
imul   $0x24924925,%rdx,%rcx
mov    %edx,%esi
shr    $0x20,%rcx
sub    %ecx,%esi
shr    %esi
add    %ecx,%esi
shr    $0x2,%esi
lea    (%rax,%rdi,1),%ecx
add    $0x1f,%ecx
imul   $0x24924925,%rcx,%rax
shr    $0x20,%rax
mov    %ecx,%edi
lea    0x0(,%rsi,8),%ebp
sub    %eax,%edi
shr    %edi
add    %eax,%edi
sub    %ebp,%esi
shr    $0x2,%edi
lea    0x0(,%rdi,8),%eax
sub    %eax,%edi
add    %edx,%esi
lea    (%rcx,%rdi,1),%eax
add    $0xc,%eax
addl   $0x1,(%rsp,%rsi,4)
imul   $0x24924925,%rax,%rsi
shr    $0x20,%rsi
mov    %eax,%edx
sub    %esi,%edx
shr    %edx
add    %esi,%edx
add    %edi,%ecx
add    $0x1e,%ecx
imul   $0x24924925,%rcx,%rsi
shr    $0x2,%edx
shr    $0x20,%rsi
mov    %ecx,%edi
sub    %esi,%edi
shr    %edi
lea    0x0(,%rdx,8),%ebp
add    %esi,%edi
shr    $0x2,%edi
lea    0x0(,%rdi,8),%esi
sub    %ebp,%edx
sub    %esi,%edi
lea    (%rcx,%rdi,1),%esi
add    $0xc,%esi
imul   $0x24924925,%rsi,%rbp
add    %eax,%edx
shr    $0x20,%rbp
addl   $0x1,(%rsp,%rdx,4)
mov    %esi,%edx
sub    %ebp,%edx
shr    %edx
add    %ebp,%edx
shr    $0x2,%edx
lea    0x0(,%rdx,8),%eax
add    %edi,%ecx
add    $0x1f,%ecx
imul   $0x24924925,%rcx,%rdi
sub    %eax,%edx
shr    $0x20,%rdi
mov    %ecx,%eax
sub    %edi,%eax
shr    %eax
add    %edi,%eax
shr    $0x2,%eax
lea    0x0(,%rax,8),%edi
sub    %edi,%eax
add    %esi,%edx
add    %ecx,%eax
addl   $0x1,(%rsp,%rdx,4)
lea    0x1(%rbx),%ecx
mov    0x24(%rsp),%edx
add    %r15d,%edx
cmp    %edx,%ebx
mov    %ecx,%ebx
jl     11d0 <main+0x80>
mov    0x18(%rsp),%ebp
mov    (%rsp),%edx
lea    0xa5a(%rip),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <fprintf@plt>
mov    0x4(%rsp),%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <fprintf@plt>
mov    0x8(%rsp),%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <fprintf@plt>
mov    0xc(%rsp),%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <fprintf@plt>
mov    0x10(%rsp),%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <fprintf@plt>
mov    0x14(%rsp),%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <fprintf@plt>
lea    0x9f9(%rip),%rsi
mov    %r14,%rdi
mov    %ebp,%edx
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"friday.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [11 x i8] c"friday.out\00"
@.str.3 = [2 x i8] c"w\00"
@__const.main.months = [12 x i32] [i32 31, i32 28, i32 31, i32 30, i32 31, i32 30, i32 31, i32 31, i32 30, i32 31, i32 30, i32 31]
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [4 x i8] c"%d\0A\00"
@.str.6 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [12 x i32]
%9 = alloca [7 x i32]
store i32 0, i32* %1
%10 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %10, i32** %2
%11 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %11, i32** %3
%12 = bitcast [12 x i32]* %8 to i8*
%13 = bitcast [7 x i32]* %9 to i8*
%14 = load i32*, i32** %2
%15 = call i32 @fscanf(i32* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %4)
store i32 2, i32* %7
store i32 1900, i32* %5
br label %16
16: ; preds = %57, %0
%17 = load i32, i32* %5
%18 = load i32, i32* %4
%19 = add nsw i32 1900, %18
%20 = icmp slt i32 %17, %19
br i1 %20, label %21, label %60
21: ; preds = %16
store i32 0, i32* %6
br label %22
22: ; preds = %53, %21
%23 = load i32, i32* %6
%24 = icmp slt i32 %23, 12
br i1 %24, label %25, label %56
25: ; preds = %22
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 13
%28 = sub nsw i32 %27, 1
%29 = srem i32 %28, 7
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [7 x i32], [7 x i32]* %9, i64 0, i64 %30
%32 = load i32, i32* %31
%33 = add nsw i32 %32, 1
store i32 %33, i32* %31
%34 = load i32, i32* %6
%35 = icmp eq i32 %34, 1
br i1 %35, label %36, label %44
36: ; preds = %25
%37 = load i32, i32* %5
%38 = call i32 @leapyear(i32 %37)
%39 = icmp eq i32 %38, 1
br i1 %39, label %40, label %44
40: ; preds = %36
%41 = load i32, i32* %7
%42 = add nsw i32 %41, 29
%43 = srem i32 %42, 7
store i32 %43, i32* %7
br label %52
44: ; preds = %36, %25
%45 = load i32, i32* %7
%46 = load i32, i32* %6
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [12 x i32], [12 x i32]* %8, i64 0, i64 %47
%49 = load i32, i32* %48
%50 = add nsw i32 %45, %49
%51 = srem i32 %50, 7
store i32 %51, i32* %7
br label %52
52: ; preds = %44, %40
br label %53
53: ; preds = %52
%54 = load i32, i32* %6
%55 = add nsw i32 %54, 1
store i32 %55, i32* %6
br label %22
56: ; preds = %22
br label %57
57: ; preds = %56
%58 = load i32, i32* %5
%59 = add nsw i32 %58, 1
store i32 %59, i32* %5
br label %16
60: ; preds = %16
store i32 0, i32* %6
br label %61
61: ; preds = %82, %60
%62 = load i32, i32* %6
%63 = icmp slt i32 %62, 7
br i1 %63, label %64, label %85
64: ; preds = %61
%65 = load i32, i32* %6
%66 = icmp eq i32 %65, 6
br i1 %66, label %67, label %74
67: ; preds = %64
%68 = load i32*, i32** %3
%69 = load i32, i32* %6
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [7 x i32], [7 x i32]* %9, i64 0, i64 %70
%72 = load i32, i32* %71
%73 = call i32 @fprintf(i32* %68, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %72)
br label %81
74: ; preds = %64
%75 = load i32*, i32** %3
%76 = load i32, i32* %6
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [7 x i32], [7 x i32]* %9, i64 0, i64 %77
%79 = load i32, i32* %78
%80 = call i32 @fprintf(i32* %75, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %79)
br label %81
81: ; preds = %74, %67
br label %82
82: ; preds = %81
%83 = load i32, i32* %6
%84 = add nsw i32 %83, 1
store i32 %84, i32* %6
br label %61
85: ; preds = %61
%86 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [10 x i8] c"friday.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [11 x i8] c"friday.out\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [4 x i8] c"%d\0A\00"
@.str.6 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i32]
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%5 = bitcast i32* %1 to i8*
%6 = bitcast [7 x i32]* %2 to i8*
%7 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %122
10: ; preds = %0, %10
%11 = phi i32 [ %114, %10 ], [ 2, %0 ]
%12 = phi i32 [ %115, %10 ], [ 1900, %0 ]
%13 = add nuw nsw i32 %11, 12
%14 = urem i32 %13, 7
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %15
%17 = load i32, i32* %16
%18 = add nsw i32 %17, 1
store i32 %18, i32* %16
%19 = add nuw nsw i32 %11, 31
%20 = urem i32 %19, 7
%21 = trunc i32 %20 to i8
%22 = add nuw nsw i8 %21, 12
%23 = urem i8 %22, 7
%24 = zext i8 %23 to i64
%25 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %24
%26 = load i32, i32* %25
%27 = add nsw i32 %26, 1
store i32 %27, i32* %25
%28 = call i32 @leapyear(i32 %12)
%29 = icmp eq i32 %28, 1
%30 = select i1 %29, i32 29, i32 28
%31 = add nuw nsw i32 %20, %30
%32 = trunc i32 %31 to i8
%33 = urem i8 %32, 7
%34 = zext i8 %33 to i32
%35 = add nuw nsw i32 %34, 12
%36 = urem i32 %35, 7
%37 = zext i32 %36 to i64
%38 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %37
%39 = load i32, i32* %38
%40 = add nsw i32 %39, 1
store i32 %40, i32* %38
%41 = add nuw nsw i32 %34, 31
%42 = urem i32 %41, 7
%43 = add nuw nsw i32 %42, 12
%44 = urem i32 %43, 7
%45 = zext i32 %44 to i64
%46 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %45
%47 = load i32, i32* %46
%48 = add nsw i32 %47, 1
store i32 %48, i32* %46
%49 = add nuw nsw i32 %42, 30
%50 = urem i32 %49, 7
%51 = add nuw nsw i32 %50, 12
%52 = urem i32 %51, 7
%53 = zext i32 %52 to i64
%54 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %53
%55 = load i32, i32* %54
%56 = add nsw i32 %55, 1
store i32 %56, i32* %54
%57 = add nuw nsw i32 %50, 31
%58 = urem i32 %57, 7
%59 = add nuw nsw i32 %58, 12
%60 = urem i32 %59, 7
%61 = zext i32 %60 to i64
%62 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %61
%63 = load i32, i32* %62
%64 = add nsw i32 %63, 1
store i32 %64, i32* %62
%65 = add nuw nsw i32 %58, 30
%66 = urem i32 %65, 7
%67 = add nuw nsw i32 %66, 12
%68 = urem i32 %67, 7
%69 = zext i32 %68 to i64
%70 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %69
%71 = load i32, i32* %70
%72 = add nsw i32 %71, 1
store i32 %72, i32* %70
%73 = add nuw nsw i32 %66, 31
%74 = urem i32 %73, 7
%75 = add nuw nsw i32 %74, 12
%76 = urem i32 %75, 7
%77 = zext i32 %76 to i64
%78 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %77
%79 = load i32, i32* %78
%80 = add nsw i32 %79, 1
store i32 %80, i32* %78
%81 = add nuw nsw i32 %74, 31
%82 = urem i32 %81, 7
%83 = add nuw nsw i32 %82, 12
%84 = urem i32 %83, 7
%85 = zext i32 %84 to i64
%86 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %85
%87 = load i32, i32* %86
%88 = add nsw i32 %87, 1
store i32 %88, i32* %86
%89 = add nuw nsw i32 %82, 30
%90 = urem i32 %89, 7
%91 = add nuw nsw i32 %90, 12
%92 = urem i32 %91, 7
%93 = zext i32 %92 to i64
%94 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %93
%95 = load i32, i32* %94
%96 = add nsw i32 %95, 1
store i32 %96, i32* %94
%97 = add nuw nsw i32 %90, 31
%98 = urem i32 %97, 7
%99 = add nuw nsw i32 %98, 12
%100 = urem i32 %99, 7
%101 = zext i32 %100 to i64
%102 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %101
%103 = load i32, i32* %102
%104 = add nsw i32 %103, 1
store i32 %104, i32* %102
%105 = add nuw nsw i32 %98, 30
%106 = urem i32 %105, 7
%107 = add nuw nsw i32 %106, 12
%108 = urem i32 %107, 7
%109 = zext i32 %108 to i64
%110 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %109
%111 = load i32, i32* %110
%112 = add nsw i32 %111, 1
store i32 %112, i32* %110
%113 = add nuw nsw i32 %106, 31
%114 = urem i32 %113, 7
%115 = add nuw nsw i32 %12, 1
%116 = load i32, i32* %1
%117 = add nsw i32 %116, 1899
%118 = icmp slt i32 %12, %117
br i1 %118, label %10, label %119
119: ; preds = %10
%120 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 6
%121 = load i32, i32* %120
br label %122
122: ; preds = %119, %0
%123 = phi i32 [ %121, %119 ], [ 0, %0 ]
%124 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%125 = load i32, i32* %124
%126 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %125)
%127 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 1
%128 = load i32, i32* %127
%129 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %128)
%130 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 2
%131 = load i32, i32* %130
%132 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %131)
%133 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 3
%134 = load i32, i32* %133
%135 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %134)
%136 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 4
%137 = load i32, i32* %136
%138 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %137)
%139 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 5
%140 = load i32, i32* %139
%141 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %140)
%142 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 %123)
%143 = call i32 @exit(i32 0)
unreachable
}