#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_mon;
  int tm_mday;
  int tm_year;
  int tm_hour;
  int tm_min;
  int tm_sec;
};

/* Variables and functions */
int daylight;
double fmod(double, double);
struct tm *gmtime(int *);
int mktime(struct tm *);
int /*<<< orphan*/ printf(char *, double, ...);
int time(int /*<<< orphan*/ *);
int timezone;
int main() {
  time_t cur_time, start, start_gmt, now, now_gmt;
  struct tm *gmt, mt;
  long int offset;
  double diff, part, days, hours, lon, lst;
  int i;
  cur_time = time(NULL);
  printf("Time = %ld\n", cur_time);
  gmt = gmtime(&cur_time);
  printf("GMT = %d/%d/%2d %d:%02d:%02d\n", gmt->tm_mon, gmt->tm_mday,
         gmt->tm_year, gmt->tm_hour, gmt->tm_min, gmt->tm_sec);
  mt.tm_mon = 2;
  mt.tm_mday = 21;
  mt.tm_year = 98;
  mt.tm_hour = 12;
  mt.tm_min = 0;
  mt.tm_sec = 0;
  start = mktime(&mt);
  offset = -(timezone / 3600 - daylight);
  printf("Raw time zone offset = %ld\n", timezone);
  printf("Daylight Savings = %d\n", daylight);
  printf("Local hours from GMT = %d\n", offset);
  start_gmt = start - timezone + (daylight * 3600);
  printf("March 21 noon (CST) = %ld\n", start);
  printf("March 21 noon (GMT) = %ld\n", start_gmt);
  for (i = 0; i < 12; i++) {
    mt.tm_mon = i;
    mt.tm_mday = 21;
    mt.tm_year = gmt->tm_year;
    mt.tm_hour = 12;
    mt.tm_min = 0;
    mt.tm_sec = 0;
    now = mktime(&mt);
    offset = -(timezone / 3600 - daylight);
    printf("Raw time zone offset = %ld\n", timezone);
    printf("Daylight Savings = %d\n", daylight);
    printf("Local hours from GMT = %d\n", offset);
    now_gmt = now - timezone + (daylight * 3600);
    printf("%d/%d/%d noon (CST) = %ld\n", i + 1, 21, 97, now);
    printf("%d/%d/%d noon (GMT) = %ld\n", i + 1, 21, 97, now_gmt);
    diff = (now_gmt - start_gmt) / (3600.0 * 24.0);
    printf("Time since 3/21/%2d GMT = %.2f\n", gmt->tm_year, diff);
    part = fmod(diff, 1.0);
    days = diff - part;
    hours = 12;
    lon = -112;
    lst = (days + lon) / 15.0 + hours - 12;
    while (lst < 0.0) {
      lst += 24.0;
    }
    printf("days = %.1f  hours = %.2f  lon = %.2f  lst = %.2f\n", days, hours,
           lon, lst);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x8(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
lea    0xeb6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
call   1070 <gmtime@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cvtsi2sdl (%rax),%xmm0
mov    -0x20(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%edx
mov    -0x20(%rbp),%rax
mov    0xc(%rax),%ecx
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%r8d
mov    -0x20(%rbp),%rax
mov    0x14(%rax),%r9d
lea    0xe7a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movl   $0x2,-0x38(%rbp)
movl   $0x15,-0x34(%rbp)
movl   $0x62,-0x30(%rbp)
movl   $0xc,-0x2c(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
lea    -0x38(%rbp),%rdi
call   1060 <mktime@plt>
mov    %eax,-0xc(%rbp)
mov    0x2dda(%rip),%rax
mov    (%rax),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    0x2db7(%rip),%rax
sub    (%rax),%ecx
xor    %eax,%eax
sub    %ecx,%eax
cltq
mov    %rax,-0x40(%rbp)
mov    0x2db4(%rip),%rax
cvtsi2sdl (%rax),%xmm0
lea    0xe23(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2d8b(%rip),%rax
cvtsi2sdl (%rax),%xmm0
lea    0xe26(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
cvtsi2sdq -0x40(%rbp),%xmm0
lea    0xe29(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    0x2d6b(%rip),%rcx
sub    (%rcx),%eax
mov    0x2d52(%rip),%rcx
imul   $0xe10,(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
lea    0xe13(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
cvtsi2sdl -0x10(%rbp),%xmm0
lea    0xe1b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movl   $0x0,-0x74(%rbp)
cmpl   $0xc,-0x74(%rbp)
jge    14c4 <main+0x374>
mov    -0x74(%rbp),%eax
mov    %eax,-0x38(%rbp)
movl   $0x15,-0x34(%rbp)
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x30(%rbp)
movl   $0xc,-0x2c(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
lea    -0x38(%rbp),%rdi
call   1060 <mktime@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ce1(%rip),%rax
mov    (%rax),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    0x2cbe(%rip),%rax
sub    (%rax),%ecx
xor    %eax,%eax
sub    %ecx,%eax
cltq
mov    %rax,-0x40(%rbp)
mov    0x2cbb(%rip),%rax
cvtsi2sdl (%rax),%xmm0
lea    0xd2a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2c92(%rip),%rax
cvtsi2sdl (%rax),%xmm0
lea    0xd2d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
cvtsi2sdq -0x40(%rbp),%xmm0
lea    0xd30(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    0x2c72(%rip),%rcx
sub    (%rcx),%eax
mov    0x2c59(%rip),%rcx
imul   $0xe10,(%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
mov    -0x14(%rbp),%ecx
lea    0xd48(%rip),%rdi
mov    $0x15,%esi
mov    $0x61,%edx
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
mov    -0x18(%rbp),%ecx
lea    0xd3e(%rip),%rdi
mov    $0x15,%esi
mov    $0x61,%edx
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
sub    -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xc42(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
cvtsi2sdl 0x8(%rax),%xmm0
movsd  -0x48(%rbp),%xmm1
lea    0xd18(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x48(%rbp),%xmm0
movsd  0xc08(%rip),%xmm1
call   1040 <fmod@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xbcf(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xbd2(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  0xbb3(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  0xb9a(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x70(%rbp),%xmm0
jbe    1494 <main+0x344>
movsd  0xba3(%rip),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    146f <main+0x31f>
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm3
lea    0xc85(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    12b6 <main+0x166>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
xor    %r14d,%r14d
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,0xc(%rsp)
cvtsi2sd %eax,%xmm0
lea    0xed1(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xc(%rsp),%rdi
call   1070 <gmtime@plt>
mov    %rax,%rbx
xorps  %xmm0,%xmm0
cvtsi2sdl (%rax),%xmm0
mov    0x4(%rax),%esi
mov    0x8(%rax),%edx
mov    0xc(%rax),%ecx
mov    0x10(%rax),%r8d
mov    0x14(%rax),%r9d
lea    0xeaa(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movaps 0xe48(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x20(%rsp)
lea    0x10(%rsp),%rdi
call   1060 <mktime@plt>
mov    %eax,%r13d
mov    0x2e06(%rip),%r15
movslq (%r15),%rax
imul   $0x6e5d4c3b,%rax,%rbp
shr    $0x20,%rbp
sub    %eax,%ebp
mov    %ebp,%ecx
shr    $0x1f,%ecx
sar    $0xb,%ebp
add    %ecx,%ebp
mov    0x2dd5(%rip),%r12
add    (%r12),%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
lea    0xe65(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl (%r12),%xmm0
lea    0xe6a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
lea    0xe6c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %r13d,%xmm0
sub    (%r15),%r13d
imul   $0xe10,(%r12),%ebp
add    %r13d,%ebp
lea    0xe63(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    %ebp,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
lea    0xe65(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    129c <main+0x14c>
nop
lea    0xec5(%rip),%rdi
movapd %xmm5,%xmm0
mov    $0x4,%al
call   1030 <printf@plt>
cmp    $0xc,%r14d
je     142f <main+0x2df>
mov    %r14d,0x10(%rsp)
movl   $0x15,0x14(%rsp)
mov    0x8(%rbx),%eax
mov    %eax,0x18(%rsp)
movq   $0xc,0x1c(%rsp)
movl   $0x0,0x24(%rsp)
lea    0x10(%rsp),%rdi
call   1060 <mktime@plt>
mov    %eax,%r13d
mov    0x2d0b(%rip),%r15
movslq (%r15),%rax
imul   $0x6e5d4c3b,%rax,%rbp
shr    $0x20,%rbp
sub    %eax,%ebp
mov    %ebp,%ecx
shr    $0x1f,%ecx
sar    $0xb,%ebp
add    %ecx,%ebp
add    (%r12),%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
lea    0xd71(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl (%r12),%xmm0
lea    0xd76(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
lea    0xd78(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    %r13d,%eax
sub    (%r15),%eax
imul   $0xe10,(%r12),%ebp
add    %eax,%ebp
add    $0x1,%r14d
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
movsd  %xmm0,(%rsp)
lea    0xd9a(%rip),%rdi
mov    $0x15,%esi
mov    $0x61,%edx
mov    %r13d,%ecx
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xd9a(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x15,%esi
mov    $0x61,%edx
mov    %ebp,%ecx
mov    $0x1,%al
call   1030 <printf@plt>
sub    0x8(%rsp),%ebp
cvtsi2sd %ebp,%xmm1
divsd  0xc71(%rip),%xmm1
movsd  %xmm1,(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x8(%rbx),%xmm0
lea    0xd79(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  (%rsp),%xmm0
movsd  0xc51(%rip),%xmm1
call   1040 <fmod@plt>
movsd  (%rsp),%xmm5
subsd  %xmm0,%xmm5
movapd %xmm5,%xmm3
movsd  0xc3f(%rip),%xmm2
addsd  %xmm2,%xmm3
divsd  0xc3b(%rip),%xmm3
movsd  0xc3b(%rip),%xmm1
addsd  %xmm1,%xmm3
addsd  0xc37(%rip),%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm3,%xmm0
jbe    1280 <main+0x130>
movsd  0xc29(%rip),%xmm4
nopw   0x0(%rax,%rax,1)
addsd  %xmm4,%xmm3
ucomisd %xmm3,%xmm0
ja     1420 <main+0x2d0>
jmp    1280 <main+0x130>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32, i32, i32, i32 }
@.str = [12 x i8] c"Time = %ld\0A\00"
@.str.1 = [30 x i8] c"GMT = %d/%d/%2d %d:%02d:%02d\0A\00"
@timezone = global i32 0
@daylight = global i32 0
@.str.2 = [28 x i8] c"Raw time zone offset = %ld\0A\00"
@.str.3 = [23 x i8] c"Daylight Savings = %d\0A\00"
@.str.4 = [27 x i8] c"Local hours from GMT = %d\0A\00"
@.str.5 = [27 x i8] c"March 21 noon (CST) = %ld\0A\00"
@.str.6 = [27 x i8] c"March 21 noon (GMT) = %ld\0A\00"
@.str.7 = [27 x i8] c"%d/%d/%d noon (CST) = %ld\0A\00"
@.str.8 = [27 x i8] c"%d/%d/%d noon (GMT) = %ld\0A\00"
@.str.9 = [32 x i8] c"Time since 3/21/%2d GMT = %.2f\0A\00"
@.str.10 = [51 x i8] c"days = %.1f hours = %.2f lon = %.2f lst = %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.tm*
%8 = alloca %struct.tm
%9 = alloca i64
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca i32
store i32 0, i32* %1
%17 = call i32 @time(i32* null)
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = sitofp i32 %18 to double
%20 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double %19)
%21 = call %struct.tm* @gmtime(i32* %2)
store %struct.tm* %21, %struct.tm** %7
%22 = load %struct.tm*, %struct.tm** %7
%23 = getelementptr inbounds %struct.tm, %struct.tm* %22, i32 0, i32 0
%24 = load i32, i32* %23
%25 = sitofp i32 %24 to double
%26 = load %struct.tm*, %struct.tm** %7
%27 = getelementptr inbounds %struct.tm, %struct.tm* %26, i32 0, i32 1
%28 = load i32, i32* %27
%29 = load %struct.tm*, %struct.tm** %7
%30 = getelementptr inbounds %struct.tm, %struct.tm* %29, i32 0, i32 2
%31 = load i32, i32* %30
%32 = load %struct.tm*, %struct.tm** %7
%33 = getelementptr inbounds %struct.tm, %struct.tm* %32, i32 0, i32 3
%34 = load i32, i32* %33
%35 = load %struct.tm*, %struct.tm** %7
%36 = getelementptr inbounds %struct.tm, %struct.tm* %35, i32 0, i32 4
%37 = load i32, i32* %36
%38 = load %struct.tm*, %struct.tm** %7
%39 = getelementptr inbounds %struct.tm, %struct.tm* %38, i32 0, i32 5
%40 = load i32, i32* %39
%41 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double %25, i32 %28, i32 %31, i32 %34, i32 %37, i32 %40)
%42 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 0
store i32 2, i32* %42
%43 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 1
store i32 21, i32* %43
%44 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 2
store i32 98, i32* %44
%45 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 3
store i32 12, i32* %45
%46 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 4
store i32 0, i32* %46
%47 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 5
store i32 0, i32* %47
%48 = call i32 @mktime(%struct.tm* %8)
store i32 %48, i32* %3
%49 = load i32, i32* @timezone
%50 = sdiv i32 %49, 3600
%51 = load i32, i32* @daylight
%52 = sub nsw i32 %50, %51
%53 = sub nsw i32 0, %52
%54 = sext i32 %53 to i64
store i64 %54, i64* %9
%55 = load i32, i32* @timezone
%56 = sitofp i32 %55 to double
%57 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %56)
%58 = load i32, i32* @daylight
%59 = sitofp i32 %58 to double
%60 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), double %59)
%61 = load i64, i64* %9
%62 = sitofp i64 %61 to double
%63 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), double %62)
%64 = load i32, i32* %3
%65 = load i32, i32* @timezone
%66 = sub nsw i32 %64, %65
%67 = load i32, i32* @daylight
%68 = mul nsw i32 %67, 3600
%69 = add nsw i32 %66, %68
store i32 %69, i32* %4
%70 = load i32, i32* %3
%71 = sitofp i32 %70 to double
%72 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), double %71)
%73 = load i32, i32* %4
%74 = sitofp i32 %73 to double
%75 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), double %74)
store i32 0, i32* %16
br label %76
76: ; preds = %157, %0
%77 = load i32, i32* %16
%78 = icmp slt i32 %77, 12
br i1 %78, label %79, label %160
79: ; preds = %76
%80 = load i32, i32* %16
%81 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 0
store i32 %80, i32* %81
%82 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 1
store i32 21, i32* %82
%83 = load %struct.tm*, %struct.tm** %7
%84 = getelementptr inbounds %struct.tm, %struct.tm* %83, i32 0, i32 2
%85 = load i32, i32* %84
%86 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 2
store i32 %85, i32* %86
%87 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 3
store i32 12, i32* %87
%88 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 4
store i32 0, i32* %88
%89 = getelementptr inbounds %struct.tm, %struct.tm* %8, i32 0, i32 5
store i32 0, i32* %89
%90 = call i32 @mktime(%struct.tm* %8)
store i32 %90, i32* %5
%91 = load i32, i32* @timezone
%92 = sdiv i32 %91, 3600
%93 = load i32, i32* @daylight
%94 = sub nsw i32 %92, %93
%95 = sub nsw i32 0, %94
%96 = sext i32 %95 to i64
store i64 %96, i64* %9
%97 = load i32, i32* @timezone
%98 = sitofp i32 %97 to double
%99 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %98)
%100 = load i32, i32* @daylight
%101 = sitofp i32 %100 to double
%102 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), double %101)
%103 = load i64, i64* %9
%104 = sitofp i64 %103 to double
%105 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), double %104)
%106 = load i32, i32* %5
%107 = load i32, i32* @timezone
%108 = sub nsw i32 %106, %107
%109 = load i32, i32* @daylight
%110 = mul nsw i32 %109, 3600
%111 = add nsw i32 %108, %110
store i32 %111, i32* %6
%112 = load i32, i32* %16
%113 = add nsw i32 %112, 1
%114 = sitofp i32 %113 to double
%115 = load i32, i32* %5
%116 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), double %114, i32 21, i32 97, i32 %115)
%117 = load i32, i32* %16
%118 = add nsw i32 %117, 1
%119 = sitofp i32 %118 to double
%120 = load i32, i32* %6
%121 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), double %119, i32 21, i32 97, i32 %120)
%122 = load i32, i32* %6
%123 = load i32, i32* %4
%124 = sub nsw i32 %122, %123
%125 = sitofp i32 %124 to double
%126 = fdiv double %125, 8.640000e+04
store double %126, double* %10
%127 = load %struct.tm*, %struct.tm** %7
%128 = getelementptr inbounds %struct.tm, %struct.tm* %127, i32 0, i32 2
%129 = load i32, i32* %128
%130 = sitofp i32 %129 to double
%131 = load double, double* %10
%132 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0), double %130, double %131)
%133 = load double, double* %10
%134 = call double @fmod(double %133, double 1.000000e+00)
store double %134, double* %11
%135 = load double, double* %10
%136 = load double, double* %11
%137 = fsub double %135, %136
store double %137, double* %12
store double 1.200000e+01, double* %13
store double -1.120000e+02, double* %14
%138 = load double, double* %12
%139 = load double, double* %14
%140 = fadd double %138, %139
%141 = fdiv double %140, 1.500000e+01
%142 = load double, double* %13
%143 = fadd double %141, %142
%144 = fsub double %143, 1.200000e+01
store double %144, double* %15
br label %145
145: ; preds = %148, %79
%146 = load double, double* %15
%147 = fcmp olt double %146, 0.000000e+00
br i1 %147, label %148, label %151
148: ; preds = %145
%149 = load double, double* %15
%150 = fadd double %149, 2.400000e+01
store double %150, double* %15
br label %145
151: ; preds = %145
%152 = load double, double* %12
%153 = load double, double* %13
%154 = load double, double* %14
%155 = load double, double* %15
%156 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.10, i64 0, i64 0), double %152, double %153, double %154, double %155)
br label %157
157: ; preds = %151
%158 = load i32, i32* %16
%159 = add nsw i32 %158, 1
store i32 %159, i32* %16
br label %76
160: ; preds = %76
ret i32 0
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32, i32, i32, i32 }
@.str = [12 x i8] c"Time = %ld\0A\00"
@.str.1 = [30 x i8] c"GMT = %d/%d/%2d %d:%02d:%02d\0A\00"
@timezone = global i32 0
@daylight = global i32 0
@.str.2 = [28 x i8] c"Raw time zone offset = %ld\0A\00"
@.str.3 = [23 x i8] c"Daylight Savings = %d\0A\00"
@.str.4 = [27 x i8] c"Local hours from GMT = %d\0A\00"
@.str.5 = [27 x i8] c"March 21 noon (CST) = %ld\0A\00"
@.str.6 = [27 x i8] c"March 21 noon (GMT) = %ld\0A\00"
@.str.7 = [27 x i8] c"%d/%d/%d noon (CST) = %ld\0A\00"
@.str.8 = [27 x i8] c"%d/%d/%d noon (GMT) = %ld\0A\00"
@.str.9 = [32 x i8] c"Time since 3/21/%2d GMT = %.2f\0A\00"
@.str.10 = [51 x i8] c"days = %.1f hours = %.2f lon = %.2f lst = %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.tm
%3 = bitcast i32* %1 to i8*
%4 = bitcast %struct.tm* %2 to i8*
%5 = tail call i32 @time(i32* null)
store i32 %5, i32* %1
%6 = sitofp i32 %5 to double
%7 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double %6)
%8 = call %struct.tm* @gmtime(i32* %1)
%9 = getelementptr inbounds %struct.tm, %struct.tm* %8, i64 0, i32 0
%10 = load i32, i32* %9
%11 = sitofp i32 %10 to double
%12 = getelementptr inbounds %struct.tm, %struct.tm* %8, i64 0, i32 1
%13 = load i32, i32* %12
%14 = getelementptr inbounds %struct.tm, %struct.tm* %8, i64 0, i32 2
%15 = load i32, i32* %14
%16 = getelementptr inbounds %struct.tm, %struct.tm* %8, i64 0, i32 3
%17 = load i32, i32* %16
%18 = getelementptr inbounds %struct.tm, %struct.tm* %8, i64 0, i32 4
%19 = load i32, i32* %18
%20 = getelementptr inbounds %struct.tm, %struct.tm* %8, i64 0, i32 5
%21 = load i32, i32* %20
%22 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), double %11, i32 %13, i32 %15, i32 %17, i32 %19, i32 %21)
%23 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 0
%24 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 1
%25 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 2
%26 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 3
%27 = bitcast %struct.tm* %2 to <4 x i32>*
store <4 x i32> <i32 2, i32 21, i32 98, i32 12>, <4 x i32>* %27
%28 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 4
store i32 0, i32* %28
%29 = getelementptr inbounds %struct.tm, %struct.tm* %2, i64 0, i32 5
store i32 0, i32* %29
%30 = call i32 @mktime(%struct.tm* %2)
%31 = load i32, i32* @timezone
%32 = sdiv i32 %31, -3600
%33 = load i32, i32* @daylight
%34 = add i32 %32, %33
%35 = sitofp i32 %31 to double
%36 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %35)
%37 = load i32, i32* @daylight
%38 = sitofp i32 %37 to double
%39 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), double %38)
%40 = sitofp i32 %34 to double
%41 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), double %40)
%42 = load i32, i32* @timezone
%43 = sub nsw i32 %30, %42
%44 = load i32, i32* @daylight
%45 = mul nsw i32 %44, 3600
%46 = add nsw i32 %45, %43
%47 = sitofp i32 %30 to double
%48 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), double %47)
%49 = sitofp i32 %46 to double
%50 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), double %49)
br label %51
51: ; preds = %0, %92
%52 = phi i32 [ 0, %0 ], [ %71, %92 ]
store i32 %52, i32* %23
store i32 21, i32* %24
%53 = load i32, i32* %14
store i32 %53, i32* %25
store i32 12, i32* %26
store i32 0, i32* %28
store i32 0, i32* %29
%54 = call i32 @mktime(%struct.tm* %2)
%55 = load i32, i32* @timezone
%56 = sdiv i32 %55, -3600
%57 = load i32, i32* @daylight
%58 = add i32 %56, %57
%59 = sitofp i32 %55 to double
%60 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %59)
%61 = load i32, i32* @daylight
%62 = sitofp i32 %61 to double
%63 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), double %62)
%64 = sitofp i32 %58 to double
%65 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), double %64)
%66 = load i32, i32* @timezone
%67 = sub nsw i32 %54, %66
%68 = load i32, i32* @daylight
%69 = mul nsw i32 %68, 3600
%70 = add nsw i32 %69, %67
%71 = add nuw nsw i32 %52, 1
%72 = sitofp i32 %71 to double
%73 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), double %72, i32 21, i32 97, i32 %54)
%74 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), double %72, i32 21, i32 97, i32 %70)
%75 = sub nsw i32 %70, %46
%76 = sitofp i32 %75 to double
%77 = fdiv double %76, 8.640000e+04
%78 = load i32, i32* %14
%79 = sitofp i32 %78 to double
%80 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.9, i64 0, i64 0), double %79, double %77)
%81 = call double @fmod(double %77, double 1.000000e+00)
%82 = fsub double %77, %81
%83 = fadd double %82, -1.120000e+02
%84 = fdiv double %83, 1.500000e+01
%85 = fadd double %84, 1.200000e+01
%86 = fadd double %85, -1.200000e+01
%87 = fcmp olt double %86, 0.000000e+00
br i1 %87, label %88, label %92
88: ; preds = %51, %88
%89 = phi double [ %90, %88 ], [ %86, %51 ]
%90 = fadd double %89, 2.400000e+01
%91 = fcmp olt double %90, 0.000000e+00
br i1 %91, label %88, label %92
92: ; preds = %88, %51
%93 = phi double [ %86, %51 ], [ %90, %88 ]
%94 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.10, i64 0, i64 0), double %82, double 1.200000e+01, double -1.120000e+02, double %93)
%95 = icmp eq i32 %71, 12
br i1 %95, label %96, label %51
96: ; preds = %92
ret i32 0
}