double BesselI0(double x) {
  double sum, xx, x2;
  sum = 1;
  x2 = x * x;
  xx = x2;
  sum += xx / 4.0;
  xx *= x2;
  sum += xx / 64.0;
  xx *= x2;
  sum += xx / 2304.0;
  xx *= x2;
  sum += xx / 147456.0;
  xx *= x2;
  sum += xx / 14745600.0;
  xx *= x2;
  sum += xx / 2123366400.0;
  xx *= x2;
  sum += xx / 416179814400.0;
  xx *= x2;
  sum += xx / 106542032486400.0;
  return (sum);
}


x86 assembly (clang, -O0):
<BesselI0>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xf2f(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xefc(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xeca(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe98(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe66(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe34(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe02(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xdd0(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xd9e(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<BesselI0>:
mulsd  %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef0(%rip),%xmm1
movapd %xmm0,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm0,%xmm2
mulsd  %xmm4,%xmm2
mulsd  0xee0(%rip),%xmm4
movapd %xmm0,%xmm3
mulsd  %xmm2,%xmm3
unpcklpd %xmm3,%xmm2
divpd  0xedc(%rip),%xmm2
addsd  %xmm1,%xmm4
addsd  %xmm2,%xmm4
unpckhpd %xmm2,%xmm2
mulsd  %xmm0,%xmm3
movapd %xmm0,%xmm1
mulsd  %xmm3,%xmm1
unpcklpd %xmm1,%xmm3
divpd  0xec8(%rip),%xmm3
addsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
unpckhpd %xmm3,%xmm3
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
unpcklpd %xmm0,%xmm1
divpd  0xeb8(%rip),%xmm1
addsd  %xmm2,%xmm3
addsd  %xmm1,%xmm3
unpckhpd %xmm1,%xmm1
addsd  %xmm3,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @BesselI0(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %2
store double 1.000000e+00, double* %3
%6 = load double, double* %2
%7 = load double, double* %2
%8 = fmul double %6, %7
store double %8, double* %5
%9 = load double, double* %5
store double %9, double* %4
%10 = load double, double* %4
%11 = fdiv double %10, 4.000000e+00
%12 = load double, double* %3
%13 = fadd double %12, %11
store double %13, double* %3
%14 = load double, double* %5
%15 = load double, double* %4
%16 = fmul double %15, %14
store double %16, double* %4
%17 = load double, double* %4
%18 = fdiv double %17, 6.400000e+01
%19 = load double, double* %3
%20 = fadd double %19, %18
store double %20, double* %3
%21 = load double, double* %5
%22 = load double, double* %4
%23 = fmul double %22, %21
store double %23, double* %4
%24 = load double, double* %4
%25 = fdiv double %24, 2.304000e+03
%26 = load double, double* %3
%27 = fadd double %26, %25
store double %27, double* %3
%28 = load double, double* %5
%29 = load double, double* %4
%30 = fmul double %29, %28
store double %30, double* %4
%31 = load double, double* %4
%32 = fdiv double %31, 1.474560e+05
%33 = load double, double* %3
%34 = fadd double %33, %32
store double %34, double* %3
%35 = load double, double* %5
%36 = load double, double* %4
%37 = fmul double %36, %35
store double %37, double* %4
%38 = load double, double* %4
%39 = fdiv double %38, 1.474560e+07
%40 = load double, double* %3
%41 = fadd double %40, %39
store double %41, double* %3
%42 = load double, double* %5
%43 = load double, double* %4
%44 = fmul double %43, %42
store double %44, double* %4
%45 = load double, double* %4
%46 = fdiv double %45, 0x41DFA40000000000
%47 = load double, double* %3
%48 = fadd double %47, %46
store double %48, double* %3
%49 = load double, double* %5
%50 = load double, double* %4
%51 = fmul double %50, %49
store double %51, double* %4
%52 = load double, double* %4
%53 = fdiv double %52, 0x4258399000000000
%54 = load double, double* %3
%55 = fadd double %54, %53
store double %55, double* %3
%56 = load double, double* %5
%57 = load double, double* %4
%58 = fmul double %57, %56
store double %58, double* %4
%59 = load double, double* %4
%60 = fdiv double %59, 0x42D8399000000000
%61 = load double, double* %3
%62 = fadd double %61, %60
store double %62, double* %3
%63 = load double, double* %3
ret double %63
}

LLVM IR (-O2):
define double @BesselI0(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, 2.500000e-01
%4 = fadd double %3, 1.000000e+00
%5 = fmul double %2, %2
%6 = fmul double %5, 1.562500e-02
%7 = fadd double %4, %6
%8 = fmul double %2, %5
%9 = fmul double %2, %8
%10 = insertelement <2 x double> poison, double %8, i64 0
%11 = insertelement <2 x double> %10, double %9, i64 1
%12 = fdiv <2 x double> %11, <double 2.304000e+03, double 1.474560e+05>
%13 = extractelement <2 x double> %12, i64 0
%14 = fadd double %7, %13
%15 = extractelement <2 x double> %12, i64 1
%16 = fadd double %14, %15
%17 = fmul double %2, %9
%18 = fmul double %2, %17
%19 = insertelement <2 x double> poison, double %17, i64 0
%20 = insertelement <2 x double> %19, double %18, i64 1
%21 = fdiv <2 x double> %20, <double 1.474560e+07, double 0x41DFA40000000000>
%22 = extractelement <2 x double> %21, i64 0
%23 = fadd double %16, %22
%24 = extractelement <2 x double> %21, i64 1
%25 = fadd double %23, %24
%26 = fmul double %2, %18
%27 = fmul double %2, %26
%28 = insertelement <2 x double> poison, double %26, i64 0
%29 = insertelement <2 x double> %28, double %27, i64 1
%30 = fdiv <2 x double> %29, <double 0x4258399000000000, double 0x42D8399000000000>
%31 = extractelement <2 x double> %30, i64 0
%32 = fadd double %25, %31
%33 = extractelement <2 x double> %30, i64 1
%34 = fadd double %32, %33
ret double %34
}