double Ftrgenlin(double x, double xa, double xb, double ya, double yb) {
  double Ftr(double x);
  double res;
  res = (x * ya) / xa +
        (-((x * ya) / xa) + ((x - xb) * (1 - yb)) / (1 - xb) + yb) *
            Ftr((x - xa) / (-xa + xb));
  return (res);
}


x86 assembly (clang, -O0):
<Ftrgenlin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x8(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  0xe83(%rip),%xmm2
subsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe72(%rip),%xmm2
subsd  -0x18(%rbp),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <Ftr@plt>
movsd  -0x40(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ftrgenlin>:
sub    $0x28,%rsp
movapd %xmm0,%xmm5
subsd  %xmm2,%xmm5
movsd  0xedc(%rip),%xmm6
movapd %xmm6,%xmm7
subsd  %xmm4,%xmm7
unpcklpd %xmm0,%xmm5
unpcklpd %xmm3,%xmm7
mulpd  %xmm5,%xmm7
subsd  %xmm2,%xmm6
unpcklpd %xmm1,%xmm6
divpd  %xmm6,%xmm7
movapd %xmm7,%xmm3
unpckhpd %xmm7,%xmm3
movapd %xmm3,0x10(%rsp)
subsd  %xmm3,%xmm7
addsd  %xmm4,%xmm7
movapd %xmm7,(%rsp)
subsd  %xmm1,%xmm0
subsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
call   1030 <Ftr@plt>
mulsd  (%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x28,%rsp
ret

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

LLVM IR (-O2):
define double @Ftrgenlin(double %0, double %1, double %2, double %3, double %4) {
%6 = fsub double %0, %2
%7 = fsub double 1.000000e+00, %4
%8 = insertelement <2 x double> poison, double %0, i64 1
%9 = insertelement <2 x double> %8, double %6, i64 0
%10 = insertelement <2 x double> poison, double %3, i64 1
%11 = insertelement <2 x double> %10, double %7, i64 0
%12 = fmul <2 x double> %9, %11
%13 = fsub double 1.000000e+00, %2
%14 = insertelement <2 x double> poison, double %1, i64 1
%15 = insertelement <2 x double> %14, double %13, i64 0
%16 = fdiv <2 x double> %12, %15
%17 = extractelement <2 x double> %16, i64 0
%18 = extractelement <2 x double> %16, i64 1
%19 = fsub double %17, %18
%20 = fadd double %19, %4
%21 = fsub double %0, %1
%22 = fsub double %2, %1
%23 = fdiv double %21, %22
%24 = tail call double @Ftr(double %23)
%25 = tail call double @llvm.fmuladd.f64(double %20, double %24, double %18)
ret double %25
}