#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 */
int /*<<< orphan*/ ok(int, int, int, int, int, int, int, int, int, char *);
int /*<<< orphan*/ putenv(char *);
int /*<<< orphan*/ tzset();
int main() {
  putenv((char *)"TZ=UTC");
  tzset();
  ok(39, 19, 20, 28, 5, 113, -1, 1372450779, 0,
     "sometime   Fri Jun 28 20:19:39 2013 UTC");
  ok(40, 20, 21, 28, 5, 113, -1, 1372454440, 0,
     "same day   Fri Jun 28 21:20:40 2013 UTC");
  ok(59, 59, 23, 29, 5, 113, -1, 1372550399, 0,
     "end of day Sat Jun 29 23:59:59 2013 UTC");
  ok(0, 0, 0, 30, 5, 113, -1, 1372550400, 0,
     "next day   Sun Jun 30 00:00:00 2013 UTC");
  ok(40, 20, 21, 29, 5, 113, -1, 1372540840, 0,
     "next day   Sat Jun 29 21:20:40 2013 UTC");
  ok(0, 0, 0, 1, 0, 70, -1, 0, 0, "min epoch  Thu Jan  1 00:00:00 1970 UTC");
  ok(59, 59, 18, 31, 11, 137, -1, 2145898799, 0,
     "max epoch  Thu Dec 31 18:59:59 2037 UTC");
  putenv((char *)"TZ=US/Eastern");
  tzset();
  ok(59, 59, 01, 11, 02, 112, -1, 1331449199, 0, "March 2012 dst before");
  ok(00, 00, 03, 11, 02, 112, -1, 1331449200, 1, "March 2012 dst after");
  ok(59, 59, 01, 04, 10, 112, -1, 1352008799, 1, "Nov   2012 dst before");
  ok(00, 00, 01, 04, 10, 112, -1, 1352005200, 1, "Nov   2012 dst after");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <putenv@plt>
mov    $0x0,%al
call   1050 <tzset@plt>
mov    $0x27,%edi
mov    $0x13,%esi
mov    $0x14,%edx
mov    $0x1c,%ecx
mov    $0x5,%r8d
mov    $0x71,%r9d
xor    %eax,%eax
lea    0xe8c(%rip),%rax
movl   $0xffffffff,(%rsp)
movl   $0x51cdefdb,0x8(%rsp)
51
movl   $0x0,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <ok@plt>
mov    $0x28,%edi
mov    $0x14,%esi
mov    $0x15,%edx
mov    $0x1c,%ecx
mov    $0x5,%r8d
mov    $0x71,%r9d
xor    %eax,%eax
lea    0xe6a(%rip),%rax
movl   $0xffffffff,(%rsp)
movl   $0x51cdfe28,0x8(%rsp)
51
movl   $0x0,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <ok@plt>
mov    $0x3b,%esi
mov    $0x17,%edx
mov    $0x1d,%ecx
mov    $0x5,%r8d
mov    $0x71,%r9d
xor    %eax,%eax
lea    0xe4d(%rip),%rax
mov    %esi,%edi
movl   $0xffffffff,(%rsp)
movl   $0x51cf74ff,0x8(%rsp)
51
movl   $0x0,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <ok@plt>
xor    %edx,%edx
mov    $0x1e,%ecx
mov    $0x5,%r8d
mov    $0x71,%r9d
lea    0xe38(%rip),%rax
mov    %edx,%edi
mov    %edx,%esi
movl   $0xffffffff,(%rsp)
movl   $0x51cf7500,0x8(%rsp)
51
movl   $0x0,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <ok@plt>
mov    $0x28,%edi
mov    $0x14,%esi
mov    $0x15,%edx
mov    $0x1d,%ecx
mov    $0x5,%r8d
mov    $0x71,%r9d
xor    %eax,%eax
lea    0xe12(%rip),%rax
movl   $0xffffffff,(%rsp)
movl   $0x51cf4fa8,0x8(%rsp)
51
movl   $0x0,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <ok@plt>
xor    %r8d,%r8d
mov    $0x1,%ecx
mov    $0x46,%r9d
lea    0xe04(%rip),%rax
mov    %r8d,%edi
mov    %r8d,%esi
mov    %r8d,%edx
movl   $0xffffffff,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <ok@plt>
mov    $0x3b,%esi
mov    $0x12,%edx
mov    $0x1f,%ecx
mov    $0xb,%r8d
mov    $0x89,%r9d
xor    %eax,%eax
lea    0xdde(%rip),%rax
mov    %esi,%edi
movl   $0xffffffff,(%rsp)
movl   $0x7fe7d12f,0x8(%rsp)
7f
movl   $0x0,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <ok@plt>
lea    0xddc(%rip),%rdi
call   1040 <putenv@plt>
mov    $0x0,%al
call   1050 <tzset@plt>
mov    $0x3b,%esi
mov    $0x1,%edx
mov    $0xb,%ecx
mov    $0x2,%r8d
mov    $0x70,%r9d
xor    %eax,%eax
lea    0xdba(%rip),%rax
mov    %esi,%edi
movl   $0xffffffff,(%rsp)
movl   $0x4f5c4d6f,0x8(%rsp)
4f
movl   $0x0,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <ok@plt>
xor    %esi,%esi
mov    $0x3,%edx
mov    $0xb,%ecx
mov    $0x2,%r8d
mov    $0x70,%r9d
lea    0xd8e(%rip),%rax
mov    %esi,%edi
movl   $0xffffffff,(%rsp)
movl   $0x4f5c4d70,0x8(%rsp)
4f
movl   $0x1,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <ok@plt>
mov    $0x3b,%esi
mov    $0x1,%edx
mov    $0x4,%ecx
mov    $0xa,%r8d
mov    $0x70,%r9d
lea    0xd5e(%rip),%rax
mov    %esi,%edi
movl   $0xffffffff,(%rsp)
movl   $0x5096045f,0x8(%rsp)
50
movl   $0x1,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <ok@plt>
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x4,%ecx
mov    $0xa,%r8d
mov    $0x70,%r9d
lea    0xd32(%rip),%rax
mov    %esi,%edi
movl   $0xffffffff,(%rsp)
movl   $0x5095f650,0x8(%rsp)
50
movl   $0x1,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <ok@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <putenv@plt>
xor    %eax,%eax
call   1050 <tzset@plt>
lea    0xebc(%rip),%rax
mov    $0x27,%edi
mov    $0x13,%esi
mov    $0x14,%edx
mov    $0x1c,%ecx
mov    $0x5,%r8d
mov    $0x71,%r9d
push   %rax
push   $0x0
push   $0x51cdefdb
push   $0xffffffffffffffff
call   1030 <ok@plt>
add    $0x20,%rsp
lea    0xeaa(%rip),%rax
mov    $0x28,%edi
mov    $0x14,%esi
mov    $0x15,%edx
mov    $0x1c,%ecx
mov    $0x5,%r8d
mov    $0x71,%r9d
push   %rax
push   $0x0
push   $0x51cdfe28
push   $0xffffffffffffffff
call   1030 <ok@plt>
add    $0x20,%rsp
lea    0xe98(%rip),%rax
mov    $0x3b,%edi
mov    $0x3b,%esi
mov    $0x17,%edx
mov    $0x1d,%ecx
mov    $0x5,%r8d
mov    $0x71,%r9d
push   %rax
push   $0x0
push   $0x51cf74ff
push   $0xffffffffffffffff
call   1030 <ok@plt>
add    $0x20,%rsp
lea    0xe86(%rip),%rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1e,%ecx
mov    $0x5,%r8d
mov    $0x71,%r9d
push   %rax
push   $0x0
push   $0x51cf7500
push   $0xffffffffffffffff
call   1030 <ok@plt>
add    $0x20,%rsp
lea    0xe7d(%rip),%rax
mov    $0x28,%edi
mov    $0x14,%esi
mov    $0x15,%edx
mov    $0x1d,%ecx
mov    $0x5,%r8d
mov    $0x71,%r9d
push   %rax
push   $0x0
push   $0x51cf4fa8
push   $0xffffffffffffffff
call   1030 <ok@plt>
add    $0x20,%rsp
lea    0xe6b(%rip),%rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
xor    %r8d,%r8d
mov    $0x46,%r9d
push   %rax
push   $0x0
push   $0x0
push   $0xffffffffffffffff
call   1030 <ok@plt>
add    $0x20,%rsp
lea    0xe68(%rip),%rax
mov    $0x3b,%edi
mov    $0x3b,%esi
mov    $0x12,%edx
mov    $0x1f,%ecx
mov    $0xb,%r8d
mov    $0x89,%r9d
push   %rax
push   $0x0
push   $0x7fe7d12f
push   $0xffffffffffffffff
call   1030 <ok@plt>
add    $0x20,%rsp
lea    0xe56(%rip),%rdi
call   1040 <putenv@plt>
xor    %eax,%eax
call   1050 <tzset@plt>
lea    0xe51(%rip),%rax
mov    $0x3b,%edi
mov    $0x3b,%esi
mov    $0x1,%edx
mov    $0xb,%ecx
mov    $0x2,%r8d
mov    $0x70,%r9d
push   %rax
push   $0x0
push   $0x4f5c4d6f
push   $0xffffffffffffffff
call   1030 <ok@plt>
add    $0x20,%rsp
lea    0xe2d(%rip),%rax
xor    %edi,%edi
xor    %esi,%esi
mov    $0x3,%edx
mov    $0xb,%ecx
mov    $0x2,%r8d
mov    $0x70,%r9d
push   %rax
push   $0x1
push   $0x4f5c4d70
push   $0xffffffffffffffff
call   1030 <ok@plt>
add    $0x20,%rsp
lea    0xe0e(%rip),%rax
mov    $0x3b,%edi
mov    $0x3b,%esi
mov    $0x1,%edx
mov    $0x4,%ecx
mov    $0xa,%r8d
mov    $0x70,%r9d
push   %rax
push   $0x1
push   $0x5096045f
push   $0xffffffffffffffff
call   1030 <ok@plt>
add    $0x20,%rsp
lea    0xdea(%rip),%rax
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x4,%ecx
mov    $0xa,%r8d
mov    $0x70,%r9d
push   %rax
push   $0x1
push   $0x5095f650
push   $0xffffffffffffffff
call   1030 <ok@plt>
add    $0x20,%rsp
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"TZ=UTC\00"
@.str.1 = [40 x i8] c"sometime Fri Jun 28 20:19:39 2013 UTC\00"
@.str.2 = [40 x i8] c"same day Fri Jun 28 21:20:40 2013 UTC\00"
@.str.3 = [40 x i8] c"end of day Sat Jun 29 23:59:59 2013 UTC\00"
@.str.4 = [40 x i8] c"next day Sun Jun 30 00:00:00 2013 UTC\00"
@.str.5 = [40 x i8] c"next day Sat Jun 29 21:20:40 2013 UTC\00"
@.str.6 = [40 x i8] c"min epoch Thu Jan 1 00:00:00 1970 UTC\00"
@.str.7 = [40 x i8] c"max epoch Thu Dec 31 18:59:59 2037 UTC\00"
@.str.8 = [14 x i8] c"TZ=US/Eastern\00"
@.str.9 = [22 x i8] c"March 2012 dst before\00"
@.str.10 = [21 x i8] c"March 2012 dst after\00"
@.str.11 = [22 x i8] c"Nov 2012 dst before\00"
@.str.12 = [21 x i8] c"Nov 2012 dst after\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @putenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @tzset()
%4 = call i32 @ok(i32 39, i32 19, i32 20, i32 28, i32 5, i32 113, i32 -1, i32 1372450779, i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @ok(i32 40, i32 20, i32 21, i32 28, i32 5, i32 113, i32 -1, i32 1372454440, i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @ok(i32 59, i32 59, i32 23, i32 29, i32 5, i32 113, i32 -1, i32 1372550399, i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @ok(i32 0, i32 0, i32 0, i32 30, i32 5, i32 113, i32 -1, i32 1372550400, i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @ok(i32 40, i32 20, i32 21, i32 29, i32 5, i32 113, i32 -1, i32 1372540840, i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 @ok(i32 0, i32 0, i32 0, i32 1, i32 0, i32 70, i32 -1, i32 0, i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 @ok(i32 59, i32 59, i32 18, i32 31, i32 11, i32 137, i32 -1, i32 2145898799, i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 @putenv(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%12 = call i32 (...) @tzset()
%13 = call i32 @ok(i32 59, i32 59, i32 1, i32 11, i32 2, i32 112, i32 -1, i32 1331449199, i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 @ok(i32 0, i32 0, i32 3, i32 11, i32 2, i32 112, i32 -1, i32 1331449200, i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 @ok(i32 59, i32 59, i32 1, i32 4, i32 10, i32 112, i32 -1, i32 1352008799, i32 1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 @ok(i32 0, i32 0, i32 1, i32 4, i32 10, i32 112, i32 -1, i32 1352005200, i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"TZ=UTC\00"
@.str.1 = [40 x i8] c"sometime Fri Jun 28 20:19:39 2013 UTC\00"
@.str.2 = [40 x i8] c"same day Fri Jun 28 21:20:40 2013 UTC\00"
@.str.3 = [40 x i8] c"end of day Sat Jun 29 23:59:59 2013 UTC\00"
@.str.4 = [40 x i8] c"next day Sun Jun 30 00:00:00 2013 UTC\00"
@.str.5 = [40 x i8] c"next day Sat Jun 29 21:20:40 2013 UTC\00"
@.str.6 = [40 x i8] c"min epoch Thu Jan 1 00:00:00 1970 UTC\00"
@.str.7 = [40 x i8] c"max epoch Thu Dec 31 18:59:59 2037 UTC\00"
@.str.8 = [14 x i8] c"TZ=US/Eastern\00"
@.str.9 = [22 x i8] c"March 2012 dst before\00"
@.str.10 = [21 x i8] c"March 2012 dst after\00"
@.str.11 = [22 x i8] c"Nov 2012 dst before\00"
@.str.12 = [21 x i8] c"Nov 2012 dst after\00"
define i32 @main() {
%1 = tail call i32 @putenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @tzset()
%3 = tail call i32 @ok(i32 39, i32 19, i32 20, i32 28, i32 5, i32 113, i32 -1, i32 1372450779, i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @ok(i32 40, i32 20, i32 21, i32 28, i32 5, i32 113, i32 -1, i32 1372454440, i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @ok(i32 59, i32 59, i32 23, i32 29, i32 5, i32 113, i32 -1, i32 1372550399, i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @ok(i32 0, i32 0, i32 0, i32 30, i32 5, i32 113, i32 -1, i32 1372550400, i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @ok(i32 40, i32 20, i32 21, i32 29, i32 5, i32 113, i32 -1, i32 1372540840, i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0))
%8 = tail call i32 @ok(i32 0, i32 0, i32 0, i32 1, i32 0, i32 70, i32 -1, i32 0, i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0))
%9 = tail call i32 @ok(i32 59, i32 59, i32 18, i32 31, i32 11, i32 137, i32 -1, i32 2145898799, i32 0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0))
%10 = tail call i32 @putenv(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
%11 = tail call i32 (...) @tzset()
%12 = tail call i32 @ok(i32 59, i32 59, i32 1, i32 11, i32 2, i32 112, i32 -1, i32 1331449199, i32 0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0))
%13 = tail call i32 @ok(i32 0, i32 0, i32 3, i32 11, i32 2, i32 112, i32 -1, i32 1331449200, i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%14 = tail call i32 @ok(i32 59, i32 59, i32 1, i32 4, i32 10, i32 112, i32 -1, i32 1352008799, i32 1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0))
%15 = tail call i32 @ok(i32 0, i32 0, i32 1, i32 4, i32 10, i32 112, i32 -1, i32 1352005200, i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0))
ret i32 0
}