#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 */
double atan(double);
double exp(double);
double fabs(double);
double sqrt(double);
double bivnor(double ah, double ak, double r) {
  double twopi, b, gh, gk, rr, con, sqr, wh, wk, h2, a2, ex, h4, w2, sn, sp, ap,
      cn, t;
  double gw, g2, s2, s1, conex, sgn;
  double alnorm(double, int);
  int idig, i, is;
  twopi = 6.283185307179587;
  b = 0.;
  idig = 9;
  gh = alnorm(ah, 1) / 2.;
  gk = alnorm(ak, 1) / 2.;
  if (r != 0.0)
    rr = 1. - r * r;
  else {
    b = 4. * gh * gk;
    if (b < 0.)
      b = 0.;
    if (b > 1.)
      b = 1.;
    return (b);
  }
  if (rr < 0.) {
    return (-1.);
  }
  if (rr == 0.0) {
    if (r < 0.) {
      if (ah + ak < 0.)
        b = 2. * (gh + gk) - 1.;
      if (b < 0.)
        b = 0.;
      if (b > 1.)
        b = 1.;
      return (b);
    } else {
      if (ah - ak < 0.)
        b = 2. * gk;
      else
        b = 2. * gh;
      if (b < 0.)
        b = 0.;
      if (b > 1.)
        b = 1.;
      return (b);
    }
  }
  sqr = sqrt(rr);
  con = twopi * .5;
  for (i = 1; i <= idig; i++)
    con /= 10.;
  if (ah == 0.0) {
    if (ak == 0.) {
      b = atan(r / sqr) / twopi + .25;
      if (b < 0.)
        b = 0.;
      if (b > 1.)
        b = 1.;
      return (b);
    } else {
      b += gk;
      if (ah != 0.) {
        wh = -ah;
        wk = (ak / ah - r) / sqr;
        gw = 2. * gh;
        is = -1;
      } else {
        wh = -ak;
        wk = (ah / ak - r) / sqr;
        gw = 2. * gk;
        is = 1;
      }
      goto L210;
    }
  }
  b = gh;
  if (ah * ak < 0) {
    b -= .5;
  }
  if (ah * ak != 0.) {
    b += gk;
    if (ah != 0.) {
      wh = -ah;
      wk = (ak / ah - r) / sqr;
      gw = 2. * gh;
      is = -1;
    } else {
      wh = -ak;
      wk = (ah / ak - r) / sqr;
      gw = 2. * gk;
      is = 1;
    }
  } else {
    wh = -ah;
    wk = (ak / ah - r) / sqr;
    gw = 2. * gh;
    is = -1;
  }
L210:
  sgn = -1.;
  t = 0.;
  if (wk != 0.) {
    if (fabs(wk) == 1.) {
      t = wk * gw * (1. - gw) * .5;
      goto L310;
    } else {
      if (fabs(wk) > 1.) {
        sgn = -sgn;
        wh = wh * wk;
        g2 = alnorm(wh, 0);
        wk = 1. / wk;
        if (wk < 0) {
          b = b + .5;
        }
        b = b - (gw + g2) * .5 + gw * g2;
      }
      h2 = wh * wh;
      a2 = wk * wk;
      h4 = h2 * .5;
      ex = 0.0;
      if (h4 < 87.0)
        ex = exp(-h4);
      w2 = h4 * ex;
      ap = 1.;
      s2 = ap - ex;
      sp = ap;
      s1 = 0.;
      sn = s1;
      conex = fabs(con / wk);
      goto L290;
    }
  } else {
    goto L320;
  }
L290:
  cn = ap * s2 / (sn + sp);
  s1 += cn;
  while (fabs(cn) - conex > 0) {
    sn = sp;
    sp += 1.;
    s2 -= w2;
    if (fabs(w2) <= 1.0e-15 || fabs(h4) <= 1.0e-15)
      w2 = 0.0;
    else {
      w2 *= h4 / sp;
    }
    if (fabs(ap) <= 1.0e-15 || fabs(a2) <= 1.0e-15) {
      ap = 0.0;
    } else {
      ap = -ap * a2;
    }
    cn = ap * s2 / (sn + sp);
    s1 += cn;
  }
  t = (atan(wk) - wk * s1) / twopi;
L310:
  b += sgn * t;
L320:
  if (is < 0) {
    if (ak != 0.) {
      wh = -ak;
      wk = (ah / ak - r) / sqr;
      gw = 2. * gk;
      is = 1;
      goto L210;
    } else {
      if (b < 0.)
        b = 0.;
      if (b > 1.)
        b = 1.;
      return (b);
    }
  } else {
    if (b < 0.)
      b = 0.;
    if (b > 1.)
      b = 1.;
    return (b);
  }
}


