#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 */
typedef int uint32_t;

/* Variables and functions */
float const fasterpow2(float);
float fastpow2(float const);
float fasterfc(float x) {
  static const float k = 3.3509633149424609f;
  static const float a = 0.07219054755431126f;
  static const float b = 15.418191568719577f;
  static const float c = 5.609846028328545f;
  union {
    float f;
    uint32_t i;
  } vc = {c * x};
  float xsq = x * x;
  float xquad = xsq * xsq;
  vc.i |= 0x80000000;
  return 2.0f / (1.0f + fastpow2(k * x)) -
         a * x * (b * xquad - 1.0f) * fasterpow2(vc.f);
}


x86 assembly (clang, -O0):
<fasterfc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xee3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     $0x80000000,%eax
mov    %eax,-0x8(%rbp)
movss  0xea4(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
call   1030 <fastpow2@plt>
movss  0xe8e(%rip),%xmm1
addss  %xmm0,%xmm1
movss  0xe7e(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xe69(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  0xe4f(%rip),%xmm2
mulss  %xmm2,%xmm1
movss  0xe47(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
call   1040 <fasterpow2@plt>
movss  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fasterfc>:
sub    $0x28,%rsp
movss  0xed4(%rip),%xmm2
mulss  %xmm0,%xmm2
movaps %xmm0,%xmm3
movaps %xmm0,%xmm1
movss  %xmm0,0xc(%rsp)
mulss  %xmm0,%xmm3
mulss  %xmm3,%xmm3
movss  %xmm3,0x4(%rsp)
orps   0xecf(%rip),%xmm2
movaps %xmm2,0x10(%rsp)
movss  0xea6(%rip),%xmm0
mulss  %xmm1,%xmm0
call   1030 <fastpow2@plt>
addss  0xe99(%rip),%xmm0
movss  0xe95(%rip),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,0x8(%rsp)
movss  0x4(%rsp),%xmm0
mulss  0xe81(%rip),%xmm0
addss  0xe7d(%rip),%xmm0
movss  %xmm0,0x4(%rsp)
movaps 0x10(%rsp),%xmm0
call   1040 <fasterpow2@plt>
movss  0xc(%rsp),%xmm1
mulss  0xe63(%rip),%xmm1
mulss  0x4(%rsp),%xmm1
mulss  %xmm1,%xmm0
addss  0x8(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
%union.anon = type { float }
@fasterfc.k = internal constant float 0x400ACEC5E0000000
@fasterfc.a = internal constant float 0x3FB27B1460000000
@fasterfc.b = internal constant float 0x402ED61D40000000
@fasterfc.c = internal constant float 0x4016707B80000000
define float @fasterfc(float %0) {
%2 = alloca float
%3 = alloca %union.anon
%4 = alloca float
%5 = alloca float
store float %0, float* %2
%6 = bitcast %union.anon* %3 to float*
%7 = load float, float* %2
%8 = fmul float 0x4016707B80000000, %7
store float %8, float* %6
%9 = load float, float* %2
%10 = load float, float* %2
%11 = fmul float %9, %10
store float %11, float* %4
%12 = load float, float* %4
%13 = load float, float* %4
%14 = fmul float %12, %13
store float %14, float* %5
%15 = bitcast %union.anon* %3 to i32*
%16 = load i32, i32* %15
%17 = or i32 %16, -2147483648
store i32 %17, i32* %15
%18 = load float, float* %2
%19 = fmul float 0x400ACEC5E0000000, %18
%20 = call float @fastpow2(float %19)
%21 = fadd float 1.000000e+00, %20
%22 = fdiv float 2.000000e+00, %21
%23 = load float, float* %2
%24 = fmul float 0x3FB27B1460000000, %23
%25 = load float, float* %5
%26 = call float @llvm.fmuladd.f32(float 0x402ED61D40000000, float %25, float -1.000000e+00)
%27 = fmul float %24, %26
%28 = bitcast %union.anon* %3 to float*
%29 = load float, float* %28
%30 = call float @fasterpow2(float %29)
%31 = fneg float %27
%32 = call float @llvm.fmuladd.f32(float %31, float %30, float %22)
ret float %32
}

LLVM IR (-O2):
define float @fasterfc(float %0) {
%2 = fmul float %0, 0x4016707B80000000
%3 = fmul float %0, %0
%4 = fmul float %3, %3
%5 = bitcast float %2 to i32
%6 = or i32 %5, -2147483648
%7 = bitcast i32 %6 to float
%8 = fmul float %0, 0x400ACEC5E0000000
%9 = tail call float @fastpow2(float %8)
%10 = fadd float %9, 1.000000e+00
%11 = fdiv float 2.000000e+00, %10
%12 = tail call float @llvm.fmuladd.f32(float %4, float 0x402ED61D40000000, float -1.000000e+00)
%13 = tail call float @fasterpow2(float %7)
%14 = fmul float %0, 0xBFB27B1460000000
%15 = fmul float %14, %12
%16 = tail call float @llvm.fmuladd.f32(float %15, float %13, float %11)
ret float %16
}