double adiabatic_temperature_gradient(double salinity, double temperature,
                                      double pressure) {
  salinity = salinity - 35.0;
  return (((-2.1687e-16 * temperature + 1.8676e-14) * temperature -
           4.6206e-13) *
              pressure +
          ((2.7759e-12 * temperature - 1.1351e-10) * salinity +
           ((-5.4481e-14 * temperature + 8.733e-12) * temperature -
            6.7795e-10) *
               temperature +
           1.8741e-8)) *
             pressure +
         (-4.2393e-8 * temperature + 1.8932e-6) * salinity +
         ((6.6228e-10 * temperature - 6.836e-8) * temperature + 8.5258e-6) *
             temperature +
         3.5803e-5;
}


x86 assembly (clang, -O0):
<adiabatic_temperature_gradient>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xf58(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xf32(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xf2e(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xf09(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm0
movsd  0xee3(%rip),%xmm3
mulsd  %xmm3,%xmm0
movsd  0xedf(%rip),%xmm3
addsd  %xmm3,%xmm0
movsd  -0x8(%rbp),%xmm4
movsd  -0x10(%rbp),%xmm3
movsd  0xeb1(%rip),%xmm5
mulsd  %xmm5,%xmm3
movsd  0xead(%rip),%xmm5
addsd  %xmm5,%xmm3
movsd  -0x10(%rbp),%xmm5
mulsd  %xmm5,%xmm3
movsd  0xe88(%rip),%xmm5
addsd  %xmm5,%xmm3
mulsd  -0x10(%rbp),%xmm3
mulsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
movsd  0xe67(%rip),%xmm3
addsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm0
movsd  0xe39(%rip),%xmm3
mulsd  %xmm3,%xmm0
movsd  0xe35(%rip),%xmm3
addsd  %xmm3,%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xdff(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xdfb(%rip),%xmm2
addsd  %xmm2,%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xdd6(%rip),%xmm2
addsd  %xmm2,%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xdb5(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<adiabatic_temperature_gradient>:
addsd  0xef8(%rip),%xmm0
movsd  0xef8(%rip),%xmm3
mulsd  %xmm1,%xmm3
addsd  0xef4(%rip),%xmm3
mulsd  %xmm1,%xmm3
addsd  0xef0(%rip),%xmm3
movsd  0xef0(%rip),%xmm4
mulsd  %xmm1,%xmm4
addsd  0xeec(%rip),%xmm4
movsd  0xeec(%rip),%xmm5
mulsd  %xmm1,%xmm5
addsd  0xee8(%rip),%xmm5
mulsd  %xmm1,%xmm5
addsd  0xee4(%rip),%xmm5
mulsd  %xmm1,%xmm5
mulsd  %xmm0,%xmm4
addsd  %xmm5,%xmm4
addsd  0xed8(%rip),%xmm4
mulsd  %xmm2,%xmm3
addsd  %xmm4,%xmm3
movsd  0xed0(%rip),%xmm4
mulsd  %xmm1,%xmm4
addsd  0xecc(%rip),%xmm4
mulsd  %xmm4,%xmm0
mulsd  %xmm2,%xmm3
movsd  0xec4(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xec0(%rip),%xmm2
addsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm2
addsd  0xeb8(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
addsd  0xeb0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @adiabatic_temperature_gradient(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = fsub double %7, 3.500000e+01
store double %8, double* %4
%9 = load double, double* %5
%10 = call double @llvm.fmuladd.f64(double -2.168700e-16, double %9, double 1.867600e-14)
%11 = load double, double* %5
%12 = call double @llvm.fmuladd.f64(double %10, double %11, double -4.620600e-13)
%13 = load double, double* %6
%14 = load double, double* %5
%15 = call double @llvm.fmuladd.f64(double 2.775900e-12, double %14, double -1.135100e-10)
%16 = load double, double* %4
%17 = load double, double* %5
%18 = call double @llvm.fmuladd.f64(double -5.448100e-14, double %17, double 8.733000e-12)
%19 = load double, double* %5
%20 = call double @llvm.fmuladd.f64(double %18, double %19, double -6.779500e-10)
%21 = load double, double* %5
%22 = fmul double %20, %21
%23 = call double @llvm.fmuladd.f64(double %15, double %16, double %22)
%24 = fadd double %23, 1.874100e-08
%25 = call double @llvm.fmuladd.f64(double %12, double %13, double %24)
%26 = load double, double* %6
%27 = load double, double* %5
%28 = call double @llvm.fmuladd.f64(double -4.239300e-08, double %27, double 1.893200e-06)
%29 = load double, double* %4
%30 = fmul double %28, %29
%31 = call double @llvm.fmuladd.f64(double %25, double %26, double %30)
%32 = load double, double* %5
%33 = call double @llvm.fmuladd.f64(double 6.622800e-10, double %32, double -6.836000e-08)
%34 = load double, double* %5
%35 = call double @llvm.fmuladd.f64(double %33, double %34, double 8.525800e-06)
%36 = load double, double* %5
%37 = call double @llvm.fmuladd.f64(double %35, double %36, double %31)
%38 = fadd double %37, 3.580300e-05
ret double %38
}

LLVM IR (-O2):
define double @adiabatic_temperature_gradient(double %0, double %1, double %2) {
%4 = fadd double %0, -3.500000e+01
%5 = tail call double @llvm.fmuladd.f64(double %1, double -2.168700e-16, double 1.867600e-14)
%6 = tail call double @llvm.fmuladd.f64(double %5, double %1, double -4.620600e-13)
%7 = tail call double @llvm.fmuladd.f64(double %1, double 2.775900e-12, double -1.135100e-10)
%8 = tail call double @llvm.fmuladd.f64(double %1, double -5.448100e-14, double 8.733000e-12)
%9 = tail call double @llvm.fmuladd.f64(double %8, double %1, double -6.779500e-10)
%10 = fmul double %9, %1
%11 = tail call double @llvm.fmuladd.f64(double %7, double %4, double %10)
%12 = fadd double %11, 1.874100e-08
%13 = tail call double @llvm.fmuladd.f64(double %6, double %2, double %12)
%14 = tail call double @llvm.fmuladd.f64(double %1, double -4.239300e-08, double 1.893200e-06)
%15 = fmul double %4, %14
%16 = tail call double @llvm.fmuladd.f64(double %13, double %2, double %15)
%17 = tail call double @llvm.fmuladd.f64(double %1, double 6.622800e-10, double -6.836000e-08)
%18 = tail call double @llvm.fmuladd.f64(double %17, double %1, double 8.525800e-06)
%19 = tail call double @llvm.fmuladd.f64(double %18, double %1, double %16)
%20 = fadd double %19, 3.580300e-05
ret double %20
}