#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*/ log(double);
double sqrt(int /*<<< orphan*/);
double qnorm(double p) {
  static double a[8] = {3.3871328727963666080E0, 1.3314166789178437745E2,
                        1.9715909503065514427E3, 1.3731693765509461125E4,
                        4.5921953931549871457E4, 6.7265770927008700853E4,
                        3.3430575583588128105E4, 2.5090809287301226727E3};
  static double b[8] = {1,
                        4.2313330701600911252E1,
                        6.8718700749205790830E2,
                        5.3941960214247511077E3,
                        2.1213794301586595867E4,
                        3.9307895800092710610E4,
                        2.8729085735721942674E4,
                        5.2264952788528545610E3};
  static double c[8] = {1.42343711074968357734E0,  4.63033784615654529590E0,
                        5.76949722146069140550E0,  3.64784832476320460504E0,
                        1.27045825245236838258E0,  2.41780725177450611770E-1,
                        2.27238449892691845833E-2, 7.74545014278341407640E-4};
  static double d[8] = {1,
                        2.05319162663775882187E0,
                        1.67638483018380384940E0,
                        6.89767334985100004550E-1,
                        1.48103976427480074590E-1,
                        1.51986665636164571966E-2,
                        5.47593808499534494600E-4,
                        1.05075007164441684324E-9};
  static double e[8] = {6.65790464350110377720E0,  5.46378491116411436990E0,
                        1.78482653991729133580E0,  2.96560571828504891230E-1,
                        2.65321895265761230930E-2, 1.24266094738807843860E-3,
                        2.71155556874348757815E-5, 2.01033439929228813265E-7};
  static double f[8] = {1,
                        5.99832206555887937690E-1,
                        1.36929880922735805310E-1,
                        1.48753612908506148525E-2,
                        7.86869131145613259100E-4,
                        1.84631831751005468180E-5,
                        1.42151175831644588870E-7,
                        2.04426310338993978564E-15};
  double q, r, s;
  q = p - 0.5;
  s = (q > 0) - (q < 0);
  if (q * s <= 0.425) {
    r = 0.180625 - q * q;
    return q *
           (((((((a[7] * r + a[6]) * r + a[5]) * r + a[4]) * r + a[3]) * r +
              a[2]) *
                 r +
             a[1]) *
                r +
            a[0]) /
           (((((((b[7] * r + b[6]) * r + b[5]) * r + b[4]) * r + b[3]) * r +
              b[2]) *
                 r +
             b[1]) *
                r +
            1);
  } else {
    r = (q < 0) ? p : 1 - p;
    r = sqrt(-log(r));
    if (r <= 5.) {
      r -= 1.6;
      return s *
             (((((((c[7] * r + c[6]) * r + c[5]) * r + c[4]) * r + c[3]) * r +
                c[2]) *
                   r +
               c[1]) *
                  r +
              c[0]) /
             (((((((d[7] * r + d[6]) * r + d[5]) * r + d[4]) * r + d[3]) * r +
                d[2]) *
                   r +
               d[1]) *
                  r +
              1);
    } else {
      r -= 5.;
      return s *
             (((((((e[7] * r + e[6]) * r + e[5]) * r + e[4]) * r + e[3]) * r +
                e[2]) *
                   r +
               e[1]) *
                  r +
              e[0]) /
             (((((((f[7] * r + f[6]) * r + f[5]) * r + f[4]) * r + f[3]) * r +
                f[2]) *
                   r +
               f[1]) *
                  r +
              1);
    }
  }
}


