#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
int main() {
  const int YEAR = 1900;
  int nYears[10][3], nOperation, nStartYear, nEndYear, nYearDays, nYearEntry, i,
      j, n;
  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;
        switch (nYears[j][2]) {
        case 0:
          printf("\n%d Monday\n", nYears[j][0]);
          break;
        case 1:
          printf("\n%d Tuesday\n", nYears[j][0]);
          break;
        case 2:
          printf("\n%d Wednesday\n", nYears[j][0]);
          break;
        case 3:
          printf("\n%d Thursday\n", nYears[j][0]);
          break;
        case 4:
          printf("\n%d Friday\n", nYears[j][0]);
          break;
        case 5:
          printf("\n%d Saturday\n", nYears[j][0]);
          break;
        case 6:
          printf("\n%d Sunday\n", nYears[j][0]);
          break;
        default:
          printf("\nERROR\n");
        }
      }
    }
  } 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;
        switch (nYears[i][2]) {
        case 0:
          printf("\n%d Monday\n", nYears[i][0]);
          break;
        case 1:
          printf("\n%d Tuesday\n", nYears[i][0]);
          break;
        case 2:
          printf("\n%d Wednesday\n", nYears[i][0]);
          break;
        case 3:
          printf("\n%d Thursday\n", nYears[i][0]);
          break;
        case 4:
          printf("\n%d Friday\n", nYears[i][0]);
          break;
        case 5:
          printf("\n%d Saturday\n", nYears[i][0]);
          break;
        case 6:
          printf("\n%d Sunday\n", nYears[i][0]);
          break;
        default:
          printf("\nERROR\n");
        }
      }
    }
  } else {
    printf("\nInvalid operation\n");
  }
  system("PAUSE");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x76c,-0x8(%rbp)
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf15(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf46(%rip),%rdi
lea    -0x84(%rbp),%rsi
call   1060 <scanf@plt>
cmpl   $0x1,-0x84(%rbp)
jne    1522 <main+0x3e2>
lea    0xf29(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf18(%rip),%rdi
lea    -0x88(%rbp),%rsi
call   1060 <scanf@plt>
lea    0xf27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xef7(%rip),%rdi
lea    -0x8c(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x8c(%rbp),%eax
sub    -0x88(%rbp),%eax
cmp    $0x9,%eax
jle    11ff <main+0xbf>
lea    0xf0e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    151d <main+0x3dd>
movl   $0x0,-0xa0(%rbp)
movl   $0x0,-0x9c(%rbp)
mov    -0x88(%rbp),%eax
mov    %eax,-0x98(%rbp)
mov    -0x98(%rbp),%eax
mov    -0x8c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1518 <main+0x3d8>
mov    -0x98(%rbp),%ecx
movslq -0x9c(%rbp),%rdx
lea    -0x80(%rbp),%rax
imul   $0xc,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
movslq -0x9c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%edi
call   1050 <LeapCheck@plt>
mov    %eax,%ecx
movslq -0x9c(%rbp),%rdx
lea    -0x80(%rbp),%rax
imul   $0xc,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,0x4(%rax)
movslq -0x9c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%eax
sub    $0x76c,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0xa0(%rbp)
movslq -0x9c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
cmpl   $0x1,0x4(%rax)
jne    12d2 <main+0x192>
mov    -0xa0(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xa0(%rbp)
movslq -0x9c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%eax
sub    $0x76c,%eax
mov    %eax,-0xa4(%rbp)
movslq -0x9c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%eax
sub    $0x76c,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    -0xa4(%rbp),%eax
sub    %edx,%eax
add    $0xc8,%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    133f <main+0x1ff>
mov    -0xa0(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xa0(%rbp)
movslq -0x9c(%rbp),%rax
lea    (%rax,%rax,2),%rax
mov    -0x80(%rbp,%rax,4),%esi
mov    -0xa0(%rbp),%edx
mov    %edx,%edi
mov    %esi,%ecx
lea    -0x76c(%rcx,%rdi,1),%ecx
add    %edx,%esi
movslq %ecx,%rcx
imul   $0xffffffff92492493,%rcx,%rcx
shr    $0x20,%rcx
mov    %ecx,%edx
mov    %edx,%ecx
mov    %esi,%edx
lea    -0x76c(%rcx,%rdx,1),%esi
mov    %esi,%ecx
shr    $0x1f,%ecx
sar    $0x2,%esi
add    %ecx,%esi
mov    %esi,%ecx
shl    $0x3,%ecx
sub    %ecx,%esi
mov    %esi,%ecx
lea    -0x76c(%rcx,%rdx,1),%ecx
mov    %ecx,-0x78(%rbp,%rax,4)
movslq -0x9c(%rbp),%rax
lea    (%rax,%rax,2),%rax
mov    -0x78(%rbp,%rax,4),%eax
mov    %rax,-0xb0(%rbp)
sub    $0x6,%rax
ja     14e2 <main+0x3a2>
mov    -0xb0(%rbp),%rax
lea    0xc54(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movslq -0x9c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0xd2f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14f0 <main+0x3b0>
movslq -0x9c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0xd14(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14f0 <main+0x3b0>
movslq -0x9c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0xcfa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14f0 <main+0x3b0>
movslq -0x9c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14f0 <main+0x3b0>
movslq -0x9c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0xcc9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14f0 <main+0x3b0>
movslq -0x9c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0xcae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14f0 <main+0x3b0>
movslq -0x9c(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0xc95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14f0 <main+0x3b0>
lea    0xc8e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14f5 <main+0x3b5>
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c(%rbp)
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    121f <main+0xdf>
jmp    151d <main+0x3dd>
jmp    1880 <main+0x740>
cmpl   $0x2,-0x84(%rbp)
jne    186d <main+0x72d>
lea    0xc49(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x98(%rbp)
movl   $0x0,-0x94(%rbp)
movl   $0x0,-0x98(%rbp)
cmpl   $0x9,-0x98(%rbp)
jge    1868 <main+0x728>
lea    0xb53(%rip),%rdi
lea    -0x94(%rbp),%rsi
call   1060 <scanf@plt>
cmpl   $0xfffffc19,-0x94(%rbp)
fc ff ff
jne    1590 <main+0x450>
jmp    1868 <main+0x728>
mov    -0x94(%rbp),%ecx
movslq -0x98(%rbp),%rdx
lea    -0x80(%rbp),%rax
imul   $0xc,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,(%rax)
movslq -0x98(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%edi
call   1050 <LeapCheck@plt>
mov    %eax,%ecx
movslq -0x98(%rbp),%rdx
lea    -0x80(%rbp),%rax
imul   $0xc,%rdx,%rdx
add    %rdx,%rax
mov    %ecx,0x4(%rax)
movslq -0x98(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%eax
sub    $0x76c,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0xa0(%rbp)
movslq -0x98(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
cmpl   $0x1,0x4(%rax)
jne    162c <main+0x4ec>
mov    -0xa0(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xa0(%rbp)
movslq -0x98(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%eax
sub    $0x76c,%eax
mov    %eax,-0xb4(%rbp)
movslq -0x98(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%eax
sub    $0x76c,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    -0xb4(%rbp),%eax
sub    %edx,%eax
add    $0xc8,%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1699 <main+0x559>
mov    -0xa0(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xa0(%rbp)
movslq -0x98(%rbp),%rax
lea    (%rax,%rax,2),%rax
mov    -0x80(%rbp,%rax,4),%esi
mov    -0xa0(%rbp),%edx
mov    %edx,%edi
mov    %esi,%ecx
lea    -0x76c(%rcx,%rdi,1),%ecx
add    %edx,%esi
movslq %ecx,%rcx
imul   $0xffffffff92492493,%rcx,%rcx
shr    $0x20,%rcx
mov    %ecx,%edx
mov    %edx,%ecx
mov    %esi,%edx
lea    -0x76c(%rcx,%rdx,1),%esi
mov    %esi,%ecx
shr    $0x1f,%ecx
sar    $0x2,%esi
add    %ecx,%esi
mov    %esi,%ecx
shl    $0x3,%ecx
sub    %ecx,%esi
mov    %esi,%ecx
lea    -0x76c(%rcx,%rdx,1),%ecx
mov    %ecx,-0x78(%rbp,%rax,4)
movslq -0x98(%rbp),%rax
lea    (%rax,%rax,2),%rax
mov    -0x78(%rbp,%rax,4),%eax
mov    %rax,-0xc0(%rbp)
sub    $0x6,%rax
ja     183c <main+0x6fc>
mov    -0xc0(%rbp),%rax
lea    0x8de(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movslq -0x98(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0x9d5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    184a <main+0x70a>
movslq -0x98(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0x9ba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    184a <main+0x70a>
movslq -0x98(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0x9a0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    184a <main+0x70a>
movslq -0x98(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0x988(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    184a <main+0x70a>
movslq -0x98(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0x96f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    184a <main+0x70a>
movslq -0x98(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0x954(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    184a <main+0x70a>
movslq -0x98(%rbp),%rcx
lea    -0x80(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%esi
lea    0x93b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    184a <main+0x70a>
lea    0x934(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    184f <main+0x70f>
jmp    1854 <main+0x714>
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    155b <main+0x41b>
jmp    187b <main+0x73b>
lea    0x935(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1880 <main+0x740>
lea    0x936(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xf74(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb2(%rip),%rdi
call   1030 <puts@plt>
lea    0xebb(%rip),%rdi
lea    0x14(%rsp),%rsi
call   1070 <scanf@plt>
mov    0x14(%rsp),%eax
cmp    $0x2,%eax
je     11f9 <main+0xa9>
cmp    $0x1,%eax
jne    135e <main+0x20e>
lea    0xe9b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe8a(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
lea    0xe98(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    0x10(%rsp),%eax
mov    0xc(%rsp),%r14d
mov    %eax,%ecx
sub    %r14d,%ecx
cmp    $0x9,%ecx
jle    1387 <main+0x237>
lea    0xfb0(%rip),%rdi
jmp    1365 <main+0x215>
lea    0xf74(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,0xc(%rsp)
mov    $0x9,%r12d
lea    0xe1e(%rip),%r14
lea    0xc(%rsp),%rbx
lea    0xdda(%rip),%r13
lea    0xe9a(%rip),%rbp
jmp    1254 <main+0x104>
lea    0xe41(%rip),%rdi
cs nopw 0x0(%rax,%rax,1)
mov    %r15d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0xffffffff,%r12d
je     136a <main+0x21a>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1070 <scanf@plt>
mov    0xc(%rsp),%r15d
cmp    $0xfffffc19,%r15d
je     136a <main+0x21a>
mov    %r15d,%edi
call   1060 <LeapCheck@plt>
lea    -0x76c(%r15),%ecx
lea    -0x769(%r15),%edx
test   %ecx,%ecx
cmovns %ecx,%edx
sar    $0x2,%edx
xor    %esi,%esi
cmp    $0x1,%eax
sete   %sil
movslq %ecx,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x5,%eax
add    %ecx,%eax
lea    0x51eb858(,%rax,4),%eax
ror    $0x4,%eax
cmp    $0xa3d70b,%eax
lea    -0x76c(%rdx,%r15,1),%eax
ff
sbb    $0x0,%eax
sub    %esi,%eax
movslq %eax,%rcx
imul   $0xffffffff92492493,%rcx,%rax
shr    $0x20,%rax
add    %ecx,%eax
mov    %eax,%edx
shr    $0x1f,%edx
sar    $0x2,%eax
add    %edx,%eax
lea    0x0(,%rax,8),%edx
sub    %edx,%eax
add    %ecx,%eax
cmp    $0x6,%eax
ja     130e <main+0x1be>
movslq 0x0(%r13,%rax,4),%rax
add    %r13,%rax
jmp    *%rax
lea    0xd7a(%rip),%rdi
jmp    1240 <main+0xf0>
lea    0xe88(%rip),%rdi
call   1030 <puts@plt>
add    $0xffffffff,%r12d
jne    1254 <main+0x104>
jmp    136a <main+0x21a>
lea    0xd63(%rip),%rdi
jmp    1240 <main+0xf0>
lea    0xd66(%rip),%rdi
jmp    1240 <main+0xf0>
lea    0xd68(%rip),%rdi
jmp    1240 <main+0xf0>
lea    0xd68(%rip),%rdi
jmp    1240 <main+0xf0>
mov    %rbp,%rdi
jmp    1240 <main+0xf0>
lea    0xdfc(%rip),%rdi
call   1030 <puts@plt>
lea    0xd62(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmp    %r14d,%eax
jl     136a <main+0x21a>
add    $0xfffff894,%r14d
lea    0xc82(%rip),%r15
lea    0xcef(%rip),%r13
lea    0xcf7(%rip),%rbx
lea    0xcfe(%rip),%rbp
jmp    13d5 <main+0x285>
mov    %rbp,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r14d
cmp    0x10(%rsp),%r12d
jge    136a <main+0x21a>
lea    0x76c(%r14),%r12d
mov    %r12d,%edi
call   1060 <LeapCheck@plt>
lea    0x3(%r14),%ecx
test   %r14d,%r14d
cmovns %r14d,%ecx
sar    $0x2,%ecx
xor    %edx,%edx
cmp    $0x1,%eax
sete   %dl
movslq %r14d,%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
sbb    $0x0,%ecx
sub    %edx,%ecx
add    %r14d,%ecx
movslq %ecx,%rcx
imul   $0xffffffff92492493,%rcx,%rax
shr    $0x20,%rax
add    %ecx,%eax
mov    %eax,%edx
shr    $0x1f,%edx
sar    $0x2,%eax
add    %edx,%eax
lea    0x0(,%rax,8),%edx
sub    %edx,%eax
add    %ecx,%eax
cmp    $0x6,%eax
ja     147a <main+0x32a>
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
lea    0xc12(%rip),%rdi
jmp    13c0 <main+0x270>
mov    %r13,%rdi
jmp    13c0 <main+0x270>
mov    %rbx,%rdi
jmp    13c0 <main+0x270>
lea    0xd1c(%rip),%rdi
call   1030 <puts@plt>
jmp    13ca <main+0x27a>
lea    0xbf1(%rip),%rdi
jmp    13c0 <main+0x270>
lea    0xc1b(%rip),%rdi
jmp    13c0 <main+0x270>
lea    0xc1d(%rip),%rdi
jmp    13c0 <main+0x270>

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

LLVM IR (-O2):
@.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.6 = [12 x i8] c"\0A%d Monday\0A\00"
@.str.7 = [13 x i8] c"\0A%d Tuesday\0A\00"
@.str.8 = [15 x i8] c"\0A%d Wednesday\0A\00"
@.str.9 = [14 x i8] c"\0A%d Thursday\0A\00"
@.str.10 = [12 x i8] c"\0A%d Friday\0A\00"
@.str.11 = [14 x i8] c"\0A%d Saturday\0A\00"
@.str.12 = [12 x i8] c"\0A%d Sunday\0A\00"
@.str.16 = [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.17 = [62 x i8] c"Would you like to enter 1) A range or 2) Set of years?\00"
@str.18 = [19 x i8] c"\0AInvalid operation\00"
@str.19 = [41 x i8] c"\0AEnter -999 to end entry. 10 Entries Max\00"
@str.21 = [7 x i8] c"\0AERROR\00"
@str.22 = [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 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.17, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%12 = load i32, i32* %1
switch i32 %12, label %103 [
i32 1, label %13
i32 2, label %61
]
13: ; preds = %0
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%18 = load i32, i32* %3
%19 = load i32, i32* %2
%20 = sub nsw i32 %18, %19
%21 = icmp sgt i32 %20, 9
br i1 %21, label %103, label %22
22: ; preds = %13
%23 = icmp slt i32 %18, %19
br i1 %23, label %106, label %24
24: ; preds = %22, %57
%25 = phi i32 [ %58, %57 ], [ %19, %22 ]
%26 = call i32 @LeapCheck(i32 %25)
%27 = add nsw i32 %25, -1900
%28 = sdiv i32 %27, 4
%29 = icmp eq i32 %26, 1
%30 = sext i1 %29 to i32
%31 = srem i32 %27, 100
%32 = add i32 %25, -1700
%33 = sub i32 %32, %31
%34 = srem i32 %33, 400
%35 = icmp eq i32 %34, 0
%36 = sext i1 %35 to i32
%37 = add i32 %28, %27
%38 = add i32 %37, %36
%39 = add i32 %38, %30
%40 = srem i32 %39, 7
switch i32 %40, label %55 [
i32 0, label %41
i32 1, label %43
i32 2, label %45
i32 3, label %47
i32 4, label %49
i32 5, label %51
i32 6, label %53
]
41: ; preds = %24
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %25)
br label %57
43: ; preds = %24
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 %25)
br label %57
45: ; preds = %24
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i32 %25)
br label %57
47: ; preds = %24
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i32 %25)
br label %57
49: ; preds = %24
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i32 %25)
br label %57
51: ; preds = %24
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %25)
br label %57
53: ; preds = %24
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 %25)
br label %57
55: ; preds = %24
%56 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.21, i64 0, i64 0))
br label %57
57: ; preds = %41, %43, %45, %47, %49, %51, %53, %55
%58 = add nsw i32 %25, 1
%59 = load i32, i32* %3
%60 = icmp slt i32 %25, %59
br i1 %60, label %24, label %106
61: ; preds = %0
%62 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.19, i64 0, i64 0))
store i32 0, i32* %4
br label %63
63: ; preds = %61, %100
%64 = phi i32 [ 0, %61 ], [ %101, %100 ]
%65 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%66 = load i32, i32* %4
%67 = icmp eq i32 %66, -999
br i1 %67, label %106, label %68
68: ; preds = %63
%69 = call i32 @LeapCheck(i32 %66)
%70 = add nsw i32 %66, -1900
%71 = sdiv i32 %70, 4
%72 = icmp eq i32 %69, 1
%73 = sext i1 %72 to i32
%74 = srem i32 %70, 100
%75 = add i32 %66, -1700
%76 = sub i32 %75, %74
%77 = srem i32 %76, 400
%78 = icmp eq i32 %77, 0
%79 = sext i1 %78 to i32
%80 = add i32 %71, %70
%81 = add i32 %80, %79
%82 = add i32 %81, %73
%83 = srem i32 %82, 7
switch i32 %83, label %98 [
i32 0, label %84
i32 1, label %86
i32 2, label %88
i32 3, label %90
i32 4, label %92
i32 5, label %94
i32 6, label %96
]
84: ; preds = %68
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %66)
br label %100
86: ; preds = %68
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 %66)
br label %100
88: ; preds = %68
%89 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i32 %66)
br label %100
90: ; preds = %68
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i32 %66)
br label %100
92: ; preds = %68
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i32 %66)
br label %100
94: ; preds = %68
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %66)
br label %100
96: ; preds = %68
%97 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i32 %66)
br label %100
98: ; preds = %68
%99 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.21, i64 0, i64 0))
br label %100
100: ; preds = %98, %96, %94, %92, %90, %88, %86, %84
%101 = add nuw nsw i32 %64, 1
%102 = icmp eq i32 %101, 9
br i1 %102, label %106, label %63
103: ; preds = %0, %13
%104 = phi i8* [ getelementptr inbounds ([25 x i8], [25 x i8]* @str.22, i64 0, i64 0), %13 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @str.18, i64 0, i64 0), %0 ]
%105 = call i32 @puts(i8* dereferenceable(1) %104)
br label %106
106: ; preds = %63, %100, %57, %103, %22
%107 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0))
ret i32 0
}