double sqrt_(double num) {
  double numHalf;
  long long int tmp;
  double res;
  numHalf = 0.5 * num;
  tmp = 0x5FE6EB50C7B537AAl - ((*((long long int *)(&num))) >> 1);
  res = *((double *)(&tmp));
  (res *= (1.5 - (numHalf * res * res)));
  (res *= (1.5 - (numHalf * res * res)));
  (res *= (1.5 - (numHalf * res * res)));
  res *= num;
  return res;
}


x86 assembly (clang, -O0):
<sqrt_>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
sar    $0x1,%rcx
movabs $0x5fe6eb50c7b537aa,%rax
eb e6 5f
sub    %rcx,%rax
mov    %rax,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe90(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe50(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe10(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt_>:
movq   %xmm0,%rax
sar    %rax
movabs $0x5fe6eb50c7b537aa,%rcx
eb e6 5f
sub    %rax,%rcx
movq   %rcx,%xmm1
movsd  0xede(%rip),%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm2,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm1,%xmm3
movsd  0xece(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm1,%xmm3
movapd %xmm2,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm4,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm4,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define double @sqrt_(double %0) {
%2 = bitcast double %0 to i64
%3 = ashr i64 %2, 1
%4 = sub nsw i64 6910469410427058090, %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
%16 = fmul double %15, %0
ret double %16
}