x86 assembly (clang, -O0):
<bivnor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  0xea6(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x9,-0xec(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%edi
call   1060 <alnorm@plt>
movsd  0xe70(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%edi
call   1060 <alnorm@plt>
movsd  0xe50(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11d6 <bivnor+0x96>
jp     11d6 <bivnor+0x96>
jmp    1211 <bivnor+0xd1>
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe15(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    1271 <bivnor+0x131>
movsd  0xdf7(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    123e <bivnor+0xfe>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xdcd(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1262 <bivnor+0x122>
movsd  0xdbb(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1d55 <bivnor+0xc15>
xorps  %xmm0,%xmm0
ucomisd -0x48(%rbp),%xmm0
jbe    1291 <bivnor+0x151>
movsd  0xda1(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1d55 <bivnor+0xc15>
movsd  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    13bf <bivnor+0x27f>
jp     13bf <bivnor+0x27f>
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1336 <bivnor+0x1f6>
movsd  -0x10(%rbp),%xmm1
addsd  -0x18(%rbp),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    12ed <bivnor+0x1ad>
movsd  -0x38(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xd44(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1303 <bivnor+0x1c3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xd08(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1327 <bivnor+0x1e7>
movsd  0xcf6(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1d55 <bivnor+0xc15>
movsd  -0x10(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1364 <bivnor+0x224>
movsd  0xcab(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1376 <bivnor+0x236>
movsd  0xc94(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    138c <bivnor+0x24c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xc7f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13b0 <bivnor+0x270>
movsd  0xc6d(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1d55 <bivnor+0xc15>
movsd  -0x48(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  0xc4a(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x1,-0xf0(%rbp)
mov    -0xf0(%rbp),%eax
cmp    -0xec(%rbp),%eax
jg     1426 <bivnor+0x2e6>
movsd  -0x50(%rbp),%xmm0
movsd  0xc3f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    13ea <bivnor+0x2aa>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    15ac <bivnor+0x46c>
jp     15ac <bivnor+0x46c>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    14c4 <bivnor+0x384>
jp     14c4 <bivnor+0x384>
movsd  -0x20(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
call   1030 <atan@plt>
divsd  -0x28(%rbp),%xmm0
movsd  0xbce(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1491 <bivnor+0x351>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xb7a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    14b5 <bivnor+0x375>
movsd  0xb68(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1d55 <bivnor+0xc15>
movsd  -0x40(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    14f0 <bivnor+0x3b0>
jp     14f0 <bivnor+0x3b0>
jmp    154e <bivnor+0x40e>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xace(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movl   $0xffffffff,-0xf4(%rbp)
ff ff ff
jmp    15a7 <bivnor+0x467>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xa70(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movl   $0x1,-0xf4(%rbp)
jmp    174b <bivnor+0x60b>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    15e3 <bivnor+0x4a3>
movsd  -0x30(%rbp),%xmm0
movsd  0xa46(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1605 <bivnor+0x4c5>
jp     1605 <bivnor+0x4c5>
jmp    16ed <bivnor+0x5ad>
movsd  -0x40(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1631 <bivnor+0x4f1>
jp     1631 <bivnor+0x4f1>
jmp    168f <bivnor+0x54f>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0x98d(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movl   $0xffffffff,-0xf4(%rbp)
ff ff ff
jmp    16e8 <bivnor+0x5a8>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0x92f(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movl   $0x1,-0xf4(%rbp)
jmp    1746 <bivnor+0x606>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0x8d1(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movl   $0xffffffff,-0xf4(%rbp)
ff ff ff
jmp    174b <bivnor+0x60b>
movsd  0x8d5(%rip),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1783 <bivnor+0x643>
jp     1783 <bivnor+0x643>
jmp    19dd <bivnor+0x89d>
movsd  -0x68(%rbp),%xmm0
movaps 0x8c1(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x87d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    17e5 <bivnor+0x6a5>
jp     17e5 <bivnor+0x6a5>
movsd  -0x68(%rbp),%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
movsd  0x858(%rip),%xmm1
subsd  -0xc0(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  0x84c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    1c1e <bivnor+0xade>
movsd  -0x68(%rbp),%xmm0
movaps 0x85f(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0x81b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    18dc <bivnor+0x79c>
movsd  -0xe8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
xor    %edi,%edi
call   1060 <alnorm@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0x7bf(%rip),%xmm0
divsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x68(%rbp),%xmm0
jbe    1883 <bivnor+0x743>
movsd  0x7a7(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0xc0(%rbp),%xmm1
ff
addsd  -0xc8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0x769(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0x71e(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0x711(%rip),%xmm0
ucomisd -0x88(%rbp),%xmm0
ff
jbe    1956 <bivnor+0x816>
movsd  -0x88(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0x6a5(%rip),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
subsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
divsd  -0x68(%rbp),%xmm0
movaps 0x684(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
jmp    19e2 <bivnor+0x8a2>
jmp    1c40 <bivnor+0xb00>
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0xd0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm1
ff
addsd  -0xa0(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
addsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movaps 0x61b(%rip),%xmm1
pand   %xmm1,%xmm0
subsd  -0xe0(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1bd8 <bivnor+0xa98>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0x5b2(%rip),%xmm0
addsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x90(%rbp),%xmm1
ff
movaps 0x5af(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0x58b(%rip),%xmm0
ucomisd %xmm1,%xmm0
jae    1adc <bivnor+0x99c>
movsd  -0x88(%rbp),%xmm1
ff
movaps 0x58a(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0x566(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1aec <bivnor+0x9ac>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    1b0c <bivnor+0x9cc>
movsd  -0x88(%rbp),%xmm0
ff
divsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0xa8(%rbp),%xmm1
ff
movaps 0x535(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0x511(%rip),%xmm0
ucomisd %xmm1,%xmm0
jae    1b53 <bivnor+0xa13>
movsd  -0x78(%rbp),%xmm1
movaps 0x513(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0x4ef(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1b63 <bivnor+0xa23>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    1b8f <bivnor+0xa4f>
movsd  -0xa8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0xd0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm1
ff
addsd  -0xa0(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
addsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    1a26 <bivnor+0x8e6>
movsd  -0x68(%rbp),%xmm0
call   1030 <atan@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
movsd  -0xd8(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
cmpl   $0x0,-0xf4(%rbp)
jge    1d11 <bivnor+0xbd1>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1c6a <bivnor+0xb2a>
jp     1c6a <bivnor+0xb2a>
jmp    1cc8 <bivnor+0xb88>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0x354(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movl   $0x1,-0xf4(%rbp)
jmp    174b <bivnor+0x60b>
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1cde <bivnor+0xb9e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0x32d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1d02 <bivnor+0xbc2>
movsd  0x31b(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1d55 <bivnor+0xc15>
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1d27 <bivnor+0xbe7>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0x2e4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1d4b <bivnor+0xc0b>
movsd  0x2d2(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bivnor>:
push   %rbx
sub    $0xa0,%rsp
movsd  %xmm2,0x18(%rsp)
movapd %xmm1,0x50(%rsp)
movapd %xmm0,0x40(%rsp)
mov    $0x1,%edi
call   1060 <alnorm@plt>
mulsd  0xe94(%rip),%xmm0
movapd %xmm0,(%rsp)
movapd 0x50(%rsp),%xmm0
mov    $0x1,%edi
call   1060 <alnorm@plt>
movsd  0xe76(%rip),%xmm11
movsd  0x18(%rsp),%xmm6
movapd %xmm0,%xmm3
mulsd  %xmm11,%xmm3
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm6
jne    11a5 <bivnor+0x65>
jnp    11d0 <bivnor+0x90>
movapd %xmm6,%xmm2
mulsd  %xmm6,%xmm2
movsd  0xe5b(%rip),%xmm5
movapd %xmm5,%xmm0
subsd  %xmm2,%xmm0
ucomisd %xmm0,%xmm1
jbe    11e6 <bivnor+0xa6>
movsd  0xe4d(%rip),%xmm0
jmp    12f3 <bivnor+0x1b3>
movapd (%rsp),%xmm0
mulsd  0xe2b(%rip),%xmm0
mulsd  %xmm3,%xmm0
jmp    12e3 <bivnor+0x1a3>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    122b <bivnor+0xeb>
jp     122b <bivnor+0xeb>
ucomisd %xmm6,%xmm1
jbe    123d <bivnor+0xfd>
movapd 0x40(%rsp),%xmm0
addsd  0x50(%rsp),%xmm0
movapd (%rsp),%xmm2
addsd  %xmm3,%xmm2
addsd  %xmm2,%xmm2
addsd  0xdff(%rip),%xmm2
xorpd  %xmm1,%xmm1
cmpltsd %xmm1,%xmm0
andpd  %xmm2,%xmm0
jmp    12e3 <bivnor+0x1a3>
movapd %xmm3,0x80(%rsp)
jb     1265 <bivnor+0x125>
sqrtsd %xmm0,%xmm9
jmp    128f <bivnor+0x14f>
movapd 0x40(%rsp),%xmm0
subsd  0x50(%rsp),%xmm0
xorpd  %xmm1,%xmm1
cmpltsd %xmm1,%xmm0
andpd  %xmm0,%xmm3
andnpd (%rsp),%xmm0
orpd   %xmm3,%xmm0
addsd  %xmm0,%xmm0
jmp    12e3 <bivnor+0x1a3>
call   1050 <sqrt@plt>
movsd  0xd9e(%rip),%xmm5
movsd  0xd85(%rip),%xmm11
movsd  0x18(%rsp),%xmm6
movapd 0x80(%rsp),%xmm3
movapd %xmm0,%xmm9
xorpd  %xmm8,%xmm8
movapd 0x40(%rsp),%xmm14
ucomisd %xmm8,%xmm14
movapd 0x50(%rsp),%xmm10
movapd (%rsp),%xmm4
jne    12fc <bivnor+0x1bc>
jp     12fc <bivnor+0x1bc>
ucomisd %xmm8,%xmm10
jne    1354 <bivnor+0x214>
jp     1354 <bivnor+0x214>
divsd  %xmm9,%xmm6
movapd %xmm6,%xmm0
call   1030 <atan@plt>
divsd  0xd69(%rip),%xmm0
addsd  0xd69(%rip),%xmm0
xorpd  %xmm1,%xmm1
maxsd  %xmm0,%xmm1
movsd  0xd21(%rip),%xmm0
minsd  %xmm1,%xmm0
add    $0xa0,%rsp
pop    %rbx
ret
movapd %xmm14,%xmm0
mulsd  %xmm10,%xmm0
movsd  0xd12(%rip),%xmm2
addsd  %xmm4,%xmm2
ucomisd %xmm8,%xmm0
movapd %xmm0,%xmm1
cmpltsd %xmm8,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm4,%xmm1
orpd   %xmm2,%xmm1
jne    1331 <bivnor+0x1f1>
jnp    1335 <bivnor+0x1f5>
addsd  %xmm3,%xmm1
movapd 0xd12(%rip),%xmm12
xorpd  %xmm14,%xmm12
movapd %xmm10,%xmm7
divsd  %xmm14,%xmm7
mov    $0xffffffff,%ebx
jmp    137d <bivnor+0x23d>
xorpd  %xmm1,%xmm1
addsd  %xmm3,%xmm1
movapd 0xceb(%rip),%xmm12
xorpd  %xmm10,%xmm12
movapd %xmm14,%xmm7
divsd  %xmm10,%xmm7
mov    $0x1,%ebx
movapd %xmm3,%xmm4
movapd 0xccb(%rip),%xmm2
xorpd  %xmm10,%xmm2
divsd  %xmm10,%xmm14
xorpd  %xmm13,%xmm13
movsd  0xc7b(%rip),%xmm8
movapd %xmm14,0x40(%rsp)
movsd  %xmm9,0x78(%rsp)
movapd %xmm2,0x90(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
subsd  %xmm6,%xmm7
divsd  %xmm9,%xmm7
ucomisd %xmm13,%xmm7
jne    13d6 <bivnor+0x296>
jnp    16df <bivnor+0x59f>
addsd  %xmm4,%xmm4
movapd %xmm7,%xmm0
andpd  0xc7a(%rip),%xmm0
ucomisd %xmm5,%xmm0
jne    140d <bivnor+0x2cd>
jp     140d <bivnor+0x2cd>
mulsd  %xmm4,%xmm7
movapd %xmm5,%xmm0
subsd  %xmm4,%xmm0
mulsd  %xmm7,%xmm0
mulsd  %xmm11,%xmm0
movapd %xmm8,%xmm4
jmp    16d7 <bivnor+0x597>
ucomisd %xmm5,%xmm0
jbe    14b5 <bivnor+0x375>
mulsd  %xmm7,%xmm12
movapd %xmm12,0x20(%rsp)
movapd %xmm12,%xmm0
xor    %edi,%edi
movapd %xmm1,0x60(%rsp)
movapd %xmm7,0x30(%rsp)
movapd %xmm4,(%rsp)
call   1060 <alnorm@plt>
xorpd  %xmm13,%xmm13
movapd 0x20(%rsp),%xmm12
movsd  0xbbc(%rip),%xmm5
movsd  0xba3(%rip),%xmm11
movapd %xmm5,%xmm1
divsd  0x30(%rsp),%xmm1
movapd 0x60(%rsp),%xmm3
movapd %xmm3,%xmm2
addsd  %xmm11,%xmm2
movapd %xmm1,%xmm7
cmpltsd %xmm13,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm3,%xmm1
orpd   %xmm2,%xmm1
movapd (%rsp),%xmm3
movapd %xmm3,%xmm2
addsd  %xmm0,%xmm2
mulsd  %xmm11,%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm3
addsd  %xmm1,%xmm3
movapd %xmm3,%xmm1
movsd  %xmm5,(%rsp)
jmp    14bb <bivnor+0x37b>
movsd  %xmm8,(%rsp)
movapd 0xb9d(%rip),%xmm4
movapd %xmm1,0x60(%rsp)
mulsd  %xmm12,%xmm12
mulsd  %xmm11,%xmm12
xorpd  %xmm0,%xmm0
movsd  0xb49(%rip),%xmm1
ucomisd %xmm12,%xmm1
movapd %xmm7,0x30(%rsp)
jbe    1527 <bivnor+0x3e7>
movapd %xmm12,%xmm0
xorpd  0xb57(%rip),%xmm0
movapd %xmm12,0x20(%rsp)
call   1040 <exp@plt>
movapd 0x30(%rsp),%xmm7
movapd 0xb4d(%rip),%xmm4
xorpd  %xmm13,%xmm13
movapd 0x20(%rsp),%xmm12
movsd  0xae9(%rip),%xmm5
movapd %xmm5,%xmm1
subsd  %xmm0,%xmm1
movsd  0xaf9(%rip),%xmm2
divsd  %xmm7,%xmm2
andpd  %xmm4,%xmm2
movapd %xmm1,%xmm11
addsd  %xmm13,%xmm11
movapd %xmm1,%xmm3
andpd  %xmm4,%xmm3
subsd  %xmm2,%xmm3
ucomisd %xmm13,%xmm3
jbe    1656 <bivnor+0x516>
movapd %xmm7,%xmm9
mulsd  %xmm7,%xmm9
mulsd  %xmm12,%xmm0
movapd %xmm12,%xmm8
andpd  %xmm4,%xmm8
movapd %xmm9,%xmm10
andpd  %xmm4,%xmm10
movapd %xmm5,%xmm3
movapd %xmm5,%xmm6
movsd  0xaa4(%rip),%xmm14
movapd %xmm5,%xmm13
jmp    1616 <bivnor+0x4d6>
nopl   0x0(%rax,%rax,1)
subsd  %xmm0,%xmm1
movapd %xmm3,%xmm0
movapd 0xaaf(%rip),%xmm15
andpd  %xmm15,%xmm0
xorpd  0xa92(%rip),%xmm3
mulsd  %xmm9,%xmm3
movapd %xmm10,%xmm5
movsd  0xa67(%rip),%xmm14
cmpnlesd %xmm14,%xmm5
andpd  %xmm3,%xmm5
cmpnlesd %xmm14,%xmm0
andpd  %xmm5,%xmm0
movapd %xmm0,%xmm3
mulsd  %xmm1,%xmm0
addsd  %xmm6,%xmm7
divsd  %xmm7,%xmm0
addsd  %xmm0,%xmm11
andpd  %xmm15,%xmm0
subsd  %xmm2,%xmm0
xorpd  %xmm5,%xmm5
ucomisd %xmm5,%xmm0
movapd %xmm4,%xmm0
movapd %xmm13,%xmm5
jbe    1656 <bivnor+0x516>
movapd %xmm6,%xmm7
addsd  %xmm5,%xmm6
movapd %xmm0,%xmm4
andpd  0xa36(%rip),%xmm4
ucomisd %xmm4,%xmm14
xorpd  %xmm4,%xmm4
jae    15a0 <bivnor+0x460>
ucomisd %xmm8,%xmm14
jae    15a0 <bivnor+0x460>
movapd %xmm12,%xmm4
divsd  %xmm6,%xmm4
mulsd  %xmm0,%xmm4
jmp    15a0 <bivnor+0x460>
movapd %xmm11,0x20(%rsp)
movapd 0x30(%rsp),%xmm0
call   1030 <atan@plt>
xorpd  %xmm13,%xmm13
movsd  0x99b(%rip),%xmm5
movapd 0x20(%rsp),%xmm1
mulsd  0x30(%rsp),%xmm1
subsd  %xmm1,%xmm0
divsd  0x9b3(%rip),%xmm0
movapd 0x40(%rsp),%xmm14
movapd 0x50(%rsp),%xmm10
movapd 0x80(%rsp),%xmm3
movsd  0x18(%rsp),%xmm6
movsd  0x94d(%rip),%xmm11
movsd  0x78(%rsp),%xmm9
movapd 0x60(%rsp),%xmm1
movapd 0x90(%rsp),%xmm2
movsd  0x946(%rip),%xmm8
movsd  (%rsp),%xmm4
mulsd  %xmm4,%xmm0
addsd  %xmm0,%xmm1
test   %ebx,%ebx
jns    1707 <bivnor+0x5c7>
mov    $0x1,%ebx
ucomisd %xmm13,%xmm10
movapd %xmm14,%xmm7
movapd %xmm2,%xmm12
movapd %xmm3,%xmm4
jne    13c0 <bivnor+0x280>
jp     13c0 <bivnor+0x280>
xorpd  %xmm2,%xmm2
maxsd  %xmm1,%xmm2
movsd  0x8f9(%rip),%xmm0
minsd  %xmm2,%xmm0
jmp    12f3 <bivnor+0x1b3>

LLVM IR (-O0):
define double @bivnor(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double 0x401921FB54442D19, double* %8
store double 0.000000e+00, double* %9
store i32 9, i32* %33
%36 = load double, double* %5
%37 = call double @alnorm(double %36, i32 1)
%38 = fdiv double %37, 2.000000e+00
store double %38, double* %10
%39 = load double, double* %6
%40 = call double @alnorm(double %39, i32 1)
%41 = fdiv double %40, 2.000000e+00
store double %41, double* %11
%42 = load double, double* %7
%43 = fcmp une double %42, 0.000000e+00
br i1 %43, label %44, label %49
44: ; preds = %3
%45 = load double, double* %7
%46 = load double, double* %7
%47 = fneg double %45
%48 = call double @llvm.fmuladd.f64(double %47, double %46, double 1.000000e+00)
store double %48, double* %12
br label %63
49: ; preds = %3
%50 = load double, double* %10
%51 = fmul double 4.000000e+00, %50
%52 = load double, double* %11
%53 = fmul double %51, %52
store double %53, double* %9
%54 = load double, double* %9
%55 = fcmp olt double %54, 0.000000e+00
br i1 %55, label %56, label %57
56: ; preds = %49
store double 0.000000e+00, double* %9
br label %57
57: ; preds = %56, %49
%58 = load double, double* %9
%59 = fcmp ogt double %58, 1.000000e+00
br i1 %59, label %60, label %61
60: ; preds = %57
store double 1.000000e+00, double* %9
br label %61
61: ; preds = %60, %57
%62 = load double, double* %9
store double %62, double* %4
br label %429
63: ; preds = %44
%64 = load double, double* %12
%65 = fcmp olt double %64, 0.000000e+00
br i1 %65, label %66, label %67
66: ; preds = %63
store double -1.000000e+00, double* %4
br label %429
67: ; preds = %63
%68 = load double, double* %12
%69 = fcmp oeq double %68, 0.000000e+00
br i1 %69, label %70, label %114
70: ; preds = %67
%71 = load double, double* %7
%72 = fcmp olt double %71, 0.000000e+00
br i1 %72, label %73, label %93
73: ; preds = %70
%74 = load double, double* %5
%75 = load double, double* %6
%76 = fadd double %74, %75
%77 = fcmp olt double %76, 0.000000e+00
br i1 %77, label %78, label %83
78: ; preds = %73
%79 = load double, double* %10
%80 = load double, double* %11
%81 = fadd double %79, %80
%82 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %81, double -1.000000e+00)
store double %82, double* %9
br label %83
83: ; preds = %78, %73
%84 = load double, double* %9
%85 = fcmp olt double %84, 0.000000e+00
br i1 %85, label %86, label %87
86: ; preds = %83
store double 0.000000e+00, double* %9
br label %87
87: ; preds = %86, %83
%88 = load double, double* %9
%89 = fcmp ogt double %88, 1.000000e+00
br i1 %89, label %90, label %91
90: ; preds = %87
store double 1.000000e+00, double* %9
br label %91
91: ; preds = %90, %87
%92 = load double, double* %9
store double %92, double* %4
br label %429
93: ; preds = %70
%94 = load double, double* %5
%95 = load double, double* %6
%96 = fsub double %94, %95
%97 = fcmp olt double %96, 0.000000e+00
br i1 %97, label %98, label %101
98: ; preds = %93
%99 = load double, double* %11
%100 = fmul double 2.000000e+00, %99
store double %100, double* %9
br label %104
101: ; preds = %93
%102 = load double, double* %10
%103 = fmul double 2.000000e+00, %102
store double %103, double* %9
br label %104
104: ; preds = %101, %98
%105 = load double, double* %9
%106 = fcmp olt double %105, 0.000000e+00
br i1 %106, label %107, label %108
107: ; preds = %104
store double 0.000000e+00, double* %9
br label %108
108: ; preds = %107, %104
%109 = load double, double* %9
%110 = fcmp ogt double %109, 1.000000e+00
br i1 %110, label %111, label %112
111: ; preds = %108
store double 1.000000e+00, double* %9
br label %112
112: ; preds = %111, %108
%113 = load double, double* %9
store double %113, double* %4
br label %429
114: ; preds = %67
%115 = load double, double* %12
%116 = call double @sqrt(double %115)
store double %116, double* %14
%117 = load double, double* %8
%118 = fmul double %117, 5.000000e-01
store double %118, double* %13
store i32 1, i32* %34
br label %119
119: ; preds = %126, %114
%120 = load i32, i32* %34
%121 = load i32, i32* %33
%122 = icmp sle i32 %120, %121
br i1 %122, label %123, label %129
123: ; preds = %119
%124 = load double, double* %13
%125 = fdiv double %124, 1.000000e+01
store double %125, double* %13
br label %126
126: ; preds = %123
%127 = load i32, i32* %34
%128 = add nsw i32 %127, 1
store i32 %128, i32* %34
br label %119
129: ; preds = %119
%130 = load double, double* %5
%131 = fcmp oeq double %130, 0.000000e+00
br i1 %131, label %132, label %183
132: ; preds = %129
%133 = load double, double* %6
%134 = fcmp oeq double %133, 0.000000e+00
br i1 %134, label %135, label %152
135: ; preds = %132
%136 = load double, double* %7
%137 = load double, double* %14
%138 = fdiv double %136, %137
%139 = call double @atan(double %138)
%140 = load double, double* %8
%141 = fdiv double %139, %140
%142 = fadd double %141, 2.500000e-01
store double %142, double* %9
%143 = load double, double* %9
%144 = fcmp olt double %143, 0.000000e+00
br i1 %144, label %145, label %146
145: ; preds = %135
store double 0.000000e+00, double* %9
br label %146
146: ; preds = %145, %135
%147 = load double, double* %9
%148 = fcmp ogt double %147, 1.000000e+00
br i1 %148, label %149, label %150
149: ; preds = %146
store double 1.000000e+00, double* %9
br label %150
150: ; preds = %149, %146
%151 = load double, double* %9
store double %151, double* %4
br label %429
152: ; preds = %132
%153 = load double, double* %11
%154 = load double, double* %9
%155 = fadd double %154, %153
store double %155, double* %9
%156 = load double, double* %5
%157 = fcmp une double %156, 0.000000e+00
br i1 %157, label %158, label %170
158: ; preds = %152
%159 = load double, double* %5
%160 = fneg double %159
store double %160, double* %15
%161 = load double, double* %6
%162 = load double, double* %5
%163 = fdiv double %161, %162
%164 = load double, double* %7
%165 = fsub double %163, %164
%166 = load double, double* %14
%167 = fdiv double %165, %166
store double %167, double* %16
%168 = load double, double* %10
%169 = fmul double 2.000000e+00, %168
store double %169, double* %27
store i32 -1, i32* %35
br label %182
170: ; preds = %152
%171 = load double, double* %6
%172 = fneg double %171
store double %172, double* %15
%173 = load double, double* %5
%174 = load double, double* %6
%175 = fdiv double %173, %174
%176 = load double, double* %7
%177 = fsub double %175, %176
%178 = load double, double* %14
%179 = fdiv double %177, %178
store double %179, double* %16
%180 = load double, double* %11
%181 = fmul double 2.000000e+00, %180
store double %181, double* %27
store i32 1, i32* %35
br label %182
182: ; preds = %170, %158
br label %241
183: ; preds = %129
%184 = load double, double* %10
store double %184, double* %9
%185 = load double, double* %5
%186 = load double, double* %6
%187 = fmul double %185, %186
%188 = fcmp olt double %187, 0.000000e+00
br i1 %188, label %189, label %192
189: ; preds = %183
%190 = load double, double* %9
%191 = fsub double %190, 5.000000e-01
store double %191, double* %9
br label %192
192: ; preds = %189, %183
%193 = load double, double* %5
%194 = load double, double* %6
%195 = fmul double %193, %194
%196 = fcmp une double %195, 0.000000e+00
br i1 %196, label %197, label %228
197: ; preds = %192
%198 = load double, double* %11
%199 = load double, double* %9
%200 = fadd double %199, %198
store double %200, double* %9
%201 = load double, double* %5
%202 = fcmp une double %201, 0.000000e+00
br i1 %202, label %203, label %215
203: ; preds = %197
%204 = load double, double* %5
%205 = fneg double %204
store double %205, double* %15
%206 = load double, double* %6
%207 = load double, double* %5
%208 = fdiv double %206, %207
%209 = load double, double* %7
%210 = fsub double %208, %209
%211 = load double, double* %14
%212 = fdiv double %210, %211
store double %212, double* %16
%213 = load double, double* %10
%214 = fmul double 2.000000e+00, %213
store double %214, double* %27
store i32 -1, i32* %35
br label %227
215: ; preds = %197
%216 = load double, double* %6
%217 = fneg double %216
store double %217, double* %15
%218 = load double, double* %5
%219 = load double, double* %6
%220 = fdiv double %218, %219
%221 = load double, double* %7
%222 = fsub double %220, %221
%223 = load double, double* %14
%224 = fdiv double %222, %223
store double %224, double* %16
%225 = load double, double* %11
%226 = fmul double 2.000000e+00, %225
store double %226, double* %27
store i32 1, i32* %35
br label %227
227: ; preds = %215, %203
br label %240
228: ; preds = %192
%229 = load double, double* %5
%230 = fneg double %229
store double %230, double* %15
%231 = load double, double* %6
%232 = load double, double* %5
%233 = fdiv double %231, %232
%234 = load double, double* %7
%235 = fsub double %233, %234
%236 = load double, double* %14
%237 = fdiv double %235, %236
store double %237, double* %16
%238 = load double, double* %10
%239 = fmul double 2.000000e+00, %238
store double %239, double* %27
store i32 -1, i32* %35
br label %240
240: ; preds = %228, %227
br label %241
241: ; preds = %397, %240, %182
store double -1.000000e+00, double* %32
store double 0.000000e+00, double* %26
%242 = load double, double* %16
%243 = fcmp une double %242, 0.000000e+00
br i1 %243, label %244, label %313
244: ; preds = %241
%245 = load double, double* %16
%246 = call double @llvm.fabs.f64(double %245)
%247 = fcmp oeq double %246, 1.000000e+00
br i1 %247, label %248, label %256
248: ; preds = %244
%249 = load double, double* %16
%250 = load double, double* %27
%251 = fmul double %249, %250
%252 = load double, double* %27
%253 = fsub double 1.000000e+00, %252
%254 = fmul double %251, %253
%255 = fmul double %254, 5.000000e-01
store double %255, double* %26
br label %386
256: ; preds = %244
%257 = load double, double* %16
%258 = call double @llvm.fabs.f64(double %257)
%259 = fcmp ogt double %258, 1.000000e+00
br i1 %259, label %260, label %285
260: ; preds = %256
%261 = load double, double* %32
%262 = fneg double %261
store double %262, double* %32
%263 = load double, double* %15
%264 = load double, double* %16
%265 = fmul double %263, %264
store double %265, double* %15
%266 = load double, double* %15
%267 = call double @alnorm(double %266, i32 0)
store double %267, double* %28
%268 = load double, double* %16
%269 = fdiv double 1.000000e+00, %268
store double %269, double* %16
%270 = load double, double* %16
%271 = fcmp olt double %270, 0.000000e+00
br i1 %271, label %272, label %275
272: ; preds = %260
%273 = load double, double* %9
%274 = fadd double %273, 5.000000e-01
store double %274, double* %9
br label %275
275: ; preds = %272, %260
%276 = load double, double* %9
%277 = load double, double* %27
%278 = load double, double* %28
%279 = fadd double %277, %278
%280 = fneg double %279
%281 = call double @llvm.fmuladd.f64(double %280, double 5.000000e-01, double %276)
%282 = load double, double* %27
%283 = load double, double* %28
%284 = call double @llvm.fmuladd.f64(double %282, double %283, double %281)
store double %284, double* %9
br label %285
285: ; preds = %275, %256
%286 = load double, double* %15
%287 = load double, double* %15
%288 = fmul double %286, %287
store double %288, double* %17
%289 = load double, double* %16
%290 = load double, double* %16
%291 = fmul double %289, %290
store double %291, double* %18
%292 = load double, double* %17
%293 = fmul double %292, 5.000000e-01
store double %293, double* %20
store double 0.000000e+00, double* %19
%294 = load double, double* %20
%295 = fcmp olt double %294, 8.700000e+01
br i1 %295, label %296, label %300
296: ; preds = %285
%297 = load double, double* %20
%298 = fneg double %297
%299 = call double @exp(double %298)
store double %299, double* %19
br label %300
300: ; preds = %296, %285
%301 = load double, double* %20
%302 = load double, double* %19
%303 = fmul double %301, %302
store double %303, double* %21
store double 1.000000e+00, double* %24
%304 = load double, double* %24
%305 = load double, double* %19
%306 = fsub double %304, %305
store double %306, double* %29
%307 = load double, double* %24
store double %307, double* %23
store double 0.000000e+00, double* %30
%308 = load double, double* %30
store double %308, double* %22
%309 = load double, double* %13
%310 = load double, double* %16
%311 = fdiv double %309, %310
%312 = call double @llvm.fabs.f64(double %311)
store double %312, double* %31
br label %314
313: ; preds = %241
br label %391
314: ; preds = %300
%315 = load double, double* %24
%316 = load double, double* %29
%317 = fmul double %315, %316
%318 = load double, double* %22
%319 = load double, double* %23
%320 = fadd double %318, %319
%321 = fdiv double %317, %320
store double %321, double* %25
%322 = load double, double* %25
%323 = load double, double* %30
%324 = fadd double %323, %322
store double %324, double* %30
br label %325
325: ; preds = %366, %314
%326 = load double, double* %25
%327 = call double @llvm.fabs.f64(double %326)
%328 = load double, double* %31
%329 = fsub double %327, %328
%330 = fcmp ogt double %329, 0.000000e+00
br i1 %330, label %331, label %377
331: ; preds = %325
%332 = load double, double* %23
store double %332, double* %22
%333 = load double, double* %23
%334 = fadd double %333, 1.000000e+00
store double %334, double* %23
%335 = load double, double* %21
%336 = load double, double* %29
%337 = fsub double %336, %335
store double %337, double* %29
%338 = load double, double* %21
%339 = call double @llvm.fabs.f64(double %338)
%340 = fcmp ole double %339, 1.000000e-15
br i1 %340, label %345, label %341
341: ; preds = %331
%342 = load double, double* %20
%343 = call double @llvm.fabs.f64(double %342)
%344 = fcmp ole double %343, 1.000000e-15
br i1 %344, label %345, label %346
345: ; preds = %341, %331
store double 0.000000e+00, double* %21
br label %352
346: ; preds = %341
%347 = load double, double* %20
%348 = load double, double* %23
%349 = fdiv double %347, %348
%350 = load double, double* %21
%351 = fmul double %350, %349
store double %351, double* %21
br label %352
352: ; preds = %346, %345
%353 = load double, double* %24
%354 = call double @llvm.fabs.f64(double %353)
%355 = fcmp ole double %354, 1.000000e-15
br i1 %355, label %360, label %356
356: ; preds = %352
%357 = load double, double* %18
%358 = call double @llvm.fabs.f64(double %357)
%359 = fcmp ole double %358, 1.000000e-15
br i1 %359, label %360, label %361
360: ; preds = %356, %352
store double 0.000000e+00, double* %24
br label %366
361: ; preds = %356
%362 = load double, double* %24
%363 = fneg double %362
%364 = load double, double* %18
%365 = fmul double %363, %364
store double %365, double* %24
br label %366
366: ; preds = %361, %360
%367 = load double, double* %24
%368 = load double, double* %29
%369 = fmul double %367, %368
%370 = load double, double* %22
%371 = load double, double* %23
%372 = fadd double %370, %371
%373 = fdiv double %369, %372
store double %373, double* %25
%374 = load double, double* %25
%375 = load double, double* %30
%376 = fadd double %375, %374
store double %376, double* %30
br label %325
377: ; preds = %325
%378 = load double, double* %16
%379 = call double @atan(double %378)
%380 = load double, double* %16
%381 = load double, double* %30
%382 = fneg double %380
%383 = call double @llvm.fmuladd.f64(double %382, double %381, double %379)
%384 = load double, double* %8
%385 = fdiv double %383, %384
store double %385, double* %26
br label %386
386: ; preds = %377, %248
%387 = load double, double* %32
%388 = load double, double* %26
%389 = load double, double* %9
%390 = call double @llvm.fmuladd.f64(double %387, double %388, double %389)
store double %390, double* %9
br label %391
391: ; preds = %386, %313
%392 = load i32, i32* %35
%393 = icmp slt i32 %392, 0
br i1 %393, label %394, label %419
394: ; preds = %391
%395 = load double, double* %6
%396 = fcmp une double %395, 0.000000e+00
br i1 %396, label %397, label %409
397: ; preds = %394
%398 = load double, double* %6
%399 = fneg double %398
store double %399, double* %15
%400 = load double, double* %5
%401 = load double, double* %6
%402 = fdiv double %400, %401
%403 = load double, double* %7
%404 = fsub double %402, %403
%405 = load double, double* %14
%406 = fdiv double %404, %405
store double %406, double* %16
%407 = load double, double* %11
%408 = fmul double 2.000000e+00, %407
store double %408, double* %27
store i32 1, i32* %35
br label %241
409: ; preds = %394
%410 = load double, double* %9
%411 = fcmp olt double %410, 0.000000e+00
br i1 %411, label %412, label %413
412: ; preds = %409
store double 0.000000e+00, double* %9
br label %413
413: ; preds = %412, %409
%414 = load double, double* %9
%415 = fcmp ogt double %414, 1.000000e+00
br i1 %415, label %416, label %417
416: ; preds = %413
store double 1.000000e+00, double* %9
br label %417
417: ; preds = %416, %413
%418 = load double, double* %9
store double %418, double* %4
br label %429
419: ; preds = %391
%420 = load double, double* %9
%421 = fcmp olt double %420, 0.000000e+00
br i1 %421, label %422, label %423
422: ; preds = %419
store double 0.000000e+00, double* %9
br label %423
423: ; preds = %422, %419
%424 = load double, double* %9
%425 = fcmp ogt double %424, 1.000000e+00
br i1 %425, label %426, label %427
426: ; preds = %423
store double 1.000000e+00, double* %9
br label %427
427: ; preds = %426, %423
%428 = load double, double* %9
store double %428, double* %4
br label %429
429: ; preds = %427, %417, %150, %112, %91, %66, %61
%430 = load double, double* %4
ret double %430
}

LLVM IR (-O2):
define double @bivnor(double %0, double %1, double %2) {
%4 = tail call double @alnorm(double %0, i32 1)
%5 = fmul double %4, 5.000000e-01
%6 = tail call double @alnorm(double %1, i32 1)
%7 = fmul double %6, 5.000000e-01
%8 = fcmp une double %2, 0.000000e+00
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = fneg double %2
%11 = tail call double @llvm.fmuladd.f64(double %10, double %2, double 1.000000e+00)
%12 = fcmp olt double %11, 0.000000e+00
br i1 %12, label %195, label %20
13: ; preds = %3
%14 = fmul double %5, 4.000000e+00
%15 = fmul double %14, %7
%16 = fcmp olt double %15, 0.000000e+00
%17 = select i1 %16, double 0.000000e+00, double %15
%18 = fcmp ogt double %17, 1.000000e+00
%19 = select i1 %18, double 1.000000e+00, double %17
br label %195
20: ; preds = %9
%21 = fcmp oeq double %11, 0.000000e+00
br i1 %21, label %22, label %43
22: ; preds = %20
%23 = fcmp olt double %2, 0.000000e+00
br i1 %23, label %24, label %34
24: ; preds = %22
%25 = fadd double %0, %1
%26 = fcmp olt double %25, 0.000000e+00
%27 = fadd double %5, %7
%28 = tail call double @llvm.fmuladd.f64(double %27, double 2.000000e+00, double -1.000000e+00)
%29 = select i1 %26, double %28, double 0.000000e+00
%30 = fcmp olt double %29, 0.000000e+00
%31 = select i1 %30, double 0.000000e+00, double %29
%32 = fcmp ogt double %31, 1.000000e+00
%33 = select i1 %32, double 1.000000e+00, double %31
br label %195
34: ; preds = %22
%35 = fsub double %0, %1
%36 = fcmp olt double %35, 0.000000e+00
%37 = select i1 %36, double %7, double %5
%38 = fmul double %37, 2.000000e+00
%39 = fcmp olt double %38, 0.000000e+00
%40 = select i1 %39, double 0.000000e+00, double %38
%41 = fcmp ogt double %40, 1.000000e+00
%42 = select i1 %41, double 1.000000e+00, double %40
br label %195
43: ; preds = %20
%44 = tail call double @sqrt(double %11)
%45 = fcmp oeq double %0, 0.000000e+00
br i1 %45, label %46, label %61
46: ; preds = %43
%47 = fcmp oeq double %1, 0.000000e+00
br i1 %47, label %48, label %57
48: ; preds = %46
%49 = fdiv double %2, %44
%50 = tail call double @atan(double %49)
%51 = fdiv double %50, 0x401921FB54442D19
%52 = fadd double %51, 2.500000e-01
%53 = fcmp olt double %52, 0.000000e+00
%54 = select i1 %53, double 0.000000e+00, double %52
%55 = fcmp ogt double %54, 1.000000e+00
%56 = select i1 %55, double 1.000000e+00, double %54
br label %195
57: ; preds = %46
%58 = fadd double %7, 0.000000e+00
%59 = fneg double %1
%60 = fdiv double %0, %1
br label %74
61: ; preds = %43
%62 = fmul double %0, %1
%63 = fcmp olt double %62, 0.000000e+00
%64 = fadd double %5, -5.000000e-01
%65 = select i1 %63, double %64, double %5
%66 = fcmp une double %62, 0.000000e+00
br i1 %66, label %67, label %71
67: ; preds = %61
%68 = fadd double %7, %65
%69 = fneg double %0
%70 = fdiv double %1, %0
br label %74
71: ; preds = %61
%72 = fneg double %0
%73 = fdiv double %1, %0
br label %74
74: ; preds = %71, %67, %57
%75 = phi double [ %60, %57 ], [ %70, %67 ], [ %73, %71 ]
%76 = phi double [ %59, %57 ], [ %69, %67 ], [ %72, %71 ]
%77 = phi double [ %7, %57 ], [ %5, %67 ], [ %5, %71 ]
%78 = phi double [ %58, %57 ], [ %68, %67 ], [ %65, %71 ]
%79 = phi i32 [ 1, %57 ], [ -1, %67 ], [ -1, %71 ]
%80 = fcmp une double %1, 0.000000e+00
%81 = fneg double %1
%82 = fdiv double %0, %1
br label %83
83: ; preds = %184, %74
%84 = phi double [ %75, %74 ], [ %82, %184 ]
%85 = phi double [ %76, %74 ], [ %81, %184 ]
%86 = phi double [ %77, %74 ], [ %7, %184 ]
%87 = phi double [ %78, %74 ], [ %182, %184 ]
%88 = phi i32 [ %79, %74 ], [ 1, %184 ]
%89 = fmul double %86, 2.000000e+00
%90 = fsub double %84, %2
%91 = fdiv double %90, %44
%92 = fcmp une double %91, 0.000000e+00
br i1 %92, label %93, label %181
93: ; preds = %83
%94 = tail call double @llvm.fabs.f64(double %91)
%95 = fcmp oeq double %94, 1.000000e+00
br i1 %95, label %96, label %101
96: ; preds = %93
%97 = fmul double %91, %89
%98 = fsub double 1.000000e+00, %89
%99 = fmul double %97, %98
%100 = fmul double %99, 5.000000e-01
br label %176
101: ; preds = %93
%102 = fcmp ogt double %94, 1.000000e+00
br i1 %102, label %103, label %114
103: ; preds = %101
%104 = fmul double %85, %91
%105 = tail call double @alnorm(double %104, i32 0)
%106 = fdiv double 1.000000e+00, %91
%107 = fcmp olt double %106, 0.000000e+00
%108 = fadd double %87, 5.000000e-01
%109 = select i1 %107, double %108, double %87
%110 = fadd double %89, %105
%111 = fneg double %110
%112 = tail call double @llvm.fmuladd.f64(double %111, double 5.000000e-01, double %109)
%113 = tail call double @llvm.fmuladd.f64(double %89, double %105, double %112)
br label %114
114: ; preds = %103, %101
%115 = phi double [ %106, %103 ], [ %91, %101 ]
%116 = phi double [ %104, %103 ], [ %85, %101 ]
%117 = phi double [ %113, %103 ], [ %87, %101 ]
%118 = phi double [ 1.000000e+00, %103 ], [ -1.000000e+00, %101 ]
%119 = fmul double %116, %116
%120 = fmul double %115, %115
%121 = fmul double %119, 5.000000e-01
%122 = fcmp olt double %121, 8.700000e+01
br i1 %122, label %123, label %126
123: ; preds = %114
%124 = fneg double %121
%125 = tail call double @exp(double %124)
br label %126
126: ; preds = %123, %114
%127 = phi double [ %125, %123 ], [ 0.000000e+00, %114 ]
%128 = fsub double 1.000000e+00, %127
%129 = fdiv double 0x3E2AFC6F70213BE3, %115
%130 = tail call double @llvm.fabs.f64(double %129)
%131 = fadd double %128, 0.000000e+00
%132 = tail call double @llvm.fabs.f64(double %128)
%133 = fsub double %132, %130
%134 = fcmp ogt double %133, 0.000000e+00
br i1 %134, label %135, label %170
135: ; preds = %126
%136 = fmul double %121, %127
%137 = tail call double @llvm.fabs.f64(double %121)
%138 = fcmp ugt double %137, 1.000000e-15
%139 = tail call double @llvm.fabs.f64(double %120)
%140 = fcmp ugt double %139, 1.000000e-15
br label %141
141: ; preds = %135, %155
%142 = phi double [ %131, %135 ], [ %166, %155 ]
%143 = phi double [ %128, %135 ], [ %148, %155 ]
%144 = phi double [ 1.000000e+00, %135 ], [ %162, %155 ]
%145 = phi double [ 1.000000e+00, %135 ], [ %147, %155 ]
%146 = phi double [ %136, %135 ], [ %156, %155 ]
%147 = fadd double %145, 1.000000e+00
%148 = fsub double %143, %146
%149 = tail call double @llvm.fabs.f64(double %146)
%150 = fcmp ugt double %149, 1.000000e-15
%151 = select i1 %150, i1 %138, i1 false
br i1 %151, label %152, label %155
152: ; preds = %141
%153 = fdiv double %121, %147
%154 = fmul double %146, %153
br label %155
155: ; preds = %141, %152
%156 = phi double [ %154, %152 ], [ 0.000000e+00, %141 ]
%157 = tail call double @llvm.fabs.f64(double %144)
%158 = fcmp ugt double %157, 1.000000e-15
%159 = select i1 %158, i1 %140, i1 false
%160 = fneg double %144
%161 = fmul double %120, %160
%162 = select i1 %159, double %161, double 0.000000e+00
%163 = fmul double %148, %162
%164 = fadd double %145, %147
%165 = fdiv double %163, %164
%166 = fadd double %142, %165
%167 = tail call double @llvm.fabs.f64(double %165)
%168 = fsub double %167, %130
%169 = fcmp ogt double %168, 0.000000e+00
br i1 %169, label %141, label %170
170: ; preds = %155, %126
%171 = phi double [ %131, %126 ], [ %166, %155 ]
%172 = tail call double @atan(double %115)
%173 = fneg double %115
%174 = tail call double @llvm.fmuladd.f64(double %173, double %171, double %172)
%175 = fdiv double %174, 0x401921FB54442D19
br label %176
176: ; preds = %170, %96
%177 = phi double [ %100, %96 ], [ %175, %170 ]
%178 = phi double [ %87, %96 ], [ %117, %170 ]
%179 = phi double [ -1.000000e+00, %96 ], [ %118, %170 ]
%180 = tail call double @llvm.fmuladd.f64(double %179, double %177, double %178)
br label %181
181: ; preds = %83, %176
%182 = phi double [ %180, %176 ], [ %87, %83 ]
%183 = icmp slt i32 %88, 0
br i1 %183, label %184, label %190
184: ; preds = %181
br i1 %80, label %83, label %185
185: ; preds = %184
%186 = fcmp olt double %182, 0.000000e+00
%187 = select i1 %186, double 0.000000e+00, double %182
%188 = fcmp ogt double %187, 1.000000e+00
%189 = select i1 %188, double 1.000000e+00, double %187
br label %195
190: ; preds = %181
%191 = fcmp olt double %182, 0.000000e+00
%192 = select i1 %191, double 0.000000e+00, double %182
%193 = fcmp ogt double %192, 1.000000e+00
%194 = select i1 %193, double 1.000000e+00, double %192
br label %195
195: ; preds = %9, %190, %185, %48, %34, %24, %13
%196 = phi double [ %33, %24 ], [ %42, %34 ], [ %56, %48 ], [ %189, %185 ], [ %194, %190 ], [ %19, %13 ], [ -1.000000e+00, %9 ]
ret double %196
}