#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 */
int /*<<< orphan*/ assert(int);
double fabs(double);
int /*<<< orphan*/ log(double);
double sqrt(int /*<<< orphan*/);
double pt_norm(double p) {
  double q, r, ret;
  assert(p > 0.0 && p < 1.0);
  q = p - 0.5;
  if (fabs(q) <= 0.425) {
    r = 0.180625 - q * q;
    return q *
           (((((((2.5090809287301226727e3 * r + 3.3430575583588128105e4) * r +
                 6.7265770927008700853e4) *
                    r +
                4.5921953931549871457e4) *
                   r +
               1.3731693765509461125e4) *
                  r +
              1.9715909503065514427e3) *
                 r +
             1.3314166789178437745e2) *
                r +
            3.3871328727963666080e0) /
           (((((((5.2264952788528545610e3 * r + 2.8729085735721942674e4) * r +
                 3.9307895800092710610e4) *
                    r +
                2.1213794301586595867e4) *
                   r +
               5.3941960214247511077e3) *
                  r +
              6.8718700749205790830e2) *
                 r +
             4.2313330701600911252e1) *
                r +
            1.0);
  } else {
    if (q < 0.0) {
      r = p;
    } else {
      r = 1.0 - p;
    }
    assert(r > 0.0);
    r = sqrt(-log(r));
    if (r <= 5.0) {
      r -= 1.6;
      ret = ((((((((7.74545014278341407640e-4 * r + 2.27238449892691845833e-2) *
                       r +
                   2.41780725177450611770e-1) *
                      r +
                  1.27045825245236838258e0) *
                     r +
                 3.64784832476320460504e0) *
                    r +
                5.76949722146069140550e0) *
                   r +
               4.63033784615654529590e0) *
                  r +
              1.42343711074968357734e0) /
             (((((((1.05075007164441684324e-9 * r + 5.47593808499534494600e-4) *
                       r +
                   1.51986665636164571966e-2) *
                      r +
                  1.48103976427480074590e-1) *
                     r +
                 6.89767334985100004550e-1) *
                    r +
                1.67638483018380384940e0) *
                   r +
               2.05319162663775882187e0) *
                  r +
              1.0));
    } else {
      r -= 5.0;
      ret =
          ((((((((2.01033439929228813265e-7 * r + 2.71155556874348757815e-5) *
                     r +
                 1.24266094738807843860e-3) *
                    r +
                2.65321895265761230930e-2) *
                   r +
               2.96560571828504891230e-1) *
                  r +
              1.78482653991729133580e0) *
                 r +
             5.46378491116411436990e0) *
                r +
            6.65790464350110377720e0) /
           (((((((2.04426310338993978564e-15 * r + 1.42151175831644588870e-7) *
                     r +
                 1.84631831751005468180e-5) *
                    r +
                7.86869131145613259100e-4) *
                   r +
               1.48753612908506148525e-2) *
                  r +
              1.36929880922735805310e-1) *
                 r +
             5.99832206555887937690e-1) *
                r +
            1.0));
    }
    if (q < 0.0) {
      ret = -ret;
    }
    return ret;
  }
}


