#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 CNDF(float InputX) {
  int sign;
  float OutputX;
  float xInput;
  float xNPrimeofX;
  float expValues;
  float xK2;
  float xK2_2, xK2_3;
  float xK2_4, xK2_5;
  float xLocal, xLocal_1;
  float xLocal_2, xLocal_3;
  if (InputX < 0.0) {
    InputX = -InputX;
    sign = 1;
  } else
    sign = 0;
  xInput = InputX;
  expValues = exp(-0.5f * InputX * InputX);
  xNPrimeofX = expValues;
  xNPrimeofX = xNPrimeofX * 0.39894228040143270286;
  xK2 = 0.2316419 * xInput;
  xK2 = 1.0 + xK2;
  xK2 = 1.0 / xK2;
  xK2_2 = xK2 * xK2;
  xK2_3 = xK2_2 * xK2;
  xK2_4 = xK2_3 * xK2;
  xK2_5 = xK2_4 * xK2;
  xLocal_1 = xK2 * 0.319381530;
  xLocal_2 = xK2_2 * (-0.356563782);
  xLocal_3 = xK2_3 * 1.781477937;
  xLocal_2 = xLocal_2 + xLocal_3;
  xLocal_3 = xK2_4 * (-1.821255978);
  xLocal_2 = xLocal_2 + xLocal_3;
  xLocal_3 = xK2_5 * 1.330274429;
  xLocal_2 = xLocal_2 + xLocal_3;
  xLocal_1 = xLocal_2 + xLocal_1;
  xLocal = xLocal_1 * xNPrimeofX;
  xLocal = 1.0 - xLocal;
  OutputX = xLocal;
  if (sign) {
    OutputX = 1.0 - OutputX;
  }
  return OutputX;
}


