#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 */

/* Variables and functions */
int LeapCheck(int);
int /*<<< orphan*/ PrintResult(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
int main() {
  const int YEAR = 1900;
  int nYears[10][4], nOperation, nStartYear, nEndYear, nDateDays, nYearEntry, i,
      j, n, inputDay, inputMonth;
  int MonthInfo[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  int nMyBool;
  printf("In this Leap year calculator 10 years is the maximum that are "
         "checked for\n");
  printf("Would you like to enter   1) A range   or    2) Set of years?\n");
  scanf("%d", &nOperation);
  if (nOperation == 1) {
    printf("\nPlease enter the start year: ");
    scanf("%d", &nStartYear);
    printf("\nPlease enter the end year: ");
    scanf("%d", &nEndYear);
    if ((nEndYear - nStartYear) > 9)
      printf("\nYear range is too great\n");
    else {
      n = 0;
      for (j = 0, i = nStartYear; j < 10, i < nEndYear + 1; j++, i++) {
        nYears[j][0] = i;
        nYears[j][1] = LeapCheck(nYears[j][0]);
        n = (int)(nYears[j][0] - YEAR) / 4;
        if ((nYears[j][1] == 1))
          n--;
        if (((((nYears[j][0] - YEAR) - ((nYears[j][0] - YEAR) % 100)) + 200) %
             400) == 0)
          n--;
        nYears[j][2] = (int)((nYears[j][0] - YEAR) + n) % 7;
        PrintResult(nYears[j][2], nYears[j][0]);
      }
    }
  } else if (nOperation == 2) {
    printf("\nEnter -999 to end entry. 10 Entries Max\n");
    i = 0;
    nYearEntry = 0;
    for (i = 0; i < 9; i++) {
      scanf("%d", &nYearEntry);
      if (nYearEntry == -999)
        break;
      else {
        nYears[i][0] = nYearEntry;
        nYears[i][1] = LeapCheck(nYears[i][0]);
        n = (int)(nYears[i][0] - YEAR) / 4;
        if (nYears[i][1] == 1)
          n--;
        if (((((nYears[i][0] - YEAR) - ((nYears[i][0] - YEAR) % 100)) + 200) %
             400) == 0)
          n--;
        nYears[i][2] = (int)((nYears[i][0] - YEAR) + n) % 7;
        nMyBool = 0;
        printf("Please input the month number: ");
        scanf("%d", &inputMonth);
        while (nMyBool == 0) {
          if ((inputMonth <= 12) && (inputMonth > 0)) {
            nMyBool = 1;
          } else {
            printf("Invalid please input the month number: ");
            scanf("%d", &inputMonth);
          }
        }
        inputMonth--;
        if (nYears[i][1] == 1)
          MonthInfo[1] = 29;
        else
          MonthInfo[1] = 28;
        nMyBool = 0;
        printf("Please input the day number: ");
        scanf("%d", &inputDay);
        while (nMyBool == 0) {
          if ((inputDay <= MonthInfo[inputMonth]) && (0 < inputDay)) {
            nMyBool = 1;
          } else {
            printf("Invalid please input the day number: ");
            scanf("%d", &inputDay);
          }
        }
        nDateDays = 0;
        for (j = 0; j < inputMonth; j++) {
          nDateDays += MonthInfo[j];
        }
        nDateDays += inputDay;
        nDateDays--;
        nYears[i][3] = ((nDateDays + nYears[i][2]) % 7);
        PrintResult(nYears[i][3], nYears[i][0]);
        printf("Next year: ");
      }
    }
  } else {
    printf("\nInvalid operation\n");
  }
  system("PAUSE");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x76c,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
lea    0xe79(%rip),%rsi
mov    $0x30,%edx
call   1050 <memcpy@plt>
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
call   1040 <printf@plt>
lea    0xf0a(%rip),%rdi
lea    -0xb4(%rbp),%rsi
call   1070 <scanf@plt>
cmpl   $0x1,-0xb4(%rbp)
jne    1425 <main+0x2c5>
lea    0xeed(%rip),%rdi
call   1040 <printf@plt>
lea    0xede(%rip),%rdi
lea    -0xb8(%rbp),%rsi
call   1070 <scanf@plt>
lea    0xeed(%rip),%rdi
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0xbc(%rbp),%rsi
call   1070 <scanf@plt>
mov    -0xbc(%rbp),%eax
sub    -0xb8(%rbp),%eax
cmp    $0x9,%eax
jle    122d <main+0xcd>
lea    0xed6(%rip),%rdi
call   1040 <printf@plt>
jmp    1420 <main+0x2c0>
movl   $0x0,-0xd0(%rbp)
movl   $0x0,-0xcc(%rbp)
mov    -0xb8(%rbp),%eax
mov    %eax,-0xc8(%rbp)
mov    -0xc8(%rbp),%eax
mov    -0xbc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    141b <main+0x2bb>
mov    -0xc8(%rbp),%ecx
movslq -0xcc(%rbp),%rdx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
movslq -0xcc(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%edi
call   1060 <LeapCheck@plt>
mov    %eax,%ecx
movslq -0xcc(%rbp),%rdx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rdx
add    %rdx,%rax
mov    %ecx,0x4(%rax)
movslq -0xcc(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%eax
sub    $0x76c,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0xd0(%rbp)
movslq -0xcc(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
cmpl   $0x1,0x4(%rax)
jne    130f <main+0x1af>
mov    -0xd0(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xd0(%rbp)
movslq -0xcc(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%eax
sub    $0x76c,%eax
mov    %eax,-0x118(%rbp)
movslq -0xcc(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%eax
sub    $0x76c,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    -0x118(%rbp),%eax
sub    %edx,%eax
add    $0xc8,%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1382 <main+0x222>
mov    -0xd0(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xd0(%rbp)
movslq -0xcc(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%eax
sub    $0x76c,%eax
add    -0xd0(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
movslq -0xcc(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    %edx,0x8(%rax)
movslq -0xcc(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    0x8(%rax),%edi
movslq -0xcc(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%esi
call   1080 <PrintResult@plt>
mov    -0xcc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xcc(%rbp)
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
jmp    124d <main+0xed>
jmp    1420 <main+0x2c0>
jmp    186e <main+0x70e>
cmpl   $0x2,-0xb4(%rbp)
jne    185d <main+0x6fd>
lea    0xcda(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0xc8(%rbp)
movl   $0x0,-0xc4(%rbp)
movl   $0x0,-0xc8(%rbp)
cmpl   $0x9,-0xc8(%rbp)
jge    1858 <main+0x6f8>
lea    0xc4a(%rip),%rdi
lea    -0xc4(%rbp),%rsi
call   1070 <scanf@plt>
cmpl   $0xfffffc19,-0xc4(%rbp)
fc ff ff
jne    1491 <main+0x331>
jmp    1858 <main+0x6f8>
mov    -0xc4(%rbp),%ecx
movslq -0xc8(%rbp),%rdx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
movslq -0xc8(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%edi
call   1060 <LeapCheck@plt>
mov    %eax,%ecx
movslq -0xc8(%rbp),%rdx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rdx
add    %rdx,%rax
mov    %ecx,0x4(%rax)
movslq -0xc8(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%eax
sub    $0x76c,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0xd0(%rbp)
movslq -0xc8(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
cmpl   $0x1,0x4(%rax)
jne    153c <main+0x3dc>
mov    -0xd0(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xd0(%rbp)
movslq -0xc8(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%eax
sub    $0x76c,%eax
mov    %eax,-0x11c(%rbp)
movslq -0xc8(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%eax
sub    $0x76c,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    -0x11c(%rbp),%eax
sub    %edx,%eax
add    $0xc8,%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    15af <main+0x44f>
mov    -0xd0(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xd0(%rbp)
movslq -0xc8(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%eax
sub    $0x76c,%eax
add    -0xd0(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
movslq -0xc8(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    %edx,0x8(%rax)
movl   $0x0,-0x114(%rbp)
lea    0xb3b(%rip),%rdi
call   1040 <printf@plt>
lea    0xaac(%rip),%rdi
lea    -0xd8(%rbp),%rsi
call   1070 <scanf@plt>
cmpl   $0x0,-0x114(%rbp)
jne    1674 <main+0x514>
cmpl   $0xc,-0xd8(%rbp)
jg     1650 <main+0x4f0>
cmpl   $0x0,-0xd8(%rbp)
jle    1650 <main+0x4f0>
movl   $0x1,-0x114(%rbp)
jmp    166f <main+0x50f>
lea    0xb06(%rip),%rdi
call   1040 <printf@plt>
lea    0xa57(%rip),%rdi
lea    -0xd8(%rbp),%rsi
call   1070 <scanf@plt>
jmp    161a <main+0x4ba>
mov    -0xd8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xd8(%rbp)
movslq -0xc8(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
cmpl   $0x1,0x4(%rax)
jne    16b1 <main+0x551>
movl   $0x1d,-0x10c(%rbp)
jmp    16bb <main+0x55b>
movl   $0x1c,-0x10c(%rbp)
movl   $0x0,-0x114(%rbp)
lea    0xab9(%rip),%rdi
call   1040 <printf@plt>
lea    0x9e2(%rip),%rdi
lea    -0xd4(%rbp),%rsi
call   1070 <scanf@plt>
cmpl   $0x0,-0x114(%rbp)
jne    174c <main+0x5ec>
mov    -0xd4(%rbp),%eax
movslq -0xd8(%rbp),%rcx
cmp    -0x110(%rbp,%rcx,4),%eax
jg     1728 <main+0x5c8>
xor    %eax,%eax
cmp    -0xd4(%rbp),%eax
jge    1728 <main+0x5c8>
movl   $0x1,-0x114(%rbp)
jmp    1747 <main+0x5e7>
lea    0xa74(%rip),%rdi
call   1040 <printf@plt>
lea    0x97f(%rip),%rdi
lea    -0xd4(%rbp),%rsi
call   1070 <scanf@plt>
jmp    16e4 <main+0x584>
movl   $0x0,-0xc0(%rbp)
movl   $0x0,-0xcc(%rbp)
mov    -0xcc(%rbp),%eax
cmp    -0xd8(%rbp),%eax
jge    17a0 <main+0x640>
movslq -0xcc(%rbp),%rax
mov    -0x110(%rbp,%rax,4),%eax
add    -0xc0(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    -0xcc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xcc(%rbp)
jmp    1760 <main+0x600>
mov    -0xd4(%rbp),%eax
add    -0xc0(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    -0xc0(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc0(%rbp)
mov    -0xc0(%rbp),%eax
movslq -0xc8(%rbp),%rdx
lea    -0xb0(%rbp),%rcx
shl    $0x4,%rdx
add    %rdx,%rcx
add    0x8(%rcx),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
movslq -0xc8(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    %edx,0xc(%rax)
movslq -0xc8(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    0xc(%rax),%edi
movslq -0xc8(%rbp),%rcx
lea    -0xb0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%esi
call   1080 <PrintResult@plt>
lea    0x98f(%rip),%rdi
call   1040 <printf@plt>
jmp    1844 <main+0x6e4>
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc8(%rbp)
jmp    145c <main+0x2fc>
jmp    1869 <main+0x709>
lea    0x971(%rip),%rdi
call   1040 <printf@plt>
jmp    186e <main+0x70e>
lea    0x974(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
movaps 0xeab(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xe8f(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movdqa 0xe72(%rip),%xmm0
movdqa %xmm0,0x30(%rsp)
lea    0xf72(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb0(%rip),%rdi
call   1030 <puts@plt>
lea    0xe7d(%rip),%rdi
lea    0x2c(%rsp),%rsi
call   1070 <scanf@plt>
mov    0x2c(%rsp),%eax
cmp    $0x2,%eax
je     122e <main+0xce>
cmp    $0x1,%eax
jne    1582 <main+0x422>
lea    0xe5d(%rip),%rdi
call   1050 <printf@plt>
lea    0xe4e(%rip),%rbx
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
lea    0xe5c(%rip),%rdi
call   1050 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    0x10(%rsp),%eax
mov    0x14(%rsp),%ebx
mov    %eax,%ecx
sub    %ebx,%ecx
cmp    $0x9,%ecx
jle    1593 <main+0x433>
lea    0xfad(%rip),%rdi
call   1030 <puts@plt>
jmp    1645 <main+0x4e5>
lea    0xf73(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,0x14(%rsp)
xor    %r14d,%r14d
lea    0xde4(%rip),%r13
lea    0xe3c(%rip),%rbx
jmp    12ce <main+0x16e>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %edx,%edx
mov    0x20(%rsp),%r14
lea    0xe21(%rip),%rbx
mov    0x18(%rsp),%rsi
add    %edx,%r15d
mov    0x10(%rsp),%eax
lea    (%r15,%rax,1),%ecx
add    %r15d,%eax
add    $0xffffffff,%eax
cltq
imul   $0xffffffff92492493,%rax,%rax
shr    $0x20,%rax
add    %ecx,%eax
add    $0xffffffff,%eax
mov    %eax,%edx
shr    $0x1f,%edx
sar    $0x2,%eax
add    %edx,%eax
lea    0x0(,%rax,8),%edx
sub    %edx,%eax
lea    (%rax,%rcx,1),%edi
add    $0xffffffff,%edi
call   1080 <PrintResult@plt>
lea    0xe40(%rip),%rdi
call   1050 <printf@plt>
add    $0x1,%r14
cmp    $0x9,%r14
je     1645 <main+0x4e5>
mov    %r13,%rdi
lea    0x14(%rsp),%rsi
call   1070 <scanf@plt>
mov    0x14(%rsp),%ebp
cmp    $0xfffffc19,%ebp
je     1645 <main+0x4e5>
mov    %r14,0x20(%rsp)
mov    %ebp,%edi
call   1060 <LeapCheck@plt>
lea    -0x76c(%rbp),%esi
lea    -0x769(%rbp),%ecx
test   %esi,%esi
cmovns %esi,%ecx
sar    $0x2,%ecx
xor    %edx,%edx
mov    %eax,0x28(%rsp)
cmp    $0x1,%eax
sete   %dl
movslq %esi,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rsi
shr    $0x3f,%rsi
shr    $0x20,%rax
sar    $0x5,%eax
add    %esi,%eax
lea    0x51eb858(,%rax,4),%eax
ror    $0x4,%eax
cmp    $0xa3d70b,%eax
mov    %rbp,0x18(%rsp)
lea    -0x76c(%rcx,%rbp,1),%r15d
ff
sbb    $0x0,%r15d
sub    %edx,%r15d
movslq %r15d,%r12
imul   $0xffffffff92492493,%r12,%rax
shr    $0x20,%rax
add    %eax,%r12d
mov    %r12d,%eax
shr    $0x1f,%eax
sar    $0x2,%r12d
add    %eax,%r12d
lea    0x0(,%r12,8),%ebp
lea    0xcee(%rip),%rdi
call   1050 <printf@plt>
mov    %r13,%rdi
lea    0xc(%rsp),%r14
mov    %r14,%rsi
call   1070 <scanf@plt>
mov    0xc(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0xc,%eax
jb     13cf <main+0x26f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1050 <printf@plt>
mov    %r13,%rdi
mov    %r14,%rsi
call   1070 <scanf@plt>
mov    0xc(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0xb,%eax
ja     13b0 <main+0x250>
sub    %ebp,%r12d
xor    %eax,%eax
cmpl   $0x1,0x28(%rsp)
sete   %al
addl   $0xffffffff,0xc(%rsp)
or     $0x1c,%eax
mov    %eax,0x34(%rsp)
lea    0xcc8(%rip),%rdi
call   1050 <printf@plt>
mov    %r13,%rdi
lea    0x10(%rsp),%rbp
mov    %rbp,%rsi
call   1070 <scanf@plt>
mov    0x10(%rsp),%eax
test   %eax,%eax
lea    0xcc4(%rip),%rbx
jle    142b <main+0x2cb>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movslq 0xc(%rsp),%rcx
cmp    0x30(%rsp,%rcx,4),%eax
jle    1450 <main+0x2f0>
mov    %rbx,%rdi
call   1050 <printf@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
call   1070 <scanf@plt>
mov    0x10(%rsp),%eax
test   %eax,%eax
jg     1420 <main+0x2c0>
jmp    142b <main+0x2cb>
nopl   0x0(%rax,%rax,1)
add    %r12d,%r15d
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    1260 <main+0x100>
cmp    $0x8,%eax
jae    1480 <main+0x320>
xor    %ecx,%ecx
xor    %edx,%edx
mov    0x20(%rsp),%r14
lea    0xc1b(%rip),%rbx
mov    0x18(%rsp),%rsi
jmp    1570 <main+0x410>
xchg   %ax,%ax
mov    %eax,%ecx
and    $0xfffffff8,%ecx
lea    -0x8(%rcx),%rsi
mov    %rsi,%rdi
shr    $0x3,%rdi
add    $0x1,%rdi
mov    %edi,%edx
and    $0x3,%edx
cmp    $0x18,%rsi
mov    0x20(%rsp),%r14
lea    0xbe6(%rip),%rbx
mov    0x18(%rsp),%rsi
jae    14bc <main+0x35c>
pxor   %xmm0,%xmm0
xor    %ebp,%ebp
pxor   %xmm1,%xmm1
jmp    1513 <main+0x3b3>
and    $0xfffffffffffffffc,%rdi
pxor   %xmm0,%xmm0
xor    %ebp,%ebp
pxor   %xmm1,%xmm1
nopw   0x0(%rax,%rax,1)
paddd  0x30(%rsp,%rbp,4),%xmm0
paddd  0x40(%rsp,%rbp,4),%xmm1
paddd  0x50(%rsp,%rbp,4),%xmm0
paddd  0x60(%rsp,%rbp,4),%xmm1
paddd  0x70(%rsp,%rbp,4),%xmm0
paddd  0x80(%rsp,%rbp,4),%xmm1
paddd  0x90(%rsp,%rbp,4),%xmm0
paddd  0xa0(%rsp,%rbp,4),%xmm1
add    $0x20,%rbp
add    $0xfffffffffffffffc,%rdi
jne    14d0 <main+0x370>
test   %rdx,%rdx
je     1545 <main+0x3e5>
lea    0x40(%rsp),%rdi
lea    (%rdi,%rbp,4),%rbp
shl    $0x5,%rdx
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
paddd  -0x10(%rbp,%rdi,1),%xmm0
paddd  0x0(%rbp,%rdi,1),%xmm1
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    1530 <main+0x3d0>
paddd  %xmm1,%xmm0
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%edx
cmp    %rax,%rcx
je     1273 <main+0x113>
nopl   0x0(%rax,%rax,1)
add    0x30(%rsp,%rcx,4),%edx
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1570 <main+0x410>
jmp    1273 <main+0x113>
lea    0xc0c(%rip),%rdi
call   1030 <puts@plt>
jmp    1645 <main+0x4e5>
cmp    %ebx,%eax
jl     1645 <main+0x4e5>
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1060 <LeapCheck@plt>
lea    -0x76c(%rbx),%edx
lea    -0x769(%rbx),%ecx
test   %edx,%edx
cmovns %edx,%ecx
sar    $0x2,%ecx
xor    %esi,%esi
cmp    $0x1,%eax
sete   %sil
movslq %edx,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rax
sar    $0x5,%eax
add    %edx,%eax
lea    0x51eb858(,%rax,4),%eax
ror    $0x4,%eax
cmp    $0xa3d70b,%eax
sbb    $0x0,%ecx
sub    %esi,%ecx
lea    (%rbx,%rcx,1),%eax
add    %ebx,%ecx
add    $0xfffff894,%ecx
movslq %ecx,%rcx
imul   $0xffffffff92492493,%rcx,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
add    $0xfffff894,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x2,%ecx
add    %edx,%ecx
lea    0x0(,%rcx,8),%edx
sub    %edx,%ecx
lea    (%rcx,%rax,1),%edi
add    $0xfffff894,%edi
mov    %ebx,%esi
call   1080 <PrintResult@plt>
lea    0x1(%rbx),%eax
cmp    0x10(%rsp),%ebx
mov    %eax,%ebx
jl     15a0 <main+0x440>
lea    0xabb(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.MonthInfo = [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 = [75 x i8] c"In this Leap year calculator 10 years is the maximum that are checked for\0A\00"
@.str.1 = [63 x i8] c"Would you like to enter 1) A range or 2) Set of years?\0A\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [31 x i8] c"\0APlease enter the start year: \00"
@.str.4 = [29 x i8] c"\0APlease enter the end year: \00"
@.str.5 = [26 x i8] c"\0AYear range is too great\0A\00"
@.str.6 = [42 x i8] c"\0AEnter -999 to end entry. 10 Entries Max\0A\00"
@.str.7 = [32 x i8] c"Please input the month number: \00"
@.str.8 = [40 x i8] c"Invalid please input the month number: \00"
@.str.9 = [30 x i8] c"Please input the day number: \00"
@.str.10 = [38 x i8] c"Invalid please input the day number: \00"
@.str.11 = [12 x i8] c"Next year: \00"
@.str.12 = [20 x i8] c"\0AInvalid operation\0A\00"
@.str.13 = [6 x i8] c"PAUSE\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x [4 x i32]]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca [12 x i32]
%15 = alloca i32
store i32 0, i32* %1
store i32 1900, i32* %2
%16 = bitcast [12 x i32]* %14 to i8*
%17 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%20 = load i32, i32* %4
%21 = icmp eq i32 %20, 1
br i1 %21, label %22, label %128
22: ; preds = %0
%23 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %5)
%25 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%26 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %6)
%27 = load i32, i32* %6
%28 = load i32, i32* %5
%29 = sub nsw i32 %27, %28
%30 = icmp sgt i32 %29, 9
br i1 %30, label %31, label %33
31: ; preds = %22
%32 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
br label %127
33: ; preds = %22
store i32 0, i32* %11
store i32 0, i32* %10
%34 = load i32, i32* %5
store i32 %34, i32* %9
br label %35
35: ; preds = %121, %33
%36 = load i32, i32* %10
%37 = icmp slt i32 %36, 10
%38 = zext i1 %37 to i32
%39 = load i32, i32* %9
%40 = load i32, i32* %6
%41 = add nsw i32 %40, 1
%42 = icmp slt i32 %39, %41
br i1 %42, label %43, label %126
43: ; preds = %35
%44 = load i32, i32* %9
%45 = load i32, i32* %10
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %46
%48 = getelementptr inbounds [4 x i32], [4 x i32]* %47, i64 0, i64 0
store i32 %44, i32* %48
%49 = load i32, i32* %10
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %50
%52 = getelementptr inbounds [4 x i32], [4 x i32]* %51, i64 0, i64 0
%53 = load i32, i32* %52
%54 = call i32 @LeapCheck(i32 %53)
%55 = load i32, i32* %10
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %56
%58 = getelementptr inbounds [4 x i32], [4 x i32]* %57, i64 0, i64 1
store i32 %54, i32* %58
%59 = load i32, i32* %10
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %60
%62 = getelementptr inbounds [4 x i32], [4 x i32]* %61, i64 0, i64 0
%63 = load i32, i32* %62
%64 = sub nsw i32 %63, 1900
%65 = sdiv i32 %64, 4
store i32 %65, i32* %11
%66 = load i32, i32* %10
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %67
%69 = getelementptr inbounds [4 x i32], [4 x i32]* %68, i64 0, i64 1
%70 = load i32, i32* %69
%71 = icmp eq i32 %70, 1
br i1 %71, label %72, label %75
72: ; preds = %43
%73 = load i32, i32* %11
%74 = add nsw i32 %73, -1
store i32 %74, i32* %11
br label %75
75: ; preds = %72, %43
%76 = load i32, i32* %10
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %77
%79 = getelementptr inbounds [4 x i32], [4 x i32]* %78, i64 0, i64 0
%80 = load i32, i32* %79
%81 = sub nsw i32 %80, 1900
%82 = load i32, i32* %10
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %83
%85 = getelementptr inbounds [4 x i32], [4 x i32]* %84, i64 0, i64 0
%86 = load i32, i32* %85
%87 = sub nsw i32 %86, 1900
%88 = srem i32 %87, 100
%89 = sub nsw i32 %81, %88
%90 = add nsw i32 %89, 200
%91 = srem i32 %90, 400
%92 = icmp eq i32 %91, 0
br i1 %92, label %93, label %96
93: ; preds = %75
%94 = load i32, i32* %11
%95 = add nsw i32 %94, -1
store i32 %95, i32* %11
br label %96
96: ; preds = %93, %75
%97 = load i32, i32* %10
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %98
%100 = getelementptr inbounds [4 x i32], [4 x i32]* %99, i64 0, i64 0
%101 = load i32, i32* %100
%102 = sub nsw i32 %101, 1900
%103 = load i32, i32* %11
%104 = add nsw i32 %102, %103
%105 = srem i32 %104, 7
%106 = load i32, i32* %10
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %107
%109 = getelementptr inbounds [4 x i32], [4 x i32]* %108, i64 0, i64 2
store i32 %105, i32* %109
%110 = load i32, i32* %10
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %111
%113 = getelementptr inbounds [4 x i32], [4 x i32]* %112, i64 0, i64 2
%114 = load i32, i32* %113
%115 = load i32, i32* %10
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %116
%118 = getelementptr inbounds [4 x i32], [4 x i32]* %117, i64 0, i64 0
%119 = load i32, i32* %118
%120 = call i32 @PrintResult(i32 %114, i32 %119)
br label %121
121: ; preds = %96
%122 = load i32, i32* %10
%123 = add nsw i32 %122, 1
store i32 %123, i32* %10
%124 = load i32, i32* %9
%125 = add nsw i32 %124, 1
store i32 %125, i32* %9
br label %35
126: ; preds = %35
br label %127
127: ; preds = %126, %31
br label %311
128: ; preds = %0
%129 = load i32, i32* %4
%130 = icmp eq i32 %129, 2
br i1 %130, label %131, label %308
131: ; preds = %128
%132 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %9
store i32 0, i32* %8
store i32 0, i32* %9
br label %133
133: ; preds = %304, %131
%134 = load i32, i32* %9
%135 = icmp slt i32 %134, 9
br i1 %135, label %136, label %307
136: ; preds = %133
%137 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %8)
%138 = load i32, i32* %8
%139 = icmp eq i32 %138, -999
br i1 %139, label %140, label %141
140: ; preds = %136
br label %307
141: ; preds = %136
%142 = load i32, i32* %8
%143 = load i32, i32* %9
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %144
%146 = getelementptr inbounds [4 x i32], [4 x i32]* %145, i64 0, i64 0
store i32 %142, i32* %146
%147 = load i32, i32* %9
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %148
%150 = getelementptr inbounds [4 x i32], [4 x i32]* %149, i64 0, i64 0
%151 = load i32, i32* %150
%152 = call i32 @LeapCheck(i32 %151)
%153 = load i32, i32* %9
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %154
%156 = getelementptr inbounds [4 x i32], [4 x i32]* %155, i64 0, i64 1
store i32 %152, i32* %156
%157 = load i32, i32* %9
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %158
%160 = getelementptr inbounds [4 x i32], [4 x i32]* %159, i64 0, i64 0
%161 = load i32, i32* %160
%162 = sub nsw i32 %161, 1900
%163 = sdiv i32 %162, 4
store i32 %163, i32* %11
%164 = load i32, i32* %9
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %165
%167 = getelementptr inbounds [4 x i32], [4 x i32]* %166, i64 0, i64 1
%168 = load i32, i32* %167
%169 = icmp eq i32 %168, 1
br i1 %169, label %170, label %173
170: ; preds = %141
%171 = load i32, i32* %11
%172 = add nsw i32 %171, -1
store i32 %172, i32* %11
br label %173
173: ; preds = %170, %141
%174 = load i32, i32* %9
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %175
%177 = getelementptr inbounds [4 x i32], [4 x i32]* %176, i64 0, i64 0
%178 = load i32, i32* %177
%179 = sub nsw i32 %178, 1900
%180 = load i32, i32* %9
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %181
%183 = getelementptr inbounds [4 x i32], [4 x i32]* %182, i64 0, i64 0
%184 = load i32, i32* %183
%185 = sub nsw i32 %184, 1900
%186 = srem i32 %185, 100
%187 = sub nsw i32 %179, %186
%188 = add nsw i32 %187, 200
%189 = srem i32 %188, 400
%190 = icmp eq i32 %189, 0
br i1 %190, label %191, label %194
191: ; preds = %173
%192 = load i32, i32* %11
%193 = add nsw i32 %192, -1
store i32 %193, i32* %11
br label %194
194: ; preds = %191, %173
%195 = load i32, i32* %9
%196 = sext i32 %195 to i64
%197 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %196
%198 = getelementptr inbounds [4 x i32], [4 x i32]* %197, i64 0, i64 0
%199 = load i32, i32* %198
%200 = sub nsw i32 %199, 1900
%201 = load i32, i32* %11
%202 = add nsw i32 %200, %201
%203 = srem i32 %202, 7
%204 = load i32, i32* %9
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %205
%207 = getelementptr inbounds [4 x i32], [4 x i32]* %206, i64 0, i64 2
store i32 %203, i32* %207
store i32 0, i32* %15
%208 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
%209 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %13)
br label %210
210: ; preds = %223, %194
%211 = load i32, i32* %15
%212 = icmp eq i32 %211, 0
br i1 %212, label %213, label %224
213: ; preds = %210
%214 = load i32, i32* %13
%215 = icmp sle i32 %214, 12
br i1 %215, label %216, label %220
216: ; preds = %213
%217 = load i32, i32* %13
%218 = icmp sgt i32 %217, 0
br i1 %218, label %219, label %220
219: ; preds = %216
store i32 1, i32* %15
br label %223
220: ; preds = %216, %213
%221 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%222 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %13)
br label %223
223: ; preds = %220, %219
br label %210
224: ; preds = %210
%225 = load i32, i32* %13
%226 = add nsw i32 %225, -1
store i32 %226, i32* %13
%227 = load i32, i32* %9
%228 = sext i32 %227 to i64
%229 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %228
%230 = getelementptr inbounds [4 x i32], [4 x i32]* %229, i64 0, i64 1
%231 = load i32, i32* %230
%232 = icmp eq i32 %231, 1
br i1 %232, label %233, label %235
233: ; preds = %224
%234 = getelementptr inbounds [12 x i32], [12 x i32]* %14, i64 0, i64 1
store i32 29, i32* %234
br label %237
235: ; preds = %224
%236 = getelementptr inbounds [12 x i32], [12 x i32]* %14, i64 0, i64 1
store i32 28, i32* %236
br label %237
237: ; preds = %235, %233
store i32 0, i32* %15
%238 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0))
%239 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %12)
br label %240
240: ; preds = %257, %237
%241 = load i32, i32* %15
%242 = icmp eq i32 %241, 0
br i1 %242, label %243, label %258
243: ; preds = %240
%244 = load i32, i32* %12
%245 = load i32, i32* %13
%246 = sext i32 %245 to i64
%247 = getelementptr inbounds [12 x i32], [12 x i32]* %14, i64 0, i64 %246
%248 = load i32, i32* %247
%249 = icmp sle i32 %244, %248
br i1 %249, label %250, label %254
250: ; preds = %243
%251 = load i32, i32* %12
%252 = icmp slt i32 0, %251
br i1 %252, label %253, label %254
253: ; preds = %250
store i32 1, i32* %15
br label %257
254: ; preds = %250, %243
%255 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0))
%256 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %12)
br label %257
257: ; preds = %254, %253
br label %240
258: ; preds = %240
store i32 0, i32* %7
store i32 0, i32* %10
br label %259
259: ; preds = %270, %258
%260 = load i32, i32* %10
%261 = load i32, i32* %13
%262 = icmp slt i32 %260, %261
br i1 %262, label %263, label %273
263: ; preds = %259
%264 = load i32, i32* %10
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds [12 x i32], [12 x i32]* %14, i64 0, i64 %265
%267 = load i32, i32* %266
%268 = load i32, i32* %7
%269 = add nsw i32 %268, %267
store i32 %269, i32* %7
br label %270
270: ; preds = %263
%271 = load i32, i32* %10
%272 = add nsw i32 %271, 1
store i32 %272, i32* %10
br label %259
273: ; preds = %259
%274 = load i32, i32* %12
%275 = load i32, i32* %7
%276 = add nsw i32 %275, %274
store i32 %276, i32* %7
%277 = load i32, i32* %7
%278 = add nsw i32 %277, -1
store i32 %278, i32* %7
%279 = load i32, i32* %7
%280 = load i32, i32* %9
%281 = sext i32 %280 to i64
%282 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %281
%283 = getelementptr inbounds [4 x i32], [4 x i32]* %282, i64 0, i64 2
%284 = load i32, i32* %283
%285 = add nsw i32 %279, %284
%286 = srem i32 %285, 7
%287 = load i32, i32* %9
%288 = sext i32 %287 to i64
%289 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %288
%290 = getelementptr inbounds [4 x i32], [4 x i32]* %289, i64 0, i64 3
store i32 %286, i32* %290
%291 = load i32, i32* %9
%292 = sext i32 %291 to i64
%293 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %292
%294 = getelementptr inbounds [4 x i32], [4 x i32]* %293, i64 0, i64 3
%295 = load i32, i32* %294
%296 = load i32, i32* %9
%297 = sext i32 %296 to i64
%298 = getelementptr inbounds [10 x [4 x i32]], [10 x [4 x i32]]* %3, i64 0, i64 %297
%299 = getelementptr inbounds [4 x i32], [4 x i32]* %298, i64 0, i64 0
%300 = load i32, i32* %299
%301 = call i32 @PrintResult(i32 %295, i32 %300)
%302 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
br label %303
303: ; preds = %273
br label %304
304: ; preds = %303
%305 = load i32, i32* %9
%306 = add nsw i32 %305, 1
store i32 %306, i32* %9
br label %133
307: ; preds = %140, %133
br label %310
308: ; preds = %128
%309 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
br label %310
310: ; preds = %308, %307
br label %311
311: ; preds = %310, %127
%312 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.MonthInfo = [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.2 = [3 x i8] c"%d\00"
@.str.3 = [31 x i8] c"\0APlease enter the start year: \00"
@.str.4 = [29 x i8] c"\0APlease enter the end year: \00"
@.str.7 = [32 x i8] c"Please input the month number: \00"
@.str.8 = [40 x i8] c"Invalid please input the month number: \00"
@.str.9 = [30 x i8] c"Please input the day number: \00"
@.str.10 = [38 x i8] c"Invalid please input the day number: \00"
@.str.11 = [12 x i8] c"Next year: \00"
@.str.13 = [6 x i8] c"PAUSE\00"
@str = [74 x i8] c"In this Leap year calculator 10 years is the maximum that are checked for\00"
@str.14 = [62 x i8] c"Would you like to enter 1) A range or 2) Set of years?\00"
@str.15 = [19 x i8] c"\0AInvalid operation\00"
@str.16 = [41 x i8] c"\0AEnter -999 to end entry. 10 Entries Max\00"
@str.17 = [25 x i8] c"\0AYear range is too great\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [12 x i32]
%8 = bitcast i32* %1 to i8*
%9 = bitcast i32* %2 to i8*
%10 = bitcast i32* %3 to i8*
%11 = bitcast i32* %4 to i8*
%12 = bitcast i32* %5 to i8*
%13 = bitcast i32* %6 to i8*
%14 = bitcast [12 x i32]* %7 to i8*
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.14, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%18 = load i32, i32* %1
switch i32 %18, label %220 [
i32 1, label %19
i32 2, label %51
]
19: ; preds = %0
%20 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%22 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%24 = load i32, i32* %3
%25 = load i32, i32* %2
%26 = sub nsw i32 %24, %25
%27 = icmp sgt i32 %26, 9
br i1 %27, label %220, label %28
28: ; preds = %19
%29 = icmp slt i32 %24, %25
br i1 %29, label %223, label %30
30: ; preds = %28, %30
%31 = phi i32 [ %48, %30 ], [ %25, %28 ]
%32 = call i32 @LeapCheck(i32 %31)
%33 = add nsw i32 %31, -1900
%34 = sdiv i32 %33, 4
%35 = icmp eq i32 %32, 1
%36 = sext i1 %35 to i32
%37 = srem i32 %33, 100
%38 = add i32 %31, -1700
%39 = sub i32 %38, %37
%40 = srem i32 %39, 400
%41 = icmp eq i32 %40, 0
%42 = sext i1 %41 to i32
%43 = add i32 %34, %33
%44 = add i32 %43, %42
%45 = add i32 %44, %36
%46 = srem i32 %45, 7
%47 = call i32 @PrintResult(i32 %46, i32 %31)
%48 = add nsw i32 %31, 1
%49 = load i32, i32* %3
%50 = icmp slt i32 %31, %49
br i1 %50, label %30, label %223
51: ; preds = %0
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.16, i64 0, i64 0))
store i32 0, i32* %4
%53 = getelementptr inbounds [12 x i32], [12 x i32]* %7, i64 0, i64 1
br label %54
54: ; preds = %51, %209
%55 = phi i64 [ 0, %51 ], [ %218, %209 ]
%56 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%57 = load i32, i32* %4
%58 = icmp eq i32 %57, -999
br i1 %58, label %223, label %59
59: ; preds = %54
%60 = call i32 @LeapCheck(i32 %57)
%61 = add nsw i32 %57, -1900
%62 = sdiv i32 %61, 4
%63 = icmp eq i32 %60, 1
%64 = sext i1 %63 to i32
%65 = srem i32 %61, 100
%66 = add i32 %57, -1700
%67 = sub i32 %66, %65
%68 = srem i32 %67, 400
%69 = icmp eq i32 %68, 0
%70 = sext i1 %69 to i32
%71 = add i32 %62, %61
%72 = add i32 %71, %70
%73 = add i32 %72, %64
%74 = srem i32 %73, 7
%75 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
%76 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %6)
%77 = load i32, i32* %6
%78 = add i32 %77, -1
%79 = icmp ult i32 %78, 12
br i1 %79, label %86, label %80
80: ; preds = %59, %80
%81 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%82 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %6)
%83 = load i32, i32* %6
%84 = add i32 %83, -1
%85 = icmp ult i32 %84, 12
br i1 %85, label %86, label %80
86: ; preds = %80, %59
%87 = load i32, i32* %6
%88 = add nsw i32 %87, -1
store i32 %88, i32* %6
%89 = select i1 %63, i32 29, i32 28
store i32 %89, i32* %53
%90 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0))
%91 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %5)
%92 = load i32, i32* %5
%93 = load i32, i32* %6
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [12 x i32], [12 x i32]* %7, i64 0, i64 %94
%96 = load i32, i32* %95
%97 = icmp sle i32 %92, %96
%98 = icmp sgt i32 %92, 0
%99 = and i1 %98, %97
br i1 %99, label %100, label %190
100: ; preds = %190, %86
%101 = load i32, i32* %6
%102 = icmp sgt i32 %101, 0
br i1 %102, label %103, label %209
103: ; preds = %100
%104 = zext i32 %101 to i64
%105 = icmp ult i32 %101, 8
br i1 %105, label %187, label %106
106: ; preds = %103
%107 = and i64 %104, 4294967288
%108 = add nsw i64 %107, -8
%109 = lshr exact i64 %108, 3
%110 = add nuw nsw i64 %109, 1
%111 = and i64 %110, 3
%112 = icmp ult i64 %108, 24
br i1 %112, label %158, label %113
113: ; preds = %106
%114 = and i64 %110, 4611686018427387900
br label %115
115: ; preds = %115, %113
%116 = phi i64 [ 0, %113 ], [ %155, %115 ]
%117 = phi <4 x i32> [ zeroinitializer, %113 ], [ %153, %115 ]
%118 = phi <4 x i32> [ zeroinitializer, %113 ], [ %154, %115 ]
%119 = phi i64 [ 0, %113 ], [ %156, %115 ]
%120 = getelementptr inbounds [12 x i32], [12 x i32]* %7, i64 0, i64 %116
%121 = bitcast i32* %120 to <4 x i32>*
%122 = load <4 x i32>, <4 x i32>* %121
%123 = getelementptr inbounds i32, i32* %120, i64 4
%124 = bitcast i32* %123 to <4 x i32>*
%125 = load <4 x i32>, <4 x i32>* %124
%126 = add <4 x i32> %122, %117
%127 = add <4 x i32> %125, %118
%128 = or i64 %116, 8
%129 = getelementptr inbounds [12 x i32], [12 x i32]* %7, i64 0, i64 %128
%130 = bitcast i32* %129 to <4 x i32>*
%131 = load <4 x i32>, <4 x i32>* %130
%132 = getelementptr inbounds i32, i32* %129, i64 4
%133 = bitcast i32* %132 to <4 x i32>*
%134 = load <4 x i32>, <4 x i32>* %133
%135 = add <4 x i32> %131, %126
%136 = add <4 x i32> %134, %127
%137 = or i64 %116, 16
%138 = getelementptr inbounds [12 x i32], [12 x i32]* %7, i64 0, i64 %137
%139 = bitcast i32* %138 to <4 x i32>*
%140 = load <4 x i32>, <4 x i32>* %139
%141 = getelementptr inbounds i32, i32* %138, i64 4
%142 = bitcast i32* %141 to <4 x i32>*
%143 = load <4 x i32>, <4 x i32>* %142
%144 = add <4 x i32> %140, %135
%145 = add <4 x i32> %143, %136
%146 = or i64 %116, 24
%147 = getelementptr inbounds [12 x i32], [12 x i32]* %7, i64 0, i64 %146
%148 = bitcast i32* %147 to <4 x i32>*
%149 = load <4 x i32>, <4 x i32>* %148
%150 = getelementptr inbounds i32, i32* %147, i64 4
%151 = bitcast i32* %150 to <4 x i32>*
%152 = load <4 x i32>, <4 x i32>* %151
%153 = add <4 x i32> %149, %144
%154 = add <4 x i32> %152, %145
%155 = add nuw i64 %116, 32
%156 = add i64 %119, 4
%157 = icmp eq i64 %156, %114
br i1 %157, label %158, label %115
158: ; preds = %115, %106
%159 = phi <4 x i32> [ undef, %106 ], [ %153, %115 ]
%160 = phi <4 x i32> [ undef, %106 ], [ %154, %115 ]
%161 = phi i64 [ 0, %106 ], [ %155, %115 ]
%162 = phi <4 x i32> [ zeroinitializer, %106 ], [ %153, %115 ]
%163 = phi <4 x i32> [ zeroinitializer, %106 ], [ %154, %115 ]
%164 = icmp eq i64 %111, 0
br i1 %164, label %181, label %165
165: ; preds = %158, %165
%166 = phi i64 [ %178, %165 ], [ %161, %158 ]
%167 = phi <4 x i32> [ %176, %165 ], [ %162, %158 ]
%168 = phi <4 x i32> [ %177, %165 ], [ %163, %158 ]
%169 = phi i64 [ %179, %165 ], [ 0, %158 ]
%170 = getelementptr inbounds [12 x i32], [12 x i32]* %7, i64 0, i64 %166
%171 = bitcast i32* %170 to <4 x i32>*
%172 = load <4 x i32>, <4 x i32>* %171
%173 = getelementptr inbounds i32, i32* %170, i64 4
%174 = bitcast i32* %173 to <4 x i32>*
%175 = load <4 x i32>, <4 x i32>* %174
%176 = add <4 x i32> %172, %167
%177 = add <4 x i32> %175, %168
%178 = add nuw i64 %166, 8
%179 = add i64 %169, 1
%180 = icmp eq i64 %179, %111
br i1 %180, label %181, label %165
181: ; preds = %165, %158
%182 = phi <4 x i32> [ %159, %158 ], [ %176, %165 ]
%183 = phi <4 x i32> [ %160, %158 ], [ %177, %165 ]
%184 = add <4 x i32> %183, %182
%185 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %184)
%186 = icmp eq i64 %107, %104
br i1 %186, label %209, label %187
187: ; preds = %103, %181
%188 = phi i64 [ 0, %103 ], [ %107, %181 ]
%189 = phi i32 [ 0, %103 ], [ %185, %181 ]
br label %201
190: ; preds = %86, %190
%191 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0))
%192 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %5)
%193 = load i32, i32* %5
%194 = load i32, i32* %6
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds [12 x i32], [12 x i32]* %7, i64 0, i64 %195
%197 = load i32, i32* %196
%198 = icmp sle i32 %193, %197
%199 = icmp sgt i32 %193, 0
%200 = and i1 %199, %198
br i1 %200, label %100, label %190
201: ; preds = %187, %201
%202 = phi i64 [ %207, %201 ], [ %188, %187 ]
%203 = phi i32 [ %206, %201 ], [ %189, %187 ]
%204 = getelementptr inbounds [12 x i32], [12 x i32]* %7, i64 0, i64 %202
%205 = load i32, i32* %204
%206 = add nsw i32 %205, %203
%207 = add nuw nsw i64 %202, 1
%208 = icmp eq i64 %207, %104
br i1 %208, label %209, label %201
209: ; preds = %201, %181, %100
%210 = phi i32 [ 0, %100 ], [ %185, %181 ], [ %206, %201 ]
%211 = load i32, i32* %5
%212 = add nsw i32 %74, -1
%213 = add i32 %212, %210
%214 = add i32 %213, %211
%215 = srem i32 %214, 7
%216 = call i32 @PrintResult(i32 %215, i32 %57)
%217 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%218 = add nuw nsw i64 %55, 1
%219 = icmp eq i64 %218, 9
br i1 %219, label %223, label %54
220: ; preds = %0, %19
%221 = phi i8* [ getelementptr inbounds ([25 x i8], [25 x i8]* @str.17, i64 0, i64 0), %19 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @str.15, i64 0, i64 0), %0 ]
%222 = call i32 @puts(i8* dereferenceable(1) %221)
br label %223
223: ; preds = %54, %209, %30, %220, %28
%224 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0))
ret i32 0
}