double bb_alb_aster(double greenchan, double nirchan, double swirchan2,
                    double swirchan3, double swirchan5, double swirchan6) {
  double result;
  result = (0.484 * greenchan + 0.335 * nirchan - 0.324 * swirchan2 +
            0.551 * swirchan3 + 0.305 * swirchan5 - 0.367 * swirchan6 - 0.0015);
  return result;
}


x86 assembly (clang, -O0):
<bb_alb_aster>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xf01(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xeec(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xecf(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xeb2(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xe95(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  0xe78(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe60(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bb_alb_aster>:
mulsd  0xef8(%rip),%xmm1
mulsd  0xef8(%rip),%xmm0
addsd  %xmm1,%xmm0
mulsd  0xef4(%rip),%xmm2
addsd  %xmm2,%xmm0
mulsd  0xef0(%rip),%xmm3
addsd  %xmm3,%xmm0
mulsd  0xeec(%rip),%xmm4
mulsd  0xeec(%rip),%xmm5
addsd  %xmm4,%xmm0
addsd  %xmm5,%xmm0
addsd  0xee4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @bb_alb_aster(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%14 = load double, double* %7
%15 = load double, double* %8
%16 = fmul double 3.350000e-01, %15
%17 = call double @llvm.fmuladd.f64(double 4.840000e-01, double %14, double %16)
%18 = load double, double* %9
%19 = call double @llvm.fmuladd.f64(double -3.240000e-01, double %18, double %17)
%20 = load double, double* %10
%21 = call double @llvm.fmuladd.f64(double 5.510000e-01, double %20, double %19)
%22 = load double, double* %11
%23 = call double @llvm.fmuladd.f64(double 3.050000e-01, double %22, double %21)
%24 = load double, double* %12
%25 = call double @llvm.fmuladd.f64(double -3.670000e-01, double %24, double %23)
%26 = fsub double %25, 1.500000e-03
store double %26, double* %13
%27 = load double, double* %13
ret double %27
}

LLVM IR (-O2):
define double @bb_alb_aster(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fmul double %1, 3.350000e-01
%8 = tail call double @llvm.fmuladd.f64(double %0, double 4.840000e-01, double %7)
%9 = tail call double @llvm.fmuladd.f64(double %2, double -3.240000e-01, double %8)
%10 = tail call double @llvm.fmuladd.f64(double %3, double 5.510000e-01, double %9)
%11 = tail call double @llvm.fmuladd.f64(double %4, double 3.050000e-01, double %10)
%12 = tail call double @llvm.fmuladd.f64(double %5, double -3.670000e-01, double %11)
%13 = fadd double %12, -1.500000e-03
ret double %13
}