#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 */
typedef double uint64_t;
typedef double uint32_t;
typedef int int32_t;

/* Variables and functions */
double INFINITY;
double fisher22(uint32_t m11, uint32_t m12, uint32_t m21, uint32_t m22,
                uint32_t midp) {
  double tprob =
      (1 - 0.0000000000001) *
      0.00000000000000000000000010339757656912845935892608650874535669572651386260986328125;
  double cur_prob = tprob;
  double cprob = 0;
  int32_t tie_ct = 1;
  uint32_t uii;
  double cur11;
  double cur12;
  double cur21;
  double cur22;
  double preaddp;
  if (m12 > m21) {
    uii = m12;
    m12 = m21;
    m21 = uii;
  }
  if (m11 > m22) {
    uii = m11;
    m11 = m22;
    m22 = uii;
  }
  if ((((uint64_t)m11) * m22) > (((uint64_t)m12) * m21)) {
    uii = m11;
    m11 = m12;
    m12 = uii;
    uii = m21;
    m21 = m22;
    m22 = uii;
  }
  cur11 = m11;
  cur12 = m12;
  cur21 = m21;
  cur22 = m22;
  while (cur12 > 0.5) {
    cur11 += 1;
    cur22 += 1;
    cur_prob *= (cur12 * cur21) / (cur11 * cur22);
    cur12 -= 1;
    cur21 -= 1;
    if (cur_prob <
        0.00000000000000000000000010339757656912845935892608650874535669572651386260986328125) {
      if (cur_prob >
          (1 - 2 * 0.0000000000001) *
              0.00000000000000000000000010339757656912845935892608650874535669572651386260986328125) {
        tie_ct++;
      }
      tprob += cur_prob;
      break;
    }
    cprob += cur_prob;
    if (cprob == INFINITY) {
      return 0;
    }
  }
  if ((cprob == 0) && (!midp)) {
    return 1;
  }
  if (cur12 > 0.5) {
    do {
      cur11 += 1;
      cur22 += 1;
      cur_prob *= (cur12 * cur21) / (cur11 * cur22);
      cur12 -= 1;
      cur21 -= 1;
      preaddp = tprob;
      tprob += cur_prob;
      if (tprob <= preaddp) {
        break;
      }
    } while (cur12 > 0.5);
  }
  if (m11) {
    cur11 = m11;
    cur12 = m12;
    cur21 = m21;
    cur22 = m22;
    cur_prob =
        (1 - 0.0000000000001) *
        0.00000000000000000000000010339757656912845935892608650874535669572651386260986328125;
    do {
      cur12 += 1;
      cur21 += 1;
      cur_prob *= (cur11 * cur22) / (cur12 * cur21);
      cur11 -= 1;
      cur22 -= 1;
      preaddp = tprob;
      tprob += cur_prob;
      if (tprob <= preaddp) {
        if (!midp) {
          return preaddp / (cprob + preaddp);
        } else {
          return (preaddp -
                  ((1 - 0.0000000000001) *
                   0.00000000000000000000000010339757656912845935892608650874535669572651386260986328125 *
                   0.5) *
                      tie_ct) /
                 (cprob + preaddp);
        }
      }
    } while (cur11 > 0.5);
  }
  if (!midp) {
    return tprob / (cprob + tprob);
  } else {
    return (tprob -
            ((1 - 0.0000000000001) *
             0.00000000000000000000000010339757656912845935892608650874535669572651386260986328125 *
             0.5) *
                tie_ct) /
           (cprob + tprob);
  }
}


