#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 */
float log(float);
float ntc10_R2T(float r) {
  float log_r = log(r);
  return 440.61073 - 75.69303 * log_r + 4.20199 * log_r * log_r -
         0.09586 * log_r * log_r * log_r;
}


x86 assembly (clang, -O0):
<ntc10_R2T>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <log@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xecf(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xeaa(%rip),%xmm1
mulsd  %xmm2,%xmm1
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xe7c(%rip),%xmm0
mulsd  %xmm2,%xmm0
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntc10_R2T>:
push   %rax
call   1030 <log@plt>
cvtss2sd %xmm0,%xmm0
movsd  0xede(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeda(%rip),%xmm1
movsd  0xeda(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  0xece(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @ntc10_R2T(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = call float @log(float %4)
store float %5, float* %3
%6 = load float, float* %3
%7 = fpext float %6 to double
%8 = call double @llvm.fmuladd.f64(double 0xC052EC5A9A804966, double %7, double 0x407B89C58CD20AFA)
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = fmul double 4.201990e+00, %10
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = call double @llvm.fmuladd.f64(double %11, double %13, double %8)
%15 = load float, float* %3
%16 = fpext float %15 to double
%17 = fmul double 9.586000e-02, %16
%18 = load float, float* %3
%19 = fpext float %18 to double
%20 = fmul double %17, %19
%21 = load float, float* %3
%22 = fpext float %21 to double
%23 = fneg double %20
%24 = call double @llvm.fmuladd.f64(double %23, double %22, double %14)
%25 = fptrunc double %24 to float
ret float %25
}

LLVM IR (-O2):
define float @ntc10_R2T(float %0) {
%2 = tail call float @log(float %0)
%3 = fpext float %2 to double
%4 = tail call double @llvm.fmuladd.f64(double %3, double 0xC052EC5A9A804966, double 0x407B89C58CD20AFA)
%5 = fmul double %3, 4.201990e+00
%6 = tail call double @llvm.fmuladd.f64(double %5, double %3, double %4)
%7 = fmul double %3, -9.586000e-02
%8 = fmul double %7, %3
%9 = tail call double @llvm.fmuladd.f64(double %8, double %3, double %6)
%10 = fptrunc double %9 to float
ret float %10
}