double my_fit_function(double t, double *p) {
  return (p[0] * t + (1 - p[0] + p[1] + p[2]) * t * t) /
         (1 + p[1] * t + p[2] * t * t);
}


x86 assembly (clang, -O0):
<my_fit_function>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x8(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movsd  0xeda(%rip),%xmm1
subsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
addsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
addsd  0x10(%rax),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm2
movsd  0xe98(%rip),%xmm1
addsd  %xmm1,%xmm2
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_fit_function>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm2
movsd  0xeef(%rip),%xmm3
movapd %xmm3,%xmm4
subsd  %xmm1,%xmm4
addsd  %xmm2,%xmm4
movsd  0x10(%rdi),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm0,%xmm1
addsd  %xmm4,%xmm1
mulsd  %xmm0,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm0,%xmm5
mulsd  %xmm0,%xmm5
addsd  %xmm2,%xmm5
divsd  %xmm5,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @my_fit_function(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double, double* %3
%9 = load double*, double** %4
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = fsub double 1.000000e+00, %11
%13 = load double*, double** %4
%14 = getelementptr inbounds double, double* %13, i64 1
%15 = load double, double* %14
%16 = fadd double %12, %15
%17 = load double*, double** %4
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = fadd double %16, %19
%21 = load double, double* %3
%22 = fmul double %20, %21
%23 = load double, double* %3
%24 = fmul double %22, %23
%25 = call double @llvm.fmuladd.f64(double %7, double %8, double %24)
%26 = load double*, double** %4
%27 = getelementptr inbounds double, double* %26, i64 1
%28 = load double, double* %27
%29 = load double, double* %3
%30 = call double @llvm.fmuladd.f64(double %28, double %29, double 1.000000e+00)
%31 = load double*, double** %4
%32 = getelementptr inbounds double, double* %31, i64 2
%33 = load double, double* %32
%34 = load double, double* %3
%35 = fmul double %33, %34
%36 = load double, double* %3
%37 = call double @llvm.fmuladd.f64(double %35, double %36, double %30)
%38 = fdiv double %25, %37
ret double %38
}

LLVM IR (-O2):
define double @my_fit_function(double %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fsub double 1.000000e+00, %3
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = fadd double %4, %6
%8 = getelementptr inbounds double, double* %1, i64 2
%9 = load double, double* %8
%10 = fadd double %7, %9
%11 = fmul double %10, %0
%12 = fmul double %11, %0
%13 = tail call double @llvm.fmuladd.f64(double %3, double %0, double %12)
%14 = tail call double @llvm.fmuladd.f64(double %6, double %0, double 1.000000e+00)
%15 = fmul double %9, %0
%16 = tail call double @llvm.fmuladd.f64(double %15, double %0, double %14)
%17 = fdiv double %13, %16
ret double %17
}