double _tan_kernel(double x) {
  const double c1 = -34287.4662577359568109624;
  const double c2 = 2566.7175462315050423295;
  const double c3 = -26.5366371951731325438;
  const double c4 = -43656.1579281292375769579;
  const double c5 = 12244.4839556747426927793;
  const double c6 = -336.611376245464339493;
  double x2;
  x2 = x * x;
  return (x * (c1 + x2 * (c2 + x2 * c3)) / (c4 + x2 * (c5 + x2 * (c6 + x2))));
}


x86 assembly (clang, -O0):
<_tan_kernel>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xf07(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xf0a(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xef5(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xec8(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xebe(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movsd  0xea3(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe9f(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe7f(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movsd  0xe5d(%rip),%xmm3
addsd  -0x40(%rbp),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe44(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe2c(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_tan_kernel>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xef0(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xeec(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xee8(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xee4(%rip),%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
addsd  0xedc(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xed8(%rip),%xmm2
divsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @_tan_kernel(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %2
store double 0xC0E0BDEEEB9557EE, double* %3
store double 0x40A40D6F62383B5D, double* %4
store double 0xC03A89610E2315F5, double* %5
store double 0xC0E551050DBF4AC6, double* %6
store double 0x40C7EA3DF24271DE, double* %7
store double 0xC07509C832753D21, double* %8
%10 = load double, double* %2
%11 = load double, double* %2
%12 = fmul double %10, %11
store double %12, double* %9
%13 = load double, double* %2
%14 = load double, double* %9
%15 = load double, double* %9
%16 = call double @llvm.fmuladd.f64(double %15, double 0xC03A89610E2315F5, double 0x40A40D6F62383B5D)
%17 = call double @llvm.fmuladd.f64(double %14, double %16, double 0xC0E0BDEEEB9557EE)
%18 = fmul double %13, %17
%19 = load double, double* %9
%20 = load double, double* %9
%21 = load double, double* %9
%22 = fadd double 0xC07509C832753D21, %21
%23 = call double @llvm.fmuladd.f64(double %20, double %22, double 0x40C7EA3DF24271DE)
%24 = call double @llvm.fmuladd.f64(double %19, double %23, double 0xC0E551050DBF4AC6)
%25 = fdiv double %18, %24
ret double %25
}

LLVM IR (-O2):
define double @_tan_kernel(double %0) {
%2 = fmul double %0, %0
%3 = tail call double @llvm.fmuladd.f64(double %2, double 0xC03A89610E2315F5, double 0x40A40D6F62383B5D)
%4 = tail call double @llvm.fmuladd.f64(double %2, double %3, double 0xC0E0BDEEEB9557EE)
%5 = fmul double %4, %0
%6 = fadd double %2, 0xC07509C832753D21
%7 = tail call double @llvm.fmuladd.f64(double %2, double %6, double 0x40C7EA3DF24271DE)
%8 = tail call double @llvm.fmuladd.f64(double %2, double %7, double 0xC0E551050DBF4AC6)
%9 = fdiv double %5, %8
ret double %9
}