double NewtonPoly(double xpoint, double *x, double *c) {
  int j;
  double px, xd;
  px = c[15];
  for (j = 15 - 1; j >= 0; j--) {
    xd = xpoint - x[j];
    px = c[j] + px * xd;
  }
  return px;
}


x86 assembly (clang, -O0):
<NewtonPoly>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x78(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0xe,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     1179 <NewtonPoly+0x79>
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1126 <NewtonPoly+0x26>
movsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<NewtonPoly>:
movapd %xmm0,%xmm1
subsd  0x70(%rdi),%xmm1
mulsd  0x78(%rsi),%xmm1
addsd  0x70(%rsi),%xmm1
movapd %xmm0,%xmm2
subsd  0x68(%rdi),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x68(%rsi),%xmm2
movapd %xmm0,%xmm1
subsd  0x60(%rdi),%xmm1
mulsd  %xmm2,%xmm1
addsd  0x60(%rsi),%xmm1
movapd %xmm0,%xmm2
subsd  0x58(%rdi),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x58(%rsi),%xmm2
movapd %xmm0,%xmm1
subsd  0x50(%rdi),%xmm1
mulsd  %xmm2,%xmm1
addsd  0x50(%rsi),%xmm1
movapd %xmm0,%xmm2
subsd  0x48(%rdi),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x48(%rsi),%xmm2
movapd %xmm0,%xmm1
subsd  0x40(%rdi),%xmm1
mulsd  %xmm2,%xmm1
addsd  0x40(%rsi),%xmm1
movapd %xmm0,%xmm2
subsd  0x38(%rdi),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x38(%rsi),%xmm2
movapd %xmm0,%xmm1
subsd  0x30(%rdi),%xmm1
mulsd  %xmm2,%xmm1
addsd  0x30(%rsi),%xmm1
movapd %xmm0,%xmm2
subsd  0x28(%rdi),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x28(%rsi),%xmm2
movapd %xmm0,%xmm1
subsd  0x20(%rdi),%xmm1
mulsd  %xmm2,%xmm1
addsd  0x20(%rsi),%xmm1
movapd %xmm0,%xmm2
subsd  0x18(%rdi),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x18(%rsi),%xmm2
movapd %xmm0,%xmm1
subsd  0x10(%rdi),%xmm1
mulsd  %xmm2,%xmm1
addsd  0x10(%rsi),%xmm1
movapd %xmm0,%xmm2
subsd  0x8(%rdi),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x8(%rsi),%xmm2
subsd  (%rdi),%xmm0
mulsd  %xmm2,%xmm0
addsd  (%rsi),%xmm0
ret

LLVM IR (-O0):
define double @NewtonPoly(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca double
%9 = alloca double
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%10 = load double*, double** %6
%11 = getelementptr inbounds double, double* %10, i64 15
%12 = load double, double* %11
store double %12, double* %8
store i32 14, i32* %7
br label %13
13: ; preds = %32, %3
%14 = load i32, i32* %7
%15 = icmp sge i32 %14, 0
br i1 %15, label %16, label %35
16: ; preds = %13
%17 = load double, double* %4
%18 = load double*, double** %5
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds double, double* %18, i64 %20
%22 = load double, double* %21
%23 = fsub double %17, %22
store double %23, double* %9
%24 = load double*, double** %6
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %24, i64 %26
%28 = load double, double* %27
%29 = load double, double* %8
%30 = load double, double* %9
%31 = call double @llvm.fmuladd.f64(double %29, double %30, double %28)
store double %31, double* %8
br label %32
32: ; preds = %16
%33 = load i32, i32* %7
%34 = add nsw i32 %33, -1
store i32 %34, i32* %7
br label %13
35: ; preds = %13
%36 = load double, double* %8
ret double %36
}

LLVM IR (-O2):
define double @NewtonPoly(double %0, double* nocapture %1, double* nocapture %2) {
%4 = getelementptr inbounds double, double* %2, i64 15
%5 = load double, double* %4
%6 = getelementptr inbounds double, double* %1, i64 14
%7 = load double, double* %6
%8 = fsub double %0, %7
%9 = getelementptr inbounds double, double* %2, i64 14
%10 = load double, double* %9
%11 = tail call double @llvm.fmuladd.f64(double %5, double %8, double %10)
%12 = getelementptr inbounds double, double* %1, i64 13
%13 = load double, double* %12
%14 = fsub double %0, %13
%15 = getelementptr inbounds double, double* %2, i64 13
%16 = load double, double* %15
%17 = tail call double @llvm.fmuladd.f64(double %11, double %14, double %16)
%18 = getelementptr inbounds double, double* %1, i64 12
%19 = load double, double* %18
%20 = fsub double %0, %19
%21 = getelementptr inbounds double, double* %2, i64 12
%22 = load double, double* %21
%23 = tail call double @llvm.fmuladd.f64(double %17, double %20, double %22)
%24 = getelementptr inbounds double, double* %1, i64 11
%25 = load double, double* %24
%26 = fsub double %0, %25
%27 = getelementptr inbounds double, double* %2, i64 11
%28 = load double, double* %27
%29 = tail call double @llvm.fmuladd.f64(double %23, double %26, double %28)
%30 = getelementptr inbounds double, double* %1, i64 10
%31 = load double, double* %30
%32 = fsub double %0, %31
%33 = getelementptr inbounds double, double* %2, i64 10
%34 = load double, double* %33
%35 = tail call double @llvm.fmuladd.f64(double %29, double %32, double %34)
%36 = getelementptr inbounds double, double* %1, i64 9
%37 = load double, double* %36
%38 = fsub double %0, %37
%39 = getelementptr inbounds double, double* %2, i64 9
%40 = load double, double* %39
%41 = tail call double @llvm.fmuladd.f64(double %35, double %38, double %40)
%42 = getelementptr inbounds double, double* %1, i64 8
%43 = load double, double* %42
%44 = fsub double %0, %43
%45 = getelementptr inbounds double, double* %2, i64 8
%46 = load double, double* %45
%47 = tail call double @llvm.fmuladd.f64(double %41, double %44, double %46)
%48 = getelementptr inbounds double, double* %1, i64 7
%49 = load double, double* %48
%50 = fsub double %0, %49
%51 = getelementptr inbounds double, double* %2, i64 7
%52 = load double, double* %51
%53 = tail call double @llvm.fmuladd.f64(double %47, double %50, double %52)
%54 = getelementptr inbounds double, double* %1, i64 6
%55 = load double, double* %54
%56 = fsub double %0, %55
%57 = getelementptr inbounds double, double* %2, i64 6
%58 = load double, double* %57
%59 = tail call double @llvm.fmuladd.f64(double %53, double %56, double %58)
%60 = getelementptr inbounds double, double* %1, i64 5
%61 = load double, double* %60
%62 = fsub double %0, %61
%63 = getelementptr inbounds double, double* %2, i64 5
%64 = load double, double* %63
%65 = tail call double @llvm.fmuladd.f64(double %59, double %62, double %64)
%66 = getelementptr inbounds double, double* %1, i64 4
%67 = load double, double* %66
%68 = fsub double %0, %67
%69 = getelementptr inbounds double, double* %2, i64 4
%70 = load double, double* %69
%71 = tail call double @llvm.fmuladd.f64(double %65, double %68, double %70)
%72 = getelementptr inbounds double, double* %1, i64 3
%73 = load double, double* %72
%74 = fsub double %0, %73
%75 = getelementptr inbounds double, double* %2, i64 3
%76 = load double, double* %75
%77 = tail call double @llvm.fmuladd.f64(double %71, double %74, double %76)
%78 = getelementptr inbounds double, double* %1, i64 2
%79 = load double, double* %78
%80 = fsub double %0, %79
%81 = getelementptr inbounds double, double* %2, i64 2
%82 = load double, double* %81
%83 = tail call double @llvm.fmuladd.f64(double %77, double %80, double %82)
%84 = getelementptr inbounds double, double* %1, i64 1
%85 = load double, double* %84
%86 = fsub double %0, %85
%87 = getelementptr inbounds double, double* %2, i64 1
%88 = load double, double* %87
%89 = tail call double @llvm.fmuladd.f64(double %83, double %86, double %88)
%90 = load double, double* %1
%91 = fsub double %0, %90
%92 = load double, double* %2
%93 = tail call double @llvm.fmuladd.f64(double %89, double %91, double %92)
ret double %93
}