#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 const);
double erfcc(const double x) {
  double t, z = fabs(x), ans;
  t = 2. / (2. + 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 0xf37(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xf16(%rip),%xmm1
addsd  -0x18(%rbp),%xmm1
movsd  0xf09(%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  0xec1(%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  0xe75(%rip),%xmm10
mulsd  %xmm10,%xmm9
movsd  0xe6f(%rip),%xmm10
addsd  %xmm10,%xmm9
mulsd  %xmm9,%xmm8
movsd  0xe4c(%rip),%xmm9
addsd  %xmm9,%xmm8
mulsd  %xmm8,%xmm7
movsd  0xe31(%rip),%xmm8
addsd  %xmm8,%xmm7
mulsd  %xmm7,%xmm6
movsd  0xe18(%rip),%xmm7
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm5
movsd  0xe00(%rip),%xmm6
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xde8(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xdd0(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xdb8(%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     128b <erfcc+0x17b>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    129d <erfcc+0x18d>
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),%xmm2
movapd %xmm1,%xmm0
addsd  %xmm2,%xmm0
movapd %xmm2,%xmm3
divsd  %xmm0,%xmm3
movsd  %xmm3,0x8(%rsp)
movsd  0xed4(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  0xed0(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  0xecc(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  0xec8(%rip),%xmm0
mulsd  %xmm1,%xmm1
mulsd  %xmm3,%xmm0
addsd  0xec0(%rip),%xmm0
movsd  0xe90(%rip),%xmm2
mulsd  %xmm3,%xmm0
addsd  0xeb4(%rip),%xmm0
subsd  %xmm1,%xmm2
mulsd  %xmm3,%xmm0
addsd  0xeac(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  0xea8(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  0xea4(%rip),%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0xe39(%rip),%xmm2
subsd  %xmm0,%xmm2
xorpd  %xmm1,%xmm1
cmplesd 0x10(%rsp),%xmm1
andpd  %xmm1,%xmm0
andnpd %xmm2,%xmm1
orpd   %xmm1,%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 = fadd double 2.000000e+00, %8
%10 = fdiv double 2.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 = fadd double %2, 2.000000e+00
%4 = fdiv double 2.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
}