#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 atoi(char *);
scalar_t__ isalpha(unsigned char);
scalar_t__ isdigit(unsigned char);
scalar_t__ isspace(unsigned char);
int /*<<< orphan*/ mystrnicmp(char *, char *, int);
scalar_t__ strstr(char *, char *);
char *parse_date(char *buf, int *pday, int *pmonth, int *pyear, int *phour,
                 int *pmin, int *psec, int *pgmt) {
  int day, month, year, hour, min, sec, gmt;
  unsigned char *date;
  if (!buf)
    return NULL;
  date = (unsigned char *)strstr(buf, ",");
  if (!date)
    date = (unsigned char *)buf;
  else
    date++;
  while (isspace(*date))
    date++;
  day = atoi((char *)date);
  while (isdigit(*date))
    date++;
  while (isspace(*date))
    date++;
  if (isdigit(*date)) {
    month = atoi((char *)date);
    if (month < 1 || month > 12)
      return NULL;
    while (isdigit(*date))
      date++;
  } else {
    if (!mystrnicmp((char *)date, "jan", 3))
      month = 1;
    else if (!mystrnicmp((char *)date, "feb", 3))
      month = 2;
    else if (!mystrnicmp((char *)date, "mar", 3))
      month = 3;
    else if (!mystrnicmp((char *)date, "apr", 3))
      month = 4;
    else if (!mystrnicmp((char *)date, "may", 3))
      month = 5;
    else if (!mystrnicmp((char *)date, "jun", 3))
      month = 6;
    else if (!mystrnicmp((char *)date, "jul", 3))
      month = 7;
    else if (!mystrnicmp((char *)date, "aug", 3))
      month = 8;
    else if (!mystrnicmp((char *)date, "sep", 3))
      month = 9;
    else if (!mystrnicmp((char *)date, "oct", 3))
      month = 10;
    else if (!mystrnicmp((char *)date, "nov", 3))
      month = 11;
    else if (!mystrnicmp((char *)date, "dec", 3))
      month = 12;
    else
      return NULL;
    while (isalpha(*date))
      date++;
  }
  while (isspace(*date))
    date++;
  year = atoi((char *)date);
  if (year < 78)
    year += 2000;
  else if (year < 200)
    year += 1900;
  while (isdigit(*date))
    date++;
  while (isspace(*date))
    date++;
  hour = atoi((char *)date);
  if (hour < 100) {
    while (isdigit(*date))
      date++;
    while (!isdigit(*date))
      date++;
    min = atoi((char *)date);
    while (isdigit(*date))
      date++;
    while (!isdigit(*date))
      date++;
    sec = atoi((char *)date);
  } else {
    min = hour % 100;
    hour = hour / 100;
    sec = 0;
  }
  while (isdigit(*date))
    date++;
  while (isspace(*date))
    date++;
  gmt = atoi((char *)date);
  gmt = (gmt % 100) + (gmt / 100) * 60;
  while (isdigit(*date))
    date++;
  if (pday)
    *pday = day;
  if (pmonth)
    *pmonth = month;
  if (pyear)
    *pyear = year;
  if (phour)
    *phour = hour;
  if (pmin)
    *pmin = min;
  if (psec)
    *psec = sec;
  if (pgmt)
    *pgmt = gmt;
  return (char *)date;
}