x86 assembly (clang, -O0):
<fisher22>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  0xedb(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x1,-0x4c(%rbp)
movsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1171 <fisher22+0x71>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    119f <fisher22+0x9f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    11f9 <fisher22+0xf9>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  0xdda(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    132e <fisher22+0x22e>
movsd  0xdd8(%rip),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xdc6(%rip),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  0xd8d(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  0xd77(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xd5e(%rip),%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    12f1 <fisher22+0x1f1>
movsd  -0x40(%rbp),%xmm0
movsd  0xd56(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12dd <fisher22+0x1dd>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
movsd  -0x40(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    132e <fisher22+0x22e>
movsd  -0x40(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    0x2cdc(%rip),%rax
ucomisd (%rax),%xmm0
jne    1329 <fisher22+0x229>
jp     1329 <fisher22+0x229>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    162c <fisher22+0x52c>
jmp    1221 <fisher22+0x121>
movsd  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1370 <fisher22+0x270>
jp     1370 <fisher22+0x270>
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1370 <fisher22+0x270>
jp     1370 <fisher22+0x270>
movsd  0xcb2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    162c <fisher22+0x52c>
movsd  -0x68(%rbp),%xmm0
movsd  0xc8b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1451 <fisher22+0x351>
jmp    138c <fisher22+0x28c>
movsd  0xc84(%rip),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xc72(%rip),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  0xc39(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  0xc23(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1430 <fisher22+0x330>
jmp    144c <fisher22+0x34c>
jmp    1435 <fisher22+0x335>
movsd  -0x68(%rbp),%xmm0
movsd  0xbc6(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     138c <fisher22+0x28c>
jmp    1451 <fisher22+0x351>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    146e <fisher22+0x36e>
jp     146e <fisher22+0x36e>
jmp    15ca <fisher22+0x4ca>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xb62(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xb6d(%rip),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xb5b(%rip),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  0xb22(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  0xb0c(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     15a9 <fisher22+0x4a9>
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1577 <fisher22+0x477>
jp     1577 <fisher22+0x477>
movsd  -0x80(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
addsd  -0x80(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    162c <fisher22+0x52c>
movsd  -0x80(%rbp),%xmm1
cvtsi2sdl -0x4c(%rbp),%xmm0
movsd  0xa9f(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm1
addsd  -0x80(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    162c <fisher22+0x52c>
jmp    15ae <fisher22+0x4ae>
movsd  -0x60(%rbp),%xmm0
movsd  0xa4d(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     14a3 <fisher22+0x3a3>
jmp    15ca <fisher22+0x4ca>
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    15ff <fisher22+0x4ff>
jp     15ff <fisher22+0x4ff>
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
addsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    162c <fisher22+0x52c>
movsd  -0x38(%rbp),%xmm1
cvtsi2sdl -0x4c(%rbp),%xmm0
movsd  0xa17(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm1
addsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fisher22>:
movsd  %xmm4,-0x10(%rsp)
movapd %xmm2,%xmm5
minsd  %xmm1,%xmm5
maxsd  %xmm2,%xmm1
movapd %xmm3,%xmm11
minsd  %xmm0,%xmm11
maxsd  %xmm3,%xmm0
movapd %xmm11,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm5,%xmm3
mulsd  %xmm1,%xmm3
ucomisd %xmm3,%xmm2
jbe    1143 <fisher22+0x43>
movapd %xmm5,%xmm9
movapd %xmm0,%xmm13
jmp    1156 <fisher22+0x56>
movapd %xmm11,%xmm9
movapd %xmm5,%xmm11
movapd %xmm1,%xmm13
movapd %xmm0,%xmm1
mov    0x2e8b(%rip),%rax
movsd  (%rax),%xmm10
xorpd  %xmm15,%xmm15
movsd  0xe90(%rip),%xmm14
movsd  0xe90(%rip),%xmm0
movsd  0xe98(%rip),%xmm4
movapd %xmm14,%xmm6
movapd %xmm9,%xmm8
movapd %xmm11,%xmm12
movapd %xmm13,%xmm5
movapd %xmm1,%xmm7
nopl   0x0(%rax,%rax,1)
ucomisd 0xe67(%rip),%xmm12
jbe    11fc <fisher22+0xfc>
addsd  %xmm0,%xmm8
addsd  %xmm0,%xmm7
movapd %xmm12,%xmm2
mulsd  %xmm5,%xmm2
movapd %xmm8,%xmm3
mulsd  %xmm7,%xmm3
divsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm6
movapd %xmm4,%xmm2
addsd  %xmm4,%xmm12
addsd  %xmm2,%xmm5
movsd  0xe3d(%rip),%xmm2
ucomisd %xmm6,%xmm2
ja     1203 <fisher22+0x103>
addsd  %xmm6,%xmm15
ucomisd %xmm10,%xmm15
jne    11a0 <fisher22+0xa0>
jp     11a0 <fisher22+0xa0>
xorpd  %xmm0,%xmm0
ret
movapd %xmm0,%xmm10
jmp    122b <fisher22+0x12b>
xor    %eax,%eax
ucomisd 0xe1b(%rip),%xmm6
seta   %al
movsd  0xde7(%rip),%xmm14
addsd  %xmm6,%xmm14
lea    0xe13(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm10
xorpd  %xmm2,%xmm2
movsd  -0x10(%rsp),%xmm3
ucomisd %xmm2,%xmm3
jne    1247 <fisher22+0x147>
jp     1247 <fisher22+0x147>
ucomisd %xmm2,%xmm15
jne    1247 <fisher22+0x147>
jp     1247 <fisher22+0x147>
ret
ucomisd 0xdc0(%rip),%xmm12
movsd  %xmm13,-0x8(%rsp)
jbe    12c2 <fisher22+0x1c2>
movsd  0xda7(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movapd %xmm6,%xmm2
movapd %xmm14,%xmm3
addsd  %xmm0,%xmm8
addsd  %xmm0,%xmm7
movapd %xmm12,%xmm6
mulsd  %xmm5,%xmm6
movapd %xmm8,%xmm13
mulsd  %xmm7,%xmm13
divsd  %xmm13,%xmm6
mulsd  %xmm2,%xmm6
addsd  %xmm6,%xmm14
ucomisd %xmm14,%xmm3
jae    12c2 <fisher22+0x1c2>
movapd %xmm4,%xmm2
addsd  %xmm4,%xmm12
addsd  %xmm4,%xmm5
ucomisd 0xd50(%rip),%xmm12
ja     1270 <fisher22+0x170>
xorpd  %xmm8,%xmm8
ucomisd %xmm8,%xmm9
jne    12d0 <fisher22+0x1d0>
jnp    134d <fisher22+0x24d>
movsd  0xd28(%rip),%xmm5
movsd  0xd28(%rip),%xmm3
movapd %xmm14,%xmm0
movsd  -0x10(%rsp),%xmm12
movsd  -0x8(%rsp),%xmm2
movapd %xmm4,%xmm7
cs nopw 0x0(%rax,%rax,1)
movapd %xmm5,%xmm4
addsd  %xmm3,%xmm11
addsd  %xmm3,%xmm2
movapd %xmm9,%xmm5
mulsd  %xmm1,%xmm5
movapd %xmm11,%xmm6
mulsd  %xmm2,%xmm6
divsd  %xmm6,%xmm5
mulsd  %xmm4,%xmm5
addsd  %xmm7,%xmm9
addsd  %xmm5,%xmm0
ucomisd %xmm0,%xmm14
jae    1377 <fisher22+0x277>
addsd  %xmm7,%xmm1
ucomisd 0xccc(%rip),%xmm9
movapd %xmm0,%xmm14
ja     1300 <fisher22+0x200>
jmp    1359 <fisher22+0x259>
movapd %xmm14,%xmm0
movsd  -0x10(%rsp),%xmm12
ucomisd %xmm8,%xmm12
jne    1362 <fisher22+0x262>
jnp    13a2 <fisher22+0x2a2>
mulsd  0xcc5(%rip),%xmm10
addsd  %xmm0,%xmm10
addsd  %xmm0,%xmm15
jmp    1397 <fisher22+0x297>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm12
jne    1384 <fisher22+0x284>
jnp    13ad <fisher22+0x2ad>
mulsd  0xca3(%rip),%xmm10
addsd  %xmm14,%xmm10
addsd  %xmm14,%xmm15
divsd  %xmm15,%xmm10
movapd %xmm10,%xmm0
ret
addsd  %xmm0,%xmm15
divsd  %xmm15,%xmm0
ret
addsd  %xmm14,%xmm15
divsd  %xmm15,%xmm14
movapd %xmm14,%xmm0
ret

LLVM IR (-O0):
@INFINITY = global double 0.000000e+00
define double @fisher22(double %0, double %1, double %2, double %3, double %4) {
%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 i32
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double 0x3ABFFFFFFFFFFC7B, double* %12
%22 = load double, double* %12
store double %22, double* %13
store double 0.000000e+00, double* %14
store i32 1, i32* %15
%23 = load double, double* %8
%24 = load double, double* %9
%25 = fcmp ogt double %23, %24
br i1 %25, label %26, label %30
26: ; preds = %5
%27 = load double, double* %8
store double %27, double* %16
%28 = load double, double* %9
store double %28, double* %8
%29 = load double, double* %16
store double %29, double* %9
br label %30
30: ; preds = %26, %5
%31 = load double, double* %7
%32 = load double, double* %10
%33 = fcmp ogt double %31, %32
br i1 %33, label %34, label %38
34: ; preds = %30
%35 = load double, double* %7
store double %35, double* %16
%36 = load double, double* %10
store double %36, double* %7
%37 = load double, double* %16
store double %37, double* %10
br label %38
38: ; preds = %34, %30
%39 = load double, double* %7
%40 = load double, double* %10
%41 = fmul double %39, %40
%42 = load double, double* %8
%43 = load double, double* %9
%44 = fmul double %42, %43
%45 = fcmp ogt double %41, %44
br i1 %45, label %46, label %53
46: ; preds = %38
%47 = load double, double* %7
store double %47, double* %16
%48 = load double, double* %8
store double %48, double* %7
%49 = load double, double* %16
store double %49, double* %8
%50 = load double, double* %9
store double %50, double* %16
%51 = load double, double* %10
store double %51, double* %9
%52 = load double, double* %16
store double %52, double* %10
br label %53
53: ; preds = %46, %38
%54 = load double, double* %7
store double %54, double* %17
%55 = load double, double* %8
store double %55, double* %18
%56 = load double, double* %9
store double %56, double* %19
%57 = load double, double* %10
store double %57, double* %20
br label %58
58: ; preds = %99, %53
%59 = load double, double* %18
%60 = fcmp ogt double %59, 5.000000e-01
br i1 %60, label %61, label %100
61: ; preds = %58
%62 = load double, double* %17
%63 = fadd double %62, 1.000000e+00
store double %63, double* %17
%64 = load double, double* %20
%65 = fadd double %64, 1.000000e+00
store double %65, double* %20
%66 = load double, double* %18
%67 = load double, double* %19
%68 = fmul double %66, %67
%69 = load double, double* %17
%70 = load double, double* %20
%71 = fmul double %69, %70
%72 = fdiv double %68, %71
%73 = load double, double* %13
%74 = fmul double %73, %72
store double %74, double* %13
%75 = load double, double* %18
%76 = fsub double %75, 1.000000e+00
store double %76, double* %18
%77 = load double, double* %19
%78 = fsub double %77, 1.000000e+00
store double %78, double* %19
%79 = load double, double* %13
%80 = fcmp olt double %79, 0x3AC0000000000000
br i1 %80, label %81, label %91
81: ; preds = %61
%82 = load double, double* %13
%83 = fcmp ogt double %82, 0x3ABFFFFFFFFFF8F7
br i1 %83, label %84, label %87
84: ; preds = %81
%85 = load i32, i32* %15
%86 = add nsw i32 %85, 1
store i32 %86, i32* %15
br label %87
87: ; preds = %84, %81
%88 = load double, double* %13
%89 = load double, double* %12
%90 = fadd double %89, %88
store double %90, double* %12
br label %100
91: ; preds = %61
%92 = load double, double* %13
%93 = load double, double* %14
%94 = fadd double %93, %92
store double %94, double* %14
%95 = load double, double* %14
%96 = load double, double* @INFINITY
%97 = fcmp oeq double %95, %96
br i1 %97, label %98, label %99
98: ; preds = %91
store double 0.000000e+00, double* %6
br label %216
99: ; preds = %91
br label %58
100: ; preds = %87, %58
%101 = load double, double* %14
%102 = fcmp oeq double %101, 0.000000e+00
br i1 %102, label %103, label %107
103: ; preds = %100
%104 = load double, double* %11
%105 = fcmp une double %104, 0.000000e+00
br i1 %105, label %107, label %106
106: ; preds = %103
store double 1.000000e+00, double* %6
br label %216
107: ; preds = %103, %100
%108 = load double, double* %18
%109 = fcmp ogt double %108, 5.000000e-01
br i1 %109, label %110, label %142
110: ; preds = %107
br label %111
111: ; preds = %138, %110
%112 = load double, double* %17
%113 = fadd double %112, 1.000000e+00
store double %113, double* %17
%114 = load double, double* %20
%115 = fadd double %114, 1.000000e+00
store double %115, double* %20
%116 = load double, double* %18
%117 = load double, double* %19
%118 = fmul double %116, %117
%119 = load double, double* %17
%120 = load double, double* %20
%121 = fmul double %119, %120
%122 = fdiv double %118, %121
%123 = load double, double* %13
%124 = fmul double %123, %122
store double %124, double* %13
%125 = load double, double* %18
%126 = fsub double %125, 1.000000e+00
store double %126, double* %18
%127 = load double, double* %19
%128 = fsub double %127, 1.000000e+00
store double %128, double* %19
%129 = load double, double* %12
store double %129, double* %21
%130 = load double, double* %13
%131 = load double, double* %12
%132 = fadd double %131, %130
store double %132, double* %12
%133 = load double, double* %12
%134 = load double, double* %21
%135 = fcmp ole double %133, %134
br i1 %135, label %136, label %137
136: ; preds = %111
br label %141
137: ; preds = %111
br label %138
138: ; preds = %137
%139 = load double, double* %18
%140 = fcmp ogt double %139, 5.000000e-01
br i1 %140, label %111, label %141
141: ; preds = %138, %136
br label %142
142: ; preds = %141, %107
%143 = load double, double* %7
%144 = fcmp une double %143, 0.000000e+00
br i1 %144, label %145, label %198
145: ; preds = %142
%146 = load double, double* %7
store double %146, double* %17
%147 = load double, double* %8
store double %147, double* %18
%148 = load double, double* %9
store double %148, double* %19
%149 = load double, double* %10
store double %149, double* %20
store double 0x3ABFFFFFFFFFFC7B, double* %13
br label %150
150: ; preds = %194, %145
%151 = load double, double* %18
%152 = fadd double %151, 1.000000e+00
store double %152, double* %18
%153 = load double, double* %19
%154 = fadd double %153, 1.000000e+00
store double %154, double* %19
%155 = load double, double* %17
%156 = load double, double* %20
%157 = fmul double %155, %156
%158 = load double, double* %18
%159 = load double, double* %19
%160 = fmul double %158, %159
%161 = fdiv double %157, %160
%162 = load double, double* %13
%163 = fmul double %162, %161
store double %163, double* %13
%164 = load double, double* %17
%165 = fsub double %164, 1.000000e+00
store double %165, double* %17
%166 = load double, double* %20
%167 = fsub double %166, 1.000000e+00
store double %167, double* %20
%168 = load double, double* %12
store double %168, double* %21
%169 = load double, double* %13
%170 = load double, double* %12
%171 = fadd double %170, %169
store double %171, double* %12
%172 = load double, double* %12
%173 = load double, double* %21
%174 = fcmp ole double %172, %173
br i1 %174, label %175, label %193
175: ; preds = %150
%176 = load double, double* %11
%177 = fcmp une double %176, 0.000000e+00
br i1 %177, label %184, label %178
178: ; preds = %175
%179 = load double, double* %21
%180 = load double, double* %14
%181 = load double, double* %21
%182 = fadd double %180, %181
%183 = fdiv double %179, %182
store double %183, double* %6
br label %216
184: ; preds = %175
%185 = load double, double* %21
%186 = load i32, i32* %15
%187 = sitofp i32 %186 to double
%188 = call double @llvm.fmuladd.f64(double 0xBAAFFFFFFFFFFC7B, double %187, double %185)
%189 = load double, double* %14
%190 = load double, double* %21
%191 = fadd double %189, %190
%192 = fdiv double %188, %191
store double %192, double* %6
br label %216
193: ; preds = %150
br label %194
194: ; preds = %193
%195 = load double, double* %17
%196 = fcmp ogt double %195, 5.000000e-01
br i1 %196, label %150, label %197
197: ; preds = %194
br label %198
198: ; preds = %197, %142
%199 = load double, double* %11
%200 = fcmp une double %199, 0.000000e+00
br i1 %200, label %207, label %201
201: ; preds = %198
%202 = load double, double* %12
%203 = load double, double* %14
%204 = load double, double* %12
%205 = fadd double %203, %204
%206 = fdiv double %202, %205
store double %206, double* %6
br label %216
207: ; preds = %198
%208 = load double, double* %12
%209 = load i32, i32* %15
%210 = sitofp i32 %209 to double
%211 = call double @llvm.fmuladd.f64(double 0xBAAFFFFFFFFFFC7B, double %210, double %208)
%212 = load double, double* %14
%213 = load double, double* %12
%214 = fadd double %212, %213
%215 = fdiv double %211, %214
store double %215, double* %6
br label %216
216: ; preds = %207, %201, %184, %178, %106, %98
%217 = load double, double* %6
ret double %217
}

LLVM IR (-O2):
@INFINITY = global double 0.000000e+00
define double @fisher22(double %0, double %1, double %2, double %3, double %4) {
%6 = fcmp ogt double %1, %2
%7 = select i1 %6, double %2, double %1
%8 = select i1 %6, double %1, double %2
%9 = fcmp ogt double %0, %3
%10 = select i1 %9, double %3, double %0
%11 = select i1 %9, double %0, double %3
%12 = fmul double %10, %11
%13 = fmul double %7, %8
%14 = fcmp ogt double %12, %13
br i1 %14, label %15, label %16
15: ; preds = %5
br label %16
16: ; preds = %15, %5
%17 = phi double [ %7, %15 ], [ %10, %5 ]
%18 = phi double [ %10, %15 ], [ %7, %5 ]
%19 = phi double [ %11, %15 ], [ %8, %5 ]
%20 = phi double [ %8, %15 ], [ %11, %5 ]
%21 = load double, double* @INFINITY
br label %22
22: ; preds = %44, %16
%23 = phi double [ 0x3ABFFFFFFFFFFC7B, %16 ], [ %36, %44 ]
%24 = phi double [ 0.000000e+00, %16 ], [ %45, %44 ]
%25 = phi double [ %17, %16 ], [ %31, %44 ]
%26 = phi double [ %18, %16 ], [ %37, %44 ]
%27 = phi double [ %19, %16 ], [ %38, %44 ]
%28 = phi double [ %20, %16 ], [ %32, %44 ]
%29 = fcmp ogt double %26, 5.000000e-01
br i1 %29, label %30, label %47
30: ; preds = %22
%31 = fadd double %25, 1.000000e+00
%32 = fadd double %28, 1.000000e+00
%33 = fmul double %26, %27
%34 = fmul double %31, %32
%35 = fdiv double %33, %34
%36 = fmul double %23, %35
%37 = fadd double %26, -1.000000e+00
%38 = fadd double %27, -1.000000e+00
%39 = fcmp olt double %36, 0x3AC0000000000000
br i1 %39, label %40, label %44
40: ; preds = %30
%41 = fcmp ogt double %36, 0x3ABFFFFFFFFFF8F7
%42 = fadd double %36, 0x3ABFFFFFFFFFFC7B
%43 = select i1 %41, double 2.000000e+00, double 1.000000e+00
br label %47
44: ; preds = %30
%45 = fadd double %24, %36
%46 = fcmp oeq double %45, %21
br i1 %46, label %118, label %22
47: ; preds = %22, %40
%48 = phi double [ %42, %40 ], [ 0x3ABFFFFFFFFFFC7B, %22 ]
%49 = phi double [ %36, %40 ], [ %23, %22 ]
%50 = phi double [ %43, %40 ], [ 1.000000e+00, %22 ]
%51 = phi double [ %31, %40 ], [ %25, %22 ]
%52 = phi double [ %37, %40 ], [ %26, %22 ]
%53 = phi double [ %38, %40 ], [ %27, %22 ]
%54 = phi double [ %32, %40 ], [ %28, %22 ]
%55 = fcmp une double %24, 0.000000e+00
%56 = fcmp une double %4, 0.000000e+00
%57 = or i1 %56, %55
br i1 %57, label %58, label %118
58: ; preds = %47
%59 = fcmp ogt double %52, 5.000000e-01
br i1 %59, label %60, label %79
60: ; preds = %58, %60
%61 = phi double [ %75, %60 ], [ %48, %58 ]
%62 = phi double [ %72, %60 ], [ %49, %58 ]
%63 = phi double [ %67, %60 ], [ %51, %58 ]
%64 = phi double [ %73, %60 ], [ %52, %58 ]
%65 = phi double [ %74, %60 ], [ %53, %58 ]
%66 = phi double [ %68, %60 ], [ %54, %58 ]
%67 = fadd double %63, 1.000000e+00
%68 = fadd double %66, 1.000000e+00
%69 = fmul double %64, %65
%70 = fmul double %67, %68
%71 = fdiv double %69, %70
%72 = fmul double %62, %71
%73 = fadd double %64, -1.000000e+00
%74 = fadd double %65, -1.000000e+00
%75 = fadd double %61, %72
%76 = fcmp ugt double %75, %61
%77 = fcmp ogt double %73, 5.000000e-01
%78 = select i1 %76, i1 %77, i1 false
br i1 %78, label %60, label %79
79: ; preds = %60, %58
%80 = phi double [ %48, %58 ], [ %75, %60 ]
%81 = fcmp une double %17, 0.000000e+00
br i1 %81, label %82, label %109
82: ; preds = %79, %106
%83 = phi double [ %96, %106 ], [ %80, %79 ]
%84 = phi double [ %94, %106 ], [ 0x3ABFFFFFFFFFFC7B, %79 ]
%85 = phi double [ %95, %106 ], [ %17, %79 ]
%86 = phi double [ %89, %106 ], [ %18, %79 ]
%87 = phi double [ %90, %106 ], [ %19, %79 ]
%88 = phi double [ %107, %106 ], [ %20, %79 ]
%89 = fadd double %86, 1.000000e+00
%90 = fadd double %87, 1.000000e+00
%91 = fmul double %85, %88
%92 = fmul double %89, %90
%93 = fdiv double %91, %92
%94 = fmul double %84, %93
%95 = fadd double %85, -1.000000e+00
%96 = fadd double %83, %94
%97 = fcmp ugt double %96, %83
br i1 %97, label %106, label %98
98: ; preds = %82
br i1 %56, label %102, label %99
99: ; preds = %98
%100 = fadd double %24, %83
%101 = fdiv double %83, %100
br label %118
102: ; preds = %98
%103 = tail call double @llvm.fmuladd.f64(double %50, double 0xBAAFFFFFFFFFFC7B, double %83)
%104 = fadd double %24, %83
%105 = fdiv double %103, %104
br label %118
106: ; preds = %82
%107 = fadd double %88, -1.000000e+00
%108 = fcmp ogt double %95, 5.000000e-01
br i1 %108, label %82, label %109
109: ; preds = %106, %79
%110 = phi double [ %80, %79 ], [ %96, %106 ]
br i1 %56, label %114, label %111
111: ; preds = %109
%112 = fadd double %24, %110
%113 = fdiv double %110, %112
br label %118
114: ; preds = %109
%115 = tail call double @llvm.fmuladd.f64(double %50, double 0xBAAFFFFFFFFFFC7B, double %110)
%116 = fadd double %24, %110
%117 = fdiv double %115, %116
br label %118
118: ; preds = %44, %47, %114, %111, %102, %99
%119 = phi double [ %105, %102 ], [ %101, %99 ], [ %117, %114 ], [ %113, %111 ], [ 1.000000e+00, %47 ], [ 0.000000e+00, %44 ]
ret double %119
}