#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_rshort_log_value_deriv(double x, double *val, double *deriv) {
  double lnx = log(x);
  *val = ((((-126.548509998553 * lnx + 438.586611628675) * lnx +
            -559.689100793323) *
               lnx +
           315.57016260663) *
              lnx +
          -73.0669137757406) *
             lnx +
         5.17967058862565;
  *deriv = ((((5 * -126.548509998553 * lnx + 4 * 438.586611628675) * lnx +
              3 * -559.689100793323) *
                 lnx +
             2 * 315.57016260663) *
                lnx +
            -73.0669137757406) /
           x;
}


x86 assembly (clang, -O0):
<fade_rshort_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_rshort_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_rshort_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 0xC05FA31AC9AE541B, double %10, double 0x407B6962C2E009CC)
%12 = load double, double* %7
%13 = call double @llvm.fmuladd.f64(double %11, double %12, double 0xC0817D834746D7C2)
%14 = load double, double* %7
%15 = call double @llvm.fmuladd.f64(double %13, double %14, double 0x4073B91F62D34E0C)
%16 = load double, double* %7
%17 = call double @llvm.fmuladd.f64(double %15, double %16, double 0xC052444850B79D4C)
%18 = load double, double* %7
%19 = call double @llvm.fmuladd.f64(double %17, double %18, double 0x4014B7FB9118CD0B)
%20 = load double*, double** %5
store double %19, double* %20
%21 = load double, double* %7
%22 = call double @llvm.fmuladd.f64(double 0xC083C5F0BE0CF491, double %21, double 0x409B6962C2E009CC)
%23 = load double, double* %7
%24 = call double @llvm.fmuladd.f64(double %22, double %23, double 0xC09A3C44EAEA43A3)
%25 = load double, double* %7
%26 = call double @llvm.fmuladd.f64(double %24, double %25, double 0x4083B91F62D34E0C)
%27 = load double, double* %7
%28 = call double @llvm.fmuladd.f64(double %26, double %27, double 0xC052444850B79D4C)
%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_rshort_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 0xC05FA31AC9AE541B, double 0x407B6962C2E009CC)
%6 = tail call double @llvm.fmuladd.f64(double %5, double %4, double 0xC0817D834746D7C2)
%7 = tail call double @llvm.fmuladd.f64(double %6, double %4, double 0x4073B91F62D34E0C)
%8 = tail call double @llvm.fmuladd.f64(double %7, double %4, double 0xC052444850B79D4C)
%9 = tail call double @llvm.fmuladd.f64(double %8, double %4, double 0x4014B7FB9118CD0B)
store double %9, double* %1
%10 = tail call double @llvm.fmuladd.f64(double %4, double 0xC083C5F0BE0CF491, double 0x409B6962C2E009CC)
%11 = tail call double @llvm.fmuladd.f64(double %10, double %4, double 0xC09A3C44EAEA43A3)
%12 = tail call double @llvm.fmuladd.f64(double %11, double %4, double 0x4083B91F62D34E0C)
%13 = tail call double @llvm.fmuladd.f64(double %12, double %4, double 0xC052444850B79D4C)
%14 = fdiv double %13, %0
store double %14, double* %2
ret void
}