#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 getCoolingRate(int, int, double const *, int const *, int const *,
                      double const *, double const, double const *, int const,
                      double const, double **, double **, double *,
                      double const *);
double pow(double const, double);
double finestruct_cooling_FeP(const double T, const int slabInd,
                              const double ymolThis, const double elecDens,
                              const double HDens, const double H2Dens,
                              const double *dx, double **popDensFsThis,
                              double **coolingFsThis) {
  const double weights[3 + 1] = {0.0, 10.0, 8.0, 6.0};
  const int lower[3 + 1] = {0, 1, 2, 1};
  const int upper[3 + 1] = {0, 2, 3, 3};
  const double energy[3 + 1] = {0.0, 0e0, 554e0, 961e0};
  const double EinsA[3 + 1] = {0.0, 2.5e-3, 1.6e-3, 1.5e-9};
  const double col_e[3 + 1] = {0.0, 1.8e-6 * pow(T / 100e0, -0.5),
                               8.7e-7 * pow(T / 100e0, -0.5),
                               1.8e-6 * pow(T / 100e0, -0.5)};
  const double col_H2[3 + 1] = {0.0, 9.5e-10, 4.7e-10, 5.7e-10};
  const double col_H[3 + 1] = {0.0, 9.5e-10, 4.7e-10, 5.7e-10};
  int i;
  double CulArr[3 + 1], cool;
  for (i = 1; i <= 3; i++)
    CulArr[i] = elecDens * col_e[i] + HDens * col_H[i] + H2Dens * col_H2[i];
  cool = getCoolingRate(3, 3, weights, lower, upper, energy, T, EinsA, slabInd,
                        ymolThis, popDensFsThis, coolingFsThis, CulArr, dx);
  return cool;
}


