double force0(double x, double y) {
  return 2 * ((1 - 6 * x * x) * y * y * (1 - y * y) +
              (1 - 6 * y * y) * x * x * (1 - x * x));
}


x86 assembly (clang, -O0):
<force0>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xefa(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xec5(%rip),%xmm0
addsd  %xmm0,%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm0
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm0,%xmm2
movsd  0xe8a(%rip),%xmm0
addsd  %xmm0,%xmm2
movsd  0xe86(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm3
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm3,%xmm0
movsd  0xe51(%rip),%xmm3
addsd  %xmm3,%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm3
movsd  -0x8(%rbp),%xmm4
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm4,%xmm3
movsd  0xe16(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xdf6(%rip),%xmm0
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<force0>:
movapd %xmm0,%xmm2
movsd  0xef4(%rip),%xmm3
movapd %xmm0,%xmm4
mulsd  %xmm3,%xmm4
mulsd  %xmm0,%xmm4
movsd  0xee8(%rip),%xmm0
addsd  %xmm0,%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm1,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm1,%xmm1
movapd %xmm0,%xmm5
subsd  %xmm1,%xmm5
mulsd  %xmm4,%xmm5
addsd  %xmm0,%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm2,%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm5,%xmm0
addsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @force0(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fmul double 6.000000e+00, %5
%7 = load double, double* %3
%8 = fneg double %6
%9 = call double @llvm.fmuladd.f64(double %8, double %7, double 1.000000e+00)
%10 = load double, double* %4
%11 = fmul double %9, %10
%12 = load double, double* %4
%13 = fmul double %11, %12
%14 = load double, double* %4
%15 = load double, double* %4
%16 = fneg double %14
%17 = call double @llvm.fmuladd.f64(double %16, double %15, double 1.000000e+00)
%18 = load double, double* %4
%19 = fmul double 6.000000e+00, %18
%20 = load double, double* %4
%21 = fneg double %19
%22 = call double @llvm.fmuladd.f64(double %21, double %20, double 1.000000e+00)
%23 = load double, double* %3
%24 = fmul double %22, %23
%25 = load double, double* %3
%26 = fmul double %24, %25
%27 = load double, double* %3
%28 = load double, double* %3
%29 = fneg double %27
%30 = call double @llvm.fmuladd.f64(double %29, double %28, double 1.000000e+00)
%31 = fmul double %26, %30
%32 = call double @llvm.fmuladd.f64(double %13, double %17, double %31)
%33 = fmul double 2.000000e+00, %32
ret double %33
}

LLVM IR (-O2):
define double @force0(double %0, double %1) {
%3 = fmul double %0, -6.000000e+00
%4 = tail call double @llvm.fmuladd.f64(double %3, double %0, double 1.000000e+00)
%5 = fmul double %4, %1
%6 = fmul double %5, %1
%7 = fneg double %1
%8 = tail call double @llvm.fmuladd.f64(double %7, double %1, double 1.000000e+00)
%9 = fmul double %1, -6.000000e+00
%10 = tail call double @llvm.fmuladd.f64(double %9, double %1, double 1.000000e+00)
%11 = fmul double %10, %0
%12 = fmul double %11, %0
%13 = fneg double %0
%14 = tail call double @llvm.fmuladd.f64(double %13, double %0, double 1.000000e+00)
%15 = fmul double %14, %12
%16 = tail call double @llvm.fmuladd.f64(double %6, double %8, double %15)
%17 = fmul double %16, 2.000000e+00
ret double %17
}