#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double log(double);
void fade_rlong_log_value_deriv(double x, double *val, double *deriv) {
  double lnx = log(x);
  *val =
      ((((160.168566150279 * lnx + -562.47374254511) * lnx + 740.025843886255) *
            lnx +
        -453.153559518528) *
           lnx +
       130.05181593123) *
          lnx +
      -14.0813542571684;
  *deriv = ((((5 * 160.168566150279 * lnx + 4 * -562.47374254511) * lnx +
              3 * 740.025843886255) *
                 lnx +
             2 * -453.153559518528) *
                lnx +
            130.05181593123) /
           x;
}


x86 assembly (clang, -O0):
<fade_rlong_log_value_deriv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xeff(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xefb(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb9(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe74(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe87(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x20(%rbp),%xmm0
movsd  0xe5e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe5a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe35(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe18(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdfb(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  -0x8(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fade_rlong_log_value_deriv>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm0,(%rsp)
call   1030 <log@plt>
movsd  0xed4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xed0(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xecc(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xec8(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xec4(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
addsd  0xebc(%rip),%xmm1
movsd  0xebc(%rip),%xmm3
mulsd  %xmm0,%xmm3
addsd  0xeb8(%rip),%xmm3
mulsd  %xmm0,%xmm3
addsd  0xeb4(%rip),%xmm3
movsd  %xmm1,(%rbx)
mulsd  %xmm0,%xmm3
addsd  0xeac(%rip),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
divsd  (%rsp),%xmm3
movsd  %xmm3,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @fade_rlong_log_value_deriv(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%8 = load double, double* %4
%9 = call double @log(double %8)
store double %9, double* %7
%10 = load double, double* %7
%11 = call double @llvm.fmuladd.f64(double 0x40640564E4D6D526, double %10, double 0xC08193CA39880FC5)
%12 = load double, double* %7
%13 = call double @llvm.fmuladd.f64(double %11, double %12, double 0x40872034EDA3B222)
%14 = load double, double* %7
%15 = call double @llvm.fmuladd.f64(double %13, double %14, double 0xC07C5274FAD36114)
%16 = load double, double* %7
%17 = call double @llvm.fmuladd.f64(double %15, double %16, double 0x406041A879E2416E)
%18 = load double, double* %7
%19 = call double @llvm.fmuladd.f64(double %17, double %18, double 0xC02C29A743E3DB78)
%20 = load double*, double** %5
store double %19, double* %20
%21 = load double, double* %7
%22 = call double @llvm.fmuladd.f64(double 0x408906BE1E0C8A70, double %21, double 0xC0A193CA39880FC5)
%23 = load double, double* %7
%24 = call double @llvm.fmuladd.f64(double %22, double %23, double 0x40A15827B23AC59A)
%25 = load double, double* %7
%26 = call double @llvm.fmuladd.f64(double %24, double %25, double 0xC08C5274FAD36114)
%27 = load double, double* %7
%28 = call double @llvm.fmuladd.f64(double %26, double %27, double 0x406041A879E2416E)
%29 = load double, double* %4
%30 = fdiv double %28, %29
%31 = load double*, double** %6
store double %30, double* %31
ret void
}

LLVM IR (-O2):
define void @fade_rlong_log_value_deriv(double %0, double* nocapture writeonly %1, double* nocapture writeonly %2) {
%4 = tail call double @log(double %0)
%5 = tail call double @llvm.fmuladd.f64(double %4, double 0x40640564E4D6D526, double 0xC08193CA39880FC5)
%6 = tail call double @llvm.fmuladd.f64(double %5, double %4, double 0x40872034EDA3B222)
%7 = tail call double @llvm.fmuladd.f64(double %6, double %4, double 0xC07C5274FAD36114)
%8 = tail call double @llvm.fmuladd.f64(double %7, double %4, double 0x406041A879E2416E)
%9 = tail call double @llvm.fmuladd.f64(double %8, double %4, double 0xC02C29A743E3DB78)
store double %9, double* %1
%10 = tail call double @llvm.fmuladd.f64(double %4, double 0x408906BE1E0C8A70, double 0xC0A193CA39880FC5)
%11 = tail call double @llvm.fmuladd.f64(double %10, double %4, double 0x40A15827B23AC59A)
%12 = tail call double @llvm.fmuladd.f64(double %11, double %4, double 0xC08C5274FAD36114)
%13 = tail call double @llvm.fmuladd.f64(double %12, double %4, double 0x406041A879E2416E)
%14 = fdiv double %13, %0
store double %14, double* %2
ret void
}