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

/* Variables and functions */
int /*<<< orphan*/ daylight;
int /*<<< orphan*/ free(char *);
char *getenv(char *);
int /*<<< orphan*/ islower(char);
scalar_t__ malloc(int);
size_t max(int, int /*<<< orphan*/);
int /*<<< orphan*/ min(size_t, int);
scalar_t__ realloc(char *, int);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ *strchr(char const *, char);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
char toupper(char);
char **tzname;
int /*<<< orphan*/ tzset();
int weeknumber(struct tm const *, int);
size_t strftime(char *s, size_t maxsize, const char *format,
                const struct tm *timeptr) {
  char *endp = s + maxsize;
  char *start = s;
  char tbuf[100];
  int i;
  static short first = 1;
  static char *savetz = NULL;
  static int savetzlen = 0;
  char *tz;
  int tzlen;
  static const char *days_a[] = {
      "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
  };
  static const char *days_l[] = {
      "Sunday",   "Monday", "Tuesday",  "Wednesday",
      "Thursday", "Friday", "Saturday",
  };
  static const char *months_a[] = {
      "Jan", "Feb", "Mar", "Apr", "May", "Jun",
      "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
  };
  static const char *months_l[] = {
      "January", "February", "March",     "April",   "May",      "June",
      "July",    "August",   "September", "October", "November", "December",
  };
  static const char *ampm[] = {
      "AM",
      "PM",
  };
  if (s == NULL || format == NULL || timeptr == NULL || maxsize == 0)
    return 0;
  if (strchr(format, '%') == NULL && strlen(format) + 1 >= maxsize)
    return 0;
  tz = getenv("TZ");
  tzlen = strlen(tz);
  if (first) {
    if (tz != NULL) {
      savetz = (char *)malloc(tzlen + 1);
      if (savetz != NULL) {
        savetzlen = tzlen + 1;
        strcpy(savetz, tz);
      }
    }
    tzset();
    first = 0;
  }
  if (tz && savetz && (tz[0] != savetz[0] || strcmp(tz, savetz) != 0)) {
    i = strlen(tz) + 1;
    if (i > savetzlen) {
      char *newsavetz = (char *)realloc(savetz, i);
      if (newsavetz) {
        savetzlen = i;
        strcpy(newsavetz, tz);
      } else {
        free(savetz);
      }
      savetz = newsavetz;
    } else
      strcpy(savetz, tz);
    tzset();
  }
  for (; *format && s < endp - 1; format++) {
    tbuf[0] = '\0';
    if (*format != '%') {
      *s++ = *format;
      continue;
    }
  again:
    switch (*++format) {
    case '\0':
      *s++ = '%';
      goto out;
    case '%':
      *s++ = '%';
      continue;
    case 'a':
      if (timeptr->tm_wday < 0 || timeptr->tm_wday > 6)
        strcpy(tbuf, "?");
      else
        strcpy(tbuf, days_a[timeptr->tm_wday]);
      break;
    case 'A':
      if (timeptr->tm_wday < 0 || timeptr->tm_wday > 6)
        strcpy(tbuf, "?");
      else
        strcpy(tbuf, days_l[timeptr->tm_wday]);
      break;
    case 'h':
    case 'b':
      if (timeptr->tm_mon < 0 || timeptr->tm_mon > 11)
        strcpy(tbuf, "?");
      else
        strcpy(tbuf, months_a[timeptr->tm_mon]);
      break;
    case 'B':
      if (timeptr->tm_mon < 0 || timeptr->tm_mon > 11)
        strcpy(tbuf, "?");
      else
        strcpy(tbuf, months_l[timeptr->tm_mon]);
      break;
    case 'c':
      sprintf(tbuf, "%s %s %2d %02d:%02d:%02d %d",
              days_a[max(0, min(timeptr->tm_wday, 6))],
              months_a[max(0, min(timeptr->tm_mon, 11))],
              max(1, min(timeptr->tm_mday, 31)),
              max(0, min(timeptr->tm_hour, 23)),
              max(0, min(timeptr->tm_min, 59)),
              max(0, min(timeptr->tm_sec, 61)), timeptr->tm_year + 1900);
      break;
    case 'd':
      i = max(1, min(timeptr->tm_mday, 31));
      sprintf(tbuf, "%02d", i);
      break;
    case 'H':
      i = max(0, min(timeptr->tm_hour, 23));
      sprintf(tbuf, "%02d", i);
      break;
    case 'I':
      i = max(0, min(timeptr->tm_hour, 23));
      if (i == 0)
        i = 12;
      else if (i > 12)
        i -= 12;
      sprintf(tbuf, "%02d", i);
      break;
    case 'j':
      sprintf(tbuf, "%03d", timeptr->tm_yday + 1);
      break;
    case 'm':
      i = max(0, min(timeptr->tm_mon, 11));
      sprintf(tbuf, "%02d", i + 1);
      break;
    case 'M':
      i = max(0, min(timeptr->tm_min, 59));
      sprintf(tbuf, "%02d", i);
      break;
    case 'p':
      i = max(0, min(timeptr->tm_hour, 23));
      if (i < 12)
        strcpy(tbuf, ampm[0]);
      else
        strcpy(tbuf, ampm[1]);
      break;
    case 'S':
      i = max(0, min(timeptr->tm_sec, 61));
      sprintf(tbuf, "%02d", i);
      break;
    case 'U':
      sprintf(tbuf, "%d", weeknumber(timeptr, 0));
      break;
    case 'w':
      i = max(0, min(timeptr->tm_wday, 6));
      sprintf(tbuf, "%d", i);
      break;
    case 'W':
      sprintf(tbuf, "%d", weeknumber(timeptr, 1));
      break;
    case 'x':
      sprintf(tbuf, "%s %s %2d %d", days_a[max(0, min(timeptr->tm_wday, 6))],
              months_a[max(0, min(timeptr->tm_mon, 11))],
              max(1, min(timeptr->tm_mday, 31)), timeptr->tm_year + 1900);
      break;
    case 'X':
      sprintf(tbuf, "%02d:%02d:%02d", max(0, min(timeptr->tm_hour, 23)),
              max(0, min(timeptr->tm_min, 59)),
              max(0, min(timeptr->tm_sec, 61)));
      break;
    case 'y':
      i = timeptr->tm_year % 100;
      sprintf(tbuf, "%d", i);
      break;
    case 'Y':
      sprintf(tbuf, "%d", 1900 + timeptr->tm_year);
      break;
    case 'Z':
      i = 0;
      if (daylight && timeptr->tm_isdst)
        i = 1;
      strcpy(tbuf, tzname[i]);
      break;
    case 'n':
      tbuf[0] = '\n';
      tbuf[1] = '\0';
      break;
    case 't':
      tbuf[0] = '\t';
      tbuf[1] = '\0';
      break;
    case 'D':
      strftime(tbuf, sizeof tbuf, "%m/%d/%y", timeptr);
      break;
    case 'e':
      sprintf(tbuf, "%2d", max(1, min(timeptr->tm_mday, 31)));
      break;
    case 'r':
      strftime(tbuf, sizeof tbuf, "%I:%M:%S %p", timeptr);
      break;
    case 'R':
      strftime(tbuf, sizeof tbuf, "%H:%M", timeptr);
      break;
    case 'T':
      strftime(tbuf, sizeof tbuf, "%H:%M:%S", timeptr);
      break;
    case 'V':
      sprintf(tbuf, "%2d-%3.3s-%4d", max(1, min(timeptr->tm_mday, 31)),
              months_a[max(0, min(timeptr->tm_mon, 11))],
              timeptr->tm_year + 1900);
      for (i = 3; i < 6; i++)
        if (islower(tbuf[i]))
          tbuf[i] = toupper(tbuf[i]);
      break;
    case 'C':
      sprintf(tbuf, "%02d", (timeptr->tm_year + 1900) / 100);
      break;
    case 'E':
    case 'O':
      goto again;
    default:
      tbuf[0] = '%';
      tbuf[1] = *format;
      tbuf[2] = '\0';
      break;
    }
    i = strlen(tbuf);
    if (i) {
      if (s + i < endp - 1) {
        strcpy(s, tbuf);
        s += i;
      } else
        return 0;
    }
  }
out:
  if (s < endp && *format == '\0') {
    *s = '\0';
    return (s - start);
  } else
    return 0;
}


