double rsqrt64(const double number) {
  unsigned long i;
  double x2, y;
  x2 = number * 0.5;
  y = number;
  i = *(unsigned long *)&y;
  i = 0x5fe6eb50c7b537a9 - (i >> 1);
  y = *(double *)&i;
  y = y * (1.5 - (x2 * y * y));
  y = y * (1.5 - (x2 * y * y));
  y = y * (1.5 - (x2 * y * y));
  return y;
}


x86 assembly (clang, -O0):
<rsqrt64>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
shr    $0x1,%rcx
movabs $0x5fe6eb50c7b537a9,%rax
eb e6 5f
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe79(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe35(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xdf1(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rsqrt64>:
movq   %xmm0,%rax
shr    %rax
movabs $0x5fe6eb50c7b537a9,%rcx
eb e6 5f
sub    %rax,%rcx
movq   %rcx,%xmm1
mulsd  0xede(%rip),%xmm0
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movsd  0xed2(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm0,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @rsqrt64(double %0) {
%2 = alloca double
%3 = alloca i64
%4 = alloca double
%5 = alloca double
store double %0, double* %2
%6 = load double, double* %2
%7 = fmul double %6, 5.000000e-01
store double %7, double* %4
%8 = load double, double* %2
store double %8, double* %5
%9 = bitcast double* %5 to i64*
%10 = load i64, i64* %9
store i64 %10, i64* %3
%11 = load i64, i64* %3
%12 = lshr i64 %11, 1
%13 = sub i64 6910469410427058089, %12
store i64 %13, i64* %3
%14 = bitcast i64* %3 to double*
%15 = load double, double* %14
store double %15, double* %5
%16 = load double, double* %5
%17 = load double, double* %4
%18 = load double, double* %5
%19 = fmul double %17, %18
%20 = load double, double* %5
%21 = fneg double %19
%22 = call double @llvm.fmuladd.f64(double %21, double %20, double 1.500000e+00)
%23 = fmul double %16, %22
store double %23, double* %5
%24 = load double, double* %5
%25 = load double, double* %4
%26 = load double, double* %5
%27 = fmul double %25, %26
%28 = load double, double* %5
%29 = fneg double %27
%30 = call double @llvm.fmuladd.f64(double %29, double %28, double 1.500000e+00)
%31 = fmul double %24, %30
store double %31, double* %5
%32 = load double, double* %5
%33 = load double, double* %4
%34 = load double, double* %5
%35 = fmul double %33, %34
%36 = load double, double* %5
%37 = fneg double %35
%38 = call double @llvm.fmuladd.f64(double %37, double %36, double 1.500000e+00)
%39 = fmul double %32, %38
store double %39, double* %5
%40 = load double, double* %5
ret double %40
}

LLVM IR (-O2):
define double @rsqrt64(double %0) {
%2 = bitcast double %0 to i64
%3 = lshr i64 %2, 1
%4 = sub nsw i64 6910469410427058089, %3
%5 = bitcast i64 %4 to double
%6 = fmul double %0, -5.000000e-01
%7 = fmul double %6, %5
%8 = tail call double @llvm.fmuladd.f64(double %7, double %5, double 1.500000e+00)
%9 = fmul double %8, %5
%10 = fmul double %6, %9
%11 = tail call double @llvm.fmuladd.f64(double %10, double %9, double 1.500000e+00)
%12 = fmul double %9, %11
%13 = fmul double %6, %12
%14 = tail call double @llvm.fmuladd.f64(double %13, double %12, double 1.500000e+00)
%15 = fmul double %12, %14
ret double %15
}