#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 pow(double, double);
double paw_my_erf(double x) {
  double f;
  f = (1.0 + x * (0.0705230784 +
                  x * (0.0422820123 +
                       x * (0.0092705272 +
                            x * (0.0001520143 +
                                 x * (0.0002765672 + x * 0.0000430638))))));
  f = 1.0 / pow(f, 16.0);
  f = 1.0 - f;
  return f;
}


x86 assembly (clang, -O0):
<paw_my_erf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm3
movsd  -0x8(%rbp),%xmm4
movsd  -0x8(%rbp),%xmm5
movsd  0xeed(%rip),%xmm6
mulsd  %xmm6,%xmm5
movsd  0xee9(%rip),%xmm6
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xec9(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xeb1(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe99(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe81(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe61(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe53(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe3b(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe2a(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<paw_my_erf>:
push   %rax
movsd  0xee7(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee3(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xedf(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xedb(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xed7(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xed3(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xecf(%rip),%xmm0
movsd  0xecf(%rip),%xmm1
call   1030 <pow@plt>
movsd  0xeba(%rip),%xmm2
movapd %xmm2,%xmm1
divsd  %xmm0,%xmm1
subsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @paw_my_erf(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = load double, double* %2
%8 = load double, double* %2
%9 = load double, double* %2
%10 = call double @llvm.fmuladd.f64(double %9, double 4.306380e-05, double 0x3F3220071442EE6C)
%11 = call double @llvm.fmuladd.f64(double %8, double %10, double 0x3F23ECC0E4E05F94)
%12 = call double @llvm.fmuladd.f64(double %7, double %11, double 0x3F82FC6D19201C06)
%13 = call double @llvm.fmuladd.f64(double %6, double %12, double 0x3FA5A5FCE8133C57)
%14 = call double @llvm.fmuladd.f64(double %5, double %13, double 0x3FB20DCCEB575BC4)
%15 = call double @llvm.fmuladd.f64(double %4, double %14, double 1.000000e+00)
store double %15, double* %3
%16 = load double, double* %3
%17 = call double @pow(double %16, double 1.600000e+01)
%18 = fdiv double 1.000000e+00, %17
store double %18, double* %3
%19 = load double, double* %3
%20 = fsub double 1.000000e+00, %19
store double %20, double* %3
%21 = load double, double* %3
ret double %21
}

LLVM IR (-O2):
define double @paw_my_erf(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 4.306380e-05, double 0x3F3220071442EE6C)
%3 = tail call double @llvm.fmuladd.f64(double %0, double %2, double 0x3F23ECC0E4E05F94)
%4 = tail call double @llvm.fmuladd.f64(double %0, double %3, double 0x3F82FC6D19201C06)
%5 = tail call double @llvm.fmuladd.f64(double %0, double %4, double 0x3FA5A5FCE8133C57)
%6 = tail call double @llvm.fmuladd.f64(double %0, double %5, double 0x3FB20DCCEB575BC4)
%7 = tail call double @llvm.fmuladd.f64(double %0, double %6, double 1.000000e+00)
%8 = tail call double @pow(double %7, double 1.600000e+01)
%9 = fdiv double 1.000000e+00, %8
%10 = fsub double 1.000000e+00, %9
ret double %10
}