#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 */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_mday;
  long tm_mon;
  int tm_year;
  int tm_hour;
  int tm_min;
  int tm_sec;
  long tm_wday;
};

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
scalar_t__ scan_mon(char *, long *);
scalar_t__ scan_wday(char *, long *);
int sscanf(char *, char *, ...);
int /*<<< orphan*/ tm_to_time(struct tm *);
time_t tdate_parse(char *str) {
  struct tm tm;
  char *cp;
  char str_mon[500], str_wday[500];
  int tm_sec, tm_min, tm_hour, tm_mday, tm_year;
  long tm_mon, tm_wday;
  time_t t;
  memset((char *)&tm, 0, sizeof(struct tm));
  for (cp = str; *cp == ' ' || *cp == '\t'; ++cp)
    continue;
  if (sscanf(cp, "%d-%400[a-zA-Z]-%d %d:%d:%d GMT", &tm_mday, str_mon, &tm_year,
             &tm_hour, &tm_min, &tm_sec) == 6 &&
      scan_mon(str_mon, &tm_mon)) {
    tm.tm_mday = tm_mday;
    tm.tm_mon = tm_mon;
    tm.tm_year = tm_year;
    tm.tm_hour = tm_hour;
    tm.tm_min = tm_min;
    tm.tm_sec = tm_sec;
  } else if (sscanf(cp, "%d %400[a-zA-Z] %d %d:%d:%d GMT", &tm_mday, str_mon,
                    &tm_year, &tm_hour, &tm_min, &tm_sec) == 6 &&
             scan_mon(str_mon, &tm_mon)) {
    tm.tm_mday = tm_mday;
    tm.tm_mon = tm_mon;
    tm.tm_year = tm_year;
    tm.tm_hour = tm_hour;
    tm.tm_min = tm_min;
    tm.tm_sec = tm_sec;
  } else if (sscanf(cp, "%d:%d:%d GMT %d-%400[a-zA-Z]-%d", &tm_hour, &tm_min,
                    &tm_sec, &tm_mday, str_mon, &tm_year) == 6 &&
             scan_mon(str_mon, &tm_mon)) {
    tm.tm_hour = tm_hour;
    tm.tm_min = tm_min;
    tm.tm_sec = tm_sec;
    tm.tm_mday = tm_mday;
    tm.tm_mon = tm_mon;
    tm.tm_year = tm_year;
  } else if (sscanf(cp, "%d:%d:%d GMT %d %400[a-zA-Z] %d", &tm_hour, &tm_min,
                    &tm_sec, &tm_mday, str_mon, &tm_year) == 6 &&
             scan_mon(str_mon, &tm_mon)) {
    tm.tm_hour = tm_hour;
    tm.tm_min = tm_min;
    tm.tm_sec = tm_sec;
    tm.tm_mday = tm_mday;
    tm.tm_mon = tm_mon;
    tm.tm_year = tm_year;
  } else if (sscanf(cp, "%400[a-zA-Z], %d-%400[a-zA-Z]-%d %d:%d:%d GMT",
                    str_wday, &tm_mday, str_mon, &tm_year, &tm_hour, &tm_min,
                    &tm_sec) == 7 &&
             scan_wday(str_wday, &tm_wday) && scan_mon(str_mon, &tm_mon)) {
    tm.tm_wday = tm_wday;
    tm.tm_mday = tm_mday;
    tm.tm_mon = tm_mon;
    tm.tm_year = tm_year;
    tm.tm_hour = tm_hour;
    tm.tm_min = tm_min;
    tm.tm_sec = tm_sec;
  } else if (sscanf(cp, "%400[a-zA-Z], %d %400[a-zA-Z] %d %d:%d:%d GMT",
                    str_wday, &tm_mday, str_mon, &tm_year, &tm_hour, &tm_min,
                    &tm_sec) == 7 &&
             scan_wday(str_wday, &tm_wday) && scan_mon(str_mon, &tm_mon)) {
    tm.tm_wday = tm_wday;
    tm.tm_mday = tm_mday;
    tm.tm_mon = tm_mon;
    tm.tm_year = tm_year;
    tm.tm_hour = tm_hour;
    tm.tm_min = tm_min;
    tm.tm_sec = tm_sec;
  } else if (sscanf(cp, "%400[a-zA-Z] %400[a-zA-Z] %d %d:%d:%d GMT %d",
                    str_wday, str_mon, &tm_mday, &tm_hour, &tm_min, &tm_sec,
                    &tm_year) == 7 &&
             scan_wday(str_wday, &tm_wday) && scan_mon(str_mon, &tm_mon)) {
    tm.tm_wday = tm_wday;
    tm.tm_mon = tm_mon;
    tm.tm_mday = tm_mday;
    tm.tm_hour = tm_hour;
    tm.tm_min = tm_min;
    tm.tm_sec = tm_sec;
    tm.tm_year = tm_year;
  } else
    return (time_t)-1;
  if (tm.tm_year > 1900)
    tm.tm_year -= 1900;
  else if (tm.tm_year < 70)
    tm.tm_year += 100;
  t = tm_to_time(&tm);
  return t;
}


