void cdflib_cdff(const int *which, double *p, double *q, double *f, double *dfn,
                 double *dfd, int *status, double *bound) {
  static const double tol = 1.0e-8;
  static const double atol = 1.0e-50;
  static const double inf = 1.0e300;
  static const int K1 = 1;
  double K2 = 0.0e0;
  double K4 = 0.5e0;
  double K5 = 5.0e0;
  double pq, fx, cum, ccum;
  unsigned long qhi, qleft, qporq;
  double T3, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15;
  *status = 0;
  *bound = 0.0;
  if (!(*which < 1 || *which > 4)) {
    goto S30;
  }
  if (!(*which < 1)) {
    goto S10;
  }
  *bound = 1.0e0;
  goto S20;
S10:
  *bound = 4.0e0;
S20:
  *status = -1;
  return;
S30:
  if (*which == 1) {
    goto S70;
  }
  if (!(*p < 0.0e0 || *p > 1.0e0)) {
    goto S60;
  }
  if (!(*p < 0.0e0)) {
    goto S40;
  }
  *bound = 0.0e0;
  goto S50;
S40:
  *bound = 1.0e0;
S50:
  *status = -2;
  return;
S70:
S60:
  if (*which == 1) {
    goto S110;
  }
  if (!(*q <= 0.0e0 || *q > 1.0e0)) {
    goto S100;
  }
  if (!(*q <= 0.0e0)) {
    goto S80;
  }
  *bound = 0.0e0;
  goto S90;
S80:
  *bound = 1.0e0;
S90:
  *status = -3;
  return;
S110:
S100:
  if (*which == 2) {
    goto S130;
  }
  if (!(*f < 0.0e0)) {
    goto S120;
  }
  *bound = 0.0e0;
  *status = -4;
  return;
S130:
S120:
  if (*which == 3) {
    goto S150;
  }
  if (!(*dfn <= 0.0e0)) {
    goto S140;
  }
  *bound = 0.0e0;
  *status = -5;
  return;
S150:
S140:
  if (*which == 4) {
    goto S170;
  }
  if (!(*dfd <= 0.0e0)) {
    goto S160;
  }
  *bound = 0.0e0;
  *status = -6;
  return;
S170:
S160:
  if (*which == 1) {
    goto S210;
  }
  pq = *p + *q;
  if (!(fabs(pq - 0.5e0 - 0.5e0) > 3.0e0 * dpmpar(K1))) {
    goto S200;
  }
  if (!(pq < 0.0e0)) {
    goto S180;
  }
  *bound = 0.0e0;
  goto S190;
S180:
  *bound = 1.0e0;
S190:
  *status = 3;
  return;
S210:
S200:
  if (!(*which == 1)) {
    qporq = *p <= *q;
  }
  if (1 == *which) {
    cdflib_cumf(f, dfn, dfd, p, q);
    *status = 0;
  } else if (2 == *which) {
    *f = 5.0e0;
    T3 = inf;
    T6 = atol;
    T7 = tol;
    cdflib_dstinv(&K2, &T3, &K4, &K4, &K5, &T6, &T7);
    *status = 0;
    cdflib_dinvr(status, f, &fx, &qleft, &qhi);
  S220:
    if (!(*status == 1)) {
      goto S250;
    }
    cdflib_cumf(f, dfn, dfd, &cum, &ccum);
    if (!qporq) {
      goto S230;
    }
    fx = cum - *p;
    goto S240;
  S230:
    fx = ccum - *q;
  S240:
    cdflib_dinvr(status, f, &fx, &qleft, &qhi);
    goto S220;
  S250:
    if (!(*status == -1)) {
      goto S280;
    }
    if (!qleft) {
      goto S260;
    }
    *status = 1;
    *bound = 0.0e0;
    goto S270;
  S260:
    *status = 2;
    *bound = inf;
  S280:
  S270:;
  } else if (3 == *which) {
    T8 = 1.0;
    T9 = inf;
    T10 = atol;
    T11 = tol;
    cdflib_dstinv(&T8, &T9, &K4, &K4, &K5, &T10, &T11);
    *status = 0;
    *dfn = 5.0;
    fx = 0.0;
    cdflib_dinvr(status, dfn, &fx, &qleft, &qhi);
    while (*status == 1) {
      cdflib_cumf(f, dfn, dfd, &cum, &ccum);
      if (*p <= *q) {
        fx = cum - *p;
      } else {
        fx = ccum - *q;
      }
      cdflib_dinvr(status, dfn, &fx, &qleft, &qhi);
    }
    if (*status == -1) {
      if (qleft) {
        *status = 1;
        *bound = 1.0;
      } else {
        *status = 2;
        *bound = inf;
      }
    }
  } else if (4 == *which) {
    T12 = 1.0;
    T13 = inf;
    T14 = atol;
    T15 = tol;
    cdflib_dstinv(&T12, &T13, &K4, &K4, &K5, &T14, &T15);
    *status = 0;
    *dfd = 5.0;
    fx = 0.0;
    cdflib_dinvr(status, dfd, &fx, &qleft, &qhi);
    while (*status == 1) {
      cdflib_cumf(f, dfn, dfd, &cum, &ccum);
      if (*p <= *q) {
        fx = cum - *p;
      } else {
        fx = ccum - *q;
      }
      cdflib_dinvr(status, dfd, &fx, &qleft, &qhi);
    }
    if (*status == -1) {
      if (qleft) {
        *status = 1;
        *bound = 1.0;
      } else {
        *status = 2;
        *bound = inf;
      }
    }
  }
  return;
}


