#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 computeMetastableCoolingRate(int, int, double const *, int const *,
                                    int const *, double const *, double const *,
                                    double const *, double *, double const,
                                    double const, double const, double const);
double metastable_cooling_SiI(const double densThis, const double Hdens,
                              const double elecDens, const double T) {
  const double weights[3 + 1] = {0.0, 1.0, 5.0, 9.0};
  const int lower[3 + 1] = {0, 2, 1, 1};
  const int upper[3 + 1] = {0, 3, 2, 3};
  const double energy[3 + 1] = {0.0, 9.1e3, 1.3e4, 2.2e4};
  const double EinsA[3 + 1] = {0.0, 3.6e-2, 0.8, 3.7e-2};
  const double elec_a[3 + 1] = {0.0, 6.2e-8, 2.8e-8, 3e-8};
  double elec_b[3 + 1];
  if (T < 1e4) {
    elec_b[1] = 0.57;
    elec_b[2] = 0.57;
    elec_b[3] = 0.57;
  }
  if (T >= 1e4) {
    elec_b[1] = -0.13;
    elec_b[2] = 0.0;
    elec_b[3] = 0.0;
  }
  return computeMetastableCoolingRate(3, 3, weights, lower, upper, energy,
                                      EinsA, elec_a, elec_b, densThis, Hdens,
                                      elecDens, T);
}


