#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 fabsf(float);
float logf(float);
float MoroInvCND(float P) {
  const float a1 = 2.50662823884f;
  const float a2 = -18.61500062529f;
  const float a3 = 41.39119773534f;
  const float a4 = -25.44106049637f;
  const float b1 = -8.4735109309f;
  const float b2 = 23.08336743743f;
  const float b3 = -21.06224101826f;
  const float b4 = 3.13082909833f;
  const float c1 = 0.337475482272615f;
  const float c2 = 0.976169019091719f;
  const float c3 = 0.160797971491821f;
  const float c4 = 2.76438810333863E-02f;
  const float c5 = 3.8405729373609E-03f;
  const float c6 = 3.951896511919E-04f;
  const float c7 = 3.21767881768E-05f;
  const float c8 = 2.888167364E-07f;
  const float c9 = 3.960315187E-07f;
  float y, z;
  if (P <= 0 || P >= 1.0f)
    return (float)(0x7FFFFFFF);
  y = P - 0.5f;
  if (fabsf(y) < 0.42f) {
    z = y * y;
    z = y * (((a4 * z + a3) * z + a2) * z + a1) /
        ((((b4 * z + b3) * z + b2) * z + b1) * z + 1.0f);
  } else {
    if (y > 0)
      z = logf(-logf(1.0f - P));
    else
      z = logf(-logf(P));
    z = c1 +
        z * (c2 +
             z * (c3 +
                  z * (c4 +
                       z * (c5 + z * (c6 + z * (c7 + z * (c8 + z * c9)))))));
    if (y < 0)
      z = -z;
  }
  return z;
}