x86 assembly (clang, -O0):
<pt_norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x29(%rbp)
jbe    1167 <pt_norm+0x37>
movsd  0xea4(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
seta   %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xe8f(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movaps 0x100a(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xe66(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     132f <pt_norm+0x1ff>
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xfb7(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xf8c(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xf88(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xf63(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xf46(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xf29(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xf0c(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xeef(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xead(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xea9(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe84(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe67(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe4a(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe2d(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe10(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xce3(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    168a <pt_norm+0x55a>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    134c <pt_norm+0x21c>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    135e <pt_norm+0x22e>
movsd  0xcac(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x20(%rbp),%xmm0
call   1040 <log@plt>
xor    %edi,%edi
sub    %eax,%edi
call   1050 <sqrt@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  0xc81(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
jb     14fc <pt_norm+0x3cc>
movsd  -0x20(%rbp),%xmm0
movsd  0xd61(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xd3b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd37(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd12(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcf5(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcd8(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcbb(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc9e(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc81(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xc60(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc5c(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc37(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc1a(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xbfd(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xbe0(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xbc3(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xb16(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1651 <pt_norm+0x521>
movsd  -0x20(%rbp),%xmm0
movsd  0xb0f(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xb69(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb65(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb40(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb23(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb06(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xae9(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xacc(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xaaf(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xa8e(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xa8a(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xa65(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xa48(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xa2b(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xa0e(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x9f1(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x9bc(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1680 <pt_norm+0x550>
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pt_norm>:
sub    $0x28,%rsp
movapd %xmm0,(%rsp)
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
movsd  0xeb4(%rip),%xmm1
ucomisd %xmm0,%xmm1
seta   %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
movapd (%rsp),%xmm2
movsd  0xe9e(%rip),%xmm3
addsd  %xmm2,%xmm3
movapd 0xf3a(%rip),%xmm0
andpd  %xmm3,%xmm0
movsd  0xe8e(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    125d <pt_norm+0x12d>
movsd  0xe6c(%rip),%xmm4
subsd  %xmm2,%xmm4
movapd %xmm3,0x10(%rsp)
xorpd  %xmm1,%xmm1
cmpltsd %xmm1,%xmm3
movapd %xmm3,%xmm0
andnpd %xmm4,%xmm0
andpd  %xmm2,%xmm3
orpd   %xmm0,%xmm3
movapd %xmm3,(%rsp)
xor    %edi,%edi
ucomisd %xmm1,%xmm3
seta   %dil
call   1030 <assert@plt>
movapd (%rsp),%xmm0
call   1040 <log@plt>
neg    %eax
mov    %eax,%edi
call   1050 <sqrt@plt>
movsd  0xeb2(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1336 <pt_norm+0x206>
addsd  0xeb0(%rip),%xmm0
unpcklpd %xmm0,%xmm0
movapd 0xf3c(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xf40(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xf44(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xf48(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xf4c(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xf50(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xf54(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xf58(%rip),%xmm1
jmp    139e <pt_norm+0x26e>
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
movsd  0xdab(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0xda7(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xda3(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xd9f(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xd9b(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xd97(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xd93(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xd8f(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xd8b(%rip),%xmm0
movsd  0xd8b(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xd87(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xd83(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xd7f(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xd7b(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xd77(%rip),%xmm2
mulsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm2
addsd  0xd6f(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xcd3(%rip),%xmm2
divsd  %xmm2,%xmm0
add    $0x28,%rsp
ret
addsd  0xd62(%rip),%xmm0
unpcklpd %xmm0,%xmm0
movapd 0xd76(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xd7a(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xd7e(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xd82(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xd86(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xd8a(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xd8e(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xd92(%rip),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd 0xe0e(%rip),%xmm3
xorpd  %xmm1,%xmm3
xorpd  %xmm2,%xmm2
movapd 0x10(%rsp),%xmm0
cmpltsd %xmm2,%xmm0
andpd  %xmm0,%xmm3
andnpd %xmm1,%xmm0
orpd   %xmm3,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @pt_norm(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
%7 = load double, double* %3
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load double, double* %3
%11 = fcmp olt double %10, 1.000000e+00
br label %12
12: ; preds = %9, %1
%13 = phi i1 [ false, %1 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load double, double* %3
%17 = fsub double %16, 5.000000e-01
store double %17, double* %4
%18 = load double, double* %4
%19 = call double @llvm.fabs.f64(double %18)
%20 = fcmp ole double %19, 4.250000e-01
br i1 %20, label %21, label %57
21: ; preds = %12
%22 = load double, double* %4
%23 = load double, double* %4
%24 = fneg double %22
%25 = call double @llvm.fmuladd.f64(double %24, double %23, double 1.806250e-01)
store double %25, double* %5
%26 = load double, double* %4
%27 = load double, double* %5
%28 = call double @llvm.fmuladd.f64(double 0x40A39A296F7D925E, double %27, double 0x40E052D26B2E45E4)
%29 = load double, double* %5
%30 = call double @llvm.fmuladd.f64(double %28, double %29, double 0x40F06C1C55B78F20)
%31 = load double, double* %5
%32 = call double @llvm.fmuladd.f64(double %30, double %31, double 0x40E66C3E869B752A)
%33 = load double, double* %5
%34 = call double @llvm.fmuladd.f64(double %32, double %33, double 0x40CAD1D8CD4EE71D)
%35 = load double, double* %5
%36 = call double @llvm.fmuladd.f64(double %34, double %35, double 0x409ECE5D2213C0CC)
%37 = load double, double* %5
%38 = call double @llvm.fmuladd.f64(double %36, double %37, double 0x4060A4888B1A436E)
%39 = load double, double* %5
%40 = call double @llvm.fmuladd.f64(double %38, double %39, double 0x400B18D91E9EEF75)
%41 = fmul double %26, %40
%42 = load double, double* %5
%43 = call double @llvm.fmuladd.f64(double 0x40B46A7ECA984B69, double %42, double 0x40DC0E457CB1AE76)
%44 = load double, double* %5
%45 = call double @llvm.fmuladd.f64(double %43, double %44, double 0x40E3317CAA64F4BE)
%46 = load double, double* %5
%47 = call double @llvm.fmuladd.f64(double %45, double %46, double 0x40D4B772D5D65266)
%48 = load double, double* %5
%49 = call double @llvm.fmuladd.f64(double %47, double %48, double 0x40B512322E75C89F)
%50 = load double, double* %5
%51 = call double @llvm.fmuladd.f64(double %49, double %50, double 0x4085797EFDC8B3F7)
%52 = load double, double* %5
%53 = call double @llvm.fmuladd.f64(double %51, double %52, double 0x4045281B386E1AB5)
%54 = load double, double* %5
%55 = call double @llvm.fmuladd.f64(double %53, double %54, double 1.000000e+00)
%56 = fdiv double %41, %55
store double %56, double* %2
br label %148
57: ; preds = %12
%58 = load double, double* %4
%59 = fcmp olt double %58, 0.000000e+00
br i1 %59, label %60, label %62
60: ; preds = %57
%61 = load double, double* %3
store double %61, double* %5
br label %65
62: ; preds = %57
%63 = load double, double* %3
%64 = fsub double 1.000000e+00, %63
store double %64, double* %5
br label %65
65: ; preds = %62, %60
%66 = load double, double* %5
%67 = fcmp ogt double %66, 0.000000e+00
%68 = zext i1 %67 to i32
%69 = call i32 @assert(i32 %68)
%70 = load double, double* %5
%71 = call i32 @log(double %70)
%72 = sub nsw i32 0, %71
%73 = call double @sqrt(i32 %72)
store double %73, double* %5
%74 = load double, double* %5
%75 = fcmp ole double %74, 5.000000e+00
br i1 %75, label %76, label %108
76: ; preds = %65
%77 = load double, double* %5
%78 = fsub double %77, 1.600000e+00
store double %78, double* %5
%79 = load double, double* %5
%80 = call double @llvm.fmuladd.f64(double 0x3F49615AC0B7ACE9, double %79, double 0x3F9744EB6C45EC67)
%81 = load double, double* %5
%82 = call double @llvm.fmuladd.f64(double %80, double %81, double 0x3FCEF2ABB9B85C37)
%83 = load double, double* %5
%84 = call double @llvm.fmuladd.f64(double %82, double %83, double 0x3FF453CC085375B2)
%85 = load double, double* %5
%86 = call double @llvm.fmuladd.f64(double %84, double %85, double 0x400D2ECB1A3D02C4)
%87 = load double, double* %5
%88 = call double @llvm.fmuladd.f64(double %86, double %87, double 0x401713F71462256A)
%89 = load double, double* %5
%90 = call double @llvm.fmuladd.f64(double %88, double %89, double 0x4012857748CAB19B)
%91 = load double, double* %5
%92 = call double @llvm.fmuladd.f64(double %90, double %91, double 0x3FF6C665FDE9526A)
%93 = load double, double* %5
%94 = call double @llvm.fmuladd.f64(double 0x3E120D3F686439E4, double %93, double 0x3F41F18CBFDF2728)
%95 = load double, double* %5
%96 = call double @llvm.fmuladd.f64(double %94, double %95, double 0x3F8F207A7EAB17BF)
%97 = load double, double* %5
%98 = call double @llvm.fmuladd.f64(double %96, double %97, double 0x3FC2F5123394F040)
%99 = load double, double* %5
%100 = call double @llvm.fmuladd.f64(double %98, double %99, double 0x3FE61292F23385C9)
%101 = load double, double* %5
%102 = call double @llvm.fmuladd.f64(double %100, double %101, double 0x3FFAD278E6526633)
%103 = load double, double* %5
%104 = call double @llvm.fmuladd.f64(double %102, double %103, double 0x40006CEFBB46A449)
%105 = load double, double* %5
%106 = call double @llvm.fmuladd.f64(double %104, double %105, double 1.000000e+00)
%107 = fdiv double %92, %106
store double %107, double* %6
br label %140
108: ; preds = %65
%109 = load double, double* %5
%110 = fsub double %109, 5.000000e+00
store double %110, double* %5
%111 = load double, double* %5
%112 = call double @llvm.fmuladd.f64(double 0x3E8AFB74D693BF93, double %111, double 0x3EFC6EC6CC59E02A)
%113 = load double, double* %5
%114 = call double @llvm.fmuladd.f64(double %112, double %113, double 0x3F545C1908425345)
%115 = load double, double* %5
%116 = call double @llvm.fmuladd.f64(double %114, double %115, double 0x3F9B2B41193B4EE7)
%117 = load double, double* %5
%118 = call double @llvm.fmuladd.f64(double %116, double %117, double 0x3FD2FAD9315255CF)
%119 = load double, double* %5
%120 = call double @llvm.fmuladd.f64(double %118, double %119, double 0x3FFC8EA6461FA445)
%121 = load double, double* %5
%122 = call double @llvm.fmuladd.f64(double %120, double %121, double 0x4015DAEA6E875003)
%123 = load double, double* %5
%124 = call double @llvm.fmuladd.f64(double %122, double %123, double 0x401AA1B1C13EE526)
%125 = load double, double* %5
%126 = call double @llvm.fmuladd.f64(double 0x3CE269BFF1F8C190, double %125, double 0x3E831446F740B9E0)
%127 = load double, double* %5
%128 = call double @llvm.fmuladd.f64(double %126, double %127, double 0x3EF35C2C496374BF)
%129 = load double, double* %5
%130 = call double @llvm.fmuladd.f64(double %128, double %129, double 0x3F49C8BC979DC5D7)
%131 = load double, double* %5
%132 = call double @llvm.fmuladd.f64(double %130, double %131, double 0x3F8E76F93215462A)
%133 = load double, double* %5
%134 = call double @llvm.fmuladd.f64(double %132, double %133, double 0x3FC186EB183443FB)
%135 = load double, double* %5
%136 = call double @llvm.fmuladd.f64(double %134, double %135, double 0x3FE331D34FC7D77F)
%137 = load double, double* %5
%138 = call double @llvm.fmuladd.f64(double %136, double %137, double 1.000000e+00)
%139 = fdiv double %124, %138
store double %139, double* %6
br label %140
140: ; preds = %108, %76
%141 = load double, double* %4
%142 = fcmp olt double %141, 0.000000e+00
br i1 %142, label %143, label %146
143: ; preds = %140
%144 = load double, double* %6
%145 = fneg double %144
store double %145, double* %6
br label %146
146: ; preds = %143, %140
%147 = load double, double* %6
store double %147, double* %2
br label %148
148: ; preds = %146, %21
%149 = load double, double* %2
ret double %149
}

LLVM IR (-O2):
define double @pt_norm(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fcmp olt double %0, 1.000000e+00
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = fadd double %0, -5.000000e-01
%8 = tail call double @llvm.fabs.f64(double %7)
%9 = fcmp ugt double %8, 4.250000e-01
br i1 %9, label %29, label %10
10: ; preds = %1
%11 = fneg double %7
%12 = tail call double @llvm.fmuladd.f64(double %11, double %7, double 1.806250e-01)
%13 = tail call double @llvm.fmuladd.f64(double %12, double 0x40A39A296F7D925E, double 0x40E052D26B2E45E4)
%14 = tail call double @llvm.fmuladd.f64(double %13, double %12, double 0x40F06C1C55B78F20)
%15 = tail call double @llvm.fmuladd.f64(double %14, double %12, double 0x40E66C3E869B752A)
%16 = tail call double @llvm.fmuladd.f64(double %15, double %12, double 0x40CAD1D8CD4EE71D)
%17 = tail call double @llvm.fmuladd.f64(double %16, double %12, double 0x409ECE5D2213C0CC)
%18 = tail call double @llvm.fmuladd.f64(double %17, double %12, double 0x4060A4888B1A436E)
%19 = tail call double @llvm.fmuladd.f64(double %18, double %12, double 0x400B18D91E9EEF75)
%20 = fmul double %7, %19
%21 = tail call double @llvm.fmuladd.f64(double %12, double 0x40B46A7ECA984B69, double 0x40DC0E457CB1AE76)
%22 = tail call double @llvm.fmuladd.f64(double %21, double %12, double 0x40E3317CAA64F4BE)
%23 = tail call double @llvm.fmuladd.f64(double %22, double %12, double 0x40D4B772D5D65266)
%24 = tail call double @llvm.fmuladd.f64(double %23, double %12, double 0x40B512322E75C89F)
%25 = tail call double @llvm.fmuladd.f64(double %24, double %12, double 0x4085797EFDC8B3F7)
%26 = tail call double @llvm.fmuladd.f64(double %25, double %12, double 0x4045281B386E1AB5)
%27 = tail call double @llvm.fmuladd.f64(double %26, double %12, double 1.000000e+00)
%28 = fdiv double %20, %27
br label %72
29: ; preds = %1
%30 = fcmp olt double %7, 0.000000e+00
%31 = fsub double 1.000000e+00, %0
%32 = select i1 %30, double %0, double %31
%33 = fcmp ogt double %32, 0.000000e+00
%34 = zext i1 %33 to i32
%35 = tail call i32 @assert(i32 %34)
%36 = tail call i32 @log(double %32)
%37 = sub nsw i32 0, %36
%38 = tail call double @sqrt(i32 %37)
%39 = fcmp ugt double %38, 5.000000e+00
br i1 %39, label %54, label %40
40: ; preds = %29
%41 = fadd double %38, -1.600000e+00
%42 = insertelement <2 x double> poison, double %41, i64 0
%43 = shufflevector <2 x double> %42, <2 x double> poison, <2 x i32> zeroinitializer
%44 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %43, <2 x double> <double 0x3F49615AC0B7ACE9, double 0x3E120D3F686439E4>, <2 x double> <double 0x3F9744EB6C45EC67, double 0x3F41F18CBFDF2728>)
%45 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %44, <2 x double> %43, <2 x double> <double 0x3FCEF2ABB9B85C37, double 0x3F8F207A7EAB17BF>)
%46 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %45, <2 x double> %43, <2 x double> <double 0x3FF453CC085375B2, double 0x3FC2F5123394F040>)
%47 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %46, <2 x double> %43, <2 x double> <double 0x400D2ECB1A3D02C4, double 0x3FE61292F23385C9>)
%48 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %47, <2 x double> %43, <2 x double> <double 0x401713F71462256A, double 0x3FFAD278E6526633>)
%49 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %48, <2 x double> %43, <2 x double> <double 0x4012857748CAB19B, double 0x40006CEFBB46A449>)
%50 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %49, <2 x double> %43, <2 x double> <double 0x3FF6C665FDE9526A, double 1.000000e+00>)
%51 = extractelement <2 x double> %50, i64 0
%52 = extractelement <2 x double> %50, i64 1
%53 = fdiv double %51, %52
br label %68
54: ; preds = %29
%55 = fadd double %38, -5.000000e+00
%56 = insertelement <2 x double> poison, double %55, i64 0
%57 = shufflevector <2 x double> %56, <2 x double> poison, <2 x i32> zeroinitializer
%58 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %57, <2 x double> <double 0x3E8AFB74D693BF93, double 0x3CE269BFF1F8C190>, <2 x double> <double 0x3EFC6EC6CC59E02A, double 0x3E831446F740B9E0>)
%59 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %58, <2 x double> %57, <2 x double> <double 0x3F545C1908425345, double 0x3EF35C2C496374BF>)
%60 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %59, <2 x double> %57, <2 x double> <double 0x3F9B2B41193B4EE7, double 0x3F49C8BC979DC5D7>)
%61 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %60, <2 x double> %57, <2 x double> <double 0x3FD2FAD9315255CF, double 0x3F8E76F93215462A>)
%62 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %61, <2 x double> %57, <2 x double> <double 0x3FFC8EA6461FA445, double 0x3FC186EB183443FB>)
%63 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %62, <2 x double> %57, <2 x double> <double 0x4015DAEA6E875003, double 0x3FE331D34FC7D77F>)
%64 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %63, <2 x double> %57, <2 x double> <double 0x401AA1B1C13EE526, double 1.000000e+00>)
%65 = extractelement <2 x double> %64, i64 0
%66 = extractelement <2 x double> %64, i64 1
%67 = fdiv double %65, %66
br label %68
68: ; preds = %54, %40
%69 = phi double [ %53, %40 ], [ %67, %54 ]
%70 = fneg double %69
%71 = select i1 %30, double %70, double %69
br label %72
72: ; preds = %68, %10
%73 = phi double [ %28, %10 ], [ %71, %68 ]
ret double %73
}