#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  char tm_sec;
  char tm_year;
  char tm_mon;
  char tm_mday;
  char tm_hour;
  char tm_min;
  int tm_isdst;
};
struct timespec {
  int tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
int /*<<< orphan*/ errx(int, char *);
struct tm *localtime(int /*<<< orphan*/ *);
int mktime(struct tm *);
char *strchr(char const *, char);
int strlen(char const *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void stime_arg1(const char *arg, struct timespec *tvp) {
  time_t now;
  struct tm *t;
  int yearset;
  char *p;
  now = time(NULL);
  if ((t = localtime(&now)) == NULL)
    err(1, "localtime");
  if ((p = strchr(arg, '.')) == NULL)
    t->tm_sec = 0;
  else {
    if (strlen(p + 1) != 2)
      goto terr;
    *p++ = '\0';
    t->tm_sec = ((p)[0] - '0') * 10 + ((p)[1] - '0');
    (p) += 2;
    ;
  }
  yearset = 0;
  switch (strlen(arg)) {
  case 12:
    t->tm_year = ((arg)[0] - '0') * 10 + ((arg)[1] - '0');
    (arg) += 2;
    ;
    t->tm_year *= 100;
    yearset = 1;
  case 10:
    if (yearset) {
      yearset = ((arg)[0] - '0') * 10 + ((arg)[1] - '0');
      (arg) += 2;
      ;
      t->tm_year += yearset;
    } else {
      yearset = ((arg)[0] - '0') * 10 + ((arg)[1] - '0');
      (arg) += 2;
      ;
      if (yearset < 69)
        t->tm_year = yearset + 2000;
      else
        t->tm_year = yearset + 1900;
    }
    t->tm_year -= 1900;
  case 8:
    t->tm_mon = ((arg)[0] - '0') * 10 + ((arg)[1] - '0');
    (arg) += 2;
    ;
    --t->tm_mon;
    t->tm_mday = ((arg)[0] - '0') * 10 + ((arg)[1] - '0');
    (arg) += 2;
    ;
    t->tm_hour = ((arg)[0] - '0') * 10 + ((arg)[1] - '0');
    (arg) += 2;
    ;
    t->tm_min = ((arg)[0] - '0') * 10 + ((arg)[1] - '0');
    (arg) += 2;
    ;
    break;
  default:
    goto terr;
  }
  t->tm_isdst = -1;
  tvp[0].tv_sec = tvp[1].tv_sec = mktime(t);
  if (tvp[0].tv_sec == -1)
    goto terr;
  tvp[0].tv_nsec = tvp[1].tv_nsec = 0;
  return;
terr:
  errx(1, "out of range or illegal time specification: [[CC]YY]MMDDhhmm[.SS]");
}


x86 assembly (clang, -O0):
<stime_arg1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    11b4 <stime_arg1+0x44>
mov    $0x1,%edi
lea    0xe51(%rip),%rsi
call   1080 <err@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1060 <strchr@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    11dc <stime_arg1+0x6c>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
jmp    1237 <stime_arg1+0xc7>
mov    -0x30(%rbp),%rdi
add    $0x1,%rdi
call   1040 <strlen@plt>
cmp    $0x2,%eax
je     11f7 <stime_arg1+0x87>
jmp    149d <stime_arg1+0x32d>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
imul   $0xa,%eax,%eax
mov    -0x30(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
mov    -0x30(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    %ecx,-0x34(%rbp)
sub    $0x8,%eax
je     1378 <stime_arg1+0x208>
jmp    125a <stime_arg1+0xea>
mov    -0x34(%rbp),%eax
sub    $0xa,%eax
je     12c0 <stime_arg1+0x150>
jmp    126b <stime_arg1+0xfb>
mov    -0x34(%rbp),%eax
sub    $0xc,%eax
jne    1446 <stime_arg1+0x2d6>
jmp    127c <stime_arg1+0x10c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
imul   $0xa,%eax,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%rax
movsbl 0x1(%rax),%ecx
imul   $0x64,%ecx,%ecx
mov    %cl,0x1(%rax)
movl   $0x1,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1308 <stime_arg1+0x198>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
imul   $0xa,%eax,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%rax
movsbl 0x1(%rax),%ecx
add    %edx,%ecx
mov    %cl,0x1(%rax)
jmp    1367 <stime_arg1+0x1f7>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
imul   $0xa,%eax,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
cmpl   $0x45,-0x24(%rbp)
jge    1351 <stime_arg1+0x1e1>
mov    -0x24(%rbp),%eax
add    $0x7d0,%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,0x1(%rax)
jmp    1362 <stime_arg1+0x1f2>
mov    -0x24(%rbp),%eax
add    $0x76c,%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,0x1(%rax)
jmp    1367 <stime_arg1+0x1f7>
mov    -0x20(%rbp),%rax
movsbl 0x1(%rax),%ecx
sub    $0x76c,%ecx
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
imul   $0xa,%eax,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2(%rax),%cl
add    $0xff,%cl
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
imul   $0xa,%eax,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
imul   $0xa,%eax,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,0x4(%rax)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
imul   $0xa,%eax,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,0x5(%rax)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
jmp    144b <stime_arg1+0x2db>
jmp    149d <stime_arg1+0x32d>
mov    -0x20(%rbp),%rax
movl   $0xffffffff,0x8(%rax)
mov    -0x20(%rbp),%rdi
call   1090 <mktime@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0xffffffff,(%rax)
jne    1480 <stime_arg1+0x310>
jmp    149d <stime_arg1+0x32d>
mov    -0x10(%rbp),%rax
movq   $0x0,0x18(%rax)
mov    -0x10(%rbp),%rax
movq   $0x0,0x8(%rax)
jmp    14ae <stime_arg1+0x33e>
mov    $0x1,%edi
lea    0xb61(%rip),%rsi
call   1050 <errx@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stime_arg1>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
mov    %rax,%r15
test   %rax,%rax
jne    11ac <stime_arg1+0x3c>
lea    0xe5e(%rip),%rsi
mov    $0x1,%edi
call   1080 <err@plt>
mov    %r12,%rdi
mov    $0x2e,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     11e6 <stime_arg1+0x76>
mov    %rax,%rbx
lea    0x1(%rax),%rdi
call   1040 <strlen@plt>
cmp    $0x2,%eax
jne    12e9 <stime_arg1+0x179>
movb   $0x0,(%rbx)
movzbl 0x1(%rbx),%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
add    0x2(%rbx),%al
add    $0xf0,%al
jmp    11e8 <stime_arg1+0x78>
xor    %eax,%eax
mov    %al,(%r15)
mov    %r12,%rdi
call   1040 <strlen@plt>
cmp    $0x8,%eax
je     1264 <stime_arg1+0xf4>
cmp    $0xa,%eax
je     123c <stime_arg1+0xcc>
cmp    $0xc,%eax
jne    12e9 <stime_arg1+0x179>
movzbl (%r12),%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
add    0x1(%r12),%al
movzbl %al,%eax
imul   $0x64,%eax,%ecx
add    $0xc0,%cl
mov    %cl,0x1(%r15)
movzbl 0x2(%r12),%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
add    0x3(%r12),%al
add    $0x2,%r12
add    %cl,%al
add    $0xf0,%al
jmp    125a <stime_arg1+0xea>
movsbl (%r12),%eax
lea    (%rax,%rax,4),%eax
movsbl 0x1(%r12),%ecx
lea    (%rcx,%rax,2),%eax
cmp    $0x254,%eax
jg     1258 <stime_arg1+0xe8>
add    $0xc0,%al
jmp    125a <stime_arg1+0xea>
add    $0x5c,%al
add    $0x2,%r12
add    $0x94,%al
mov    %al,0x1(%r15)
movzbl (%r12),%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
add    0x1(%r12),%al
add    $0xef,%al
mov    %al,0x2(%r15)
movzbl 0x2(%r12),%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
add    0x3(%r12),%al
add    $0xf0,%al
mov    %al,0x3(%r15)
movzbl 0x4(%r12),%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
add    0x5(%r12),%al
add    $0xf0,%al
mov    %al,0x4(%r15)
movzbl 0x6(%r12),%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
add    0x7(%r12),%al
add    $0xf0,%al
mov    %al,0x5(%r15)
movl   $0xffffffff,0x8(%r15)
ff
mov    %r15,%rdi
call   1090 <mktime@plt>
mov    %eax,0x10(%r14)
mov    %eax,(%r14)
cmp    $0xffffffff,%eax
je     12e9 <stime_arg1+0x179>
movq   $0x0,0x18(%r14)
movq   $0x0,0x8(%r14)
jmp    12fa <stime_arg1+0x18a>
lea    0xd1a(%rip),%rsi
mov    $0x1,%edi
call   1050 <errx@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
%struct.tm = type { i8, i8, i8, i8, i8, i8, i32 }
@.str = [10 x i8] c"localtime\00"
@.str.1 = [66 x i8] c"out of range or illegal time specification: [[CC]YY]MMDDhhmm[.SS]\00"
define void @stime_arg1(i8* %0, %struct.timespec* nocapture writeonly %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call %struct.tm* @localtime(i32* %3)
%7 = icmp eq %struct.tm* %6, null
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 46)
%12 = icmp eq i8* %11, null
br i1 %12, label %24, label %13
13: ; preds = %10
%14 = getelementptr inbounds i8, i8* %11, i64 1
%15 = call i32 @strlen(i8* %14)
%16 = icmp eq i32 %15, 2
br i1 %16, label %17, label %106
17: ; preds = %13
store i8 0, i8* %11
%18 = load i8, i8* %14
%19 = mul i8 %18, 10
%20 = getelementptr inbounds i8, i8* %11, i64 2
%21 = load i8, i8* %20
%22 = add i8 %21, -16
%23 = add i8 %22, %19
br label %24
24: ; preds = %10, %17
%25 = phi i8 [ %23, %17 ], [ 0, %10 ]
%26 = getelementptr inbounds %struct.tm, %struct.tm* %6, i64 0, i32 0
store i8 %25, i8* %26
%27 = call i32 @strlen(i8* %0)
switch i32 %27, label %106 [
i32 12, label %28
i32 10, label %45
i32 8, label %65
]
28: ; preds = %24
%29 = load i8, i8* %0
%30 = mul i8 %29, 10
%31 = getelementptr inbounds i8, i8* %0, i64 1
%32 = load i8, i8* %31
%33 = add i8 %30, %32
%34 = getelementptr inbounds %struct.tm, %struct.tm* %6, i64 0, i32 1
%35 = getelementptr inbounds i8, i8* %0, i64 2
%36 = mul i8 %33, 100
%37 = add i8 %36, -64
store i8 %37, i8* %34
%38 = load i8, i8* %35
%39 = mul i8 %38, 10
%40 = getelementptr inbounds i8, i8* %0, i64 3
%41 = load i8, i8* %40
%42 = add i8 %41, -16
%43 = add i8 %42, %39
%44 = add i8 %43, %37
br label %59
45: ; preds = %24
%46 = load i8, i8* %0
%47 = sext i8 %46 to i32
%48 = mul nsw i32 %47, 10
%49 = getelementptr inbounds i8, i8* %0, i64 1
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = add nsw i32 %48, %51
%53 = icmp slt i32 %52, 597
%54 = trunc i32 %52 to i8
br i1 %53, label %55, label %57
55: ; preds = %45
%56 = add i8 %54, -64
br label %59
57: ; preds = %45
%58 = add i8 %54, 92
br label %59
59: ; preds = %55, %57, %28
%60 = phi i8 [ %56, %55 ], [ %58, %57 ], [ %44, %28 ]
%61 = phi i8* [ %0, %55 ], [ %0, %57 ], [ %35, %28 ]
%62 = getelementptr inbounds i8, i8* %61, i64 2
%63 = getelementptr inbounds %struct.tm, %struct.tm* %6, i64 0, i32 1
%64 = add i8 %60, -108
store i8 %64, i8* %63
br label %65
65: ; preds = %24, %59
%66 = phi i8* [ %0, %24 ], [ %62, %59 ]
%67 = load i8, i8* %66
%68 = mul i8 %67, 10
%69 = getelementptr inbounds i8, i8* %66, i64 1
%70 = load i8, i8* %69
%71 = getelementptr inbounds %struct.tm, %struct.tm* %6, i64 0, i32 2
%72 = getelementptr inbounds i8, i8* %66, i64 2
%73 = add i8 %70, -17
%74 = add i8 %73, %68
store i8 %74, i8* %71
%75 = load i8, i8* %72
%76 = mul i8 %75, 10
%77 = getelementptr inbounds i8, i8* %66, i64 3
%78 = load i8, i8* %77
%79 = add i8 %78, -16
%80 = add i8 %79, %76
%81 = getelementptr inbounds %struct.tm, %struct.tm* %6, i64 0, i32 3
store i8 %80, i8* %81
%82 = getelementptr inbounds i8, i8* %66, i64 4
%83 = load i8, i8* %82
%84 = mul i8 %83, 10
%85 = getelementptr inbounds i8, i8* %66, i64 5
%86 = load i8, i8* %85
%87 = add i8 %86, -16
%88 = add i8 %87, %84
%89 = getelementptr inbounds %struct.tm, %struct.tm* %6, i64 0, i32 4
store i8 %88, i8* %89
%90 = getelementptr inbounds i8, i8* %66, i64 6
%91 = load i8, i8* %90
%92 = mul i8 %91, 10
%93 = getelementptr inbounds i8, i8* %66, i64 7
%94 = load i8, i8* %93
%95 = add i8 %94, -16
%96 = add i8 %95, %92
%97 = getelementptr inbounds %struct.tm, %struct.tm* %6, i64 0, i32 5
store i8 %96, i8* %97
%98 = getelementptr inbounds %struct.tm, %struct.tm* %6, i64 0, i32 6
store i32 -1, i32* %98
%99 = call i32 @mktime(%struct.tm* %6)
%100 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 1, i32 0
store i32 %99, i32* %100
%101 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
store i32 %99, i32* %101
%102 = icmp eq i32 %99, -1
br i1 %102, label %106, label %103
103: ; preds = %65
%104 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 1, i32 1
store i64 0, i64* %104
%105 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
store i64 0, i64* %105
br label %108
106: ; preds = %65, %24, %13
%107 = call i32 @errx(i32 1, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
br label %108
108: ; preds = %106, %103
ret void
}