x86 assembly (clang, -O0):
<MoroInvCND>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movss  %xmm0,-0x8(%rbp)
movss  0xf1b(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xf0a(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xef9(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xee8(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xed7(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xec6(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xeb5(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  0xea4(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  0xe93(%rip),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  0xe82(%rip),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  0xe71(%rip),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  0xe60(%rip),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  0xe4f(%rip),%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  0xe3e(%rip),%xmm0
movss  %xmm0,-0x40(%rbp)
movss  0xe2d(%rip),%xmm0
movss  %xmm0,-0x44(%rbp)
movss  0xe1c(%rip),%xmm0
movss  %xmm0,-0x48(%rbp)
movss  0xe0b(%rip),%xmm0
movss  %xmm0,-0x4c(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jae    121d <MoroInvCND+0x10d>
movss  -0x8(%rbp),%xmm0
movss  0xe30(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     122f <MoroInvCND+0x11f>
movss  0xe2b(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    147b <MoroInvCND+0x36b>
movss  -0x8(%rbp),%xmm0
movss  0xe10(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x50(%rbp),%xmm1
movaps 0xe0f(%rip),%xmm0
pand   %xmm0,%xmm1
movss  0xdeb(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    132f <MoroInvCND+0x21f>
movss  -0x50(%rbp),%xmm0
mulss  -0x50(%rbp),%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x50(%rbp),%xmm0
movss  -0x54(%rbp),%xmm1
movss  0xdad(%rip),%xmm2
mulss  %xmm2,%xmm1
movss  0xda5(%rip),%xmm2
addss  %xmm2,%xmm1
movss  -0x54(%rbp),%xmm2
mulss  %xmm2,%xmm1
movss  0xd94(%rip),%xmm2
addss  %xmm2,%xmm1
movss  -0x54(%rbp),%xmm2
mulss  %xmm2,%xmm1
movss  0xd83(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  -0x54(%rbp),%xmm1
movss  0xd52(%rip),%xmm2
mulss  %xmm2,%xmm1
movss  0xd4a(%rip),%xmm2
addss  %xmm2,%xmm1
movss  -0x54(%rbp),%xmm2
mulss  %xmm2,%xmm1
movss  0xd39(%rip),%xmm2
addss  %xmm2,%xmm1
movss  -0x54(%rbp),%xmm2
mulss  %xmm2,%xmm1
movss  0xd28(%rip),%xmm2
addss  %xmm2,%xmm1
movss  -0x54(%rbp),%xmm2
mulss  %xmm2,%xmm1
movss  0xd27(%rip),%xmm2
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp)
jmp    1471 <MoroInvCND+0x361>
movss  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    136e <MoroInvCND+0x25e>
movss  0xcfc(%rip),%xmm0
subss  -0x8(%rbp),%xmm0
call   1030 <logf@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1030 <logf@plt>
movss  %xmm0,-0x54(%rbp)
jmp    138f <MoroInvCND+0x27f>
movss  -0x8(%rbp),%xmm0
call   1030 <logf@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1030 <logf@plt>
movss  %xmm0,-0x54(%rbp)
movss  -0x54(%rbp),%xmm0
movss  -0x54(%rbp),%xmm1
movss  -0x54(%rbp),%xmm2
movss  -0x54(%rbp),%xmm3
movss  -0x54(%rbp),%xmm4
movss  -0x54(%rbp),%xmm5
movss  -0x54(%rbp),%xmm6
movss  -0x54(%rbp),%xmm7
movss  0xc40(%rip),%xmm8
mulss  %xmm8,%xmm7
movss  0xc36(%rip),%xmm8
addss  %xmm8,%xmm7
mulss  %xmm7,%xmm6
movss  0xc29(%rip),%xmm7
addss  %xmm7,%xmm6
mulss  %xmm6,%xmm5
movss  0xc1d(%rip),%xmm6
addss  %xmm6,%xmm5
mulss  %xmm5,%xmm4
movss  0xc11(%rip),%xmm5
addss  %xmm5,%xmm4
mulss  %xmm4,%xmm3
movss  0xc05(%rip),%xmm4
addss  %xmm4,%xmm3
mulss  %xmm3,%xmm2
movss  0xbf9(%rip),%xmm3
addss  %xmm3,%xmm2
mulss  %xmm2,%xmm1
movss  0xbed(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  0xbe1(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x50(%rbp),%xmm0
jbe    146c <MoroInvCND+0x35c>
movss  -0x54(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x54(%rbp)
jmp    1471 <MoroInvCND+0x361>
movss  -0x54(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MoroInvCND>:
sub    $0x18,%rsp
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
movss  0xedb(%rip),%xmm0
jae    1280 <MoroInvCND+0x170>
ucomiss 0xed2(%rip),%xmm1
jae    1280 <MoroInvCND+0x170>
movss  0xec8(%rip),%xmm3
addss  %xmm1,%xmm3
movaps 0xf15(%rip),%xmm0
andps  %xmm3,%xmm0
movss  0xeb6(%rip),%xmm2
ucomiss %xmm0,%xmm2
jbe    11d3 <MoroInvCND+0xc3>
movaps %xmm3,%xmm1
mulss  %xmm3,%xmm1
movss  0xeca(%rip),%xmm0
mulss  %xmm1,%xmm0
addss  0xec2(%rip),%xmm0
mulss  %xmm1,%xmm0
addss  0xeba(%rip),%xmm0
mulss  %xmm1,%xmm0
addss  0xeb2(%rip),%xmm0
movss  0xeae(%rip),%xmm2
mulss  %xmm1,%xmm2
addss  0xea6(%rip),%xmm2
mulss  %xmm1,%xmm2
addss  0xe9e(%rip),%xmm2
mulss  %xmm3,%xmm0
mulss  %xmm1,%xmm2
addss  0xe92(%rip),%xmm2
mulss  %xmm1,%xmm2
addss  0xe3a(%rip),%xmm2
divss  %xmm2,%xmm0
add    $0x18,%rsp
ret
movss  0xe29(%rip),%xmm2
subss  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cmpltss %xmm3,%xmm0
andps  %xmm0,%xmm2
andnps %xmm1,%xmm0
orps   %xmm2,%xmm0
movaps %xmm3,(%rsp)
call   1030 <logf@plt>
xorps  0xe70(%rip),%xmm0
call   1030 <logf@plt>
movaps %xmm0,%xmm1
movss  0xe00(%rip),%xmm0
mulss  %xmm1,%xmm0
addss  0xdf8(%rip),%xmm0
mulss  %xmm1,%xmm0
addss  0xdf0(%rip),%xmm0
mulss  %xmm1,%xmm0
addss  0xde8(%rip),%xmm0
mulss  %xmm1,%xmm0
addss  0xde0(%rip),%xmm0
mulss  %xmm1,%xmm0
addss  0xdd8(%rip),%xmm0
mulss  %xmm1,%xmm0
addss  0xdd0(%rip),%xmm0
mulss  %xmm1,%xmm0
addss  0xdc8(%rip),%xmm0
mulss  %xmm1,%xmm0
addss  0xdc0(%rip),%xmm0
xorps  %xmm1,%xmm1
ucomiss (%rsp),%xmm1
jbe    1280 <MoroInvCND+0x170>
xorps  0xdf0(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @MoroInvCND(float %0) {
%2 = alloca float
%3 = alloca float
%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
%17 = alloca float
%18 = alloca float
%19 = alloca float
%20 = alloca float
%21 = alloca float
%22 = alloca float
store float %0, float* %3
store float 0x40040D9320000000, float* %4
store float 0xC0329D70A0000000, float* %5
store float 0x4044B212C0000000, float* %6
store float 0xC03970E960000000, float* %7
store float 0xC020F27000000000, float* %8
store float 0x40371557A0000000, float* %9
store float 0xC0350FEF00000000, float* %10
store float 0x40090BF020000000, float* %11
store float 0x3FD59932C0000000, float* %12
store float 0x3FEF3CC6C0000000, float* %13
store float 0x3FC4950720000000, float* %14
store float 0x3F9C4EAD80000000, float* %15
store float 0x3F6F7643E0000000, float* %16
store float 0x3F39E62EA0000000, float* %17
store float 0x3F00DEB200000000, float* %18
store float 0x3E9361D580000000, float* %19
store float 0x3E9A93C500000000, float* %20
%23 = load float, float* %3
%24 = fcmp ole float %23, 0.000000e+00
br i1 %24, label %28, label %25
25: ; preds = %1
%26 = load float, float* %3
%27 = fcmp oge float %26, 1.000000e+00
br i1 %27, label %28, label %29
28: ; preds = %25, %1
store float 0x41E0000000000000, float* %2
br label %95
29: ; preds = %25
%30 = load float, float* %3
%31 = fsub float %30, 5.000000e-01
store float %31, float* %21
%32 = load float, float* %21
%33 = call float @llvm.fabs.f32(float %32)
%34 = fcmp olt float %33, 0x3FDAE147A0000000
br i1 %34, label %35, label %56
35: ; preds = %29
%36 = load float, float* %21
%37 = load float, float* %21
%38 = fmul float %36, %37
store float %38, float* %22
%39 = load float, float* %21
%40 = load float, float* %22
%41 = call float @llvm.fmuladd.f32(float 0xC03970E960000000, float %40, float 0x4044B212C0000000)
%42 = load float, float* %22
%43 = call float @llvm.fmuladd.f32(float %41, float %42, float 0xC0329D70A0000000)
%44 = load float, float* %22
%45 = call float @llvm.fmuladd.f32(float %43, float %44, float 0x40040D9320000000)
%46 = fmul float %39, %45
%47 = load float, float* %22
%48 = call float @llvm.fmuladd.f32(float 0x40090BF020000000, float %47, float 0xC0350FEF00000000)
%49 = load float, float* %22
%50 = call float @llvm.fmuladd.f32(float %48, float %49, float 0x40371557A0000000)
%51 = load float, float* %22
%52 = call float @llvm.fmuladd.f32(float %50, float %51, float 0xC020F27000000000)
%53 = load float, float* %22
%54 = call float @llvm.fmuladd.f32(float %52, float %53, float 1.000000e+00)
%55 = fdiv float %46, %54
store float %55, float* %22
br label %93
56: ; preds = %29
%57 = load float, float* %21
%58 = fcmp ogt float %57, 0.000000e+00
br i1 %58, label %59, label %65
59: ; preds = %56
%60 = load float, float* %3
%61 = fsub float 1.000000e+00, %60
%62 = call float @logf(float %61)
%63 = fneg float %62
%64 = call float @logf(float %63)
store float %64, float* %22
br label %70
65: ; preds = %56
%66 = load float, float* %3
%67 = call float @logf(float %66)
%68 = fneg float %67
%69 = call float @logf(float %68)
store float %69, float* %22
br label %70
70: ; preds = %65, %59
%71 = load float, float* %22
%72 = load float, float* %22
%73 = load float, float* %22
%74 = load float, float* %22
%75 = load float, float* %22
%76 = load float, float* %22
%77 = load float, float* %22
%78 = load float, float* %22
%79 = call float @llvm.fmuladd.f32(float %78, float 0x3E9A93C500000000, float 0x3E9361D580000000)
%80 = call float @llvm.fmuladd.f32(float %77, float %79, float 0x3F00DEB200000000)
%81 = call float @llvm.fmuladd.f32(float %76, float %80, float 0x3F39E62EA0000000)
%82 = call float @llvm.fmuladd.f32(float %75, float %81, float 0x3F6F7643E0000000)
%83 = call float @llvm.fmuladd.f32(float %74, float %82, float 0x3F9C4EAD80000000)
%84 = call float @llvm.fmuladd.f32(float %73, float %83, float 0x3FC4950720000000)
%85 = call float @llvm.fmuladd.f32(float %72, float %84, float 0x3FEF3CC6C0000000)
%86 = call float @llvm.fmuladd.f32(float %71, float %85, float 0x3FD59932C0000000)
store float %86, float* %22
%87 = load float, float* %21
%88 = fcmp olt float %87, 0.000000e+00
br i1 %88, label %89, label %92
89: ; preds = %70
%90 = load float, float* %22
%91 = fneg float %90
store float %91, float* %22
br label %92
92: ; preds = %89, %70
br label %93
93: ; preds = %92, %35
%94 = load float, float* %22
store float %94, float* %2
br label %95
95: ; preds = %93, %28
%96 = load float, float* %2
ret float %96
}

LLVM IR (-O2):
define float @MoroInvCND(float %0) {
%2 = fcmp ole float %0, 0.000000e+00
%3 = fcmp oge float %0, 1.000000e+00
%4 = or i1 %2, %3
br i1 %4, label %38, label %5
5: ; preds = %1
%6 = fadd float %0, -5.000000e-01
%7 = tail call float @llvm.fabs.f32(float %6)
%8 = fcmp olt float %7, 0x3FDAE147A0000000
br i1 %8, label %9, label %20
9: ; preds = %5
%10 = fmul float %6, %6
%11 = tail call float @llvm.fmuladd.f32(float %10, float 0xC03970E960000000, float 0x4044B212C0000000)
%12 = tail call float @llvm.fmuladd.f32(float %11, float %10, float 0xC0329D70A0000000)
%13 = tail call float @llvm.fmuladd.f32(float %12, float %10, float 0x40040D9320000000)
%14 = fmul float %6, %13
%15 = tail call float @llvm.fmuladd.f32(float %10, float 0x40090BF020000000, float 0xC0350FEF00000000)
%16 = tail call float @llvm.fmuladd.f32(float %15, float %10, float 0x40371557A0000000)
%17 = tail call float @llvm.fmuladd.f32(float %16, float %10, float 0xC020F27000000000)
%18 = tail call float @llvm.fmuladd.f32(float %17, float %10, float 1.000000e+00)
%19 = fdiv float %14, %18
br label %38
20: ; preds = %5
%21 = fcmp ogt float %6, 0.000000e+00
%22 = fsub float 1.000000e+00, %0
%23 = select i1 %21, float %22, float %0
%24 = tail call float @logf(float %23)
%25 = fneg float %24
%26 = tail call float @logf(float %25)
%27 = tail call float @llvm.fmuladd.f32(float %26, float 0x3E9A93C500000000, float 0x3E9361D580000000)
%28 = tail call float @llvm.fmuladd.f32(float %26, float %27, float 0x3F00DEB200000000)
%29 = tail call float @llvm.fmuladd.f32(float %26, float %28, float 0x3F39E62EA0000000)
%30 = tail call float @llvm.fmuladd.f32(float %26, float %29, float 0x3F6F7643E0000000)
%31 = tail call float @llvm.fmuladd.f32(float %26, float %30, float 0x3F9C4EAD80000000)
%32 = tail call float @llvm.fmuladd.f32(float %26, float %31, float 0x3FC4950720000000)
%33 = tail call float @llvm.fmuladd.f32(float %26, float %32, float 0x3FEF3CC6C0000000)
%34 = tail call float @llvm.fmuladd.f32(float %26, float %33, float 0x3FD59932C0000000)
%35 = fcmp olt float %6, 0.000000e+00
br i1 %35, label %36, label %38
36: ; preds = %20
%37 = fneg float %34
br label %38
38: ; preds = %9, %36, %20, %1
%39 = phi float [ 0x41E0000000000000, %1 ], [ %19, %9 ], [ %37, %36 ], [ %34, %20 ]
ret float %39
}