x86 assembly (clang, -O0):
<qnorm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xece(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movsd  0xe7b(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1312 <qnorm+0x1f2>
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe6c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0x2ea6(%rip),%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2e91(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2e74(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2e57(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2e3a(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2e1d(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2e00(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2de3(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x2e47(%rip),%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2e32(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2e15(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2df8(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2ddb(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2dbe(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2da1(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd10(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1637 <qnorm+0x517>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    132f <qnorm+0x20f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1341 <qnorm+0x221>
movsd  0xcd9(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <log@plt>
xor    %edi,%edi
sub    %eax,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  0xcad(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
jb     14d9 <qnorm+0x3b9>
movsd  -0x20(%rbp),%xmm0
movsd  0xc9d(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0x2d5f(%rip),%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2d4a(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2d2d(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2d10(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2cf3(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2cd6(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2cb9(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2c9c(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x2d00(%rip),%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2ceb(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2cce(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2cb1(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2c94(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2c77(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2c5a(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xb49(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1637 <qnorm+0x517>
movsd  -0x20(%rbp),%xmm0
movsd  0xb32(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0x2c7c(%rip),%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2c67(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2c4a(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2c2d(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2c10(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2bf3(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2bd6(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2bb9(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x2c1d(%rip),%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2c08(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2beb(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2bce(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2bb1(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2b94(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  0x2b77(%rip),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x9e6(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qnorm>:
push   %rax
movsd  0xed7(%rip),%xmm1
addsd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
xor    %eax,%eax
ucomisd %xmm2,%xmm1
seta   %al
xor    %ecx,%ecx
ucomisd %xmm1,%xmm2
seta   %cl
sub    %ecx,%eax
cvtsi2sd %eax,%xmm5
movapd %xmm1,%xmm3
mulsd  %xmm5,%xmm3
movsd  0xeaf(%rip),%xmm4
ucomisd %xmm3,%xmm4
jae    1273 <qnorm+0x153>
movsd  0xf25(%rip),%xmm3
subsd  %xmm0,%xmm3
cmpltsd %xmm2,%xmm1
movapd %xmm1,%xmm2
andnpd %xmm3,%xmm2
andpd  %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
movsd  %xmm5,(%rsp)
call   1030 <log@plt>
neg    %eax
mov    %eax,%edi
call   1040 <sqrt@plt>
movsd  (%rsp),%xmm3
movapd %xmm0,%xmm1
movsd  0xeec(%rip),%xmm0
ucomisd %xmm1,%xmm0
jae    1349 <qnorm+0x229>
addsd  0xf62(%rip),%xmm1
movsd  0xf62(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xf5e(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xf5a(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xf56(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xf52(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xf4e(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xf4a(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xf46(%rip),%xmm0
movsd  0xf46(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xf42(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xf3e(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xf3a(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xf36(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xf32(%rip),%xmm2
mulsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm2
addsd  0xf2a(%rip),%xmm2
jmp    1401 <qnorm+0x2e1>
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xd8d(%rip),%xmm2
subsd  %xmm0,%xmm2
movsd  0xd89(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xd85(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xd81(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xd7d(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xd79(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xd75(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xd71(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xd6d(%rip),%xmm0
movsd  0xd6d(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xd69(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xd65(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xd61(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xd5d(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xd59(%rip),%xmm3
mulsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm3
addsd  0xd51(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xd4d(%rip),%xmm3
divsd  %xmm3,%xmm0
pop    %rax
ret
addsd  0xd4f(%rip),%xmm1
movsd  0xd4f(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xd4b(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xd47(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xd43(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xd3f(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xd3b(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xd37(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xd33(%rip),%xmm0
movsd  0xd33(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xd2f(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xd2b(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xd27(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xd23(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xd1f(%rip),%xmm2
mulsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm2
addsd  0xd17(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xc83(%rip),%xmm2
divsd  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@qnorm.a = internal global [8 x double] [double 0x400B18D91E9EEF75, double 0x4060A4888B1A436E, double 0x409ECE5D2213C0CC, double 0x40CAD1D8CD4EE71D, double 0x40E66C3E869B752A, double 0x40F06C1C55B78F20, double 0x40E052D26B2E45E4, double 0x40A39A296F7D925E]
@qnorm.b = internal global [8 x double] [double 1.000000e+00, double 0x4045281B386E1AB5, double 0x4085797EFDC8B3F7, double 0x40B512322E75C89F, double 0x40D4B772D5D65266, double 0x40E3317CAA64F4BE, double 0x40DC0E457CB1AE76, double 0x40B46A7ECA984B69]
@qnorm.c = internal global [8 x double] [double 0x3FF6C665FDE9526A, double 0x4012857748CAB19B, double 0x401713F71462256A, double 0x400D2ECB1A3D02C4, double 0x3FF453CC085375B2, double 0x3FCEF2ABB9B85C37, double 0x3F9744EB6C45EC67, double 0x3F49615AC0B7ACE9]
@qnorm.d = internal global [8 x double] [double 1.000000e+00, double 0x40006CEFBB46A449, double 0x3FFAD278E6526633, double 0x3FE61292F23385C9, double 0x3FC2F5123394F040, double 0x3F8F207A7EAB17BF, double 0x3F41F18CBFDF2728, double 0x3E120D3F686439E4]
@qnorm.e = internal global [8 x double] [double 0x401AA1B1C13EE526, double 0x4015DAEA6E875003, double 0x3FFC8EA6461FA445, double 0x3FD2FAD9315255CF, double 0x3F9B2B41193B4EE7, double 0x3F545C1908425345, double 0x3EFC6EC6CC59E02A, double 0x3E8AFB74D693BF93]
@qnorm.f = internal global [8 x double] [double 1.000000e+00, double 0x3FE331D34FC7D77F, double 0x3FC186EB183443FB, double 0x3F8E76F93215462A, double 0x3F49C8BC979DC5D7, double 0x3EF35C2C496374BF, double 0x3E831446F740B9E0, double 0x3CE269BFF1F8C190]
define double @qnorm(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 = fsub double %7, 5.000000e-01
store double %8, double* %4
%9 = load double, double* %4
%10 = fcmp ogt double %9, 0.000000e+00
%11 = zext i1 %10 to i32
%12 = load double, double* %4
%13 = fcmp olt double %12, 0.000000e+00
%14 = zext i1 %13 to i32
%15 = sub nsw i32 %11, %14
%16 = sitofp i32 %15 to double
store double %16, double* %6
%17 = load double, double* %4
%18 = load double, double* %6
%19 = fmul double %17, %18
%20 = fcmp ole double %19, 4.250000e-01
br i1 %20, label %21, label %72
21: ; preds = %1
%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* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.a, i64 0, i64 7)
%28 = load double, double* %5
%29 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.a, i64 0, i64 6)
%30 = call double @llvm.fmuladd.f64(double %27, double %28, double %29)
%31 = load double, double* %5
%32 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.a, i64 0, i64 5)
%33 = call double @llvm.fmuladd.f64(double %30, double %31, double %32)
%34 = load double, double* %5
%35 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.a, i64 0, i64 4)
%36 = call double @llvm.fmuladd.f64(double %33, double %34, double %35)
%37 = load double, double* %5
%38 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.a, i64 0, i64 3)
%39 = call double @llvm.fmuladd.f64(double %36, double %37, double %38)
%40 = load double, double* %5
%41 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.a, i64 0, i64 2)
%42 = call double @llvm.fmuladd.f64(double %39, double %40, double %41)
%43 = load double, double* %5
%44 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.a, i64 0, i64 1)
%45 = call double @llvm.fmuladd.f64(double %42, double %43, double %44)
%46 = load double, double* %5
%47 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.a, i64 0, i64 0)
%48 = call double @llvm.fmuladd.f64(double %45, double %46, double %47)
%49 = fmul double %26, %48
%50 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.b, i64 0, i64 7)
%51 = load double, double* %5
%52 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.b, i64 0, i64 6)
%53 = call double @llvm.fmuladd.f64(double %50, double %51, double %52)
%54 = load double, double* %5
%55 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.b, i64 0, i64 5)
%56 = call double @llvm.fmuladd.f64(double %53, double %54, double %55)
%57 = load double, double* %5
%58 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.b, i64 0, i64 4)
%59 = call double @llvm.fmuladd.f64(double %56, double %57, double %58)
%60 = load double, double* %5
%61 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.b, i64 0, i64 3)
%62 = call double @llvm.fmuladd.f64(double %59, double %60, double %61)
%63 = load double, double* %5
%64 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.b, i64 0, i64 2)
%65 = call double @llvm.fmuladd.f64(double %62, double %63, double %64)
%66 = load double, double* %5
%67 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.b, i64 0, i64 1)
%68 = call double @llvm.fmuladd.f64(double %65, double %66, double %67)
%69 = load double, double* %5
%70 = call double @llvm.fmuladd.f64(double %68, double %69, double 1.000000e+00)
%71 = fdiv double %49, %70
store double %71, double* %2
br label %186
72: ; preds = %1
%73 = load double, double* %4
%74 = fcmp olt double %73, 0.000000e+00
br i1 %74, label %75, label %77
75: ; preds = %72
%76 = load double, double* %3
br label %80
77: ; preds = %72
%78 = load double, double* %3
%79 = fsub double 1.000000e+00, %78
br label %80
80: ; preds = %77, %75
%81 = phi double [ %76, %75 ], [ %79, %77 ]
store double %81, double* %5
%82 = load double, double* %5
%83 = call i32 @log(double %82)
%84 = sub nsw i32 0, %83
%85 = call double @sqrt(i32 %84)
store double %85, double* %5
%86 = load double, double* %5
%87 = fcmp ole double %86, 5.000000e+00
br i1 %87, label %88, label %137
88: ; preds = %80
%89 = load double, double* %5
%90 = fsub double %89, 1.600000e+00
store double %90, double* %5
%91 = load double, double* %6
%92 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.c, i64 0, i64 7)
%93 = load double, double* %5
%94 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.c, i64 0, i64 6)
%95 = call double @llvm.fmuladd.f64(double %92, double %93, double %94)
%96 = load double, double* %5
%97 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.c, i64 0, i64 5)
%98 = call double @llvm.fmuladd.f64(double %95, double %96, double %97)
%99 = load double, double* %5
%100 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.c, i64 0, i64 4)
%101 = call double @llvm.fmuladd.f64(double %98, double %99, double %100)
%102 = load double, double* %5
%103 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.c, i64 0, i64 3)
%104 = call double @llvm.fmuladd.f64(double %101, double %102, double %103)
%105 = load double, double* %5
%106 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.c, i64 0, i64 2)
%107 = call double @llvm.fmuladd.f64(double %104, double %105, double %106)
%108 = load double, double* %5
%109 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.c, i64 0, i64 1)
%110 = call double @llvm.fmuladd.f64(double %107, double %108, double %109)
%111 = load double, double* %5
%112 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.c, i64 0, i64 0)
%113 = call double @llvm.fmuladd.f64(double %110, double %111, double %112)
%114 = fmul double %91, %113
%115 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.d, i64 0, i64 7)
%116 = load double, double* %5
%117 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.d, i64 0, i64 6)
%118 = call double @llvm.fmuladd.f64(double %115, double %116, double %117)
%119 = load double, double* %5
%120 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.d, i64 0, i64 5)
%121 = call double @llvm.fmuladd.f64(double %118, double %119, double %120)
%122 = load double, double* %5
%123 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.d, i64 0, i64 4)
%124 = call double @llvm.fmuladd.f64(double %121, double %122, double %123)
%125 = load double, double* %5
%126 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.d, i64 0, i64 3)
%127 = call double @llvm.fmuladd.f64(double %124, double %125, double %126)
%128 = load double, double* %5
%129 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.d, i64 0, i64 2)
%130 = call double @llvm.fmuladd.f64(double %127, double %128, double %129)
%131 = load double, double* %5
%132 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.d, i64 0, i64 1)
%133 = call double @llvm.fmuladd.f64(double %130, double %131, double %132)
%134 = load double, double* %5
%135 = call double @llvm.fmuladd.f64(double %133, double %134, double 1.000000e+00)
%136 = fdiv double %114, %135
store double %136, double* %2
br label %186
137: ; preds = %80
%138 = load double, double* %5
%139 = fsub double %138, 5.000000e+00
store double %139, double* %5
%140 = load double, double* %6
%141 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.e, i64 0, i64 7)
%142 = load double, double* %5
%143 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.e, i64 0, i64 6)
%144 = call double @llvm.fmuladd.f64(double %141, double %142, double %143)
%145 = load double, double* %5
%146 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.e, i64 0, i64 5)
%147 = call double @llvm.fmuladd.f64(double %144, double %145, double %146)
%148 = load double, double* %5
%149 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.e, i64 0, i64 4)
%150 = call double @llvm.fmuladd.f64(double %147, double %148, double %149)
%151 = load double, double* %5
%152 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.e, i64 0, i64 3)
%153 = call double @llvm.fmuladd.f64(double %150, double %151, double %152)
%154 = load double, double* %5
%155 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.e, i64 0, i64 2)
%156 = call double @llvm.fmuladd.f64(double %153, double %154, double %155)
%157 = load double, double* %5
%158 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.e, i64 0, i64 1)
%159 = call double @llvm.fmuladd.f64(double %156, double %157, double %158)
%160 = load double, double* %5
%161 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.e, i64 0, i64 0)
%162 = call double @llvm.fmuladd.f64(double %159, double %160, double %161)
%163 = fmul double %140, %162
%164 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.f, i64 0, i64 7)
%165 = load double, double* %5
%166 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.f, i64 0, i64 6)
%167 = call double @llvm.fmuladd.f64(double %164, double %165, double %166)
%168 = load double, double* %5
%169 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.f, i64 0, i64 5)
%170 = call double @llvm.fmuladd.f64(double %167, double %168, double %169)
%171 = load double, double* %5
%172 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.f, i64 0, i64 4)
%173 = call double @llvm.fmuladd.f64(double %170, double %171, double %172)
%174 = load double, double* %5
%175 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.f, i64 0, i64 3)
%176 = call double @llvm.fmuladd.f64(double %173, double %174, double %175)
%177 = load double, double* %5
%178 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.f, i64 0, i64 2)
%179 = call double @llvm.fmuladd.f64(double %176, double %177, double %178)
%180 = load double, double* %5
%181 = load double, double* getelementptr inbounds ([8 x double], [8 x double]* @qnorm.f, i64 0, i64 1)
%182 = call double @llvm.fmuladd.f64(double %179, double %180, double %181)
%183 = load double, double* %5
%184 = call double @llvm.fmuladd.f64(double %182, double %183, double 1.000000e+00)
%185 = fdiv double %163, %184
store double %185, double* %2
br label %186
186: ; preds = %137, %88, %21
%187 = load double, double* %2
ret double %187
}

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