x86 assembly (clang, -O0):
<parse_date>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11a0 <parse_date+0x40>
movq   $0x0,-0x8(%rbp)
jmp    1867 <parse_date+0x707>
mov    -0x10(%rbp),%rdi
lea    0xe55(%rip),%rsi
call   1080 <strstr@plt>
mov    %rax,-0x60(%rbp)
cmpq   $0x0,-0x60(%rbp)
jne    11cc <parse_date+0x6c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
jmp    11d8 <parse_date+0x78>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    11dd <parse_date+0x7d>
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     1204 <parse_date+0xa4>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    11dd <parse_date+0x7d>
mov    -0x60(%rbp),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1237 <parse_date+0xd7>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1210 <parse_date+0xb0>
jmp    123c <parse_date+0xdc>
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     1263 <parse_date+0x103>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    123c <parse_date+0xdc>
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     12d7 <parse_date+0x177>
mov    -0x60(%rbp),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0x1,-0x40(%rbp)
jl     1299 <parse_date+0x139>
cmpl   $0xc,-0x40(%rbp)
jle    12a6 <parse_date+0x146>
movq   $0x0,-0x8(%rbp)
jmp    1867 <parse_date+0x707>
jmp    12ab <parse_date+0x14b>
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     12d2 <parse_date+0x172>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    12ab <parse_date+0x14b>
jmp    1544 <parse_date+0x3e4>
mov    -0x60(%rbp),%rdi
lea    0xd20(%rip),%rsi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
cmp    $0x0,%eax
jne    1301 <parse_date+0x1a1>
movl   $0x1,-0x40(%rbp)
jmp    1513 <parse_date+0x3b3>
mov    -0x60(%rbp),%rdi
lea    0xcfa(%rip),%rsi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
cmp    $0x0,%eax
jne    132b <parse_date+0x1cb>
movl   $0x2,-0x40(%rbp)
jmp    150e <parse_date+0x3ae>
mov    -0x60(%rbp),%rdi
lea    0xcd4(%rip),%rsi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
cmp    $0x0,%eax
jne    1355 <parse_date+0x1f5>
movl   $0x3,-0x40(%rbp)
jmp    1509 <parse_date+0x3a9>
mov    -0x60(%rbp),%rdi
lea    0xcae(%rip),%rsi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
cmp    $0x0,%eax
jne    137f <parse_date+0x21f>
movl   $0x4,-0x40(%rbp)
jmp    1504 <parse_date+0x3a4>
mov    -0x60(%rbp),%rdi
lea    0xc88(%rip),%rsi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
cmp    $0x0,%eax
jne    13a9 <parse_date+0x249>
movl   $0x5,-0x40(%rbp)
jmp    14ff <parse_date+0x39f>
mov    -0x60(%rbp),%rdi
lea    0xc62(%rip),%rsi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
cmp    $0x0,%eax
jne    13d3 <parse_date+0x273>
movl   $0x6,-0x40(%rbp)
jmp    14fa <parse_date+0x39a>
mov    -0x60(%rbp),%rdi
lea    0xc3c(%rip),%rsi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
cmp    $0x0,%eax
jne    13fd <parse_date+0x29d>
movl   $0x7,-0x40(%rbp)
jmp    14f5 <parse_date+0x395>
mov    -0x60(%rbp),%rdi
lea    0xc16(%rip),%rsi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
cmp    $0x0,%eax
jne    1427 <parse_date+0x2c7>
movl   $0x8,-0x40(%rbp)
jmp    14f0 <parse_date+0x390>
mov    -0x60(%rbp),%rdi
lea    0xbf0(%rip),%rsi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
cmp    $0x0,%eax
jne    1451 <parse_date+0x2f1>
movl   $0x9,-0x40(%rbp)
jmp    14eb <parse_date+0x38b>
mov    -0x60(%rbp),%rdi
lea    0xbca(%rip),%rsi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
cmp    $0x0,%eax
jne    147b <parse_date+0x31b>
movl   $0xa,-0x40(%rbp)
jmp    14e6 <parse_date+0x386>
mov    -0x60(%rbp),%rdi
lea    0xba4(%rip),%rsi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
cmp    $0x0,%eax
jne    14a5 <parse_date+0x345>
movl   $0xb,-0x40(%rbp)
jmp    14e1 <parse_date+0x381>
mov    -0x60(%rbp),%rdi
lea    0xb7e(%rip),%rsi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
cmp    $0x0,%eax
jne    14cf <parse_date+0x36f>
movl   $0xc,-0x40(%rbp)
jmp    14dc <parse_date+0x37c>
movq   $0x0,-0x8(%rbp)
jmp    1867 <parse_date+0x707>
jmp    14e1 <parse_date+0x381>
jmp    14e6 <parse_date+0x386>
jmp    14eb <parse_date+0x38b>
jmp    14f0 <parse_date+0x390>
jmp    14f5 <parse_date+0x395>
jmp    14fa <parse_date+0x39a>
jmp    14ff <parse_date+0x39f>
jmp    1504 <parse_date+0x3a4>
jmp    1509 <parse_date+0x3a9>
jmp    150e <parse_date+0x3ae>
jmp    1513 <parse_date+0x3b3>
jmp    1518 <parse_date+0x3b8>
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1060 <isalpha@plt>
cmp    $0x0,%rax
je     153f <parse_date+0x3df>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1518 <parse_date+0x3b8>
jmp    1544 <parse_date+0x3e4>
jmp    1549 <parse_date+0x3e9>
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     1570 <parse_date+0x410>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1549 <parse_date+0x3e9>
mov    -0x60(%rbp),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x4e,-0x44(%rbp)
jge    1596 <parse_date+0x436>
mov    -0x44(%rbp),%eax
add    $0x7d0,%eax
mov    %eax,-0x44(%rbp)
jmp    15b3 <parse_date+0x453>
cmpl   $0xc8,-0x44(%rbp)
jge    15ae <parse_date+0x44e>
mov    -0x44(%rbp),%eax
add    $0x76c,%eax
mov    %eax,-0x44(%rbp)
jmp    15b3 <parse_date+0x453>
jmp    15b8 <parse_date+0x458>
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     15df <parse_date+0x47f>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    15b8 <parse_date+0x458>
jmp    15e4 <parse_date+0x484>
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     160b <parse_date+0x4ab>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    15e4 <parse_date+0x484>
mov    -0x60(%rbp),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x48(%rbp)
cmpl   $0x64,-0x48(%rbp)
jge    1701 <parse_date+0x5a1>
jmp    1626 <parse_date+0x4c6>
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     164d <parse_date+0x4ed>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1626 <parse_date+0x4c6>
jmp    1652 <parse_date+0x4f2>
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1674 <parse_date+0x514>
jmp    1685 <parse_date+0x525>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1652 <parse_date+0x4f2>
mov    -0x60(%rbp),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     16b8 <parse_date+0x558>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1691 <parse_date+0x531>
jmp    16bd <parse_date+0x55d>
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    16df <parse_date+0x57f>
jmp    16f0 <parse_date+0x590>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    16bd <parse_date+0x55d>
mov    -0x60(%rbp),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x50(%rbp)
jmp    1724 <parse_date+0x5c4>
mov    -0x48(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4c(%rbp)
mov    -0x48(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x48(%rbp)
movl   $0x0,-0x50(%rbp)
jmp    1729 <parse_date+0x5c9>
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1750 <parse_date+0x5f0>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1729 <parse_date+0x5c9>
jmp    1755 <parse_date+0x5f5>
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     177c <parse_date+0x61c>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1755 <parse_date+0x5f5>
mov    -0x60(%rbp),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x64(%rbp)
mov    -0x54(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    -0x64(%rbp),%edx
imul   $0x3c,%eax,%eax
add    %eax,%edx
mov    %edx,-0x54(%rbp)
mov    -0x60(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     17d3 <parse_date+0x673>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    17ac <parse_date+0x64c>
cmpq   $0x0,-0x18(%rbp)
je     17e7 <parse_date+0x687>
mov    -0x3c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     17fb <parse_date+0x69b>
mov    -0x40(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
cmpq   $0x0,-0x28(%rbp)
je     180f <parse_date+0x6af>
mov    -0x44(%rbp),%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
cmpq   $0x0,-0x30(%rbp)
je     1823 <parse_date+0x6c3>
mov    -0x48(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
cmpq   $0x0,-0x38(%rbp)
je     1837 <parse_date+0x6d7>
mov    -0x4c(%rbp),%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,(%rax)
cmpq   $0x0,0x10(%rbp)
je     184b <parse_date+0x6eb>
mov    -0x50(%rbp),%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
cmpq   $0x0,0x18(%rbp)
je     185f <parse_date+0x6ff>
mov    -0x54(%rbp),%ecx
mov    0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x60(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_date>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
test   %rdi,%rdi
je     1236 <parse_date+0xd6>
mov    %r9,%r14
mov    %r8,%r15
mov    %rdi,%rbp
mov    %rsi,0x20(%rsp)
mov    %rdx,0x28(%rsp)
mov    %rcx,0x30(%rsp)
lea    0xe6a(%rip),%rsi
call   1080 <strstr@plt>
lea    0x1(%rax),%rbx
test   %rax,%rax
cmove  %rbp,%rbx
add    $0xffffffffffffffff,%rbx
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1040 <isspace@plt>
test   %rax,%rax
jne    11b0 <parse_date+0x50>
mov    %rbx,%rdi
call   1070 <atoi@plt>
mov    %eax,%r12d
add    $0xfffffffffffffffd,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl 0x3(%rbx),%edi
call   1030 <isdigit@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    11e0 <parse_date+0x80>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl 0x2(%rbx),%edi
call   1040 <isspace@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1200 <parse_date+0xa0>
lea    0x1(%rbx),%r13
movzbl 0x1(%rbx),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     1257 <parse_date+0xf7>
mov    %r13,%rdi
call   1070 <atoi@plt>
mov    %eax,%ebp
lea    -0xd(%rbp),%eax
cmp    $0xfffffff4,%eax
jae    1240 <parse_date+0xe0>
xor    %ebx,%ebx
jmp    1628 <parse_date+0x4c8>
nopl   (%rax)
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isdigit@plt>
test   %rax,%rax
jne    1240 <parse_date+0xe0>
jmp    1402 <parse_date+0x2a2>
lea    0xda4(%rip),%rsi
mov    %r13,%rdi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
test   %eax,%eax
je     13ab <parse_date+0x24b>
lea    0xd8c(%rip),%rsi
mov    $0x3,%ebp
mov    %r13,%rdi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
test   %eax,%eax
je     13b2 <parse_date+0x252>
lea    0xd6f(%rip),%rsi
mov    %r13,%rdi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
test   %eax,%eax
je     13f0 <parse_date+0x290>
lea    0xd57(%rip),%rsi
mov    %r13,%rdi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
test   %eax,%eax
je     13b9 <parse_date+0x259>
lea    0xd3f(%rip),%rsi
mov    %r13,%rdi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
test   %eax,%eax
je     13c0 <parse_date+0x260>
lea    0xd27(%rip),%rsi
mov    %r13,%rdi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
test   %eax,%eax
je     13c7 <parse_date+0x267>
lea    0xd0f(%rip),%rsi
mov    %r13,%rdi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
test   %eax,%eax
je     13ce <parse_date+0x26e>
lea    0xcf7(%rip),%rsi
mov    %r13,%rdi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
test   %eax,%eax
je     13d5 <parse_date+0x275>
lea    0xcdf(%rip),%rsi
mov    %r13,%rdi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
test   %eax,%eax
je     13dc <parse_date+0x27c>
lea    0xcc7(%rip),%rsi
mov    %r13,%rdi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
test   %eax,%eax
je     13e3 <parse_date+0x283>
lea    0xcb3(%rip),%rsi
mov    %r13,%rdi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
test   %eax,%eax
je     13ea <parse_date+0x28a>
lea    0xc9f(%rip),%rsi
mov    %r13,%rdi
mov    $0x3,%edx
call   1050 <mystrnicmp@plt>
test   %eax,%eax
jne    1236 <parse_date+0xd6>
mov    $0xc,%ebp
jmp    13f0 <parse_date+0x290>
mov    $0x1,%ebp
jmp    13f0 <parse_date+0x290>
mov    $0x2,%ebp
jmp    13f0 <parse_date+0x290>
mov    $0x4,%ebp
jmp    13f0 <parse_date+0x290>
mov    $0x5,%ebp
jmp    13f0 <parse_date+0x290>
mov    $0x6,%ebp
jmp    13f0 <parse_date+0x290>
mov    $0x7,%ebp
jmp    13f0 <parse_date+0x290>
mov    $0x8,%ebp
jmp    13f0 <parse_date+0x290>
mov    $0x9,%ebp
jmp    13f0 <parse_date+0x290>
mov    $0xa,%ebp
jmp    13f0 <parse_date+0x290>
mov    $0xb,%ebp
nop
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1060 <isalpha@plt>
test   %rax,%rax
jne    13f0 <parse_date+0x290>
mov    %rbp,0x8(%rsp)
mov    %r15,0x10(%rsp)
add    $0xffffffffffffffff,%rbx
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1040 <isspace@plt>
test   %rax,%rax
jne    1410 <parse_date+0x2b0>
mov    %rbx,%rdi
call   1070 <atoi@plt>
mov    %eax,%ebp
lea    0x76c(%rbp),%r13d
cmp    $0xc8,%eax
cmovge %eax,%r13d
add    $0xfffffffffffffffe,%rbx
movzbl 0x2(%rbx),%edi
call   1030 <isdigit@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1440 <parse_date+0x2e0>
mov    %r14,0x18(%rsp)
lea    0x7d0(%rbp),%r14d
xchg   %ax,%ax
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1040 <isspace@plt>
test   %rax,%rax
jne    1460 <parse_date+0x300>
cmp    $0x4e,%ebp
cmovl  %r14d,%r13d
mov    %rbx,%rdi
call   1070 <atoi@plt>
mov    %eax,%r15d
cmp    $0x63,%eax
mov    %r12d,0x4(%rsp)
jg     151f <parse_date+0x3bf>
add    $0xfffffffffffffffc,%rbx
cs nopw 0x0(%rax,%rax,1)
movzbl 0x4(%rbx),%edi
call   1030 <isdigit@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    14a0 <parse_date+0x340>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl 0x3(%rbx),%edi
call   1030 <isdigit@plt>
add    $0x1,%rbx
test   %rax,%rax
je     14c0 <parse_date+0x360>
lea    0x2(%rbx),%rdi
call   1070 <atoi@plt>
mov    %eax,%r12d
xchg   %ax,%ax
movzbl 0x2(%rbx),%edi
call   1030 <isdigit@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    14e0 <parse_date+0x380>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isdigit@plt>
test   %rax,%rax
je     1500 <parse_date+0x3a0>
mov    %rbx,%rdi
call   1070 <atoi@plt>
mov    %eax,(%rsp)
jmp    1540 <parse_date+0x3e0>
mov    %r15d,%eax
mov    %r15d,%r12d
imul   $0x51eb851f,%rax,%rax
shr    $0x25,%rax
imul   $0x64,%eax,%ecx
sub    %ecx,%r12d
movl   $0x0,(%rsp)
mov    %eax,%r15d
add    $0xfffffffffffffffd,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl 0x3(%rbx),%edi
call   1030 <isdigit@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1550 <parse_date+0x3f0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl 0x2(%rbx),%edi
call   1040 <isspace@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1570 <parse_date+0x410>
lea    0x1(%rbx),%rdi
call   1070 <atoi@plt>
movslq %eax,%r14
imul   $0x51eb851f,%r14,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%ecx
sub    %ecx,%r14d
imul   $0x3c,%eax,%ebp
nopl   0x0(%rax,%rax,1)
movzbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isdigit@plt>
test   %rax,%rax
jne    15b0 <parse_date+0x450>
mov    0x20(%rsp),%rax
test   %rax,%rax
je     15d2 <parse_date+0x472>
mov    0x4(%rsp),%ecx
mov    %ecx,(%rax)
mov    0x28(%rsp),%rcx
test   %rcx,%rcx
mov    0x30(%rsp),%rax
je     15e8 <parse_date+0x488>
mov    0x8(%rsp),%rdx
mov    %edx,(%rcx)
test   %rax,%rax
je     15f0 <parse_date+0x490>
mov    %r13d,(%rax)
mov    0x10(%rsp),%rax
test   %rax,%rax
je     15fd <parse_date+0x49d>
mov    %r15d,(%rax)
mov    0x18(%rsp),%rax
test   %rax,%rax
je     160a <parse_date+0x4aa>
mov    %r12d,(%rax)
mov    0x70(%rsp),%rax
test   %rax,%rax
je     1619 <parse_date+0x4b9>
mov    (%rsp),%ecx
mov    %ecx,(%rax)
mov    0x78(%rsp),%rax
test   %rax,%rax
je     1628 <parse_date+0x4c8>
add    %r14d,%ebp
mov    %ebp,(%rax)
mov    %rbx,%rax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c",\00"
@.str.1 = [4 x i8] c"jan\00"
@.str.2 = [4 x i8] c"feb\00"
@.str.3 = [4 x i8] c"mar\00"
@.str.4 = [4 x i8] c"apr\00"
@.str.5 = [4 x i8] c"may\00"
@.str.6 = [4 x i8] c"jun\00"
@.str.7 = [4 x i8] c"jul\00"
@.str.8 = [4 x i8] c"aug\00"
@.str.9 = [4 x i8] c"sep\00"
@.str.10 = [4 x i8] c"oct\00"
@.str.11 = [4 x i8] c"nov\00"
@.str.12 = [4 x i8] c"dec\00"
define i8* @parse_date(i8* %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3, i32* writeonly %4, i32* writeonly %5, i32* writeonly %6, i32* writeonly %7) {
%9 = icmp eq i8* %0, null
br i1 %9, label %208, label %10
10: ; preds = %8
%11 = tail call i64 @strstr(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
%13 = inttoptr i64 %11 to i8*
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = select i1 %12, i8* %0, i8* %14
br label %16
16: ; preds = %16, %10
%17 = phi i8* [ %15, %10 ], [ %21, %16 ]
%18 = load i8, i8* %17
%19 = tail call i64 @isspace(i8 zeroext %18)
%20 = icmp eq i64 %19, 0
%21 = getelementptr inbounds i8, i8* %17, i64 1
br i1 %20, label %22, label %16
22: ; preds = %16
%23 = tail call i32 @atoi(i8* %17)
br label %24
24: ; preds = %24, %22
%25 = phi i8* [ %17, %22 ], [ %29, %24 ]
%26 = load i8, i8* %25
%27 = tail call i64 @isdigit(i8 zeroext %26)
%28 = icmp eq i64 %27, 0
%29 = getelementptr inbounds i8, i8* %25, i64 1
br i1 %28, label %30, label %24
30: ; preds = %24, %30
%31 = phi i8* [ %35, %30 ], [ %25, %24 ]
%32 = load i8, i8* %31
%33 = tail call i64 @isspace(i8 zeroext %32)
%34 = icmp eq i64 %33, 0
%35 = getelementptr inbounds i8, i8* %31, i64 1
br i1 %34, label %36, label %30
36: ; preds = %30
%37 = load i8, i8* %31
%38 = tail call i64 @isdigit(i8 zeroext %37)
%39 = icmp eq i64 %38, 0
br i1 %39, label %50, label %40
40: ; preds = %36
%41 = tail call i32 @atoi(i8* %31)
%42 = add i32 %41, -13
%43 = icmp ult i32 %42, -12
br i1 %43, label %208, label %44
44: ; preds = %40, %44
%45 = phi i8* [ %49, %44 ], [ %31, %40 ]
%46 = load i8, i8* %45
%47 = tail call i64 @isdigit(i8 zeroext %46)
%48 = icmp eq i64 %47, 0
%49 = getelementptr inbounds i8, i8* %45, i64 1
br i1 %48, label %94, label %44
50: ; preds = %36
%51 = tail call i32 @mystrnicmp(i8* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%52 = icmp eq i32 %51, 0
br i1 %52, label %86, label %53
53: ; preds = %50
%54 = tail call i32 @mystrnicmp(i8* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%55 = icmp eq i32 %54, 0
br i1 %55, label %86, label %56
56: ; preds = %53
%57 = tail call i32 @mystrnicmp(i8* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%58 = icmp eq i32 %57, 0
br i1 %58, label %86, label %59
59: ; preds = %56
%60 = tail call i32 @mystrnicmp(i8* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%61 = icmp eq i32 %60, 0
br i1 %61, label %86, label %62
62: ; preds = %59
%63 = tail call i32 @mystrnicmp(i8* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%64 = icmp eq i32 %63, 0
br i1 %64, label %86, label %65
65: ; preds = %62
%66 = tail call i32 @mystrnicmp(i8* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%67 = icmp eq i32 %66, 0
br i1 %67, label %86, label %68
68: ; preds = %65
%69 = tail call i32 @mystrnicmp(i8* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%70 = icmp eq i32 %69, 0
br i1 %70, label %86, label %71
71: ; preds = %68
%72 = tail call i32 @mystrnicmp(i8* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%73 = icmp eq i32 %72, 0
br i1 %73, label %86, label %74
74: ; preds = %71
%75 = tail call i32 @mystrnicmp(i8* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 3)
%76 = icmp eq i32 %75, 0
br i1 %76, label %86, label %77
77: ; preds = %74
%78 = tail call i32 @mystrnicmp(i8* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%79 = icmp eq i32 %78, 0
br i1 %79, label %86, label %80
80: ; preds = %77
%81 = tail call i32 @mystrnicmp(i8* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 3)
%82 = icmp eq i32 %81, 0
br i1 %82, label %86, label %83
83: ; preds = %80
%84 = tail call i32 @mystrnicmp(i8* %31, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i32 3)
%85 = icmp eq i32 %84, 0
br i1 %85, label %86, label %208
86: ; preds = %83, %80, %77, %74, %71, %68, %65, %62, %59, %56, %53, %50
%87 = phi i32 [ 1, %50 ], [ 2, %53 ], [ 3, %56 ], [ 4, %59 ], [ 5, %62 ], [ 6, %65 ], [ 7, %68 ], [ 8, %71 ], [ 9, %74 ], [ 10, %77 ], [ 11, %80 ], [ 12, %83 ]
br label %88
88: ; preds = %88, %86
%89 = phi i8* [ %31, %86 ], [ %93, %88 ]
%90 = load i8, i8* %89
%91 = tail call i64 @isalpha(i8 zeroext %90)
%92 = icmp eq i64 %91, 0
%93 = getelementptr inbounds i8, i8* %89, i64 1
br i1 %92, label %94, label %88
94: ; preds = %44, %88
%95 = phi i32 [ %87, %88 ], [ %41, %44 ]
%96 = phi i8* [ %89, %88 ], [ %45, %44 ]
br label %97
97: ; preds = %97, %94
%98 = phi i8* [ %96, %94 ], [ %102, %97 ]
%99 = load i8, i8* %98
%100 = tail call i64 @isspace(i8 zeroext %99)
%101 = icmp eq i64 %100, 0
%102 = getelementptr inbounds i8, i8* %98, i64 1
br i1 %101, label %103, label %97
103: ; preds = %97
%104 = tail call i32 @atoi(i8* %98)
%105 = icmp slt i32 %104, 78
%106 = icmp slt i32 %104, 200
%107 = add nsw i32 %104, 1900
%108 = select i1 %106, i32 %107, i32 %104
br label %109
109: ; preds = %109, %103
%110 = phi i8* [ %98, %103 ], [ %114, %109 ]
%111 = load i8, i8* %110
%112 = tail call i64 @isdigit(i8 zeroext %111)
%113 = icmp eq i64 %112, 0
%114 = getelementptr inbounds i8, i8* %110, i64 1
br i1 %113, label %115, label %109
115: ; preds = %109
%116 = add nsw i32 %104, 2000
br label %117
117: ; preds = %115, %117
%118 = phi i8* [ %122, %117 ], [ %110, %115 ]
%119 = load i8, i8* %118
%120 = tail call i64 @isspace(i8 zeroext %119)
%121 = icmp eq i64 %120, 0
%122 = getelementptr inbounds i8, i8* %118, i64 1
br i1 %121, label %123, label %117
123: ; preds = %117
%124 = select i1 %105, i32 %116, i32 %108
%125 = tail call i32 @atoi(i8* %118)
%126 = icmp slt i32 %125, 100
br i1 %126, label %127, label %155
127: ; preds = %123, %127
%128 = phi i8* [ %132, %127 ], [ %118, %123 ]
%129 = load i8, i8* %128
%130 = tail call i64 @isdigit(i8 zeroext %129)
%131 = icmp eq i64 %130, 0
%132 = getelementptr inbounds i8, i8* %128, i64 1
br i1 %131, label %133, label %127
133: ; preds = %127, %133
%134 = phi i8* [ %138, %133 ], [ %128, %127 ]
%135 = load i8, i8* %134
%136 = tail call i64 @isdigit(i8 zeroext %135)
%137 = icmp eq i64 %136, 0
%138 = getelementptr inbounds i8, i8* %134, i64 1
br i1 %137, label %133, label %139
139: ; preds = %133
%140 = tail call i32 @atoi(i8* %134)
br label %141
141: ; preds = %141, %139
%142 = phi i8* [ %134, %139 ], [ %146, %141 ]
%143 = load i8, i8* %142
%144 = tail call i64 @isdigit(i8 zeroext %143)
%145 = icmp eq i64 %144, 0
%146 = getelementptr inbounds i8, i8* %142, i64 1
br i1 %145, label %147, label %141
147: ; preds = %141, %147
%148 = phi i8* [ %152, %147 ], [ %142, %141 ]
%149 = load i8, i8* %148
%150 = tail call i64 @isdigit(i8 zeroext %149)
%151 = icmp eq i64 %150, 0
%152 = getelementptr inbounds i8, i8* %148, i64 1
br i1 %151, label %147, label %153
153: ; preds = %147
%154 = tail call i32 @atoi(i8* %148)
br label %158
155: ; preds = %123
%156 = urem i32 %125, 100
%157 = udiv i32 %125, 100
br label %158
158: ; preds = %155, %153
%159 = phi i32 [ %125, %153 ], [ %157, %155 ]
%160 = phi i32 [ %140, %153 ], [ %156, %155 ]
%161 = phi i32 [ %154, %153 ], [ 0, %155 ]
%162 = phi i8* [ %148, %153 ], [ %118, %155 ]
br label %163
163: ; preds = %163, %158
%164 = phi i8* [ %162, %158 ], [ %168, %163 ]
%165 = load i8, i8* %164
%166 = tail call i64 @isdigit(i8 zeroext %165)
%167 = icmp eq i64 %166, 0
%168 = getelementptr inbounds i8, i8* %164, i64 1
br i1 %167, label %169, label %163
169: ; preds = %163, %169
%170 = phi i8* [ %174, %169 ], [ %164, %163 ]
%171 = load i8, i8* %170
%172 = tail call i64 @isspace(i8 zeroext %171)
%173 = icmp eq i64 %172, 0
%174 = getelementptr inbounds i8, i8* %170, i64 1
br i1 %173, label %175, label %169
175: ; preds = %169
%176 = tail call i32 @atoi(i8* %170)
%177 = sdiv i32 %176, 100
%178 = srem i32 %176, 100
%179 = mul nsw i32 %177, 60
br label %180
180: ; preds = %180, %175
%181 = phi i8* [ %170, %175 ], [ %185, %180 ]
%182 = load i8, i8* %181
%183 = tail call i64 @isdigit(i8 zeroext %182)
%184 = icmp eq i64 %183, 0
%185 = getelementptr inbounds i8, i8* %181, i64 1
br i1 %184, label %186, label %180
186: ; preds = %180
%187 = add nsw i32 %179, %178
%188 = icmp eq i32* %1, null
br i1 %188, label %190, label %189
189: ; preds = %186
store i32 %23, i32* %1
br label %190
190: ; preds = %189, %186
%191 = icmp eq i32* %2, null
br i1 %191, label %193, label %192
192: ; preds = %190
store i32 %95, i32* %2
br label %193
193: ; preds = %192, %190
%194 = icmp eq i32* %3, null
br i1 %194, label %196, label %195
195: ; preds = %193
store i32 %124, i32* %3
br label %196
196: ; preds = %195, %193
%197 = icmp eq i32* %4, null
br i1 %197, label %199, label %198
198: ; preds = %196
store i32 %159, i32* %4
br label %199
199: ; preds = %198, %196
%200 = icmp eq i32* %5, null
br i1 %200, label %202, label %201
201: ; preds = %199
store i32 %160, i32* %5
br label %202
202: ; preds = %201, %199
%203 = icmp eq i32* %6, null
br i1 %203, label %205, label %204
204: ; preds = %202
store i32 %161, i32* %6
br label %205
205: ; preds = %204, %202
%206 = icmp eq i32* %7, null
br i1 %206, label %208, label %207
207: ; preds = %205
store i32 %187, i32* %7
br label %208
208: ; preds = %205, %207, %83, %40, %8
%209 = phi i8* [ null, %8 ], [ null, %40 ], [ null, %83 ], [ %181, %207 ], [ %181, %205 ]
ret i8* %209
}