#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 */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct TYPE_4__ {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct rusage {
  TYPE_1__ ru_stime;
  TYPE_2__ ru_utime;
};

/* Variables and functions */
int /*<<< orphan*/ RUSAGE_SELF;
int /*<<< orphan*/ getrusage(int /*<<< orphan*/, struct rusage *);
double iniTimeFari(void) {
  double usertime, systime;
  struct rusage usage;
  double currtime;
  getrusage(RUSAGE_SELF, &usage);
  usertime =
      (double)usage.ru_utime.tv_sec * ((double)1.0) +
      (double)usage.ru_utime.tv_usec / (((double)1000000.0) / ((double)1.0));
  systime =
      (double)usage.ru_stime.tv_sec * ((double)1.0) +
      (double)usage.ru_stime.tv_usec / (((double)1000000.0) / ((double)1.0));
  currtime = usertime;
  return (currtime);
}


x86 assembly (clang, -O0):
<iniTimeFari>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rsi
call   1030 <getrusage@plt>
cvtsi2sdq -0x18(%rbp),%xmm0
cvtsi2sdq -0x20(%rbp),%xmm1
movsd  0xec2(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
cvtsi2sdq -0x28(%rbp),%xmm0
cvtsi2sdq -0x30(%rbp),%xmm1
movsd  0xea1(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iniTimeFari>:
sub    $0x28,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <getrusage@plt>
cvtsi2sdq 0x20(%rsp),%xmm1
cvtsi2sdq 0x18(%rsp),%xmm0
divsd  0xec3(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.rusage = type { %struct.TYPE_3__, %struct.TYPE_4__ }
%struct.TYPE_3__ = type { i64, i64 }
%struct.TYPE_4__ = type { i64, i64 }
@RUSAGE_SELF = global i32 0
define double @iniTimeFari() {
%1 = alloca double
%2 = alloca double
%3 = alloca %struct.rusage
%4 = alloca double
%5 = load i32, i32* @RUSAGE_SELF
%6 = call i32 @getrusage(i32 %5, %struct.rusage* %3)
%7 = getelementptr inbounds %struct.rusage, %struct.rusage* %3, i32 0, i32 1
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 1
%9 = load i64, i64* %8
%10 = sitofp i64 %9 to double
%11 = getelementptr inbounds %struct.rusage, %struct.rusage* %3, i32 0, i32 1
%12 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %11, i32 0, i32 0
%13 = load i64, i64* %12
%14 = sitofp i64 %13 to double
%15 = fdiv double %14, 1.000000e+06
%16 = call double @llvm.fmuladd.f64(double %10, double 1.000000e+00, double %15)
store double %16, double* %1
%17 = getelementptr inbounds %struct.rusage, %struct.rusage* %3, i32 0, i32 0
%18 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %17, i32 0, i32 1
%19 = load i64, i64* %18
%20 = sitofp i64 %19 to double
%21 = getelementptr inbounds %struct.rusage, %struct.rusage* %3, i32 0, i32 0
%22 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %21, i32 0, i32 0
%23 = load i64, i64* %22
%24 = sitofp i64 %23 to double
%25 = fdiv double %24, 1.000000e+06
%26 = call double @llvm.fmuladd.f64(double %20, double 1.000000e+00, double %25)
store double %26, double* %2
%27 = load double, double* %1
store double %27, double* %4
%28 = load double, double* %4
ret double %28
}

LLVM IR (-O2):
%struct.rusage = type { %struct.TYPE_3__, %struct.TYPE_4__ }
%struct.TYPE_3__ = type { i64, i64 }
%struct.TYPE_4__ = type { i64, i64 }
@RUSAGE_SELF = global i32 0
define double @iniTimeFari() {
%1 = alloca %struct.rusage
%2 = bitcast %struct.rusage* %1 to i8*
%3 = load i32, i32* @RUSAGE_SELF
%4 = call i32 @getrusage(i32 %3, %struct.rusage* %1)
%5 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 1, i32 1
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 1, i32 0
%9 = load i64, i64* %8
%10 = sitofp i64 %9 to double
%11 = fdiv double %10, 1.000000e+06
%12 = fadd double %11, %7
ret double %12
}