#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 /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int i;
  int j;
  int feb;
  int janStart;
  int numberOfDays;
  int row;
  int monthCol;
  int year;
  do {
    printf("What year is it?\n");
    scanf("%d", &year);
  } while (year < 0);
  if (year % 4 == 1) {
    feb = 29;
  } else {
    feb = 28;
  }
  do {
    printf("What day does January start with? Please enter a value of 1 to 7, "
           "on a week going from 1 for Sunday, and 7 for Saturday\n");
    scanf("%d", &janStart);
  } while (janStart < 1 || janStart > 7);
  janStart = janStart - 1;
  int febStart = (janStart + 31) % 7;
  int marStart = (febStart + feb) % 7;
  int aprStart = (marStart + 31) % 7;
  int mayStart = (aprStart + 30) % 7;
  int junStart = (mayStart + 31) % 7;
  int julStart = (junStart + 30) % 7;
  int augStart = (julStart + 31) % 7;
  int sepStart = (augStart + 31) % 7;
  int octStart = (sepStart + 30) % 7;
  int novStart = (octStart + 31) % 7;
  int decStart = (novStart + 30) % 7;
  printf("January \t\t\t\t\t\t\t February \t\t\t\t\t\t\t March \t \n");
  printf("Sun \t Mon \t Tue \t Wed \t Thu \t Fri \t Sat \t\t Sun \t Mon \t Tue "
         "\t Wed \t Thu \t Fri \t Sat \t\t Sun \t Mon \t Tue \t Wed \t Thu \t "
         "Fri \t Sat\n");
  for (row = 0; row < 6; row++) {
    for (monthCol = 0; monthCol < 23; monthCol++) {
      if (monthCol / 7 == 0) {
        int i = monthCol % 7 + 7 * row - janStart + 1;
        if (i < 1 || i > 31) {
          printf("\t");
        } else {
          printf("%d \t", i);
        }
      }
      if (monthCol / 7 == 1) {
        int i = monthCol % 7 + 7 * row - febStart + 1;
        if (i < 1 || i > feb) {
          printf("\t");
        } else {
          printf("%d \t", i);
        }
      }
      if (monthCol / 7 == 2) {
        int i = monthCol % 7 + 7 * row - marStart + 1;
        if (i < 1 || i > 31) {
          printf("\t");
        } else {
          printf("%d \t", i);
        }
      }
      if ((monthCol + 1) % 7 == 0 && monthCol > 0) {
        printf("\t");
      }
    }
    printf("\n");
  }
  printf("April \t\t\t\t\t\t\t\t May \t\t\t\t\t\t\t\t June \t \n");
  printf("Sun \t Mon \t Tue \t Wed \t Thu \t Fri \t Sat \t\t Sun \t Mon \t Tue "
         "\t Wed \t Thu \t Fri \t Sat \t\t Sun \t Mon \t Tue \t Wed \t Thu \t "
         "Fri \t Sat\n");
  for (row = 0; row < 6; row++) {
    for (monthCol = 0; monthCol < 23; monthCol++) {
      if (monthCol / 7 == 0) {
        int i = monthCol % 7 + 7 * row - aprStart + 1;
        if (i < 1 || i > 30) {
          printf("\t");
        } else {
          printf("%d \t", i);
        }
      }
      if (monthCol / 7 == 1) {
        int i = monthCol % 7 + 7 * row - mayStart + 1;
        if (i < 1 || i > 31) {
          printf("\t");
        } else {
          printf("%d \t", i);
        }
      }
      if (monthCol / 7 == 2) {
        int i = monthCol % 7 + 7 * row - junStart + 1;
        if (i < 1 || i > 30) {
          printf("\t");
        } else {
          printf("%d \t", i);
        }
      }
      if ((monthCol + 1) % 7 == 0 && monthCol > 0) {
        printf("\t");
      }
    }
    printf("\n");
  }
  printf("July \t\t\t\t\t\t\t\t August \t\t\t\t\t\t\t September \t \n");
  printf("Sun \t Mon \t Tue \t Wed \t Thu \t Fri \t Sat \t\t Sun \t Mon \t Tue "
         "\t Wed \t Thu \t Fri \t Sat \t\t Sun \t Mon \t Tue \t Wed \t Thu \t "
         "Fri \t Sat\n");
  for (row = 0; row < 6; row++) {
    for (monthCol = 0; monthCol < 23; monthCol++) {
      if (monthCol / 7 == 0) {
        int i = monthCol % 7 + 7 * row - julStart + 1;
        if (i < 1 || i > 31) {
          printf("\t");
        } else {
          printf("%d \t", i);
        }
      }
      if (monthCol / 7 == 1) {
        int i = monthCol % 7 + 7 * row - augStart + 1;
        if (i < 1 || i > 31) {
          printf("\t");
        } else {
          printf("%d \t", i);
        }
      }
      if (monthCol / 7 == 2) {
        int i = monthCol % 7 + 7 * row - sepStart + 1;
        if (i < 1 || i > 30) {
          printf("\t");
        } else {
          printf("%d \t", i);
        }
      }
      if ((monthCol + 1) % 7 == 0 && monthCol > 0) {
        printf("\t");
      }
    }
    printf("\n");
  }
  printf("October \t\t\t\t\t\t\t November \t\t\t\t\t\t\t December \t \n");
  printf("Sun \t Mon \t Tue \t Wed \t Thu \t Fri \t Sat \t\t Sun \t Mon \t Tue "
         "\t Wed \t Thu \t Fri \t Sat \t\t Sun \t Mon \t Tue \t Wed \t Thu \t "
         "Fri \t Sat\n");
  for (row = 0; row < 6; row++) {
    for (monthCol = 0; monthCol < 23; monthCol++) {
      if (monthCol / 7 == 0) {
        int i = monthCol % 7 + 7 * row - octStart + 1;
        if (i < 1 || i > 30) {
          printf("\t");
        } else {
          printf("%d \t", i);
        }
      }
      if (monthCol / 7 == 1) {
        int i = monthCol % 7 + 7 * row - novStart + 1;
        if (i < 1 || i > 31) {
          printf("\t");
        } else {
          printf("%d \t", i);
        }
      }
      if (monthCol / 7 == 2) {
        int i = monthCol % 7 + 7 * row - decStart + 1;
        if (i < 1 || i > 30) {
          printf("\t");
        } else {
          printf("%d \t", i);
        }
      }
      if ((monthCol + 1) % 7 == 0 && monthCol > 0) {
        printf("\t");
      }
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    -0x24(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x24(%rbp)
jl     1132 <main+0x12>
mov    -0x24(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    117a <main+0x5a>
movl   $0x1d,-0x10(%rbp)
jmp    1181 <main+0x61>
movl   $0x1c,-0x10(%rbp)
jmp    1186 <main+0x66>
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe77(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0x1,-0x14(%rbp)
mov    %al,-0x81(%rbp)
jl     11c3 <main+0xa3>
cmpl   $0x7,-0x14(%rbp)
setg   %al
mov    %al,-0x81(%rbp)
mov    -0x81(%rbp),%al
test   $0x1,%al
jne    1186 <main+0x66>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1f,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x28(%rbp)
mov    -0x28(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1f,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x30(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1e,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x34(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1f,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x38(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1e,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1f,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x40(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1f,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x44(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1e,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x48(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1f,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1e,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x50(%rbp)
lea    0xdf2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe0f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x6,-0x1c(%rbp)
jge    147a <main+0x35a>
movl   $0x0,-0x20(%rbp)
cmpl   $0x17,-0x20(%rbp)
jge    145e <main+0x33e>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
jne    1340 <main+0x220>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
imul   $0x7,-0x1c(%rbp),%ecx
add    %ecx,%eax
sub    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
cmpl   $0x1,-0x54(%rbp)
jl     1317 <main+0x1f7>
cmpl   $0x1f,-0x54(%rbp)
jle    132a <main+0x20a>
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    133b <main+0x21b>
mov    -0x54(%rbp),%esi
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1340 <main+0x220>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x1,%eax
jne    13af <main+0x28f>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
imul   $0x7,-0x1c(%rbp),%ecx
add    %ecx,%eax
sub    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
cmpl   $0x1,-0x58(%rbp)
jl     1386 <main+0x266>
mov    -0x58(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1399 <main+0x279>
lea    0xdae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13aa <main+0x28a>
mov    -0x58(%rbp),%esi
lea    0xd95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13af <main+0x28f>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x2,%eax
jne    141c <main+0x2fc>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
imul   $0x7,-0x1c(%rbp),%ecx
add    %ecx,%eax
sub    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
cmpl   $0x1,-0x5c(%rbp)
jl     13f3 <main+0x2d3>
cmpl   $0x1f,-0x5c(%rbp)
jle    1406 <main+0x2e6>
lea    0xd41(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1417 <main+0x2f7>
mov    -0x5c(%rbp),%esi
lea    0xd28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    141c <main+0x2fc>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    144b <main+0x32b>
cmpl   $0x0,-0x20(%rbp)
jle    144b <main+0x32b>
lea    0xcf7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1450 <main+0x330>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    12c9 <main+0x1a9>
lea    0xcfb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12b8 <main+0x198>
lea    0xcbc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x6,-0x1c(%rbp)
jge    165d <main+0x53d>
movl   $0x0,-0x20(%rbp)
cmpl   $0x17,-0x20(%rbp)
jge    1641 <main+0x521>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
jne    1525 <main+0x405>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
imul   $0x7,-0x1c(%rbp),%ecx
add    %ecx,%eax
sub    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
cmpl   $0x1,-0x60(%rbp)
jl     14fc <main+0x3dc>
cmpl   $0x1e,-0x60(%rbp)
jle    150f <main+0x3ef>
lea    0xc38(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1520 <main+0x400>
mov    -0x60(%rbp),%esi
lea    0xc1f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1525 <main+0x405>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x1,%eax
jne    1592 <main+0x472>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
imul   $0x7,-0x1c(%rbp),%ecx
add    %ecx,%eax
sub    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
cmpl   $0x1,-0x64(%rbp)
jl     1569 <main+0x449>
cmpl   $0x1f,-0x64(%rbp)
jle    157c <main+0x45c>
lea    0xbcb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    158d <main+0x46d>
mov    -0x64(%rbp),%esi
lea    0xbb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1592 <main+0x472>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x2,%eax
jne    15ff <main+0x4df>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
imul   $0x7,-0x1c(%rbp),%ecx
add    %ecx,%eax
sub    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
cmpl   $0x1,-0x68(%rbp)
jl     15d6 <main+0x4b6>
cmpl   $0x1e,-0x68(%rbp)
jle    15e9 <main+0x4c9>
lea    0xb5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    15fa <main+0x4da>
mov    -0x68(%rbp),%esi
lea    0xb45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    15ff <main+0x4df>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    162e <main+0x50e>
cmpl   $0x0,-0x20(%rbp)
jle    162e <main+0x50e>
lea    0xb14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1633 <main+0x513>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    14ae <main+0x38e>
lea    0xb18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    149d <main+0x37d>
lea    0xafe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xa47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x6,-0x1c(%rbp)
jge    1840 <main+0x720>
movl   $0x0,-0x20(%rbp)
cmpl   $0x17,-0x20(%rbp)
jge    1824 <main+0x704>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
jne    1708 <main+0x5e8>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
imul   $0x7,-0x1c(%rbp),%ecx
add    %ecx,%eax
sub    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
cmpl   $0x1,-0x6c(%rbp)
jl     16df <main+0x5bf>
cmpl   $0x1f,-0x6c(%rbp)
jle    16f2 <main+0x5d2>
lea    0xa55(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1703 <main+0x5e3>
mov    -0x6c(%rbp),%esi
lea    0xa3c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1708 <main+0x5e8>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x1,%eax
jne    1775 <main+0x655>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
imul   $0x7,-0x1c(%rbp),%ecx
add    %ecx,%eax
sub    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
cmpl   $0x1,-0x70(%rbp)
jl     174c <main+0x62c>
cmpl   $0x1f,-0x70(%rbp)
jle    175f <main+0x63f>
lea    0x9e8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1770 <main+0x650>
mov    -0x70(%rbp),%esi
lea    0x9cf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1775 <main+0x655>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x2,%eax
jne    17e2 <main+0x6c2>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
imul   $0x7,-0x1c(%rbp),%ecx
add    %ecx,%eax
sub    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
cmpl   $0x1,-0x74(%rbp)
jl     17b9 <main+0x699>
cmpl   $0x1e,-0x74(%rbp)
jle    17cc <main+0x6ac>
lea    0x97b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    17dd <main+0x6bd>
mov    -0x74(%rbp),%esi
lea    0x962(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    17e2 <main+0x6c2>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1811 <main+0x6f1>
cmpl   $0x0,-0x20(%rbp)
jle    1811 <main+0x6f1>
lea    0x931(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1816 <main+0x6f6>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1691 <main+0x571>
lea    0x935(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1680 <main+0x560>
lea    0x946(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x864(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x6,-0x1c(%rbp)
jge    1a23 <main+0x903>
movl   $0x0,-0x20(%rbp)
cmpl   $0x17,-0x20(%rbp)
jge    1a07 <main+0x8e7>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
jne    18eb <main+0x7cb>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
imul   $0x7,-0x1c(%rbp),%ecx
add    %ecx,%eax
sub    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
cmpl   $0x1,-0x78(%rbp)
jl     18c2 <main+0x7a2>
cmpl   $0x1e,-0x78(%rbp)
jle    18d5 <main+0x7b5>
lea    0x872(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    18e6 <main+0x7c6>
mov    -0x78(%rbp),%esi
lea    0x859(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    18eb <main+0x7cb>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x1,%eax
jne    1958 <main+0x838>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
imul   $0x7,-0x1c(%rbp),%ecx
add    %ecx,%eax
sub    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
cmpl   $0x1,-0x7c(%rbp)
jl     192f <main+0x80f>
cmpl   $0x1f,-0x7c(%rbp)
jle    1942 <main+0x822>
lea    0x805(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1953 <main+0x833>
mov    -0x7c(%rbp),%esi
lea    0x7ec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1958 <main+0x838>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x2,%eax
jne    19c5 <main+0x8a5>
mov    -0x20(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
imul   $0x7,-0x1c(%rbp),%ecx
add    %ecx,%eax
sub    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
cmpl   $0x1,-0x80(%rbp)
jl     199c <main+0x87c>
cmpl   $0x1e,-0x80(%rbp)
jle    19af <main+0x88f>
lea    0x798(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    19c0 <main+0x8a0>
mov    -0x80(%rbp),%esi
lea    0x77f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    19c5 <main+0x8a5>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    19f4 <main+0x8d4>
cmpl   $0x0,-0x20(%rbp)
jle    19f4 <main+0x8d4>
lea    0x74e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    19f9 <main+0x8d9>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1874 <main+0x754>
lea    0x752(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1863 <main+0x743>
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
lea    0xeb3(%rip),%r14
lea    0xea4(%rip),%r15
lea    0x34(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    0x34(%rsp),%ebp
test   %ebp,%ebp
js     1170 <main+0x30>
and    $0x3,%ebp
lea    0xe84(%rip),%r14
lea    0xe64(%rip),%r15
lea    0x1c(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    0x1c(%rsp),%eax
lea    -0x8(%rax),%ecx
cmp    $0xfffffff9,%ecx
jb     11b0 <main+0x70>
xor    %esi,%esi
cmp    $0x1,%ebp
sete   %sil
or     $0x1c,%esi
lea    -0x1(%rax),%ecx
mov    %ecx,0x1c(%rsp)
add    $0x1e,%al
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,%r13d
mov    %rsi,0x10(%rsp)
lea    (%rsi,%r13,1),%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,%ebx
lea    0x1f(%rbx),%eax
movzbl %al,%edx
lea    (%rdx,%rdx,8),%eax
lea    (%rdx,%rax,4),%eax
shr    $0x8,%eax
mov    %edx,%ecx
sub    %al,%cl
shr    %cl
add    %al,%cl
shr    $0x2,%cl
movzbl %cl,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
sub    %cl,%dl
mov    %rdx,0x8(%rsp)
lea    0x1e(%rdx),%eax
movzbl %al,%edx
lea    (%rdx,%rdx,8),%eax
lea    (%rdx,%rax,4),%eax
shr    $0x8,%eax
mov    %edx,%ecx
sub    %al,%cl
shr    %cl
add    %al,%cl
shr    $0x2,%cl
movzbl %cl,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
sub    %cl,%dl
mov    %rdx,0x20(%rsp)
lea    0x1f(%rdx),%eax
movzbl %al,%edx
lea    (%rdx,%rdx,8),%eax
lea    (%rdx,%rax,4),%eax
shr    $0x8,%eax
mov    %edx,%ecx
sub    %al,%cl
shr    %cl
add    %al,%cl
shr    $0x2,%cl
movzbl %cl,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
sub    %cl,%dl
mov    %rdx,0x50(%rsp)
lea    0x1e(%rdx),%eax
movzbl %al,%edx
lea    (%rdx,%rdx,8),%eax
lea    (%rdx,%rax,4),%eax
shr    $0x8,%eax
mov    %edx,%ecx
sub    %al,%cl
shr    %cl
add    %al,%cl
shr    $0x2,%cl
movzbl %cl,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
sub    %cl,%dl
mov    %rdx,0x48(%rsp)
lea    0x1f(%rdx),%eax
movzbl %al,%edx
lea    (%rdx,%rdx,8),%eax
lea    (%rdx,%rax,4),%eax
shr    $0x8,%eax
mov    %edx,%ecx
sub    %al,%cl
shr    %cl
add    %al,%cl
shr    $0x2,%cl
movzbl %cl,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
sub    %cl,%dl
mov    %rdx,0x60(%rsp)
lea    0x1f(%rdx),%eax
movzbl %al,%edx
lea    (%rdx,%rdx,8),%eax
lea    (%rdx,%rax,4),%eax
shr    $0x8,%eax
mov    %edx,%ecx
sub    %al,%cl
shr    %cl
add    %al,%cl
shr    $0x2,%cl
movzbl %cl,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
sub    %cl,%dl
mov    %rdx,0x40(%rsp)
lea    0x1e(%rdx),%eax
movzbl %al,%edx
lea    (%rdx,%rdx,8),%eax
lea    (%rdx,%rax,4),%eax
shr    $0x8,%eax
mov    %edx,%ecx
sub    %al,%cl
shr    %cl
add    %al,%cl
shr    $0x2,%cl
movzbl %cl,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
sub    %cl,%dl
mov    %rdx,0x58(%rsp)
lea    0x1f(%rdx),%eax
movzbl %al,%edx
lea    (%rdx,%rdx,8),%eax
lea    (%rdx,%rax,4),%eax
shr    $0x8,%eax
mov    %edx,%ecx
sub    %al,%cl
shr    %cl
add    %al,%cl
shr    $0x2,%cl
movzbl %cl,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
sub    %cl,%dl
mov    %rdx,0x38(%rsp)
lea    0x1e(%rdx),%eax
movzbl %al,%edx
lea    (%rdx,%rdx,8),%eax
lea    (%rdx,%rax,4),%eax
shr    $0x8,%eax
mov    %edx,%ecx
sub    %al,%cl
shr    %cl
add    %al,%cl
shr    $0x2,%cl
movzbl %cl,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
sub    %cl,%dl
mov    %rdx,0x28(%rsp)
lea    0xcb7(%rip),%rdi
call   1040 <puts@plt>
lea    0xd50(%rip),%rdi
call   1040 <puts@plt>
neg    %r13d
neg    %ebx
xor    %ebp,%ebp
xor    %eax,%eax
jmp    1424 <main+0x2e4>
cs nopw 0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%eax
add    $0x1,%eax
add    $0x7,%ebp
add    $0x7,%r13d
add    $0x7,%ebx
cmp    $0x6,%eax
je     1535 <main+0x3f5>
mov    %eax,0x4(%rsp)
mov    $0x1,%r15b
xor    %r12d,%r12d
jmp    143a <main+0x2fa>
add    $0x1,%r15b
cmp    $0x17,%r12d
je     1400 <main+0x2c0>
mov    %r12d,%r14d
mov    %r12d,%eax
imul   $0x24924925,%rax,%rax
shr    $0x20,%rax
mov    %r12d,%ecx
sub    %eax,%ecx
shr    %ecx
add    %eax,%ecx
shr    $0x2,%ecx
lea    0x0(,%rcx,8),%eax
sub    %ecx,%eax
cmp    $0x6,%r12d
ja     1490 <main+0x350>
mov    %ebp,%ecx
sub    %eax,%ecx
mov    %r14d,%eax
sub    0x1c(%rsp),%eax
lea    (%rax,%rcx,1),%edx
cmp    $0x1f,%edx
jb     14b0 <main+0x370>
mov    $0x9,%edi
call   1030 <putchar@plt>
jmp    14eb <main+0x3ab>
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0x7(%r14),%ecx
cmp    $0x6,%ecx
ja     14c0 <main+0x380>
mov    %r13d,%ecx
sub    %eax,%ecx
mov    %r14d,%eax
add    %ecx,%eax
js     1479 <main+0x339>
cmp    0x10(%rsp),%eax
jl     14d6 <main+0x396>
jmp    1479 <main+0x339>
nopl   (%rax)
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
jmp    14dd <main+0x39d>
nopl   0x0(%rax,%rax,1)
lea    -0xe(%r14),%ecx
cmp    $0x6,%ecx
ja     14eb <main+0x3ab>
mov    %ebx,%ecx
sub    %eax,%ecx
lea    (%r14,%rcx,1),%eax
cmp    $0x1f,%eax
jae    1479 <main+0x339>
lea    (%r14,%rcx,1),%esi
add    $0x1,%esi
lea    0xb1f(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1(%r14),%r12d
test   %r14d,%r14d
je     1430 <main+0x2f0>
movzbl %r15b,%eax
lea    (%rax,%rax,8),%ecx
lea    (%rax,%rcx,4),%ecx
shr    $0x8,%ecx
sub    %cl,%al
shr    %al
add    %cl,%al
shr    $0x2,%al
movzbl %al,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
add    $0xff,%cl
cmp    %r14b,%cl
jne    1430 <main+0x2f0>
mov    $0x9,%edi
call   1030 <putchar@plt>
jmp    1430 <main+0x2f0>
movzbl 0x8(%rsp),%r12d
movzbl 0x20(%rsp),%r13d
movzbl 0x50(%rsp),%ebx
movzbl 0x48(%rsp),%r14d
movzbl 0x40(%rsp),%eax
mov    %eax,0x10(%rsp)
movzbl 0x38(%rsp),%eax
mov    %rax,0x20(%rsp)
lea    0xb55(%rip),%rdi
call   1040 <puts@plt>
lea    0xbc4(%rip),%rdi
call   1040 <puts@plt>
neg    %r12d
neg    %r13d
neg    %ebx
mov    %ebx,0x4(%rsp)
xor    %eax,%eax
jmp    15b7 <main+0x477>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x8(%rsp),%eax
add    $0x1,%eax
add    $0x7,%r12d
add    $0x7,%r13d
addl   $0x7,0x4(%rsp)
cmp    $0x6,%eax
je     16a8 <main+0x568>
mov    %eax,0x8(%rsp)
mov    $0x1,%bl
xor    %r15d,%r15d
jmp    15d9 <main+0x499>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%bl
cmp    $0x17,%r15d
je     1590 <main+0x450>
mov    %r15d,%ebp
mov    %r15d,%eax
imul   $0x24924925,%rax,%rax
shr    $0x20,%rax
mov    %r15d,%ecx
sub    %eax,%ecx
shr    %ecx
add    %eax,%ecx
shr    $0x2,%ecx
lea    0x0(,%rcx,8),%eax
sub    %ecx,%eax
cmp    $0x6,%r15d
ja     1620 <main+0x4e0>
mov    %r12d,%ecx
sub    %eax,%ecx
lea    (%rcx,%rbp,1),%eax
cmp    $0x1e,%eax
jb     1635 <main+0x4f5>
mov    $0x9,%edi
call   1030 <putchar@plt>
jmp    1660 <main+0x520>
xchg   %ax,%ax
lea    -0x7(%rbp),%ecx
cmp    $0x6,%ecx
ja     1650 <main+0x510>
mov    %r13d,%ecx
sub    %eax,%ecx
lea    (%rcx,%rbp,1),%eax
cmp    $0x1f,%eax
jae    1612 <main+0x4d2>
lea    (%rcx,%rbp,1),%esi
add    $0x1,%esi
lea    0x9c1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1660 <main+0x520>
nopl   0x0(%rax,%rax,1)
lea    -0xe(%rbp),%ecx
cmp    $0x6,%ecx
ja     1660 <main+0x520>
mov    0x4(%rsp),%ecx
jmp    1608 <main+0x4c8>
xchg   %ax,%ax
lea    0x1(%rbp),%r15d
test   %ebp,%ebp
je     15d0 <main+0x490>
movzbl %bl,%eax
lea    (%rax,%rax,8),%ecx
lea    (%rax,%rcx,4),%ecx
shr    $0x8,%ecx
sub    %cl,%al
shr    %al
add    %cl,%al
shr    $0x2,%al
movzbl %al,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
add    $0xff,%cl
cmp    %bpl,%cl
jne    15d0 <main+0x490>
mov    $0x9,%edi
call   1030 <putchar@plt>
jmp    15d0 <main+0x490>
movzbl 0x60(%rsp),%r13d
movzbl 0x58(%rsp),%eax
mov    %rax,0x8(%rsp)
lea    0xa20(%rip),%rdi
call   1040 <puts@plt>
lea    0xa6b(%rip),%rdi
call   1040 <puts@plt>
neg    %r14d
neg    %r13d
negl   0x10(%rsp)
xor    %r12d,%r12d
jmp    1705 <main+0x5c5>
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r12d
add    $0x7,%r14d
add    $0x7,%r13d
addl   $0x7,0x10(%rsp)
cmp    $0x6,%r12d
je     17fc <main+0x6bc>
mov    $0x1,%bl
xor    %r15d,%r15d
jmp    1719 <main+0x5d9>
nopl   0x0(%rax)
add    $0x1,%bl
cmp    $0x17,%r15d
je     16e0 <main+0x5a0>
mov    %r15d,%ebp
mov    %r15d,%eax
imul   $0x24924925,%rax,%rax
shr    $0x20,%rax
mov    %r15d,%ecx
sub    %eax,%ecx
shr    %ecx
add    %eax,%ecx
shr    $0x2,%ecx
lea    0x0(,%rcx,8),%eax
sub    %ecx,%eax
cmp    $0x6,%r15d
ja     1750 <main+0x610>
mov    %r14d,%ecx
jmp    175b <main+0x61b>
nopw   0x0(%rax,%rax,1)
lea    -0x7(%rbp),%ecx
cmp    $0x6,%ecx
ja     1780 <main+0x640>
mov    %r13d,%ecx
sub    %eax,%ecx
lea    (%rcx,%rbp,1),%eax
cmp    $0x1f,%eax
jb     17a0 <main+0x660>
mov    $0x9,%edi
call   1030 <putchar@plt>
jmp    17b4 <main+0x674>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0xe(%rbp),%ecx
cmp    $0x6,%ecx
ja     17b4 <main+0x674>
mov    0x10(%rsp),%ecx
sub    %eax,%ecx
lea    (%rcx,%rbp,1),%eax
cmp    $0x1e,%eax
jae    1765 <main+0x625>
cs nopw 0x0(%rax,%rax,1)
lea    (%rcx,%rbp,1),%esi
add    $0x1,%esi
lea    0x856(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1(%rbp),%r15d
test   %ebp,%ebp
je     1710 <main+0x5d0>
movzbl %bl,%eax
lea    (%rax,%rax,8),%ecx
lea    (%rax,%rcx,4),%ecx
shr    $0x8,%ecx
sub    %cl,%al
shr    %al
add    %cl,%al
shr    $0x2,%al
movzbl %al,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
add    $0xff,%cl
cmp    %bpl,%cl
jne    1710 <main+0x5d0>
mov    $0x9,%edi
call   1030 <putchar@plt>
jmp    1710 <main+0x5d0>
movzbl 0x28(%rsp),%ebx
lea    0x901(%rip),%rdi
call   1040 <puts@plt>
lea    0x922(%rip),%rdi
call   1040 <puts@plt>
mov    0x8(%rsp),%rax
neg    %eax
mov    %rax,0x8(%rsp)
mov    0x20(%rsp),%rax
neg    %eax
mov    %rax,0x20(%rsp)
neg    %ebx
mov    %rbx,0x28(%rsp)
xor    %ebp,%ebp
xor    %eax,%eax
jmp    185d <main+0x71d>
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x4(%rsp),%eax
add    $0x1,%eax
add    $0x7,%ebp
cmp    $0x6,%eax
je     196a <main+0x82a>
mov    %eax,0x4(%rsp)
mov    0x8(%rsp),%rax
lea    (%rax,%rbp,1),%ebx
mov    0x20(%rsp),%rax
lea    (%rax,%rbp,1),%r12d
mov    0x28(%rsp),%rax
add    %ebp,%eax
mov    %eax,0x10(%rsp)
mov    $0x1,%r14b
xor    %r13d,%r13d
jmp    189a <main+0x75a>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r14b
cmp    $0x17,%r13d
je     1840 <main+0x700>
mov    %r13d,%r15d
mov    %r13d,%eax
imul   $0x24924925,%rax,%rax
shr    $0x20,%rax
mov    %r13d,%ecx
sub    %eax,%ecx
shr    %ecx
add    %eax,%ecx
shr    $0x2,%ecx
lea    0x0(,%rcx,8),%eax
sub    %ecx,%eax
cmp    $0x6,%r13d
ja     18e0 <main+0x7a0>
mov    %ebx,%ecx
sub    %eax,%ecx
lea    (%r15,%rcx,1),%eax
cmp    $0x1e,%eax
jb     18f7 <main+0x7b7>
mov    $0x9,%edi
call   1030 <putchar@plt>
jmp    1920 <main+0x7e0>
nop
lea    -0x7(%r15),%ecx
cmp    $0x6,%ecx
ja     1910 <main+0x7d0>
mov    %r12d,%ecx
sub    %eax,%ecx
lea    (%r15,%rcx,1),%eax
cmp    $0x1f,%eax
jae    18d3 <main+0x793>
lea    (%r15,%rcx,1),%esi
add    $0x1,%esi
lea    0x6fe(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1920 <main+0x7e0>
xchg   %ax,%ax
lea    -0xe(%r15),%ecx
cmp    $0x6,%ecx
ja     1920 <main+0x7e0>
mov    0x10(%rsp),%ecx
jmp    18c8 <main+0x788>
nop
lea    0x1(%r15),%r13d
test   %r15d,%r15d
je     1890 <main+0x750>
movzbl %r14b,%eax
lea    (%rax,%rax,8),%ecx
lea    (%rax,%rcx,4),%ecx
shr    $0x8,%ecx
sub    %cl,%al
shr    %al
add    %cl,%al
shr    $0x2,%al
movzbl %al,%eax
lea    0x0(,%rax,8),%ecx
sub    %eax,%ecx
add    $0xff,%cl
cmp    %r15b,%cl
jne    1890 <main+0x750>
mov    $0x9,%edi
call   1030 <putchar@plt>
jmp    1890 <main+0x750>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"What year is it?\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [121 x i8] c"What day does January start with? Please enter a value of 1 to 7, on a week going from 1 for Sunday, and 7 for Saturday\0A\00"
@.str.3 = [43 x i8] c"January \09\09\09\09\09\09\09 February \09\09\09\09\09\09\09 March \09 \0A\00"
@.str.4 = [127 x i8] c"Sun \09 Mon \09 Tue \09 Wed \09 Thu \09 Fri \09 Sat \09\09 Sun \09 Mon \09 Tue \09 Wed \09 Thu \09 Fri \09 Sat \09\09 Sun \09 Mon \09 Tue \09 Wed \09 Thu \09 Fri \09 Sat\0A\00"
@.str.5 = [2 x i8] c"\09\00"
@.str.6 = [5 x i8] c"%d \09\00"
@.str.7 = [2 x i8] c"\0A\00"
@.str.8 = [37 x i8] c"April \09\09\09\09\09\09\09\09 May \09\09\09\09\09\09\09\09 June \09 \0A\00"
@.str.9 = [43 x i8] c"July \09\09\09\09\09\09\09\09 August \09\09\09\09\09\09\09 September \09 \0A\00"
@.str.10 = [46 x i8] c"October \09\09\09\09\09\09\09 November \09\09\09\09\09\09\09 December \09 \0A\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 i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
store i32 0, i32* %1
br label %33
33: ; preds = %36, %0
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%35 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %9)
br label %36
36: ; preds = %33
%37 = load i32, i32* %9
%38 = icmp slt i32 %37, 0
br i1 %38, label %33, label %39
39: ; preds = %36
%40 = load i32, i32* %9
%41 = srem i32 %40, 4
%42 = icmp eq i32 %41, 1
br i1 %42, label %43, label %44
43: ; preds = %39
store i32 29, i32* %4
br label %45
44: ; preds = %39
store i32 28, i32* %4
br label %45
45: ; preds = %44, %43
br label %46
46: ; preds = %55, %45
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([121 x i8], [121 x i8]* @.str.2, i64 0, i64 0))
%48 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
br label %49
49: ; preds = %46
%50 = load i32, i32* %5
%51 = icmp slt i32 %50, 1
br i1 %51, label %55, label %52
52: ; preds = %49
%53 = load i32, i32* %5
%54 = icmp sgt i32 %53, 7
br label %55
55: ; preds = %52, %49
%56 = phi i1 [ true, %49 ], [ %54, %52 ]
br i1 %56, label %46, label %57
57: ; preds = %55
%58 = load i32, i32* %5
%59 = sub nsw i32 %58, 1
store i32 %59, i32* %5
%60 = load i32, i32* %5
%61 = add nsw i32 %60, 31
%62 = srem i32 %61, 7
store i32 %62, i32* %10
%63 = load i32, i32* %10
%64 = load i32, i32* %4
%65 = add nsw i32 %63, %64
%66 = srem i32 %65, 7
store i32 %66, i32* %11
%67 = load i32, i32* %11
%68 = add nsw i32 %67, 31
%69 = srem i32 %68, 7
store i32 %69, i32* %12
%70 = load i32, i32* %12
%71 = add nsw i32 %70, 30
%72 = srem i32 %71, 7
store i32 %72, i32* %13
%73 = load i32, i32* %13
%74 = add nsw i32 %73, 31
%75 = srem i32 %74, 7
store i32 %75, i32* %14
%76 = load i32, i32* %14
%77 = add nsw i32 %76, 30
%78 = srem i32 %77, 7
store i32 %78, i32* %15
%79 = load i32, i32* %15
%80 = add nsw i32 %79, 31
%81 = srem i32 %80, 7
store i32 %81, i32* %16
%82 = load i32, i32* %16
%83 = add nsw i32 %82, 31
%84 = srem i32 %83, 7
store i32 %84, i32* %17
%85 = load i32, i32* %17
%86 = add nsw i32 %85, 30
%87 = srem i32 %86, 7
store i32 %87, i32* %18
%88 = load i32, i32* %18
%89 = add nsw i32 %88, 31
%90 = srem i32 %89, 7
store i32 %90, i32* %19
%91 = load i32, i32* %19
%92 = add nsw i32 %91, 30
%93 = srem i32 %92, 7
store i32 %93, i32* %20
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %7
br label %96
96: ; preds = %192, %57
%97 = load i32, i32* %7
%98 = icmp slt i32 %97, 6
br i1 %98, label %99, label %195
99: ; preds = %96
store i32 0, i32* %8
br label %100
100: ; preds = %187, %99
%101 = load i32, i32* %8
%102 = icmp slt i32 %101, 23
br i1 %102, label %103, label %190
103: ; preds = %100
%104 = load i32, i32* %8
%105 = sdiv i32 %104, 7
%106 = icmp eq i32 %105, 0
br i1 %106, label %107, label %127
107: ; preds = %103
%108 = load i32, i32* %8
%109 = srem i32 %108, 7
%110 = load i32, i32* %7
%111 = mul nsw i32 7, %110
%112 = add nsw i32 %109, %111
%113 = load i32, i32* %5
%114 = sub nsw i32 %112, %113
%115 = add nsw i32 %114, 1
store i32 %115, i32* %21
%116 = load i32, i32* %21
%117 = icmp slt i32 %116, 1
br i1 %117, label %121, label %118
118: ; preds = %107
%119 = load i32, i32* %21
%120 = icmp sgt i32 %119, 31
br i1 %120, label %121, label %123
121: ; preds = %118, %107
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %126
123: ; preds = %118
%124 = load i32, i32* %21
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %124)
br label %126
126: ; preds = %123, %121
br label %127
127: ; preds = %126, %103
%128 = load i32, i32* %8
%129 = sdiv i32 %128, 7
%130 = icmp eq i32 %129, 1
br i1 %130, label %131, label %152
131: ; preds = %127
%132 = load i32, i32* %8
%133 = srem i32 %132, 7
%134 = load i32, i32* %7
%135 = mul nsw i32 7, %134
%136 = add nsw i32 %133, %135
%137 = load i32, i32* %10
%138 = sub nsw i32 %136, %137
%139 = add nsw i32 %138, 1
store i32 %139, i32* %22
%140 = load i32, i32* %22
%141 = icmp slt i32 %140, 1
br i1 %141, label %146, label %142
142: ; preds = %131
%143 = load i32, i32* %22
%144 = load i32, i32* %4
%145 = icmp sgt i32 %143, %144
br i1 %145, label %146, label %148
146: ; preds = %142, %131
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %151
148: ; preds = %142
%149 = load i32, i32* %22
%150 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %149)
br label %151
151: ; preds = %148, %146
br label %152
152: ; preds = %151, %127
%153 = load i32, i32* %8
%154 = sdiv i32 %153, 7
%155 = icmp eq i32 %154, 2
br i1 %155, label %156, label %176
156: ; preds = %152
%157 = load i32, i32* %8
%158 = srem i32 %157, 7
%159 = load i32, i32* %7
%160 = mul nsw i32 7, %159
%161 = add nsw i32 %158, %160
%162 = load i32, i32* %11
%163 = sub nsw i32 %161, %162
%164 = add nsw i32 %163, 1
store i32 %164, i32* %23
%165 = load i32, i32* %23
%166 = icmp slt i32 %165, 1
br i1 %166, label %170, label %167
167: ; preds = %156
%168 = load i32, i32* %23
%169 = icmp sgt i32 %168, 31
br i1 %169, label %170, label %172
170: ; preds = %167, %156
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %175
172: ; preds = %167
%173 = load i32, i32* %23
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %173)
br label %175
175: ; preds = %172, %170
br label %176
176: ; preds = %175, %152
%177 = load i32, i32* %8
%178 = add nsw i32 %177, 1
%179 = srem i32 %178, 7
%180 = icmp eq i32 %179, 0
br i1 %180, label %181, label %186
181: ; preds = %176
%182 = load i32, i32* %8
%183 = icmp sgt i32 %182, 0
br i1 %183, label %184, label %186
184: ; preds = %181
%185 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %186
186: ; preds = %184, %181, %176
br label %187
187: ; preds = %186
%188 = load i32, i32* %8
%189 = add nsw i32 %188, 1
store i32 %189, i32* %8
br label %100
190: ; preds = %100
%191 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %192
192: ; preds = %190
%193 = load i32, i32* %7
%194 = add nsw i32 %193, 1
store i32 %194, i32* %7
br label %96
195: ; preds = %96
%196 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%197 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %7
br label %198
198: ; preds = %293, %195
%199 = load i32, i32* %7
%200 = icmp slt i32 %199, 6
br i1 %200, label %201, label %296
201: ; preds = %198
store i32 0, i32* %8
br label %202
202: ; preds = %288, %201
%203 = load i32, i32* %8
%204 = icmp slt i32 %203, 23
br i1 %204, label %205, label %291
205: ; preds = %202
%206 = load i32, i32* %8
%207 = sdiv i32 %206, 7
%208 = icmp eq i32 %207, 0
br i1 %208, label %209, label %229
209: ; preds = %205
%210 = load i32, i32* %8
%211 = srem i32 %210, 7
%212 = load i32, i32* %7
%213 = mul nsw i32 7, %212
%214 = add nsw i32 %211, %213
%215 = load i32, i32* %12
%216 = sub nsw i32 %214, %215
%217 = add nsw i32 %216, 1
store i32 %217, i32* %24
%218 = load i32, i32* %24
%219 = icmp slt i32 %218, 1
br i1 %219, label %223, label %220
220: ; preds = %209
%221 = load i32, i32* %24
%222 = icmp sgt i32 %221, 30
br i1 %222, label %223, label %225
223: ; preds = %220, %209
%224 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %228
225: ; preds = %220
%226 = load i32, i32* %24
%227 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %226)
br label %228
228: ; preds = %225, %223
br label %229
229: ; preds = %228, %205
%230 = load i32, i32* %8
%231 = sdiv i32 %230, 7
%232 = icmp eq i32 %231, 1
br i1 %232, label %233, label %253
233: ; preds = %229
%234 = load i32, i32* %8
%235 = srem i32 %234, 7
%236 = load i32, i32* %7
%237 = mul nsw i32 7, %236
%238 = add nsw i32 %235, %237
%239 = load i32, i32* %13
%240 = sub nsw i32 %238, %239
%241 = add nsw i32 %240, 1
store i32 %241, i32* %25
%242 = load i32, i32* %25
%243 = icmp slt i32 %242, 1
br i1 %243, label %247, label %244
244: ; preds = %233
%245 = load i32, i32* %25
%246 = icmp sgt i32 %245, 31
br i1 %246, label %247, label %249
247: ; preds = %244, %233
%248 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %252
249: ; preds = %244
%250 = load i32, i32* %25
%251 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %250)
br label %252
252: ; preds = %249, %247
br label %253
253: ; preds = %252, %229
%254 = load i32, i32* %8
%255 = sdiv i32 %254, 7
%256 = icmp eq i32 %255, 2
br i1 %256, label %257, label %277
257: ; preds = %253
%258 = load i32, i32* %8
%259 = srem i32 %258, 7
%260 = load i32, i32* %7
%261 = mul nsw i32 7, %260
%262 = add nsw i32 %259, %261
%263 = load i32, i32* %14
%264 = sub nsw i32 %262, %263
%265 = add nsw i32 %264, 1
store i32 %265, i32* %26
%266 = load i32, i32* %26
%267 = icmp slt i32 %266, 1
br i1 %267, label %271, label %268
268: ; preds = %257
%269 = load i32, i32* %26
%270 = icmp sgt i32 %269, 30
br i1 %270, label %271, label %273
271: ; preds = %268, %257
%272 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %276
273: ; preds = %268
%274 = load i32, i32* %26
%275 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %274)
br label %276
276: ; preds = %273, %271
br label %277
277: ; preds = %276, %253
%278 = load i32, i32* %8
%279 = add nsw i32 %278, 1
%280 = srem i32 %279, 7
%281 = icmp eq i32 %280, 0
br i1 %281, label %282, label %287
282: ; preds = %277
%283 = load i32, i32* %8
%284 = icmp sgt i32 %283, 0
br i1 %284, label %285, label %287
285: ; preds = %282
%286 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %287
287: ; preds = %285, %282, %277
br label %288
288: ; preds = %287
%289 = load i32, i32* %8
%290 = add nsw i32 %289, 1
store i32 %290, i32* %8
br label %202
291: ; preds = %202
%292 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %293
293: ; preds = %291
%294 = load i32, i32* %7
%295 = add nsw i32 %294, 1
store i32 %295, i32* %7
br label %198
296: ; preds = %198
%297 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.9, i64 0, i64 0))
%298 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %7
br label %299
299: ; preds = %394, %296
%300 = load i32, i32* %7
%301 = icmp slt i32 %300, 6
br i1 %301, label %302, label %397
302: ; preds = %299
store i32 0, i32* %8
br label %303
303: ; preds = %389, %302
%304 = load i32, i32* %8
%305 = icmp slt i32 %304, 23
br i1 %305, label %306, label %392
306: ; preds = %303
%307 = load i32, i32* %8
%308 = sdiv i32 %307, 7
%309 = icmp eq i32 %308, 0
br i1 %309, label %310, label %330
310: ; preds = %306
%311 = load i32, i32* %8
%312 = srem i32 %311, 7
%313 = load i32, i32* %7
%314 = mul nsw i32 7, %313
%315 = add nsw i32 %312, %314
%316 = load i32, i32* %15
%317 = sub nsw i32 %315, %316
%318 = add nsw i32 %317, 1
store i32 %318, i32* %27
%319 = load i32, i32* %27
%320 = icmp slt i32 %319, 1
br i1 %320, label %324, label %321
321: ; preds = %310
%322 = load i32, i32* %27
%323 = icmp sgt i32 %322, 31
br i1 %323, label %324, label %326
324: ; preds = %321, %310
%325 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %329
326: ; preds = %321
%327 = load i32, i32* %27
%328 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %327)
br label %329
329: ; preds = %326, %324
br label %330
330: ; preds = %329, %306
%331 = load i32, i32* %8
%332 = sdiv i32 %331, 7
%333 = icmp eq i32 %332, 1
br i1 %333, label %334, label %354
334: ; preds = %330
%335 = load i32, i32* %8
%336 = srem i32 %335, 7
%337 = load i32, i32* %7
%338 = mul nsw i32 7, %337
%339 = add nsw i32 %336, %338
%340 = load i32, i32* %16
%341 = sub nsw i32 %339, %340
%342 = add nsw i32 %341, 1
store i32 %342, i32* %28
%343 = load i32, i32* %28
%344 = icmp slt i32 %343, 1
br i1 %344, label %348, label %345
345: ; preds = %334
%346 = load i32, i32* %28
%347 = icmp sgt i32 %346, 31
br i1 %347, label %348, label %350
348: ; preds = %345, %334
%349 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %353
350: ; preds = %345
%351 = load i32, i32* %28
%352 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %351)
br label %353
353: ; preds = %350, %348
br label %354
354: ; preds = %353, %330
%355 = load i32, i32* %8
%356 = sdiv i32 %355, 7
%357 = icmp eq i32 %356, 2
br i1 %357, label %358, label %378
358: ; preds = %354
%359 = load i32, i32* %8
%360 = srem i32 %359, 7
%361 = load i32, i32* %7
%362 = mul nsw i32 7, %361
%363 = add nsw i32 %360, %362
%364 = load i32, i32* %17
%365 = sub nsw i32 %363, %364
%366 = add nsw i32 %365, 1
store i32 %366, i32* %29
%367 = load i32, i32* %29
%368 = icmp slt i32 %367, 1
br i1 %368, label %372, label %369
369: ; preds = %358
%370 = load i32, i32* %29
%371 = icmp sgt i32 %370, 30
br i1 %371, label %372, label %374
372: ; preds = %369, %358
%373 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %377
374: ; preds = %369
%375 = load i32, i32* %29
%376 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %375)
br label %377
377: ; preds = %374, %372
br label %378
378: ; preds = %377, %354
%379 = load i32, i32* %8
%380 = add nsw i32 %379, 1
%381 = srem i32 %380, 7
%382 = icmp eq i32 %381, 0
br i1 %382, label %383, label %388
383: ; preds = %378
%384 = load i32, i32* %8
%385 = icmp sgt i32 %384, 0
br i1 %385, label %386, label %388
386: ; preds = %383
%387 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %388
388: ; preds = %386, %383, %378
br label %389
389: ; preds = %388
%390 = load i32, i32* %8
%391 = add nsw i32 %390, 1
store i32 %391, i32* %8
br label %303
392: ; preds = %303
%393 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %394
394: ; preds = %392
%395 = load i32, i32* %7
%396 = add nsw i32 %395, 1
store i32 %396, i32* %7
br label %299
397: ; preds = %299
%398 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.10, i64 0, i64 0))
%399 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %7
br label %400
400: ; preds = %495, %397
%401 = load i32, i32* %7
%402 = icmp slt i32 %401, 6
br i1 %402, label %403, label %498
403: ; preds = %400
store i32 0, i32* %8
br label %404
404: ; preds = %490, %403
%405 = load i32, i32* %8
%406 = icmp slt i32 %405, 23
br i1 %406, label %407, label %493
407: ; preds = %404
%408 = load i32, i32* %8
%409 = sdiv i32 %408, 7
%410 = icmp eq i32 %409, 0
br i1 %410, label %411, label %431
411: ; preds = %407
%412 = load i32, i32* %8
%413 = srem i32 %412, 7
%414 = load i32, i32* %7
%415 = mul nsw i32 7, %414
%416 = add nsw i32 %413, %415
%417 = load i32, i32* %18
%418 = sub nsw i32 %416, %417
%419 = add nsw i32 %418, 1
store i32 %419, i32* %30
%420 = load i32, i32* %30
%421 = icmp slt i32 %420, 1
br i1 %421, label %425, label %422
422: ; preds = %411
%423 = load i32, i32* %30
%424 = icmp sgt i32 %423, 30
br i1 %424, label %425, label %427
425: ; preds = %422, %411
%426 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %430
427: ; preds = %422
%428 = load i32, i32* %30
%429 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %428)
br label %430
430: ; preds = %427, %425
br label %431
431: ; preds = %430, %407
%432 = load i32, i32* %8
%433 = sdiv i32 %432, 7
%434 = icmp eq i32 %433, 1
br i1 %434, label %435, label %455
435: ; preds = %431
%436 = load i32, i32* %8
%437 = srem i32 %436, 7
%438 = load i32, i32* %7
%439 = mul nsw i32 7, %438
%440 = add nsw i32 %437, %439
%441 = load i32, i32* %19
%442 = sub nsw i32 %440, %441
%443 = add nsw i32 %442, 1
store i32 %443, i32* %31
%444 = load i32, i32* %31
%445 = icmp slt i32 %444, 1
br i1 %445, label %449, label %446
446: ; preds = %435
%447 = load i32, i32* %31
%448 = icmp sgt i32 %447, 31
br i1 %448, label %449, label %451
449: ; preds = %446, %435
%450 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %454
451: ; preds = %446
%452 = load i32, i32* %31
%453 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %452)
br label %454
454: ; preds = %451, %449
br label %455
455: ; preds = %454, %431
%456 = load i32, i32* %8
%457 = sdiv i32 %456, 7
%458 = icmp eq i32 %457, 2
br i1 %458, label %459, label %479
459: ; preds = %455
%460 = load i32, i32* %8
%461 = srem i32 %460, 7
%462 = load i32, i32* %7
%463 = mul nsw i32 7, %462
%464 = add nsw i32 %461, %463
%465 = load i32, i32* %20
%466 = sub nsw i32 %464, %465
%467 = add nsw i32 %466, 1
store i32 %467, i32* %32
%468 = load i32, i32* %32
%469 = icmp slt i32 %468, 1
br i1 %469, label %473, label %470
470: ; preds = %459
%471 = load i32, i32* %32
%472 = icmp sgt i32 %471, 30
br i1 %472, label %473, label %475
473: ; preds = %470, %459
%474 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %478
475: ; preds = %470
%476 = load i32, i32* %32
%477 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %476)
br label %478
478: ; preds = %475, %473
br label %479
479: ; preds = %478, %455
%480 = load i32, i32* %8
%481 = add nsw i32 %480, 1
%482 = srem i32 %481, 7
%483 = icmp eq i32 %482, 0
br i1 %483, label %484, label %489
484: ; preds = %479
%485 = load i32, i32* %8
%486 = icmp sgt i32 %485, 0
br i1 %486, label %487, label %489
487: ; preds = %484
%488 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %489
489: ; preds = %487, %484, %479
br label %490
490: ; preds = %489
%491 = load i32, i32* %8
%492 = add nsw i32 %491, 1
store i32 %492, i32* %8
br label %404
493: ; preds = %404
%494 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %495
495: ; preds = %493
%496 = load i32, i32* %7
%497 = add nsw i32 %496, 1
store i32 %497, i32* %7
br label %400
498: ; preds = %400
%499 = load i32, i32* %1
ret i32 %499
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.6 = [5 x i8] c"%d \09\00"
@str = [17 x i8] c"What year is it?\00"
@str.11 = [120 x i8] c"What day does January start with? Please enter a value of 1 to 7, on a week going from 1 for Sunday, and 7 for Saturday\00"
@str.12 = [42 x i8] c"January \09\09\09\09\09\09\09 February \09\09\09\09\09\09\09 March \09 \00"
@str.14 = [36 x i8] c"April \09\09\09\09\09\09\09\09 May \09\09\09\09\09\09\09\09 June \09 \00"
@str.16 = [42 x i8] c"July \09\09\09\09\09\09\09\09 August \09\09\09\09\09\09\09 September \09 \00"
@str.18 = [45 x i8] c"October \09\09\09\09\09\09\09 November \09\09\09\09\09\09\09 December \09 \00"
@str.19 = [126 x i8] c"Sun \09 Mon \09 Tue \09 Wed \09 Thu \09 Fri \09 Sat \09\09 Sun \09 Mon \09 Tue \09 Wed \09 Thu \09 Fri \09 Sat \09\09 Sun \09 Mon \09 Tue \09 Wed \09 Thu \09 Fri \09 Sat\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
br label %5
5: ; preds = %5, %0
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5
%11 = and i32 %8, 3
%12 = icmp eq i32 %11, 1
br label %13
13: ; preds = %13, %10
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([120 x i8], [120 x i8]* @str.11, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%16 = load i32, i32* %1
%17 = add i32 %16, -8
%18 = icmp ult i32 %17, -7
br i1 %18, label %13, label %19
19: ; preds = %13
%20 = select i1 %12, i32 29, i32 28
%21 = add nsw i32 %16, -1
store i32 %21, i32* %1
%22 = trunc i32 %16 to i8
%23 = add nuw nsw i8 %22, 30
%24 = urem i8 %23, 7
%25 = zext i8 %24 to i32
%26 = trunc i32 %20 to i8
%27 = add nuw nsw i8 %24, %26
%28 = urem i8 %27, 7
%29 = zext i8 %28 to i32
%30 = add nuw nsw i8 %28, 31
%31 = urem i8 %30, 7
%32 = add nuw nsw i8 %31, 30
%33 = urem i8 %32, 7
%34 = add nuw nsw i8 %33, 31
%35 = urem i8 %34, 7
%36 = add nuw nsw i8 %35, 30
%37 = urem i8 %36, 7
%38 = add nuw nsw i8 %37, 31
%39 = urem i8 %38, 7
%40 = add nuw nsw i8 %39, 31
%41 = urem i8 %40, 7
%42 = add nuw nsw i8 %41, 30
%43 = urem i8 %42, 7
%44 = add nuw nsw i8 %43, 31
%45 = urem i8 %44, 7
%46 = add nuw nsw i8 %45, 30
%47 = urem i8 %46, 7
%48 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.12, i64 0, i64 0))
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([126 x i8], [126 x i8]* @str.19, i64 0, i64 0))
br label %50
50: ; preds = %19, %112
%51 = phi i32 [ 0, %19 ], [ %114, %112 ]
%52 = mul nuw nsw i32 %51, 7
%53 = sub nsw i32 %52, %29
%54 = sub nsw i32 %52, %25
br label %55
55: ; preds = %50, %110
%56 = phi i32 [ 0, %50 ], [ %102, %110 ]
%57 = icmp ult i32 %56, 7
br i1 %57, label %58, label %71
58: ; preds = %55
%59 = trunc i32 %56 to i8
%60 = urem i8 %59, 7
%61 = zext i8 %60 to i32
%62 = add nuw nsw i32 %52, %61
%63 = load i32, i32* %1
%64 = sub i32 %62, %63
%65 = icmp ugt i32 %64, 30
br i1 %65, label %66, label %68
66: ; preds = %58
%67 = call i32 @putchar(i32 9)
br label %101
68: ; preds = %58
%69 = add nuw nsw i32 %64, 1
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %69)
br label %101
71: ; preds = %55
%72 = add nsw i32 %56, -7
%73 = icmp ult i32 %72, 7
br i1 %73, label %74, label %87
74: ; preds = %71
%75 = trunc i32 %56 to i8
%76 = urem i8 %75, 7
%77 = zext i8 %76 to i32
%78 = add i32 %54, %77
%79 = icmp sgt i32 %78, -1
%80 = icmp slt i32 %78, %20
%81 = select i1 %79, i1 %80, i1 false
br i1 %81, label %84, label %82
82: ; preds = %74
%83 = call i32 @putchar(i32 9)
br label %101
84: ; preds = %74
%85 = add nuw nsw i32 %78, 1
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %85)
br label %101
87: ; preds = %71
%88 = add nsw i32 %56, -14
%89 = icmp ult i32 %88, 7
br i1 %89, label %90, label %101
90: ; preds = %87
%91 = trunc i32 %56 to i8
%92 = urem i8 %91, 7
%93 = zext i8 %92 to i32
%94 = add i32 %53, %93
%95 = icmp ugt i32 %94, 30
br i1 %95, label %96, label %98
96: ; preds = %90
%97 = call i32 @putchar(i32 9)
br label %101
98: ; preds = %90
%99 = add nuw nsw i32 %94, 1
%100 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %99)
br label %101
101: ; preds = %68, %66, %84, %82, %96, %98, %87
%102 = add nuw nsw i32 %56, 1
%103 = trunc i32 %102 to i8
%104 = urem i8 %103, 7
%105 = icmp eq i8 %104, 0
%106 = icmp ne i32 %56, 0
%107 = and i1 %106, %105
br i1 %107, label %108, label %110
108: ; preds = %101
%109 = call i32 @putchar(i32 9)
br label %110
110: ; preds = %101, %108
%111 = icmp eq i32 %102, 23
br i1 %111, label %112, label %55
112: ; preds = %110
%113 = call i32 @putchar(i32 10)
%114 = add nuw nsw i32 %51, 1
%115 = icmp eq i32 %114, 6
br i1 %115, label %116, label %50
116: ; preds = %112
%117 = zext i8 %31 to i32
%118 = zext i8 %33 to i32
%119 = zext i8 %35 to i32
%120 = zext i8 %37 to i32
%121 = zext i8 %41 to i32
%122 = zext i8 %45 to i32
%123 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.14, i64 0, i64 0))
%124 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([126 x i8], [126 x i8]* @str.19, i64 0, i64 0))
br label %125
125: ; preds = %116, %184
%126 = phi i32 [ 0, %116 ], [ %186, %184 ]
%127 = mul nuw nsw i32 %126, 7
%128 = sub nsw i32 %127, %119
%129 = sub nsw i32 %127, %118
%130 = sub nsw i32 %127, %117
br label %131
131: ; preds = %125, %182
%132 = phi i32 [ 0, %125 ], [ %174, %182 ]
%133 = icmp ult i32 %132, 7
br i1 %133, label %134, label %145
134: ; preds = %131
%135 = trunc i32 %132 to i8
%136 = urem i8 %135, 7
%137 = zext i8 %136 to i32
%138 = add i32 %130, %137
%139 = icmp ugt i32 %138, 29
br i1 %139, label %140, label %142
140: ; preds = %134
%141 = call i32 @putchar(i32 9)
br label %173
142: ; preds = %134
%143 = add nuw nsw i32 %138, 1
%144 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %143)
br label %173
145: ; preds = %131
%146 = add nsw i32 %132, -7
%147 = icmp ult i32 %146, 7
br i1 %147, label %148, label %159
148: ; preds = %145
%149 = trunc i32 %132 to i8
%150 = urem i8 %149, 7
%151 = zext i8 %150 to i32
%152 = add i32 %129, %151
%153 = icmp ugt i32 %152, 30
br i1 %153, label %154, label %156
154: ; preds = %148
%155 = call i32 @putchar(i32 9)
br label %173
156: ; preds = %148
%157 = add nuw nsw i32 %152, 1
%158 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %157)
br label %173
159: ; preds = %145
%160 = add nsw i32 %132, -14
%161 = icmp ult i32 %160, 7
br i1 %161, label %162, label %173
162: ; preds = %159
%163 = trunc i32 %132 to i8
%164 = urem i8 %163, 7
%165 = zext i8 %164 to i32
%166 = add i32 %128, %165
%167 = icmp ugt i32 %166, 29
br i1 %167, label %168, label %170
168: ; preds = %162
%169 = call i32 @putchar(i32 9)
br label %173
170: ; preds = %162
%171 = add nuw nsw i32 %166, 1
%172 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %171)
br label %173
173: ; preds = %142, %140, %156, %154, %168, %170, %159
%174 = add nuw nsw i32 %132, 1
%175 = trunc i32 %174 to i8
%176 = urem i8 %175, 7
%177 = icmp eq i8 %176, 0
%178 = icmp ne i32 %132, 0
%179 = and i1 %178, %177
br i1 %179, label %180, label %182
180: ; preds = %173
%181 = call i32 @putchar(i32 9)
br label %182
182: ; preds = %173, %180
%183 = icmp eq i32 %174, 23
br i1 %183, label %184, label %131
184: ; preds = %182
%185 = call i32 @putchar(i32 10)
%186 = add nuw nsw i32 %126, 1
%187 = icmp eq i32 %186, 6
br i1 %187, label %188, label %125
188: ; preds = %184
%189 = zext i8 %39 to i32
%190 = zext i8 %43 to i32
%191 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.16, i64 0, i64 0))
%192 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([126 x i8], [126 x i8]* @str.19, i64 0, i64 0))
br label %193
193: ; preds = %188, %252
%194 = phi i32 [ 0, %188 ], [ %254, %252 ]
%195 = mul nuw nsw i32 %194, 7
%196 = sub nsw i32 %195, %121
%197 = sub nsw i32 %195, %189
%198 = sub nsw i32 %195, %120
br label %199
199: ; preds = %193, %250
%200 = phi i32 [ 0, %193 ], [ %242, %250 ]
%201 = icmp ult i32 %200, 7
br i1 %201, label %202, label %213
202: ; preds = %199
%203 = trunc i32 %200 to i8
%204 = urem i8 %203, 7
%205 = zext i8 %204 to i32
%206 = add i32 %198, %205
%207 = icmp ugt i32 %206, 30
br i1 %207, label %208, label %210
208: ; preds = %202
%209 = call i32 @putchar(i32 9)
br label %241
210: ; preds = %202
%211 = add nuw nsw i32 %206, 1
%212 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %211)
br label %241
213: ; preds = %199
%214 = add nsw i32 %200, -7
%215 = icmp ult i32 %214, 7
br i1 %215, label %216, label %227
216: ; preds = %213
%217 = trunc i32 %200 to i8
%218 = urem i8 %217, 7
%219 = zext i8 %218 to i32
%220 = add i32 %197, %219
%221 = icmp ugt i32 %220, 30
br i1 %221, label %222, label %224
222: ; preds = %216
%223 = call i32 @putchar(i32 9)
br label %241
224: ; preds = %216
%225 = add nuw nsw i32 %220, 1
%226 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %225)
br label %241
227: ; preds = %213
%228 = add nsw i32 %200, -14
%229 = icmp ult i32 %228, 7
br i1 %229, label %230, label %241
230: ; preds = %227
%231 = trunc i32 %200 to i8
%232 = urem i8 %231, 7
%233 = zext i8 %232 to i32
%234 = add i32 %196, %233
%235 = icmp ugt i32 %234, 29
br i1 %235, label %236, label %238
236: ; preds = %230
%237 = call i32 @putchar(i32 9)
br label %241
238: ; preds = %230
%239 = add nuw nsw i32 %234, 1
%240 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %239)
br label %241
241: ; preds = %210, %208, %224, %222, %236, %238, %227
%242 = add nuw nsw i32 %200, 1
%243 = trunc i32 %242 to i8
%244 = urem i8 %243, 7
%245 = icmp eq i8 %244, 0
%246 = icmp ne i32 %200, 0
%247 = and i1 %246, %245
br i1 %247, label %248, label %250
248: ; preds = %241
%249 = call i32 @putchar(i32 9)
br label %250
250: ; preds = %241, %248
%251 = icmp eq i32 %242, 23
br i1 %251, label %252, label %199
252: ; preds = %250
%253 = call i32 @putchar(i32 10)
%254 = add nuw nsw i32 %194, 1
%255 = icmp eq i32 %254, 6
br i1 %255, label %256, label %193
256: ; preds = %252
%257 = zext i8 %47 to i32
%258 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.18, i64 0, i64 0))
%259 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([126 x i8], [126 x i8]* @str.19, i64 0, i64 0))
br label %260
260: ; preds = %256, %319
%261 = phi i32 [ 0, %256 ], [ %321, %319 ]
%262 = mul nuw nsw i32 %261, 7
%263 = sub nsw i32 %262, %257
%264 = sub nsw i32 %262, %122
%265 = sub nsw i32 %262, %190
br label %266
266: ; preds = %260, %317
%267 = phi i32 [ 0, %260 ], [ %309, %317 ]
%268 = icmp ult i32 %267, 7
br i1 %268, label %269, label %280
269: ; preds = %266
%270 = trunc i32 %267 to i8
%271 = urem i8 %270, 7
%272 = zext i8 %271 to i32
%273 = add i32 %265, %272
%274 = icmp ugt i32 %273, 29
br i1 %274, label %275, label %277
275: ; preds = %269
%276 = call i32 @putchar(i32 9)
br label %308
277: ; preds = %269
%278 = add nuw nsw i32 %273, 1
%279 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %278)
br label %308
280: ; preds = %266
%281 = add nsw i32 %267, -7
%282 = icmp ult i32 %281, 7
br i1 %282, label %283, label %294
283: ; preds = %280
%284 = trunc i32 %267 to i8
%285 = urem i8 %284, 7
%286 = zext i8 %285 to i32
%287 = add i32 %264, %286
%288 = icmp ugt i32 %287, 30
br i1 %288, label %289, label %291
289: ; preds = %283
%290 = call i32 @putchar(i32 9)
br label %308
291: ; preds = %283
%292 = add nuw nsw i32 %287, 1
%293 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %292)
br label %308
294: ; preds = %280
%295 = add nsw i32 %267, -14
%296 = icmp ult i32 %295, 7
br i1 %296, label %297, label %308
297: ; preds = %294
%298 = trunc i32 %267 to i8
%299 = urem i8 %298, 7
%300 = zext i8 %299 to i32
%301 = add i32 %263, %300
%302 = icmp ugt i32 %301, 29
br i1 %302, label %303, label %305
303: ; preds = %297
%304 = call i32 @putchar(i32 9)
br label %308
305: ; preds = %297
%306 = add nuw nsw i32 %301, 1
%307 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i32 %306)
br label %308
308: ; preds = %277, %275, %291, %289, %303, %305, %294
%309 = add nuw nsw i32 %267, 1
%310 = trunc i32 %309 to i8
%311 = urem i8 %310, 7
%312 = icmp eq i8 %311, 0
%313 = icmp ne i32 %267, 0
%314 = and i1 %313, %312
br i1 %314, label %315, label %317
315: ; preds = %308
%316 = call i32 @putchar(i32 9)
br label %317
317: ; preds = %308, %315
%318 = icmp eq i32 %309, 23
br i1 %318, label %319, label %266
319: ; preds = %317
%320 = call i32 @putchar(i32 10)
%321 = add nuw nsw i32 %261, 1
%322 = icmp eq i32 %321, 6
br i1 %322, label %323, label %260
323: ; preds = %319
ret i32 0
}