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


x86 assembly (clang, -O0):
<getExprDate>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
lea    0xe6e(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   10a0 <InputHandler@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   10d0 <checkNullity@plt>
movl   $0xb,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12d6 <getExprDate+0x126>
cmpl   $0x2,-0x10(%rbp)
je     1209 <getExprDate+0x59>
cmpl   $0x5,-0x10(%rbp)
jne    124e <getExprDate+0x9e>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
je     1249 <getExprDate+0x99>
lea    0xe1d(%rip),%rdi
call   1080 <printf@plt>
lea    0xe44(%rip),%rdi
call   1080 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0x2,%edi
call   10c0 <exit@plt>
jmp    12c3 <getExprDate+0x113>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1050 <isdigit@plt>
cmp    $0x0,%eax
jne    12be <getExprDate+0x10e>
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    128e <getExprDate+0xde>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
je     12b9 <getExprDate+0x109>
lea    0xdf6(%rip),%rdi
call   1080 <printf@plt>
lea    0xdd4(%rip),%rdi
call   1080 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0x3,%edi
call   10c0 <exit@plt>
jmp    12be <getExprDate+0x10e>
jmp    12c3 <getExprDate+0x113>
jmp    12c8 <getExprDate+0x118>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11e9 <getExprDate+0x39>
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     1322 <getExprDate+0x172>
cmpl   $0x1,-0x58(%rbp)
jge    1341 <getExprDate+0x191>
lea    0xd84(%rip),%rdi
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     137c <getExprDate+0x1cc>
cmpl   $0x1,-0x60(%rbp)
jge    139b <getExprDate+0x1eb>
lea    0xd56(%rip),%rdi
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    1403 <getExprDate+0x253>
lea    0xd1e(%rip),%rdi
call   1080 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0xd,%edi
call   10c0 <exit@plt>
cmpl   $0x7e1,-0x6c(%rbp)
jne    1476 <getExprDate+0x2c6>
cmpl   $0x4,-0x60(%rbp)
jge    1439 <getExprDate+0x289>
lea    0xce8(%rip),%rdi
call   1080 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0xe,%edi
call   10c0 <exit@plt>
cmpl   $0x4,-0x60(%rbp)
jne    1471 <getExprDate+0x2c1>
cmpl   $0x1c,-0x58(%rbp)
jge    146c <getExprDate+0x2bc>
lea    0xcb5(%rip),%rdi
call   1080 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0xf,%edi
call   10c0 <exit@plt>
jmp    1471 <getExprDate+0x2c1>
jmp    1476 <getExprDate+0x2c6>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x78(%rbp)
sub    $0xb,%eax
ja     16bf <getExprDate+0x50f>
mov    -0x78(%rbp),%rax
lea    0xb6a(%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    0xc65(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    16ea <getExprDate+0x53a>
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    0xc3e(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    16ea <getExprDate+0x53a>
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    0xc18(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    16ea <getExprDate+0x53a>
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    0xbef(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    16ea <getExprDate+0x53a>
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    0xbc4(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    16ea <getExprDate+0x53a>
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    0xb9a(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    16ea <getExprDate+0x53a>
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    0xb70(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    16ea <getExprDate+0x53a>
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    0xb48(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    16ea <getExprDate+0x53a>
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    0xb23(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    16ea <getExprDate+0x53a>
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    0xafc(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    16ea <getExprDate+0x53a>
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    0xad6(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    16ea <getExprDate+0x53a>
lea    0xad1(%rip),%rdi
call   1080 <printf@plt>
lea    0xae9(%rip),%rdi
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    %rax,%rsi
add    $0x1,%rsi
mov    $0x1,%edi
call   1090 <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    %rax,%rdx
add    $0x1,%rdx
call   1040 <strncpy@plt>
mov    -0x8(%rbp),%rax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getExprDate>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x58,%rsp
lea    0xe5e(%rip),%rdi
call   1090 <printf@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   10b0 <InputHandler@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   10e0 <checkNullity@plt>
movsbl (%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     128f <getExprDate+0xcf>
movsbl 0x1(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     1293 <getExprDate+0xd3>
cmpb   $0x2f,0x2(%r14)
jne    1516 <getExprDate+0x356>
movsbl 0x3(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     129a <getExprDate+0xda>
movsbl 0x4(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     12a1 <getExprDate+0xe1>
cmpb   $0x2f,0x5(%r14)
jne    1516 <getExprDate+0x356>
movsbl 0x6(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     12a8 <getExprDate+0xe8>
movsbl 0x7(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     12af <getExprDate+0xef>
movsbl 0x8(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     12b6 <getExprDate+0xf6>
movsbl 0x9(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
je     12bd <getExprDate+0xfd>
movsbl 0xa(%r14),%edi
call   1050 <isdigit@plt>
test   %eax,%eax
jne    12d7 <getExprDate+0x117>
mov    $0xa,%eax
mov    $0x1,%bl
jmp    12c4 <getExprDate+0x104>
xor    %eax,%eax
jmp    12c4 <getExprDate+0x104>
mov    $0x1,%eax
jmp    12c2 <getExprDate+0x102>
mov    $0x3,%eax
jmp    12c2 <getExprDate+0x102>
mov    $0x4,%eax
jmp    12c2 <getExprDate+0x102>
mov    $0x6,%eax
jmp    12c2 <getExprDate+0x102>
mov    $0x7,%eax
jmp    12c2 <getExprDate+0x102>
mov    $0x8,%eax
jmp    12c2 <getExprDate+0x102>
mov    $0x9,%eax
xor    %ebx,%ebx
test   %bl,%bl
je     1492 <getExprDate+0x2d2>
cmpb   $0xa,(%r14,%rax,1)
jne    1492 <getExprDate+0x2d2>
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     14bc <getExprDate+0x2fc>
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    14da <getExprDate+0x31a>
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    14f8 <getExprDate+0x338>
cmp    $0x7e1,%eax
jne    13ab <getExprDate+0x1eb>
cmp    $0x3,%ebx
jbe    1540 <getExprDate+0x380>
cmp    $0x4,%ebx
jne    13ab <getExprDate+0x1eb>
cmp    $0x1b,%r15d
jbe    155e <getExprDate+0x39e>
add    $0xffffffff,%r12d
cmp    $0xb,%r12d
ja     157c <getExprDate+0x3bc>
lea    0xc82(%rip),%r15
lea    0xc39(%rip),%rax
movslq (%rax,%r12,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xc76(%rip),%r15
jmp    1428 <getExprDate+0x268>
lea    0xc79(%rip),%r15
jmp    1428 <getExprDate+0x268>
lea    0xc79(%rip),%r15
jmp    1428 <getExprDate+0x268>
lea    0xc77(%rip),%r15
jmp    1428 <getExprDate+0x268>
lea    0xc76(%rip),%r15
jmp    1428 <getExprDate+0x268>
lea    0xc75(%rip),%r15
jmp    1428 <getExprDate+0x268>
lea    0xc76(%rip),%r15
jmp    1428 <getExprDate+0x268>
lea    0xc7a(%rip),%r15
jmp    1428 <getExprDate+0x268>
lea    0xc7c(%rip),%r15
jmp    1428 <getExprDate+0x268>
lea    0xc7f(%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),%rsi
mov    $0x1,%edi
call   10a0 <calloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1080 <strlen@plt>
lea    0x1(%rax),%rdx
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    0xcd5(%rip),%rdi
call   1060 <puts@plt>
lea    0xd1c(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0x3,%edi
call   10d0 <exit@plt>
lea    0xc80(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0xb,%edi
call   10d0 <exit@plt>
lea    0xc33(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0xc,%edi
call   10d0 <exit@plt>
lea    0xbf9(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0xd,%edi
call   10d0 <exit@plt>
lea    0xc72(%rip),%rdi
call   1060 <puts@plt>
lea    0xc98(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0x2,%edi
call   10d0 <exit@plt>
lea    0xbb1(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0xe,%edi
call   10d0 <exit@plt>
lea    0xb93(%rip),%rdi
call   1060 <puts@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0xf,%edi
call   10d0 <exit@plt>
lea    0xb30(%rip),%rdi
call   1060 <puts@plt>
lea    0xb47(%rip),%rdi
jmp    14e1 <getExprDate+0x321>

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

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