#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 */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free(char *);
char *getInput();
int /*<<< orphan*/ isdigit(char);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, int);
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
scalar_t__ strtod(char *, char **);
char *getExpr(void) {
  printf("Expiration Month and year: ");
  char *expr = getInput();
  if (expr == NULL) {
    printf("You have entered an invalid expiration date.\n");
    exit(7);
  }
  unsigned int len = strlen(expr);
  if (len != 11) {
    printf("Your expiration date is an invalid length\n");
    printf("Please use the format MM/DD/YYYY.\n");
    free(expr);
    exit(8);
  }
  for (unsigned int i = 0; i < len; i++) {
    if (i == 2 || i == 5) {
      if (expr[i] != '/') {
        printf("You have entered an invalid expiration date.\n");
        printf("Please use the format MM/DD/YYYY.\n");
        free(expr);
        exit(9);
      }
    } else if (!isdigit(expr[i])) {
      printf("%c\n", expr[i]);
      if (!(i == len - 1 && expr[i] == '\n')) {
        printf("You have entered an invalid expiration date.\n");
        printf("Please use the format MM/DD/YYYY.\n");
        free(expr);
        exit(10);
      }
    }
  }
  char *ptr;
  int month_digit = (int)strtod(expr, &ptr);
  char retval[50];
  char day[3];
  day[0] = expr[3];
  day[1] = expr[4];
  day[2] = '\0';
  int d = (int)strtod(day, &ptr);
  if (d > 31 || d < 1) {
    printf("Invalid Day. Please enter a valid day 1-31\n");
    free(expr);
    exit(11);
  }
  char month[3];
  month[0] = expr[0];
  month[1] = expr[1];
  month[2] = '\0';
  int m = (int)strtod(month, &ptr);
  if (m > 12 || m < 1) {
    printf("Invalid Month. Please enter a valid month 1-12\n");
    free(expr);
    exit(12);
  }
  char year[5];
  year[0] = expr[6];
  year[1] = expr[7];
  year[2] = expr[8];
  year[3] = expr[9];
  year[4] = '\0';
  int y = (int)strtod(year, &ptr);
  if (y < 2017) {
    printf("Invalid Date. Card Expired.\n");
    free(expr);
    exit(13);
  }
  if (y == 2017) {
    if (m < 4) {
      printf("Invalid Date. Card Expired.\n");
      free(expr);
      exit(14);
    }
    if (m == 4) {
      if (d < 27) {
        printf("Invalid Date. Card Expired.\n");
        free(expr);
        exit(15);
      }
    }
  }
  switch ((int)month_digit) {
  case 1:
    sprintf(retval, "January %d", (int)strtod(day, &ptr));
    break;
  case 2:
    sprintf(retval, "February %d", (int)strtod(day, &ptr));
    break;
  case 3:
    sprintf(retval, "March %d", (int)strtod(day, &ptr));
  case 4:
    break;
    sprintf(retval, "April %d", (int)strtod(day, &ptr));
  case 5:
    sprintf(retval, "May %d", (int)strtod(day, &ptr));
    break;
  case 6:
    sprintf(retval, "June %d", (int)strtod(day, &ptr));
    break;
  case 7:
    sprintf(retval, "July %d", (int)strtod(day, &ptr));
    break;
  case 8:
    sprintf(retval, "August %d", (int)strtod(day, &ptr));
    break;
  case 9:
    sprintf(retval, "September %d", (int)strtod(day, &ptr));
    break;
  case 10:
    sprintf(retval, "October %d", (int)strtod(day, &ptr));
    break;
  case 11:
    sprintf(retval, "November %d", (int)strtod(day, &ptr));
    break;
  case 12:
    sprintf(retval, "December %d", (int)strtod(day, &ptr));
    break;
  default:
    printf("You have entered an invalid month.\n");
    printf("Please use the format MM/DD/YYYY.\n");
    free(expr);
    exit(12);
  }
  free(expr);
  expr = (char *)calloc(1, strlen(retval) + 1);
  strncpy(expr, retval, strlen(retval) + 1);
  return expr;
}


