lbf_rhs(t, x, f, p) double t, *x, *f, *p;
{
  double z = 1 - x[0] - x[1] - x[2];
  f[0] =
      (2 * p[0] * z * z - 2 * p[4] * x[0] * x[0] - p[2] * x[0] * x[1]) * p[7];
  f[1] = (p[1] * z - p[5] * x[1] - p[2] * x[0] * x[1]) * p[7];
  f[2] = (p[3] * (z - p[6] * x[2])) * p[7];
}


x86 assembly (clang, -O0):
<lbf_rhs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xee7(%rip),%xmm0
subsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsd  0xeb8(%rip),%xmm1
mulsd  (%rax),%xmm1
mulsd  -0x30(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
mov    -0x28(%rbp),%rax
movsd  0xe9e(%rip),%xmm0
mulsd  0x20(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
mulsd  0x38(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x30(%rbp),%xmm2
mov    -0x28(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
mulsd  0x38(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x28(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  -0x30(%rbp),%xmm2
mov    -0x28(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm3
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
mulsd  0x38(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lbf_rhs>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm2
movsd  0xeef(%rip),%xmm0
subsd  %xmm1,%xmm0
subsd  %xmm2,%xmm0
subsd  0x10(%rdi),%xmm0
movsd  (%rdx),%xmm3
movsd  0x20(%rdx),%xmm4
addsd  %xmm3,%xmm3
mulsd  %xmm0,%xmm3
mulsd  0xed1(%rip),%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm0,%xmm3
addsd  %xmm4,%xmm3
mulsd  0x10(%rdx),%xmm1
mulsd  %xmm2,%xmm1
subsd  %xmm1,%xmm3
mulsd  0x38(%rdx),%xmm3
movsd  %xmm3,(%rsi)
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm2
movsd  0x28(%rdx),%xmm3
mulsd  %xmm2,%xmm3
movsd  0x8(%rdx),%xmm4
mulsd  %xmm0,%xmm4
subsd  %xmm3,%xmm4
mulsd  0x10(%rdx),%xmm1
mulsd  %xmm2,%xmm1
subsd  %xmm1,%xmm4
mulsd  0x38(%rdx),%xmm4
movsd  %xmm4,0x8(%rsi)
movsd  0x30(%rdx),%xmm1
mulsd  0x10(%rdi),%xmm1
subsd  %xmm1,%xmm0
mulsd  0x18(%rdx),%xmm0
mulsd  0x38(%rdx),%xmm0
movsd  %xmm0,0x10(%rsi)
ret

LLVM IR (-O0):
define i32 @lbf_rhs(double %0, double* %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double
store double %0, double* %6
store double* %1, double** %7
store double* %2, double** %8
store double* %3, double** %9
%11 = load double*, double** %7
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
%14 = fsub double 1.000000e+00, %13
%15 = load double*, double** %7
%16 = getelementptr inbounds double, double* %15, i64 1
%17 = load double, double* %16
%18 = fsub double %14, %17
%19 = load double*, double** %7
%20 = getelementptr inbounds double, double* %19, i64 2
%21 = load double, double* %20
%22 = fsub double %18, %21
store double %22, double* %10
%23 = load double*, double** %9
%24 = getelementptr inbounds double, double* %23, i64 0
%25 = load double, double* %24
%26 = fmul double 2.000000e+00, %25
%27 = load double, double* %10
%28 = fmul double %26, %27
%29 = load double, double* %10
%30 = load double*, double** %9
%31 = getelementptr inbounds double, double* %30, i64 4
%32 = load double, double* %31
%33 = fmul double 2.000000e+00, %32
%34 = load double*, double** %7
%35 = getelementptr inbounds double, double* %34, i64 0
%36 = load double, double* %35
%37 = fmul double %33, %36
%38 = load double*, double** %7
%39 = getelementptr inbounds double, double* %38, i64 0
%40 = load double, double* %39
%41 = fmul double %37, %40
%42 = fneg double %41
%43 = call double @llvm.fmuladd.f64(double %28, double %29, double %42)
%44 = load double*, double** %9
%45 = getelementptr inbounds double, double* %44, i64 2
%46 = load double, double* %45
%47 = load double*, double** %7
%48 = getelementptr inbounds double, double* %47, i64 0
%49 = load double, double* %48
%50 = fmul double %46, %49
%51 = load double*, double** %7
%52 = getelementptr inbounds double, double* %51, i64 1
%53 = load double, double* %52
%54 = fneg double %50
%55 = call double @llvm.fmuladd.f64(double %54, double %53, double %43)
%56 = load double*, double** %9
%57 = getelementptr inbounds double, double* %56, i64 7
%58 = load double, double* %57
%59 = fmul double %55, %58
%60 = load double*, double** %8
%61 = getelementptr inbounds double, double* %60, i64 0
store double %59, double* %61
%62 = load double*, double** %9
%63 = getelementptr inbounds double, double* %62, i64 1
%64 = load double, double* %63
%65 = load double, double* %10
%66 = load double*, double** %9
%67 = getelementptr inbounds double, double* %66, i64 5
%68 = load double, double* %67
%69 = load double*, double** %7
%70 = getelementptr inbounds double, double* %69, i64 1
%71 = load double, double* %70
%72 = fmul double %68, %71
%73 = fneg double %72
%74 = call double @llvm.fmuladd.f64(double %64, double %65, double %73)
%75 = load double*, double** %9
%76 = getelementptr inbounds double, double* %75, i64 2
%77 = load double, double* %76
%78 = load double*, double** %7
%79 = getelementptr inbounds double, double* %78, i64 0
%80 = load double, double* %79
%81 = fmul double %77, %80
%82 = load double*, double** %7
%83 = getelementptr inbounds double, double* %82, i64 1
%84 = load double, double* %83
%85 = fneg double %81
%86 = call double @llvm.fmuladd.f64(double %85, double %84, double %74)
%87 = load double*, double** %9
%88 = getelementptr inbounds double, double* %87, i64 7
%89 = load double, double* %88
%90 = fmul double %86, %89
%91 = load double*, double** %8
%92 = getelementptr inbounds double, double* %91, i64 1
store double %90, double* %92
%93 = load double*, double** %9
%94 = getelementptr inbounds double, double* %93, i64 3
%95 = load double, double* %94
%96 = load double, double* %10
%97 = load double*, double** %9
%98 = getelementptr inbounds double, double* %97, i64 6
%99 = load double, double* %98
%100 = load double*, double** %7
%101 = getelementptr inbounds double, double* %100, i64 2
%102 = load double, double* %101
%103 = fneg double %99
%104 = call double @llvm.fmuladd.f64(double %103, double %102, double %96)
%105 = fmul double %95, %104
%106 = load double*, double** %9
%107 = getelementptr inbounds double, double* %106, i64 7
%108 = load double, double* %107
%109 = fmul double %105, %108
%110 = load double*, double** %8
%111 = getelementptr inbounds double, double* %110, i64 2
store double %109, double* %111
%112 = load i32, i32* %5
ret i32 %112
}

LLVM IR (-O2):
define i32 @lbf_rhs(double %0, double* nocapture %1, double* nocapture writeonly %2, double* nocapture %3) {
%5 = load double, double* %1
%6 = fsub double 1.000000e+00, %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fsub double %6, %8
%10 = getelementptr inbounds double, double* %1, i64 2
%11 = load double, double* %10
%12 = fsub double %9, %11
%13 = load double, double* %3
%14 = fmul double %13, 2.000000e+00
%15 = fmul double %12, %14
%16 = getelementptr inbounds double, double* %3, i64 4
%17 = load double, double* %16
%18 = fmul double %17, -2.000000e+00
%19 = fmul double %5, %18
%20 = fmul double %5, %19
%21 = tail call double @llvm.fmuladd.f64(double %15, double %12, double %20)
%22 = getelementptr inbounds double, double* %3, i64 2
%23 = load double, double* %22
%24 = fneg double %23
%25 = fmul double %5, %24
%26 = tail call double @llvm.fmuladd.f64(double %25, double %8, double %21)
%27 = getelementptr inbounds double, double* %3, i64 7
%28 = load double, double* %27
%29 = fmul double %28, %26
store double %29, double* %2
%30 = getelementptr inbounds double, double* %3, i64 1
%31 = load double, double* %30
%32 = getelementptr inbounds double, double* %3, i64 5
%33 = load double, double* %32
%34 = load double, double* %7
%35 = fneg double %33
%36 = fmul double %34, %35
%37 = tail call double @llvm.fmuladd.f64(double %31, double %12, double %36)
%38 = load double, double* %22
%39 = load double, double* %1
%40 = fneg double %38
%41 = fmul double %39, %40
%42 = tail call double @llvm.fmuladd.f64(double %41, double %34, double %37)
%43 = load double, double* %27
%44 = fmul double %43, %42
%45 = getelementptr inbounds double, double* %2, i64 1
store double %44, double* %45
%46 = getelementptr inbounds double, double* %3, i64 3
%47 = load double, double* %46
%48 = getelementptr inbounds double, double* %3, i64 6
%49 = load double, double* %48
%50 = load double, double* %10
%51 = fneg double %49
%52 = tail call double @llvm.fmuladd.f64(double %51, double %50, double %12)
%53 = fmul double %47, %52
%54 = load double, double* %27
%55 = fmul double %54, %53
%56 = getelementptr inbounds double, double* %2, i64 2
store double %55, double* %56
ret i32 undef
}