void LdL6(double x, double *y, double *z) {
  double L[6 + 1];
  double dL[6 + 1];
  L[0] = 1.;
  L[1] = x;
  dL[0] = 0.;
  dL[1] = 1.;
  {
    for (int i = 2; i < 6 + 1; i++) {
      L[i] = 2. * (x)*L[i - 1] - L[i - 2] -
             ((x)*L[i - 1] - L[i - 2]) / ((double)i);
      dL[i] = L[i - 1] * i + dL[i - 1] * (x);
    }
  };
  *y = L[6];
  *z = dL[6];
}


x86 assembly (clang, -O0):
<LdL6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  0xee3(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xec1(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x2,-0x94(%rbp)
cmpl   $0x7,-0x94(%rbp)
jge    126d <LdL6+0x16d>
movsd  0xea2(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mov    -0x94(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x50(%rbp,%rax,8),%xmm2
mov    -0x94(%rbp),%eax
sub    $0x2,%eax
cltq
movsd  -0x50(%rbp,%rax,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mov    -0x94(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x50(%rbp,%rax,8),%xmm3
mov    -0x94(%rbp),%eax
sub    $0x2,%eax
cltq
movsd  -0x50(%rbp,%rax,8),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
cvtsi2sdl -0x94(%rbp),%xmm2
ff
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movslq -0x94(%rbp),%rax
movsd  %xmm0,-0x50(%rbp,%rax,8)
mov    -0x94(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x50(%rbp,%rax,8),%xmm0
cvtsi2sdl -0x94(%rbp),%xmm2
ff
mov    -0x94(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x90(%rbp,%rax,8),%xmm1
ff ff
mulsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x94(%rbp),%rax
movsd  %xmm0,-0x90(%rbp,%rax,8)
ff ff
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1151 <LdL6+0x51>
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LdL6>:
movapd %xmm0,%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm2
mulsd  %xmm0,%xmm2
movsd  0xee8(%rip),%xmm3
addsd  %xmm3,%xmm2
movapd %xmm0,%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
mulsd  0xed8(%rip),%xmm4
addsd  %xmm2,%xmm4
movapd %xmm1,%xmm3
addsd  %xmm0,%xmm3
movapd %xmm1,%xmm2
mulsd  %xmm4,%xmm2
subsd  %xmm0,%xmm2
movapd %xmm0,%xmm5
mulsd  %xmm4,%xmm5
subsd  %xmm0,%xmm5
movsd  0xeb4(%rip),%xmm6
divsd  %xmm6,%xmm5
subsd  %xmm5,%xmm2
mulsd  %xmm0,%xmm3
mulsd  %xmm4,%xmm6
addsd  %xmm3,%xmm6
movapd %xmm1,%xmm5
mulsd  %xmm2,%xmm5
movapd %xmm0,%xmm3
mulsd  %xmm2,%xmm3
subsd  %xmm4,%xmm3
mulsd  0xe8c(%rip),%xmm3
subsd  %xmm4,%xmm5
addsd  %xmm5,%xmm3
mulsd  %xmm0,%xmm6
movsd  0xe80(%rip),%xmm5
mulsd  %xmm2,%xmm5
addsd  %xmm6,%xmm5
movapd %xmm1,%xmm4
mulsd  %xmm3,%xmm4
subsd  %xmm2,%xmm4
movapd %xmm0,%xmm6
mulsd  %xmm3,%xmm6
subsd  %xmm2,%xmm6
movsd  0xe60(%rip),%xmm2
divsd  %xmm2,%xmm6
subsd  %xmm6,%xmm4
mulsd  %xmm0,%xmm5
mulsd  %xmm3,%xmm2
addsd  %xmm5,%xmm2
mulsd  %xmm4,%xmm1
subsd  %xmm3,%xmm1
mulsd  %xmm0,%xmm2
mulsd  %xmm4,%xmm0
subsd  %xmm3,%xmm0
movsd  0xe38(%rip),%xmm3
divsd  %xmm3,%xmm0
subsd  %xmm0,%xmm1
mulsd  %xmm3,%xmm4
addsd  %xmm2,%xmm4
movsd  %xmm1,(%rdi)
movsd  %xmm4,(%rsi)
ret

LLVM IR (-O0):
define void @LdL6(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca [7 x double]
%8 = alloca [7 x double]
%9 = alloca i32
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%10 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 0
store double 1.000000e+00, double* %10
%11 = load double, double* %4
%12 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 1
store double %11, double* %12
%13 = getelementptr inbounds [7 x double], [7 x double]* %8, i64 0, i64 0
store double 0.000000e+00, double* %13
%14 = getelementptr inbounds [7 x double], [7 x double]* %8, i64 0, i64 1
store double 1.000000e+00, double* %14
store i32 2, i32* %9
br label %15
15: ; preds = %71, %3
%16 = load i32, i32* %9
%17 = icmp slt i32 %16, 7
br i1 %17, label %18, label %74
18: ; preds = %15
%19 = load double, double* %4
%20 = fmul double 2.000000e+00, %19
%21 = load i32, i32* %9
%22 = sub nsw i32 %21, 1
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 %23
%25 = load double, double* %24
%26 = load i32, i32* %9
%27 = sub nsw i32 %26, 2
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 %28
%30 = load double, double* %29
%31 = fneg double %30
%32 = call double @llvm.fmuladd.f64(double %20, double %25, double %31)
%33 = load double, double* %4
%34 = load i32, i32* %9
%35 = sub nsw i32 %34, 1
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 %36
%38 = load double, double* %37
%39 = load i32, i32* %9
%40 = sub nsw i32 %39, 2
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 %41
%43 = load double, double* %42
%44 = fneg double %43
%45 = call double @llvm.fmuladd.f64(double %33, double %38, double %44)
%46 = load i32, i32* %9
%47 = sitofp i32 %46 to double
%48 = fdiv double %45, %47
%49 = fsub double %32, %48
%50 = load i32, i32* %9
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 %51
store double %49, double* %52
%53 = load i32, i32* %9
%54 = sub nsw i32 %53, 1
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 %55
%57 = load double, double* %56
%58 = load i32, i32* %9
%59 = sitofp i32 %58 to double
%60 = load i32, i32* %9
%61 = sub nsw i32 %60, 1
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [7 x double], [7 x double]* %8, i64 0, i64 %62
%64 = load double, double* %63
%65 = load double, double* %4
%66 = fmul double %64, %65
%67 = call double @llvm.fmuladd.f64(double %57, double %59, double %66)
%68 = load i32, i32* %9
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [7 x double], [7 x double]* %8, i64 0, i64 %69
store double %67, double* %70
br label %71
71: ; preds = %18
%72 = load i32, i32* %9
%73 = add nsw i32 %72, 1
store i32 %73, i32* %9
br label %15
74: ; preds = %15
%75 = getelementptr inbounds [7 x double], [7 x double]* %7, i64 0, i64 6
%76 = load double, double* %75
%77 = load double*, double** %5
store double %76, double* %77
%78 = getelementptr inbounds [7 x double], [7 x double]* %8, i64 0, i64 6
%79 = load double, double* %78
%80 = load double*, double** %6
store double %79, double* %80
ret void
}

LLVM IR (-O2):
define void @LdL6(double %0, double* nocapture writeonly %1, double* nocapture writeonly %2) {
%4 = fmul double %0, 2.000000e+00
%5 = tail call double @llvm.fmuladd.f64(double %4, double %0, double -1.000000e+00)
%6 = tail call double @llvm.fmuladd.f64(double %0, double %0, double -1.000000e+00)
%7 = fmul double %6, 5.000000e-01
%8 = fsub double %5, %7
%9 = tail call double @llvm.fmuladd.f64(double %0, double 2.000000e+00, double %0)
%10 = fneg double %0
%11 = tail call double @llvm.fmuladd.f64(double %4, double %8, double %10)
%12 = tail call double @llvm.fmuladd.f64(double %0, double %8, double %10)
%13 = fdiv double %12, 3.000000e+00
%14 = fsub double %11, %13
%15 = fmul double %9, %0
%16 = tail call double @llvm.fmuladd.f64(double %8, double 3.000000e+00, double %15)
%17 = fneg double %8
%18 = tail call double @llvm.fmuladd.f64(double %4, double %14, double %17)
%19 = tail call double @llvm.fmuladd.f64(double %0, double %14, double %17)
%20 = fmul double %19, 2.500000e-01
%21 = fsub double %18, %20
%22 = fmul double %16, %0
%23 = tail call double @llvm.fmuladd.f64(double %14, double 4.000000e+00, double %22)
%24 = fneg double %14
%25 = tail call double @llvm.fmuladd.f64(double %4, double %21, double %24)
%26 = tail call double @llvm.fmuladd.f64(double %0, double %21, double %24)
%27 = fdiv double %26, 5.000000e+00
%28 = fsub double %25, %27
%29 = fmul double %23, %0
%30 = tail call double @llvm.fmuladd.f64(double %21, double 5.000000e+00, double %29)
%31 = fneg double %21
%32 = tail call double @llvm.fmuladd.f64(double %4, double %28, double %31)
%33 = tail call double @llvm.fmuladd.f64(double %0, double %28, double %31)
%34 = fdiv double %33, 6.000000e+00
%35 = fsub double %32, %34
%36 = fmul double %30, %0
%37 = tail call double @llvm.fmuladd.f64(double %28, double 6.000000e+00, double %36)
store double %35, double* %1
store double %37, double* %2
ret void
}