x86 assembly (clang, -O0):
<tdate_parse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x490,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x38(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x46d(%rbp)
je     11a2 <tdate_parse+0x52>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x46d(%rbp)
mov    -0x46d(%rbp),%al
test   $0x1,%al
jne    11b5 <tdate_parse+0x65>
jmp    11cb <tdate_parse+0x7b>
jmp    11ba <tdate_parse+0x6a>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    1177 <tdate_parse+0x27>
mov    -0x40(%rbp),%rdi
lea    -0x240(%rbp),%rcx
lea    0xe71(%rip),%rsi
lea    -0x450(%rbp),%rdx
lea    -0x454(%rbp),%r8
lea    -0x44c(%rbp),%r9
lea    -0x448(%rbp),%r10
lea    -0x444(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1040 <sscanf@plt>
cmp    $0x6,%eax
jne    1273 <tdate_parse+0x123>
lea    -0x240(%rbp),%rdi
lea    -0x460(%rbp),%rsi
call   1050 <scan_mon@plt>
cmp    $0x0,%rax
je     1273 <tdate_parse+0x123>
mov    -0x450(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x460(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x454(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x44c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x448(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x444(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1729 <tdate_parse+0x5d9>
mov    -0x40(%rbp),%rdi
lea    -0x240(%rbp),%rcx
lea    0xdf7(%rip),%rsi
lea    -0x450(%rbp),%rdx
lea    -0x454(%rbp),%r8
lea    -0x44c(%rbp),%r9
lea    -0x448(%rbp),%r10
lea    -0x444(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1040 <sscanf@plt>
cmp    $0x6,%eax
jne    131b <tdate_parse+0x1cb>
lea    -0x240(%rbp),%rdi
lea    -0x460(%rbp),%rsi
call   1050 <scan_mon@plt>
cmp    $0x0,%rax
je     131b <tdate_parse+0x1cb>
mov    -0x450(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x460(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x454(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x44c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x448(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x444(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1724 <tdate_parse+0x5d4>
mov    -0x40(%rbp),%rdi
lea    -0x240(%rbp),%r10
lea    0xcd3(%rip),%rsi
lea    -0x44c(%rbp),%rdx
lea    -0x448(%rbp),%rcx
lea    -0x444(%rbp),%r8
lea    -0x450(%rbp),%r9
lea    -0x454(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1040 <sscanf@plt>
cmp    $0x6,%eax
jne    13c3 <tdate_parse+0x273>
lea    -0x240(%rbp),%rdi
lea    -0x460(%rbp),%rsi
call   1050 <scan_mon@plt>
cmp    $0x0,%rax
je     13c3 <tdate_parse+0x273>
mov    -0x44c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x448(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x444(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x450(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x460(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x454(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    171f <tdate_parse+0x5cf>
mov    -0x40(%rbp),%rdi
lea    -0x240(%rbp),%r10
lea    0xc4b(%rip),%rsi
lea    -0x44c(%rbp),%rdx
lea    -0x448(%rbp),%rcx
lea    -0x444(%rbp),%r8
lea    -0x450(%rbp),%r9
lea    -0x454(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1040 <sscanf@plt>
cmp    $0x6,%eax
jne    146b <tdate_parse+0x31b>
lea    -0x240(%rbp),%rdi
lea    -0x460(%rbp),%rsi
call   1050 <scan_mon@plt>
cmp    $0x0,%rax
je     146b <tdate_parse+0x31b>
mov    -0x44c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x448(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x444(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x450(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x460(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x454(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    171a <tdate_parse+0x5ca>
mov    -0x40(%rbp),%rdi
lea    -0x440(%rbp),%rdx
lea    -0x240(%rbp),%r8
lea    0xbbc(%rip),%rsi
lea    -0x450(%rbp),%rcx
lea    -0x454(%rbp),%r9
lea    -0x44c(%rbp),%r11
lea    -0x448(%rbp),%r10
lea    -0x444(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   1040 <sscanf@plt>
cmp    $0x7,%eax
jne    1547 <tdate_parse+0x3f7>
lea    -0x440(%rbp),%rdi
lea    -0x468(%rbp),%rsi
call   1060 <scan_wday@plt>
cmp    $0x0,%rax
je     1547 <tdate_parse+0x3f7>
lea    -0x240(%rbp),%rdi
lea    -0x460(%rbp),%rsi
call   1050 <scan_mon@plt>
cmp    $0x0,%rax
je     1547 <tdate_parse+0x3f7>
mov    -0x468(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x450(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x460(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x454(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x44c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x448(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x444(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1715 <tdate_parse+0x5c5>
mov    -0x40(%rbp),%rdi
lea    -0x440(%rbp),%rdx
lea    -0x240(%rbp),%r8
lea    0xb0e(%rip),%rsi
lea    -0x450(%rbp),%rcx
lea    -0x454(%rbp),%r9
lea    -0x44c(%rbp),%r11
lea    -0x448(%rbp),%r10
lea    -0x444(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   1040 <sscanf@plt>
cmp    $0x7,%eax
jne    1623 <tdate_parse+0x4d3>
lea    -0x440(%rbp),%rdi
lea    -0x468(%rbp),%rsi
call   1060 <scan_wday@plt>
cmp    $0x0,%rax
je     1623 <tdate_parse+0x4d3>
lea    -0x240(%rbp),%rdi
lea    -0x460(%rbp),%rsi
call   1050 <scan_mon@plt>
cmp    $0x0,%rax
je     1623 <tdate_parse+0x4d3>
mov    -0x468(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x450(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x460(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x454(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x44c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x448(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x444(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1710 <tdate_parse+0x5c0>
mov    -0x40(%rbp),%rdi
lea    -0x440(%rbp),%rdx
lea    -0x240(%rbp),%rcx
lea    0xa60(%rip),%rsi
lea    -0x450(%rbp),%r8
lea    -0x44c(%rbp),%r9
lea    -0x448(%rbp),%r11
lea    -0x444(%rbp),%r10
lea    -0x454(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   1040 <sscanf@plt>
cmp    $0x7,%eax
jne    16ff <tdate_parse+0x5af>
lea    -0x440(%rbp),%rdi
lea    -0x468(%rbp),%rsi
call   1060 <scan_wday@plt>
cmp    $0x0,%rax
je     16ff <tdate_parse+0x5af>
lea    -0x240(%rbp),%rdi
lea    -0x460(%rbp),%rsi
call   1050 <scan_mon@plt>
cmp    $0x0,%rax
je     16ff <tdate_parse+0x5af>
mov    -0x468(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x460(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x450(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x44c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x448(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x444(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x454(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    170b <tdate_parse+0x5bb>
movl   $0xffffffff,-0x4(%rbp)
jmp    1776 <tdate_parse+0x626>
jmp    1710 <tdate_parse+0x5c0>
jmp    1715 <tdate_parse+0x5c5>
jmp    171a <tdate_parse+0x5ca>
jmp    171f <tdate_parse+0x5cf>
jmp    1724 <tdate_parse+0x5d4>
jmp    1729 <tdate_parse+0x5d9>
cmpl   $0x76c,-0x28(%rbp)
jle    1746 <tdate_parse+0x5f6>
mov    -0x28(%rbp),%eax
sub    $0x76c,%eax
mov    %eax,-0x28(%rbp)
jmp    175e <tdate_parse+0x60e>
cmpl   $0x46,-0x28(%rbp)
jge    1759 <tdate_parse+0x609>
mov    -0x28(%rbp),%eax
add    $0x64,%eax
mov    %eax,-0x28(%rbp)
jmp    175e <tdate_parse+0x60e>
lea    -0x38(%rbp),%rdi
call   1070 <tm_to_time@plt>
mov    %eax,-0x46c(%rbp)
mov    -0x46c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x490,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tdate_parse>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x448,%rsp
mov    %rdi,%rbx
lea    0x20(%rsp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
jmp    1184 <tdate_parse+0x34>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
movzbl (%rbx),%eax
cmp    $0x20,%al
je     1180 <tdate_parse+0x30>
cmp    $0x9,%al
je     1180 <tdate_parse+0x30>
lea    0x14(%rsp),%rbp
lea    0x10(%rsp),%r15
lea    0xeae(%rip),%rsi
lea    0x4(%rsp),%rdx
lea    0x50(%rsp),%rcx
lea    0xc(%rsp),%r8
lea    0x8(%rsp),%r9
mov    %rbx,%rdi
xor    %eax,%eax
push   %rbp
push   %r15
call   1040 <sscanf@plt>
add    $0x10,%rsp
cmp    $0x6,%eax
jne    11e2 <tdate_parse+0x92>
lea    0x50(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1050 <scan_mon@plt>
test   %rax,%rax
jne    13dc <tdate_parse+0x28c>
lea    0xe93(%rip),%rsi
lea    0x4(%rsp),%rdx
lea    0x50(%rsp),%r13
lea    0xc(%rsp),%r14
lea    0x8(%rsp),%r9
mov    %rbx,%rdi
mov    %r13,%rcx
mov    %r14,%r8
xor    %eax,%eax
push   %rbp
push   %r15
call   1040 <sscanf@plt>
add    $0x10,%rsp
cmp    $0x6,%eax
jne    1231 <tdate_parse+0xe1>
lea    0x50(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1050 <scan_mon@plt>
test   %rax,%rax
jne    13dc <tdate_parse+0x28c>
lea    0xdc8(%rip),%rsi
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x14(%rsp),%r8
lea    0x4(%rsp),%r9
mov    %rbx,%rdi
xor    %eax,%eax
push   %r14
push   %r13
call   1040 <sscanf@plt>
add    $0x10,%rsp
cmp    $0x6,%eax
jne    1277 <tdate_parse+0x127>
lea    0x50(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1050 <scan_mon@plt>
test   %rax,%rax
jne    12c6 <tdate_parse+0x176>
lea    0xda2(%rip),%rsi
lea    0x8(%rsp),%r12
lea    0x10(%rsp),%rbp
lea    0x14(%rsp),%r15
lea    0x4(%rsp),%r9
mov    %rbx,%rdi
mov    %r12,%rdx
mov    %rbp,%rcx
mov    %r15,%r8
xor    %eax,%eax
push   %r14
push   %r13
call   1040 <sscanf@plt>
add    $0x10,%rsp
cmp    $0x6,%eax
jne    12fd <tdate_parse+0x1ad>
lea    0x50(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1050 <scan_mon@plt>
test   %rax,%rax
je     12fd <tdate_parse+0x1ad>
mov    0x8(%rsp),%eax
mov    %eax,0x34(%rsp)
mov    0x10(%rsp),%eax
mov    %eax,0x38(%rsp)
mov    0x14(%rsp),%eax
mov    %eax,0x3c(%rsp)
mov    0x4(%rsp),%eax
mov    %eax,0x20(%rsp)
mov    0x18(%rsp),%rax
mov    %rax,0x28(%rsp)
mov    0xc(%rsp),%eax
mov    %eax,0x30(%rsp)
jmp    140e <tdate_parse+0x2be>
sub    $0x8,%rsp
lea    0xd38(%rip),%rsi
lea    0x258(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x58(%rsp),%r8
lea    0x14(%rsp),%r9
mov    %rbx,%rdi
xor    %eax,%eax
push   %r15
push   %rbp
push   %r12
call   1040 <sscanf@plt>
add    $0x20,%rsp
cmp    $0x7,%eax
jne    1362 <tdate_parse+0x212>
lea    0x250(%rsp),%rdi
lea    0x48(%rsp),%rsi
call   1060 <scan_wday@plt>
test   %rax,%rax
je     1362 <tdate_parse+0x212>
lea    0x50(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1050 <scan_mon@plt>
test   %rax,%rax
jne    13d2 <tdate_parse+0x282>
sub    $0x8,%rsp
lea    0xd01(%rip),%rsi
lea    0x258(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x58(%rsp),%r8
lea    0x14(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%r9
xor    %eax,%eax
push   %r15
push   %rbp
push   %r12
call   1040 <sscanf@plt>
add    $0x20,%rsp
cmp    $0x7,%eax
jne    144a <tdate_parse+0x2fa>
lea    0x250(%rsp),%rdi
lea    0x48(%rsp),%rsi
call   1060 <scan_wday@plt>
test   %rax,%rax
je     144a <tdate_parse+0x2fa>
lea    0x50(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1050 <scan_mon@plt>
test   %rax,%rax
je     144a <tdate_parse+0x2fa>
mov    0x48(%rsp),%rax
mov    %rax,0x40(%rsp)
mov    0x4(%rsp),%eax
mov    %eax,0x20(%rsp)
mov    0x18(%rsp),%rax
mov    %rax,0x28(%rsp)
mov    0xc(%rsp),%eax
mov    %eax,0x30(%rsp)
mov    0x8(%rsp),%ecx
mov    %ecx,0x34(%rsp)
mov    0x10(%rsp),%ecx
mov    %ecx,0x38(%rsp)
mov    0x14(%rsp),%ecx
mov    %ecx,0x3c(%rsp)
mov    $0xfffff894,%ecx
cmp    $0x76c,%eax
jg     1424 <tdate_parse+0x2d4>
mov    $0x64,%ecx
cmp    $0x45,%eax
jg     142a <tdate_parse+0x2da>
add    %ecx,%eax
mov    %eax,0x30(%rsp)
lea    0x20(%rsp),%rdi
call   1070 <tm_to_time@plt>
mov    %eax,%ebx
mov    %ebx,%eax
add    $0x448,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
sub    $0x8,%rsp
lea    0xc47(%rip),%rsi
lea    0x258(%rsp),%rdx
lea    0x58(%rsp),%rcx
lea    0xc(%rsp),%r8
lea    0x10(%rsp),%r9
mov    %rbx,%rdi
xor    %eax,%eax
push   %r14
push   %r15
push   %rbp
call   1040 <sscanf@plt>
add    $0x20,%rsp
mov    $0xffffffff,%ebx
cmp    $0x7,%eax
jne    1436 <tdate_parse+0x2e6>
lea    0x250(%rsp),%rdi
lea    0x48(%rsp),%rsi
call   1060 <scan_wday@plt>
test   %rax,%rax
je     1436 <tdate_parse+0x2e6>
lea    0x50(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1050 <scan_mon@plt>
test   %rax,%rax
je     1436 <tdate_parse+0x2e6>
mov    0x48(%rsp),%rax
mov    %rax,0x40(%rsp)
mov    0x18(%rsp),%rax
mov    %rax,0x28(%rsp)
mov    0x4(%rsp),%eax
mov    %eax,0x20(%rsp)
mov    0x8(%rsp),%eax
mov    %eax,0x34(%rsp)
mov    0x10(%rsp),%eax
mov    %eax,0x38(%rsp)
mov    0x14(%rsp),%eax
mov    %eax,0x3c(%rsp)
jmp    12f0 <tdate_parse+0x1a0>

LLVM IR (-O0):
%struct.tm = type { i32, i64, i32, i32, i32, i32, i64 }
@.str = [32 x i8] c"%d-%400[a-zA-Z]-%d %d:%d:%d GMT\00"
@.str.1 = [32 x i8] c"%d %400[a-zA-Z] %d %d:%d:%d GMT\00"
@.str.2 = [32 x i8] c"%d:%d:%d GMT %d-%400[a-zA-Z]-%d\00"
@.str.3 = [32 x i8] c"%d:%d:%d GMT %d %400[a-zA-Z] %d\00"
@.str.4 = [46 x i8] c"%400[a-zA-Z], %d-%400[a-zA-Z]-%d %d:%d:%d GMT\00"
@.str.5 = [46 x i8] c"%400[a-zA-Z], %d %400[a-zA-Z] %d %d:%d:%d GMT\00"
@.str.6 = [45 x i8] c"%400[a-zA-Z] %400[a-zA-Z] %d %d:%d:%d GMT %d\00"
define i32 @tdate_parse(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.tm
%5 = alloca i8*
%6 = alloca [500 x i8]
%7 = alloca [500 x i8]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i64
%14 = alloca i64
%15 = alloca i32
store i8* %0, i8** %3
%16 = bitcast %struct.tm* %4 to i8*
%17 = call i32 @memset(i8* %16, i32 0, i32 40)
%18 = load i8*, i8** %3
store i8* %18, i8** %5
br label %19
19: ; preds = %32, %1
%20 = load i8*, i8** %5
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 32
br i1 %23, label %29, label %24
24: ; preds = %19
%25 = load i8*, i8** %5
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 9
br label %29
29: ; preds = %24, %19
%30 = phi i1 [ true, %19 ], [ %28, %24 ]
br i1 %30, label %31, label %35
31: ; preds = %29
br label %32
32: ; preds = %31
%33 = load i8*, i8** %5
%34 = getelementptr inbounds i8, i8* %33, i32 1
store i8* %34, i8** %5
br label %19
35: ; preds = %29
%36 = load i8*, i8** %5
%37 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%38 = call i32 (i8*, i8*, ...) @sscanf(i8* %36, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32* %11, i8* %37, i32* %12, i32* %10, i32* %9, i32* %8)
%39 = icmp eq i32 %38, 6
br i1 %39, label %40, label %57
40: ; preds = %35
%41 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%42 = call i64 @scan_mon(i8* %41, i64* %13)
%43 = icmp ne i64 %42, 0
br i1 %43, label %44, label %57
44: ; preds = %40
%45 = load i32, i32* %11
%46 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
store i32 %45, i32* %46
%47 = load i64, i64* %13
%48 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 1
store i64 %47, i64* %48
%49 = load i32, i32* %12
%50 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 2
store i32 %49, i32* %50
%51 = load i32, i32* %10
%52 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 3
store i32 %51, i32* %52
%53 = load i32, i32* %9
%54 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 4
store i32 %53, i32* %54
%55 = load i32, i32* %8
%56 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 5
store i32 %55, i32* %56
br label %217
57: ; preds = %40, %35
%58 = load i8*, i8** %5
%59 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%60 = call i32 (i8*, i8*, ...) @sscanf(i8* %58, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32* %11, i8* %59, i32* %12, i32* %10, i32* %9, i32* %8)
%61 = icmp eq i32 %60, 6
br i1 %61, label %62, label %79
62: ; preds = %57
%63 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%64 = call i64 @scan_mon(i8* %63, i64* %13)
%65 = icmp ne i64 %64, 0
br i1 %65, label %66, label %79
66: ; preds = %62
%67 = load i32, i32* %11
%68 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
store i32 %67, i32* %68
%69 = load i64, i64* %13
%70 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 1
store i64 %69, i64* %70
%71 = load i32, i32* %12
%72 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 2
store i32 %71, i32* %72
%73 = load i32, i32* %10
%74 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 3
store i32 %73, i32* %74
%75 = load i32, i32* %9
%76 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 4
store i32 %75, i32* %76
%77 = load i32, i32* %8
%78 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 5
store i32 %77, i32* %78
br label %216
79: ; preds = %62, %57
%80 = load i8*, i8** %5
%81 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%82 = call i32 (i8*, i8*, ...) @sscanf(i8* %80, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32* %10, i32* %9, i32* %8, i32* %11, i8* %81, i32* %12)
%83 = icmp eq i32 %82, 6
br i1 %83, label %84, label %101
84: ; preds = %79
%85 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%86 = call i64 @scan_mon(i8* %85, i64* %13)
%87 = icmp ne i64 %86, 0
br i1 %87, label %88, label %101
88: ; preds = %84
%89 = load i32, i32* %10
%90 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 3
store i32 %89, i32* %90
%91 = load i32, i32* %9
%92 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 4
store i32 %91, i32* %92
%93 = load i32, i32* %8
%94 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 5
store i32 %93, i32* %94
%95 = load i32, i32* %11
%96 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
store i32 %95, i32* %96
%97 = load i64, i64* %13
%98 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 1
store i64 %97, i64* %98
%99 = load i32, i32* %12
%100 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 2
store i32 %99, i32* %100
br label %215
101: ; preds = %84, %79
%102 = load i8*, i8** %5
%103 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%104 = call i32 (i8*, i8*, ...) @sscanf(i8* %102, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32* %10, i32* %9, i32* %8, i32* %11, i8* %103, i32* %12)
%105 = icmp eq i32 %104, 6
br i1 %105, label %106, label %123
106: ; preds = %101
%107 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%108 = call i64 @scan_mon(i8* %107, i64* %13)
%109 = icmp ne i64 %108, 0
br i1 %109, label %110, label %123
110: ; preds = %106
%111 = load i32, i32* %10
%112 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 3
store i32 %111, i32* %112
%113 = load i32, i32* %9
%114 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 4
store i32 %113, i32* %114
%115 = load i32, i32* %8
%116 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 5
store i32 %115, i32* %116
%117 = load i32, i32* %11
%118 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
store i32 %117, i32* %118
%119 = load i64, i64* %13
%120 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 1
store i64 %119, i64* %120
%121 = load i32, i32* %12
%122 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 2
store i32 %121, i32* %122
br label %214
123: ; preds = %106, %101
%124 = load i8*, i8** %5
%125 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%126 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%127 = call i32 (i8*, i8*, ...) @sscanf(i8* %124, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0), i8* %125, i32* %11, i8* %126, i32* %12, i32* %10, i32* %9, i32* %8)
%128 = icmp eq i32 %127, 7
br i1 %128, label %129, label %152
129: ; preds = %123
%130 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%131 = call i64 @scan_wday(i8* %130, i64* %14)
%132 = icmp ne i64 %131, 0
br i1 %132, label %133, label %152
133: ; preds = %129
%134 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%135 = call i64 @scan_mon(i8* %134, i64* %13)
%136 = icmp ne i64 %135, 0
br i1 %136, label %137, label %152
137: ; preds = %133
%138 = load i64, i64* %14
%139 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 6
store i64 %138, i64* %139
%140 = load i32, i32* %11
%141 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
store i32 %140, i32* %141
%142 = load i64, i64* %13
%143 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 1
store i64 %142, i64* %143
%144 = load i32, i32* %12
%145 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 2
store i32 %144, i32* %145
%146 = load i32, i32* %10
%147 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 3
store i32 %146, i32* %147
%148 = load i32, i32* %9
%149 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 4
store i32 %148, i32* %149
%150 = load i32, i32* %8
%151 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 5
store i32 %150, i32* %151
br label %213
152: ; preds = %133, %129, %123
%153 = load i8*, i8** %5
%154 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%155 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%156 = call i32 (i8*, i8*, ...) @sscanf(i8* %153, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0), i8* %154, i32* %11, i8* %155, i32* %12, i32* %10, i32* %9, i32* %8)
%157 = icmp eq i32 %156, 7
br i1 %157, label %158, label %181
158: ; preds = %152
%159 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%160 = call i64 @scan_wday(i8* %159, i64* %14)
%161 = icmp ne i64 %160, 0
br i1 %161, label %162, label %181
162: ; preds = %158
%163 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%164 = call i64 @scan_mon(i8* %163, i64* %13)
%165 = icmp ne i64 %164, 0
br i1 %165, label %166, label %181
166: ; preds = %162
%167 = load i64, i64* %14
%168 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 6
store i64 %167, i64* %168
%169 = load i32, i32* %11
%170 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
store i32 %169, i32* %170
%171 = load i64, i64* %13
%172 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 1
store i64 %171, i64* %172
%173 = load i32, i32* %12
%174 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 2
store i32 %173, i32* %174
%175 = load i32, i32* %10
%176 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 3
store i32 %175, i32* %176
%177 = load i32, i32* %9
%178 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 4
store i32 %177, i32* %178
%179 = load i32, i32* %8
%180 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 5
store i32 %179, i32* %180
br label %212
181: ; preds = %162, %158, %152
%182 = load i8*, i8** %5
%183 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%184 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%185 = call i32 (i8*, i8*, ...) @sscanf(i8* %182, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0), i8* %183, i8* %184, i32* %11, i32* %10, i32* %9, i32* %8, i32* %12)
%186 = icmp eq i32 %185, 7
br i1 %186, label %187, label %210
187: ; preds = %181
%188 = getelementptr inbounds [500 x i8], [500 x i8]* %7, i64 0, i64 0
%189 = call i64 @scan_wday(i8* %188, i64* %14)
%190 = icmp ne i64 %189, 0
br i1 %190, label %191, label %210
191: ; preds = %187
%192 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%193 = call i64 @scan_mon(i8* %192, i64* %13)
%194 = icmp ne i64 %193, 0
br i1 %194, label %195, label %210
195: ; preds = %191
%196 = load i64, i64* %14
%197 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 6
store i64 %196, i64* %197
%198 = load i64, i64* %13
%199 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 1
store i64 %198, i64* %199
%200 = load i32, i32* %11
%201 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
store i32 %200, i32* %201
%202 = load i32, i32* %10
%203 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 3
store i32 %202, i32* %203
%204 = load i32, i32* %9
%205 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 4
store i32 %204, i32* %205
%206 = load i32, i32* %8
%207 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 5
store i32 %206, i32* %207
%208 = load i32, i32* %12
%209 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 2
store i32 %208, i32* %209
br label %211
210: ; preds = %191, %187, %181
store i32 -1, i32* %2
br label %237
211: ; preds = %195
br label %212
212: ; preds = %211, %166
br label %213
213: ; preds = %212, %137
br label %214
214: ; preds = %213, %110
br label %215
215: ; preds = %214, %88
br label %216
216: ; preds = %215, %66
br label %217
217: ; preds = %216, %44
%218 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 2
%219 = load i32, i32* %218
%220 = icmp sgt i32 %219, 1900
br i1 %220, label %221, label %225
221: ; preds = %217
%222 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 2
%223 = load i32, i32* %222
%224 = sub nsw i32 %223, 1900
store i32 %224, i32* %222
br label %234
225: ; preds = %217
%226 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 2
%227 = load i32, i32* %226
%228 = icmp slt i32 %227, 70
br i1 %228, label %229, label %233
229: ; preds = %225
%230 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 2
%231 = load i32, i32* %230
%232 = add nsw i32 %231, 100
store i32 %232, i32* %230
br label %233
233: ; preds = %229, %225
br label %234
234: ; preds = %233, %221
%235 = call i32 @tm_to_time(%struct.tm* %4)
store i32 %235, i32* %15
%236 = load i32, i32* %15
store i32 %236, i32* %2
br label %237
237: ; preds = %234, %210
%238 = load i32, i32* %2
ret i32 %238
}

LLVM IR (-O2):
%struct.tm = type { i32, i64, i32, i32, i32, i32, i64 }
@.str = [32 x i8] c"%d-%400[a-zA-Z]-%d %d:%d:%d GMT\00"
@.str.1 = [32 x i8] c"%d %400[a-zA-Z] %d %d:%d:%d GMT\00"
@.str.2 = [32 x i8] c"%d:%d:%d GMT %d-%400[a-zA-Z]-%d\00"
@.str.3 = [32 x i8] c"%d:%d:%d GMT %d %400[a-zA-Z] %d\00"
@.str.4 = [46 x i8] c"%400[a-zA-Z], %d-%400[a-zA-Z]-%d %d:%d:%d GMT\00"
@.str.5 = [46 x i8] c"%400[a-zA-Z], %d %400[a-zA-Z] %d %d:%d:%d GMT\00"
@.str.6 = [45 x i8] c"%400[a-zA-Z] %400[a-zA-Z] %d %d:%d:%d GMT %d\00"
define i32 @tdate_parse(i8* nocapture %0) {
%2 = alloca %struct.tm
%3 = alloca [500 x i8]
%4 = alloca [500 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
%11 = alloca i64
%12 = bitcast %struct.tm* %2 to i8*
%13 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds [500 x i8], [500 x i8]* %4, i64 0, i64 0
%15 = bitcast i32* %5 to i8*
%16 = bitcast i32* %6 to i8*
%17 = bitcast i32* %7 to i8*
%18 = bitcast i32* %8 to i8*
%19 = bitcast i32* %9 to i8*
%20 = bitcast i64* %10 to i8*
%21 = bitcast i64* %11 to i8*
%22 = call i32 @memset(i8* %12, i32 0, i32 40)
br label %23
23: ; preds = %26, %1
%24 = phi i8* [ %0, %1 ], [ %27, %26 ]
%25 = load i8, i8* %24
switch i8 %25, label %28 [
i8 32, label %26
i8 9, label %26
]
26: ; preds = %23, %23
%27 = getelementptr inbounds i8, i8* %24, i64 1
br label %23
28: ; preds = %23
%29 = call i32 (i8*, i8*, ...) @sscanf(i8* %24, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32* %8, i8* %13, i32* %9, i32* %7, i32* %6, i32* %5)
%30 = icmp eq i32 %29, 6
br i1 %30, label %31, label %47
31: ; preds = %28
%32 = call i64 @scan_mon(i8* %13, i64* %10)
%33 = icmp eq i64 %32, 0
br i1 %33, label %47, label %34
34: ; preds = %31
%35 = load i32, i32* %8
%36 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 0
store i32 %35, i32* %36
%37 = load i64, i64* %10
%38 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 1
store i64 %37, i64* %38
%39 = load i32, i32* %9
%40 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 2
store i32 %39, i32* %40
%41 = load i32, i32* %7
%42 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 3
store i32 %41, i32* %42
%43 = load i32, i32* %6
%44 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 4
store i32 %43, i32* %44
%45 = load i32, i32* %5
%46 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 5
store i32 %45, i32* %46
br label %176
47: ; preds = %31, %28
%48 = call i32 (i8*, i8*, ...) @sscanf(i8* %24, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32* %8, i8* %13, i32* %9, i32* %7, i32* %6, i32* %5)
%49 = icmp eq i32 %48, 6
br i1 %49, label %50, label %66
50: ; preds = %47
%51 = call i64 @scan_mon(i8* %13, i64* %10)
%52 = icmp eq i64 %51, 0
br i1 %52, label %66, label %53
53: ; preds = %50
%54 = load i32, i32* %8
%55 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 0
store i32 %54, i32* %55
%56 = load i64, i64* %10
%57 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 1
store i64 %56, i64* %57
%58 = load i32, i32* %9
%59 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 2
store i32 %58, i32* %59
%60 = load i32, i32* %7
%61 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 3
store i32 %60, i32* %61
%62 = load i32, i32* %6
%63 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 4
store i32 %62, i32* %63
%64 = load i32, i32* %5
%65 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 5
store i32 %64, i32* %65
br label %176
66: ; preds = %50, %47
%67 = call i32 (i8*, i8*, ...) @sscanf(i8* %24, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32* %7, i32* %6, i32* %5, i32* %8, i8* %13, i32* %9)
%68 = icmp eq i32 %67, 6
br i1 %68, label %69, label %85
69: ; preds = %66
%70 = call i64 @scan_mon(i8* %13, i64* %10)
%71 = icmp eq i64 %70, 0
br i1 %71, label %85, label %72
72: ; preds = %69
%73 = load i32, i32* %7
%74 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 3
store i32 %73, i32* %74
%75 = load i32, i32* %6
%76 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 4
store i32 %75, i32* %76
%77 = load i32, i32* %5
%78 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 5
store i32 %77, i32* %78
%79 = load i32, i32* %8
%80 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 0
store i32 %79, i32* %80
%81 = load i64, i64* %10
%82 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 1
store i64 %81, i64* %82
%83 = load i32, i32* %9
%84 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 2
store i32 %83, i32* %84
br label %176
85: ; preds = %69, %66
%86 = call i32 (i8*, i8*, ...) @sscanf(i8* %24, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32* %7, i32* %6, i32* %5, i32* %8, i8* %13, i32* %9)
%87 = icmp eq i32 %86, 6
br i1 %87, label %88, label %104
88: ; preds = %85
%89 = call i64 @scan_mon(i8* %13, i64* %10)
%90 = icmp eq i64 %89, 0
br i1 %90, label %104, label %91
91: ; preds = %88
%92 = load i32, i32* %7
%93 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 3
store i32 %92, i32* %93
%94 = load i32, i32* %6
%95 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 4
store i32 %94, i32* %95
%96 = load i32, i32* %5
%97 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 5
store i32 %96, i32* %97
%98 = load i32, i32* %8
%99 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 0
store i32 %98, i32* %99
%100 = load i64, i64* %10
%101 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 1
store i64 %100, i64* %101
%102 = load i32, i32* %9
%103 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 2
store i32 %102, i32* %103
br label %176
104: ; preds = %88, %85
%105 = call i32 (i8*, i8*, ...) @sscanf(i8* %24, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0), i8* %14, i32* %8, i8* %13, i32* %9, i32* %7, i32* %6, i32* %5)
%106 = icmp eq i32 %105, 7
br i1 %106, label %107, label %128
107: ; preds = %104
%108 = call i64 @scan_wday(i8* %14, i64* %11)
%109 = icmp eq i64 %108, 0
br i1 %109, label %128, label %110
110: ; preds = %107
%111 = call i64 @scan_mon(i8* %13, i64* %10)
%112 = icmp eq i64 %111, 0
br i1 %112, label %128, label %113
113: ; preds = %110
%114 = load i64, i64* %11
%115 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 6
store i64 %114, i64* %115
%116 = load i32, i32* %8
%117 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 0
store i32 %116, i32* %117
%118 = load i64, i64* %10
%119 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 1
store i64 %118, i64* %119
%120 = load i32, i32* %9
%121 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 2
store i32 %120, i32* %121
%122 = load i32, i32* %7
%123 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 3
store i32 %122, i32* %123
%124 = load i32, i32* %6
%125 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 4
store i32 %124, i32* %125
%126 = load i32, i32* %5
%127 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 5
store i32 %126, i32* %127
br label %176
128: ; preds = %110, %107, %104
%129 = call i32 (i8*, i8*, ...) @sscanf(i8* %24, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0), i8* %14, i32* %8, i8* %13, i32* %9, i32* %7, i32* %6, i32* %5)
%130 = icmp eq i32 %129, 7
br i1 %130, label %131, label %152
131: ; preds = %128
%132 = call i64 @scan_wday(i8* %14, i64* %11)
%133 = icmp eq i64 %132, 0
br i1 %133, label %152, label %134
134: ; preds = %131
%135 = call i64 @scan_mon(i8* %13, i64* %10)
%136 = icmp eq i64 %135, 0
br i1 %136, label %152, label %137
137: ; preds = %134
%138 = load i64, i64* %11
%139 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 6
store i64 %138, i64* %139
%140 = load i32, i32* %8
%141 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 0
store i32 %140, i32* %141
%142 = load i64, i64* %10
%143 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 1
store i64 %142, i64* %143
%144 = load i32, i32* %9
%145 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 2
store i32 %144, i32* %145
%146 = load i32, i32* %7
%147 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 3
store i32 %146, i32* %147
%148 = load i32, i32* %6
%149 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 4
store i32 %148, i32* %149
%150 = load i32, i32* %5
%151 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 5
store i32 %150, i32* %151
br label %176
152: ; preds = %134, %131, %128
%153 = call i32 (i8*, i8*, ...) @sscanf(i8* %24, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0), i8* %14, i8* %13, i32* %8, i32* %7, i32* %6, i32* %5, i32* %9)
%154 = icmp eq i32 %153, 7
br i1 %154, label %155, label %187
155: ; preds = %152
%156 = call i64 @scan_wday(i8* %14, i64* %11)
%157 = icmp eq i64 %156, 0
br i1 %157, label %187, label %158
158: ; preds = %155
%159 = call i64 @scan_mon(i8* %13, i64* %10)
%160 = icmp eq i64 %159, 0
br i1 %160, label %187, label %161
161: ; preds = %158
%162 = load i64, i64* %11
%163 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 6
store i64 %162, i64* %163
%164 = load i64, i64* %10
%165 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 1
store i64 %164, i64* %165
%166 = load i32, i32* %8
%167 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 0
store i32 %166, i32* %167
%168 = load i32, i32* %7
%169 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 3
store i32 %168, i32* %169
%170 = load i32, i32* %6
%171 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 4
store i32 %170, i32* %171
%172 = load i32, i32* %5
%173 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 5
store i32 %172, i32* %173
%174 = load i32, i32* %9
%175 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 2
store i32 %174, i32* %175
br label %176
176: ; preds = %53, %91, %137, %161, %113, %72, %34
%177 = phi i32 [ %58, %53 ], [ %102, %91 ], [ %144, %137 ], [ %174, %161 ], [ %120, %113 ], [ %83, %72 ], [ %39, %34 ]
%178 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 2
%179 = icmp sgt i32 %177, 1900
br i1 %179, label %182, label %180
180: ; preds = %176
%181 = icmp slt i32 %177, 70
br i1 %181, label %182, label %185
182: ; preds = %180, %176
%183 = phi i32 [ -1900, %176 ], [ 100, %180 ]
%184 = add nsw i32 %177, %183
store i32 %184, i32* %178
br label %185
185: ; preds = %182, %180
%186 = call i32 @tm_to_time(%struct.tm* %2)
br label %187
187: ; preds = %152, %155, %158, %185
%188 = phi i32 [ %186, %185 ], [ -1, %158 ], [ -1, %155 ], [ -1, %152 ]
ret i32 %188
}