#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)))))))));
  if (x >= 0.0)
    return (ans);
  else
    return (2.0 - ans);
}


x86 assembly (clang, -O0):
<erfcc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%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,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea9(%rip),%xmm0
subsd  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0xc(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0xc(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movss  -0xc(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
movss  -0xc(%rbp),%xmm6
cvtss2sd %xmm6,%xmm6
movss  -0xc(%rbp),%xmm7
cvtss2sd %xmm7,%xmm7
movss  -0xc(%rbp),%xmm8
cvtss2sd %xmm8,%xmm8
movss  -0xc(%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  -0x18(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     12d1 <erfcc+0x1b1>
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    12ef <erfcc+0x1cf>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd7e(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%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
%6 = alloca float
store float %0, float* %3
%7 = load float, float* %3
%8 = call float @fabs(float %7)
store float %8, float* %5
%9 = load float, float* %5
%10 = fpext float %9 to double
%11 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %10, double 1.000000e+00)
%12 = fdiv double 1.000000e+00, %11
%13 = fptrunc double %12 to float
store float %13, float* %4
%14 = load float, float* %4
%15 = load float, float* %5
%16 = fneg float %15
%17 = load float, float* %5
%18 = fmul float %16, %17
%19 = fpext float %18 to double
%20 = fsub double %19, 0x3FF43F89C0889BC5
%21 = load float, float* %4
%22 = fpext float %21 to double
%23 = load float, float* %4
%24 = fpext float %23 to double
%25 = load float, float* %4
%26 = fpext float %25 to double
%27 = load float, float* %4
%28 = fpext float %27 to double
%29 = load float, float* %4
%30 = fpext float %29 to double
%31 = load float, float* %4
%32 = fpext float %31 to double
%33 = load float, float* %4
%34 = fpext float %33 to double
%35 = load float, float* %4
%36 = fpext float %35 to double
%37 = load float, float* %4
%38 = fpext float %37 to double
%39 = call double @llvm.fmuladd.f64(double %38, double 0x3FC5DF28AF76A5A4, double 0xBFEA4F123185DEFD)
%40 = call double @llvm.fmuladd.f64(double %36, double %39, double 0x3FF7D0F60453A1BE)
%41 = call double @llvm.fmuladd.f64(double %34, double %40, double 0xBFF229CBA6063980)
%42 = call double @llvm.fmuladd.f64(double %32, double %41, double 0x3FD1D8F976231CE6)
%43 = call double @llvm.fmuladd.f64(double %30, double %42, double 0xBFC7D84982AAEAA5)
%44 = call double @llvm.fmuladd.f64(double %28, double %43, double 0x3FB8C6D917DEC3F0)
%45 = call double @llvm.fmuladd.f64(double %26, double %44, double 0x3FD7F11F677960EA)
%46 = call double @llvm.fmuladd.f64(double %24, double %45, double 0x3FF00018D48D3588)
%47 = call double @llvm.fmuladd.f64(double %22, double %46, double %20)
%48 = fptrunc double %47 to float
%49 = call float @exp(float %48)
%50 = fmul float %14, %49
store float %50, float* %6
%51 = load float, float* %3
%52 = fpext float %51 to double
%53 = fcmp oge double %52, 0.000000e+00
br i1 %53, label %54, label %56
54: ; preds = %1
%55 = load float, float* %6
store float %55, float* %2
br label %61
56: ; preds = %1
%57 = load float, float* %6
%58 = fpext float %57 to double
%59 = fsub double 2.000000e+00, %58
%60 = fptrunc double %59 to float
store float %60, float* %2
br label %61
61: ; preds = %56, %54
%62 = load float, float* %2
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
}