#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 */

/* Variables and functions */
scalar_t__ _clock(char *);
scalar_t__ _getdate(char *);
scalar_t__ _mktime(char *);
scalar_t__ _strftime(char *, char *, char *);
scalar_t__ _strptime(char *);
scalar_t__ _tzset(char *);
int main(int argc, char *argv[]) {
  int res = 0;
  (void)argc;
  res += _clock(argv[0]);
  res += _getdate(argv[0]);
  res += _mktime(argv[0]);
  res += _strftime(argv[0], "%H:%M:%S", "00:00:00");
  res += _strftime(argv[0], "%B", "January");
  res += _strftime(argv[0], "%b", "Jan");
  res += _strftime(argv[0], "%A", "Thursday");
  res += _strftime(argv[0], "%a", "Thu");
  res += _strftime(argv[0], "%e", " 1");
  res += _strptime(argv[0]);
  res += _tzset(argv[0]);
  return (res == 0) ? 0 : 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <_clock@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1040 <_getdate@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1060 <_mktime@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe2a(%rip),%rsi
lea    0xe2c(%rip),%rdx
call   1030 <_strftime@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe15(%rip),%rsi
lea    0xe11(%rip),%rdx
call   1030 <_strftime@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xdf9(%rip),%rsi
lea    0xdf5(%rip),%rdx
call   1030 <_strftime@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xdd9(%rip),%rsi
lea    0xdd5(%rip),%rdx
call   1030 <_strftime@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xdbe(%rip),%rsi
lea    0xdba(%rip),%rdx
call   1030 <_strftime@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xd9e(%rip),%rsi
lea    0xd9a(%rip),%rdx
call   1030 <_strftime@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1070 <_strptime@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1080 <_tzset@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    $0x2,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r15
mov    (%rsi),%rdi
call   1050 <_clock@plt>
mov    %rax,%r14
mov    (%r15),%rdi
call   1040 <_getdate@plt>
mov    %rax,%rbx
add    %r14d,%ebx
mov    (%r15),%rdi
call   1060 <_mktime@plt>
mov    %rax,%r14
add    %ebx,%r14d
mov    (%r15),%rdi
lea    0xe64(%rip),%rsi
lea    0xe66(%rip),%rdx
call   1030 <_strftime@plt>
mov    %rax,%rbx
add    %r14d,%ebx
mov    (%r15),%rdi
lea    0xe5a(%rip),%rsi
lea    0xe56(%rip),%rdx
call   1030 <_strftime@plt>
mov    %rax,%r14
add    %ebx,%r14d
mov    (%r15),%rdi
lea    0xe49(%rip),%rsi
lea    0xe45(%rip),%rdx
call   1030 <_strftime@plt>
mov    %rax,%rbx
add    %r14d,%ebx
mov    (%r15),%rdi
lea    0xe34(%rip),%rsi
lea    0xe30(%rip),%rdx
call   1030 <_strftime@plt>
mov    %rax,%r14
add    %ebx,%r14d
mov    (%r15),%rdi
lea    0xe24(%rip),%rsi
lea    0xe20(%rip),%rdx
call   1030 <_strftime@plt>
mov    %rax,%r12
add    %r14d,%r12d
mov    (%r15),%rdi
lea    0xe0f(%rip),%rsi
lea    0xe0b(%rip),%rdx
call   1030 <_strftime@plt>
mov    %rax,%rbx
add    %r12d,%ebx
mov    (%r15),%rdi
call   1070 <_strptime@plt>
mov    %rax,%r14
add    %ebx,%r14d
mov    (%r15),%rdi
call   1080 <_tzset@plt>
xor    %ecx,%ecx
add    %r14d,%eax
setne  %cl
add    %ecx,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%H:%M:%S\00"
@.str.1 = [9 x i8] c"00:00:00\00"
@.str.2 = [3 x i8] c"%B\00"
@.str.3 = [8 x i8] c"January\00"
@.str.4 = [3 x i8] c"%b\00"
@.str.5 = [4 x i8] c"Jan\00"
@.str.6 = [3 x i8] c"%A\00"
@.str.7 = [9 x i8] c"Thursday\00"
@.str.8 = [3 x i8] c"%a\00"
@.str.9 = [4 x i8] c"Thu\00"
@.str.10 = [3 x i8] c"%e\00"
@.str.11 = [3 x i8] c" 1\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i64 @_clock(i8* %10)
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = add nsw i64 %13, %11
%15 = trunc i64 %14 to i32
store i32 %15, i32* %6
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
%19 = call i64 @_getdate(i8* %18)
%20 = load i32, i32* %6
%21 = sext i32 %20 to i64
%22 = add nsw i64 %21, %19
%23 = trunc i64 %22 to i32
store i32 %23, i32* %6
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 0
%26 = load i8*, i8** %25
%27 = call i64 @_mktime(i8* %26)
%28 = load i32, i32* %6
%29 = sext i32 %28 to i64
%30 = add nsw i64 %29, %27
%31 = trunc i64 %30 to i32
store i32 %31, i32* %6
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 0
%34 = load i8*, i8** %33
%35 = call i64 @_strftime(i8* %34, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%36 = load i32, i32* %6
%37 = sext i32 %36 to i64
%38 = add nsw i64 %37, %35
%39 = trunc i64 %38 to i32
store i32 %39, i32* %6
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 0
%42 = load i8*, i8** %41
%43 = call i64 @_strftime(i8* %42, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%44 = load i32, i32* %6
%45 = sext i32 %44 to i64
%46 = add nsw i64 %45, %43
%47 = trunc i64 %46 to i32
store i32 %47, i32* %6
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i64 0
%50 = load i8*, i8** %49
%51 = call i64 @_strftime(i8* %50, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%52 = load i32, i32* %6
%53 = sext i32 %52 to i64
%54 = add nsw i64 %53, %51
%55 = trunc i64 %54 to i32
store i32 %55, i32* %6
%56 = load i8**, i8*** %5
%57 = getelementptr inbounds i8*, i8** %56, i64 0
%58 = load i8*, i8** %57
%59 = call i64 @_strftime(i8* %58, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%60 = load i32, i32* %6
%61 = sext i32 %60 to i64
%62 = add nsw i64 %61, %59
%63 = trunc i64 %62 to i32
store i32 %63, i32* %6
%64 = load i8**, i8*** %5
%65 = getelementptr inbounds i8*, i8** %64, i64 0
%66 = load i8*, i8** %65
%67 = call i64 @_strftime(i8* %66, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%68 = load i32, i32* %6
%69 = sext i32 %68 to i64
%70 = add nsw i64 %69, %67
%71 = trunc i64 %70 to i32
store i32 %71, i32* %6
%72 = load i8**, i8*** %5
%73 = getelementptr inbounds i8*, i8** %72, i64 0
%74 = load i8*, i8** %73
%75 = call i64 @_strftime(i8* %74, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%76 = load i32, i32* %6
%77 = sext i32 %76 to i64
%78 = add nsw i64 %77, %75
%79 = trunc i64 %78 to i32
store i32 %79, i32* %6
%80 = load i8**, i8*** %5
%81 = getelementptr inbounds i8*, i8** %80, i64 0
%82 = load i8*, i8** %81
%83 = call i64 @_strptime(i8* %82)
%84 = load i32, i32* %6
%85 = sext i32 %84 to i64
%86 = add nsw i64 %85, %83
%87 = trunc i64 %86 to i32
store i32 %87, i32* %6
%88 = load i8**, i8*** %5
%89 = getelementptr inbounds i8*, i8** %88, i64 0
%90 = load i8*, i8** %89
%91 = call i64 @_tzset(i8* %90)
%92 = load i32, i32* %6
%93 = sext i32 %92 to i64
%94 = add nsw i64 %93, %91
%95 = trunc i64 %94 to i32
store i32 %95, i32* %6
%96 = load i32, i32* %6
%97 = icmp eq i32 %96, 0
%98 = zext i1 %97 to i64
%99 = select i1 %97, i32 0, i32 2
ret i32 %99
}

LLVM IR (-O2):
@.str = [9 x i8] c"%H:%M:%S\00"
@.str.1 = [9 x i8] c"00:00:00\00"
@.str.2 = [3 x i8] c"%B\00"
@.str.3 = [8 x i8] c"January\00"
@.str.4 = [3 x i8] c"%b\00"
@.str.5 = [4 x i8] c"Jan\00"
@.str.6 = [3 x i8] c"%A\00"
@.str.7 = [9 x i8] c"Thursday\00"
@.str.8 = [3 x i8] c"%a\00"
@.str.9 = [4 x i8] c"Thu\00"
@.str.10 = [3 x i8] c"%e\00"
@.str.11 = [3 x i8] c" 1\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i64 @_clock(i8* %3)
%5 = load i8*, i8** %1
%6 = tail call i64 @_getdate(i8* %5)
%7 = add i64 %6, %4
%8 = load i8*, i8** %1
%9 = tail call i64 @_mktime(i8* %8)
%10 = add i64 %7, %9
%11 = load i8*, i8** %1
%12 = tail call i64 @_strftime(i8* %11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%13 = add i64 %10, %12
%14 = load i8*, i8** %1
%15 = tail call i64 @_strftime(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%16 = add i64 %13, %15
%17 = load i8*, i8** %1
%18 = tail call i64 @_strftime(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%19 = add i64 %16, %18
%20 = load i8*, i8** %1
%21 = tail call i64 @_strftime(i8* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%22 = add i64 %19, %21
%23 = load i8*, i8** %1
%24 = tail call i64 @_strftime(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0))
%25 = add i64 %22, %24
%26 = load i8*, i8** %1
%27 = tail call i64 @_strftime(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
%28 = add i64 %25, %27
%29 = load i8*, i8** %1
%30 = tail call i64 @_strptime(i8* %29)
%31 = add i64 %28, %30
%32 = load i8*, i8** %1
%33 = tail call i64 @_tzset(i8* %32)
%34 = add i64 %31, %33
%35 = trunc i64 %34 to i32
%36 = icmp eq i32 %35, 0
%37 = select i1 %36, i32 0, i32 2
ret i32 %37
}