#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_mon;
  unsigned long tm_mday;
  unsigned long tm_year;
  scalar_t__ tm_isdst;
  scalar_t__ tm_yday;
  scalar_t__ tm_wday;
};

/* Variables and functions */
int /*<<< orphan*/ byte_diff(char const *, int, char *);
int /*<<< orphan*/ case_diffb(char const *, int, char const *);
char *getenv(char *);
int /*<<< orphan*/ mktime(struct tm *);
scalar_t__ parsetime(char const *, struct tm *);
int /*<<< orphan*/ scan_ulong(char const *, unsigned long *);
int /*<<< orphan*/ setenv(char *, char *, int);
int /*<<< orphan*/ unsetenv(char *);
size_t scan_httpdate(const char *in, time_t *t) {
  struct tm x;
  int i;
  unsigned long tmp;
  const char *c;
  static const char months[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
  if (!(c = in))
    return 0;
  if (c[3] == ',')
    c += 5;
  else if (c[6] == ',')
    c += 8;
  else {
    c += 4;
    for (i = 0; i < 12; ++i) {
      if ((!case_diffb((c), (3), (months + i * 3)))) {
        x.tm_mon = i;
        break;
      }
    }
    c += 4;
    if (*c == ' ')
      ++c;
    c += scan_ulong(c, &tmp);
    x.tm_mday = tmp;
    ++c;
    if (parsetime(c, &x))
      return 0;
    c += 9;
    c += scan_ulong(c, &tmp);
    x.tm_year = tmp - 1900;
    goto done;
  }
  c += scan_ulong(c, &tmp);
  x.tm_mday = tmp;
  while (*c == ' ')
    ++c;
  for (i = 0; i < 12; ++i)
    if ((!case_diffb((c), (3), (months + i * 3)))) {
      x.tm_mon = i;
      break;
    }
  c += 4;
  c += scan_ulong(c, &tmp);
  if (tmp > 1000)
    x.tm_year = tmp - 1900;
  else if (tmp < 70)
    x.tm_year = tmp + 100;
  else
    x.tm_year = tmp;
  ++c;
  if (parsetime(c, &x))
    return 0;
  c += 9;
  if ((!byte_diff((c), (3), ("GMT"))))
    c += 3;
  if (*c == '+' || *c == '-') {
    ++c;
    while (*c >= '0' && *c <= '9')
      ++c;
  }
done:
  x.tm_wday = x.tm_yday = x.tm_isdst = 0;
  {
    char *old = getenv("TZ");
    unsetenv("TZ");
    *t = mktime(&x);
    if (old)
      setenv("TZ", old, 1);
  }
  return c - in;
}


x86 assembly (clang, -O0):
<scan_httpdate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
cmp    $0x0,%rax
jne    11af <scan_httpdate+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    1578 <scan_httpdate+0x3f8>
mov    -0x60(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x2c,%eax
jne    11d1 <scan_httpdate+0x51>
mov    -0x60(%rbp),%rax
add    $0x5,%rax
mov    %rax,-0x60(%rbp)
jmp    1313 <scan_httpdate+0x193>
mov    -0x60(%rbp),%rax
movsbl 0x6(%rax),%eax
cmp    $0x2c,%eax
jne    11f3 <scan_httpdate+0x73>
mov    -0x60(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x60(%rbp)
jmp    130e <scan_httpdate+0x18e>
mov    -0x60(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x4c(%rbp)
cmpl   $0xc,-0x4c(%rbp)
jge    1255 <scan_httpdate+0xd5>
mov    -0x60(%rbp),%rdi
imul   $0x3,-0x4c(%rbp),%eax
cltq
lea    0xddf(%rip),%rdx
add    %rax,%rdx
mov    $0x3,%esi
call   1070 <case_diffb@plt>
cmp    $0x0,%eax
jne    1242 <scan_httpdate+0xc2>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x48(%rbp)
jmp    1255 <scan_httpdate+0xd5>
jmp    1247 <scan_httpdate+0xc7>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1206 <scan_httpdate+0x86>
mov    -0x60(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    127d <scan_httpdate+0xfd>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rdi
lea    -0x58(%rbp),%rsi
call   1050 <scan_ulong@plt>
mov    %eax,%ecx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   1080 <parsetime@plt>
cmp    $0x0,%rax
je     12d2 <scan_httpdate+0x152>
movq   $0x0,-0x8(%rbp)
jmp    1578 <scan_httpdate+0x3f8>
mov    -0x60(%rbp),%rax
add    $0x9,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rdi
lea    -0x58(%rbp),%rsi
call   1050 <scan_ulong@plt>
mov    %eax,%ecx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x58(%rbp),%rax
sub    $0x76c,%rax
mov    %rax,-0x38(%rbp)
jmp    1504 <scan_httpdate+0x384>
jmp    1313 <scan_httpdate+0x193>
mov    -0x60(%rbp),%rdi
lea    -0x58(%rbp),%rsi
call   1050 <scan_ulong@plt>
mov    %eax,%ecx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x60(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1359 <scan_httpdate+0x1d9>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1338 <scan_httpdate+0x1b8>
movl   $0x0,-0x4c(%rbp)
cmpl   $0xc,-0x4c(%rbp)
jge    13af <scan_httpdate+0x22f>
mov    -0x60(%rbp),%rdi
imul   $0x3,-0x4c(%rbp),%eax
cltq
lea    0xc85(%rip),%rdx
add    %rax,%rdx
mov    $0x3,%esi
call   1070 <case_diffb@plt>
cmp    $0x0,%eax
jne    139c <scan_httpdate+0x21c>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x48(%rbp)
jmp    13af <scan_httpdate+0x22f>
jmp    13a1 <scan_httpdate+0x221>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1360 <scan_httpdate+0x1e0>
mov    -0x60(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rdi
lea    -0x58(%rbp),%rsi
call   1050 <scan_ulong@plt>
mov    %eax,%ecx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
cmpq   $0x3e8,-0x58(%rbp)
jbe    13f9 <scan_httpdate+0x279>
mov    -0x58(%rbp),%rax
sub    $0x76c,%rax
mov    %rax,-0x38(%rbp)
jmp    1422 <scan_httpdate+0x2a2>
cmpq   $0x46,-0x58(%rbp)
jae    1415 <scan_httpdate+0x295>
mov    -0x58(%rbp),%rax
add    $0x64,%rax
mov    %rax,-0x38(%rbp)
jmp    141d <scan_httpdate+0x29d>
mov    -0x58(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    1422 <scan_httpdate+0x2a2>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   1080 <parsetime@plt>
cmp    $0x0,%rax
je     1452 <scan_httpdate+0x2d2>
movq   $0x0,-0x8(%rbp)
jmp    1578 <scan_httpdate+0x3f8>
mov    -0x60(%rbp),%rax
add    $0x9,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rdi
mov    $0x3,%esi
lea    0xbb7(%rip),%rdx
call   1060 <byte_diff@plt>
cmp    $0x0,%eax
jne    1488 <scan_httpdate+0x308>
mov    -0x60(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
je     14a8 <scan_httpdate+0x328>
mov    -0x60(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    14ff <scan_httpdate+0x37f>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x69(%rbp)
jl     14d9 <scan_httpdate+0x359>
mov    -0x60(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x69(%rbp)
mov    -0x69(%rbp),%al
test   $0x1,%al
jne    14e9 <scan_httpdate+0x369>
jmp    14fa <scan_httpdate+0x37a>
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    14b4 <scan_httpdate+0x334>
jmp    14ff <scan_httpdate+0x37f>
jmp    1504 <scan_httpdate+0x384>
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x20(%rbp)
lea    0xb06(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x68(%rbp)
lea    0xaf6(%rip),%rdi
call   10a0 <unsetenv@plt>
lea    -0x48(%rbp),%rdi
call   1090 <mktime@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
cmpq   $0x0,-0x68(%rbp)
je     1569 <scan_httpdate+0x3e9>
mov    -0x68(%rbp),%rsi
lea    0xaca(%rip),%rdi
mov    $0x1,%edx
call   1040 <setenv@plt>
mov    -0x60(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_httpdate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
test   %rdi,%rdi
je     1637 <scan_httpdate+0x4b7>
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x5,%ebx
cmpb   $0x2c,0x3(%rdi)
je     11b8 <scan_httpdate+0x38>
mov    $0x8,%ebx
cmpb   $0x2c,0x6(%r15)
jne    1354 <scan_httpdate+0x1d4>
lea    (%r15,%rbx,1),%rdi
mov    %rsp,%rsi
call   1050 <scan_ulong@plt>
cltq
mov    (%rsp),%rcx
mov    %rcx,0x10(%rsp)
add    %rbx,%rax
lea    (%r15,%rax,1),%rbx
add    $0xd,%rbx
nopw   0x0(%rax,%rax,1)
cmpb   $0x20,-0xd(%rbx)
lea    0x1(%rbx),%rbx
je     11e0 <scan_httpdate+0x60>
lea    -0xe(%rbx),%r12
lea    0xe0b(%rip),%rdx
mov    %r12,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     134d <scan_httpdate+0x1cd>
lea    0xdf2(%rip),%rdx
mov    %r12,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     14b7 <scan_httpdate+0x337>
lea    0xdd9(%rip),%rdx
mov    $0x3,%ebp
mov    %r12,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     14be <scan_httpdate+0x33e>
lea    0xdbb(%rip),%rdx
mov    %r12,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     1537 <scan_httpdate+0x3b7>
lea    0xda2(%rip),%rdx
mov    %r12,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     14d6 <scan_httpdate+0x356>
lea    0xd89(%rip),%rdx
mov    %r12,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     14e7 <scan_httpdate+0x367>
lea    0xd70(%rip),%rdx
mov    %r12,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     14ee <scan_httpdate+0x36e>
lea    0xd57(%rip),%rdx
mov    %r12,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     14ff <scan_httpdate+0x37f>
lea    0xd3e(%rip),%rdx
mov    %r12,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     1510 <scan_httpdate+0x390>
lea    0xd25(%rip),%rdx
mov    %r12,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     1521 <scan_httpdate+0x3a1>
lea    0xd0c(%rip),%rdx
mov    %r12,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     1532 <scan_httpdate+0x3b2>
lea    0xcf3(%rip),%rdx
mov    %r12,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
jne    153b <scan_httpdate+0x3bb>
mov    $0xb,%ebp
jmp    1537 <scan_httpdate+0x3b7>
xor    %ebp,%ebp
jmp    1537 <scan_httpdate+0x3b7>
lea    0x4(%r15),%rbx
lea    0xca1(%rip),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     14c5 <scan_httpdate+0x345>
lea    0xc88(%rip),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     14cc <scan_httpdate+0x34c>
lea    0xc6f(%rip),%rdx
mov    $0x3,%ebp
mov    %rbx,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     14dd <scan_httpdate+0x35d>
lea    0xc51(%rip),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     15f3 <scan_httpdate+0x473>
lea    0xc38(%rip),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     14f5 <scan_httpdate+0x375>
lea    0xc1f(%rip),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     1506 <scan_httpdate+0x386>
lea    0xc06(%rip),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     1517 <scan_httpdate+0x397>
lea    0xbed(%rip),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     1528 <scan_httpdate+0x3a8>
lea    0xbd4(%rip),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     15e0 <scan_httpdate+0x460>
lea    0xbbb(%rip),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     15e7 <scan_httpdate+0x467>
lea    0xba2(%rip),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
je     15ee <scan_httpdate+0x46e>
lea    0xb89(%rip),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1070 <case_diffb@plt>
test   %eax,%eax
jne    15f7 <scan_httpdate+0x477>
mov    $0xb,%ebp
jmp    15f3 <scan_httpdate+0x473>
mov    $0x1,%ebp
jmp    1537 <scan_httpdate+0x3b7>
mov    $0x2,%ebp
jmp    1537 <scan_httpdate+0x3b7>
xor    %ebp,%ebp
jmp    15f3 <scan_httpdate+0x473>
mov    $0x1,%ebp
jmp    15f3 <scan_httpdate+0x473>
mov    $0x4,%ebp
jmp    1537 <scan_httpdate+0x3b7>
mov    $0x2,%ebp
jmp    15f3 <scan_httpdate+0x473>
mov    $0x5,%ebp
jmp    1537 <scan_httpdate+0x3b7>
mov    $0x6,%ebp
jmp    1537 <scan_httpdate+0x3b7>
mov    $0x4,%ebp
jmp    15f3 <scan_httpdate+0x473>
mov    $0x7,%ebp
jmp    1537 <scan_httpdate+0x3b7>
mov    $0x5,%ebp
jmp    15f3 <scan_httpdate+0x473>
mov    $0x8,%ebp
jmp    1537 <scan_httpdate+0x3b7>
mov    $0x6,%ebp
jmp    15f3 <scan_httpdate+0x473>
mov    $0x9,%ebp
jmp    1537 <scan_httpdate+0x3b7>
mov    $0x7,%ebp
jmp    15f3 <scan_httpdate+0x473>
mov    $0xa,%ebp
mov    %ebp,0x8(%rsp)
lea    -0xa(%rbx),%rdi
mov    %rsp,%rsi
call   1050 <scan_ulong@plt>
movslq %eax,%r12
mov    (%rsp),%rax
lea    -0x76c(%rax),%rcx
lea    0x64(%rax),%rdx
cmp    $0x46,%rax
cmovae %rax,%rdx
cmp    $0x3e9,%rax
cmovae %rcx,%rdx
mov    %rdx,0x18(%rsp)
lea    (%rbx,%r12,1),%rdi
add    $0xfffffffffffffff7,%rdi
lea    0x8(%rsp),%rsi
call   1080 <parsetime@plt>
test   %rax,%rax
jne    1637 <scan_httpdate+0x4b7>
lea    (%rbx,%r12,1),%rdi
lea    0xa8f(%rip),%rdx
mov    $0x3,%esi
call   1060 <byte_diff@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
lea    (%rcx,%rcx,2),%rax
lea    (%rax,%r12,1),%rcx
mov    (%rbx,%rcx,1),%dl
cmp    $0x2b,%dl
je     15bc <scan_httpdate+0x43c>
cmp    $0x2d,%dl
jne    15d8 <scan_httpdate+0x458>
add    %rax,%rbx
nop
movzbl 0x1(%rbx,%r12,1),%eax
add    $0xd0,%al
add    $0x1,%rbx
cmp    $0xa,%al
jb     15c0 <scan_httpdate+0x440>
add    %r12,%rbx
jmp    1660 <scan_httpdate+0x4e0>
add    %rcx,%rbx
jmp    1660 <scan_httpdate+0x4e0>
mov    $0x8,%ebp
jmp    15f3 <scan_httpdate+0x473>
mov    $0x9,%ebp
jmp    15f3 <scan_httpdate+0x473>
mov    $0xa,%ebp
mov    %ebp,0x8(%rsp)
lea    0x8(%r15),%rbx
lea    0x9(%r15),%rax
cmpb   $0x20,0x8(%r15)
cmove  %rax,%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <scan_ulong@plt>
cltq
mov    (%rsp),%rcx
mov    %rcx,0x10(%rsp)
add    %rax,%rbx
add    $0x1,%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1080 <parsetime@plt>
test   %rax,%rax
je     163b <scan_httpdate+0x4bb>
xor    %ebx,%ebx
jmp    16b4 <scan_httpdate+0x534>
lea    0x9(%rbx),%rdi
mov    %rsp,%rsi
call   1050 <scan_ulong@plt>
cltq
add    %rax,%rbx
add    $0x9,%rbx
mov    $0xfffffffffffff894,%rax
add    (%rsp),%rax
mov    %rax,0x18(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x20(%rsp)
movq   $0x0,0x30(%rsp)
lea    0x9b1(%rip),%r13
mov    %r13,%rdi
call   1030 <getenv@plt>
mov    %rax,%r12
mov    %r13,%rdi
call   10a0 <unsetenv@plt>
lea    0x8(%rsp),%rdi
call   1090 <mktime@plt>
mov    %eax,(%r14)
test   %r12,%r12
je     16b1 <scan_httpdate+0x531>
lea    0x985(%rip),%rdi
mov    %r12,%rsi
mov    $0x1,%edx
call   1040 <setenv@plt>
sub    %r15,%rbx
mov    %rbx,%rax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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