#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_rBB_log_value_deriv(double x, double *val, double *deriv) {
  double lnx = log(x);
  *val =
      ((((222.919001825369 * lnx + -826.409671561707) * lnx + 1189.6798830102) *
            lnx +
        -834.307606917721) *
           lnx +
       285.741141861363) *
          lnx +
      -37.3180547817287;
  *deriv = ((((5 * 222.919001825369 * lnx + 4 * -826.409671561707) * lnx +
              3 * 1189.6798830102) *
                 lnx +
             2 * -834.307606917721) *
                lnx +
            285.741141861363) /
           x;
}


x86 assembly (clang, -O0):
<fade_rBB_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_rBB_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_rBB_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 0x406BDD6876841D93, double %10, double 0xC089D34701E23D10)
%12 = load double, double* %7
%13 = call double @llvm.fmuladd.f64(double %11, double %12, double 0x409296B8334077A9)
%14 = load double, double* %7
%15 = call double @llvm.fmuladd.f64(double %13, double %14, double 0xC08A1275FA9D9D15)
%16 = load double, double* %7
%17 = call double @llvm.fmuladd.f64(double %15, double %16, double 0x4071DBDBB7918403)
%18 = load double, double* %7
%19 = call double @llvm.fmuladd.f64(double %17, double %18, double 0xC042A8B604E2EE3B)
%20 = load double*, double** %5
store double %19, double* %20
%21 = load double, double* %7
%22 = call double @llvm.fmuladd.f64(double 0x40916A614A12927C, double %21, double 0xC0A9D34701E23D10)
%23 = load double, double* %7
%24 = call double @llvm.fmuladd.f64(double %22, double %23, double 0x40ABE2144CE0B37E)
%25 = load double, double* %7
%26 = call double @llvm.fmuladd.f64(double %24, double %25, double 0xC09A1275FA9D9D15)
%27 = load double, double* %7
%28 = call double @llvm.fmuladd.f64(double %26, double %27, double 0x4071DBDBB7918403)
%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_rBB_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 0x406BDD6876841D93, double 0xC089D34701E23D10)
%6 = tail call double @llvm.fmuladd.f64(double %5, double %4, double 0x409296B8334077A9)
%7 = tail call double @llvm.fmuladd.f64(double %6, double %4, double 0xC08A1275FA9D9D15)
%8 = tail call double @llvm.fmuladd.f64(double %7, double %4, double 0x4071DBDBB7918403)
%9 = tail call double @llvm.fmuladd.f64(double %8, double %4, double 0xC042A8B604E2EE3B)
store double %9, double* %1
%10 = tail call double @llvm.fmuladd.f64(double %4, double 0x40916A614A12927C, double 0xC0A9D34701E23D10)
%11 = tail call double @llvm.fmuladd.f64(double %10, double %4, double 0x40ABE2144CE0B37E)
%12 = tail call double @llvm.fmuladd.f64(double %11, double %4, double 0xC09A1275FA9D9D15)
%13 = tail call double @llvm.fmuladd.f64(double %12, double %4, double 0x4071DBDBB7918403)
%14 = fdiv double %13, %0
store double %14, double* %2
ret void
}