#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 exp(double);
double fabs(double);
double erfcc(double x) {
  double t, z, ans;
  z = fabs(x);
  t = 1.0 / (1.0 + 0.5 * z);
  ans = t * exp(-z * z - 1.26551223 +
                t * (1.00002368 +
                     t * (0.37409196 +
                          t * (0.09678418 +
                               t * (-0.18628806 +
                                    t * (0.27886807 +
                                         t * (-1.13520398 +
                                              t * (1.48851587 +
                                                   t * (-0.82215223 +
                                                        t * 0.17087277)))))))));
  return x >= 0.0 ? ans : 2.0 - ans;
}


x86 assembly (clang, -O0):
<erfcc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xf47(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  0xf19(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xf05(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xef9(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xeb1(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm4
movsd  -0x10(%rbp),%xmm5
movsd  -0x10(%rbp),%xmm6
movsd  -0x10(%rbp),%xmm7
movsd  -0x10(%rbp),%xmm8
movsd  -0x10(%rbp),%xmm9
movsd  0xe65(%rip),%xmm10
mulsd  %xmm10,%xmm9
movsd  0xe5f(%rip),%xmm10
addsd  %xmm10,%xmm9
mulsd  %xmm9,%xmm8
movsd  0xe3c(%rip),%xmm9
addsd  %xmm9,%xmm8
mulsd  %xmm8,%xmm7
movsd  0xe21(%rip),%xmm8
addsd  %xmm8,%xmm7
mulsd  %xmm7,%xmm6
movsd  0xe08(%rip),%xmm7
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm5
movsd  0xdf0(%rip),%xmm6
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xdd8(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xdc0(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xda8(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     129b <erfcc+0x18b>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    12ad <erfcc+0x19d>
movsd  0xdbd(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erfcc>:
sub    $0x28,%rsp
movapd %xmm0,0x10(%rsp)
movapd 0xede(%rip),%xmm1
andpd  %xmm0,%xmm1
movsd  0xee2(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm3
addsd  %xmm3,%xmm0
divsd  %xmm0,%xmm3
movsd  %xmm3,0x8(%rsp)
movsd  0xed8(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  0xed4(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  0xed0(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  0xecc(%rip),%xmm0
mulsd  %xmm1,%xmm1
mulsd  %xmm3,%xmm0
addsd  0xec4(%rip),%xmm0
movsd  0xe94(%rip),%xmm2
mulsd  %xmm3,%xmm0
addsd  0xeb8(%rip),%xmm0
subsd  %xmm1,%xmm2
mulsd  %xmm3,%xmm0
addsd  0xeb0(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  0xeac(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  0xea8(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0xe95(%rip),%xmm1
subsd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmplesd 0x10(%rsp),%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @erfcc(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %2
%6 = load double, double* %2
%7 = call double @llvm.fabs.f64(double %6)
store double %7, double* %4
%8 = load double, double* %4
%9 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %8, double 1.000000e+00)
%10 = fdiv double 1.000000e+00, %9
store double %10, double* %3
%11 = load double, double* %3
%12 = load double, double* %4
%13 = fneg double %12
%14 = load double, double* %4
%15 = call double @llvm.fmuladd.f64(double %13, double %14, double 0xBFF43F89C0889BC5)
%16 = load double, double* %3
%17 = load double, double* %3
%18 = load double, double* %3
%19 = load double, double* %3
%20 = load double, double* %3
%21 = load double, double* %3
%22 = load double, double* %3
%23 = load double, double* %3
%24 = load double, double* %3
%25 = call double @llvm.fmuladd.f64(double %24, double 0x3FC5DF28AF76A5A4, double 0xBFEA4F123185DEFD)
%26 = call double @llvm.fmuladd.f64(double %23, double %25, double 0x3FF7D0F60453A1BE)
%27 = call double @llvm.fmuladd.f64(double %22, double %26, double 0xBFF229CBA6063980)
%28 = call double @llvm.fmuladd.f64(double %21, double %27, double 0x3FD1D8F976231CE6)
%29 = call double @llvm.fmuladd.f64(double %20, double %28, double 0xBFC7D84982AAEAA5)
%30 = call double @llvm.fmuladd.f64(double %19, double %29, double 0x3FB8C6D917DEC3F0)
%31 = call double @llvm.fmuladd.f64(double %18, double %30, double 0x3FD7F11F677960EA)
%32 = call double @llvm.fmuladd.f64(double %17, double %31, double 0x3FF00018D48D3588)
%33 = call double @llvm.fmuladd.f64(double %16, double %32, double %15)
%34 = call double @exp(double %33)
%35 = fmul double %11, %34
store double %35, double* %5
%36 = load double, double* %2
%37 = fcmp oge double %36, 0.000000e+00
br i1 %37, label %38, label %40
38: ; preds = %1
%39 = load double, double* %5
br label %43
40: ; preds = %1
%41 = load double, double* %5
%42 = fsub double 2.000000e+00, %41
br label %43
43: ; preds = %40, %38
%44 = phi double [ %39, %38 ], [ %42, %40 ]
ret double %44
}

LLVM IR (-O2):
define double @erfcc(double %0) {
%2 = tail call double @llvm.fabs.f64(double %0)
%3 = tail call double @llvm.fmuladd.f64(double %2, double 5.000000e-01, double 1.000000e+00)
%4 = fdiv double 1.000000e+00, %3
%5 = fneg double %2
%6 = tail call double @llvm.fmuladd.f64(double %5, double %2, double 0xBFF43F89C0889BC5)
%7 = tail call double @llvm.fmuladd.f64(double %4, double 0x3FC5DF28AF76A5A4, double 0xBFEA4F123185DEFD)
%8 = tail call double @llvm.fmuladd.f64(double %4, double %7, double 0x3FF7D0F60453A1BE)
%9 = tail call double @llvm.fmuladd.f64(double %4, double %8, double 0xBFF229CBA6063980)
%10 = tail call double @llvm.fmuladd.f64(double %4, double %9, double 0x3FD1D8F976231CE6)
%11 = tail call double @llvm.fmuladd.f64(double %4, double %10, double 0xBFC7D84982AAEAA5)
%12 = tail call double @llvm.fmuladd.f64(double %4, double %11, double 0x3FB8C6D917DEC3F0)
%13 = tail call double @llvm.fmuladd.f64(double %4, double %12, double 0x3FD7F11F677960EA)
%14 = tail call double @llvm.fmuladd.f64(double %4, double %13, double 0x3FF00018D48D3588)
%15 = tail call double @llvm.fmuladd.f64(double %4, double %14, double %6)
%16 = tail call double @exp(double %15)
%17 = fmul double %4, %16
%18 = fcmp oge double %0, 0.000000e+00
%19 = fsub double 2.000000e+00, %17
%20 = select i1 %18, double %17, double %19
ret double %20
}