#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 utsname {
  char *nodename;
};
struct tms {
  scalar_t__ tms_cstime;
  scalar_t__ tms_stime;
  scalar_t__ tms_cutime;
  scalar_t__ tms_utime;
};
struct tm {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ W_OK;
int /*<<< orphan*/ _SC_CLK_TCK;
scalar_t__ access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
char *getenv(char *);
char *getlogin();
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ snprintf(char *, int, char *, char const *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
char *strrchr(char const *, char);
int sysconf(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ times(struct tms *);
int /*<<< orphan*/ uname(struct utsname *);
void add_to_log(const char *my_name, double elapsed) {
  char time_string[512];
  char log_string[512];
  double u_time, s_time;
  struct utsname sys_info;
  int minutes;
  double seconds;
  char *access_dir = NULL;
  if (getenv("SEACAS_NO_LOGGING") != NULL) {
    fprintf(stderr,
            "SEACAS Audit logging disabled via SEACAS_NO_LOGGING setting.\n");
    return;
  }
  access_dir = getenv("ACCESS");
  if (access_dir != NULL) {
    char filename[512];
    snprintf(filename, 512, "%s/etc/audit.log", access_dir);
    if (0 == access(filename, W_OK)) {
      FILE *audit = fopen(filename, "a");
      if (audit != NULL) {
        const char *codename = strrchr(my_name, '/');
        const char *username = getlogin();
        if (username == NULL) {
          username = getenv("LOGNAME");
        }
        if (username == NULL) {
          username = "UNKNOWN";
        }
        if (codename == NULL) {
          codename = my_name;
        } else {
          codename++;
        }
        {
          time_t calendar_time = time(NULL);
          struct tm *local_time = localtime(&calendar_time);
          strftime(time_string, 512, "%a %b %d %H:%M:%S %Z %Y", local_time);
        }
        {
          int ticks_per_second;
          struct tms time_buf;
          times(&time_buf);
          ticks_per_second = sysconf(_SC_CLK_TCK);
          u_time = (double)(time_buf.tms_utime + time_buf.tms_cutime) /
                   ticks_per_second;
          s_time = (double)(time_buf.tms_stime + time_buf.tms_cstime) /
                   ticks_per_second;
        }
        uname(&sys_info);
        minutes = (int)(elapsed / 60.0);
        seconds = elapsed - minutes * 60.0;
        snprintf(log_string, 512,
                 "%s %s %s %.3fu %.3fs %d:%5.2f 0.0%% 0+0k 0+0io 0pf+0w %s\n",
                 codename, username, time_string, u_time, s_time, minutes,
                 seconds, sys_info.nodename);
        fprintf(audit, "%s", log_string);
        fclose(audit);
      }
    }
  }
}


x86 assembly (clang, -O0):
<add_to_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x6a0,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movq   $0x0,-0x440(%rbp)
lea    0xe02(%rip),%rdi
call   1030 <getenv@plt>
cmp    $0x0,%rax
je     1232 <add_to_log+0x52>
mov    0x2db4(%rip),%rax
movslq (%rax),%rdi
lea    0xdf4(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    14f1 <add_to_log+0x311>
lea    0xe1f(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x440(%rbp)
cmpq   $0x0,-0x440(%rbp)
je     14f1 <add_to_log+0x311>
lea    -0x640(%rbp),%rdi
mov    -0x440(%rbp),%rcx
mov    $0x200,%esi
lea    0xdf2(%rip),%rdx
mov    $0x0,%al
call   1060 <snprintf@plt>
lea    -0x640(%rbp),%rdi
mov    0x2d66(%rip),%rax
mov    (%rax),%esi
call   10e0 <access@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    14ec <add_to_log+0x30c>
lea    -0x640(%rbp),%rdi
lea    0xdcb(%rip),%rsi
call   10f0 <fopen@plt>
mov    %rax,-0x648(%rbp)
cmpq   $0x0,-0x648(%rbp)
je     14e7 <add_to_log+0x307>
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
mov    %rax,-0x650(%rbp)
mov    $0x0,%al
call   10b0 <getlogin@plt>
mov    %rax,-0x658(%rbp)
cmpq   $0x0,-0x658(%rbp)
jne    1303 <add_to_log+0x123>
lea    0xd7b(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x658(%rbp)
cmpq   $0x0,-0x658(%rbp)
jne    131f <add_to_log+0x13f>
lea    0xd62(%rip),%rax
mov    %rax,-0x658(%rbp)
cmpq   $0x0,-0x650(%rbp)
jne    133d <add_to_log+0x15d>
mov    -0x8(%rbp),%rax
mov    %rax,-0x650(%rbp)
jmp    134f <add_to_log+0x16f>
mov    -0x650(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x650(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10a0 <time@plt>
mov    %eax,-0x65c(%rbp)
lea    -0x65c(%rbp),%rdi
call   1040 <localtime@plt>
mov    %rax,-0x668(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x668(%rbp),%rcx
mov    $0x200,%esi
lea    0xcf7(%rip),%rdx
call   10c0 <strftime@plt>
lea    -0x690(%rbp),%rdi
call   10d0 <times@plt>
mov    0x2c35(%rip),%rax
mov    (%rax),%edi
call   1100 <sysconf@plt>
mov    %eax,-0x66c(%rbp)
mov    -0x678(%rbp),%rax
add    -0x680(%rbp),%rax
cvtsi2sd %rax,%xmm0
cvtsi2sdl -0x66c(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x418(%rbp)
ff
mov    -0x688(%rbp),%rax
add    -0x690(%rbp),%rax
cvtsi2sd %rax,%xmm0
cvtsi2sdl -0x66c(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x420(%rbp)
ff
lea    -0x428(%rbp),%rdi
call   1080 <uname@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xbe9(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x42c(%rbp)
movsd  -0x10(%rbp),%xmm1
cvtsi2sdl -0x42c(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xbaf(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x438(%rbp)
ff
lea    -0x410(%rbp),%rdi
mov    -0x650(%rbp),%rcx
mov    -0x658(%rbp),%r8
lea    -0x210(%rbp),%r9
movsd  -0x418(%rbp),%xmm0
ff
movsd  -0x420(%rbp),%xmm1
ff
mov    -0x42c(%rbp),%r10d
movsd  -0x438(%rbp),%xmm2
ff
mov    -0x428(%rbp),%rax
mov    $0x200,%esi
lea    0xbeb(%rip),%rdx
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x3,%al
call   1060 <snprintf@plt>
mov    -0x648(%rbp),%rdi
lea    -0x410(%rbp),%rdx
lea    0xc00(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x648(%rbp),%rdi
call   1050 <fclose@plt>
jmp    14ec <add_to_log+0x30c>
jmp    14f1 <add_to_log+0x311>
add    $0x6a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_to_log>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x628,%rsp
movsd  %xmm0,0x10(%rsp)
mov    %rdi,%rbp
lea    0xdf7(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     124c <add_to_log+0x5c>
mov    0x2dae(%rip),%rax
movslq (%rax),%rcx
lea    0xdee(%rip),%rdi
mov    $0x3d,%esi
mov    $0x1,%edx
add    $0x628,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1110 <fwrite@plt>
lea    0xe05(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1400 <add_to_log+0x210>
lea    0xdf7(%rip),%rdx
lea    0x220(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x200,%esi
mov    %rax,%rcx
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    0x2d5f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10e0 <access@plt>
test   %rax,%rax
jne    1400 <add_to_log+0x210>
lea    0xdcd(%rip),%rsi
lea    0x220(%rsp),%rdi
call   10f0 <fopen@plt>
test   %rax,%rax
je     1400 <add_to_log+0x210>
mov    %rax,%r14
mov    %rbp,%rdi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
mov    %rax,%r13
xor    %eax,%eax
call   10b0 <getlogin@plt>
test   %rax,%rax
jne    12e4 <add_to_log+0xf4>
lea    0xd93(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xd8c(%rip),%r15
cmovne %rax,%r15
lea    0x1(%r13),%r12
test   %r13,%r13
cmove  %rbp,%r12
xor    %edi,%edi
call   10a0 <time@plt>
mov    %eax,0x20(%rsp)
lea    0x20(%rsp),%rdi
call   1040 <localtime@plt>
lea    0xd69(%rip),%rdx
lea    0x420(%rsp),%r13
mov    %r13,%rdi
mov    $0x200,%esi
mov    %rax,%rcx
call   10c0 <strftime@plt>
lea    0x20(%rsp),%rdi
call   10d0 <times@plt>
mov    0x2c96(%rip),%rax
mov    (%rax),%edi
call   1100 <sysconf@plt>
mov    0x20(%rsp),%rcx
mov    0x30(%rsp),%rdx
add    0x38(%rsp),%rdx
cvtsi2sd %rdx,%xmm1
cvtsi2sd %eax,%xmm0
add    0x28(%rsp),%rcx
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sd %rcx,%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
lea    0x18(%rsp),%rdi
call   1080 <uname@plt>
movsd  0xc6d(%rip),%xmm0
movsd  0x10(%rsp),%xmm2
movapd %xmm2,%xmm1
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%ebx
cvttpd2dq %xmm1,%xmm1
cvtdq2pd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm1,%xmm2
lea    0xcde(%rip),%rdx
lea    0x20(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x200,%esi
mov    %r12,%rcx
mov    %r15,%r8
mov    %r13,%r9
movsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
mov    $0x3,%al
push   0x18(%rsp)
push   %rbx
call   1060 <snprintf@plt>
add    $0x10,%rsp
mov    %rbp,%rdi
mov    %r14,%rsi
call   1090 <fputs@plt>
mov    %r14,%rdi
call   1050 <fclose@plt>
add    $0x628,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.utsname = type { i8* }
%struct.tm = type { i32 }
%struct.tms = type { i64, i64, i64, i64 }
@.str = [18 x i8] c"SEACAS_NO_LOGGING\00"
@stderr = global i32 0
@.str.1 = [62 x i8] c"SEACAS Audit logging disabled via SEACAS_NO_LOGGING setting.\0A\00"
@.str.2 = [7 x i8] c"ACCESS\00"
@.str.3 = [17 x i8] c"%s/etc/audit.log\00"
@W_OK = global i32 0
@.str.4 = [2 x i8] c"a\00"
@.str.5 = [8 x i8] c"LOGNAME\00"
@.str.6 = [8 x i8] c"UNKNOWN\00"
@.str.7 = [24 x i8] c"%a %b %d %H:%M:%S %Z %Y\00"
@_SC_CLK_TCK = global i32 0
@.str.8 = [58 x i8] c"%s %s %s %.3fu %.3fs %d:%5.2f 0.0%% 0+0k 0+0io 0pf+0w %s\0A\00"
@.str.9 = [3 x i8] c"%s\00"
define void @add_to_log(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
%5 = alloca [512 x i8]
%6 = alloca [512 x i8]
%7 = alloca double
%8 = alloca double
%9 = alloca %struct.utsname
%10 = alloca i32
%11 = alloca double
%12 = alloca i8*
%13 = alloca [512 x i8]
%14 = alloca i32*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i32
%18 = alloca %struct.tm*
%19 = alloca i32
%20 = alloca %struct.tms
store i8* %0, i8** %3
store double %1, double* %4
store i8* null, i8** %12
%21 = call i8* @getenv(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%22 = icmp ne i8* %21, null
br i1 %22, label %23, label %28
23: ; preds = %2
%24 = load i32, i32* @stderr
%25 = sext i32 %24 to i64
%26 = inttoptr i64 %25 to i32*
%27 = call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
br label %119
28: ; preds = %2
%29 = call i8* @getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
store i8* %29, i8** %12
%30 = load i8*, i8** %12
%31 = icmp ne i8* %30, null
br i1 %31, label %32, label %119
32: ; preds = %28
%33 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%34 = load i8*, i8** %12
%35 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %33, i32 512, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8* %34)
%36 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%37 = load i32, i32* @W_OK
%38 = call i64 @access(i8* %36, i32 %37)
%39 = icmp eq i64 0, %38
br i1 %39, label %40, label %118
40: ; preds = %32
%41 = getelementptr inbounds [512 x i8], [512 x i8]* %13, i64 0, i64 0
%42 = call i32* @fopen(i8* %41, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %42, i32** %14
%43 = load i32*, i32** %14
%44 = icmp ne i32* %43, null
br i1 %44, label %45, label %117
45: ; preds = %40
%46 = load i8*, i8** %3
%47 = call i8* @strrchr(i8* %46, i8 signext 47)
store i8* %47, i8** %15
%48 = call i8* (...) @getlogin()
store i8* %48, i8** %16
%49 = load i8*, i8** %16
%50 = icmp eq i8* %49, null
br i1 %50, label %51, label %53
51: ; preds = %45
%52 = call i8* @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
store i8* %52, i8** %16
br label %53
53: ; preds = %51, %45
%54 = load i8*, i8** %16
%55 = icmp eq i8* %54, null
br i1 %55, label %56, label %57
56: ; preds = %53
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8** %16
br label %57
57: ; preds = %56, %53
%58 = load i8*, i8** %15
%59 = icmp eq i8* %58, null
br i1 %59, label %60, label %62
60: ; preds = %57
%61 = load i8*, i8** %3
store i8* %61, i8** %15
br label %65
62: ; preds = %57
%63 = load i8*, i8** %15
%64 = getelementptr inbounds i8, i8* %63, i32 1
store i8* %64, i8** %15
br label %65
65: ; preds = %62, %60
%66 = call i32 @time(i32* null)
store i32 %66, i32* %17
%67 = call %struct.tm* @localtime(i32* %17)
store %struct.tm* %67, %struct.tm** %18
%68 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%69 = load %struct.tm*, %struct.tm** %18
%70 = call i32 @strftime(i8* %68, i32 512, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), %struct.tm* %69)
%71 = call i32 @times(%struct.tms* %20)
%72 = load i32, i32* @_SC_CLK_TCK
%73 = call i32 @sysconf(i32 %72)
store i32 %73, i32* %19
%74 = getelementptr inbounds %struct.tms, %struct.tms* %20, i32 0, i32 3
%75 = load i64, i64* %74
%76 = getelementptr inbounds %struct.tms, %struct.tms* %20, i32 0, i32 2
%77 = load i64, i64* %76
%78 = add nsw i64 %75, %77
%79 = sitofp i64 %78 to double
%80 = load i32, i32* %19
%81 = sitofp i32 %80 to double
%82 = fdiv double %79, %81
store double %82, double* %7
%83 = getelementptr inbounds %struct.tms, %struct.tms* %20, i32 0, i32 1
%84 = load i64, i64* %83
%85 = getelementptr inbounds %struct.tms, %struct.tms* %20, i32 0, i32 0
%86 = load i64, i64* %85
%87 = add nsw i64 %84, %86
%88 = sitofp i64 %87 to double
%89 = load i32, i32* %19
%90 = sitofp i32 %89 to double
%91 = fdiv double %88, %90
store double %91, double* %8
%92 = call i32 @uname(%struct.utsname* %9)
%93 = load double, double* %4
%94 = fdiv double %93, 6.000000e+01
%95 = fptosi double %94 to i32
store i32 %95, i32* %10
%96 = load double, double* %4
%97 = load i32, i32* %10
%98 = sitofp i32 %97 to double
%99 = fneg double %98
%100 = call double @llvm.fmuladd.f64(double %99, double 6.000000e+01, double %96)
store double %100, double* %11
%101 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%102 = load i8*, i8** %15
%103 = load i8*, i8** %16
%104 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%105 = load double, double* %7
%106 = load double, double* %8
%107 = load i32, i32* %10
%108 = load double, double* %11
%109 = getelementptr inbounds %struct.utsname, %struct.utsname* %9, i32 0, i32 0
%110 = load i8*, i8** %109
%111 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %101, i32 512, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0), i8* %102, i8* %103, i8* %104, double %105, double %106, i32 %107, double %108, i8* %110)
%112 = load i32*, i32** %14
%113 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%114 = call i32 (i32*, i8*, ...) @fprintf(i32* %112, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %113)
%115 = load i32*, i32** %14
%116 = call i32 @fclose(i32* %115)
br label %117
117: ; preds = %65, %40
br label %118
118: ; preds = %117, %32
br label %119
119: ; preds = %23, %118, %28
ret void
}

LLVM IR (-O2):
%struct.utsname = type { i8* }
%struct.tms = type { i64, i64, i64, i64 }
%struct.tm = type { i32 }
@.str = [18 x i8] c"SEACAS_NO_LOGGING\00"
@stderr = global i32 0
@.str.1 = [62 x i8] c"SEACAS Audit logging disabled via SEACAS_NO_LOGGING setting.\0A\00"
@.str.2 = [7 x i8] c"ACCESS\00"
@.str.3 = [17 x i8] c"%s/etc/audit.log\00"
@W_OK = global i32 0
@.str.4 = [2 x i8] c"a\00"
@.str.5 = [8 x i8] c"LOGNAME\00"
@.str.6 = [8 x i8] c"UNKNOWN\00"
@.str.7 = [24 x i8] c"%a %b %d %H:%M:%S %Z %Y\00"
@_SC_CLK_TCK = global i32 0
@.str.8 = [58 x i8] c"%s %s %s %.3fu %.3fs %d:%5.2f 0.0%% 0+0k 0+0io 0pf+0w %s\0A\00"
define void @add_to_log(i8* %0, double %1) {
%3 = alloca [512 x i8]
%4 = alloca [512 x i8]
%5 = alloca %struct.utsname
%6 = alloca [512 x i8]
%7 = alloca i32
%8 = alloca %struct.tms
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%11 = bitcast %struct.utsname* %5 to i8*
%12 = tail call i8* @getenv(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i8* %12, null
br i1 %13, label %19, label %14
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
%18 = tail call i64 @fwrite(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0), i64 61, i64 1, i32* %17)
br label %79
19: ; preds = %2
%20 = tail call i8* @getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%21 = icmp eq i8* %20, null
br i1 %21, label %79, label %22
22: ; preds = %19
%23 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%24 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %23, i32 512, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8* %20)
%25 = load i32, i32* @W_OK
%26 = call i64 @access(i8* %23, i32 %25)
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %78
28: ; preds = %22
%29 = call i32* @fopen(i8* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%30 = icmp eq i32* %29, null
br i1 %30, label %78, label %31
31: ; preds = %28
%32 = call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%33 = call i8* (...) @getlogin()
%34 = icmp eq i8* %33, null
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = call i8* @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
br label %37
37: ; preds = %35, %31
%38 = phi i8* [ %36, %35 ], [ %33, %31 ]
%39 = icmp eq i8* %38, null
%40 = select i1 %39, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* %38
%41 = icmp eq i8* %32, null
%42 = getelementptr inbounds i8, i8* %32, i64 1
%43 = select i1 %41, i8* %0, i8* %42
%44 = bitcast i32* %7 to i8*
%45 = call i32 @time(i32* null)
store i32 %45, i32* %7
%46 = call %struct.tm* @localtime(i32* %7)
%47 = call i32 @strftime(i8* %9, i32 512, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), %struct.tm* %46)
%48 = bitcast %struct.tms* %8 to i8*
%49 = call i32 @times(%struct.tms* %8)
%50 = load i32, i32* @_SC_CLK_TCK
%51 = call i32 @sysconf(i32 %50)
%52 = getelementptr inbounds %struct.tms, %struct.tms* %8, i64 0, i32 3
%53 = load i64, i64* %52
%54 = getelementptr inbounds %struct.tms, %struct.tms* %8, i64 0, i32 2
%55 = load i64, i64* %54
%56 = add nsw i64 %55, %53
%57 = sitofp i64 %56 to double
%58 = sitofp i32 %51 to double
%59 = fdiv double %57, %58
%60 = getelementptr inbounds %struct.tms, %struct.tms* %8, i64 0, i32 1
%61 = load i64, i64* %60
%62 = getelementptr inbounds %struct.tms, %struct.tms* %8, i64 0, i32 0
%63 = load i64, i64* %62
%64 = add nsw i64 %63, %61
%65 = sitofp i64 %64 to double
%66 = fdiv double %65, %58
%67 = call i32 @uname(%struct.utsname* %5)
%68 = fdiv double %1, 6.000000e+01
%69 = fptosi double %68 to i32
%70 = sitofp i32 %69 to double
%71 = fneg double %70
%72 = call double @llvm.fmuladd.f64(double %71, double 6.000000e+01, double %1)
%73 = getelementptr inbounds %struct.utsname, %struct.utsname* %5, i64 0, i32 0
%74 = load i8*, i8** %73
%75 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %10, i32 512, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0), i8* %43, i8* %40, i8* %9, double %59, double %66, i32 %69, double %72, i8* %74)
%76 = call i32 @fputs(i8* %10, i32* %29)
%77 = call i32 @fclose(i32* %29)
br label %78
78: ; preds = %28, %37, %22
br label %79
79: ; preds = %19, %78, %14
ret void
}