#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 exp(float);
float fabs(float);
float erfcc(float x) {
  float 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    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fabs@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xf0b(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xef7(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xeeb(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea9(%rip),%xmm0
subsd  %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x8(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0x8(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  -0x8(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
movss  -0x8(%rbp),%xmm6
cvtss2sd %xmm6,%xmm6
movss  -0x8(%rbp),%xmm7
cvtss2sd %xmm7,%xmm7
movss  -0x8(%rbp),%xmm8
cvtss2sd %xmm8,%xmm8
movss  -0x8(%rbp),%xmm9
cvtss2sd %xmm9,%xmm9
movsd  0xe37(%rip),%xmm10
mulsd  %xmm10,%xmm9
movsd  0xe31(%rip),%xmm10
addsd  %xmm10,%xmm9
mulsd  %xmm9,%xmm8
movsd  0xe0e(%rip),%xmm9
addsd  %xmm9,%xmm8
mulsd  %xmm8,%xmm7
movsd  0xdf3(%rip),%xmm8
addsd  %xmm8,%xmm7
mulsd  %xmm7,%xmm6
movsd  0xdda(%rip),%xmm7
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm5
movsd  0xdc2(%rip),%xmm6
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xdaa(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xd92(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xd7a(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     12d5 <erfcc+0x1b5>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    12ef <erfcc+0x1cf>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd7a(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erfcc>:
sub    $0x28,%rsp
movaps %xmm0,0x10(%rsp)
movaps 0xee0(%rip),%xmm3
andps  %xmm0,%xmm3
cvtss2sd %xmm3,%xmm1
mulsd  0xee1(%rip),%xmm1
movsd  0xee1(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
movss  %xmm0,0xc(%rsp)
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
movsd  0xecd(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xec9(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xec5(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xec1(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xebd(%rip),%xmm1
mulss  %xmm3,%xmm3
mulsd  %xmm2,%xmm1
addsd  0xeb5(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  0xeaa(%rip),%xmm1
movsd  0xe6a(%rip),%xmm3
mulsd  %xmm2,%xmm1
addsd  0xe9e(%rip),%xmm1
subsd  %xmm0,%xmm3
mulsd  %xmm2,%xmm1
addsd  0xe96(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm3,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
call   1030 <exp@plt>
mulss  0xc(%rsp),%xmm0
movss  0xe7c(%rip),%xmm2
subss  %xmm0,%xmm2
xorps  %xmm1,%xmm1
cmpnless 0x10(%rsp),%xmm1
movaps %xmm1,%xmm3
andnps %xmm0,%xmm3
andps  %xmm2,%xmm1
orps   %xmm3,%xmm1
movaps %xmm1,%xmm0
add    $0x28,%rsp
ret

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

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