#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 */
double exp(double);
double log(double);
int globalParameters(double mu, double *globalParam) {
  double tau = log(2.0) / (mu);
  double C = 231.4 * exp(-319.7 * (1.0 / tau)) + 40.0;
  double D = 80.89 * exp(-121.3 * (1.0 / tau)) + 20.0;
  double Vi = 0.9;
  globalParam[0] = C;
  globalParam[1] = D;
  globalParam[2] = Vi;
  return 1;
}


x86 assembly (clang, -O0):
<globalParameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  0xf07(%rip),%xmm0
call   1040 <log@plt>
divsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xed0(%rip),%xmm1
divsd  -0x18(%rbp),%xmm1
movsd  0xedb(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0xeba(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe95(%rip),%xmm1
divsd  -0x18(%rbp),%xmm1
movsd  0xe80(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0xe5f(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe5b(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe3a(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<globalParameters>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
movsd  0xee0(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0xedc(%rip),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  0xed2(%rip),%xmm0
mulsd  %xmm2,%xmm0
call   1030 <exp@plt>
movapd %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  0xebd(%rip),%xmm0
call   1030 <exp@plt>
movapd 0x10(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0xeae(%rip),%xmm1
addpd  0xeb6(%rip),%xmm1
movupd %xmm1,(%rbx)
movabs $0x3feccccccccccccd,%rax
cc ec 3f
mov    %rax,0x10(%rbx)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @globalParameters(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %3
store double* %1, double** %4
%9 = call double @log(double 2.000000e+00)
%10 = load double, double* %3
%11 = fdiv double %9, %10
store double %11, double* %5
%12 = load double, double* %5
%13 = fdiv double 1.000000e+00, %12
%14 = fmul double -3.197000e+02, %13
%15 = call double @exp(double %14)
%16 = call double @llvm.fmuladd.f64(double 2.314000e+02, double %15, double 4.000000e+01)
store double %16, double* %6
%17 = load double, double* %5
%18 = fdiv double 1.000000e+00, %17
%19 = fmul double -1.213000e+02, %18
%20 = call double @exp(double %19)
%21 = call double @llvm.fmuladd.f64(double 8.089000e+01, double %20, double 2.000000e+01)
store double %21, double* %7
store double 9.000000e-01, double* %8
%22 = load double, double* %6
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 0
store double %22, double* %24
%25 = load double, double* %7
%26 = load double*, double** %4
%27 = getelementptr inbounds double, double* %26, i64 1
store double %25, double* %27
%28 = load double, double* %8
%29 = load double*, double** %4
%30 = getelementptr inbounds double, double* %29, i64 2
store double %28, double* %30
ret i32 1
}

LLVM IR (-O2):
define i32 @globalParameters(double %0, double* nocapture writeonly %1) {
%3 = fdiv double 0x3FE62E42FEFA39EF, %0
%4 = fdiv double 1.000000e+00, %3
%5 = fmul double %4, -3.197000e+02
%6 = tail call double @exp(double %5)
%7 = fmul double %4, -1.213000e+02
%8 = tail call double @exp(double %7)
%9 = insertelement <2 x double> poison, double %6, i64 0
%10 = insertelement <2 x double> %9, double %8, i64 1
%11 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %10, <2 x double> <double 2.314000e+02, double 8.089000e+01>, <2 x double> <double 4.000000e+01, double 2.000000e+01>)
%12 = bitcast double* %1 to <2 x double>*
store <2 x double> %11, <2 x double>* %12
%13 = getelementptr inbounds double, double* %1, i64 2
store double 9.000000e-01, double* %13
ret i32 1
}