#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 time_t;
struct tm {
  int tm_year;
  int tm_mon;
  int tm_mday;
  int tm_hour;
  int tm_min;
  int tm_isdst;
};

/* Variables and functions */
int /*<<< orphan*/ memset(struct tm *, int /*<<< orphan*/, int);
int mktime(struct tm *);
int normalize_epoch(int, int);
int sscanf(char *, char *, int *, int *, ...);
int strlen(char *);
int getbranchtime(char *itim, time_t *newtime) {
  register int ilen = strlen(itim);
  int hours, minutes;
  time_t epoch;
  struct tm tm;
  memset(&tm, 0, sizeof tm);
  if (ilen != 4 && ilen != 5 && ilen != 12 && ilen != 13)
    return 0;
  if (sscanf(itim, "%4d%2d%2d%2d:%2d", &tm.tm_year, &tm.tm_mon, &tm.tm_mday,
             &tm.tm_hour, &tm.tm_min) == 5 ||
      sscanf(itim, "%4d%2d%2d%2d%2d", &tm.tm_year, &tm.tm_mon, &tm.tm_mday,
             &tm.tm_hour, &tm.tm_min) == 5) {
    tm.tm_year -= 1900;
    tm.tm_mon -= 1;
    if (tm.tm_year < 100 || tm.tm_mon < 0 || tm.tm_mon > 11 || tm.tm_mday < 1 ||
        tm.tm_mday > 31 || tm.tm_hour < 0 || tm.tm_hour > 23 || tm.tm_min < 0 ||
        tm.tm_min > 59) {
      return 0;
    }
    tm.tm_isdst = -1;
    if ((epoch = mktime(&tm)) == -1)
      return 0;
    *newtime = epoch;
    return 1;
  }
  if (sscanf(itim, "%2d:%2d", &hours, &minutes) == 2 ||
      sscanf(itim, "%2d%2d", &hours, &minutes) == 2) {
    if (hours < 0 || hours > 23 || minutes < 0 || minutes > 59)
      return 0;
    if (*newtime <= 86400) {
      *newtime = (hours * 3600) + (minutes * 60);
      if (*newtime >= 86400)
        *newtime = 86400 - 1;
      return 1;
    } else {
      *newtime = normalize_epoch(*newtime, (hours * 3600) + (minutes * 60));
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<getbranchtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1040 <memset@plt>
cmpl   $0x4,-0x1c(%rbp)
je     11b0 <getbranchtime+0x60>
cmpl   $0x5,-0x1c(%rbp)
je     11b0 <getbranchtime+0x60>
cmpl   $0xc,-0x1c(%rbp)
je     11b0 <getbranchtime+0x60>
cmpl   $0xd,-0x1c(%rbp)
je     11b0 <getbranchtime+0x60>
movl   $0x0,-0x4(%rbp)
jmp    13e3 <getbranchtime+0x293>
mov    -0x10(%rbp),%rdi
lea    -0x40(%rbp),%rdx
lea    -0x40(%rbp),%rcx
add    $0x4,%rcx
lea    -0x40(%rbp),%r8
add    $0x8,%r8
lea    -0x40(%rbp),%r9
add    $0xc,%r9
lea    -0x40(%rbp),%rax
add    $0x10,%rax
lea    0xe21(%rip),%rsi
mov    %rax,(%rsp)
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x5,%eax
je     1236 <getbranchtime+0xe6>
mov    -0x10(%rbp),%rdi
lea    -0x40(%rbp),%rdx
lea    -0x40(%rbp),%rcx
add    $0x4,%rcx
lea    -0x40(%rbp),%r8
add    $0x8,%r8
lea    -0x40(%rbp),%r9
add    $0xc,%r9
lea    -0x40(%rbp),%rax
add    $0x10,%rax
lea    0xdef(%rip),%rsi
mov    %rax,(%rsp)
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x5,%eax
jne    12ed <getbranchtime+0x19d>
mov    -0x40(%rbp),%eax
sub    $0x76c,%eax
mov    %eax,-0x40(%rbp)
mov    -0x3c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x64,-0x40(%rbp)
jl     12a4 <getbranchtime+0x154>
cmpl   $0x0,-0x3c(%rbp)
jl     12a4 <getbranchtime+0x154>
cmpl   $0xb,-0x3c(%rbp)
jg     12a4 <getbranchtime+0x154>
cmpl   $0x1,-0x38(%rbp)
jl     12a4 <getbranchtime+0x154>
cmpl   $0x1f,-0x38(%rbp)
jg     12a4 <getbranchtime+0x154>
cmpl   $0x0,-0x34(%rbp)
jl     12a4 <getbranchtime+0x154>
cmpl   $0x17,-0x34(%rbp)
jg     12a4 <getbranchtime+0x154>
cmpl   $0x0,-0x30(%rbp)
jl     12a4 <getbranchtime+0x154>
cmpl   $0x3b,-0x30(%rbp)
jle    12b0 <getbranchtime+0x160>
movl   $0x0,-0x4(%rbp)
jmp    13e3 <getbranchtime+0x293>
movl   $0xffffffff,-0x2c(%rbp)
lea    -0x40(%rbp),%rdi
call   1070 <mktime@plt>
mov    %eax,-0x28(%rbp)
cmp    $0xffffffff,%eax
jne    12d8 <getbranchtime+0x188>
movl   $0x0,-0x4(%rbp)
jmp    13e3 <getbranchtime+0x293>
mov    -0x28(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    13e3 <getbranchtime+0x293>
mov    -0x10(%rbp),%rdi
lea    0xd11(%rip),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x24(%rbp),%rcx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x2,%eax
je     1333 <getbranchtime+0x1e3>
mov    -0x10(%rbp),%rdi
lea    0xcff(%rip),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x24(%rbp),%rcx
mov    $0x0,%al
call   1060 <sscanf@plt>
cmp    $0x2,%eax
jne    13dc <getbranchtime+0x28c>
cmpl   $0x0,-0x20(%rbp)
jl     135b <getbranchtime+0x20b>
cmpl   $0x17,-0x20(%rbp)
jg     135b <getbranchtime+0x20b>
cmpl   $0x0,-0x24(%rbp)
jl     135b <getbranchtime+0x20b>
cmpl   $0x3b,-0x24(%rbp)
jle    1367 <getbranchtime+0x217>
movl   $0x0,-0x4(%rbp)
jmp    13e3 <getbranchtime+0x293>
mov    -0x18(%rbp),%rax
cmpl   $0x15180,(%rax)
jg     13b0 <getbranchtime+0x260>
imul   $0xe10,-0x20(%rbp),%ecx
imul   $0x3c,-0x24(%rbp),%eax
add    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
cmpl   $0x15180,(%rax)
jl     13a4 <getbranchtime+0x254>
mov    -0x18(%rbp),%rax
movl   $0x1517f,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    13e3 <getbranchtime+0x293>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
imul   $0xe10,-0x20(%rbp),%esi
imul   $0x3c,-0x24(%rbp),%eax
add    %eax,%esi
call   1050 <normalize_epoch@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    13e3 <getbranchtime+0x293>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbranchtime>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
mov    %rdi,%r15
call   1030 <strlen@plt>
mov    %eax,%ebp
lea    0x10(%rsp),%rdi
xor    %r14d,%r14d
xor    %esi,%esi
mov    $0x18,%edx
call   1040 <memset@plt>
cmp    $0xd,%ebp
ja     1278 <getbranchtime+0x128>
mov    $0x3030,%eax
bt     %ebp,%eax
jae    1278 <getbranchtime+0x128>
lea    0x14(%rsp),%rbp
lea    0x18(%rsp),%r12
lea    0x1c(%rsp),%r13
lea    0x20(%rsp),%r14
mov    %r14,(%rsp)
lea    0xe4b(%rip),%rsi
lea    0x10(%rsp),%rdx
mov    %r15,%rdi
mov    %rbp,%rcx
mov    %r12,%r8
mov    %r13,%r9
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x5,%eax
je     11fe <getbranchtime+0xae>
mov    %r14,(%rsp)
lea    0xe34(%rip),%rsi
lea    0x10(%rsp),%rdx
mov    %r15,%rdi
mov    %rbp,%rcx
mov    %r12,%r8
mov    %r13,%r9
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x5,%eax
jne    128a <getbranchtime+0x13a>
mov    0x10(%rsp),%ecx
mov    0x14(%rsp),%eax
lea    -0x76c(%rcx),%edx
mov    %edx,0x10(%rsp)
lea    -0x1(%rax),%edx
mov    %edx,0x14(%rsp)
cmp    $0x7d0,%ecx
jl     1308 <getbranchtime+0x1b8>
test   %eax,%eax
mov    $0x0,%r14d
jle    1278 <getbranchtime+0x128>
cmp    $0xc,%eax
jg     1278 <getbranchtime+0x128>
mov    0x18(%rsp),%eax
test   %eax,%eax
jle    1278 <getbranchtime+0x128>
cmp    $0x1f,%eax
jg     1278 <getbranchtime+0x128>
mov    0x1c(%rsp),%eax
test   %eax,%eax
js     1278 <getbranchtime+0x128>
cmp    $0x17,%eax
jg     1278 <getbranchtime+0x128>
mov    0x20(%rsp),%eax
test   %eax,%eax
js     1278 <getbranchtime+0x128>
cmp    $0x3b,%eax
jg     1278 <getbranchtime+0x128>
movl   $0xffffffff,0x24(%rsp)
ff
lea    0x10(%rsp),%rdi
call   1070 <mktime@plt>
cmp    $0xffffffff,%eax
je     1278 <getbranchtime+0x128>
mov    %eax,(%rbx)
mov    $0x1,%r14d
mov    %r14d,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd78(%rip),%rsi
xor    %r14d,%r14d
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x2,%eax
je     12cd <getbranchtime+0x17d>
lea    0xd66(%rip),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <sscanf@plt>
cmp    $0x2,%eax
jne    1278 <getbranchtime+0x128>
mov    0xc(%rsp),%eax
cmp    $0x17,%eax
ja     1278 <getbranchtime+0x128>
mov    0x8(%rsp),%ecx
test   %ecx,%ecx
js     1278 <getbranchtime+0x128>
cmp    $0x3b,%ecx
jg     1278 <getbranchtime+0x128>
mov    (%rbx),%edi
imul   $0xe10,%eax,%edx
imul   $0x3c,%ecx,%eax
add    %edx,%eax
cmp    $0x15181,%edi
jl     1270 <getbranchtime+0x120>
mov    %eax,%esi
call   1050 <normalize_epoch@plt>
jmp    1270 <getbranchtime+0x120>
xor    %r14d,%r14d
jmp    1278 <getbranchtime+0x128>

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32, i32, i32, i32 }
@.str = [17 x i8] c"%4d%2d%2d%2d:%2d\00"
@.str.1 = [16 x i8] c"%4d%2d%2d%2d%2d\00"
@.str.2 = [8 x i8] c"%2d:%2d\00"
@.str.3 = [7 x i8] c"%2d%2d\00"
define i32 @getbranchtime(i8* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.tm
store i8* %0, i8** %4
store i32* %1, i32** %5
%11 = load i8*, i8** %4
%12 = call i32 @strlen(i8* %11)
store i32 %12, i32* %6
%13 = call i32 @memset(%struct.tm* %10, i32 0, i32 24)
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 4
br i1 %15, label %16, label %26
16: ; preds = %2
%17 = load i32, i32* %6
%18 = icmp ne i32 %17, 5
br i1 %18, label %19, label %26
19: ; preds = %16
%20 = load i32, i32* %6
%21 = icmp ne i32 %20, 12
br i1 %21, label %22, label %26
22: ; preds = %19
%23 = load i32, i32* %6
%24 = icmp ne i32 %23, 13
br i1 %24, label %25, label %26
25: ; preds = %22
store i32 0, i32* %3
br label %144
26: ; preds = %22, %19, %16, %2
%27 = load i8*, i8** %4
%28 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 0
%29 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 1
%30 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 2
%31 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 3
%32 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 4
%33 = call i32 (i8*, i8*, i32*, i32*, ...) @sscanf(i8* %27, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32* %28, i32* %29, i32* %30, i32* %31, i32* %32)
%34 = icmp eq i32 %33, 5
br i1 %34, label %44, label %35
35: ; preds = %26
%36 = load i8*, i8** %4
%37 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 0
%38 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 1
%39 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 2
%40 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 3
%41 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 4
%42 = call i32 (i8*, i8*, i32*, i32*, ...) @sscanf(i8* %36, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32* %37, i32* %38, i32* %39, i32* %40, i32* %41)
%43 = icmp eq i32 %42, 5
br i1 %43, label %44, label %95
44: ; preds = %35, %26
%45 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 0
%46 = load i32, i32* %45
%47 = sub nsw i32 %46, 1900
store i32 %47, i32* %45
%48 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 1
%49 = load i32, i32* %48
%50 = sub nsw i32 %49, 1
store i32 %50, i32* %48
%51 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 0
%52 = load i32, i32* %51
%53 = icmp slt i32 %52, 100
br i1 %53, label %86, label %54
54: ; preds = %44
%55 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 1
%56 = load i32, i32* %55
%57 = icmp slt i32 %56, 0
br i1 %57, label %86, label %58
58: ; preds = %54
%59 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 1
%60 = load i32, i32* %59
%61 = icmp sgt i32 %60, 11
br i1 %61, label %86, label %62
62: ; preds = %58
%63 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 2
%64 = load i32, i32* %63
%65 = icmp slt i32 %64, 1
br i1 %65, label %86, label %66
66: ; preds = %62
%67 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 2
%68 = load i32, i32* %67
%69 = icmp sgt i32 %68, 31
br i1 %69, label %86, label %70
70: ; preds = %66
%71 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 3
%72 = load i32, i32* %71
%73 = icmp slt i32 %72, 0
br i1 %73, label %86, label %74
74: ; preds = %70
%75 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 3
%76 = load i32, i32* %75
%77 = icmp sgt i32 %76, 23
br i1 %77, label %86, label %78
78: ; preds = %74
%79 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 4
%80 = load i32, i32* %79
%81 = icmp slt i32 %80, 0
br i1 %81, label %86, label %82
82: ; preds = %78
%83 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 4
%84 = load i32, i32* %83
%85 = icmp sgt i32 %84, 59
br i1 %85, label %86, label %87
86: ; preds = %82, %78, %74, %70, %66, %62, %58, %54, %44
store i32 0, i32* %3
br label %144
87: ; preds = %82
%88 = getelementptr inbounds %struct.tm, %struct.tm* %10, i32 0, i32 5
store i32 -1, i32* %88
%89 = call i32 @mktime(%struct.tm* %10)
store i32 %89, i32* %9
%90 = icmp eq i32 %89, -1
br i1 %90, label %91, label %92
91: ; preds = %87
store i32 0, i32* %3
br label %144
92: ; preds = %87
%93 = load i32, i32* %9
%94 = load i32*, i32** %5
store i32 %93, i32* %94
store i32 1, i32* %3
br label %144
95: ; preds = %35
%96 = load i8*, i8** %4
%97 = call i32 (i8*, i8*, i32*, i32*, ...) @sscanf(i8* %96, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32* %7, i32* %8)
%98 = icmp eq i32 %97, 2
br i1 %98, label %103, label %99
99: ; preds = %95
%100 = load i8*, i8** %4
%101 = call i32 (i8*, i8*, i32*, i32*, ...) @sscanf(i8* %100, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32* %7, i32* %8)
%102 = icmp eq i32 %101, 2
br i1 %102, label %103, label %143
103: ; preds = %99, %95
%104 = load i32, i32* %7
%105 = icmp slt i32 %104, 0
br i1 %105, label %115, label %106
106: ; preds = %103
%107 = load i32, i32* %7
%108 = icmp sgt i32 %107, 23
br i1 %108, label %115, label %109
109: ; preds = %106
%110 = load i32, i32* %8
%111 = icmp slt i32 %110, 0
br i1 %111, label %115, label %112
112: ; preds = %109
%113 = load i32, i32* %8
%114 = icmp sgt i32 %113, 59
br i1 %114, label %115, label %116
115: ; preds = %112, %109, %106, %103
store i32 0, i32* %3
br label %144
116: ; preds = %112
%117 = load i32*, i32** %5
%118 = load i32, i32* %117
%119 = icmp sle i32 %118, 86400
br i1 %119, label %120, label %133
120: ; preds = %116
%121 = load i32, i32* %7
%122 = mul nsw i32 %121, 3600
%123 = load i32, i32* %8
%124 = mul nsw i32 %123, 60
%125 = add nsw i32 %122, %124
%126 = load i32*, i32** %5
store i32 %125, i32* %126
%127 = load i32*, i32** %5
%128 = load i32, i32* %127
%129 = icmp sge i32 %128, 86400
br i1 %129, label %130, label %132
130: ; preds = %120
%131 = load i32*, i32** %5
store i32 86399, i32* %131
br label %132
132: ; preds = %130, %120
store i32 1, i32* %3
br label %144
133: ; preds = %116
%134 = load i32*, i32** %5
%135 = load i32, i32* %134
%136 = load i32, i32* %7
%137 = mul nsw i32 %136, 3600
%138 = load i32, i32* %8
%139 = mul nsw i32 %138, 60
%140 = add nsw i32 %137, %139
%141 = call i32 @normalize_epoch(i32 %135, i32 %140)
%142 = load i32*, i32** %5
store i32 %141, i32* %142
store i32 1, i32* %3
br label %144
143: ; preds = %99
store i32 0, i32* %3
br label %144
144: ; preds = %143, %133, %132, %115, %92, %91, %86, %25
%145 = load i32, i32* %3
ret i32 %145
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32, i32, i32, i32 }
@.str = [17 x i8] c"%4d%2d%2d%2d:%2d\00"
@.str.1 = [16 x i8] c"%4d%2d%2d%2d%2d\00"
@.str.2 = [8 x i8] c"%2d:%2d\00"
@.str.3 = [7 x i8] c"%2d%2d\00"
define i32 @getbranchtime(i8* %0, i32* nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.tm
%6 = tail call i32 @strlen(i8* %0)
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast %struct.tm* %5 to i8*
%10 = call i32 @memset(%struct.tm* %5, i32 0, i32 24)
switch i32 %6, label %75 [
i32 13, label %11
i32 12, label %11
i32 5, label %11
i32 4, label %11
]
11: ; preds = %2, %2, %2, %2
%12 = getelementptr inbounds %struct.tm, %struct.tm* %5, i64 0, i32 0
%13 = getelementptr inbounds %struct.tm, %struct.tm* %5, i64 0, i32 1
%14 = getelementptr inbounds %struct.tm, %struct.tm* %5, i64 0, i32 2
%15 = getelementptr inbounds %struct.tm, %struct.tm* %5, i64 0, i32 3
%16 = getelementptr inbounds %struct.tm, %struct.tm* %5, i64 0, i32 4
%17 = call i32 (i8*, i8*, i32*, i32*, ...) @sscanf(i8* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32* %12, i32* %13, i32* %14, i32* %15, i32* %16)
%18 = icmp eq i32 %17, 5
br i1 %18, label %22, label %19
19: ; preds = %11
%20 = call i32 (i8*, i8*, i32*, i32*, ...) @sscanf(i8* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32* %12, i32* %13, i32* %14, i32* %15, i32* %16)
%21 = icmp eq i32 %20, 5
br i1 %21, label %22, label %51
22: ; preds = %19, %11
%23 = load i32, i32* %12
%24 = add nsw i32 %23, -1900
store i32 %24, i32* %12
%25 = load i32, i32* %13
%26 = add nsw i32 %25, -1
store i32 %26, i32* %13
%27 = icmp slt i32 %23, 2000
%28 = icmp slt i32 %25, 1
%29 = select i1 %27, i1 true, i1 %28
%30 = icmp sgt i32 %25, 12
%31 = select i1 %29, i1 true, i1 %30
%32 = load i32, i32* %14
%33 = icmp slt i32 %32, 1
%34 = select i1 %31, i1 true, i1 %33
%35 = icmp sgt i32 %32, 31
%36 = select i1 %34, i1 true, i1 %35
%37 = load i32, i32* %15
%38 = icmp slt i32 %37, 0
%39 = select i1 %36, i1 true, i1 %38
%40 = icmp sgt i32 %37, 23
%41 = select i1 %39, i1 true, i1 %40
%42 = load i32, i32* %16
%43 = icmp slt i32 %42, 0
%44 = select i1 %41, i1 true, i1 %43
%45 = icmp sgt i32 %42, 59
%46 = select i1 %44, i1 true, i1 %45
br i1 %46, label %75, label %47
47: ; preds = %22
%48 = getelementptr inbounds %struct.tm, %struct.tm* %5, i64 0, i32 5
store i32 -1, i32* %48
%49 = call i32 @mktime(%struct.tm* %5)
%50 = icmp eq i32 %49, -1
br i1 %50, label %75, label %73
51: ; preds = %19
%52 = call i32 (i8*, i8*, i32*, i32*, ...) @sscanf(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32* %3, i32* %4)
%53 = icmp eq i32 %52, 2
br i1 %53, label %57, label %54
54: ; preds = %51
%55 = call i32 (i8*, i8*, i32*, i32*, ...) @sscanf(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32* %3, i32* %4)
%56 = icmp eq i32 %55, 2
br i1 %56, label %57, label %75
57: ; preds = %54, %51
%58 = load i32, i32* %3
%59 = icmp ugt i32 %58, 23
%60 = load i32, i32* %4
%61 = icmp slt i32 %60, 0
%62 = select i1 %59, i1 true, i1 %61
%63 = icmp sgt i32 %60, 59
%64 = select i1 %62, i1 true, i1 %63
br i1 %64, label %75, label %65
65: ; preds = %57
%66 = load i32, i32* %1
%67 = icmp slt i32 %66, 86401
%68 = mul nuw nsw i32 %58, 3600
%69 = mul nuw nsw i32 %60, 60
%70 = add nuw nsw i32 %69, %68
br i1 %67, label %73, label %71
71: ; preds = %65
%72 = call i32 @normalize_epoch(i32 %66, i32 %70)
br label %73
73: ; preds = %65, %47, %71
%74 = phi i32 [ %72, %71 ], [ %49, %47 ], [ %70, %65 ]
store i32 %74, i32* %1
br label %75
75: ; preds = %73, %54, %57, %47, %22, %2
%76 = phi i32 [ 0, %2 ], [ 0, %22 ], [ 0, %47 ], [ 0, %57 ], [ 0, %54 ], [ 1, %73 ]
ret i32 %76
}