x86 assembly (clang, -O0):
<finestruct_cooling_FeP>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0x198,%rsp
movsd  %xmm0,-0x20(%rbp)
mov    %edi,-0x24(%rbp)
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm2,-0x38(%rbp)
movsd  %xmm3,-0x40(%rbp)
movsd  %xmm4,-0x48(%rbp)
mov    %rsi,-0x50(%rbp)
mov    %rdx,-0x58(%rbp)
mov    %rcx,-0x60(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xeb8(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xf15(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xf0f(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xf09(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xf03(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    0xe7d(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0xe77(%rip),%rax
mov    %rax,-0xb8(%rbp)
mov    0xe71(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0xe6b(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0xe65(%rip),%rax
mov    %rax,-0xe0(%rbp)
mov    0xe5f(%rip),%rax
mov    %rax,-0xd8(%rbp)
mov    0xe59(%rip),%rax
mov    %rax,-0xd0(%rbp)
mov    0xe53(%rip),%rax
mov    %rax,-0xc8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  0xdcc(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xdb8(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xda0(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  0xd97(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xd83(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xd83(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  0xd62(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xd4e(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xd36(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
mov    0xda3(%rip),%rax
mov    %rax,-0x120(%rbp)
mov    0xd9d(%rip),%rax
mov    %rax,-0x118(%rbp)
mov    0xd97(%rip),%rax
mov    %rax,-0x110(%rbp)
mov    0xd91(%rip),%rax
mov    %rax,-0x108(%rbp)
mov    0xd6b(%rip),%rax
mov    %rax,-0x140(%rbp)
mov    0xd65(%rip),%rax
mov    %rax,-0x138(%rbp)
mov    0xd5f(%rip),%rax
mov    %rax,-0x130(%rbp)
mov    0xd59(%rip),%rax
mov    %rax,-0x128(%rbp)
movl   $0x1,-0x144(%rbp)
cmpl   $0x3,-0x144(%rbp)
jg     13d0 <finestruct_cooling_FeP+0x2b0>
movsd  -0x38(%rbp),%xmm1
movslq -0x144(%rbp),%rax
movsd  -0x100(%rbp,%rax,8),%xmm2
ff ff
movsd  -0x40(%rbp),%xmm0
movslq -0x144(%rbp),%rax
mulsd  -0x140(%rbp,%rax,8),%xmm0
ff ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
movslq -0x144(%rbp),%rax
movsd  -0x120(%rbp,%rax,8),%xmm2
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x144(%rbp),%rax
movsd  %xmm0,-0x170(%rbp,%rax,8)
ff ff
mov    -0x144(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x144(%rbp)
jmp    1350 <finestruct_cooling_FeP+0x230>
lea    -0x80(%rbp),%rdx
lea    -0x90(%rbp),%rcx
lea    -0xa0(%rbp),%r8
lea    -0xc0(%rbp),%r9
movsd  -0x20(%rbp),%xmm0
lea    -0xe0(%rbp),%r15
mov    -0x24(%rbp),%r14d
movsd  -0x30(%rbp),%xmm1
mov    -0x58(%rbp),%rbx
mov    -0x60(%rbp),%r11
lea    -0x170(%rbp),%r10
mov    -0x50(%rbp),%rax
mov    $0x3,%esi
mov    %esi,%edi
mov    %r15,(%rsp)
mov    %r14d,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   1030 <getCoolingRate@plt>
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0x178(%rbp),%xmm0
ff
add    $0x198,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<finestruct_cooling_FeP>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x100,%rsp
mov    %rcx,%r15
mov    %rdx,%r14
mov    %rsi,%r13
movaps %xmm4,0x50(%rsp)
movaps %xmm3,0x30(%rsp)
movaps %xmm2,0x40(%rsp)
movsd  %xmm1,0x28(%rsp)
mov    %edi,%r12d
movsd  %xmm0,0x20(%rsp)
movaps 0xf12(%rip),%xmm1
movaps %xmm1,0xf0(%rsp)
movaps 0xef3(%rip),%xmm1
movaps %xmm1,0xe0(%rsp)
movaps 0xec4(%rip),%xmm1
movaps %xmm1,0x70(%rsp)
movaps 0xec8(%rip),%xmm1
movaps %xmm1,0x60(%rsp)
movaps 0xefc(%rip),%xmm1
movaps %xmm1,0xd0(%rsp)
movaps 0xedd(%rip),%xmm1
movaps %xmm1,0xc0(%rsp)
movaps 0xefe(%rip),%xmm1
movaps %xmm1,0xb0(%rsp)
movaps 0xedf(%rip),%xmm1
movaps %xmm1,0xa0(%rsp)
divsd  0xe2f(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe29(%rip),%xmm1
call   1040 <pow@plt>
movapd %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0xe10(%rip),%xmm1
call   1040 <pow@plt>
movapd 0x10(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0xe11(%rip),%xmm1
movapd %xmm1,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0xde5(%rip),%xmm1
call   1040 <pow@plt>
mulsd  0xde0(%rip),%xmm0
movapd 0x30(%rsp),%xmm6
movapd %xmm6,%xmm1
unpcklpd %xmm6,%xmm1
movapd 0xdea(%rip),%xmm2
mulpd  %xmm2,%xmm1
movapd 0x40(%rsp),%xmm5
movapd %xmm5,%xmm3
unpcklpd %xmm5,%xmm3
mulpd  0x10(%rsp),%xmm3
addpd  %xmm1,%xmm3
movapd 0x50(%rsp),%xmm4
movapd %xmm4,%xmm1
unpcklpd %xmm4,%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm3,%xmm1
movupd %xmm1,0x88(%rsp)
movsd  0xd8f(%rip),%xmm1
movapd %xmm6,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm5,%xmm0
addsd  %xmm2,%xmm0
movapd %xmm4,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,0x98(%rsp)
lea    0x80(%rsp),%rax
lea    0xa0(%rsp),%rbx
lea    0xe0(%rsp),%rdx
lea    0x70(%rsp),%rcx
lea    0x60(%rsp),%r8
lea    0xc0(%rsp),%r9
mov    $0x3,%edi
mov    $0x3,%esi
movsd  0x20(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
push   %r13
push   %rax
push   %r15
push   %r14
push   %r12
push   %rbx
call   1030 <getCoolingRate@plt>
add    $0x130,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.finestruct_cooling_FeP.weights = [4 x double] [double 0.000000e+00, double 1.000000e+01, double 8.000000e+00, double 6.000000e+00]
@__const.finestruct_cooling_FeP.lower = [4 x i32] [i32 0, i32 1, i32 2, i32 1]
@__const.finestruct_cooling_FeP.upper = [4 x i32] [i32 0, i32 2, i32 3, i32 3]
@__const.finestruct_cooling_FeP.energy = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 5.540000e+02, double 9.610000e+02]
@__const.finestruct_cooling_FeP.EinsA = [4 x double] [double 0.000000e+00, double 2.500000e-03, double 1.600000e-03, double 1.500000e-09]
@__const.finestruct_cooling_FeP.col_H2 = [4 x double] [double 0.000000e+00, double 9.500000e-10, double 4.700000e-10, double 0x3E0395C5E4D01D95]
@__const.finestruct_cooling_FeP.col_H = [4 x double] [double 0.000000e+00, double 9.500000e-10, double 4.700000e-10, double 0x3E0395C5E4D01D95]
define double @finestruct_cooling_FeP(double %0, i32 %1, double %2, double %3, double %4, double %5, double* %6, double** %7, double** %8) {
%10 = alloca double
%11 = alloca i32
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double*
%17 = alloca double**
%18 = alloca double**
%19 = alloca [4 x double]
%20 = alloca [4 x i32]
%21 = alloca [4 x i32]
%22 = alloca [4 x double]
%23 = alloca [4 x double]
%24 = alloca [4 x double]
%25 = alloca [4 x double]
%26 = alloca [4 x double]
%27 = alloca i32
%28 = alloca [4 x double]
%29 = alloca double
store double %0, double* %10
store i32 %1, i32* %11
store double %2, double* %12
store double %3, double* %13
store double %4, double* %14
store double %5, double* %15
store double* %6, double** %16
store double** %7, double*** %17
store double** %8, double*** %18
%30 = bitcast [4 x double]* %19 to i8*
%31 = bitcast [4 x i32]* %20 to i8*
%32 = bitcast [4 x i32]* %21 to i8*
%33 = bitcast [4 x double]* %22 to i8*
%34 = bitcast [4 x double]* %23 to i8*
%35 = getelementptr inbounds [4 x double], [4 x double]* %24, i64 0, i64 0
store double 0.000000e+00, double* %35
%36 = getelementptr inbounds double, double* %35, i64 1
%37 = load double, double* %10
%38 = fdiv double %37, 1.000000e+02
%39 = call double @pow(double %38, double -5.000000e-01)
%40 = fmul double 1.800000e-06, %39
store double %40, double* %36
%41 = getelementptr inbounds double, double* %36, i64 1
%42 = load double, double* %10
%43 = fdiv double %42, 1.000000e+02
%44 = call double @pow(double %43, double -5.000000e-01)
%45 = fmul double 8.700000e-07, %44
store double %45, double* %41
%46 = getelementptr inbounds double, double* %41, i64 1
%47 = load double, double* %10
%48 = fdiv double %47, 1.000000e+02
%49 = call double @pow(double %48, double -5.000000e-01)
%50 = fmul double 1.800000e-06, %49
store double %50, double* %46
%51 = bitcast [4 x double]* %25 to i8*
%52 = bitcast [4 x double]* %26 to i8*
store i32 1, i32* %27
br label %53
53: ; preds = %78, %9
%54 = load i32, i32* %27
%55 = icmp sle i32 %54, 3
br i1 %55, label %56, label %81
56: ; preds = %53
%57 = load double, double* %13
%58 = load i32, i32* %27
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [4 x double], [4 x double]* %24, i64 0, i64 %59
%61 = load double, double* %60
%62 = load double, double* %14
%63 = load i32, i32* %27
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [4 x double], [4 x double]* %26, i64 0, i64 %64
%66 = load double, double* %65
%67 = fmul double %62, %66
%68 = call double @llvm.fmuladd.f64(double %57, double %61, double %67)
%69 = load double, double* %15
%70 = load i32, i32* %27
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [4 x double], [4 x double]* %25, i64 0, i64 %71
%73 = load double, double* %72
%74 = call double @llvm.fmuladd.f64(double %69, double %73, double %68)
%75 = load i32, i32* %27
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [4 x double], [4 x double]* %28, i64 0, i64 %76
store double %74, double* %77
br label %78
78: ; preds = %56
%79 = load i32, i32* %27
%80 = add nsw i32 %79, 1
store i32 %80, i32* %27
br label %53
81: ; preds = %53
%82 = getelementptr inbounds [4 x double], [4 x double]* %19, i64 0, i64 0
%83 = getelementptr inbounds [4 x i32], [4 x i32]* %20, i64 0, i64 0
%84 = getelementptr inbounds [4 x i32], [4 x i32]* %21, i64 0, i64 0
%85 = getelementptr inbounds [4 x double], [4 x double]* %22, i64 0, i64 0
%86 = load double, double* %10
%87 = getelementptr inbounds [4 x double], [4 x double]* %23, i64 0, i64 0
%88 = load i32, i32* %11
%89 = load double, double* %12
%90 = load double**, double*** %17
%91 = load double**, double*** %18
%92 = getelementptr inbounds [4 x double], [4 x double]* %28, i64 0, i64 0
%93 = load double*, double** %16
%94 = call double @getCoolingRate(i32 3, i32 3, double* %82, i32* %83, i32* %84, double* %85, double %86, double* %87, i32 %88, double %89, double** %90, double** %91, double* %92, double* %93)
store double %94, double* %29
%95 = load double, double* %29
ret double %95
}

LLVM IR (-O2):
@__const.finestruct_cooling_FeP.weights = [4 x double] [double 0.000000e+00, double 1.000000e+01, double 8.000000e+00, double 6.000000e+00]
@__const.finestruct_cooling_FeP.lower = [4 x i32] [i32 0, i32 1, i32 2, i32 1]
@__const.finestruct_cooling_FeP.upper = [4 x i32] [i32 0, i32 2, i32 3, i32 3]
@__const.finestruct_cooling_FeP.energy = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 5.540000e+02, double 9.610000e+02]
@__const.finestruct_cooling_FeP.EinsA = [4 x double] [double 0.000000e+00, double 2.500000e-03, double 1.600000e-03, double 1.500000e-09]
define double @finestruct_cooling_FeP(double %0, i32 %1, double %2, double %3, double %4, double %5, double* %6, double** %7, double** %8) {
%10 = alloca [4 x double]
%11 = alloca [4 x i32]
%12 = alloca [4 x i32]
%13 = alloca [4 x double]
%14 = alloca [4 x double]
%15 = alloca [4 x double]
%16 = bitcast [4 x double]* %10 to i8*
%17 = bitcast [4 x i32]* %11 to i8*
%18 = bitcast [4 x i32]* %12 to i8*
%19 = bitcast [4 x double]* %13 to i8*
%20 = bitcast [4 x double]* %14 to i8*
%21 = fdiv double %0, 1.000000e+02
%22 = tail call double @pow(double %21, double -5.000000e-01)
%23 = tail call double @pow(double %21, double -5.000000e-01)
%24 = insertelement <2 x double> poison, double %22, i64 0
%25 = insertelement <2 x double> %24, double %23, i64 1
%26 = fmul <2 x double> %25, <double 1.800000e-06, double 8.700000e-07>
%27 = tail call double @pow(double %21, double -5.000000e-01)
%28 = fmul double %27, 1.800000e-06
%29 = bitcast [4 x double]* %15 to i8*
%30 = getelementptr inbounds [4 x double], [4 x double]* %15, i64 0, i64 1
%31 = insertelement <2 x double> poison, double %4, i64 0
%32 = shufflevector <2 x double> %31, <2 x double> poison, <2 x i32> zeroinitializer
%33 = fmul <2 x double> %32, <double 9.500000e-10, double 4.700000e-10>
%34 = insertelement <2 x double> poison, double %3, i64 0
%35 = shufflevector <2 x double> %34, <2 x double> poison, <2 x i32> zeroinitializer
%36 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %35, <2 x double> %26, <2 x double> %33)
%37 = insertelement <2 x double> poison, double %5, i64 0
%38 = shufflevector <2 x double> %37, <2 x double> poison, <2 x i32> zeroinitializer
%39 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %38, <2 x double> <double 9.500000e-10, double 4.700000e-10>, <2 x double> %36)
%40 = bitcast double* %30 to <2 x double>*
store <2 x double> %39, <2 x double>* %40
%41 = fmul double %4, 0x3E0395C5E4D01D95
%42 = tail call double @llvm.fmuladd.f64(double %3, double %28, double %41)
%43 = tail call double @llvm.fmuladd.f64(double %5, double 0x3E0395C5E4D01D95, double %42)
%44 = getelementptr inbounds [4 x double], [4 x double]* %15, i64 0, i64 3
store double %43, double* %44
%45 = getelementptr inbounds [4 x double], [4 x double]* %10, i64 0, i64 0
%46 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 0
%47 = getelementptr inbounds [4 x i32], [4 x i32]* %12, i64 0, i64 0
%48 = getelementptr inbounds [4 x double], [4 x double]* %13, i64 0, i64 0
%49 = getelementptr inbounds [4 x double], [4 x double]* %14, i64 0, i64 0
%50 = getelementptr inbounds [4 x double], [4 x double]* %15, i64 0, i64 0
%51 = call double @getCoolingRate(i32 3, i32 3, double* %45, i32* %46, i32* %47, double* %48, double %0, double* %49, i32 %1, double %2, double** %7, double** %8, double* %50, double* %6)
ret double %51
}