x86 assembly (clang, -O0):
<strftime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     125b <strftime+0x5b>
cmpq   $0x0,-0x20(%rbp)
je     125b <strftime+0x5b>
cmpq   $0x0,-0x28(%rbp)
je     125b <strftime+0x5b>
cmpq   $0x0,-0x18(%rbp)
jne    1268 <strftime+0x68>
movq   $0x0,-0x8(%rbp)
jmp    1feb <strftime+0xdeb>
mov    -0x20(%rbp),%rdi
mov    $0x25,%esi
call   1090 <strchr@plt>
cmp    $0x0,%rax
jne    12a5 <strftime+0xa5>
mov    -0x20(%rbp),%rdi
call   1080 <strlen@plt>
add    $0x1,%eax
cltq
cmp    -0x18(%rbp),%rax
jb     12a5 <strftime+0xa5>
movq   $0x0,-0x8(%rbp)
jmp    1feb <strftime+0xdeb>
lea    0x2019(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rdi
call   1080 <strlen@plt>
mov    %eax,-0xb4(%rbp)
cmpw   $0x0,0x3dde(%rip)
je     1340 <strftime+0x140>
cmpq   $0x0,-0xb0(%rbp)
je     1330 <strftime+0x130>
mov    -0xb4(%rbp),%edi
add    $0x1,%edi
call   10f0 <malloc@plt>
mov    %rax,0x3f1d(%rip)
cmpq   $0x0,0x3f15(%rip)
je     132b <strftime+0x12b>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,0x3f08(%rip)
mov    0x3ef9(%rip),%rdi
mov    -0xb0(%rbp),%rsi
call   1050 <strcpy@plt>
jmp    1330 <strftime+0x130>
mov    $0x0,%al
call   10e0 <tzset@plt>
movw   $0x0,0x3d70(%rip)
cmpq   $0x0,-0xb0(%rbp)
je     1440 <strftime+0x240>
cmpq   $0x0,0x3ec2(%rip)
je     1440 <strftime+0x240>
mov    -0xb0(%rbp),%rax
movsbl (%rax),%eax
mov    0x3eab(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1395 <strftime+0x195>
mov    -0xb0(%rbp),%rdi
mov    0x3e92(%rip),%rsi
call   10d0 <strcmp@plt>
cmp    $0x0,%rax
je     1440 <strftime+0x240>
mov    -0xb0(%rbp),%rdi
call   1080 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
cmp    0x3e6a(%rip),%eax
jle    1426 <strftime+0x226>
mov    0x3e55(%rip),%rdi
mov    -0xa4(%rbp),%esi
call   1110 <realloc@plt>
mov    %rax,-0xc0(%rbp)
cmpq   $0x0,-0xc0(%rbp)
je     1407 <strftime+0x207>
mov    -0xa4(%rbp),%eax
mov    %eax,0x3e31(%rip)
mov    -0xc0(%rbp),%rdi
mov    -0xb0(%rbp),%rsi
call   1050 <strcpy@plt>
jmp    1413 <strftime+0x213>
mov    0x3e0a(%rip),%rdi
call   1040 <free@plt>
mov    -0xc0(%rbp),%rax
mov    %rax,0x3df7(%rip)
jmp    1439 <strftime+0x239>
mov    0x3deb(%rip),%rdi
mov    -0xb0(%rbp),%rsi
call   1050 <strcpy@plt>
mov    $0x0,%al
call   10e0 <tzset@plt>
jmp    1445 <strftime+0x245>
mov    -0x20(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xc1(%rbp)
je     1475 <strftime+0x275>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%rcx
add    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
setb   %al
mov    %al,-0xc1(%rbp)
mov    -0xc1(%rbp),%al
test   $0x1,%al
jne    1488 <strftime+0x288>
jmp    1fa5 <strftime+0xda5>
movb   $0x0,-0xa0(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
je     14bb <strftime+0x2bb>
mov    -0x20(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
jmp    1f94 <strftime+0xd94>
jmp    14c0 <strftime+0x2c0>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl 0x1(%rax),%eax
mov    %eax,%ecx
mov    %rcx,-0xd0(%rbp)
sub    $0x79,%eax
ja     1efc <strftime+0xcfc>
mov    -0xd0(%rbp),%rax
lea    0x1b0d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x25,(%rax)
jmp    1faa <strftime+0xdaa>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x25,(%rax)
jmp    1f94 <strftime+0xd94>
mov    -0x28(%rbp),%rax
cmpl   $0x0,(%rax)
jl     1544 <strftime+0x344>
mov    -0x28(%rbp),%rax
cmpl   $0x6,(%rax)
jle    155c <strftime+0x35c>
lea    -0xa0(%rbp),%rdi
lea    0x1d76(%rip),%rsi
call   1050 <strcpy@plt>
jmp    157a <strftime+0x37a>
lea    -0xa0(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq (%rax),%rcx
lea    0x3b4f(%rip),%rax
mov    (%rax,%rcx,8),%rsi
call   1050 <strcpy@plt>
jmp    1f16 <strftime+0xd16>
mov    -0x28(%rbp),%rax
cmpl   $0x0,(%rax)
jl     1599 <strftime+0x399>
mov    -0x28(%rbp),%rax
cmpl   $0x6,(%rax)
jle    15b1 <strftime+0x3b1>
lea    -0xa0(%rbp),%rdi
lea    0x1d21(%rip),%rsi
call   1050 <strcpy@plt>
jmp    15cf <strftime+0x3cf>
lea    -0xa0(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq (%rax),%rcx
lea    0x3b3a(%rip),%rax
mov    (%rax,%rcx,8),%rsi
call   1050 <strcpy@plt>
jmp    1f16 <strftime+0xd16>
mov    -0x28(%rbp),%rax
cmpl   $0x0,0x4(%rax)
jl     15f0 <strftime+0x3f0>
mov    -0x28(%rbp),%rax
cmpl   $0xb,0x4(%rax)
jle    1608 <strftime+0x408>
lea    -0xa0(%rbp),%rdi
lea    0x1cca(%rip),%rsi
call   1050 <strcpy@plt>
jmp    1627 <strftime+0x427>
lea    -0xa0(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq 0x4(%rax),%rcx
lea    0x3b22(%rip),%rax
mov    (%rax,%rcx,8),%rsi
call   1050 <strcpy@plt>
jmp    1f16 <strftime+0xd16>
mov    -0x28(%rbp),%rax
cmpl   $0x0,0x4(%rax)
jl     1648 <strftime+0x448>
mov    -0x28(%rbp),%rax
cmpl   $0xb,0x4(%rax)
jle    1660 <strftime+0x460>
lea    -0xa0(%rbp),%rdi
lea    0x1c72(%rip),%rsi
call   1050 <strcpy@plt>
jmp    167f <strftime+0x47f>
lea    -0xa0(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq 0x4(%rax),%rcx
lea    0x3b2a(%rip),%rax
mov    (%rax,%rcx,8),%rsi
call   1050 <strcpy@plt>
jmp    1f16 <strftime+0xd16>
lea    -0xa0(%rbp),%rax
mov    %rax,-0x100(%rbp)
mov    -0x28(%rbp),%rax
movslq (%rax),%rdi
mov    $0x6,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %rax,%rcx
lea    0x3a0a(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xf8(%rbp)
mov    -0x28(%rbp),%rax
movslq 0x4(%rax),%rdi
mov    $0xb,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %rax,%rcx
lea    0x3a5a(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xf0(%rbp)
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x1f,%esi
call   10b0 <min@plt>
mov    %eax,%esi
mov    $0x1,%edi
call   10c0 <max@plt>
mov    %rax,-0xe8(%rbp)
mov    -0x28(%rbp),%rax
mov    0x10(%rax),%rdi
mov    $0x17,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %rax,-0xe0(%rbp)
mov    -0x28(%rbp),%rax
mov    0x18(%rax),%rdi
mov    $0x3b,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %rax,-0xd8(%rbp)
mov    -0x28(%rbp),%rax
mov    0x20(%rax),%rdi
mov    $0x3d,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    -0x100(%rbp),%rdi
mov    -0xf8(%rbp),%rdx
mov    -0xf0(%rbp),%rcx
mov    -0xe8(%rbp),%r8
mov    -0xe0(%rbp),%r9
mov    -0xd8(%rbp),%r11
mov    %rax,%r10
mov    -0x28(%rbp),%rax
mov    0x28(%rax),%eax
add    $0x76c,%eax
lea    0x1b15(%rip),%rsi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x1f,%esi
call   10b0 <min@plt>
mov    %eax,%esi
mov    $0x1,%edi
call   10c0 <max@plt>
mov    %eax,-0xa4(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0xa4(%rbp),%edx
lea    0x1afc(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
mov    -0x28(%rbp),%rax
mov    0x10(%rax),%rdi
mov    $0x17,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %eax,-0xa4(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0xa4(%rbp),%edx
lea    0x1abb(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
mov    -0x28(%rbp),%rax
mov    0x10(%rax),%rdi
mov    $0x17,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %eax,-0xa4(%rbp)
cmpl   $0x0,-0xa4(%rbp)
jne    1890 <strftime+0x690>
movl   $0xc,-0xa4(%rbp)
jmp    18b1 <strftime+0x6b1>
cmpl   $0xc,-0xa4(%rbp)
jle    18ac <strftime+0x6ac>
mov    -0xa4(%rbp),%eax
sub    $0xc,%eax
mov    %eax,-0xa4(%rbp)
jmp    18b1 <strftime+0x6b1>
lea    -0xa0(%rbp),%rdi
mov    -0xa4(%rbp),%edx
lea    0x1a3d(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
lea    -0xa0(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    0x30(%rax),%edx
add    $0x1,%edx
lea    0x19fd(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
mov    -0x28(%rbp),%rax
movslq 0x4(%rax),%rdi
mov    $0xb,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %eax,-0xa4(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0xa4(%rbp),%edx
add    $0x1,%edx
lea    0x19d5(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
mov    -0x28(%rbp),%rax
mov    0x18(%rax),%rdi
mov    $0x3b,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %eax,-0xa4(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0xa4(%rbp),%edx
lea    0x1994(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
mov    -0x28(%rbp),%rax
mov    0x10(%rax),%rdi
mov    $0x17,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %eax,-0xa4(%rbp)
cmpl   $0xc,-0xa4(%rbp)
jge    19c0 <strftime+0x7c0>
lea    -0xa0(%rbp),%rdi
mov    0x384a(%rip),%rsi
call   1050 <strcpy@plt>
jmp    19d3 <strftime+0x7d3>
lea    -0xa0(%rbp),%rdi
mov    0x383a(%rip),%rsi
call   1050 <strcpy@plt>
jmp    1f16 <strftime+0xd16>
mov    -0x28(%rbp),%rax
mov    0x20(%rax),%rdi
mov    $0x3d,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %eax,-0xa4(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0xa4(%rbp),%edx
lea    0x18f5(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
lea    -0xa0(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    -0x28(%rbp),%rdi
xor    %esi,%esi
call   10a0 <weeknumber@plt>
mov    -0x108(%rbp),%rdi
mov    %eax,%edx
lea    0x18b3(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
mov    -0x28(%rbp),%rax
movslq (%rax),%rdi
mov    $0x6,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %eax,-0xa4(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0xa4(%rbp),%edx
lea    0x1873(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
lea    -0xa0(%rbp),%rax
mov    %rax,-0x110(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x1,%esi
call   10a0 <weeknumber@plt>
mov    -0x110(%rbp),%rdi
mov    %eax,%edx
lea    0x183b(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
lea    -0xa0(%rbp),%rax
mov    %rax,-0x128(%rbp)
mov    -0x28(%rbp),%rax
movslq (%rax),%rdi
mov    $0x6,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %rax,%rcx
lea    0x35c8(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x120(%rbp)
mov    -0x28(%rbp),%rax
movslq 0x4(%rax),%rdi
mov    $0xb,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %rax,%rcx
lea    0x3618(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x118(%rbp)
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x1f,%esi
call   10b0 <min@plt>
mov    %eax,%esi
mov    $0x1,%edi
call   10c0 <max@plt>
mov    -0x128(%rbp),%rdi
mov    -0x120(%rbp),%rdx
mov    -0x118(%rbp),%rcx
mov    %rax,%r8
mov    -0x28(%rbp),%rax
mov    0x28(%rax),%r9d
add    $0x76c,%r9d
lea    0x176c(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
lea    -0xa0(%rbp),%rax
mov    %rax,-0x140(%rbp)
mov    -0x28(%rbp),%rax
mov    0x10(%rax),%rdi
mov    $0x17,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %rax,-0x138(%rbp)
mov    -0x28(%rbp),%rax
mov    0x18(%rax),%rdi
mov    $0x3b,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    %rax,-0x130(%rbp)
mov    -0x28(%rbp),%rax
mov    0x20(%rax),%rdi
mov    $0x3d,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    -0x140(%rbp),%rdi
mov    -0x138(%rbp),%rdx
mov    -0x130(%rbp),%rcx
mov    %rax,%r8
lea    0x16e1(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
mov    -0x28(%rbp),%rax
mov    0x28(%rax),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0xa4(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0xa4(%rbp),%edx
lea    0x16a9(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
lea    -0xa0(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    0x28(%rax),%edx
add    $0x76c,%edx
lea    0x1682(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
movl   $0x0,-0xa4(%rbp)
mov    0x3340(%rip),%rax
cmpl   $0x0,(%rax)
je     1cb1 <strftime+0xab1>
mov    -0x28(%rbp),%rax
cmpl   $0x0,0x2c(%rax)
je     1cb1 <strftime+0xab1>
movl   $0x1,-0xa4(%rbp)
lea    -0xa0(%rbp),%rdi
mov    0x3321(%rip),%rax
mov    (%rax),%rax
movslq -0xa4(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1050 <strcpy@plt>
jmp    1f16 <strftime+0xd16>
movb   $0xa,-0xa0(%rbp)
movb   $0x0,-0x9f(%rbp)
jmp    1f16 <strftime+0xd16>
movb   $0x9,-0xa0(%rbp)
movb   $0x0,-0x9f(%rbp)
jmp    1f16 <strftime+0xd16>
lea    -0xa0(%rbp),%rdi
mov    -0x28(%rbp),%rcx
mov    $0x64,%esi
lea    0x15f3(%rip),%rdx
call   1100 <strftime@plt>
jmp    1f16 <strftime+0xd16>
lea    -0xa0(%rbp),%rax
mov    %rax,-0x148(%rbp)
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x1f,%esi
call   10b0 <min@plt>
mov    %eax,%esi
mov    $0x1,%edi
call   10c0 <max@plt>
mov    -0x148(%rbp),%rdi
mov    %rax,%rdx
lea    0x15b5(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
lea    -0xa0(%rbp),%rdi
mov    -0x28(%rbp),%rcx
mov    $0x64,%esi
lea    0x1596(%rip),%rdx
call   1100 <strftime@plt>
jmp    1f16 <strftime+0xd16>
lea    -0xa0(%rbp),%rdi
mov    -0x28(%rbp),%rcx
mov    $0x64,%esi
lea    0x1581(%rip),%rdx
call   1100 <strftime@plt>
jmp    1f16 <strftime+0xd16>
lea    -0xa0(%rbp),%rdi
mov    -0x28(%rbp),%rcx
mov    $0x64,%esi
lea    0x1566(%rip),%rdx
call   1100 <strftime@plt>
jmp    1f16 <strftime+0xd16>
lea    -0xa0(%rbp),%rax
mov    %rax,-0x158(%rbp)
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x1f,%esi
call   10b0 <min@plt>
mov    %eax,%esi
mov    $0x1,%edi
call   10c0 <max@plt>
mov    %rax,-0x150(%rbp)
mov    -0x28(%rbp),%rax
movslq 0x4(%rax),%rdi
mov    $0xb,%esi
call   10b0 <min@plt>
mov    %eax,%esi
xor    %edi,%edi
call   10c0 <max@plt>
mov    -0x158(%rbp),%rdi
mov    -0x150(%rbp),%rdx
mov    %rax,%rcx
lea    0x3310(%rip),%rax
mov    (%rax,%rcx,8),%rcx
mov    -0x28(%rbp),%rax
mov    0x28(%rax),%r8d
add    $0x76c,%r8d
lea    0x14e5(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
movl   $0x3,-0xa4(%rbp)
cmpl   $0x6,-0xa4(%rbp)
jge    1ec2 <strftime+0xcc2>
movslq -0xa4(%rbp),%rax
movsbl -0xa0(%rbp,%rax,1),%edi
ff
call   1060 <islower@plt>
cmp    $0x0,%eax
je     1ea9 <strftime+0xca9>
movslq -0xa4(%rbp),%rax
movsbl -0xa0(%rbp,%rax,1),%edi
ff
call   1070 <toupper@plt>
mov    %al,%cl
movslq -0xa4(%rbp),%rax
mov    %cl,-0xa0(%rbp,%rax,1)
jmp    1eae <strftime+0xcae>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    1e5b <strftime+0xc5b>
jmp    1f16 <strftime+0xd16>
lea    -0xa0(%rbp),%rdi
mov    -0x28(%rbp),%rax
mov    0x28(%rax),%eax
add    $0x76c,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
lea    0x1417(%rip),%rsi
mov    $0x0,%al
call   1120 <sprintf@plt>
jmp    1f16 <strftime+0xd16>
jmp    14c0 <strftime+0x2c0>
movb   $0x25,-0xa0(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9f(%rbp)
movb   $0x0,-0x9e(%rbp)
lea    -0xa0(%rbp),%rdi
call   1080 <strlen@plt>
mov    %eax,-0xa4(%rbp)
cmpl   $0x0,-0xa4(%rbp)
je     1f8f <strftime+0xd8f>
mov    -0x10(%rbp),%rax
movslq -0xa4(%rbp),%rcx
add    %rcx,%rax
mov    -0x30(%rbp),%rcx
add    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
jae    1f7d <strftime+0xd7d>
mov    -0x10(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
call   1050 <strcpy@plt>
mov    -0xa4(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1f8a <strftime+0xd8a>
movq   $0x0,-0x8(%rbp)
jmp    1feb <strftime+0xdeb>
jmp    1f8f <strftime+0xd8f>
jmp    1f94 <strftime+0xd94>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1445 <strftime+0x245>
jmp    1faa <strftime+0xdaa>
mov    -0x10(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    1fe3 <strftime+0xde3>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1fe3 <strftime+0xde3>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1feb <strftime+0xdeb>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strftime>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    %rcx,0x8(%rsp)
xor    %r12d,%r12d
test   %rsi,%rsi
je     1a7f <strftime+0x87f>
mov    %rdi,%r15
test   %rdi,%rdi
je     1a7f <strftime+0x87f>
mov    %rdx,%rbx
test   %rdx,%rdx
je     1a7f <strftime+0x87f>
cmpq   $0x0,0x8(%rsp)
je     1a7f <strftime+0x87f>
mov    %rsi,%rbp
mov    %rbx,%rdi
mov    $0x25,%esi
call   1090 <strchr@plt>
test   %rax,%rax
jne    1271 <strftime+0x71>
mov    %rbx,%rdi
call   1080 <strlen@plt>
add    $0x1,%eax
cltq
cmp    %rbp,%rax
jae    1a7c <strftime+0x87c>
lea    0x1099(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%r13
mov    %rax,%rdi
call   1080 <strlen@plt>
cmpb   $0x0,0x2e19(%rip)
jne    12d1 <strftime+0xd1>
test   %r13,%r13
je     12c3 <strftime+0xc3>
mov    %eax,%r14d
add    $0x1,%r14d
mov    %r14d,%edi
call   10f0 <malloc@plt>
mov    %rax,0x2e04(%rip)
test   %rax,%rax
je     12c3 <strftime+0xc3>
mov    %r14d,0x2e00(%rip)
mov    %rax,%rdi
mov    %r13,%rsi
call   1050 <strcpy@plt>
xor    %eax,%eax
call   10e0 <tzset@plt>
movb   $0x1,0x2dd7(%rip)
test   %r13,%r13
je     1361 <strftime+0x161>
mov    0x2dcf(%rip),%rsi
test   %rsi,%rsi
je     1361 <strftime+0x161>
mov    0x0(%r13),%al
cmp    (%rsi),%al
jne    12fb <strftime+0xfb>
mov    %r13,%rdi
call   10d0 <strcmp@plt>
test   %rax,%rax
je     1361 <strftime+0x161>
mov    %r13,%rdi
call   1080 <strlen@plt>
mov    0x2da6(%rip),%rdi
cmp    0x2da8(%rip),%eax
jge    131c <strftime+0x11c>
mov    %r13,%rsi
call   1050 <strcpy@plt>
jmp    135a <strftime+0x15a>
mov    %eax,%r12d
add    $0x1,%r12d
mov    %r12d,%esi
call   1110 <realloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1347 <strftime+0x147>
mov    %r12d,0x2d7e(%rip)
mov    %r14,%rdi
mov    %r13,%rsi
call   1050 <strcpy@plt>
jmp    1353 <strftime+0x153>
mov    0x2d62(%rip),%rdi
call   1040 <free@plt>
mov    %r14,0x2d56(%rip)
xor    %eax,%eax
call   10e0 <tzset@plt>
add    %r15,%rbp
mov    (%rbx),%al
test   %al,%al
mov    %r15,0xa8(%rsp)
mov    %rbp,0xb0(%rsp)
je     1a6d <strftime+0x86d>
lea    -0x1(%rbp),%r14
cmp    %r15,%r14
jbe    1a6d <strftime+0x86d>
xor    %r12d,%r12d
lea    0xc6b(%rip),%r13
cs nopw 0x0(%rax,%rax,1)
nop
movb   $0x0,0x20(%rsp)
cmp    $0x25,%al
jne    13e0 <strftime+0x1e0>
add    $0x1,%rbx
movsbl (%rbx),%eax
cmp    $0x79,%eax
ja     13ec <strftime+0x1ec>
movslq 0x0(%r13,%rax,4),%rcx
add    %r13,%rcx
jmp    *%rcx
mov    0x8(%rsp),%rax
mov    0x4(%rax),%eax
cmp    $0xc,%rax
jae    16c5 <strftime+0x4c5>
lea    0x29d8(%rip),%rcx
jmp    1a22 <strftime+0x822>
nopl   (%rax)
mov    %al,(%r15)
add    $0x1,%r15
jmp    1a59 <strftime+0x859>
movb   $0x25,0x20(%rsp)
mov    %al,0x21(%rsp)
movb   $0x0,0x22(%rsp)
jmp    1a30 <strftime+0x830>
movb   $0x25,(%r15)
add    $0x1,%r15
jmp    1a59 <strftime+0x859>
mov    0x8(%rsp),%rax
mov    (%rax),%eax
cmp    $0x7,%rax
jae    16c5 <strftime+0x4c5>
lea    0xdc4(%rip),%rcx
jmp    143f <strftime+0x23f>
mov    0x8(%rsp),%rax
mov    0x4(%rax),%eax
cmp    $0xc,%rax
jae    16c5 <strftime+0x4c5>
lea    0xdc5(%rip),%rcx
movslq (%rcx,%rax,4),%rsi
add    %rcx,%rsi
jmp    1a26 <strftime+0x826>
mov    $0x76c,%eax
mov    0x8(%rsp),%rcx
add    0x28(%rcx),%eax
cltq
imul   $0x51eb851f,%rax,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x25,%rdx
add    %eax,%edx
lea    0xed9(%rip),%rsi
jmp    19f6 <strftime+0x7f6>
lea    0xed2(%rip),%rdx
jmp    18e8 <strftime+0x6e8>
mov    0x8(%rsp),%rax
mov    0x10(%rax),%rdi
mov    $0x17,%esi
jmp    14f4 <strftime+0x2f4>
mov    0x8(%rsp),%rax
mov    0x10(%rax),%rdi
mov    $0x17,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
lea    -0xc(%rax),%ecx
cmp    $0xd,%eax
cmovl  %eax,%ecx
test   %eax,%eax
mov    $0xc,%edx
cmovne %ecx,%edx
jmp    1893 <strftime+0x693>
mov    0x8(%rsp),%rax
mov    0x18(%rax),%rdi
mov    $0x3b,%esi
jmp    14f4 <strftime+0x2f4>
lea    0xe8b(%rip),%rdx
jmp    18e8 <strftime+0x6e8>
mov    0x8(%rsp),%rax
mov    0x20(%rax),%rdi
mov    $0x3d,%esi
call   10b0 <min@plt>
xor    %edi,%edi
jmp    180c <strftime+0x60c>
lea    0xe6b(%rip),%rdx
jmp    18e8 <strftime+0x6e8>
mov    0x8(%rsp),%rdi
xor    %esi,%esi
jmp    15e7 <strftime+0x3e7>
mov    0x8(%rsp),%rbp
mov    0x8(%rbp),%rdi
mov    $0x1f,%esi
call   10b0 <min@plt>
mov    $0x1,%edi
mov    %eax,%esi
call   10c0 <max@plt>
mov    %rax,0x10(%rsp)
movslq 0x4(%rbp),%rdi
mov    $0xb,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
lea    0x2856(%rip),%rcx
mov    (%rcx,%rax,8),%rcx
mov    $0x76c,%r8d
add    0x28(%rbp),%r8d
lea    0xe0c(%rip),%rsi
lea    0x20(%rsp),%rdi
mov    0x10(%rsp),%rdx
xor    %eax,%eax
call   1120 <sprintf@plt>
movsbl 0x23(%rsp),%edi
call   1060 <islower@plt>
test   %eax,%eax
je     159c <strftime+0x39c>
movsbl 0x23(%rsp),%edi
call   1070 <toupper@plt>
mov    %al,0x23(%rsp)
movsbl 0x24(%rsp),%edi
call   1060 <islower@plt>
test   %eax,%eax
je     15b8 <strftime+0x3b8>
movsbl 0x24(%rsp),%edi
call   1070 <toupper@plt>
mov    %al,0x24(%rsp)
movsbl 0x25(%rsp),%edi
call   1060 <islower@plt>
test   %eax,%eax
je     1a30 <strftime+0x830>
movsbl 0x25(%rsp),%edi
call   1070 <toupper@plt>
mov    %al,0x25(%rsp)
jmp    1a30 <strftime+0x830>
mov    0x8(%rsp),%rdi
mov    $0x1,%esi
call   10a0 <weeknumber@plt>
lea    0xd4e(%rip),%rsi
lea    0x20(%rsp),%rdi
mov    %eax,%edx
jmp    19fb <strftime+0x7fb>
mov    0x8(%rsp),%rbp
mov    0x10(%rbp),%rdi
mov    $0x17,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
mov    %rax,0x10(%rsp)
mov    0x18(%rbp),%rdi
mov    $0x3b,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
mov    %rax,0x18(%rsp)
mov    0x20(%rbp),%rdi
mov    $0x3d,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
lea    0xcea(%rip),%rsi
lea    0x20(%rsp),%rdi
mov    0x10(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    %rax,%r8
xor    %eax,%eax
call   1120 <sprintf@plt>
jmp    1a30 <strftime+0x830>
mov    $0x76c,%edx
mov    0x8(%rsp),%rax
add    0x28(%rax),%edx
lea    0xcb5(%rip),%rsi
jmp    189a <strftime+0x69a>
mov    0x2938(%rip),%rax
cmpl   $0x0,(%rax)
je     1a16 <strftime+0x816>
xor    %eax,%eax
mov    0x8(%rsp),%rcx
cmpl   $0x0,0x2c(%rcx)
setne  %al
jmp    1a18 <strftime+0x818>
mov    0x8(%rsp),%rax
mov    (%rax),%eax
cmp    $0x7,%rax
jb     1a04 <strftime+0x804>
lea    0xc48(%rip),%rsi
jmp    1a26 <strftime+0x826>
mov    0x8(%rsp),%r12
movslq (%r12),%rdi
mov    $0x6,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
lea    0x267c(%rip),%rcx
mov    (%rcx,%rax,8),%rax
mov    %rax,0x10(%rsp)
movslq 0x4(%r12),%rdi
mov    $0xb,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
lea    0x2694(%rip),%rcx
mov    (%rcx,%rax,8),%rax
mov    %rax,0x18(%rsp)
mov    0x8(%r12),%rdi
mov    $0x1f,%esi
call   10b0 <min@plt>
mov    $0x1,%edi
mov    %eax,%esi
call   10c0 <max@plt>
mov    %rax,0xa0(%rsp)
mov    0x10(%r12),%rdi
mov    $0x17,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
mov    %rax,0x98(%rsp)
mov    0x18(%r12),%rdi
mov    $0x3b,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
mov    %rax,0x90(%rsp)
mov    0x20(%r12),%rdi
mov    $0x3d,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
mov    %rax,%r10
mov    $0x76c,%ebp
add    0x28(%r12),%ebp
xor    %r12d,%r12d
sub    $0x8,%rsp
lea    0xb5b(%rip),%rsi
lea    0x28(%rsp),%rdi
mov    0x18(%rsp),%rdx
mov    0x20(%rsp),%rcx
mov    0xa8(%rsp),%r8
mov    0xa0(%rsp),%r9
xor    %eax,%eax
push   %rbp
push   %r10
push   0xa8(%rsp)
call   1120 <sprintf@plt>
add    $0x20,%rsp
jmp    1a30 <strftime+0x830>
mov    0x8(%rsp),%rax
mov    0x8(%rax),%rdi
mov    $0x1f,%esi
call   10b0 <min@plt>
mov    $0x1,%edi
mov    %eax,%esi
call   10c0 <max@plt>
lea    0xb34(%rip),%rsi
lea    0x20(%rsp),%rdi
mov    %eax,%edx
jmp    19fb <strftime+0x7fb>
mov    0x8(%rsp),%rax
mov    0x8(%rax),%rdi
mov    $0x1f,%esi
call   10b0 <min@plt>
mov    $0x1,%edi
mov    %eax,%esi
call   10c0 <max@plt>
lea    0xb10(%rip),%rsi
lea    0x20(%rsp),%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   1120 <sprintf@plt>
jmp    1a30 <strftime+0x830>
mov    0x8(%rsp),%rax
mov    0x30(%rax),%edx
add    $0x1,%edx
lea    0xac0(%rip),%rsi
jmp    189a <strftime+0x69a>
mov    0x8(%rsp),%rax
movslq 0x4(%rax),%rdi
mov    $0xb,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
lea    0x1(%rax),%edx
lea    0xab4(%rip),%rsi
lea    0x20(%rsp),%rdi
jmp    19fb <strftime+0x7fb>
movw   $0xa,0x20(%rsp)
jmp    1a30 <strftime+0x830>
mov    0x8(%rsp),%rax
mov    0x10(%rax),%rdi
mov    $0x17,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
cmp    $0xb,%eax
jg     1a0d <strftime+0x80d>
lea    0xa2f(%rip),%rsi
jmp    1a26 <strftime+0x826>
lea    0xa78(%rip),%rdx
lea    0x20(%rsp),%rdi
mov    $0x64,%esi
mov    0x8(%rsp),%rcx
call   1100 <strftime@plt>
jmp    1a30 <strftime+0x830>
movw   $0x9,0x20(%rsp)
jmp    1a30 <strftime+0x830>
mov    0x8(%rsp),%rax
movslq (%rax),%rdi
mov    $0x6,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
lea    0xa12(%rip),%rsi
jmp    181a <strftime+0x61a>
mov    0x8(%rsp),%rbp
movslq 0x0(%rbp),%rdi
mov    $0x6,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
lea    0x2419(%rip),%rcx
mov    (%rcx,%rax,8),%rax
mov    %rax,0x10(%rsp)
movslq 0x4(%rbp),%rdi
mov    $0xb,%esi
call   10b0 <min@plt>
xor    %edi,%edi
mov    %eax,%esi
call   10c0 <max@plt>
lea    0x2432(%rip),%rcx
mov    (%rcx,%rax,8),%rax
mov    %rax,0x18(%rsp)
mov    0x8(%rbp),%rdi
mov    $0x1f,%esi
call   10b0 <min@plt>
mov    $0x1,%edi
mov    %eax,%esi
call   10c0 <max@plt>
mov    $0x76c,%r9d
add    0x28(%rbp),%r9d
lea    0x985(%rip),%rsi
lea    0x20(%rsp),%rdi
mov    0x10(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    %rax,%r8
xor    %eax,%eax
call   1120 <sprintf@plt>
jmp    1a30 <strftime+0x830>
mov    0x8(%rsp),%rax
movslq 0x28(%rax),%rdx
imul   $0x51eb851f,%rdx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%eax
sub    %eax,%edx
lea    0x94b(%rip),%rsi
lea    0x20(%rsp),%rdi
xor    %eax,%eax
call   1120 <sprintf@plt>
jmp    1a30 <strftime+0x830>
lea    0x2365(%rip),%rcx
jmp    1a22 <strftime+0x822>
lea    0x8fa(%rip),%rsi
jmp    1a26 <strftime+0x826>
xor    %eax,%eax
mov    0x25c1(%rip),%rcx
mov    (%rcx),%rcx
mov    (%rcx,%rax,8),%rsi
lea    0x20(%rsp),%rdi
call   1050 <strcpy@plt>
lea    0x20(%rsp),%rdi
call   1080 <strlen@plt>
test   %eax,%eax
je     1a59 <strftime+0x859>
movslq %eax,%rbp
add    %r15,%rbp
cmp    %r14,%rbp
jae    1a7f <strftime+0x87f>
mov    %r15,%rdi
lea    0x20(%rsp),%rsi
call   1050 <strcpy@plt>
mov    %rbp,%r15
mov    0x1(%rbx),%al
add    $0x1,%rbx
test   %al,%al
je     1a6d <strftime+0x86d>
cmp    %r14,%r15
jb     13a0 <strftime+0x1a0>
cmp    0xb0(%rsp),%r15
jae    1a7c <strftime+0x87c>
cmpb   $0x0,(%rbx)
je     1a94 <strftime+0x894>
xor    %r12d,%r12d
mov    %r12,%rax
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movb   $0x0,(%r15)
sub    0xa8(%rsp),%r15
mov    %r15,%r12
jmp    1a7f <strftime+0x87f>
movb   $0x25,(%r15)
add    $0x1,%r15
cmp    0xb0(%rsp),%r15
jb     1a77 <strftime+0x877>
jmp    1a7c <strftime+0x87c>

LLVM IR (-O0):
%struct.tm = type { i32, i32, i64, i64, i64, i64, i32, i32, i32 }
@strftime.first = internal global i16 1
@strftime.savetz = internal global i8* null
@strftime.savetzlen = internal global i32 0
@strftime.days_a = internal global [7 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0)]
@.str = [4 x i8] c"Sun\00"
@.str.1 = [4 x i8] c"Mon\00"
@.str.2 = [4 x i8] c"Tue\00"
@.str.3 = [4 x i8] c"Wed\00"
@.str.4 = [4 x i8] c"Thu\00"
@.str.5 = [4 x i8] c"Fri\00"
@.str.6 = [4 x i8] c"Sat\00"
@strftime.days_l = internal global [7 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i32 0, i32 0)]
@.str.7 = [7 x i8] c"Sunday\00"
@.str.8 = [7 x i8] c"Monday\00"
@.str.9 = [8 x i8] c"Tuesday\00"
@.str.10 = [10 x i8] c"Wednesday\00"
@.str.11 = [9 x i8] c"Thursday\00"
@.str.12 = [7 x i8] c"Friday\00"
@.str.13 = [9 x i8] c"Saturday\00"
@strftime.months_a = internal global [12 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.25, i32 0, i32 0)]
@.str.14 = [4 x i8] c"Jan\00"
@.str.15 = [4 x i8] c"Feb\00"
@.str.16 = [4 x i8] c"Mar\00"
@.str.17 = [4 x i8] c"Apr\00"
@.str.18 = [4 x i8] c"May\00"
@.str.19 = [4 x i8] c"Jun\00"
@.str.20 = [4 x i8] c"Jul\00"
@.str.21 = [4 x i8] c"Aug\00"
@.str.22 = [4 x i8] c"Sep\00"
@.str.23 = [4 x i8] c"Oct\00"
@.str.24 = [4 x i8] c"Nov\00"
@.str.25 = [4 x i8] c"Dec\00"
@strftime.months_l = internal global [12 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.26, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.27, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.28, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.29, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.30, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.31, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.32, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.33, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.34, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.35, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.36, i32 0, i32 0)]
@.str.26 = [8 x i8] c"January\00"
@.str.27 = [9 x i8] c"February\00"
@.str.28 = [6 x i8] c"March\00"
@.str.29 = [6 x i8] c"April\00"
@.str.30 = [5 x i8] c"June\00"
@.str.31 = [5 x i8] c"July\00"
@.str.32 = [7 x i8] c"August\00"
@.str.33 = [10 x i8] c"September\00"
@.str.34 = [8 x i8] c"October\00"
@.str.35 = [9 x i8] c"November\00"
@.str.36 = [9 x i8] c"December\00"
@strftime.ampm = internal global [2 x i8*] [i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.37, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.38, i32 0, i32 0)]
@.str.37 = [3 x i8] c"AM\00"
@.str.38 = [3 x i8] c"PM\00"
@.str.39 = [3 x i8] c"TZ\00"
@.str.40 = [2 x i8] c"?\00"
@.str.41 = [28 x i8] c"%s %s %2d %02d:%02d:%02d %d\00"
@.str.42 = [5 x i8] c"%02d\00"
@.str.43 = [5 x i8] c"%03d\00"
@.str.44 = [3 x i8] c"%d\00"
@.str.45 = [13 x i8] c"%s %s %2d %d\00"
@.str.46 = [15 x i8] c"%02d:%02d:%02d\00"
@daylight = global i32 0
@tzname = global i8** null
@.str.47 = [9 x i8] c"%m/%d/%y\00"
@.str.48 = [4 x i8] c"%2d\00"
@.str.49 = [12 x i8] c"%I:%M:%S %p\00"
@.str.50 = [6 x i8] c"%H:%M\00"
@.str.51 = [9 x i8] c"%H:%M:%S\00"
@.str.52 = [14 x i8] c"%2d-%3.3s-%4d\00"
define i64 @strftime(i8* %0, i64 %1, i8* %2, %struct.tm* %3) {
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
%9 = alloca %struct.tm*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca [100 x i8]
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i32
%16 = alloca i8*
store i8* %0, i8** %6
store i64 %1, i64* %7
store i8* %2, i8** %8
store %struct.tm* %3, %struct.tm** %9
%17 = load i8*, i8** %6
%18 = load i64, i64* %7
%19 = getelementptr inbounds i8, i8* %17, i64 %18
store i8* %19, i8** %10
%20 = load i8*, i8** %6
store i8* %20, i8** %11
%21 = load i8*, i8** %6
%22 = icmp eq i8* %21, null
br i1 %22, label %32, label %23
23: ; preds = %4
%24 = load i8*, i8** %8
%25 = icmp eq i8* %24, null
br i1 %25, label %32, label %26
26: ; preds = %23
%27 = load %struct.tm*, %struct.tm** %9
%28 = icmp eq %struct.tm* %27, null
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load i64, i64* %7
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %29, %26, %23, %4
store i64 0, i64* %5
br label %623
33: ; preds = %29
%34 = load i8*, i8** %8
%35 = call i32* @strchr(i8* %34, i8 signext 37)
%36 = icmp eq i32* %35, null
br i1 %36, label %37, label %45
37: ; preds = %33
%38 = load i8*, i8** %8
%39 = call i32 @strlen(i8* %38)
%40 = add nsw i32 %39, 1
%41 = sext i32 %40 to i64
%42 = load i64, i64* %7
%43 = icmp uge i64 %41, %42
br i1 %43, label %44, label %45
44: ; preds = %37
store i64 0, i64* %5
br label %623
45: ; preds = %37, %33
%46 = call i8* @getenv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.39, i64 0, i64 0))
store i8* %46, i8** %14
%47 = load i8*, i8** %14
%48 = call i32 @strlen(i8* %47)
store i32 %48, i32* %15
%49 = load i16, i16* @strftime.first
%50 = icmp ne i16 %49, 0
br i1 %50, label %51, label %70
51: ; preds = %45
%52 = load i8*, i8** %14
%53 = icmp ne i8* %52, null
br i1 %53, label %54, label %68
54: ; preds = %51
%55 = load i32, i32* %15
%56 = add nsw i32 %55, 1
%57 = call i64 @malloc(i32 %56)
%58 = inttoptr i64 %57 to i8*
store i8* %58, i8** @strftime.savetz
%59 = load i8*, i8** @strftime.savetz
%60 = icmp ne i8* %59, null
br i1 %60, label %61, label %67
61: ; preds = %54
%62 = load i32, i32* %15
%63 = add nsw i32 %62, 1
store i32 %63, i32* @strftime.savetzlen
%64 = load i8*, i8** @strftime.savetz
%65 = load i8*, i8** %14
%66 = call i32 @strcpy(i8* %64, i8* %65)
br label %67
67: ; preds = %61, %54
br label %68
68: ; preds = %67, %51
%69 = call i32 (...) @tzset()
store i16 0, i16* @strftime.first
br label %70
70: ; preds = %68, %45
%71 = load i8*, i8** %14
%72 = icmp ne i8* %71, null
br i1 %72, label %73, label %121
73: ; preds = %70
%74 = load i8*, i8** @strftime.savetz
%75 = icmp ne i8* %74, null
br i1 %75, label %76, label %121
76: ; preds = %73
%77 = load i8*, i8** %14
%78 = getelementptr inbounds i8, i8* %77, i64 0
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = load i8*, i8** @strftime.savetz
%82 = getelementptr inbounds i8, i8* %81, i64 0
%83 = load i8, i8* %82
%84 = sext i8 %83 to i32
%85 = icmp ne i32 %80, %84
br i1 %85, label %91, label %86
86: ; preds = %76
%87 = load i8*, i8** %14
%88 = load i8*, i8** @strftime.savetz
%89 = call i64 @strcmp(i8* %87, i8* %88)
%90 = icmp ne i64 %89, 0
br i1 %90, label %91, label %121
91: ; preds = %86, %76
%92 = load i8*, i8** %14
%93 = call i32 @strlen(i8* %92)
%94 = add nsw i32 %93, 1
store i32 %94, i32* %13
%95 = load i32, i32* %13
%96 = load i32, i32* @strftime.savetzlen
%97 = icmp sgt i32 %95, %96
br i1 %97, label %98, label %115
98: ; preds = %91
%99 = load i8*, i8** @strftime.savetz
%100 = load i32, i32* %13
%101 = call i64 @realloc(i8* %99, i32 %100)
%102 = inttoptr i64 %101 to i8*
store i8* %102, i8** %16
%103 = load i8*, i8** %16
%104 = icmp ne i8* %103, null
br i1 %104, label %105, label %110
105: ; preds = %98
%106 = load i32, i32* %13
store i32 %106, i32* @strftime.savetzlen
%107 = load i8*, i8** %16
%108 = load i8*, i8** %14
%109 = call i32 @strcpy(i8* %107, i8* %108)
br label %113
110: ; preds = %98
%111 = load i8*, i8** @strftime.savetz
%112 = call i32 @free(i8* %111)
br label %113
113: ; preds = %110, %105
%114 = load i8*, i8** %16
store i8* %114, i8** @strftime.savetz
br label %119
115: ; preds = %91
%116 = load i8*, i8** @strftime.savetz
%117 = load i8*, i8** %14
%118 = call i32 @strcpy(i8* %116, i8* %117)
br label %119
119: ; preds = %115, %113
%120 = call i32 (...) @tzset()
br label %121
121: ; preds = %119, %86, %73, %70
br label %122
122: ; preds = %602, %121
%123 = load i8*, i8** %8
%124 = load i8, i8* %123
%125 = sext i8 %124 to i32
%126 = icmp ne i32 %125, 0
br i1 %126, label %127, label %132
127: ; preds = %122
%128 = load i8*, i8** %6
%129 = load i8*, i8** %10
%130 = getelementptr inbounds i8, i8* %129, i64 -1
%131 = icmp ult i8* %128, %130
br label %132
132: ; preds = %127, %122
%133 = phi i1 [ false, %122 ], [ %131, %127 ]
br i1 %133, label %134, label %605
134: ; preds = %132
%135 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
store i8 0, i8* %135
%136 = load i8*, i8** %8
%137 = load i8, i8* %136
%138 = sext i8 %137 to i32
%139 = icmp ne i32 %138, 37
br i1 %139, label %140, label %145
140: ; preds = %134
%141 = load i8*, i8** %8
%142 = load i8, i8* %141
%143 = load i8*, i8** %6
%144 = getelementptr inbounds i8, i8* %143, i32 1
store i8* %144, i8** %6
store i8 %142, i8* %143
br label %602
145: ; preds = %134
br label %146
146: ; preds = %571, %145
%147 = load i8*, i8** %8
%148 = getelementptr inbounds i8, i8* %147, i32 1
store i8* %148, i8** %8
%149 = load i8, i8* %148
%150 = sext i8 %149 to i32
switch i32 %150, label %572 [
i32 0, label %151
i32 37, label %154
i32 97, label %157
i32 65, label %180
i32 104, label %203
i32 98, label %203
i32 66, label %226
i32 99, label %249
i32 100, label %292
i32 72, label %302
i32 73, label %312
i32 106, label %333
i32 109, label %340
i32 77, label %352
i32 112, label %362
i32 83, label %380
i32 85, label %390
i32 119, label %395
i32 87, label %406
i32 120, label %411
i32 88, label %439
i32 121, label %457
i32 89, label %465
i32 90, label %472
i32 110, label %489
i32 116, label %492
i32 68, label %495
i32 101, label %499
i32 114, label %507
i32 82, label %511
i32 84, label %515
i32 86, label %519
i32 67, label %563
i32 69, label %571
i32 79, label %571
]
151: ; preds = %146
%152 = load i8*, i8** %6
%153 = getelementptr inbounds i8, i8* %152, i32 1
store i8* %153, i8** %6
store i8 37, i8* %152
br label %606
154: ; preds = %146
%155 = load i8*, i8** %6
%156 = getelementptr inbounds i8, i8* %155, i32 1
store i8* %156, i8** %6
store i8 37, i8* %155
br label %602
157: ; preds = %146
%158 = load %struct.tm*, %struct.tm** %9
%159 = getelementptr inbounds %struct.tm, %struct.tm* %158, i32 0, i32 0
%160 = load i32, i32* %159
%161 = icmp slt i32 %160, 0
br i1 %161, label %167, label %162
162: ; preds = %157
%163 = load %struct.tm*, %struct.tm** %9
%164 = getelementptr inbounds %struct.tm, %struct.tm* %163, i32 0, i32 0
%165 = load i32, i32* %164
%166 = icmp sgt i32 %165, 6
br i1 %166, label %167, label %170
167: ; preds = %162, %157
%168 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%169 = call i32 @strcpy(i8* %168, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.40, i64 0, i64 0))
br label %179
170: ; preds = %162
%171 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%172 = load %struct.tm*, %struct.tm** %9
%173 = getelementptr inbounds %struct.tm, %struct.tm* %172, i32 0, i32 0
%174 = load i32, i32* %173
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds [7 x i8*], [7 x i8*]* @strftime.days_a, i64 0, i64 %175
%177 = load i8*, i8** %176
%178 = call i32 @strcpy(i8* %171, i8* %177)
br label %179
179: ; preds = %170, %167
br label %578
180: ; preds = %146
%181 = load %struct.tm*, %struct.tm** %9
%182 = getelementptr inbounds %struct.tm, %struct.tm* %181, i32 0, i32 0
%183 = load i32, i32* %182
%184 = icmp slt i32 %183, 0
br i1 %184, label %190, label %185
185: ; preds = %180
%186 = load %struct.tm*, %struct.tm** %9
%187 = getelementptr inbounds %struct.tm, %struct.tm* %186, i32 0, i32 0
%188 = load i32, i32* %187
%189 = icmp sgt i32 %188, 6
br i1 %189, label %190, label %193
190: ; preds = %185, %180
%191 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%192 = call i32 @strcpy(i8* %191, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.40, i64 0, i64 0))
br label %202
193: ; preds = %185
%194 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%195 = load %struct.tm*, %struct.tm** %9
%196 = getelementptr inbounds %struct.tm, %struct.tm* %195, i32 0, i32 0
%197 = load i32, i32* %196
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds [7 x i8*], [7 x i8*]* @strftime.days_l, i64 0, i64 %198
%200 = load i8*, i8** %199
%201 = call i32 @strcpy(i8* %194, i8* %200)
br label %202
202: ; preds = %193, %190
br label %578
203: ; preds = %146, %146
%204 = load %struct.tm*, %struct.tm** %9
%205 = getelementptr inbounds %struct.tm, %struct.tm* %204, i32 0, i32 1
%206 = load i32, i32* %205
%207 = icmp slt i32 %206, 0
br i1 %207, label %213, label %208
208: ; preds = %203
%209 = load %struct.tm*, %struct.tm** %9
%210 = getelementptr inbounds %struct.tm, %struct.tm* %209, i32 0, i32 1
%211 = load i32, i32* %210
%212 = icmp sgt i32 %211, 11
br i1 %212, label %213, label %216
213: ; preds = %208, %203
%214 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%215 = call i32 @strcpy(i8* %214, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.40, i64 0, i64 0))
br label %225
216: ; preds = %208
%217 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%218 = load %struct.tm*, %struct.tm** %9
%219 = getelementptr inbounds %struct.tm, %struct.tm* %218, i32 0, i32 1
%220 = load i32, i32* %219
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds [12 x i8*], [12 x i8*]* @strftime.months_a, i64 0, i64 %221
%223 = load i8*, i8** %222
%224 = call i32 @strcpy(i8* %217, i8* %223)
br label %225
225: ; preds = %216, %213
br label %578
226: ; preds = %146
%227 = load %struct.tm*, %struct.tm** %9
%228 = getelementptr inbounds %struct.tm, %struct.tm* %227, i32 0, i32 1
%229 = load i32, i32* %228
%230 = icmp slt i32 %229, 0
br i1 %230, label %236, label %231
231: ; preds = %226
%232 = load %struct.tm*, %struct.tm** %9
%233 = getelementptr inbounds %struct.tm, %struct.tm* %232, i32 0, i32 1
%234 = load i32, i32* %233
%235 = icmp sgt i32 %234, 11
br i1 %235, label %236, label %239
236: ; preds = %231, %226
%237 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%238 = call i32 @strcpy(i8* %237, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.40, i64 0, i64 0))
br label %248
239: ; preds = %231
%240 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%241 = load %struct.tm*, %struct.tm** %9
%242 = getelementptr inbounds %struct.tm, %struct.tm* %241, i32 0, i32 1
%243 = load i32, i32* %242
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds [12 x i8*], [12 x i8*]* @strftime.months_l, i64 0, i64 %244
%246 = load i8*, i8** %245
%247 = call i32 @strcpy(i8* %240, i8* %246)
br label %248
248: ; preds = %239, %236
br label %578
249: ; preds = %146
%250 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%251 = load %struct.tm*, %struct.tm** %9
%252 = getelementptr inbounds %struct.tm, %struct.tm* %251, i32 0, i32 0
%253 = load i32, i32* %252
%254 = sext i32 %253 to i64
%255 = call i32 @min(i64 %254, i32 6)
%256 = call i64 @max(i32 0, i32 %255)
%257 = getelementptr inbounds [7 x i8*], [7 x i8*]* @strftime.days_a, i64 0, i64 %256
%258 = load i8*, i8** %257
%259 = load %struct.tm*, %struct.tm** %9
%260 = getelementptr inbounds %struct.tm, %struct.tm* %259, i32 0, i32 1
%261 = load i32, i32* %260
%262 = sext i32 %261 to i64
%263 = call i32 @min(i64 %262, i32 11)
%264 = call i64 @max(i32 0, i32 %263)
%265 = getelementptr inbounds [12 x i8*], [12 x i8*]* @strftime.months_a, i64 0, i64 %264
%266 = load i8*, i8** %265
%267 = load %struct.tm*, %struct.tm** %9
%268 = getelementptr inbounds %struct.tm, %struct.tm* %267, i32 0, i32 2
%269 = load i64, i64* %268
%270 = call i32 @min(i64 %269, i32 31)
%271 = call i64 @max(i32 1, i32 %270)
%272 = load %struct.tm*, %struct.tm** %9
%273 = getelementptr inbounds %struct.tm, %struct.tm* %272, i32 0, i32 3
%274 = load i64, i64* %273
%275 = call i32 @min(i64 %274, i32 23)
%276 = call i64 @max(i32 0, i32 %275)
%277 = load %struct.tm*, %struct.tm** %9
%278 = getelementptr inbounds %struct.tm, %struct.tm* %277, i32 0, i32 4
%279 = load i64, i64* %278
%280 = call i32 @min(i64 %279, i32 59)
%281 = call i64 @max(i32 0, i32 %280)
%282 = load %struct.tm*, %struct.tm** %9
%283 = getelementptr inbounds %struct.tm, %struct.tm* %282, i32 0, i32 5
%284 = load i64, i64* %283
%285 = call i32 @min(i64 %284, i32 61)
%286 = call i64 @max(i32 0, i32 %285)
%287 = load %struct.tm*, %struct.tm** %9
%288 = getelementptr inbounds %struct.tm, %struct.tm* %287, i32 0, i32 6
%289 = load i32, i32* %288
%290 = add nsw i32 %289, 1900
%291 = call i32 (i8*, i8*, ...) @sprintf(i8* %250, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.41, i64 0, i64 0), i8* %258, i8* %266, i64 %271, i64 %276, i64 %281, i64 %286, i32 %290)
br label %578
292: ; preds = %146
%293 = load %struct.tm*, %struct.tm** %9
%294 = getelementptr inbounds %struct.tm, %struct.tm* %293, i32 0, i32 2
%295 = load i64, i64* %294
%296 = call i32 @min(i64 %295, i32 31)
%297 = call i64 @max(i32 1, i32 %296)
%298 = trunc i64 %297 to i32
store i32 %298, i32* %13
%299 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%300 = load i32, i32* %13
%301 = call i32 (i8*, i8*, ...) @sprintf(i8* %299, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.42, i64 0, i64 0), i32 %300)
br label %578
302: ; preds = %146
%303 = load %struct.tm*, %struct.tm** %9
%304 = getelementptr inbounds %struct.tm, %struct.tm* %303, i32 0, i32 3
%305 = load i64, i64* %304
%306 = call i32 @min(i64 %305, i32 23)
%307 = call i64 @max(i32 0, i32 %306)
%308 = trunc i64 %307 to i32
store i32 %308, i32* %13
%309 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%310 = load i32, i32* %13
%311 = call i32 (i8*, i8*, ...) @sprintf(i8* %309, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.42, i64 0, i64 0), i32 %310)
br label %578
312: ; preds = %146
%313 = load %struct.tm*, %struct.tm** %9
%314 = getelementptr inbounds %struct.tm, %struct.tm* %313, i32 0, i32 3
%315 = load i64, i64* %314
%316 = call i32 @min(i64 %315, i32 23)
%317 = call i64 @max(i32 0, i32 %316)
%318 = trunc i64 %317 to i32
store i32 %318, i32* %13
%319 = load i32, i32* %13
%320 = icmp eq i32 %319, 0
br i1 %320, label %321, label %322
321: ; preds = %312
store i32 12, i32* %13
br label %329
322: ; preds = %312
%323 = load i32, i32* %13
%324 = icmp sgt i32 %323, 12
br i1 %324, label %325, label %328
325: ; preds = %322
%326 = load i32, i32* %13
%327 = sub nsw i32 %326, 12
store i32 %327, i32* %13
br label %328
328: ; preds = %325, %322
br label %329
329: ; preds = %328, %321
%330 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%331 = load i32, i32* %13
%332 = call i32 (i8*, i8*, ...) @sprintf(i8* %330, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.42, i64 0, i64 0), i32 %331)
br label %578
333: ; preds = %146
%334 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%335 = load %struct.tm*, %struct.tm** %9
%336 = getelementptr inbounds %struct.tm, %struct.tm* %335, i32 0, i32 8
%337 = load i32, i32* %336
%338 = add nsw i32 %337, 1
%339 = call i32 (i8*, i8*, ...) @sprintf(i8* %334, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.43, i64 0, i64 0), i32 %338)
br label %578
340: ; preds = %146
%341 = load %struct.tm*, %struct.tm** %9
%342 = getelementptr inbounds %struct.tm, %struct.tm* %341, i32 0, i32 1
%343 = load i32, i32* %342
%344 = sext i32 %343 to i64
%345 = call i32 @min(i64 %344, i32 11)
%346 = call i64 @max(i32 0, i32 %345)
%347 = trunc i64 %346 to i32
store i32 %347, i32* %13
%348 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%349 = load i32, i32* %13
%350 = add nsw i32 %349, 1
%351 = call i32 (i8*, i8*, ...) @sprintf(i8* %348, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.42, i64 0, i64 0), i32 %350)
br label %578
352: ; preds = %146
%353 = load %struct.tm*, %struct.tm** %9
%354 = getelementptr inbounds %struct.tm, %struct.tm* %353, i32 0, i32 4
%355 = load i64, i64* %354
%356 = call i32 @min(i64 %355, i32 59)
%357 = call i64 @max(i32 0, i32 %356)
%358 = trunc i64 %357 to i32
store i32 %358, i32* %13
%359 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%360 = load i32, i32* %13
%361 = call i32 (i8*, i8*, ...) @sprintf(i8* %359, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.42, i64 0, i64 0), i32 %360)
br label %578
362: ; preds = %146
%363 = load %struct.tm*, %struct.tm** %9
%364 = getelementptr inbounds %struct.tm, %struct.tm* %363, i32 0, i32 3
%365 = load i64, i64* %364
%366 = call i32 @min(i64 %365, i32 23)
%367 = call i64 @max(i32 0, i32 %366)
%368 = trunc i64 %367 to i32
store i32 %368, i32* %13
%369 = load i32, i32* %13
%370 = icmp slt i32 %369, 12
br i1 %370, label %371, label %375
371: ; preds = %362
%372 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%373 = load i8*, i8** getelementptr inbounds ([2 x i8*], [2 x i8*]* @strftime.ampm, i64 0, i64 0)
%374 = call i32 @strcpy(i8* %372, i8* %373)
br label %379
375: ; preds = %362
%376 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%377 = load i8*, i8** getelementptr inbounds ([2 x i8*], [2 x i8*]* @strftime.ampm, i64 0, i64 1)
%378 = call i32 @strcpy(i8* %376, i8* %377)
br label %379
379: ; preds = %375, %371
br label %578
380: ; preds = %146
%381 = load %struct.tm*, %struct.tm** %9
%382 = getelementptr inbounds %struct.tm, %struct.tm* %381, i32 0, i32 5
%383 = load i64, i64* %382
%384 = call i32 @min(i64 %383, i32 61)
%385 = call i64 @max(i32 0, i32 %384)
%386 = trunc i64 %385 to i32
store i32 %386, i32* %13
%387 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%388 = load i32, i32* %13
%389 = call i32 (i8*, i8*, ...) @sprintf(i8* %387, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.42, i64 0, i64 0), i32 %388)
br label %578
390: ; preds = %146
%391 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%392 = load %struct.tm*, %struct.tm** %9
%393 = call i32 @weeknumber(%struct.tm* %392, i32 0)
%394 = call i32 (i8*, i8*, ...) @sprintf(i8* %391, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.44, i64 0, i64 0), i32 %393)
br label %578
395: ; preds = %146
%396 = load %struct.tm*, %struct.tm** %9
%397 = getelementptr inbounds %struct.tm, %struct.tm* %396, i32 0, i32 0
%398 = load i32, i32* %397
%399 = sext i32 %398 to i64
%400 = call i32 @min(i64 %399, i32 6)
%401 = call i64 @max(i32 0, i32 %400)
%402 = trunc i64 %401 to i32
store i32 %402, i32* %13
%403 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%404 = load i32, i32* %13
%405 = call i32 (i8*, i8*, ...) @sprintf(i8* %403, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.44, i64 0, i64 0), i32 %404)
br label %578
406: ; preds = %146
%407 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%408 = load %struct.tm*, %struct.tm** %9
%409 = call i32 @weeknumber(%struct.tm* %408, i32 1)
%410 = call i32 (i8*, i8*, ...) @sprintf(i8* %407, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.44, i64 0, i64 0), i32 %409)
br label %578
411: ; preds = %146
%412 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%413 = load %struct.tm*, %struct.tm** %9
%414 = getelementptr inbounds %struct.tm, %struct.tm* %413, i32 0, i32 0
%415 = load i32, i32* %414
%416 = sext i32 %415 to i64
%417 = call i32 @min(i64 %416, i32 6)
%418 = call i64 @max(i32 0, i32 %417)
%419 = getelementptr inbounds [7 x i8*], [7 x i8*]* @strftime.days_a, i64 0, i64 %418
%420 = load i8*, i8** %419
%421 = load %struct.tm*, %struct.tm** %9
%422 = getelementptr inbounds %struct.tm, %struct.tm* %421, i32 0, i32 1
%423 = load i32, i32* %422
%424 = sext i32 %423 to i64
%425 = call i32 @min(i64 %424, i32 11)
%426 = call i64 @max(i32 0, i32 %425)
%427 = getelementptr inbounds [12 x i8*], [12 x i8*]* @strftime.months_a, i64 0, i64 %426
%428 = load i8*, i8** %427
%429 = load %struct.tm*, %struct.tm** %9
%430 = getelementptr inbounds %struct.tm, %struct.tm* %429, i32 0, i32 2
%431 = load i64, i64* %430
%432 = call i32 @min(i64 %431, i32 31)
%433 = call i64 @max(i32 1, i32 %432)
%434 = load %struct.tm*, %struct.tm** %9
%435 = getelementptr inbounds %struct.tm, %struct.tm* %434, i32 0, i32 6
%436 = load i32, i32* %435
%437 = add nsw i32 %436, 1900
%438 = call i32 (i8*, i8*, ...) @sprintf(i8* %412, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.45, i64 0, i64 0), i8* %420, i8* %428, i64 %433, i32 %437)
br label %578
439: ; preds = %146
%440 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%441 = load %struct.tm*, %struct.tm** %9
%442 = getelementptr inbounds %struct.tm, %struct.tm* %441, i32 0, i32 3
%443 = load i64, i64* %442
%444 = call i32 @min(i64 %443, i32 23)
%445 = call i64 @max(i32 0, i32 %444)
%446 = load %struct.tm*, %struct.tm** %9
%447 = getelementptr inbounds %struct.tm, %struct.tm* %446, i32 0, i32 4
%448 = load i64, i64* %447
%449 = call i32 @min(i64 %448, i32 59)
%450 = call i64 @max(i32 0, i32 %449)
%451 = load %struct.tm*, %struct.tm** %9
%452 = getelementptr inbounds %struct.tm, %struct.tm* %451, i32 0, i32 5
%453 = load i64, i64* %452
%454 = call i32 @min(i64 %453, i32 61)
%455 = call i64 @max(i32 0, i32 %454)
%456 = call i32 (i8*, i8*, ...) @sprintf(i8* %440, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.46, i64 0, i64 0), i64 %445, i64 %450, i64 %455)
br label %578
457: ; preds = %146
%458 = load %struct.tm*, %struct.tm** %9
%459 = getelementptr inbounds %struct.tm, %struct.tm* %458, i32 0, i32 6
%460 = load i32, i32* %459
%461 = srem i32 %460, 100
store i32 %461, i32* %13
%462 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%463 = load i32, i32* %13
%464 = call i32 (i8*, i8*, ...) @sprintf(i8* %462, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.44, i64 0, i64 0), i32 %463)
br label %578
465: ; preds = %146
%466 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%467 = load %struct.tm*, %struct.tm** %9
%468 = getelementptr inbounds %struct.tm, %struct.tm* %467, i32 0, i32 6
%469 = load i32, i32* %468
%470 = add nsw i32 1900, %469
%471 = call i32 (i8*, i8*, ...) @sprintf(i8* %466, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.44, i64 0, i64 0), i32 %470)
br label %578
472: ; preds = %146
store i32 0, i32* %13
%473 = load i32, i32* @daylight
%474 = icmp ne i32 %473, 0
br i1 %474, label %475, label %481
475: ; preds = %472
%476 = load %struct.tm*, %struct.tm** %9
%477 = getelementptr inbounds %struct.tm, %struct.tm* %476, i32 0, i32 7
%478 = load i32, i32* %477
%479 = icmp ne i32 %478, 0
br i1 %479, label %480, label %481
480: ; preds = %475
store i32 1, i32* %13
br label %481
481: ; preds = %480, %475, %472
%482 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%483 = load i8**, i8*** @tzname
%484 = load i32, i32* %13
%485 = sext i32 %484 to i64
%486 = getelementptr inbounds i8*, i8** %483, i64 %485
%487 = load i8*, i8** %486
%488 = call i32 @strcpy(i8* %482, i8* %487)
br label %578
489: ; preds = %146
%490 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
store i8 10, i8* %490
%491 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 1
store i8 0, i8* %491
br label %578
492: ; preds = %146
%493 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
store i8 9, i8* %493
%494 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 1
store i8 0, i8* %494
br label %578
495: ; preds = %146
%496 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%497 = load %struct.tm*, %struct.tm** %9
%498 = call i64 @strftime(i8* %496, i64 100, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.47, i64 0, i64 0), %struct.tm* %497)
br label %578
499: ; preds = %146
%500 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%501 = load %struct.tm*, %struct.tm** %9
%502 = getelementptr inbounds %struct.tm, %struct.tm* %501, i32 0, i32 2
%503 = load i64, i64* %502
%504 = call i32 @min(i64 %503, i32 31)
%505 = call i64 @max(i32 1, i32 %504)
%506 = call i32 (i8*, i8*, ...) @sprintf(i8* %500, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.48, i64 0, i64 0), i64 %505)
br label %578
507: ; preds = %146
%508 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%509 = load %struct.tm*, %struct.tm** %9
%510 = call i64 @strftime(i8* %508, i64 100, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.49, i64 0, i64 0), %struct.tm* %509)
br label %578
511: ; preds = %146
%512 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%513 = load %struct.tm*, %struct.tm** %9
%514 = call i64 @strftime(i8* %512, i64 100, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.50, i64 0, i64 0), %struct.tm* %513)
br label %578
515: ; preds = %146
%516 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%517 = load %struct.tm*, %struct.tm** %9
%518 = call i64 @strftime(i8* %516, i64 100, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.51, i64 0, i64 0), %struct.tm* %517)
br label %578
519: ; preds = %146
%520 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%521 = load %struct.tm*, %struct.tm** %9
%522 = getelementptr inbounds %struct.tm, %struct.tm* %521, i32 0, i32 2
%523 = load i64, i64* %522
%524 = call i32 @min(i64 %523, i32 31)
%525 = call i64 @max(i32 1, i32 %524)
%526 = load %struct.tm*, %struct.tm** %9
%527 = getelementptr inbounds %struct.tm, %struct.tm* %526, i32 0, i32 1
%528 = load i32, i32* %527
%529 = sext i32 %528 to i64
%530 = call i32 @min(i64 %529, i32 11)
%531 = call i64 @max(i32 0, i32 %530)
%532 = getelementptr inbounds [12 x i8*], [12 x i8*]* @strftime.months_a, i64 0, i64 %531
%533 = load i8*, i8** %532
%534 = load %struct.tm*, %struct.tm** %9
%535 = getelementptr inbounds %struct.tm, %struct.tm* %534, i32 0, i32 6
%536 = load i32, i32* %535
%537 = add nsw i32 %536, 1900
%538 = call i32 (i8*, i8*, ...) @sprintf(i8* %520, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.52, i64 0, i64 0), i64 %525, i8* %533, i32 %537)
store i32 3, i32* %13
br label %539
539: ; preds = %559, %519
%540 = load i32, i32* %13
%541 = icmp slt i32 %540, 6
br i1 %541, label %542, label %562
542: ; preds = %539
%543 = load i32, i32* %13
%544 = sext i32 %543 to i64
%545 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 %544
%546 = load i8, i8* %545
%547 = call i32 @islower(i8 signext %546)
%548 = icmp ne i32 %547, 0
br i1 %548, label %549, label %558
549: ; preds = %542
%550 = load i32, i32* %13
%551 = sext i32 %550 to i64
%552 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 %551
%553 = load i8, i8* %552
%554 = call signext i8 @toupper(i8 signext %553)
%555 = load i32, i32* %13
%556 = sext i32 %555 to i64
%557 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 %556
store i8 %554, i8* %557
br label %558
558: ; preds = %549, %542
br label %559
559: ; preds = %558
%560 = load i32, i32* %13
%561 = add nsw i32 %560, 1
store i32 %561, i32* %13
br label %539
562: ; preds = %539
br label %578
563: ; preds = %146
%564 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%565 = load %struct.tm*, %struct.tm** %9
%566 = getelementptr inbounds %struct.tm, %struct.tm* %565, i32 0, i32 6
%567 = load i32, i32* %566
%568 = add nsw i32 %567, 1900
%569 = sdiv i32 %568, 100
%570 = call i32 (i8*, i8*, ...) @sprintf(i8* %564, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.42, i64 0, i64 0), i32 %569)
br label %578
571: ; preds = %146, %146
br label %146
572: ; preds = %146
%573 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
store i8 37, i8* %573
%574 = load i8*, i8** %8
%575 = load i8, i8* %574
%576 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 1
store i8 %575, i8* %576
%577 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 2
store i8 0, i8* %577
br label %578
578: ; preds = %572, %563, %562, %515, %511, %507, %499, %495, %492, %489, %481, %465, %457, %439, %411, %406, %395, %390, %380, %379, %352, %340, %333, %329, %302, %292, %249, %248, %225, %202, %179
%579 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%580 = call i32 @strlen(i8* %579)
store i32 %580, i32* %13
%581 = load i32, i32* %13
%582 = icmp ne i32 %581, 0
br i1 %582, label %583, label %601
583: ; preds = %578
%584 = load i8*, i8** %6
%585 = load i32, i32* %13
%586 = sext i32 %585 to i64
%587 = getelementptr inbounds i8, i8* %584, i64 %586
%588 = load i8*, i8** %10
%589 = getelementptr inbounds i8, i8* %588, i64 -1
%590 = icmp ult i8* %587, %589
br i1 %590, label %591, label %599
591: ; preds = %583
%592 = load i8*, i8** %6
%593 = getelementptr inbounds [100 x i8], [100 x i8]* %12, i64 0, i64 0
%594 = call i32 @strcpy(i8* %592, i8* %593)
%595 = load i32, i32* %13
%596 = load i8*, i8** %6
%597 = sext i32 %595 to i64
%598 = getelementptr inbounds i8, i8* %596, i64 %597
store i8* %598, i8** %6
br label %600
599: ; preds = %583
store i64 0, i64* %5
br label %623
600: ; preds = %591
br label %601
601: ; preds = %600, %578
br label %602
602: ; preds = %601, %154, %140
%603 = load i8*, i8** %8
%604 = getelementptr inbounds i8, i8* %603, i32 1
store i8* %604, i8** %8
br label %122
605: ; preds = %132
br label %606
606: ; preds = %605, %151
%607 = load i8*, i8** %6
%608 = load i8*, i8** %10
%609 = icmp ult i8* %607, %608
br i1 %609, label %610, label %622
610: ; preds = %606
%611 = load i8*, i8** %8
%612 = load i8, i8* %611
%613 = sext i8 %612 to i32
%614 = icmp eq i32 %613, 0
br i1 %614, label %615, label %622
615: ; preds = %610
%616 = load i8*, i8** %6
store i8 0, i8* %616
%617 = load i8*, i8** %6
%618 = load i8*, i8** %11
%619 = ptrtoint i8* %617 to i64
%620 = ptrtoint i8* %618 to i64
%621 = sub i64 %619, %620
store i64 %621, i64* %5
br label %623
622: ; preds = %610, %606
store i64 0, i64* %5
br label %623
623: ; preds = %622, %615, %599, %44, %32
%624 = load i64, i64* %5
ret i64 %624
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i64, i64, i64, i64, i32, i32, i32 }
@strftime.first = internal unnamed_addr global i1 false
@strftime.savetz = internal unnamed_addr global i8* null
@strftime.savetzlen = internal unnamed_addr global i32 0
@strftime.days_a = internal unnamed_addr constant [7 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0)]
@.str = [4 x i8] c"Sun\00"
@.str.1 = [4 x i8] c"Mon\00"
@.str.2 = [4 x i8] c"Tue\00"
@.str.3 = [4 x i8] c"Wed\00"
@.str.4 = [4 x i8] c"Thu\00"
@.str.5 = [4 x i8] c"Fri\00"
@.str.6 = [4 x i8] c"Sat\00"
@reltable.strftime = internal unnamed_addr constant [7 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.7 to i64), i64 ptrtoint ([7 x i32]* @reltable.strftime to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.8 to i64), i64 ptrtoint ([7 x i32]* @reltable.strftime to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.9 to i64), i64 ptrtoint ([7 x i32]* @reltable.strftime to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.10 to i64), i64 ptrtoint ([7 x i32]* @reltable.strftime to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.11 to i64), i64 ptrtoint ([7 x i32]* @reltable.strftime to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.12 to i64), i64 ptrtoint ([7 x i32]* @reltable.strftime to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.13 to i64), i64 ptrtoint ([7 x i32]* @reltable.strftime to i64)) to i32)]
@.str.7 = [7 x i8] c"Sunday\00"
@.str.8 = [7 x i8] c"Monday\00"
@.str.9 = [8 x i8] c"Tuesday\00"
@.str.10 = [10 x i8] c"Wednesday\00"
@.str.11 = [9 x i8] c"Thursday\00"
@.str.12 = [7 x i8] c"Friday\00"
@.str.13 = [9 x i8] c"Saturday\00"
@strftime.months_a = internal unnamed_addr constant [12 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.25, i32 0, i32 0)]
@.str.14 = [4 x i8] c"Jan\00"
@.str.15 = [4 x i8] c"Feb\00"
@.str.16 = [4 x i8] c"Mar\00"
@.str.17 = [4 x i8] c"Apr\00"
@.str.18 = [4 x i8] c"May\00"
@.str.19 = [4 x i8] c"Jun\00"
@.str.20 = [4 x i8] c"Jul\00"
@.str.21 = [4 x i8] c"Aug\00"
@.str.22 = [4 x i8] c"Sep\00"
@.str.23 = [4 x i8] c"Oct\00"
@.str.24 = [4 x i8] c"Nov\00"
@.str.25 = [4 x i8] c"Dec\00"
@reltable.strftime.53 = internal unnamed_addr constant [12 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.26 to i64), i64 ptrtoint ([12 x i32]* @reltable.strftime.53 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.27 to i64), i64 ptrtoint ([12 x i32]* @reltable.strftime.53 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.28 to i64), i64 ptrtoint ([12 x i32]* @reltable.strftime.53 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.29 to i64), i64 ptrtoint ([12 x i32]* @reltable.strftime.53 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.18 to i64), i64 ptrtoint ([12 x i32]* @reltable.strftime.53 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.30 to i64), i64 ptrtoint ([12 x i32]* @reltable.strftime.53 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.31 to i64), i64 ptrtoint ([12 x i32]* @reltable.strftime.53 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.32 to i64), i64 ptrtoint ([12 x i32]* @reltable.strftime.53 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.33 to i64), i64 ptrtoint ([12 x i32]* @reltable.strftime.53 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.34 to i64), i64 ptrtoint ([12 x i32]* @reltable.strftime.53 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.35 to i64), i64 ptrtoint ([12 x i32]* @reltable.strftime.53 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.36 to i64), i64 ptrtoint ([12 x i32]* @reltable.strftime.53 to i64)) to i32)]
@.str.26 = [8 x i8] c"January\00"
@.str.27 = [9 x i8] c"February\00"
@.str.28 = [6 x i8] c"March\00"
@.str.29 = [6 x i8] c"April\00"
@.str.30 = [5 x i8] c"June\00"
@.str.31 = [5 x i8] c"July\00"
@.str.32 = [7 x i8] c"August\00"
@.str.33 = [10 x i8] c"September\00"
@.str.34 = [8 x i8] c"October\00"
@.str.35 = [9 x i8] c"November\00"
@.str.36 = [9 x i8] c"December\00"
@.str.37 = [3 x i8] c"AM\00"
@.str.38 = [3 x i8] c"PM\00"
@.str.39 = [3 x i8] c"TZ\00"
@.str.40 = [2 x i8] c"?\00"
@.str.41 = [28 x i8] c"%s %s %2d %02d:%02d:%02d %d\00"
@.str.42 = [5 x i8] c"%02d\00"
@.str.43 = [5 x i8] c"%03d\00"
@.str.44 = [3 x i8] c"%d\00"
@.str.45 = [13 x i8] c"%s %s %2d %d\00"
@.str.46 = [15 x i8] c"%02d:%02d:%02d\00"
@daylight = global i32 0
@tzname = global i8** null
@.str.47 = [9 x i8] c"%m/%d/%y\00"
@.str.48 = [4 x i8] c"%2d\00"
@.str.49 = [12 x i8] c"%I:%M:%S %p\00"
@.str.50 = [6 x i8] c"%H:%M\00"
@.str.51 = [9 x i8] c"%H:%M:%S\00"
@.str.52 = [14 x i8] c"%2d-%3.3s-%4d\00"
define i64 @strftime(i8* %0, i64 %1, i8* %2, %struct.tm* %3) {
%5 = alloca [100 x i8]
%6 = getelementptr inbounds i8, i8* %0, i64 %1
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%8 = icmp eq i8* %0, null
%9 = icmp eq i8* %2, null
%10 = or i1 %8, %9
%11 = icmp eq %struct.tm* %3, null
%12 = or i1 %10, %11
%13 = icmp eq i64 %1, 0
%14 = or i1 %13, %12
br i1 %14, label %379, label %15
15: ; preds = %4
%16 = tail call i32* @strchr(i8* %2, i8 signext 37)
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %23
18: ; preds = %15
%19 = tail call i32 @strlen(i8* %2)
%20 = add nsw i32 %19, 1
%21 = sext i32 %20 to i64
%22 = icmp ult i64 %21, %1
br i1 %22, label %23, label %379
23: ; preds = %18, %15
%24 = tail call i8* @getenv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.39, i64 0, i64 0))
%25 = tail call i32 @strlen(i8* %24)
%26 = load i1, i1* @strftime.first
br i1 %26, label %38, label %27
27: ; preds = %23
%28 = icmp eq i8* %24, null
br i1 %28, label %36, label %29
29: ; preds = %27
%30 = add nsw i32 %25, 1
%31 = tail call i64 @malloc(i32 %30)
%32 = inttoptr i64 %31 to i8*
store i8* %32, i8** @strftime.savetz
%33 = icmp eq i64 %31, 0
br i1 %33, label %36, label %34
34: ; preds = %29
store i32 %30, i32* @strftime.savetzlen
%35 = tail call i32 @strcpy(i8* %32, i8* %24)
br label %36
36: ; preds = %29, %34, %27
%37 = tail call i32 (...) @tzset()
store i1 true, i1* @strftime.first
br label %38
38: ; preds = %36, %23
%39 = icmp ne i8* %24, null
%40 = load i8*, i8** @strftime.savetz
%41 = icmp ne i8* %40, null
%42 = select i1 %39, i1 %41, i1 false
br i1 %42, label %43, label %70
43: ; preds = %38
%44 = load i8, i8* %24
%45 = load i8, i8* %40
%46 = icmp eq i8 %44, %45
br i1 %46, label %47, label %50
47: ; preds = %43
%48 = tail call i64 @strcmp(i8* %24, i8* %40)
%49 = icmp eq i64 %48, 0
br i1 %49, label %70, label %50
50: ; preds = %47, %43
%51 = tail call i32 @strlen(i8* %24)
%52 = add nsw i32 %51, 1
%53 = load i32, i32* @strftime.savetzlen
%54 = icmp slt i32 %51, %53
%55 = load i8*, i8** @strftime.savetz
br i1 %54, label %66, label %56
56: ; preds = %50
%57 = tail call i64 @realloc(i8* %55, i32 %52)
%58 = inttoptr i64 %57 to i8*
%59 = icmp eq i64 %57, 0
br i1 %59, label %62, label %60
60: ; preds = %56
store i32 %52, i32* @strftime.savetzlen
%61 = tail call i32 @strcpy(i8* %58, i8* %24)
br label %65
62: ; preds = %56
%63 = load i8*, i8** @strftime.savetz
%64 = tail call i32 @free(i8* %63)
br label %65
65: ; preds = %62, %60
store i8* %58, i8** @strftime.savetz
br label %68
66: ; preds = %50
%67 = tail call i32 @strcpy(i8* %55, i8* %24)
br label %68
68: ; preds = %66, %65
%69 = tail call i32 (...) @tzset()
br label %70
70: ; preds = %68, %47, %38
%71 = getelementptr inbounds i8, i8* %6, i64 -1
%72 = load i8, i8* %2
%73 = icmp ne i8 %72, 0
%74 = icmp ugt i8* %71, %0
%75 = select i1 %73, i1 %74, i1 false
br i1 %75, label %76, label %368
76: ; preds = %70
%77 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 6
%78 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 2
%79 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 1
%80 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 1
%81 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 7
%82 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 3
%83 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 4
%84 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 5
%85 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 0
%86 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 8
%87 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 2
%88 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 3
%89 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 4
%90 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 5
br label %91
91: ; preds = %76, %360
%92 = phi i8 [ %72, %76 ], [ %364, %360 ]
%93 = phi i8* [ %0, %76 ], [ %362, %360 ]
%94 = phi i8* [ %2, %76 ], [ %363, %360 ]
store i8 0, i8* %7
%95 = icmp eq i8 %92, 37
br i1 %95, label %98, label %96
96: ; preds = %91
%97 = getelementptr inbounds i8, i8* %93, i64 1
store i8 %92, i8* %93
br label %360
98: ; preds = %91, %103
%99 = phi i8* [ %100, %103 ], [ %94, %91 ]
%100 = getelementptr inbounds i8, i8* %99, i64 1
%101 = load i8, i8* %100
%102 = sext i8 %101 to i32
switch i32 %102, label %350 [
i32 0, label %104
i32 37, label %106
i32 97, label %108
i32 65, label %118
i32 104, label %128
i32 98, label %128
i32 66, label %138
i32 99, label %148
i32 100, label %176
i32 72, label %182
i32 73, label %188
i32 106, label %199
i32 109, label %203
i32 77, label %211
i32 112, label %217
i32 83, label %227
i32 85, label %233
i32 119, label %236
i32 87, label %243
i32 120, label %246
i32 88, label %265
i32 121, label %276
i32 89, label %280
i32 90, label %284
i32 110, label %297
i32 116, label %298
i32 68, label %299
i32 101, label %301
i32 114, label %306
i32 82, label %308
i32 84, label %310
i32 86, label %312
i32 67, label %345
i32 69, label %103
i32 79, label %103
]
103: ; preds = %98, %98
br label %98
104: ; preds = %98
%105 = getelementptr inbounds i8, i8* %93, i64 1
store i8 37, i8* %93
br label %368
106: ; preds = %98
%107 = getelementptr inbounds i8, i8* %93, i64 1
store i8 37, i8* %93
br label %360
108: ; preds = %98
%109 = load i32, i32* %85
%110 = icmp ugt i32 %109, 6
br i1 %110, label %111, label %113
111: ; preds = %108
%112 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.40, i64 0, i64 0))
br label %351
113: ; preds = %108
%114 = zext i32 %109 to i64
%115 = getelementptr inbounds [7 x i8*], [7 x i8*]* @strftime.days_a, i64 0, i64 %114
%116 = load i8*, i8** %115
%117 = call i32 @strcpy(i8* %7, i8* %116)
br label %351
118: ; preds = %98
%119 = load i32, i32* %85
%120 = icmp ugt i32 %119, 6
br i1 %120, label %121, label %123
121: ; preds = %118
%122 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.40, i64 0, i64 0))
br label %351
123: ; preds = %118
%124 = zext i32 %119 to i64
%125 = shl i64 %124, 2
%126 = call i8* @llvm.load.relative.i64(i8* bitcast ([7 x i32]* @reltable.strftime to i8*), i64 %125)
%127 = call i32 @strcpy(i8* %7, i8* %126)
br label %351
128: ; preds = %98, %98
%129 = load i32, i32* %79
%130 = icmp ugt i32 %129, 11
br i1 %130, label %131, label %133
131: ; preds = %128
%132 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.40, i64 0, i64 0))
br label %351
133: ; preds = %128
%134 = zext i32 %129 to i64
%135 = getelementptr inbounds [12 x i8*], [12 x i8*]* @strftime.months_a, i64 0, i64 %134
%136 = load i8*, i8** %135
%137 = call i32 @strcpy(i8* %7, i8* %136)
br label %351
138: ; preds = %98
%139 = load i32, i32* %79
%140 = icmp ugt i32 %139, 11
br i1 %140, label %141, label %143
141: ; preds = %138
%142 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.40, i64 0, i64 0))
br label %351
143: ; preds = %138
%144 = zext i32 %139 to i64
%145 = shl i64 %144, 2
%146 = call i8* @llvm.load.relative.i64(i8* bitcast ([12 x i32]* @reltable.strftime.53 to i8*), i64 %145)
%147 = call i32 @strcpy(i8* %7, i8* %146)
br label %351
148: ; preds = %98
%149 = load i32, i32* %85
%150 = sext i32 %149 to i64
%151 = call i32 @min(i64 %150, i32 6)
%152 = call i64 @max(i32 0, i32 %151)
%153 = getelementptr inbounds [7 x i8*], [7 x i8*]* @strftime.days_a, i64 0, i64 %152
%154 = load i8*, i8** %153
%155 = load i32, i32* %79
%156 = sext i32 %155 to i64
%157 = call i32 @min(i64 %156, i32 11)
%158 = call i64 @max(i32 0, i32 %157)
%159 = getelementptr inbounds [12 x i8*], [12 x i8*]* @strftime.months_a, i64 0, i64 %158
%160 = load i8*, i8** %159
%161 = load i64, i64* %78
%162 = call i32 @min(i64 %161, i32 31)
%163 = call i64 @max(i32 1, i32 %162)
%164 = load i64, i64* %82
%165 = call i32 @min(i64 %164, i32 23)
%166 = call i64 @max(i32 0, i32 %165)
%167 = load i64, i64* %83
%168 = call i32 @min(i64 %167, i32 59)
%169 = call i64 @max(i32 0, i32 %168)
%170 = load i64, i64* %84
%171 = call i32 @min(i64 %170, i32 61)
%172 = call i64 @max(i32 0, i32 %171)
%173 = load i32, i32* %77
%174 = add nsw i32 %173, 1900
%175 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.41, i64 0, i64 0), i8* %154, i8* %160, i64 %163, i64 %166, i64 %169, i64 %172, i32 %174)
br label %351
176: ; preds = %98
%177 = load i64, i64* %78
%178 = call i32 @min(i64 %177, i32 31)
%179 = call i64 @max(i32 1, i32 %178)
%180 = trunc i64 %179 to i32
%181 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.42, i64 0, i64 0), i32 %180)
br label %351
182: ; preds = %98
%183 = load i64, i64* %82
%184 = call i32 @min(i64 %183, i32 23)
%185 = call i64 @max(i32 0, i32 %184)
%186 = trunc i64 %185 to i32
%187 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.42, i64 0, i64 0), i32 %186)
br label %351
188: ; preds = %98
%189 = load i64, i64* %82
%190 = call i32 @min(i64 %189, i32 23)
%191 = call i64 @max(i32 0, i32 %190)
%192 = trunc i64 %191 to i32
%193 = icmp eq i32 %192, 0
%194 = icmp sgt i32 %192, 12
%195 = add nsw i32 %192, -12
%196 = select i1 %194, i32 %195, i32 %192
%197 = select i1 %193, i32 12, i32 %196
%198 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.42, i64 0, i64 0), i32 %197)
br label %351
199: ; preds = %98
%200 = load i32, i32* %86
%201 = add nsw i32 %200, 1
%202 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.43, i64 0, i64 0), i32 %201)
br label %351
203: ; preds = %98
%204 = load i32, i32* %79
%205 = sext i32 %204 to i64
%206 = call i32 @min(i64 %205, i32 11)
%207 = call i64 @max(i32 0, i32 %206)
%208 = trunc i64 %207 to i32
%209 = add nsw i32 %208, 1
%210 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.42, i64 0, i64 0), i32 %209)
br label %351
211: ; preds = %98
%212 = load i64, i64* %83
%213 = call i32 @min(i64 %212, i32 59)
%214 = call i64 @max(i32 0, i32 %213)
%215 = trunc i64 %214 to i32
%216 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.42, i64 0, i64 0), i32 %215)
br label %351
217: ; preds = %98
%218 = load i64, i64* %82
%219 = call i32 @min(i64 %218, i32 23)
%220 = call i64 @max(i32 0, i32 %219)
%221 = trunc i64 %220 to i32
%222 = icmp slt i32 %221, 12
br i1 %222, label %223, label %225
223: ; preds = %217
%224 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.37, i64 0, i64 0))
br label %351
225: ; preds = %217
%226 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.38, i64 0, i64 0))
br label %351
227: ; preds = %98
%228 = load i64, i64* %84
%229 = call i32 @min(i64 %228, i32 61)
%230 = call i64 @max(i32 0, i32 %229)
%231 = trunc i64 %230 to i32
%232 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.42, i64 0, i64 0), i32 %231)
br label %351
233: ; preds = %98
%234 = call i32 @weeknumber(%struct.tm* %3, i32 0)
%235 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.44, i64 0, i64 0), i32 %234)
br label %351
236: ; preds = %98
%237 = load i32, i32* %85
%238 = sext i32 %237 to i64
%239 = call i32 @min(i64 %238, i32 6)
%240 = call i64 @max(i32 0, i32 %239)
%241 = trunc i64 %240 to i32
%242 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.44, i64 0, i64 0), i32 %241)
br label %351
243: ; preds = %98
%244 = call i32 @weeknumber(%struct.tm* %3, i32 1)
%245 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.44, i64 0, i64 0), i32 %244)
br label %351
246: ; preds = %98
%247 = load i32, i32* %85
%248 = sext i32 %247 to i64
%249 = call i32 @min(i64 %248, i32 6)
%250 = call i64 @max(i32 0, i32 %249)
%251 = getelementptr inbounds [7 x i8*], [7 x i8*]* @strftime.days_a, i64 0, i64 %250
%252 = load i8*, i8** %251
%253 = load i32, i32* %79
%254 = sext i32 %253 to i64
%255 = call i32 @min(i64 %254, i32 11)
%256 = call i64 @max(i32 0, i32 %255)
%257 = getelementptr inbounds [12 x i8*], [12 x i8*]* @strftime.months_a, i64 0, i64 %256
%258 = load i8*, i8** %257
%259 = load i64, i64* %78
%260 = call i32 @min(i64 %259, i32 31)
%261 = call i64 @max(i32 1, i32 %260)
%262 = load i32, i32* %77
%263 = add nsw i32 %262, 1900
%264 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.45, i64 0, i64 0), i8* %252, i8* %258, i64 %261, i32 %263)
br label %351
265: ; preds = %98
%266 = load i64, i64* %82
%267 = call i32 @min(i64 %266, i32 23)
%268 = call i64 @max(i32 0, i32 %267)
%269 = load i64, i64* %83
%270 = call i32 @min(i64 %269, i32 59)
%271 = call i64 @max(i32 0, i32 %270)
%272 = load i64, i64* %84
%273 = call i32 @min(i64 %272, i32 61)
%274 = call i64 @max(i32 0, i32 %273)
%275 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.46, i64 0, i64 0), i64 %268, i64 %271, i64 %274)
br label %351
276: ; preds = %98
%277 = load i32, i32* %77
%278 = srem i32 %277, 100
%279 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.44, i64 0, i64 0), i32 %278)
br label %351
280: ; preds = %98
%281 = load i32, i32* %77
%282 = add nsw i32 %281, 1900
%283 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.44, i64 0, i64 0), i32 %282)
br label %351
284: ; preds = %98
%285 = load i32, i32* @daylight
%286 = icmp eq i32 %285, 0
br i1 %286, label %291, label %287
287: ; preds = %284
%288 = load i32, i32* %81
%289 = icmp ne i32 %288, 0
%290 = zext i1 %289 to i64
br label %291
291: ; preds = %287, %284
%292 = phi i64 [ 0, %284 ], [ %290, %287 ]
%293 = load i8**, i8*** @tzname
%294 = getelementptr inbounds i8*, i8** %293, i64 %292
%295 = load i8*, i8** %294
%296 = call i32 @strcpy(i8* %7, i8* %295)
br label %351
297: ; preds = %98
store i8 10, i8* %7
store i8 0, i8* %80
br label %351
298: ; preds = %98
store i8 9, i8* %7
store i8 0, i8* %80
br label %351
299: ; preds = %98
%300 = call i64 @strftime(i8* %7, i64 100, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.47, i64 0, i64 0), %struct.tm* %3)
br label %351
301: ; preds = %98
%302 = load i64, i64* %78
%303 = call i32 @min(i64 %302, i32 31)
%304 = call i64 @max(i32 1, i32 %303)
%305 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.48, i64 0, i64 0), i64 %304)
br label %351
306: ; preds = %98
%307 = call i64 @strftime(i8* %7, i64 100, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.49, i64 0, i64 0), %struct.tm* %3)
br label %351
308: ; preds = %98
%309 = call i64 @strftime(i8* %7, i64 100, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.50, i64 0, i64 0), %struct.tm* %3)
br label %351
310: ; preds = %98
%311 = call i64 @strftime(i8* %7, i64 100, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.51, i64 0, i64 0), %struct.tm* %3)
br label %351
312: ; preds = %98
%313 = load i64, i64* %78
%314 = call i32 @min(i64 %313, i32 31)
%315 = call i64 @max(i32 1, i32 %314)
%316 = load i32, i32* %79
%317 = sext i32 %316 to i64
%318 = call i32 @min(i64 %317, i32 11)
%319 = call i64 @max(i32 0, i32 %318)
%320 = getelementptr inbounds [12 x i8*], [12 x i8*]* @strftime.months_a, i64 0, i64 %319
%321 = load i8*, i8** %320
%322 = load i32, i32* %77
%323 = add nsw i32 %322, 1900
%324 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.52, i64 0, i64 0), i64 %315, i8* %321, i32 %323)
%325 = load i8, i8* %88
%326 = call i32 @islower(i8 signext %325)
%327 = icmp eq i32 %326, 0
br i1 %327, label %331, label %328
328: ; preds = %312
%329 = load i8, i8* %88
%330 = call signext i8 @toupper(i8 signext %329)
store i8 %330, i8* %88
br label %331
331: ; preds = %312, %328
%332 = load i8, i8* %89
%333 = call i32 @islower(i8 signext %332)
%334 = icmp eq i32 %333, 0
br i1 %334, label %338, label %335
335: ; preds = %331
%336 = load i8, i8* %89
%337 = call signext i8 @toupper(i8 signext %336)
store i8 %337, i8* %89
br label %338
338: ; preds = %335, %331
%339 = load i8, i8* %90
%340 = call i32 @islower(i8 signext %339)
%341 = icmp eq i32 %340, 0
br i1 %341, label %351, label %342
342: ; preds = %338
%343 = load i8, i8* %90
%344 = call signext i8 @toupper(i8 signext %343)
store i8 %344, i8* %90
br label %351
345: ; preds = %98
%346 = load i32, i32* %77
%347 = add nsw i32 %346, 1900
%348 = sdiv i32 %347, 100
%349 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.42, i64 0, i64 0), i32 %348)
br label %351
350: ; preds = %98
store i8 37, i8* %7
store i8 %101, i8* %80
store i8 0, i8* %87
br label %351
351: ; preds = %338, %342, %223, %225, %141, %143, %131, %133, %121, %123, %111, %113, %350, %345, %310, %308, %306, %301, %299, %298, %297, %291, %280, %276, %265, %246, %243, %236, %233, %227, %211, %203, %199, %188, %182, %176, %148
%352 = call i32 @strlen(i8* %7)
%353 = icmp eq i32 %352, 0
br i1 %353, label %360, label %354
354: ; preds = %351
%355 = sext i32 %352 to i64
%356 = getelementptr inbounds i8, i8* %93, i64 %355
%357 = icmp ult i8* %356, %71
br i1 %357, label %358, label %379
358: ; preds = %354
%359 = call i32 @strcpy(i8* %93, i8* %7)
br label %360
360: ; preds = %351, %358, %106, %96
%361 = phi i8* [ %94, %96 ], [ %100, %358 ], [ %100, %351 ], [ %100, %106 ]
%362 = phi i8* [ %97, %96 ], [ %356, %358 ], [ %93, %351 ], [ %107, %106 ]
%363 = getelementptr inbounds i8, i8* %361, i64 1
%364 = load i8, i8* %363
%365 = icmp ne i8 %364, 0
%366 = icmp ult i8* %362, %71
%367 = select i1 %365, i1 %366, i1 false
br i1 %367, label %91, label %368
368: ; preds = %360, %70, %104
%369 = phi i8* [ %100, %104 ], [ %2, %70 ], [ %363, %360 ]
%370 = phi i8* [ %105, %104 ], [ %0, %70 ], [ %362, %360 ]
%371 = icmp ult i8* %370, %6
br i1 %371, label %372, label %379
372: ; preds = %368
%373 = load i8, i8* %369
%374 = icmp eq i8 %373, 0
br i1 %374, label %375, label %379
375: ; preds = %372
store i8 0, i8* %370
%376 = ptrtoint i8* %370 to i64
%377 = ptrtoint i8* %0 to i64
%378 = sub i64 %376, %377
br label %379
379: ; preds = %354, %368, %372, %18, %4, %375
%380 = phi i64 [ %378, %375 ], [ 0, %4 ], [ 0, %18 ], [ 0, %372 ], [ 0, %368 ], [ 0, %354 ]
ret i64 %380
}