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

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_min;
  int tm_hour;
  int tm_mday;
  int tm_mon;
  int tm_year;
  scalar_t__ tm_isdst;
  scalar_t__ tm_yday;
  scalar_t__ tm_wday;
  scalar_t__ tm_sec;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int atoi(char *);
int /*<<< orphan*/ dohelp(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ mktime(struct tm *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char *);
int /*<<< orphan*/ validday(int, int, int);
time_t parsetimestring(const char *timestr) {
  char dts[16];
  struct tm dt;
  int yy, mm, dd, hh, min;
  min = hh = dd = mm = yy = 0;
  strcpy(dts, timestr);
  switch (strlen(dts)) {
  case 12:
    min = atoi(&dts[10]);
    if ((min < 0) || (min > 59)) {
      fprintf(stderr, "Illegal value for minutes: %d\n", min);
      dohelp(1);
    }
    dts[10] = '\0';
  case 10:
    hh = atoi(&dts[8]);
    if ((hh < 0) || (hh > 23)) {
      fprintf(stderr, "Illegal value for hours: %d\n", hh);
      dohelp(1);
    }
    dts[8] = '\0';
  case 8:
    dd = atoi(&dts[6]);
    if ((dd < 1) || (dd > 31)) {
      fprintf(stderr, "Illegal value for days: %d\n", dd);
      dohelp(1);
    }
    dts[6] = '\0';
    mm = atoi(&dts[4]);
    if ((mm < 1) || (mm > 12)) {
      fprintf(stderr, "Illegal value for months: %d\n", mm);
      dohelp(1);
    }
    dts[4] = '\0';
    yy = atoi(dts);
    break;
  default:
    fprintf(stderr, "%s is not formatted correctly\n", dts);
    dohelp(1);
    break;
  }
  if (!(validday(yy, mm, dd))) {
    fprintf(stderr,
            "For the year %d, month %d, %d"
            " days is invalid\n",
            yy, mm, dd);
    exit(EXIT_FAILURE);
  }
  dt.tm_sec = 0;
  dt.tm_min = min;
  dt.tm_hour = hh;
  dt.tm_mday = dd;
  dt.tm_mon = mm - 1;
  dt.tm_year = yy - 1900;
  dt.tm_wday = 0;
  dt.tm_yday = 0;
  dt.tm_isdst = 0;
  return mktime(&dt);
}


x86 assembly (clang, -O0):
<parsetimestring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
movl   $0x0,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0x20(%rbp),%rdi
mov    %rdi,-0x78(%rbp)
call   1030 <strcpy@plt>
mov    -0x78(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    %ecx,-0x70(%rbp)
sub    $0x8,%eax
je     1299 <parsetimestring+0x119>
jmp    11df <parsetimestring+0x5f>
mov    -0x70(%rbp),%eax
sub    $0xa,%eax
je     124d <parsetimestring+0xcd>
jmp    11f0 <parsetimestring+0x70>
mov    -0x70(%rbp),%eax
sub    $0xc,%eax
jne    1342 <parsetimestring+0x1c2>
jmp    1201 <parsetimestring+0x81>
lea    -0x20(%rbp),%rdi
add    $0xa,%rdi
call   1090 <atoi@plt>
mov    %eax,-0x6c(%rbp)
cmpl   $0x0,-0x6c(%rbp)
jl     1225 <parsetimestring+0xa5>
cmpl   $0x3b,-0x6c(%rbp)
jle    1249 <parsetimestring+0xc9>
mov    0x2db4(%rip),%rax
mov    (%rax),%edi
mov    -0x6c(%rbp),%edx
lea    0xdc8(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1040 <dohelp@plt>
movb   $0x0,-0x16(%rbp)
lea    -0x20(%rbp),%rdi
add    $0x8,%rdi
call   1090 <atoi@plt>
mov    %eax,-0x68(%rbp)
cmpl   $0x0,-0x68(%rbp)
jl     1271 <parsetimestring+0xf1>
cmpl   $0x17,-0x68(%rbp)
jle    1295 <parsetimestring+0x115>
mov    0x2d68(%rip),%rax
mov    (%rax),%edi
mov    -0x68(%rbp),%edx
lea    0xd9b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1040 <dohelp@plt>
movb   $0x0,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
add    $0x6,%rdi
call   1090 <atoi@plt>
mov    %eax,-0x64(%rbp)
cmpl   $0x1,-0x64(%rbp)
jl     12bd <parsetimestring+0x13d>
cmpl   $0x1f,-0x64(%rbp)
jle    12e1 <parsetimestring+0x161>
mov    0x2d1c(%rip),%rax
mov    (%rax),%edi
mov    -0x64(%rbp),%edx
lea    0xd6c(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1040 <dohelp@plt>
movb   $0x0,-0x1a(%rbp)
lea    -0x20(%rbp),%rdi
add    $0x4,%rdi
call   1090 <atoi@plt>
mov    %eax,-0x60(%rbp)
cmpl   $0x1,-0x60(%rbp)
jl     1309 <parsetimestring+0x189>
cmpl   $0xc,-0x60(%rbp)
jle    132d <parsetimestring+0x1ad>
mov    0x2cd0(%rip),%rax
mov    (%rax),%edi
mov    -0x60(%rbp),%edx
lea    0xd3c(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1040 <dohelp@plt>
movb   $0x0,-0x1c(%rbp)
lea    -0x20(%rbp),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x5c(%rbp)
jmp    1367 <parsetimestring+0x1e7>
mov    0x2c97(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rdx
lea    0xd20(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1040 <dohelp@plt>
mov    -0x5c(%rbp),%edi
mov    -0x60(%rbp),%esi
mov    -0x64(%rbp),%edx
call   1080 <validday@plt>
cmp    $0x0,%eax
jne    13ad <parsetimestring+0x22d>
mov    0x2c5b(%rip),%rax
mov    (%rax),%edi
mov    -0x5c(%rbp),%edx
mov    -0x60(%rbp),%ecx
mov    -0x64(%rbp),%r8d
lea    0xcfd(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2c32(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
movq   $0x0,-0x28(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x68(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x60(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x5c(%rbp),%eax
sub    $0x76c,%eax
mov    %eax,-0x48(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
lea    -0x58(%rbp),%rdi
call   1070 <mktime@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parsetimestring>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x50,%rsp
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
xor    %r14d,%r14d
cmp    $0x8,%eax
je     1234 <parsetimestring+0xb4>
cmp    $0xa,%eax
je     11f7 <parsetimestring+0x77>
cmp    $0xc,%eax
jne    12bd <parsetimestring+0x13d>
lea    0xa(%rsp),%rdi
call   1090 <atoi@plt>
mov    %eax,%r14d
cmp    $0x3c,%eax
jb     11f2 <parsetimestring+0x72>
mov    0x2e0b(%rip),%rax
mov    (%rax),%edi
lea    0xe22(%rip),%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1040 <dohelp@plt>
movb   $0x0,0xa(%rsp)
lea    0x8(%rsp),%rdi
call   1090 <atoi@plt>
mov    %eax,%r15d
cmp    $0x18,%eax
jb     122d <parsetimestring+0xad>
mov    0x2dd0(%rip),%rax
mov    (%rax),%edi
lea    0xe06(%rip),%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1040 <dohelp@plt>
movb   $0x0,0x8(%rsp)
jmp    1237 <parsetimestring+0xb7>
xor    %r15d,%r15d
lea    0x6(%rsp),%rdi
call   1090 <atoi@plt>
mov    %eax,%r12d
add    $0xffffffe0,%eax
cmp    $0xffffffe0,%eax
ja     1270 <parsetimestring+0xf0>
mov    0x2d8d(%rip),%rax
mov    (%rax),%edi
lea    0xde0(%rip),%rsi
mov    %r12d,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1040 <dohelp@plt>
movb   $0x0,0x6(%rsp)
lea    0x4(%rsp),%rdi
call   1090 <atoi@plt>
mov    %eax,%ebp
add    $0xfffffff3,%eax
cmp    $0xfffffff3,%eax
ja     12ac <parsetimestring+0x12c>
mov    0x2d50(%rip),%rax
mov    (%rax),%edi
lea    0xdbf(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1040 <dohelp@plt>
movb   $0x0,0x4(%rsp)
mov    %rsp,%rdi
call   1090 <atoi@plt>
mov    %eax,%ebx
jmp    12ee <parsetimestring+0x16e>
mov    0x2d1c(%rip),%rax
mov    (%rax),%edi
lea    0xda9(%rip),%rsi
xor    %ebx,%ebx
mov    %rsp,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%edi
call   1040 <dohelp@plt>
xor    %ebp,%ebp
xor    %r12d,%r12d
xor    %r15d,%r15d
xor    %r14d,%r14d
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r12d,%edx
call   1080 <validday@plt>
test   %eax,%eax
je     1342 <parsetimestring+0x1c2>
mov    %r14d,0x18(%rsp)
mov    %r15d,0x1c(%rsp)
mov    %r12d,0x20(%rsp)
add    $0xffffffff,%ebp
mov    %ebp,0x24(%rsp)
add    $0xfffff894,%ebx
mov    %ebx,0x28(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x30(%rsp)
movups %xmm0,0x40(%rsp)
lea    0x18(%rsp),%rdi
call   1070 <mktime@plt>
add    $0x50,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c97(%rip),%rax
mov    (%rax),%edi
lea    0xd43(%rip),%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %r12d,%r8d
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    0x2c71(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32, i32, i32, i64, i64, i64, i64 }
@stderr = global i32 0
@.str = [31 x i8] c"Illegal value for minutes: %d\0A\00"
@.str.1 = [29 x i8] c"Illegal value for hours: %d\0A\00"
@.str.2 = [28 x i8] c"Illegal value for days: %d\0A\00"
@.str.3 = [30 x i8] c"Illegal value for months: %d\0A\00"
@.str.4 = [31 x i8] c"%s is not formatted correctly\0A\00"
@.str.5 = [47 x i8] c"For the year %d, month %d, %d days is invalid\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @parsetimestring(i8* %0) {
%2 = alloca i8*
%3 = alloca [16 x i8]
%4 = alloca %struct.tm
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%11 = load i8*, i8** %2
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%14 = call i32 @strlen(i8* %13)
switch i32 %14, label %76 [
i32 12, label %15
i32 10, label %30
i32 8, label %45
]
15: ; preds = %1
%16 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 10
%17 = call i32 @atoi(i8* %16)
store i32 %17, i32* %9
%18 = load i32, i32* %9
%19 = icmp slt i32 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %15
%21 = load i32, i32* %9
%22 = icmp sgt i32 %21, 59
br i1 %22, label %23, label %28
23: ; preds = %20, %15
%24 = load i32, i32* @stderr
%25 = load i32, i32* %9
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = call i32 @dohelp(i32 1)
br label %28
28: ; preds = %23, %20
%29 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 10
store i8 0, i8* %29
br label %30
30: ; preds = %1, %28
%31 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 8
%32 = call i32 @atoi(i8* %31)
store i32 %32, i32* %8
%33 = load i32, i32* %8
%34 = icmp slt i32 %33, 0
br i1 %34, label %38, label %35
35: ; preds = %30
%36 = load i32, i32* %8
%37 = icmp sgt i32 %36, 23
br i1 %37, label %38, label %43
38: ; preds = %35, %30
%39 = load i32, i32* @stderr
%40 = load i32, i32* %8
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %40)
%42 = call i32 @dohelp(i32 1)
br label %43
43: ; preds = %38, %35
%44 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 8
store i8 0, i8* %44
br label %45
45: ; preds = %1, %43
%46 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 6
%47 = call i32 @atoi(i8* %46)
store i32 %47, i32* %7
%48 = load i32, i32* %7
%49 = icmp slt i32 %48, 1
br i1 %49, label %53, label %50
50: ; preds = %45
%51 = load i32, i32* %7
%52 = icmp sgt i32 %51, 31
br i1 %52, label %53, label %58
53: ; preds = %50, %45
%54 = load i32, i32* @stderr
%55 = load i32, i32* %7
%56 = call i32 (i32, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %55)
%57 = call i32 @dohelp(i32 1)
br label %58
58: ; preds = %53, %50
%59 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 6
store i8 0, i8* %59
%60 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 4
%61 = call i32 @atoi(i8* %60)
store i32 %61, i32* %6
%62 = load i32, i32* %6
%63 = icmp slt i32 %62, 1
br i1 %63, label %67, label %64
64: ; preds = %58
%65 = load i32, i32* %6
%66 = icmp sgt i32 %65, 12
br i1 %66, label %67, label %72
67: ; preds = %64, %58
%68 = load i32, i32* @stderr
%69 = load i32, i32* %6
%70 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 %69)
%71 = call i32 @dohelp(i32 1)
br label %72
72: ; preds = %67, %64
%73 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 4
store i8 0, i8* %73
%74 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%75 = call i32 @atoi(i8* %74)
store i32 %75, i32* %5
br label %81
76: ; preds = %1
%77 = load i32, i32* @stderr
%78 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%79 = call i32 (i32, i8*, ...) @fprintf(i32 %77, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %78)
%80 = call i32 @dohelp(i32 1)
br label %81
81: ; preds = %76, %72
%82 = load i32, i32* %5
%83 = load i32, i32* %6
%84 = load i32, i32* %7
%85 = call i32 @validday(i32 %82, i32 %83, i32 %84)
%86 = icmp ne i32 %85, 0
br i1 %86, label %95, label %87
87: ; preds = %81
%88 = load i32, i32* @stderr
%89 = load i32, i32* %5
%90 = load i32, i32* %6
%91 = load i32, i32* %7
%92 = call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0), i32 %89, i32 %90, i32 %91)
%93 = load i32, i32* @EXIT_FAILURE
%94 = call i32 @exit(i32 %93)
unreachable
95: ; preds = %81
%96 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 8
store i64 0, i64* %96
%97 = load i32, i32* %9
%98 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
store i32 %97, i32* %98
%99 = load i32, i32* %8
%100 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 1
store i32 %99, i32* %100
%101 = load i32, i32* %7
%102 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 2
store i32 %101, i32* %102
%103 = load i32, i32* %6
%104 = sub nsw i32 %103, 1
%105 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 3
store i32 %104, i32* %105
%106 = load i32, i32* %5
%107 = sub nsw i32 %106, 1900
%108 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 4
store i32 %107, i32* %108
%109 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 7
store i64 0, i64* %109
%110 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 6
store i64 0, i64* %110
%111 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 5
store i64 0, i64* %111
%112 = call i32 @mktime(%struct.tm* %4)
ret i32 %112
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32, i32, i32, i64, i64, i64, i64 }
@stderr = global i32 0
@.str = [31 x i8] c"Illegal value for minutes: %d\0A\00"
@.str.1 = [29 x i8] c"Illegal value for hours: %d\0A\00"
@.str.2 = [28 x i8] c"Illegal value for days: %d\0A\00"
@.str.3 = [30 x i8] c"Illegal value for months: %d\0A\00"
@.str.4 = [31 x i8] c"%s is not formatted correctly\0A\00"
@.str.5 = [47 x i8] c"For the year %d, month %d, %d days is invalid\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @parsetimestring(i8* %0) {
%2 = alloca [16 x i8]
%3 = alloca %struct.tm
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%5 = bitcast %struct.tm* %3 to i8*
%6 = call i32 @strcpy(i8* %4, i8* %0)
%7 = call i32 @strlen(i8* %4)
switch i32 %7, label %49 [
i32 12, label %8
i32 10, label %17
i32 8, label %27
]
8: ; preds = %1
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 10
%10 = call i32 @atoi(i8* %9)
%11 = icmp ugt i32 %10, 59
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i32, i32* @stderr
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %10)
%15 = call i32 @dohelp(i32 1)
br label %16
16: ; preds = %8, %12
store i8 0, i8* %9
br label %17
17: ; preds = %1, %16
%18 = phi i32 [ 0, %1 ], [ %10, %16 ]
%19 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 8
%20 = call i32 @atoi(i8* %19)
%21 = icmp ugt i32 %20, 23
br i1 %21, label %22, label %26
22: ; preds = %17
%23 = load i32, i32* @stderr
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %20)
%25 = call i32 @dohelp(i32 1)
br label %26
26: ; preds = %17, %22
store i8 0, i8* %19
br label %27
27: ; preds = %1, %26
%28 = phi i32 [ 0, %1 ], [ %20, %26 ]
%29 = phi i32 [ 0, %1 ], [ %18, %26 ]
%30 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 6
%31 = call i32 @atoi(i8* %30)
%32 = add i32 %31, -32
%33 = icmp ult i32 %32, -31
br i1 %33, label %34, label %38
34: ; preds = %27
%35 = load i32, i32* @stderr
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %31)
%37 = call i32 @dohelp(i32 1)
br label %38
38: ; preds = %27, %34
store i8 0, i8* %30
%39 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 4
%40 = call i32 @atoi(i8* %39)
%41 = add i32 %40, -13
%42 = icmp ult i32 %41, -12
br i1 %42, label %43, label %47
43: ; preds = %38
%44 = load i32, i32* @stderr
%45 = call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 %40)
%46 = call i32 @dohelp(i32 1)
br label %47
47: ; preds = %38, %43
store i8 0, i8* %39
%48 = call i32 @atoi(i8* %4)
br label %53
49: ; preds = %1
%50 = load i32, i32* @stderr
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %4)
%52 = call i32 @dohelp(i32 1)
br label %53
53: ; preds = %49, %47
%54 = phi i32 [ 0, %49 ], [ %48, %47 ]
%55 = phi i32 [ 0, %49 ], [ %40, %47 ]
%56 = phi i32 [ 0, %49 ], [ %31, %47 ]
%57 = phi i32 [ 0, %49 ], [ %28, %47 ]
%58 = phi i32 [ 0, %49 ], [ %29, %47 ]
%59 = call i32 @validday(i32 %54, i32 %55, i32 %56)
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %66
61: ; preds = %53
%62 = load i32, i32* @stderr
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %62, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0), i32 %54, i32 %55, i32 %56)
%64 = load i32, i32* @EXIT_FAILURE
%65 = call i32 @exit(i32 %64)
unreachable
66: ; preds = %53
%67 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 8
store i64 0, i64* %67
%68 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 0
store i32 %58, i32* %68
%69 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 1
store i32 %57, i32* %69
%70 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 2
store i32 %56, i32* %70
%71 = add nsw i32 %55, -1
%72 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 3
store i32 %71, i32* %72
%73 = add nsw i32 %54, -1900
%74 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 4
store i32 %73, i32* %74
%75 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 5
%76 = bitcast i64* %75 to i8*
%77 = call i32 @mktime(%struct.tm* %3)
ret i32 %77
}