#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 dummy;
};
typedef int /*<<< orphan*/ c;
typedef int /*<<< orphan*/ b;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, double,
                           double, double);
int /*<<< orphan*/ getloadavg(double *, int);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ setenv(char *, char *, int);
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ unsetenv(char *);
int main(void) {
  char b[34];
  char c[34];
  time_t epochtime;
  struct tm *realtime;
  time_t pdttime;
  struct tm *pdtrealtime;
  double load[3];
  signal(SIGPIPE, SIG_IGN);
  for (;;) {
    getloadavg(load, 3);
    epochtime = time(NULL);
    realtime = localtime(&epochtime);
    strftime(b, sizeof(b), "%H.%M %a %b %d", realtime);
    setenv("TZ", "Australia/Sydney", 1);
    pdttime = time(NULL);
    pdtrealtime = localtime(&pdttime);
    strftime(c, sizeof(c), "SYD %H.%M", pdtrealtime);
    unsetenv("TZ");
    fprintf(stdout, "%s | %s | %.2f %.2f %.2f | xmonad 0.3 \n", b, c, load[0],
            load[1], load[2]);
    fflush(stdout);
    sleep(60);
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e1f(%rip),%rax
mov    (%rax),%edi
mov    0x2e26(%rip),%rax
mov    (%rax),%esi
call   1060 <signal@plt>
lea    -0xa0(%rbp),%rdi
mov    $0x3,%esi
call   1050 <getloadavg@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,-0x64(%rbp)
lea    -0x64(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x70(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x70(%rbp),%rcx
mov    $0x22,%esi
lea    0xdf9(%rip),%rdx
call   10a0 <strftime@plt>
lea    0xdfc(%rip),%rdi
lea    0xdf8(%rip),%rsi
mov    $0x1,%edx
call   1040 <setenv@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,-0x74(%rbp)
lea    -0x74(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x80(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x80(%rbp),%rcx
mov    $0x22,%esi
lea    0xdd2(%rip),%rdx
call   10a0 <strftime@plt>
lea    0xdb2(%rip),%rdi
call   10b0 <unsetenv@plt>
mov    0x2d67(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rdx
lea    -0x60(%rbp),%rcx
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm2
ff
lea    0xd9b(%rip),%rsi
call   1070 <fprintf@plt>
mov    0x2d32(%rip),%rax
mov    (%rax),%edi
call   1090 <fflush@plt>
mov    $0x3c,%edi
call   10c0 <sleep@plt>
jmp    11c9 <main+0x29>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
mov    0x2e27(%rip),%rax
mov    (%rax),%esi
call   1060 <signal@plt>
lea    0x60(%rsp),%r13
lea    0xe3b(%rip),%rbx
lea    0xe48(%rip),%r15
lea    0x30(%rsp),%r12
mov    0x2de9(%rip),%r14
lea    0xe3f(%rip),%rbp
xchg   %ax,%ax
lea    0x10(%rsp),%rdi
mov    $0x3,%esi
call   1050 <getloadavg@plt>
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
mov    %r13,%rdi
mov    $0x22,%esi
lea    0xddd(%rip),%rdx
mov    %rax,%rcx
call   10a0 <strftime@plt>
mov    %rbx,%rdi
lea    0xddd(%rip),%rsi
mov    $0x1,%edx
call   1040 <setenv@plt>
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1030 <localtime@plt>
mov    %r12,%rdi
mov    $0x22,%esi
mov    %r15,%rdx
mov    %rax,%rcx
call   10a0 <strftime@plt>
mov    %rbx,%rdi
call   10b0 <unsetenv@plt>
mov    (%r14),%edi
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
mov    %rbp,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
call   1070 <fprintf@plt>
mov    (%r14),%edi
call   1090 <fflush@plt>
mov    $0x3c,%edi
call   10c0 <sleep@plt>
jmp    11f0 <main+0x50>

LLVM IR (-O0):
%struct.tm = type { i32 }
@SIGPIPE = global i32 0
@SIG_IGN = global i32 0
@.str = [15 x i8] c"%H.%M %a %b %d\00"
@.str.1 = [3 x i8] c"TZ\00"
@.str.2 = [17 x i8] c"Australia/Sydney\00"
@.str.3 = [10 x i8] c"SYD %H.%M\00"
@stdout = global i32 0
@.str.4 = [40 x i8] c"%s | %s | %.2f %.2f %.2f | xmonad 0.3 \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [34 x i8]
%3 = alloca [34 x i8]
%4 = alloca i32
%5 = alloca %struct.tm*
%6 = alloca i32
%7 = alloca %struct.tm*
%8 = alloca [3 x double]
store i32 0, i32* %1
%9 = load i32, i32* @SIGPIPE
%10 = load i32, i32* @SIG_IGN
%11 = call i32 @signal(i32 %9, i32 %10)
br label %12
12: ; preds = %12, %0
%13 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%14 = call i32 @getloadavg(double* %13, i32 3)
%15 = call i32 @time(i32* null)
store i32 %15, i32* %4
%16 = call %struct.tm* @localtime(i32* %4)
store %struct.tm* %16, %struct.tm** %5
%17 = getelementptr inbounds [34 x i8], [34 x i8]* %2, i64 0, i64 0
%18 = load %struct.tm*, %struct.tm** %5
%19 = call i32 @strftime(i8* %17, i32 34, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), %struct.tm* %18)
%20 = call i32 @setenv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 1)
%21 = call i32 @time(i32* null)
store i32 %21, i32* %6
%22 = call %struct.tm* @localtime(i32* %6)
store %struct.tm* %22, %struct.tm** %7
%23 = getelementptr inbounds [34 x i8], [34 x i8]* %3, i64 0, i64 0
%24 = load %struct.tm*, %struct.tm** %7
%25 = call i32 @strftime(i8* %23, i32 34, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), %struct.tm* %24)
%26 = call i32 @unsetenv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%27 = load i32, i32* @stdout
%28 = getelementptr inbounds [34 x i8], [34 x i8]* %2, i64 0, i64 0
%29 = getelementptr inbounds [34 x i8], [34 x i8]* %3, i64 0, i64 0
%30 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%31 = load double, double* %30
%32 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
%33 = load double, double* %32
%34 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 2
%35 = load double, double* %34
%36 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0), i8* %28, i8* %29, double %31, double %33, double %35)
%37 = load i32, i32* @stdout
%38 = call i32 @fflush(i32 %37)
%39 = call i32 @sleep(i32 60)
br label %12
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@SIGPIPE = global i32 0
@SIG_IGN = global i32 0
@.str = [15 x i8] c"%H.%M %a %b %d\00"
@.str.1 = [3 x i8] c"TZ\00"
@.str.2 = [17 x i8] c"Australia/Sydney\00"
@.str.3 = [10 x i8] c"SYD %H.%M\00"
@stdout = global i32 0
@.str.4 = [40 x i8] c"%s | %s | %.2f %.2f %.2f | xmonad 0.3 \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [34 x i8]
%2 = alloca [34 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca [3 x double]
%6 = getelementptr inbounds [34 x i8], [34 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [34 x i8], [34 x i8]* %2, i64 0, i64 0
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast [3 x double]* %5 to i8*
%11 = load i32, i32* @SIGPIPE
%12 = load i32, i32* @SIG_IGN
%13 = tail call i32 @signal(i32 %11, i32 %12)
%14 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 0
%15 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 1
%16 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 2
br label %17
17: ; preds = %17, %0
%18 = call i32 @getloadavg(double* %14, i32 3)
%19 = call i32 @time(i32* null)
store i32 %19, i32* %3
%20 = call %struct.tm* @localtime(i32* %3)
%21 = call i32 @strftime(i8* %6, i32 34, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), %struct.tm* %20)
%22 = call i32 @setenv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 1)
%23 = call i32 @time(i32* null)
store i32 %23, i32* %4
%24 = call %struct.tm* @localtime(i32* %4)
%25 = call i32 @strftime(i8* %7, i32 34, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), %struct.tm* %24)
%26 = call i32 @unsetenv(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%27 = load i32, i32* @stdout
%28 = load double, double* %14
%29 = load double, double* %15
%30 = load double, double* %16
%31 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0), i8* %6, i8* %7, double %28, double %29, double %30)
%32 = load i32, i32* @stdout
%33 = call i32 @fflush(i32 %32)
%34 = call i32 @sleep(i32 60)
br label %17
}