x86 assembly (clang, -O0):
<metastable_cooling_SiI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    0xeea(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xee7(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xee4(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xee1(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xf3e(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xf3b(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xf38(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xf35(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xeb2(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xeaf(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xeac(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xea9(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xea6(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xea0(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    0xe9a(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xe94(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xe8e(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0xe88(%rip),%rax
mov    %rax,-0xb8(%rbp)
mov    0xe82(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0xe7c(%rip),%rax
mov    %rax,-0xa8(%rbp)
movsd  0xdd5(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1266 <metastable_cooling_SiI+0x156>
movsd  0xdca(%rip),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  0xdba(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0xdaa(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  0xd8d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     12a3 <metastable_cooling_SiI+0x193>
movsd  0xd8b(%rip),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
lea    -0x40(%rbp),%rdx
lea    -0x50(%rbp),%rcx
lea    -0x60(%rbp),%r8
lea    -0x80(%rbp),%r9
lea    -0xa0(%rbp),%r11
lea    -0xc0(%rbp),%r10
lea    -0xe0(%rbp),%rax
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
mov    $0x3,%esi
mov    %esi,%edi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <computeMetastableCoolingRate@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<metastable_cooling_SiI>:
sub    $0xc8,%rsp
movaps 0xf32(%rip),%xmm4
movaps %xmm4,0xb0(%rsp)
movaps 0xf13(%rip),%xmm4
movaps %xmm4,0xa0(%rsp)
movaps 0xee4(%rip),%xmm4
movaps %xmm4,0x30(%rsp)
movaps 0xee8(%rip),%xmm4
movaps %xmm4,0x20(%rsp)
movaps 0xf1c(%rip),%xmm4
movaps %xmm4,0x90(%rsp)
movaps 0xefd(%rip),%xmm4
movaps %xmm4,0x80(%rsp)
movaps 0xf1e(%rip),%xmm4
movaps %xmm4,0x70(%rsp)
movaps 0xf02(%rip),%xmm4
movaps %xmm4,0x60(%rsp)
movaps 0xf26(%rip),%xmm4
movaps %xmm4,0x50(%rsp)
movaps 0xf0a(%rip),%xmm4
movaps %xmm4,0x40(%rsp)
movsd  0xe5d(%rip),%xmm4
ucomisd %xmm3,%xmm4
jbe    11c6 <metastable_cooling_SiI+0xb6>
movapd 0xe5f(%rip),%xmm4
movupd %xmm4,0x8(%rsp)
movabs $0x3fe23d70a3d70a3d,%rax
3d e2 3f
mov    %rax,0x18(%rsp)
ucomisd 0xe32(%rip),%xmm3
jb     11e9 <metastable_cooling_SiI+0xd9>
movabs $0xbfc0a3d70a3d70a4,%rax
a3 c0 bf
mov    %rax,0x8(%rsp)
xorpd  %xmm4,%xmm4
movapd %xmm4,0x10(%rsp)
sub    $0x8,%rsp
lea    0x8(%rsp),%rax
lea    0x48(%rsp),%r10
lea    0x68(%rsp),%r11
lea    0xa8(%rsp),%rdx
lea    0x38(%rsp),%rcx
lea    0x28(%rsp),%r8
lea    0x88(%rsp),%r9
mov    $0x3,%edi
mov    $0x3,%esi
push   %rax
push   %r10
push   %r11
call   1030 <computeMetastableCoolingRate@plt>
add    $0xe8,%rsp
ret

LLVM IR (-O0):
@__const.metastable_cooling_SiI.weights = [4 x double] [double 0.000000e+00, double 1.000000e+00, double 5.000000e+00, double 9.000000e+00]
@__const.metastable_cooling_SiI.lower = [4 x i32] [i32 0, i32 2, i32 1, i32 1]
@__const.metastable_cooling_SiI.upper = [4 x i32] [i32 0, i32 3, i32 2, i32 3]
@__const.metastable_cooling_SiI.energy = [4 x double] [double 0.000000e+00, double 9.100000e+03, double 1.300000e+04, double 2.200000e+04]
@__const.metastable_cooling_SiI.EinsA = [4 x double] [double 0.000000e+00, double 3.600000e-02, double 8.000000e-01, double 3.700000e-02]
@__const.metastable_cooling_SiI.elec_a = [4 x double] [double 0.000000e+00, double 6.200000e-08, double 2.800000e-08, double 3.000000e-08]
define double @metastable_cooling_SiI(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca [4 x double]
%10 = alloca [4 x i32]
%11 = alloca [4 x i32]
%12 = alloca [4 x double]
%13 = alloca [4 x double]
%14 = alloca [4 x double]
%15 = alloca [4 x double]
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%16 = bitcast [4 x double]* %9 to i8*
%17 = bitcast [4 x i32]* %10 to i8*
%18 = bitcast [4 x i32]* %11 to i8*
%19 = bitcast [4 x double]* %12 to i8*
%20 = bitcast [4 x double]* %13 to i8*
%21 = bitcast [4 x double]* %14 to i8*
%22 = load double, double* %8
%23 = fcmp olt double %22, 1.000000e+04
br i1 %23, label %24, label %28
24: ; preds = %4
%25 = getelementptr inbounds [4 x double], [4 x double]* %15, i64 0, i64 1
store double 5.700000e-01, double* %25
%26 = getelementptr inbounds [4 x double], [4 x double]* %15, i64 0, i64 2
store double 5.700000e-01, double* %26
%27 = getelementptr inbounds [4 x double], [4 x double]* %15, i64 0, i64 3
store double 5.700000e-01, double* %27
br label %28
28: ; preds = %24, %4
%29 = load double, double* %8
%30 = fcmp oge double %29, 1.000000e+04
br i1 %30, label %31, label %35
31: ; preds = %28
%32 = getelementptr inbounds [4 x double], [4 x double]* %15, i64 0, i64 1
store double -1.300000e-01, double* %32
%33 = getelementptr inbounds [4 x double], [4 x double]* %15, i64 0, i64 2
store double 0.000000e+00, double* %33
%34 = getelementptr inbounds [4 x double], [4 x double]* %15, i64 0, i64 3
store double 0.000000e+00, double* %34
br label %35
35: ; preds = %31, %28
%36 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 0
%37 = getelementptr inbounds [4 x i32], [4 x i32]* %10, i64 0, i64 0
%38 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 0
%39 = getelementptr inbounds [4 x double], [4 x double]* %12, i64 0, i64 0
%40 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 0
%41 = getelementptr inbounds [4 x double], [4 x double]* %14, i64 0, i64 0
%42 = getelementptr inbounds [4 x double], [4 x double]* %15, i64 0, i64 0
%43 = load double, double* %5
%44 = load double, double* %6
%45 = load double, double* %7
%46 = load double, double* %8
%47 = call double @computeMetastableCoolingRate(i32 3, i32 3, double* %36, i32* %37, i32* %38, double* %39, double* %40, double* %41, double* %42, double %43, double %44, double %45, double %46)
ret double %47
}

LLVM IR (-O2):
@__const.metastable_cooling_SiI.weights = [4 x double] [double 0.000000e+00, double 1.000000e+00, double 5.000000e+00, double 9.000000e+00]
@__const.metastable_cooling_SiI.lower = [4 x i32] [i32 0, i32 2, i32 1, i32 1]
@__const.metastable_cooling_SiI.upper = [4 x i32] [i32 0, i32 3, i32 2, i32 3]
@__const.metastable_cooling_SiI.energy = [4 x double] [double 0.000000e+00, double 9.100000e+03, double 1.300000e+04, double 2.200000e+04]
@__const.metastable_cooling_SiI.EinsA = [4 x double] [double 0.000000e+00, double 3.600000e-02, double 8.000000e-01, double 3.700000e-02]
@__const.metastable_cooling_SiI.elec_a = [4 x double] [double 0.000000e+00, double 6.200000e-08, double 2.800000e-08, double 3.000000e-08]
define double @metastable_cooling_SiI(double %0, double %1, double %2, double %3) {
%5 = alloca [4 x double]
%6 = alloca [4 x i32]
%7 = alloca [4 x i32]
%8 = alloca [4 x double]
%9 = alloca [4 x double]
%10 = alloca [4 x double]
%11 = alloca [4 x double]
%12 = bitcast [4 x double]* %5 to i8*
%13 = bitcast [4 x i32]* %6 to i8*
%14 = bitcast [4 x i32]* %7 to i8*
%15 = bitcast [4 x double]* %8 to i8*
%16 = bitcast [4 x double]* %9 to i8*
%17 = bitcast [4 x double]* %10 to i8*
%18 = bitcast [4 x double]* %11 to i8*
%19 = fcmp olt double %3, 1.000000e+04
br i1 %19, label %20, label %24
20: ; preds = %4
%21 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 1
%22 = bitcast double* %21 to <2 x double>*
store <2 x double> <double 5.700000e-01, double 5.700000e-01>, <2 x double>* %22
%23 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 3
store double 5.700000e-01, double* %23
br label %24
24: ; preds = %20, %4
%25 = fcmp ult double %3, 1.000000e+04
br i1 %25, label %30, label %26
26: ; preds = %24
%27 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 1
store double -1.300000e-01, double* %27
%28 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 2
%29 = bitcast double* %28 to i8*
br label %30
30: ; preds = %26, %24
%31 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%32 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%33 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 0
%34 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 0
%35 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 0
%36 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
%37 = getelementptr inbounds [4 x double], [4 x double]* %11, i64 0, i64 0
%38 = call double @computeMetastableCoolingRate(i32 3, i32 3, double* %31, i32* %32, i32* %33, double* %34, double* %35, double* %36, double* %37, double %0, double %1, double %2, double %3)
ret double %38
}