x86 assembly (clang, -O0):
<getExpr>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x0,%al
call   1090 <getInput@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    11e7 <getExpr+0x47>
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    $0x7,%edi
call   10c0 <exit@plt>
mov    -0x8(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xb,-0xc(%rbp)
je     122c <getExpr+0x8c>
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0x8,%edi
call   10c0 <exit@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    133e <getExpr+0x19e>
cmpl   $0x2,-0x10(%rbp)
je     1253 <getExpr+0xb3>
cmpl   $0x5,-0x10(%rbp)
jne    129b <getExpr+0xfb>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
je     1296 <getExpr+0xf6>
lea    0xdde(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0x9,%edi
call   10c0 <exit@plt>
jmp    132b <getExpr+0x18b>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movsbl (%rax,%rcx,1),%edi
call   1050 <isdigit@plt>
cmp    $0x0,%eax
jne    1326 <getExpr+0x186>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movsbl (%rax,%rcx,1),%esi
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    12f2 <getExpr+0x152>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
je     1321 <getExpr+0x181>
lea    0xd53(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xd9e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0xa,%edi
call   10c0 <exit@plt>
jmp    1326 <getExpr+0x186>
jmp    132b <getExpr+0x18b>
jmp    1330 <getExpr+0x190>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1233 <getExpr+0x93>
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%al
mov    %al,-0x53(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%al
mov    %al,-0x52(%rbp)
movb   $0x0,-0x51(%rbp)
lea    -0x53(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    %eax,-0x58(%rbp)
cmpl   $0x1f,-0x58(%rbp)
jg     138a <getExpr+0x1ea>
cmpl   $0x1,-0x58(%rbp)
jge    13ab <getExpr+0x20b>
lea    0xd3b(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0xb,%edi
call   10c0 <exit@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x5b(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x5a(%rbp)
movb   $0x0,-0x59(%rbp)
lea    -0x5b(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    %eax,-0x60(%rbp)
cmpl   $0xc,-0x60(%rbp)
jg     13e6 <getExpr+0x246>
cmpl   $0x1,-0x60(%rbp)
jge    1407 <getExpr+0x267>
lea    0xd0b(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0xc,%edi
call   10c0 <exit@plt>
mov    -0x8(%rbp),%rax
mov    0x6(%rax),%al
mov    %al,-0x65(%rbp)
mov    -0x8(%rbp),%rax
mov    0x7(%rax),%al
mov    %al,-0x64(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%al
mov    %al,-0x63(%rbp)
mov    -0x8(%rbp),%rax
mov    0x9(%rax),%al
mov    %al,-0x62(%rbp)
movb   $0x0,-0x61(%rbp)
lea    -0x65(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    %eax,-0x6c(%rbp)
cmpl   $0x7e1,-0x6c(%rbp)
jge    1471 <getExpr+0x2d1>
lea    0xcd1(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0xd,%edi
call   10c0 <exit@plt>
cmpl   $0x7e1,-0x6c(%rbp)
jne    14e8 <getExpr+0x348>
cmpl   $0x4,-0x60(%rbp)
jge    14a9 <getExpr+0x309>
lea    0xc99(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0xe,%edi
call   10c0 <exit@plt>
cmpl   $0x4,-0x60(%rbp)
jne    14e3 <getExpr+0x343>
cmpl   $0x1b,-0x58(%rbp)
jge    14de <getExpr+0x33e>
lea    0xc64(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0xf,%edi
call   10c0 <exit@plt>
jmp    14e3 <getExpr+0x343>
jmp    14e8 <getExpr+0x348>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x78(%rbp)
sub    $0xb,%eax
ja     1731 <getExpr+0x591>
mov    -0x78(%rbp),%rax
lea    0xaf8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0x50(%rbp),%rax
mov    %rax,-0x80(%rbp)
lea    -0x53(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    -0x80(%rbp),%rdi
mov    %eax,%edx
lea    0xc12(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    1760 <getExpr+0x5c0>
lea    -0x50(%rbp),%rax
mov    %rax,-0x88(%rbp)
lea    -0x53(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    -0x88(%rbp),%rdi
mov    %eax,%edx
lea    0xbeb(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    1760 <getExpr+0x5c0>
lea    -0x50(%rbp),%rax
mov    %rax,-0x90(%rbp)
lea    -0x53(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    -0x90(%rbp),%rdi
mov    %eax,%edx
lea    0xbc5(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    1760 <getExpr+0x5c0>
lea    -0x50(%rbp),%rax
mov    %rax,-0x98(%rbp)
lea    -0x53(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    -0x98(%rbp),%rdi
mov    %eax,%edx
lea    0xb9c(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    1760 <getExpr+0x5c0>
lea    -0x50(%rbp),%rax
mov    %rax,-0xa0(%rbp)
lea    -0x53(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    -0xa0(%rbp),%rdi
mov    %eax,%edx
lea    0xb71(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    1760 <getExpr+0x5c0>
lea    -0x50(%rbp),%rax
mov    %rax,-0xa8(%rbp)
lea    -0x53(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    -0xa8(%rbp),%rdi
mov    %eax,%edx
lea    0xb47(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    1760 <getExpr+0x5c0>
lea    -0x50(%rbp),%rax
mov    %rax,-0xb0(%rbp)
lea    -0x53(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    -0xb0(%rbp),%rdi
mov    %eax,%edx
lea    0xb1d(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    1760 <getExpr+0x5c0>
lea    -0x50(%rbp),%rax
mov    %rax,-0xb8(%rbp)
lea    -0x53(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    -0xb8(%rbp),%rdi
mov    %eax,%edx
lea    0xaf5(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    1760 <getExpr+0x5c0>
lea    -0x50(%rbp),%rax
mov    %rax,-0xc0(%rbp)
lea    -0x53(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    -0xc0(%rbp),%rdi
mov    %eax,%edx
lea    0xad0(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    1760 <getExpr+0x5c0>
lea    -0x50(%rbp),%rax
mov    %rax,-0xc8(%rbp)
lea    -0x53(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    -0xc8(%rbp),%rdi
mov    %eax,%edx
lea    0xaa9(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    1760 <getExpr+0x5c0>
lea    -0x50(%rbp),%rax
mov    %rax,-0xd0(%rbp)
lea    -0x53(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <strtod@plt>
mov    -0xd0(%rbp),%rdi
mov    %eax,%edx
lea    0xa83(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    1760 <getExpr+0x5c0>
lea    0xa7e(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0x95f(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0xc,%edi
call   10c0 <exit@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
lea    -0x50(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%esi
add    $0x1,%esi
mov    $0x1,%edi
call   10a0 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0xe0(%rbp)
lea    -0x50(%rbp),%rax
mov    %rax,-0xd8(%rbp)
lea    -0x50(%rbp),%rdi
call   1070 <strlen@plt>
mov    -0xe0(%rbp),%rdi
mov    -0xd8(%rbp),%rsi
mov    %eax,%edx
add    $0x1,%edx
call   1040 <strncpy@plt>
mov    -0x8(%rbp),%rax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getExpr>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x58,%rsp
lea    0xe6e(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
xor    %eax,%eax
call   10a0 <getInput@plt>
test   %rax,%rax
je     14d5 <getExpr+0x325>
mov    %rax,%r14
mov    %rax,%rdi
call   1080 <strlen@plt>
cmp    $0xb,%eax
jne    14eb <getExpr+0x33b>
movsbl (%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     1292 <getExpr+0xe2>
movsbl 0x1(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     1299 <getExpr+0xe9>
cmpb   $0x2f,0x2(%r14)
jne    156f <getExpr+0x3bf>
movsbl 0x3(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     12a0 <getExpr+0xf0>
movsbl 0x4(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     12a7 <getExpr+0xf7>
cmpb   $0x2f,0x5(%r14)
jne    156f <getExpr+0x3bf>
movsbl 0x6(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     12ae <getExpr+0xfe>
movsbl 0x7(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     12b5 <getExpr+0x105>
movsbl 0x8(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     12bc <getExpr+0x10c>
movsbl 0x9(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     12c3 <getExpr+0x113>
movsbl 0xa(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
jne    12f2 <getExpr+0x142>
mov    $0xa,%ebx
mov    $0x1,%r15b
jmp    12cb <getExpr+0x11b>
xor    %r15d,%r15d
xor    %ebx,%ebx
jmp    12cb <getExpr+0x11b>
mov    $0x1,%ebx
jmp    12c8 <getExpr+0x118>
mov    $0x3,%ebx
jmp    12c8 <getExpr+0x118>
mov    $0x4,%ebx
jmp    12c8 <getExpr+0x118>
mov    $0x6,%ebx
jmp    12c8 <getExpr+0x118>
mov    $0x7,%ebx
jmp    12c8 <getExpr+0x118>
mov    $0x8,%ebx
jmp    12c8 <getExpr+0x118>
mov    $0x9,%ebx
xor    %r15d,%r15d
movsbl (%r14,%rbx,1),%esi
lea    0xd75(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
test   %r15b,%r15b
je     14ab <getExpr+0x2fb>
cmpb   $0xa,(%r14,%rbx,1)
jne    14ab <getExpr+0x2fb>
lea    0x18(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1070 <strtod@plt>
mov    %rax,%r12
mov    0x3(%r14),%al
mov    %al,0xd(%rsp)
mov    0x4(%r14),%al
mov    %al,0xe(%rsp)
movb   $0x0,0xf(%rsp)
lea    0xd(%rsp),%rdi
mov    %rbx,%rsi
call   1070 <strtod@plt>
mov    %rax,%r15
add    $0xffffffe0,%eax
cmp    $0xffffffe1,%eax
jb     1515 <getExpr+0x365>
mov    (%r14),%al
mov    %al,0x10(%rsp)
mov    0x1(%r14),%al
mov    %al,0x11(%rsp)
movb   $0x0,0x12(%rsp)
lea    0x10(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1070 <strtod@plt>
mov    %rax,%rbx
add    $0xfffffff3,%eax
cmp    $0xfffffff3,%eax
jbe    1533 <getExpr+0x383>
mov    0x6(%r14),%al
mov    %al,0x13(%rsp)
mov    0x7(%r14),%al
mov    %al,0x14(%rsp)
mov    0x8(%r14),%al
mov    %al,0x15(%rsp)
mov    0x9(%r14),%al
mov    %al,0x16(%rsp)
movb   $0x0,0x17(%rsp)
lea    0x13(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1070 <strtod@plt>
cmp    $0x7e0,%eax
jle    1551 <getExpr+0x3a1>
cmp    $0x7e1,%eax
jne    13c6 <getExpr+0x216>
cmp    $0x3,%ebx
jbe    1599 <getExpr+0x3e9>
cmp    $0x4,%ebx
jne    13c6 <getExpr+0x216>
cmp    $0x1a,%r15d
jbe    15b7 <getExpr+0x407>
add    $0xffffffff,%r12d
cmp    $0xb,%r12d
ja     15d5 <getExpr+0x425>
lea    0xc75(%rip),%r15
lea    0xc1e(%rip),%rax
movslq (%rax,%r12,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xc69(%rip),%r15
jmp    1443 <getExpr+0x293>
lea    0xc6c(%rip),%r15
jmp    1443 <getExpr+0x293>
lea    0xc6c(%rip),%r15
jmp    1443 <getExpr+0x293>
lea    0xc6a(%rip),%r15
jmp    1443 <getExpr+0x293>
lea    0xc69(%rip),%r15
jmp    1443 <getExpr+0x293>
lea    0xc68(%rip),%r15
jmp    1443 <getExpr+0x293>
lea    0xc69(%rip),%r15
jmp    1443 <getExpr+0x293>
lea    0xc6d(%rip),%r15
jmp    1443 <getExpr+0x293>
lea    0xc6f(%rip),%r15
jmp    1443 <getExpr+0x293>
lea    0xc72(%rip),%r15
lea    0xd(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1070 <strtod@plt>
lea    0x20(%rsp),%rdi
mov    %r15,%rsi
mov    %eax,%edx
call   10c0 <sprintf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
lea    0x20(%rsp),%r14
mov    %r14,%rdi
call   1080 <strlen@plt>
lea    0x1(%rax),%esi
mov    $0x1,%edi
call   10b0 <calloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1080 <strlen@plt>
lea    0x1(%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strncpy@plt>
mov    %rbx,%rax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
lea    0xcf4(%rip),%rdi
call   1060 <puts@plt>
lea    0xcc6(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0xa,%edi
call   10d0 <exit@plt>
lea    0xcca(%rip),%rdi
call   1060 <puts@plt>
mov    $0x7,%edi
call   10d0 <exit@plt>
lea    0xc68(%rip),%rdi
call   1060 <puts@plt>
lea    0xc86(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0x8,%edi
call   10d0 <exit@plt>
lea    0xc13(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0xb,%edi
call   10d0 <exit@plt>
lea    0xbc6(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0xc,%edi
call   10d0 <exit@plt>
lea    0xb8c(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0xd,%edi
call   10d0 <exit@plt>
lea    0xc30(%rip),%rdi
call   1060 <puts@plt>
lea    0xc02(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0x9,%edi
call   10d0 <exit@plt>
lea    0xb44(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0xe,%edi
call   10d0 <exit@plt>
lea    0xb26(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0xf,%edi
call   10d0 <exit@plt>
lea    0xae5(%rip),%rdi
call   1060 <puts@plt>
lea    0xb9c(%rip),%rdi
jmp    153a <getExpr+0x38a>

LLVM IR (-O0):
@.str = [28 x i8] c"Expiration Month and year: \00"
@.str.1 = [46 x i8] c"You have entered an invalid expiration date.\0A\00"
@.str.2 = [43 x i8] c"Your expiration date is an invalid length\0A\00"
@.str.3 = [35 x i8] c"Please use the format MM/DD/YYYY.\0A\00"
@.str.4 = [4 x i8] c"%c\0A\00"
@.str.5 = [44 x i8] c"Invalid Day. Please enter a valid day 1-31\0A\00"
@.str.6 = [48 x i8] c"Invalid Month. Please enter a valid month 1-12\0A\00"
@.str.7 = [29 x i8] c"Invalid Date. Card Expired.\0A\00"
@.str.8 = [11 x i8] c"January %d\00"
@.str.9 = [12 x i8] c"February %d\00"
@.str.10 = [9 x i8] c"March %d\00"
@.str.11 = [7 x i8] c"May %d\00"
@.str.12 = [8 x i8] c"June %d\00"
@.str.13 = [8 x i8] c"July %d\00"
@.str.14 = [10 x i8] c"August %d\00"
@.str.15 = [13 x i8] c"September %d\00"
@.str.16 = [11 x i8] c"October %d\00"
@.str.17 = [12 x i8] c"November %d\00"
@.str.18 = [12 x i8] c"December %d\00"
@.str.19 = [36 x i8] c"You have entered an invalid month.\0A\00"
define i8* @getExpr() {
%1 = alloca i8*
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca [50 x i8]
%7 = alloca [3 x i8]
%8 = alloca i32
%9 = alloca [3 x i8]
%10 = alloca i32
%11 = alloca [5 x i8]
%12 = alloca i32
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%14 = call i8* (...) @getInput()
store i8* %14, i8** %1
%15 = load i8*, i8** %1
%16 = icmp eq i8* %15, null
br i1 %16, label %17, label %20
17: ; preds = %0
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @exit(i32 7)
unreachable
20: ; preds = %0
%21 = load i8*, i8** %1
%22 = call i32 @strlen(i8* %21)
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = icmp ne i32 %23, 11
br i1 %24, label %25, label %31
25: ; preds = %20
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%28 = load i8*, i8** %1
%29 = call i32 @free(i8* %28)
%30 = call i32 @exit(i32 8)
unreachable
31: ; preds = %20
store i32 0, i32* %3
br label %32
32: ; preds = %94, %31
%33 = load i32, i32* %3
%34 = load i32, i32* %2
%35 = icmp ult i32 %33, %34
br i1 %35, label %36, label %97
36: ; preds = %32
%37 = load i32, i32* %3
%38 = icmp eq i32 %37, 2
br i1 %38, label %42, label %39
39: ; preds = %36
%40 = load i32, i32* %3
%41 = icmp eq i32 %40, 5
br i1 %41, label %42, label %57
42: ; preds = %39, %36
%43 = load i8*, i8** %1
%44 = load i32, i32* %3
%45 = zext i32 %44 to i64
%46 = getelementptr inbounds i8, i8* %43, i64 %45
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp ne i32 %48, 47
br i1 %49, label %50, label %56
50: ; preds = %42
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%53 = load i8*, i8** %1
%54 = call i32 @free(i8* %53)
%55 = call i32 @exit(i32 9)
unreachable
56: ; preds = %42
br label %93
57: ; preds = %39
%58 = load i8*, i8** %1
%59 = load i32, i32* %3
%60 = zext i32 %59 to i64
%61 = getelementptr inbounds i8, i8* %58, i64 %60
%62 = load i8, i8* %61
%63 = call i32 @isdigit(i8 signext %62)
%64 = icmp ne i32 %63, 0
br i1 %64, label %92, label %65
65: ; preds = %57
%66 = load i8*, i8** %1
%67 = load i32, i32* %3
%68 = zext i32 %67 to i64
%69 = getelementptr inbounds i8, i8* %66, i64 %68
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %71)
%73 = load i32, i32* %3
%74 = load i32, i32* %2
%75 = sub i32 %74, 1
%76 = icmp eq i32 %73, %75
br i1 %76, label %77, label %85
77: ; preds = %65
%78 = load i8*, i8** %1
%79 = load i32, i32* %3
%80 = zext i32 %79 to i64
%81 = getelementptr inbounds i8, i8* %78, i64 %80
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = icmp eq i32 %83, 10
br i1 %84, label %91, label %85
85: ; preds = %77, %65
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%88 = load i8*, i8** %1
%89 = call i32 @free(i8* %88)
%90 = call i32 @exit(i32 10)
unreachable
91: ; preds = %77
br label %92
92: ; preds = %91, %57
br label %93
93: ; preds = %92, %56
br label %94
94: ; preds = %93
%95 = load i32, i32* %3
%96 = add i32 %95, 1
store i32 %96, i32* %3
br label %32
97: ; preds = %32
%98 = load i8*, i8** %1
%99 = call i64 @strtod(i8* %98, i8** %4)
%100 = trunc i64 %99 to i32
store i32 %100, i32* %5
%101 = load i8*, i8** %1
%102 = getelementptr inbounds i8, i8* %101, i64 3
%103 = load i8, i8* %102
%104 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
store i8 %103, i8* %104
%105 = load i8*, i8** %1
%106 = getelementptr inbounds i8, i8* %105, i64 4
%107 = load i8, i8* %106
%108 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 1
store i8 %107, i8* %108
%109 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 2
store i8 0, i8* %109
%110 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%111 = call i64 @strtod(i8* %110, i8** %4)
%112 = trunc i64 %111 to i32
store i32 %112, i32* %8
%113 = load i32, i32* %8
%114 = icmp sgt i32 %113, 31
br i1 %114, label %118, label %115
115: ; preds = %97
%116 = load i32, i32* %8
%117 = icmp slt i32 %116, 1
br i1 %117, label %118, label %123
118: ; preds = %115, %97
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0))
%120 = load i8*, i8** %1
%121 = call i32 @free(i8* %120)
%122 = call i32 @exit(i32 11)
unreachable
123: ; preds = %115
%124 = load i8*, i8** %1
%125 = getelementptr inbounds i8, i8* %124, i64 0
%126 = load i8, i8* %125
%127 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 0
store i8 %126, i8* %127
%128 = load i8*, i8** %1
%129 = getelementptr inbounds i8, i8* %128, i64 1
%130 = load i8, i8* %129
%131 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 1
store i8 %130, i8* %131
%132 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 2
store i8 0, i8* %132
%133 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 0
%134 = call i64 @strtod(i8* %133, i8** %4)
%135 = trunc i64 %134 to i32
store i32 %135, i32* %10
%136 = load i32, i32* %10
%137 = icmp sgt i32 %136, 12
br i1 %137, label %141, label %138
138: ; preds = %123
%139 = load i32, i32* %10
%140 = icmp slt i32 %139, 1
br i1 %140, label %141, label %146
141: ; preds = %138, %123
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%143 = load i8*, i8** %1
%144 = call i32 @free(i8* %143)
%145 = call i32 @exit(i32 12)
unreachable
146: ; preds = %138
%147 = load i8*, i8** %1
%148 = getelementptr inbounds i8, i8* %147, i64 6
%149 = load i8, i8* %148
%150 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 0
store i8 %149, i8* %150
%151 = load i8*, i8** %1
%152 = getelementptr inbounds i8, i8* %151, i64 7
%153 = load i8, i8* %152
%154 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 1
store i8 %153, i8* %154
%155 = load i8*, i8** %1
%156 = getelementptr inbounds i8, i8* %155, i64 8
%157 = load i8, i8* %156
%158 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 2
store i8 %157, i8* %158
%159 = load i8*, i8** %1
%160 = getelementptr inbounds i8, i8* %159, i64 9
%161 = load i8, i8* %160
%162 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 3
store i8 %161, i8* %162
%163 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 4
store i8 0, i8* %163
%164 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 0
%165 = call i64 @strtod(i8* %164, i8** %4)
%166 = trunc i64 %165 to i32
store i32 %166, i32* %12
%167 = load i32, i32* %12
%168 = icmp slt i32 %167, 2017
br i1 %168, label %169, label %174
169: ; preds = %146
%170 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
%171 = load i8*, i8** %1
%172 = call i32 @free(i8* %171)
%173 = call i32 @exit(i32 13)
unreachable
174: ; preds = %146
%175 = load i32, i32* %12
%176 = icmp eq i32 %175, 2017
br i1 %176, label %177, label %198
177: ; preds = %174
%178 = load i32, i32* %10
%179 = icmp slt i32 %178, 4
br i1 %179, label %180, label %185
180: ; preds = %177
%181 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
%182 = load i8*, i8** %1
%183 = call i32 @free(i8* %182)
%184 = call i32 @exit(i32 14)
unreachable
185: ; preds = %177
%186 = load i32, i32* %10
%187 = icmp eq i32 %186, 4
br i1 %187, label %188, label %197
188: ; preds = %185
%189 = load i32, i32* %8
%190 = icmp slt i32 %189, 27
br i1 %190, label %191, label %196
191: ; preds = %188
%192 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
%193 = load i8*, i8** %1
%194 = call i32 @free(i8* %193)
%195 = call i32 @exit(i32 15)
unreachable
196: ; preds = %188
br label %197
197: ; preds = %196, %185
br label %198
198: ; preds = %197, %174
%199 = load i32, i32* %5
switch i32 %199, label %267 [
i32 1, label %200
i32 2, label %206
i32 3, label %212
i32 4, label %218
i32 5, label %219
i32 6, label %225
i32 7, label %231
i32 8, label %237
i32 9, label %243
i32 10, label %249
i32 11, label %255
i32 12, label %261
]
200: ; preds = %198
%201 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%202 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%203 = call i64 @strtod(i8* %202, i8** %4)
%204 = trunc i64 %203 to i32
%205 = call i32 @sprintf(i8* %201, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i32 %204)
br label %273
206: ; preds = %198
%207 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%208 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%209 = call i64 @strtod(i8* %208, i8** %4)
%210 = trunc i64 %209 to i32
%211 = call i32 @sprintf(i8* %207, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32 %210)
br label %273
212: ; preds = %198
%213 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%214 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%215 = call i64 @strtod(i8* %214, i8** %4)
%216 = trunc i64 %215 to i32
%217 = call i32 @sprintf(i8* %213, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i32 %216)
br label %218
218: ; preds = %198, %212
br label %273
219: ; preds = %198
%220 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%221 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%222 = call i64 @strtod(i8* %221, i8** %4)
%223 = trunc i64 %222 to i32
%224 = call i32 @sprintf(i8* %220, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 %223)
br label %273
225: ; preds = %198
%226 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%227 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%228 = call i64 @strtod(i8* %227, i8** %4)
%229 = trunc i64 %228 to i32
%230 = call i32 @sprintf(i8* %226, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), i32 %229)
br label %273
231: ; preds = %198
%232 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%233 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%234 = call i64 @strtod(i8* %233, i8** %4)
%235 = trunc i64 %234 to i32
%236 = call i32 @sprintf(i8* %232, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i32 %235)
br label %273
237: ; preds = %198
%238 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%239 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%240 = call i64 @strtod(i8* %239, i8** %4)
%241 = trunc i64 %240 to i32
%242 = call i32 @sprintf(i8* %238, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i32 %241)
br label %273
243: ; preds = %198
%244 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%245 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%246 = call i64 @strtod(i8* %245, i8** %4)
%247 = trunc i64 %246 to i32
%248 = call i32 @sprintf(i8* %244, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.15, i64 0, i64 0), i32 %247)
br label %273
249: ; preds = %198
%250 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%251 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%252 = call i64 @strtod(i8* %251, i8** %4)
%253 = trunc i64 %252 to i32
%254 = call i32 @sprintf(i8* %250, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i64 0, i64 0), i32 %253)
br label %273
255: ; preds = %198
%256 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%257 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%258 = call i64 @strtod(i8* %257, i8** %4)
%259 = trunc i64 %258 to i32
%260 = call i32 @sprintf(i8* %256, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 %259)
br label %273
261: ; preds = %198
%262 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%263 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%264 = call i64 @strtod(i8* %263, i8** %4)
%265 = trunc i64 %264 to i32
%266 = call i32 @sprintf(i8* %262, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 %265)
br label %273
267: ; preds = %198
%268 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.19, i64 0, i64 0))
%269 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
%270 = load i8*, i8** %1
%271 = call i32 @free(i8* %270)
%272 = call i32 @exit(i32 12)
unreachable
273: ; preds = %261, %255, %249, %243, %237, %231, %225, %219, %218, %206, %200
%274 = load i8*, i8** %1
%275 = call i32 @free(i8* %274)
%276 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%277 = call i32 @strlen(i8* %276)
%278 = add nsw i32 %277, 1
%279 = call i64 @calloc(i32 1, i32 %278)
%280 = inttoptr i64 %279 to i8*
store i8* %280, i8** %1
%281 = load i8*, i8** %1
%282 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%283 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%284 = call i32 @strlen(i8* %283)
%285 = add nsw i32 %284, 1
%286 = call i32 @strncpy(i8* %281, i8* %282, i32 %285)
%287 = load i8*, i8** %1
ret i8* %287
}

LLVM IR (-O2):
@.str = [28 x i8] c"Expiration Month and year: \00"
@.str.4 = [4 x i8] c"%c\0A\00"
@.str.8 = [11 x i8] c"January %d\00"
@.str.9 = [12 x i8] c"February %d\00"
@.str.10 = [9 x i8] c"March %d\00"
@.str.11 = [7 x i8] c"May %d\00"
@.str.12 = [8 x i8] c"June %d\00"
@.str.13 = [8 x i8] c"July %d\00"
@.str.14 = [10 x i8] c"August %d\00"
@.str.15 = [13 x i8] c"September %d\00"
@.str.16 = [11 x i8] c"October %d\00"
@.str.17 = [12 x i8] c"November %d\00"
@.str.18 = [12 x i8] c"December %d\00"
@str = [35 x i8] c"You have entered an invalid month.\00"
@str.23 = [28 x i8] c"Invalid Date. Card Expired.\00"
@str.24 = [47 x i8] c"Invalid Month. Please enter a valid month 1-12\00"
@str.25 = [43 x i8] c"Invalid Day. Please enter a valid day 1-31\00"
@str.30 = [42 x i8] c"Your expiration date is an invalid length\00"
@str.31 = [34 x i8] c"Please use the format MM/DD/YYYY.\00"
@str.32 = [45 x i8] c"You have entered an invalid expiration date.\00"
define i8* @getExpr() {
%1 = alloca i8*
%2 = alloca [50 x i8]
%3 = alloca [3 x i8]
%4 = alloca [3 x i8]
%5 = alloca [5 x i8]
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%7 = tail call i8* (...) @getInput()
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.32, i64 0, i64 0))
%11 = tail call i32 @exit(i32 7)
unreachable
12: ; preds = %0
%13 = tail call i32 @strlen(i8* %7)
%14 = icmp eq i32 %13, 11
br i1 %14, label %41, label %15
15: ; preds = %12
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.30, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.31, i64 0, i64 0))
%18 = tail call i32 @free(i8* %7)
%19 = tail call i32 @exit(i32 8)
unreachable
20: ; preds = %103, %52
%21 = bitcast i8** %1 to i8*
%22 = call i64 @strtod(i8* %7, i8** %1)
%23 = trunc i64 %22 to i32
%24 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%25 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%26 = getelementptr inbounds i8, i8* %7, i64 3
%27 = load i8, i8* %26
store i8 %27, i8* %25
%28 = getelementptr inbounds i8, i8* %7, i64 4
%29 = load i8, i8* %28
%30 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 1
store i8 %29, i8* %30
%31 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 2
store i8 0, i8* %31
%32 = call i64 @strtod(i8* %25, i8** %1)
%33 = trunc i64 %32 to i32
%34 = add i32 %33, -32
%35 = icmp ult i32 %34, -31
br i1 %35, label %108, label %112
36: ; preds = %79, %65
%37 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.32, i64 0, i64 0))
%38 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.31, i64 0, i64 0))
%39 = tail call i32 @free(i8* %7)
%40 = tail call i32 @exit(i32 9)
unreachable
41: ; preds = %12
%42 = load i8, i8* %7
%43 = tail call i32 @isdigit(i8 signext %42)
%44 = icmp eq i32 %43, 0
br i1 %44, label %45, label %60
45: ; preds = %103, %98, %93, %88, %83, %74, %69, %60, %41
%46 = phi i1 [ true, %103 ], [ false, %98 ], [ false, %93 ], [ false, %88 ], [ false, %83 ], [ false, %74 ], [ false, %69 ], [ false, %60 ], [ false, %41 ]
%47 = phi i64 [ 10, %103 ], [ 9, %98 ], [ 8, %93 ], [ 7, %88 ], [ 6, %83 ], [ 4, %74 ], [ 3, %69 ], [ 1, %60 ], [ 0, %41 ]
%48 = getelementptr inbounds i8, i8* %7, i64 %47
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %50)
br i1 %46, label %52, label %55
52: ; preds = %45
%53 = load i8, i8* %48
%54 = icmp eq i8 %53, 10
br i1 %54, label %20, label %55
55: ; preds = %52, %45
%56 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.32, i64 0, i64 0))
%57 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.31, i64 0, i64 0))
%58 = tail call i32 @free(i8* %7)
%59 = tail call i32 @exit(i32 10)
unreachable
60: ; preds = %41
%61 = getelementptr inbounds i8, i8* %7, i64 1
%62 = load i8, i8* %61
%63 = tail call i32 @isdigit(i8 signext %62)
%64 = icmp eq i32 %63, 0
br i1 %64, label %45, label %65
65: ; preds = %60
%66 = getelementptr inbounds i8, i8* %7, i64 2
%67 = load i8, i8* %66
%68 = icmp eq i8 %67, 47
br i1 %68, label %69, label %36
69: ; preds = %65
%70 = getelementptr inbounds i8, i8* %7, i64 3
%71 = load i8, i8* %70
%72 = tail call i32 @isdigit(i8 signext %71)
%73 = icmp eq i32 %72, 0
br i1 %73, label %45, label %74
74: ; preds = %69
%75 = getelementptr inbounds i8, i8* %7, i64 4
%76 = load i8, i8* %75
%77 = tail call i32 @isdigit(i8 signext %76)
%78 = icmp eq i32 %77, 0
br i1 %78, label %45, label %79
79: ; preds = %74
%80 = getelementptr inbounds i8, i8* %7, i64 5
%81 = load i8, i8* %80
%82 = icmp eq i8 %81, 47
br i1 %82, label %83, label %36
83: ; preds = %79
%84 = getelementptr inbounds i8, i8* %7, i64 6
%85 = load i8, i8* %84
%86 = tail call i32 @isdigit(i8 signext %85)
%87 = icmp eq i32 %86, 0
br i1 %87, label %45, label %88
88: ; preds = %83
%89 = getelementptr inbounds i8, i8* %7, i64 7
%90 = load i8, i8* %89
%91 = tail call i32 @isdigit(i8 signext %90)
%92 = icmp eq i32 %91, 0
br i1 %92, label %45, label %93
93: ; preds = %88
%94 = getelementptr inbounds i8, i8* %7, i64 8
%95 = load i8, i8* %94
%96 = tail call i32 @isdigit(i8 signext %95)
%97 = icmp eq i32 %96, 0
br i1 %97, label %45, label %98
98: ; preds = %93
%99 = getelementptr inbounds i8, i8* %7, i64 9
%100 = load i8, i8* %99
%101 = tail call i32 @isdigit(i8 signext %100)
%102 = icmp eq i32 %101, 0
br i1 %102, label %45, label %103
103: ; preds = %98
%104 = getelementptr inbounds i8, i8* %7, i64 10
%105 = load i8, i8* %104
%106 = tail call i32 @isdigit(i8 signext %105)
%107 = icmp eq i32 %106, 0
br i1 %107, label %45, label %20
108: ; preds = %20
%109 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.25, i64 0, i64 0))
%110 = call i32 @free(i8* %7)
%111 = call i32 @exit(i32 11)
unreachable
112: ; preds = %20
%113 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%114 = load i8, i8* %7
store i8 %114, i8* %113
%115 = getelementptr inbounds i8, i8* %7, i64 1
%116 = load i8, i8* %115
%117 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 1
store i8 %116, i8* %117
%118 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 2
store i8 0, i8* %118
%119 = call i64 @strtod(i8* %113, i8** %1)
%120 = trunc i64 %119 to i32
%121 = add i32 %120, -13
%122 = icmp ult i32 %121, -12
br i1 %122, label %123, label %127
123: ; preds = %112
%124 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.24, i64 0, i64 0))
%125 = call i32 @free(i8* %7)
%126 = call i32 @exit(i32 12)
unreachable
127: ; preds = %112
%128 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%129 = getelementptr inbounds i8, i8* %7, i64 6
%130 = load i8, i8* %129
store i8 %130, i8* %128
%131 = getelementptr inbounds i8, i8* %7, i64 7
%132 = load i8, i8* %131
%133 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 1
store i8 %132, i8* %133
%134 = getelementptr inbounds i8, i8* %7, i64 8
%135 = load i8, i8* %134
%136 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 2
store i8 %135, i8* %136
%137 = getelementptr inbounds i8, i8* %7, i64 9
%138 = load i8, i8* %137
%139 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 3
store i8 %138, i8* %139
%140 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 4
store i8 0, i8* %140
%141 = call i64 @strtod(i8* %128, i8** %1)
%142 = trunc i64 %141 to i32
%143 = icmp slt i32 %142, 2017
br i1 %143, label %144, label %148
144: ; preds = %127
%145 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.23, i64 0, i64 0))
%146 = call i32 @free(i8* %7)
%147 = call i32 @exit(i32 13)
unreachable
148: ; preds = %127
%149 = icmp eq i32 %142, 2017
br i1 %149, label %150, label %164
150: ; preds = %148
%151 = icmp ult i32 %120, 4
br i1 %151, label %152, label %156
152: ; preds = %150
%153 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.23, i64 0, i64 0))
%154 = call i32 @free(i8* %7)
%155 = call i32 @exit(i32 14)
unreachable
156: ; preds = %150
%157 = icmp eq i32 %120, 4
%158 = icmp ult i32 %33, 27
%159 = select i1 %157, i1 %158, i1 false
br i1 %159, label %160, label %164
160: ; preds = %156
%161 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.23, i64 0, i64 0))
%162 = call i32 @free(i8* %7)
%163 = call i32 @exit(i32 15)
unreachable
164: ; preds = %156, %148
switch i32 %23, label %175 [
i32 1, label %180
i32 2, label %165
i32 3, label %166
i32 4, label %185
i32 5, label %167
i32 6, label %168
i32 7, label %169
i32 8, label %170
i32 9, label %171
i32 10, label %172
i32 11, label %173
i32 12, label %174
]
165: ; preds = %164
br label %180
166: ; preds = %164
br label %180
167: ; preds = %164
br label %180
168: ; preds = %164
br label %180
169: ; preds = %164
br label %180
170: ; preds = %164
br label %180
171: ; preds = %164
br label %180
172: ; preds = %164
br label %180
173: ; preds = %164
br label %180
174: ; preds = %164
br label %180
175: ; preds = %164
%176 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%177 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.31, i64 0, i64 0))
%178 = call i32 @free(i8* %7)
%179 = call i32 @exit(i32 12)
unreachable
180: ; preds = %164, %165, %166, %167, %168, %169, %170, %171, %172, %173, %174
%181 = phi i8* [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), %174 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), %173 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i64 0, i64 0), %172 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.15, i64 0, i64 0), %171 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), %170 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), %169 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), %168 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), %167 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), %166 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), %165 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), %164 ]
%182 = call i64 @strtod(i8* %25, i8** %1)
%183 = trunc i64 %182 to i32
%184 = call i32 @sprintf(i8* %24, i8* dereferenceable(1) %181, i32 %183)
br label %185
185: ; preds = %180, %164
%186 = call i32 @free(i8* %7)
%187 = call i32 @strlen(i8* %24)
%188 = add nsw i32 %187, 1
%189 = call i64 @calloc(i32 1, i32 %188)
%190 = inttoptr i64 %189 to i8*
%191 = call i32 @strlen(i8* %24)
%192 = add nsw i32 %191, 1
%193 = call i32 @strncpy(i8* %190, i8* %24, i32 %192)
ret i8* %190
}