x86 assembly (clang, -O0):
<CNDF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1156 <CNDF+0x46>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
jmp    115d <CNDF+0x4d>
movl   $0x0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xed1(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
call   1030 <exp@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe9a(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe74(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe26(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe08(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x28(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdd6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdb0(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd8a(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x38(%rbp),%xmm0
addss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd55(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x38(%rbp),%xmm0
addss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd20(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x38(%rbp),%xmm0
addss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x38(%rbp),%xmm0
addss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x34(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x30(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xccd(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x30(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1372 <CNDF+0x262>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc9b(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CNDF>:
sub    $0x28,%rsp
movaps %xmm0,0x10(%rsp)
movaps 0xee0(%rip),%xmm1
xorps  %xmm0,%xmm1
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm2
cmpltss %xmm3,%xmm2
andps  %xmm2,%xmm1
andnps %xmm0,%xmm2
orps   %xmm1,%xmm2
movaps %xmm2,(%rsp)
movss  0xedd(%rip),%xmm0
mulss  %xmm2,%xmm0
mulss  %xmm2,%xmm0
call   1030 <exp@plt>
xorps  %xmm1,%xmm1
ucomiss 0x10(%rsp),%xmm1
cvtss2sd %xmm0,%xmm0
mulsd  0xecc(%rip),%xmm0
xorps  %xmm2,%xmm2
cvtsd2ss %xmm0,%xmm2
movaps (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xebd(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  0xe9d(%rip),%xmm1
addss  %xmm1,%xmm0
movaps %xmm1,%xmm3
divss  %xmm0,%xmm3
movaps %xmm3,%xmm0
mulss  %xmm3,%xmm0
movaps %xmm3,%xmm4
mulss  %xmm0,%xmm4
movaps %xmm3,%xmm5
cvtss2sd %xmm3,%xmm6
mulsd  0xe91(%rip),%xmm6
mulss  %xmm4,%xmm5
cvtsd2ss %xmm6,%xmm6
unpcklps %xmm4,%xmm0
cvtps2pd %xmm0,%xmm0
mulpd  0xe4b(%rip),%xmm0
mulss  %xmm5,%xmm3
cvtpd2ps %xmm0,%xmm0
movapd %xmm0,%xmm4
shufps $0x55,%xmm0,%xmm4
addss  %xmm0,%xmm4
xorps  %xmm0,%xmm0
cvtss2sd %xmm5,%xmm0
mulsd  0xe60(%rip),%xmm0
xorps  %xmm5,%xmm5
cvtsd2ss %xmm0,%xmm5
addss  %xmm4,%xmm5
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
mulsd  0xe4e(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
addss  %xmm5,%xmm0
addss  %xmm6,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
jbe    121f <CNDF+0x10f>
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define float @CNDF(float %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
store float %0, float* %2
%17 = load float, float* %2
%18 = fpext float %17 to double
%19 = fcmp olt double %18, 0.000000e+00
br i1 %19, label %20, label %23
20: ; preds = %1
%21 = load float, float* %2
%22 = fneg float %21
store float %22, float* %2
store i32 1, i32* %3
br label %24
23: ; preds = %1
store i32 0, i32* %3
br label %24
24: ; preds = %23, %20
%25 = load float, float* %2
store float %25, float* %5
%26 = load float, float* %2
%27 = fmul float -5.000000e-01, %26
%28 = load float, float* %2
%29 = fmul float %27, %28
%30 = call float @exp(float %29)
store float %30, float* %7
%31 = load float, float* %7
store float %31, float* %6
%32 = load float, float* %6
%33 = fpext float %32 to double
%34 = fmul double %33, 0x3FD9884533D43651
%35 = fptrunc double %34 to float
store float %35, float* %6
%36 = load float, float* %5
%37 = fpext float %36 to double
%38 = fmul double 0x3FCDA6711871100E, %37
%39 = fptrunc double %38 to float
store float %39, float* %8
%40 = load float, float* %8
%41 = fpext float %40 to double
%42 = fadd double 1.000000e+00, %41
%43 = fptrunc double %42 to float
store float %43, float* %8
%44 = load float, float* %8
%45 = fpext float %44 to double
%46 = fdiv double 1.000000e+00, %45
%47 = fptrunc double %46 to float
store float %47, float* %8
%48 = load float, float* %8
%49 = load float, float* %8
%50 = fmul float %48, %49
store float %50, float* %9
%51 = load float, float* %9
%52 = load float, float* %8
%53 = fmul float %51, %52
store float %53, float* %10
%54 = load float, float* %10
%55 = load float, float* %8
%56 = fmul float %54, %55
store float %56, float* %11
%57 = load float, float* %11
%58 = load float, float* %8
%59 = fmul float %57, %58
store float %59, float* %12
%60 = load float, float* %8
%61 = fpext float %60 to double
%62 = fmul double %61, 0x3FD470BF3A92F8EC
%63 = fptrunc double %62 to float
store float %63, float* %14
%64 = load float, float* %9
%65 = fpext float %64 to double
%66 = fmul double %65, 0xBFD6D1F0E5A8325B
%67 = fptrunc double %66 to float
store float %67, float* %15
%68 = load float, float* %10
%69 = fpext float %68 to double
%70 = fmul double %69, 0x3FFC80EF025F5E68
%71 = fptrunc double %70 to float
store float %71, float* %16
%72 = load float, float* %15
%73 = load float, float* %16
%74 = fadd float %72, %73
store float %74, float* %15
%75 = load float, float* %11
%76 = fpext float %75 to double
%77 = fmul double %76, 0xBFFD23DD4EF278D0
%78 = fptrunc double %77 to float
store float %78, float* %16
%79 = load float, float* %15
%80 = load float, float* %16
%81 = fadd float %79, %80
store float %81, float* %15
%82 = load float, float* %12
%83 = fpext float %82 to double
%84 = fmul double %83, 0x3FF548CDD6F42943
%85 = fptrunc double %84 to float
store float %85, float* %16
%86 = load float, float* %15
%87 = load float, float* %16
%88 = fadd float %86, %87
store float %88, float* %15
%89 = load float, float* %15
%90 = load float, float* %14
%91 = fadd float %89, %90
store float %91, float* %14
%92 = load float, float* %14
%93 = load float, float* %6
%94 = fmul float %92, %93
store float %94, float* %13
%95 = load float, float* %13
%96 = fpext float %95 to double
%97 = fsub double 1.000000e+00, %96
%98 = fptrunc double %97 to float
store float %98, float* %13
%99 = load float, float* %13
store float %99, float* %4
%100 = load i32, i32* %3
%101 = icmp ne i32 %100, 0
br i1 %101, label %102, label %107
102: ; preds = %24
%103 = load float, float* %4
%104 = fpext float %103 to double
%105 = fsub double 1.000000e+00, %104
%106 = fptrunc double %105 to float
store float %106, float* %4
br label %107
107: ; preds = %102, %24
%108 = load float, float* %4
ret float %108
}

LLVM IR (-O2):
define float @CNDF(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
%5 = fmul float %4, -5.000000e-01
%6 = fmul float %4, %5
%7 = tail call float @exp(float %6)
%8 = fpext float %7 to double
%9 = fmul double %8, 0x3FD9884533D43651
%10 = fptrunc double %9 to float
%11 = fpext float %4 to double
%12 = fmul double %11, 0x3FCDA6711871100E
%13 = fptrunc double %12 to float
%14 = fadd float %13, 1.000000e+00
%15 = fdiv float 1.000000e+00, %14
%16 = fmul float %15, %15
%17 = fmul float %15, %16
%18 = fmul float %15, %17
%19 = fmul float %15, %18
%20 = fpext float %15 to double
%21 = fmul double %20, 0x3FD470BF3A92F8EC
%22 = fptrunc double %21 to float
%23 = insertelement <2 x float> poison, float %16, i64 0
%24 = insertelement <2 x float> %23, float %17, i64 1
%25 = fpext <2 x float> %24 to <2 x double>
%26 = fmul <2 x double> %25, <double 0xBFD6D1F0E5A8325B, double 0x3FFC80EF025F5E68>
%27 = fptrunc <2 x double> %26 to <2 x float>
%28 = shufflevector <2 x float> %27, <2 x float> poison, <2 x i32> <i32 1, i32 undef>
%29 = fadd <2 x float> %28, %27
%30 = extractelement <2 x float> %29, i64 0
%31 = fpext float %18 to double
%32 = fmul double %31, 0xBFFD23DD4EF278D0
%33 = fptrunc double %32 to float
%34 = fadd float %30, %33
%35 = fpext float %19 to double
%36 = fmul double %35, 0x3FF548CDD6F42943
%37 = fptrunc double %36 to float
%38 = fadd float %34, %37
%39 = fadd float %38, %22
%40 = fmul float %39, %10
%41 = fsub float 1.000000e+00, %40
%42 = fsub float 1.000000e+00, %41
%43 = select i1 %2, float %42, float %41
ret float %43
}