x86 assembly (clang, -O0):
<cdflib_cdff>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe8d(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe78(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
jl     11c1 <cdflib_cdff+0x81>
mov    -0x8(%rbp),%rax
cmpl   $0x4,(%rax)
jg     11c1 <cdflib_cdff+0x81>
jmp    1207 <cdflib_cdff+0xc7>
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
jl     11d3 <cdflib_cdff+0x93>
jmp    11e8 <cdflib_cdff+0xa8>
mov    0x18(%rbp),%rax
movsd  0xe31(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    11f8 <cdflib_cdff+0xb8>
mov    0x18(%rbp),%rax
movsd  0xe44(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    0x10(%rbp),%rax
movl   $0xffffffff,(%rax)
jmp    1a1a <cdflib_cdff+0x8da>
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
jne    1219 <cdflib_cdff+0xd9>
jmp    128e <cdflib_cdff+0x14e>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
ja     1249 <cdflib_cdff+0x109>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xdd6(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1249 <cdflib_cdff+0x109>
jmp    1293 <cdflib_cdff+0x153>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
ja     125f <cdflib_cdff+0x11f>
jmp    126f <cdflib_cdff+0x12f>
mov    0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    127f <cdflib_cdff+0x13f>
mov    0x18(%rbp),%rax
movsd  0xd95(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    0x10(%rbp),%rax
movl   $0xfffffffe,(%rax)
jmp    1a1a <cdflib_cdff+0x8da>
jmp    1293 <cdflib_cdff+0x153>
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
jne    12a5 <cdflib_cdff+0x165>
jmp    131a <cdflib_cdff+0x1da>
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jae    12d5 <cdflib_cdff+0x195>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xd4a(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     12d5 <cdflib_cdff+0x195>
jmp    131f <cdflib_cdff+0x1df>
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jae    12eb <cdflib_cdff+0x1ab>
jmp    12fb <cdflib_cdff+0x1bb>
mov    0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    130b <cdflib_cdff+0x1cb>
mov    0x18(%rbp),%rax
movsd  0xd09(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    0x10(%rbp),%rax
movl   $0xfffffffd,(%rax)
jmp    1a1a <cdflib_cdff+0x8da>
jmp    131f <cdflib_cdff+0x1df>
mov    -0x8(%rbp),%rax
cmpl   $0x2,(%rax)
jne    1331 <cdflib_cdff+0x1f1>
jmp    1361 <cdflib_cdff+0x221>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
ja     1347 <cdflib_cdff+0x207>
jmp    1366 <cdflib_cdff+0x226>
mov    0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    0x10(%rbp),%rax
movl   $0xfffffffc,(%rax)
jmp    1a1a <cdflib_cdff+0x8da>
jmp    1366 <cdflib_cdff+0x226>
mov    -0x8(%rbp),%rax
cmpl   $0x3,(%rax)
jne    1378 <cdflib_cdff+0x238>
jmp    13a8 <cdflib_cdff+0x268>
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jae    138e <cdflib_cdff+0x24e>
jmp    13ad <cdflib_cdff+0x26d>
mov    0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    0x10(%rbp),%rax
movl   $0xfffffffb,(%rax)
jmp    1a1a <cdflib_cdff+0x8da>
jmp    13ad <cdflib_cdff+0x26d>
mov    -0x8(%rbp),%rax
cmpl   $0x4,(%rax)
jne    13bf <cdflib_cdff+0x27f>
jmp    13ef <cdflib_cdff+0x2af>
mov    -0x30(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jae    13d5 <cdflib_cdff+0x295>
jmp    13f4 <cdflib_cdff+0x2b4>
mov    0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    0x10(%rbp),%rax
movl   $0xfffffffa,(%rax)
jmp    1a1a <cdflib_cdff+0x8da>
jmp    13f4 <cdflib_cdff+0x2b4>
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
jne    1406 <cdflib_cdff+0x2c6>
jmp    14c0 <cdflib_cdff+0x380>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xbe0(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xbd4(%rip),%xmm1
subsd  %xmm1,%xmm0
movaps 0xc01(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    $0x1,%edi
mov    $0x0,%al
call   1040 <dpmpar@plt>
movsd  -0xe0(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm2
movsd  0xbad(%rip),%xmm1
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
ja     147e <cdflib_cdff+0x33e>
jmp    14c5 <cdflib_cdff+0x385>
xorps  %xmm0,%xmm0
ucomisd -0x50(%rbp),%xmm0
ja     1491 <cdflib_cdff+0x351>
jmp    14a1 <cdflib_cdff+0x361>
mov    0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    14b1 <cdflib_cdff+0x371>
mov    0x18(%rbp),%rax
movsd  0xb63(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    0x10(%rbp),%rax
movl   $0x3,(%rax)
jmp    1a1a <cdflib_cdff+0x8da>
jmp    14c5 <cdflib_cdff+0x385>
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
je     14f4 <cdflib_cdff+0x3b4>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
cltq
mov    %rax,-0x80(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%eax
cmp    (%rcx),%eax
jne    152f <cdflib_cdff+0x3ef>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    $0x0,%al
call   1030 <cdflib_cumf@plt>
mov    0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    1a15 <cdflib_cdff+0x8d5>
mov    -0x8(%rbp),%rcx
mov    $0x2,%eax
cmp    (%rcx),%eax
jne    16ba <cdflib_cdff+0x57a>
mov    -0x20(%rbp),%rax
movsd  0xab4(%rip),%xmm0
movsd  %xmm0,(%rax)
movsd  0xad8(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xac0(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xaa8(%rip),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
lea    -0x38(%rbp),%rdi
lea    -0x88(%rbp),%rsi
lea    -0x40(%rbp),%rcx
lea    -0x48(%rbp),%r8
lea    -0x90(%rbp),%r9
lea    -0x98(%rbp),%rax
mov    %rcx,%rdx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1050 <cdflib_dstinv@plt>
mov    0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x58(%rbp),%rdx
lea    -0x78(%rbp),%rcx
lea    -0x70(%rbp),%r8
mov    $0x0,%al
call   1060 <cdflib_dinvr@plt>
mov    0x10(%rbp),%rax
cmpl   $0x1,(%rax)
je     15e6 <cdflib_cdff+0x4a6>
jmp    165a <cdflib_cdff+0x51a>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
lea    -0x60(%rbp),%rcx
lea    -0x68(%rbp),%r8
mov    $0x0,%al
call   1030 <cdflib_cumf@plt>
cmpq   $0x0,-0x80(%rbp)
jne    1611 <cdflib_cdff+0x4d1>
jmp    1628 <cdflib_cdff+0x4e8>
movsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    163a <cdflib_cdff+0x4fa>
movsd  -0x68(%rbp),%xmm0
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x58(%rbp),%rdx
lea    -0x78(%rbp),%rcx
lea    -0x70(%rbp),%r8
mov    $0x0,%al
call   1060 <cdflib_dinvr@plt>
jmp    15d4 <cdflib_cdff+0x494>
mov    0x10(%rbp),%rax
cmpl   $0xffffffff,(%rax)
je     166c <cdflib_cdff+0x52c>
jmp    16b0 <cdflib_cdff+0x570>
cmpq   $0x0,-0x78(%rbp)
jne    167c <cdflib_cdff+0x53c>
jmp    1696 <cdflib_cdff+0x556>
mov    0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    16b5 <cdflib_cdff+0x575>
mov    0x10(%rbp),%rax
movl   $0x2,(%rax)
mov    0x18(%rbp),%rax
movsd  0x984(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    16b5 <cdflib_cdff+0x575>
jmp    1a10 <cdflib_cdff+0x8d0>
mov    -0x8(%rbp),%rcx
mov    $0x3,%eax
cmp    (%rcx),%eax
jne    1860 <cdflib_cdff+0x720>
movsd  0x93d(%rip),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0x94d(%rip),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0x935(%rip),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0x91d(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
lea    -0xa0(%rbp),%rdi
lea    -0xa8(%rbp),%rsi
lea    -0x40(%rbp),%rcx
lea    -0x48(%rbp),%r8
lea    -0xb0(%rbp),%r9
lea    -0xb8(%rbp),%rax
mov    %rcx,%rdx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1050 <cdflib_dstinv@plt>
mov    0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x28(%rbp),%rax
movsd  0x8ad(%rip),%xmm0
movsd  %xmm0,(%rax)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
lea    -0x58(%rbp),%rdx
lea    -0x78(%rbp),%rcx
lea    -0x70(%rbp),%r8
mov    $0x0,%al
call   1060 <cdflib_dinvr@plt>
mov    0x10(%rbp),%rax
cmpl   $0x1,(%rax)
jne    1805 <cdflib_cdff+0x6c5>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
lea    -0x60(%rbp),%rcx
lea    -0x68(%rbp),%r8
mov    $0x0,%al
call   1030 <cdflib_cumf@plt>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     17d3 <cdflib_cdff+0x693>
movsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    17e5 <cdflib_cdff+0x6a5>
movsd  -0x68(%rbp),%xmm0
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
lea    -0x58(%rbp),%rdx
lea    -0x78(%rbp),%rcx
lea    -0x70(%rbp),%r8
mov    $0x0,%al
call   1060 <cdflib_dinvr@plt>
jmp    177a <cdflib_cdff+0x63a>
mov    0x10(%rbp),%rax
cmpl   $0xffffffff,(%rax)
jne    185b <cdflib_cdff+0x71b>
cmpq   $0x0,-0x78(%rbp)
je     183c <cdflib_cdff+0x6fc>
mov    0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    0x18(%rbp),%rax
movsd  0x7dd(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    1856 <cdflib_cdff+0x716>
mov    0x10(%rbp),%rax
movl   $0x2,(%rax)
mov    0x18(%rbp),%rax
movsd  0x7de(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    185b <cdflib_cdff+0x71b>
jmp    1a0b <cdflib_cdff+0x8cb>
mov    -0x8(%rbp),%rcx
mov    $0x4,%eax
cmp    (%rcx),%eax
jne    1a06 <cdflib_cdff+0x8c6>
movsd  0x797(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0x7a7(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0x78f(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0x777(%rip),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
lea    -0xc0(%rbp),%rdi
lea    -0xc8(%rbp),%rsi
lea    -0x40(%rbp),%rcx
lea    -0x48(%rbp),%r8
lea    -0xd0(%rbp),%r9
lea    -0xd8(%rbp),%rax
mov    %rcx,%rdx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1050 <cdflib_dstinv@plt>
mov    0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x30(%rbp),%rax
movsd  0x707(%rip),%xmm0
movsd  %xmm0,(%rax)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x10(%rbp),%rdi
mov    -0x30(%rbp),%rsi
lea    -0x58(%rbp),%rdx
lea    -0x78(%rbp),%rcx
lea    -0x70(%rbp),%r8
mov    $0x0,%al
call   1060 <cdflib_dinvr@plt>
mov    0x10(%rbp),%rax
cmpl   $0x1,(%rax)
jne    19ab <cdflib_cdff+0x86b>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
lea    -0x60(%rbp),%rcx
lea    -0x68(%rbp),%r8
mov    $0x0,%al
call   1030 <cdflib_cumf@plt>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1979 <cdflib_cdff+0x839>
movsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    198b <cdflib_cdff+0x84b>
movsd  -0x68(%rbp),%xmm0
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x10(%rbp),%rdi
mov    -0x30(%rbp),%rsi
lea    -0x58(%rbp),%rdx
lea    -0x78(%rbp),%rcx
lea    -0x70(%rbp),%r8
mov    $0x0,%al
call   1060 <cdflib_dinvr@plt>
jmp    1920 <cdflib_cdff+0x7e0>
mov    0x10(%rbp),%rax
cmpl   $0xffffffff,(%rax)
jne    1a01 <cdflib_cdff+0x8c1>
cmpq   $0x0,-0x78(%rbp)
je     19e2 <cdflib_cdff+0x8a2>
mov    0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    0x18(%rbp),%rax
movsd  0x637(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    19fc <cdflib_cdff+0x8bc>
mov    0x10(%rbp),%rax
movl   $0x2,(%rax)
mov    0x18(%rbp),%rax
movsd  0x638(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    1a01 <cdflib_cdff+0x8c1>
jmp    1a06 <cdflib_cdff+0x8c6>
jmp    1a0b <cdflib_cdff+0x8cb>
jmp    1a10 <cdflib_cdff+0x8d0>
jmp    1a15 <cdflib_cdff+0x8d5>
jmp    1a1a <cdflib_cdff+0x8da>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdflib_cdff>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %rcx,%rbx
mov    %rdx,%rbp
mov    0xd8(%rsp),%rdx
mov    0xd0(%rsp),%r12
movq   $0x0,0x90(%rsp)
movabs $0x3fe0000000000000,%rax
mov    %rax,0x60(%rsp)
movabs $0x4014000000000000,%r15
mov    %r15,0x58(%rsp)
movl   $0x0,(%r12)
movq   $0x0,(%rdx)
mov    (%rdi),%eax
lea    -0x5(%rax),%ecx
cmp    $0xfffffffb,%ecx
ja     11ce <cdflib_cdff+0x8e>
xor    %ecx,%ecx
test   %eax,%eax
setle  %cl
lea    0xe78(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rdx)
movl   $0xffffffff,(%r12)
ff
jmp    13b1 <cdflib_cdff+0x271>
mov    %rsi,%r13
mov    %rdi,%r14
cmp    $0x1,%eax
jne    11f0 <cdflib_cdff+0xb0>
xorpd  %xmm0,%xmm0
ucomisd (%rbx),%xmm0
jbe    123c <cdflib_cdff+0xfc>
movl   $0xfffffffc,(%r12)
ff
jmp    13b1 <cdflib_cdff+0x271>
movsd  0x0(%r13),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     1306 <cdflib_cdff+0x1c6>
ucomisd 0xdf4(%rip),%xmm0
ja     1306 <cdflib_cdff+0x1c6>
movsd  0x0(%rbp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    1328 <cdflib_cdff+0x1e8>
ucomisd 0xdd3(%rip),%xmm0
ja     1328 <cdflib_cdff+0x1e8>
cmp    $0x2,%eax
jne    1347 <cdflib_cdff+0x207>
xorpd  %xmm0,%xmm0
ucomisd (%r8),%xmm0
jae    136d <cdflib_cdff+0x22d>
cmp    $0x4,%eax
je     125f <cdflib_cdff+0x11f>
xorpd  %xmm0,%xmm0
ucomisd (%r9),%xmm0
jae    1377 <cdflib_cdff+0x237>
cmp    $0x1,%eax
je     1393 <cdflib_cdff+0x253>
mov    %r8,0x30(%rsp)
mov    %r9,0x38(%rsp)
movsd  0x0(%r13),%xmm1
addsd  0x0(%rbp),%xmm1
movsd  0xd83(%rip),%xmm0
movapd %xmm1,0x70(%rsp)
addsd  %xmm0,%xmm1
addsd  %xmm0,%xmm1
andpd  0xd85(%rip),%xmm1
movapd %xmm1,0x80(%rsp)
mov    $0x1,%edi
xor    %eax,%eax
call   1040 <dpmpar@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xd51(%rip),%xmm0
movapd 0x80(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    1381 <cdflib_cdff+0x241>
xorpd  %xmm0,%xmm0
movapd 0x70(%rsp),%xmm1
cmpltsd %xmm0,%xmm1
movsd  0xd17(%rip),%xmm0
andnpd %xmm0,%xmm1
mov    0xd8(%rsp),%rax
movlpd %xmm1,(%rax)
movl   $0x3,(%r12)
jmp    13b1 <cdflib_cdff+0x271>
cmpltsd %xmm1,%xmm0
movsd  0xced(%rip),%xmm1
andnpd %xmm1,%xmm0
movlpd %xmm0,(%rdx)
movl   $0xfffffffe,(%r12)
ff
jmp    13b1 <cdflib_cdff+0x271>
cmpnlesd %xmm1,%xmm0
movsd  0xccb(%rip),%xmm1
andpd  %xmm0,%xmm1
movlpd %xmm1,(%rdx)
movl   $0xfffffffd,(%r12)
ff
jmp    13b1 <cdflib_cdff+0x271>
xorpd  %xmm0,%xmm0
ucomisd (%rbx),%xmm0
ja     11e3 <cdflib_cdff+0xa3>
cmp    $0x3,%eax
je     1250 <cdflib_cdff+0x110>
xorpd  %xmm0,%xmm0
ucomisd (%r8),%xmm0
jb     1268 <cdflib_cdff+0x128>
movl   $0xfffffffb,(%r12)
ff
jmp    13b1 <cdflib_cdff+0x271>
movl   $0xfffffffa,(%r12)
ff
jmp    13b1 <cdflib_cdff+0x271>
mov    (%r14),%eax
cmp    $0x1,%eax
mov    0x38(%rsp),%r9
mov    0x30(%rsp),%r8
jne    13c3 <cdflib_cdff+0x283>
mov    %rbx,%rdi
mov    %r8,%rsi
mov    %r9,%rdx
mov    %r13,%rcx
mov    %rbp,%r8
xor    %eax,%eax
call   1030 <cdflib_cumf@plt>
movl   $0x0,(%r12)
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmp    $0x2,%eax
je     14d9 <cdflib_cdff+0x399>
cmp    $0x3,%eax
je     15e2 <cdflib_cdff+0x4a2>
cmp    $0x4,%eax
jne    13b1 <cdflib_cdff+0x271>
movabs $0x3ff0000000000000,%rax
mov    %rax,0x18(%rsp)
movabs $0x7e37e43c8800759c,%rax
e4 37 7e
mov    %rax,0x10(%rsp)
movabs $0x358dee7a4ad4b81f,%rax
ee 8d 35
mov    %rax,0x8(%rsp)
movabs $0x3e45798ee2308c3a,%rax
79 45 3e
mov    %rax,0x50(%rsp)
lea    0x50(%rsp),%rax
mov    %rax,(%rsp)
lea    0x18(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x60(%rsp),%rcx
lea    0x58(%rsp),%r8
lea    0x8(%rsp),%r9
mov    %rcx,%rdx
xor    %eax,%eax
call   1050 <cdflib_dstinv@plt>
mov    0x38(%rsp),%rsi
movl   $0x0,(%r12)
mov    %r15,(%rsi)
xorpd  %xmm0,%xmm0
lea    0x68(%rsp),%r14
movsd  %xmm0,0x28(%rsp)
mov    %r12,%rdi
lea    0x28(%rsp),%rdx
lea    0x20(%rsp),%rcx
mov    %r14,%r8
xor    %eax,%eax
mov    %rsi,%r15
call   1060 <cdflib_dinvr@plt>
mov    (%r12),%eax
cmp    $0x1,%eax
jne    16dd <cdflib_cdff+0x59d>
mov    %rbx,%rdi
mov    0x30(%rsp),%rsi
mov    %r15,%rdx
lea    0x48(%rsp),%rcx
lea    0x40(%rsp),%r8
xor    %eax,%eax
call   1030 <cdflib_cumf@plt>
movsd  0x0(%r13),%xmm0
movsd  0x0(%rbp),%xmm1
movsd  0x40(%rsp),%xmm2
subsd  %xmm1,%xmm2
movsd  0x48(%rsp),%xmm3
subsd  %xmm0,%xmm3
cmpnlesd %xmm1,%xmm0
andpd  %xmm0,%xmm2
andnpd %xmm3,%xmm0
orpd   %xmm2,%xmm0
mov    %r15,%rsi
jmp    145b <cdflib_cdff+0x31b>
movsd  0x0(%r13),%xmm0
movsd  %xmm0,0x80(%rsp)
movsd  0x0(%rbp),%xmm0
movsd  %xmm0,0x70(%rsp)
mov    %r15,(%rbx)
movabs $0x7e37e43c8800759c,%r15
e4 37 7e
mov    %r15,0x18(%rsp)
movabs $0x358dee7a4ad4b81f,%rax
ee 8d 35
mov    %rax,0x10(%rsp)
movabs $0x3e45798ee2308c3a,%rax
79 45 3e
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rax
mov    %rax,(%rsp)
lea    0x90(%rsp),%rdi
lea    0x18(%rsp),%rsi
lea    0x60(%rsp),%rcx
lea    0x58(%rsp),%r8
lea    0x10(%rsp),%r9
mov    %rcx,%rdx
xor    %eax,%eax
call   1050 <cdflib_dstinv@plt>
movsd  0x70(%rsp),%xmm1
ucomisd 0x80(%rsp),%xmm1
movl   $0x0,(%r12)
cmovb  %rbp,%r13
lea    0x48(%rsp),%rbp
lea    0x40(%rsp),%r14
mov    %r12,%rdi
mov    %rbx,%rsi
lea    0x28(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0x68(%rsp),%r8
xor    %eax,%eax
call   1060 <cdflib_dinvr@plt>
mov    (%r12),%eax
cmp    $0x1,%eax
jne    1710 <cdflib_cdff+0x5d0>
mov    %rbx,%rdi
mov    0x30(%rsp),%rsi
mov    0x38(%rsp),%rdx
mov    %rbp,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1030 <cdflib_cumf@plt>
movsd  0x70(%rsp),%xmm0
ucomisd 0x80(%rsp),%xmm0
mov    %rbp,%rax
cmovb  %r14,%rax
movsd  (%rax),%xmm0
subsd  0x0(%r13),%xmm0
movsd  %xmm0,0x28(%rsp)
jmp    1577 <cdflib_cdff+0x437>
movabs $0x3ff0000000000000,%rax
mov    %rax,0x18(%rsp)
movabs $0x7e37e43c8800759c,%rax
e4 37 7e
mov    %rax,0x10(%rsp)
movabs $0x358dee7a4ad4b81f,%rax
ee 8d 35
mov    %rax,0x8(%rsp)
movabs $0x3e45798ee2308c3a,%rax
79 45 3e
mov    %rax,0x50(%rsp)
lea    0x50(%rsp),%rax
mov    %rax,(%rsp)
lea    0x18(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x60(%rsp),%rcx
lea    0x58(%rsp),%r8
lea    0x8(%rsp),%r9
mov    %rcx,%rdx
xor    %eax,%eax
call   1050 <cdflib_dstinv@plt>
mov    0x30(%rsp),%rsi
movl   $0x0,(%r12)
mov    %r15,(%rsi)
xorpd  %xmm0,%xmm0
lea    0x68(%rsp),%r14
movsd  %xmm0,0x28(%rsp)
mov    %r12,%rdi
lea    0x28(%rsp),%rdx
lea    0x20(%rsp),%rcx
mov    %rsi,%r15
mov    %r14,%r8
xor    %eax,%eax
call   1060 <cdflib_dinvr@plt>
mov    (%r12),%eax
cmp    $0x1,%eax
jne    16dd <cdflib_cdff+0x59d>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    0x38(%rsp),%rdx
lea    0x48(%rsp),%rcx
lea    0x40(%rsp),%r8
xor    %eax,%eax
call   1030 <cdflib_cumf@plt>
movsd  0x0(%r13),%xmm0
movsd  0x0(%rbp),%xmm1
movsd  0x40(%rsp),%xmm2
subsd  %xmm1,%xmm2
movsd  0x48(%rsp),%xmm3
subsd  %xmm0,%xmm3
cmpnlesd %xmm1,%xmm0
andpd  %xmm0,%xmm2
andnpd %xmm3,%xmm0
orpd   %xmm2,%xmm0
mov    %r15,%rsi
jmp    1663 <cdflib_cdff+0x523>
cmp    $0xffffffff,%eax
jne    13b1 <cdflib_cdff+0x271>
cmpq   $0x0,0x20(%rsp)
je     173d <cdflib_cdff+0x5fd>
movl   $0x1,(%r12)
mov    0xd8(%rsp),%rax
movabs $0x3ff0000000000000,%rcx
mov    %rcx,(%rax)
jmp    13b1 <cdflib_cdff+0x271>
cmp    $0xffffffff,%eax
jne    13b1 <cdflib_cdff+0x271>
cmpq   $0x0,0x20(%rsp)
je     175f <cdflib_cdff+0x61f>
movl   $0x1,(%r12)
mov    0xd8(%rsp),%rax
movq   $0x0,(%rax)
jmp    13b1 <cdflib_cdff+0x271>
movl   $0x2,(%r12)
mov    0xd8(%rsp),%rax
movabs $0x7e37e43c8800759c,%rcx
e4 37 7e
mov    %rcx,(%rax)
jmp    13b1 <cdflib_cdff+0x271>
movl   $0x2,(%r12)
mov    0xd8(%rsp),%rax
mov    %r15,(%rax)
jmp    13b1 <cdflib_cdff+0x271>

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

LLVM IR (-O2):
define void @cdflib_cdff(i32* nocapture %0, double* %1, double* %2, double* %3, double* %4, double* %5, i32* %6, double* nocapture writeonly %7) {
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca i64
%16 = alloca i64
%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 = bitcast double* %9 to i8*
store double 0.000000e+00, double* %9
%29 = bitcast double* %10 to i8*
store double 5.000000e-01, double* %10
%30 = bitcast double* %11 to i8*
store double 5.000000e+00, double* %11
%31 = bitcast double* %12 to i8*
%32 = bitcast double* %13 to i8*
%33 = bitcast double* %14 to i8*
%34 = bitcast i64* %15 to i8*
%35 = bitcast i64* %16 to i8*
%36 = bitcast double* %17 to i8*
%37 = bitcast double* %18 to i8*
%38 = bitcast double* %19 to i8*
%39 = bitcast double* %20 to i8*
%40 = bitcast double* %21 to i8*
%41 = bitcast double* %22 to i8*
%42 = bitcast double* %23 to i8*
%43 = bitcast double* %24 to i8*
%44 = bitcast double* %25 to i8*
%45 = bitcast double* %26 to i8*
%46 = bitcast double* %27 to i8*
store i32 0, i32* %6
store double 0.000000e+00, double* %7
%47 = load i32, i32* %0
%48 = add i32 %47, -5
%49 = icmp ult i32 %48, -4
br i1 %49, label %50, label %53
50: ; preds = %8
%51 = icmp slt i32 %47, 1
%52 = select i1 %51, double 1.000000e+00, double 4.000000e+00
store double %52, double* %7
store i32 -1, i32* %6
br label %178
53: ; preds = %8
%54 = icmp eq i32 %47, 1
br i1 %54, label %75, label %55
55: ; preds = %53
%56 = load double, double* %1
%57 = fcmp olt double %56, 0.000000e+00
%58 = fcmp ogt double %56, 1.000000e+00
%59 = or i1 %57, %58
br i1 %59, label %60, label %62
60: ; preds = %55
%61 = select i1 %57, double 0.000000e+00, double 1.000000e+00
store double %61, double* %7
store i32 -2, i32* %6
br label %178
62: ; preds = %55
%63 = load double, double* %2
%64 = fcmp ole double %63, 0.000000e+00
%65 = fcmp ogt double %63, 1.000000e+00
%66 = or i1 %64, %65
br i1 %66, label %67, label %70
67: ; preds = %62
%68 = fcmp ugt double %63, 0.000000e+00
%69 = select i1 %68, double 1.000000e+00, double 0.000000e+00
store double %69, double* %7
store i32 -3, i32* %6
br label %178
70: ; preds = %62
%71 = icmp eq i32 %47, 2
br i1 %71, label %81, label %72
72: ; preds = %70
%73 = load double, double* %3
%74 = fcmp olt double %73, 0.000000e+00
br i1 %74, label %78, label %79
75: ; preds = %53
%76 = load double, double* %3
%77 = fcmp olt double %76, 0.000000e+00
br i1 %77, label %78, label %81
78: ; preds = %75, %72
store i32 -4, i32* %6
br label %178
79: ; preds = %72
%80 = icmp eq i32 %47, 3
br i1 %80, label %90, label %84
81: ; preds = %75, %70
%82 = load double, double* %4
%83 = fcmp ugt double %82, 0.000000e+00
br i1 %83, label %88, label %87
84: ; preds = %79
%85 = load double, double* %4
%86 = fcmp ugt double %85, 0.000000e+00
br i1 %86, label %95, label %87
87: ; preds = %84, %81
store i32 -5, i32* %6
br label %178
88: ; preds = %81
%89 = icmp eq i32 %47, 4
br i1 %89, label %94, label %90
90: ; preds = %79, %88
%91 = load double, double* %5
%92 = fcmp ugt double %91, 0.000000e+00
br i1 %92, label %94, label %93
93: ; preds = %90
store i32 -6, i32* %6
br label %178
94: ; preds = %88, %90
br i1 %54, label %116, label %95
95: ; preds = %84, %94
%96 = load double, double* %1
%97 = load double, double* %2
%98 = fadd double %96, %97
%99 = fadd double %98, -5.000000e-01
%100 = fadd double %99, -5.000000e-01
%101 = tail call double @llvm.fabs.f64(double %100)
%102 = tail call i32 (i32, ...) bitcast (i32 (...)* @dpmpar to i32 (i32, ...)*)(i32 1)
%103 = sitofp i32 %102 to double
%104 = fmul double %103, 3.000000e+00
%105 = fcmp ogt double %101, %104
br i1 %105, label %106, label %109
106: ; preds = %95
%107 = fcmp olt double %98, 0.000000e+00
%108 = select i1 %107, double 0.000000e+00, double 1.000000e+00
store double %108, double* %7
store i32 3, i32* %6
br label %178
109: ; preds = %95
%110 = load i32, i32* %0
%111 = icmp eq i32 %110, 1
br i1 %111, label %116, label %112
112: ; preds = %109
%113 = load double, double* %1
%114 = load double, double* %2
%115 = fcmp ugt double %113, %114
switch i32 %110, label %178 [
i32 4, label %157
i32 2, label %118
i32 3, label %136
]
116: ; preds = %94, %109
%117 = tail call i32 (double*, double*, double*, double*, double*, ...) bitcast (i32 (...)* @cdflib_cumf to i32 (double*, double*, double*, double*, double*, ...)*)(double* %3, double* %4, double* %5, double* %1, double* %2)
store i32 0, i32* %6
br label %178
118: ; preds = %112
store double 5.000000e+00, double* %3
store double 1.000000e+300, double* %17
store double 1.000000e-50, double* %18
store double 1.000000e-08, double* %19
%119 = call i32 (double*, double*, double*, double*, double*, double*, double*, ...) bitcast (i32 (...)* @cdflib_dstinv to i32 (double*, double*, double*, double*, double*, double*, double*, ...)*)(double* %9, double* %17, double* %10, double* %10, double* %11, double* %18, double* %19)
store i32 0, i32* %6
%120 = select i1 %115, double* %2, double* %1
br label %121
121: ; preds = %124, %118
%122 = call i32 (i32*, double*, double*, i64*, i64*, ...) bitcast (i32 (...)* @cdflib_dinvr to i32 (i32*, double*, double*, i64*, i64*, ...)*)(i32* %6, double* %3, double* %12, i64* %16, i64* %15)
%123 = load i32, i32* %6
switch i32 %123, label %178 [
i32 1, label %124
i32 -1, label %131
]
124: ; preds = %121
%125 = call i32 (double*, double*, double*, double*, double*, ...) bitcast (i32 (...)* @cdflib_cumf to i32 (double*, double*, double*, double*, double*, ...)*)(double* %3, double* %4, double* %5, double* %13, double* %14)
%126 = load double, double* %14
%127 = load double, double* %13
%128 = select i1 %115, double %126, double %127
%129 = load double, double* %120
%130 = fsub double %128, %129
store double %130, double* %12
br label %121
131: ; preds = %121
%132 = load i64, i64* %16
%133 = icmp eq i64 %132, 0
br i1 %133, label %135, label %134
134: ; preds = %131
store i32 1, i32* %6
store double 0.000000e+00, double* %7
br label %178
135: ; preds = %131
store i32 2, i32* %6
store double 1.000000e+300, double* %7
br label %178
136: ; preds = %112
store double 1.000000e+00, double* %20
store double 1.000000e+300, double* %21
store double 1.000000e-50, double* %22
store double 1.000000e-08, double* %23
%137 = call i32 (double*, double*, double*, double*, double*, double*, double*, ...) bitcast (i32 (...)* @cdflib_dstinv to i32 (double*, double*, double*, double*, double*, double*, double*, ...)*)(double* %20, double* %21, double* %10, double* %10, double* %11, double* %22, double* %23)
store i32 0, i32* %6
store double 5.000000e+00, double* %4
br label %138
138: ; preds = %142, %136
%139 = phi double [ 0.000000e+00, %136 ], [ %151, %142 ]
store double %139, double* %12
%140 = call i32 (i32*, double*, double*, i64*, i64*, ...) bitcast (i32 (...)* @cdflib_dinvr to i32 (i32*, double*, double*, i64*, i64*, ...)*)(i32* %6, double* %4, double* %12, i64* %16, i64* %15)
%141 = load i32, i32* %6
switch i32 %141, label %178 [
i32 1, label %142
i32 -1, label %152
]
142: ; preds = %138
%143 = call i32 (double*, double*, double*, double*, double*, ...) bitcast (i32 (...)* @cdflib_cumf to i32 (double*, double*, double*, double*, double*, ...)*)(double* %3, double* %4, double* %5, double* %13, double* %14)
%144 = load double, double* %1
%145 = load double, double* %2
%146 = fcmp ugt double %144, %145
%147 = load double, double* %14
%148 = fsub double %147, %145
%149 = load double, double* %13
%150 = fsub double %149, %144
%151 = select i1 %146, double %148, double %150
br label %138
152: ; preds = %138
%153 = load i64, i64* %16
%154 = icmp eq i64 %153, 0
br i1 %154, label %156, label %155
155: ; preds = %152
store i32 1, i32* %6
store double 1.000000e+00, double* %7
br label %178
156: ; preds = %152
store i32 2, i32* %6
store double 1.000000e+300, double* %7
br label %178
157: ; preds = %112
store double 1.000000e+00, double* %24
store double 1.000000e+300, double* %25
store double 1.000000e-50, double* %26
store double 1.000000e-08, double* %27
%158 = call i32 (double*, double*, double*, double*, double*, double*, double*, ...) bitcast (i32 (...)* @cdflib_dstinv to i32 (double*, double*, double*, double*, double*, double*, double*, ...)*)(double* %24, double* %25, double* %10, double* %10, double* %11, double* %26, double* %27)
store i32 0, i32* %6
store double 5.000000e+00, double* %5
br label %159
159: ; preds = %163, %157
%160 = phi double [ 0.000000e+00, %157 ], [ %172, %163 ]
store double %160, double* %12
%161 = call i32 (i32*, double*, double*, i64*, i64*, ...) bitcast (i32 (...)* @cdflib_dinvr to i32 (i32*, double*, double*, i64*, i64*, ...)*)(i32* %6, double* %5, double* %12, i64* %16, i64* %15)
%162 = load i32, i32* %6
switch i32 %162, label %178 [
i32 1, label %163
i32 -1, label %173
]
163: ; preds = %159
%164 = call i32 (double*, double*, double*, double*, double*, ...) bitcast (i32 (...)* @cdflib_cumf to i32 (double*, double*, double*, double*, double*, ...)*)(double* %3, double* %4, double* %5, double* %13, double* %14)
%165 = load double, double* %1
%166 = load double, double* %2
%167 = fcmp ugt double %165, %166
%168 = load double, double* %14
%169 = fsub double %168, %166
%170 = load double, double* %13
%171 = fsub double %170, %165
%172 = select i1 %167, double %169, double %171
br label %159
173: ; preds = %159
%174 = load i64, i64* %16
%175 = icmp eq i64 %174, 0
br i1 %175, label %177, label %176
176: ; preds = %173
store i32 1, i32* %6
store double 1.000000e+00, double* %7
br label %178
177: ; preds = %173
store i32 2, i32* %6
store double 1.000000e+300, double* %7
br label %178
178: ; preds = %138, %121, %159, %116, %155, %156, %177, %176, %134, %135, %112, %106, %93, %87, %78, %67, %60, %50
ret void
}