#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 long long int64_t;
typedef long long int32_t;

/* Variables and functions */
int32_t SNPHWE_t(int32_t obs_hets, int32_t obs_hom1, int32_t obs_hom2,
                 double thresh) {
  intptr_t obs_homc;
  intptr_t obs_homr;
  if (obs_hom1 < obs_hom2) {
    obs_homc = obs_hom2;
    obs_homr = obs_hom1;
  } else {
    obs_homc = obs_hom1;
    obs_homr = obs_hom2;
  }
  int64_t rare_copies = 2LL * obs_homr + obs_hets;
  int64_t genotypes2 = (obs_hets + obs_homc + obs_homr) * 2LL;
  double curr_hets_t2 = obs_hets;
  double curr_homr_t2 = obs_homr;
  double curr_homc_t2 = obs_homc;
  double tailp1 =
      (1 - 0.00000000000005684341886080801486968994140625) *
      0.00000000000000000000000010339757656912845935892608650874535669572651386260986328125;
  double centerp = 0;
  double lastp2 = tailp1;
  double tailp2 = 0;
  double tail1_ceil;
  double tail2_ceil;
  double lastp1;
  double curr_hets_t1;
  double curr_homr_t1;
  double curr_homc_t1;
  double exit_thresh;
  double exit_threshx;
  double ratio;
  double preaddp;
  if (!genotypes2) {
    return 0;
  }
  thresh = (1 - thresh) / thresh;
  if (obs_hets * genotypes2 > rare_copies * (genotypes2 - rare_copies)) {
    if (obs_hets < 2) {
      return 0;
    }
    exit_thresh =
        rare_copies * thresh *
        0.00000000000000000000000010339757656912845935892608650874535669572651386260986328125;
    do {
      curr_homr_t2 += 1;
      curr_homc_t2 += 1;
      lastp2 *= (curr_hets_t2 * (curr_hets_t2 - 1)) /
                (4 * curr_homr_t2 * curr_homc_t2);
      curr_hets_t2 -= 2;
      if (lastp2 <
          0.00000000000000000000000010339757656912845935892608650874535669572651386260986328125) {
        tailp2 = lastp2;
        break;
      }
      centerp += lastp2;
      if (centerp > exit_thresh) {
        return 1;
      }
    } while (curr_hets_t2 > 1.5);
    exit_thresh = centerp / thresh;
    if (tailp1 + tailp2 >= exit_thresh) {
      return 0;
    }
    ratio = (curr_hets_t2 * (curr_hets_t2 - 1)) /
            (4 * (curr_homr_t2 + 1) * (curr_homc_t2 + 1));
    tail2_ceil = tailp2 / (1 - ratio);
    curr_hets_t1 = obs_hets + 2;
    curr_homr_t1 = obs_homr;
    curr_homc_t1 = obs_homc;
    lastp1 =
        (4 * curr_homr_t1 * curr_homc_t1) / (curr_hets_t1 * (curr_hets_t1 - 1));
    tail1_ceil = tailp1 / (1 - lastp1);
    if (tail1_ceil + tail2_ceil < exit_thresh) {
      return 1;
    }
    lastp1 *= tailp1;
    tailp1 += lastp1;
    if (obs_homr > 1) {
      exit_threshx = exit_thresh - tailp2;
      do {
        curr_hets_t1 += 2;
        curr_homr_t1 -= 1;
        curr_homc_t1 -= 1;
        lastp1 *= (4 * curr_homr_t1 * curr_homc_t1) /
                  (curr_hets_t1 * (curr_hets_t1 - 1));
        preaddp = tailp1;
        tailp1 += lastp1;
        if (tailp1 > exit_threshx) {
          return 0;
        }
        if (tailp1 <= preaddp) {
          break;
        }
      } while (curr_homr_t1 > 1.5);
    }
    if (tailp1 + tail2_ceil < exit_thresh) {
      return 1;
    }
    exit_threshx = exit_thresh - tailp1;
    while (curr_hets_t2 > 1) {
      curr_homr_t2 += 1;
      curr_homc_t2 += 1;
      lastp2 *= (curr_hets_t2 * (curr_hets_t2 - 1)) /
                (4 * curr_homr_t2 * curr_homc_t2);
      preaddp = tailp2;
      tailp2 += lastp2;
      if (tailp2 >= exit_threshx) {
        return 0;
      }
      if (tailp2 <= preaddp) {
        return 1;
      }
      curr_hets_t2 -= 2;
    }
    return 1;
  } else {
    if (!obs_homr) {
      return 0;
    }
    exit_thresh =
        rare_copies * thresh *
        0.00000000000000000000000010339757656912845935892608650874535669572651386260986328125;
    do {
      curr_hets_t2 += 2;
      lastp2 *= (4 * curr_homr_t2 * curr_homc_t2) /
                (curr_hets_t2 * (curr_hets_t2 - 1));
      curr_homr_t2 -= 1;
      curr_homc_t2 -= 1;
      if (lastp2 <
          0.00000000000000000000000010339757656912845935892608650874535669572651386260986328125) {
        tailp2 = lastp2;
        break;
      }
      centerp += lastp2;
      if (centerp > exit_thresh) {
        return 1;
      }
    } while (curr_homr_t2 > 0.5);
    exit_thresh = centerp / thresh;
    if (tailp1 + tailp2 >= exit_thresh) {
      return 0;
    }
    ratio = (4 * curr_homr_t2 * curr_homc_t2) /
            ((curr_hets_t2 + 2) * (curr_hets_t2 + 1));
    tail2_ceil = tailp2 / (1 - ratio);
    curr_hets_t1 = obs_hets;
    curr_homr_t1 = obs_homr + 1;
    curr_homc_t1 = obs_homc + 1;
    lastp1 =
        (curr_hets_t1 * (curr_hets_t1 - 1)) / (4 * curr_homr_t1 * curr_homc_t1);
    tail1_ceil = tailp1 / (1 - lastp1);
    lastp1 *= tailp1;
    tailp1 += lastp1;
    if (tail1_ceil + tail2_ceil < exit_thresh) {
      return 1;
    }
    if (obs_hets >= 4) {
      exit_threshx = exit_thresh - tailp2;
      do {
        curr_hets_t1 -= 2;
        curr_homr_t1 += 1;
        curr_homc_t1 += 1;
        lastp1 *= (curr_hets_t1 * (curr_hets_t1 - 1)) /
                  (4 * curr_homr_t1 * curr_homc_t1);
        preaddp = tailp1;
        tailp1 += lastp1;
        if (tailp1 > exit_threshx) {
          return 0;
        }
        if (tailp1 <= preaddp) {
          break;
        }
      } while (curr_hets_t1 > 3.5);
    }
    if (tailp1 + tail2_ceil < exit_thresh) {
      return 1;
    }
    exit_threshx = exit_thresh - tailp1;
    while (curr_homr_t2 > 0.5) {
      curr_hets_t2 += 2;
      lastp2 *= (4 * curr_homr_t2 * curr_homc_t2) /
                (curr_hets_t2 * (curr_hets_t2 - 1));
      curr_homr_t2 -= 1;
      curr_homc_t2 -= 1;
      preaddp = tailp2;
      tailp2 += lastp2;
      if (tailp2 >= exit_threshx) {
        return 0;
      }
      if (tailp2 <= preaddp) {
        return 1;
      }
    }
    return 1;
  }
}


x86 assembly (clang, -O0):
<SNPHWE_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    113c <SNPHWE_t+0x3c>
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    114c <SNPHWE_t+0x4c>
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
shl    $0x1,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
add    -0x30(%rbp),%rax
add    -0x38(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x48(%rbp)
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
cvtsi2sdq -0x38(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
cvtsi2sdq -0x30(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe67(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    11d0 <SNPHWE_t+0xd0>
movq   $0x0,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
movsd  0xe30(%rip),%xmm0
subsd  -0x28(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
imul   -0x48(%rbp),%rax
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%rdx
sub    -0x40(%rbp),%rdx
imul   %rdx,%rcx
cmp    %rcx,%rax
jle    172e <SNPHWE_t+0x62e>
cmpq   $0x2,-0x10(%rbp)
jge    1221 <SNPHWE_t+0x121>
movq   $0x0,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
cvtsi2sdq -0x40(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  0xddc(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xdc0(%rip),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xdae(%rip),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  0xd92(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd92(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xd75(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xd54(%rip),%xmm0
ucomisd -0x78(%rbp),%xmm0
jbe    12d6 <SNPHWE_t+0x1d6>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    1321 <SNPHWE_t+0x221>
movsd  -0x78(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
ucomisd -0xb8(%rbp),%xmm0
ff
jbe    1305 <SNPHWE_t+0x205>
movq   $0x1,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
jmp    130a <SNPHWE_t+0x20a>
movsd  -0x50(%rbp),%xmm0
movsd  0xd21(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1240 <SNPHWE_t+0x140>
movsd  -0x70(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
addsd  -0x80(%rbp),%xmm0
ucomisd -0xb8(%rbp),%xmm0
ff
jb     1358 <SNPHWE_t+0x258>
movq   $0x0,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
movsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  0xc9e(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc8e(%rip),%xmm2
addsd  -0x58(%rbp),%xmm2
movsd  0xc91(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xc75(%rip),%xmm2
addsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  0xc53(%rip),%xmm1
subsd  -0xc8(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x10(%rbp),%rax
add    $0x2,%rax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
cvtsi2sdq -0x38(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
cvtsi2sdq -0x30(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xc16(%rip),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm2
ff
movsd  0xbde(%rip),%xmm3
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  0xbbd(%rip),%xmm1
subsd  -0x98(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm1
ff
addsd  -0x90(%rbp),%xmm1
ff
movsd  -0xb8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    148e <SNPHWE_t+0x38e>
movq   $0x1,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
movsd  -0x68(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
cmpq   $0x1,-0x38(%rbp)
jle    15f0 <SNPHWE_t+0x4f0>
movsd  -0xb8(%rbp),%xmm0
ff
subsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0xb43(%rip),%xmm0
addsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  0xb0b(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  0xaef(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xaeb(%rip),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm2
ff
movsd  0xab3(%rip),%xmm3
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
ucomisd -0xc0(%rbp),%xmm0
ff
jbe    15b0 <SNPHWE_t+0x4b0>
movq   $0x0,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
movsd  -0x68(%rbp),%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     15cc <SNPHWE_t+0x4cc>
jmp    15eb <SNPHWE_t+0x4eb>
jmp    15d1 <SNPHWE_t+0x4d1>
movsd  -0xa8(%rbp),%xmm0
ff
movsd  0xa57(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     14d5 <SNPHWE_t+0x3d5>
jmp    15f0 <SNPHWE_t+0x4f0>
movsd  -0x68(%rbp),%xmm1
addsd  -0x90(%rbp),%xmm1
ff
movsd  -0xb8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    161c <SNPHWE_t+0x51c>
movq   $0x1,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
movsd  -0xb8(%rbp),%xmm0
ff
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  0x9ca(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1721 <SNPHWE_t+0x621>
movsd  0x9b8(%rip),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0x9a6(%rip),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  0x98a(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x98a(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
ucomisd -0xc0(%rbp),%xmm0
ff
jb     16e2 <SNPHWE_t+0x5e2>
movq   $0x0,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
movsd  -0x80(%rbp),%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     1706 <SNPHWE_t+0x606>
movq   $0x1,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
movsd  -0x50(%rbp),%xmm0
movsd  0x90d(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1631 <SNPHWE_t+0x531>
movq   $0x1,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
cmpq   $0x0,-0x38(%rbp)
jne    1746 <SNPHWE_t+0x646>
movq   $0x0,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
cvtsi2sdq -0x40(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  0x8b7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0x8b3(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0x899(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movsd  0x86d(%rip),%xmm3
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0x84a(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  0x834(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0x82b(%rip),%xmm0
ucomisd -0x78(%rbp),%xmm0
jbe    17ff <SNPHWE_t+0x6ff>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    184a <SNPHWE_t+0x74a>
movsd  -0x78(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
ucomisd -0xb8(%rbp),%xmm0
ff
jbe    182e <SNPHWE_t+0x72e>
movq   $0x1,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
jmp    1833 <SNPHWE_t+0x733>
movsd  -0x58(%rbp),%xmm0
movsd  0x7e8(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1765 <SNPHWE_t+0x665>
movsd  -0x70(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
addsd  -0x80(%rbp),%xmm0
ucomisd -0xb8(%rbp),%xmm0
ff
jb     1881 <SNPHWE_t+0x781>
movq   $0x0,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
movsd  0x78f(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  0x785(%rip),%xmm1
addsd  -0x50(%rbp),%xmm1
movsd  0x760(%rip),%xmm2
addsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  0x73e(%rip),%xmm1
subsd  -0xc8(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x38(%rbp),%rax
add    $0x1,%rax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0xa8(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  0x6da(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x6da(%rip),%xmm1
mulsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0xb0(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  0x6a1(%rip),%xmm1
subsd  -0x98(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x88(%rbp),%xmm1
ff
addsd  -0x90(%rbp),%xmm1
ff
movsd  -0xb8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    19d1 <SNPHWE_t+0x8d1>
movq   $0x1,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
cmpq   $0x4,-0x10(%rbp)
jl     1b08 <SNPHWE_t+0xa08>
movsd  -0xb8(%rbp),%xmm0
ff
subsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  0x61f(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0x5f3(%rip),%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0x5db(%rip),%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  0x5b3(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x5b3(%rip),%xmm1
mulsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0xb0(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
ucomisd -0xc0(%rbp),%xmm0
ff
jbe    1ac8 <SNPHWE_t+0x9c8>
movq   $0x0,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
movsd  -0x68(%rbp),%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     1ae4 <SNPHWE_t+0x9e4>
jmp    1b03 <SNPHWE_t+0xa03>
jmp    1ae9 <SNPHWE_t+0x9e9>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  0x537(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     19f1 <SNPHWE_t+0x8f1>
jmp    1b08 <SNPHWE_t+0xa08>
movsd  -0x68(%rbp),%xmm1
addsd  -0x90(%rbp),%xmm1
ff
movsd  -0xb8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1b34 <SNPHWE_t+0xa34>
movq   $0x1,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
movsd  -0xb8(%rbp),%xmm0
ff
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  0x4d2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1c3d <SNPHWE_t+0xb3d>
movsd  0x4b8(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0x49e(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movsd  0x472(%rip),%xmm3
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0x44f(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  0x439(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
ucomisd -0xc0(%rbp),%xmm0
jb     1c14 <SNPHWE_t+0xb14>
movq   $0x0,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
movsd  -0x80(%rbp),%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     1c38 <SNPHWE_t+0xb38>
movq   $0x1,-0x8(%rbp)
jmp    1c45 <SNPHWE_t+0xb45>
jmp    1b49 <SNPHWE_t+0xa49>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SNPHWE_t>:
cmp    %rdx,%rsi
mov    %rsi,%r8
cmovl  %rdx,%r8
cmovl  %rsi,%rdx
lea    (%r8,%rdi,1),%rsi
add    %rdx,%rsi
je     170b <SNPHWE_t+0x60b>
lea    (%rdi,%rdx,2),%rcx
cvtsi2sd %rdi,%xmm10
cvtsi2sd %rdx,%xmm9
cvtsi2sd %r8,%xmm12
add    %rsi,%rsi
movsd  0xec6(%rip),%xmm8
movapd %xmm8,%xmm13
subsd  %xmm0,%xmm13
divsd  %xmm0,%xmm13
mov    %rsi,%rax
imul   %rdi,%rax
sub    %rcx,%rsi
imul   %rcx,%rsi
cmp    %rsi,%rax
jle    1217 <SNPHWE_t+0x117>
cmp    $0x2,%rdi
jl     170b <SNPHWE_t+0x60b>
cvtsi2sd %rcx,%xmm1
mulsd  %xmm13,%xmm1
mulsd  0xe8c(%rip),%xmm1
movsd  0xe8c(%rip),%xmm6
xorpd  %xmm0,%xmm0
movsd  0xe90(%rip),%xmm4
movsd  0xe6f(%rip),%xmm11
movsd  0xea6(%rip),%xmm14
movapd %xmm9,%xmm2
movapd %xmm12,%xmm5
nopl   0x0(%rax)
movapd %xmm6,%xmm7
addsd  %xmm8,%xmm2
addsd  %xmm8,%xmm5
movapd %xmm10,%xmm6
addsd  0xe5d(%rip),%xmm6
mulsd  %xmm10,%xmm6
movapd %xmm2,%xmm3
mulsd  %xmm4,%xmm3
mulsd  %xmm5,%xmm3
divsd  %xmm3,%xmm6
mulsd  %xmm7,%xmm6
addsd  0xe4b(%rip),%xmm10
ucomisd %xmm6,%xmm11
ja     1453 <SNPHWE_t+0x353>
addsd  %xmm6,%xmm0
ucomisd %xmm1,%xmm0
ja     12bc <SNPHWE_t+0x1bc>
ucomisd %xmm14,%xmm10
ja     11b0 <SNPHWE_t+0xb0>
xorpd  %xmm15,%xmm15
jmp    1458 <SNPHWE_t+0x358>
test   %rdx,%rdx
je     170b <SNPHWE_t+0x60b>
cvtsi2sd %rcx,%xmm3
mulsd  %xmm13,%xmm3
mulsd  0xdd6(%rip),%xmm3
movsd  0xdd6(%rip),%xmm5
xorpd  %xmm0,%xmm0
movsd  0xdd9(%rip),%xmm15
movsd  0xdd8(%rip),%xmm14
movsd  0xdb0(%rip),%xmm6
movapd %xmm10,%xmm4
nopl   (%rax)
movapd %xmm5,%xmm7
addsd  0xdac(%rip),%xmm4
movapd %xmm9,%xmm5
mulsd  %xmm15,%xmm5
mulsd  %xmm12,%xmm5
movapd %xmm4,%xmm1
addsd  %xmm14,%xmm1
mulsd  %xmm4,%xmm1
divsd  %xmm1,%xmm5
mulsd  %xmm7,%xmm5
addsd  %xmm14,%xmm9
addsd  %xmm14,%xmm12
ucomisd %xmm5,%xmm6
ja     12c2 <SNPHWE_t+0x1c2>
addsd  %xmm5,%xmm0
ucomisd %xmm3,%xmm0
ja     12bc <SNPHWE_t+0x1bc>
ucomisd 0xd7d(%rip),%xmm9
ja     1260 <SNPHWE_t+0x160>
xorpd  %xmm11,%xmm11
jmp    12c7 <SNPHWE_t+0x1c7>
mov    $0x1,%eax
ret
movapd %xmm5,%xmm11
divsd  %xmm13,%xmm0
movsd  0xd3c(%rip),%xmm1
addsd  %xmm11,%xmm1
ucomisd %xmm0,%xmm1
jae    170b <SNPHWE_t+0x60b>
add    $0x1,%rdx
xorps  %xmm3,%xmm3
cvtsi2sd %rdx,%xmm3
movsd  0xd08(%rip),%xmm8
add    $0x1,%r8
xorps  %xmm6,%xmm6
cvtsi2sd %r8,%xmm6
addsd  %xmm4,%xmm8
movapd %xmm10,%xmm1
unpcklpd %xmm9,%xmm1
movsd  0xd0d(%rip),%xmm7
addsd  %xmm10,%xmm7
mulpd  0xd28(%rip),%xmm1
movsd  %xmm7,%xmm1
movapd %xmm10,%xmm7
unpcklpd %xmm12,%xmm7
mulpd  %xmm1,%xmm7
unpcklpd %xmm4,%xmm1
movsd  0xcda(%rip),%xmm2
mulpd  %xmm3,%xmm2
addpd  0xd0e(%rip),%xmm1
movsd  %xmm2,%xmm1
movapd %xmm6,%xmm2
unpcklpd %xmm8,%xmm2
mulpd  %xmm1,%xmm2
divpd  %xmm2,%xmm7
movapd 0xd01(%rip),%xmm1
subpd  %xmm7,%xmm1
movapd 0xd05(%rip),%xmm2
unpcklpd %xmm11,%xmm2
divpd  %xmm1,%xmm2
movapd %xmm2,%xmm1
unpckhpd %xmm2,%xmm1
addsd  %xmm1,%xmm2
mov    $0x1,%eax
ucomisd %xmm2,%xmm0
ja     170a <SNPHWE_t+0x60a>
movsd  0xc68(%rip),%xmm8
mulsd  %xmm8,%xmm7
addsd  %xmm7,%xmm8
cmp    $0x4,%rdi
movapd %xmm1,-0x18(%rsp)
jl     15d9 <SNPHWE_t+0x4d9>
movapd %xmm0,%xmm1
subsd  %xmm11,%xmm1
movsd  %xmm1,-0x28(%rsp)
movapd %xmm8,%xmm13
cs nopw 0x0(%rax,%rax,1)
movapd %xmm7,%xmm1
addsd  0xc4b(%rip),%xmm10
movsd  0xc0b(%rip),%xmm2
addsd  %xmm2,%xmm3
addsd  %xmm2,%xmm6
movapd %xmm10,%xmm7
addsd  %xmm14,%xmm7
mulsd  %xmm10,%xmm7
movapd %xmm3,%xmm2
mulsd  %xmm15,%xmm2
mulsd  %xmm6,%xmm2
divsd  %xmm2,%xmm7
mulsd  %xmm1,%xmm7
addsd  %xmm7,%xmm13
ucomisd -0x28(%rsp),%xmm13
ja     170b <SNPHWE_t+0x60b>
ucomisd %xmm13,%xmm8
jae    15de <SNPHWE_t+0x4de>
ucomisd 0xbf9(%rip),%xmm10
movapd %xmm13,%xmm8
ja     13e0 <SNPHWE_t+0x2e0>
jmp    15de <SNPHWE_t+0x4de>
movapd %xmm6,%xmm15
divsd  %xmm13,%xmm0
movsd  0xbab(%rip),%xmm1
addsd  %xmm15,%xmm1
ucomisd %xmm0,%xmm1
jae    170b <SNPHWE_t+0x60b>
movsd  0xb83(%rip),%xmm11
addsd  %xmm2,%xmm11
add    $0x2,%rdi
xorps  %xmm3,%xmm3
cvtsi2sd %rdi,%xmm3
mulsd  %xmm4,%xmm11
unpcklpd %xmm10,%xmm1
movapd %xmm9,%xmm7
addpd  0xbeb(%rip),%xmm1
mulsd  %xmm4,%xmm7
movsd  %xmm7,%xmm1
movapd %xmm15,%xmm7
movapd %xmm12,%xmm15
unpcklpd %xmm10,%xmm15
mulpd  %xmm1,%xmm15
movapd %xmm3,%xmm13
unpcklpd %xmm5,%xmm13
addpd  0xbcc(%rip),%xmm13
movapd %xmm3,%xmm1
unpcklpd %xmm11,%xmm1
mulpd  %xmm13,%xmm1
divpd  %xmm1,%xmm15
movapd 0xb80(%rip),%xmm11
subpd  %xmm15,%xmm11
movapd 0xb83(%rip),%xmm1
movapd %xmm7,-0x28(%rsp)
unpcklpd %xmm7,%xmm1
divpd  %xmm11,%xmm1
movapd %xmm1,%xmm7
unpckhpd %xmm1,%xmm7
addsd  %xmm7,%xmm1
mov    $0x1,%eax
ucomisd %xmm1,%xmm0
ja     170a <SNPHWE_t+0x60a>
movapd %xmm7,-0x18(%rsp)
movsd  0xada(%rip),%xmm11
mulsd  %xmm11,%xmm15
addsd  %xmm15,%xmm11
cmp    $0x2,%rdx
jl     1669 <SNPHWE_t+0x569>
movapd %xmm0,%xmm4
subsd  -0x28(%rsp),%xmm4
movapd %xmm11,%xmm13
nopl   0x0(%rax)
movapd %xmm15,%xmm1
addsd  0xaab(%rip),%xmm3
addsd  0xab2(%rip),%xmm12
unpcklpd %xmm3,%xmm9
addpd  0xb2c(%rip),%xmm9
movapd 0xb34(%rip),%xmm7
unpcklpd %xmm3,%xmm7
mulpd  %xmm9,%xmm7
movapd %xmm7,%xmm15
mulsd  %xmm12,%xmm15
unpckhpd %xmm7,%xmm7
divsd  %xmm7,%xmm15
mulsd  %xmm1,%xmm15
addsd  %xmm15,%xmm13
ucomisd %xmm4,%xmm13
ja     170b <SNPHWE_t+0x60b>
ucomisd %xmm13,%xmm11
jae    166e <SNPHWE_t+0x56e>
ucomisd %xmm14,%xmm9
movapd %xmm13,%xmm11
ja     1560 <SNPHWE_t+0x460>
jmp    166e <SNPHWE_t+0x56e>
movapd %xmm8,%xmm13
movapd -0x18(%rsp),%xmm1
addsd  %xmm13,%xmm1
ucomisd %xmm1,%xmm0
ja     170a <SNPHWE_t+0x60a>
subsd  %xmm13,%xmm0
movsd  0xa18(%rip),%xmm6
movsd  0xa28(%rip),%xmm7
ucomisd %xmm7,%xmm9
jbe    170a <SNPHWE_t+0x60a>
addsd  %xmm6,%xmm4
movapd %xmm9,%xmm1
mulsd  %xmm15,%xmm1
mulsd  %xmm12,%xmm1
movapd %xmm4,%xmm2
addsd  %xmm14,%xmm2
mulsd  %xmm4,%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm5
movapd %xmm11,%xmm3
addsd  %xmm5,%xmm3
ucomisd %xmm0,%xmm3
jae    170b <SNPHWE_t+0x60b>
addsd  %xmm14,%xmm12
addsd  %xmm14,%xmm9
ucomisd %xmm3,%xmm11
movapd %xmm3,%xmm11
jb     1608 <SNPHWE_t+0x508>
jmp    170a <SNPHWE_t+0x60a>
movapd %xmm11,%xmm13
movapd -0x18(%rsp),%xmm1
addsd  %xmm13,%xmm1
ucomisd %xmm1,%xmm0
ja     170a <SNPHWE_t+0x60a>
ucomisd 0x974(%rip),%xmm10
jbe    170a <SNPHWE_t+0x60a>
subsd  %xmm13,%xmm0
movapd -0x28(%rsp),%xmm3
movapd %xmm3,%xmm1
movsd  0x97a(%rip),%xmm9
movsd  0x979(%rip),%xmm12
movsd  0x980(%rip),%xmm11
movapd %xmm6,%xmm4
addsd  %xmm8,%xmm2
addsd  %xmm8,%xmm5
movapd %xmm10,%xmm6
addsd  %xmm12,%xmm6
mulsd  %xmm10,%xmm6
movapd %xmm2,%xmm7
mulsd  %xmm9,%xmm7
mulsd  %xmm5,%xmm7
divsd  %xmm7,%xmm6
mulsd  %xmm4,%xmm6
addsd  %xmm6,%xmm1
ucomisd %xmm0,%xmm1
jae    170b <SNPHWE_t+0x60b>
ucomisd %xmm1,%xmm3
addsd  %xmm11,%xmm10
jae    170a <SNPHWE_t+0x60a>
ucomisd %xmm8,%xmm10
movapd %xmm1,%xmm3
ja     16b8 <SNPHWE_t+0x5b8>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @SNPHWE_t(i64 %0, i64 %1, i64 %2, double %3) {
%5 = icmp slt i64 %1, %2
%6 = select i1 %5, i64 %2, i64 %1
%7 = select i1 %5, i64 %1, i64 %2
%8 = shl nsw i64 %7, 1
%9 = add nsw i64 %8, %0
%10 = add nsw i64 %6, %0
%11 = add nsw i64 %10, %7
%12 = shl nsw i64 %11, 1
%13 = sitofp i64 %0 to double
%14 = sitofp i64 %7 to double
%15 = sitofp i64 %6 to double
%16 = icmp eq i64 %11, 0
br i1 %16, label %261, label %17
17: ; preds = %4
%18 = fsub double 1.000000e+00, %3
%19 = fdiv double %18, %3
%20 = mul nsw i64 %12, %0
%21 = sub nsw i64 %12, %9
%22 = mul nsw i64 %21, %9
%23 = icmp sgt i64 %20, %22
br i1 %23, label %24, label %144
24: ; preds = %17
%25 = icmp slt i64 %0, 2
br i1 %25, label %261, label %26
26: ; preds = %24
%27 = sitofp i64 %9 to double
%28 = fmul double %19, %27
%29 = fmul double %28, 0x3AC0000000000000
br label %30
30: ; preds = %49, %26
%31 = phi double [ %13, %26 ], [ %44, %49 ]
%32 = phi double [ %14, %26 ], [ %36, %49 ]
%33 = phi double [ %15, %26 ], [ %37, %49 ]
%34 = phi double [ 0.000000e+00, %26 ], [ %47, %49 ]
%35 = phi double [ 0x3ABFFFFFFFFFFE00, %26 ], [ %43, %49 ]
%36 = fadd double %32, 1.000000e+00
%37 = fadd double %33, 1.000000e+00
%38 = fadd double %31, -1.000000e+00
%39 = fmul double %31, %38
%40 = fmul double %36, 4.000000e+00
%41 = fmul double %40, %37
%42 = fdiv double %39, %41
%43 = fmul double %35, %42
%44 = fadd double %31, -2.000000e+00
%45 = fcmp olt double %43, 0x3AC0000000000000
br i1 %45, label %51, label %46
46: ; preds = %30
%47 = fadd double %34, %43
%48 = fcmp ogt double %47, %29
br i1 %48, label %261, label %49
49: ; preds = %46
%50 = fcmp ogt double %44, 1.500000e+00
br i1 %50, label %30, label %51
51: ; preds = %30, %49
%52 = phi double [ %47, %49 ], [ %34, %30 ]
%53 = phi double [ 0.000000e+00, %49 ], [ %43, %30 ]
%54 = fdiv double %52, %19
%55 = fadd double %53, 0x3ABFFFFFFFFFFE00
%56 = fcmp ult double %55, %54
br i1 %56, label %57, label %261
57: ; preds = %51
%58 = fadd double %36, 1.000000e+00
%59 = fmul double %58, 4.000000e+00
%60 = add nsw i64 %0, 2
%61 = sitofp i64 %60 to double
%62 = insertelement <2 x double> poison, double %14, i64 0
%63 = insertelement <2 x double> %62, double %44, i64 1
%64 = fmul <2 x double> %63, <double 4.000000e+00, double poison>
%65 = fadd <2 x double> %63, <double poison, double -1.000000e+00>
%66 = shufflevector <2 x double> %64, <2 x double> %65, <2 x i32> <i32 0, i32 3>
%67 = insertelement <2 x double> poison, double %15, i64 0
%68 = insertelement <2 x double> %67, double %44, i64 1
%69 = fmul <2 x double> %66, %68
%70 = insertelement <2 x double> poison, double %37, i64 1
%71 = insertelement <2 x double> %70, double %61, i64 0
%72 = fadd <2 x double> %71, <double -1.000000e+00, double 1.000000e+00>
%73 = insertelement <2 x double> poison, double %61, i64 0
%74 = insertelement <2 x double> %73, double %59, i64 1
%75 = fmul <2 x double> %72, %74
%76 = fdiv <2 x double> %69, %75
%77 = fsub <2 x double> <double 1.000000e+00, double 1.000000e+00>, %76
%78 = insertelement <2 x double> <double 0x3ABFFFFFFFFFFE00, double poison>, double %53, i64 1
%79 = fdiv <2 x double> %78, %77
%80 = extractelement <2 x double> %79, i64 0
%81 = extractelement <2 x double> %79, i64 1
%82 = fadd double %80, %81
%83 = fcmp olt double %82, %54
br i1 %83, label %261, label %84
84: ; preds = %57
%85 = extractelement <2 x double> %76, i64 0
%86 = fmul double %85, 0x3ABFFFFFFFFFFE00
%87 = fadd double %86, 0x3ABFFFFFFFFFFE00
%88 = icmp sgt i64 %7, 1
br i1 %88, label %89, label %116
89: ; preds = %84
%90 = fsub double %54, %53
br label %91
91: ; preds = %111, %89
%92 = phi double [ %87, %89 ], [ %109, %111 ]
%93 = phi double [ %86, %89 ], [ %108, %111 ]
%94 = phi double [ %61, %89 ], [ %97, %111 ]
%95 = phi double [ %14, %89 ], [ %113, %111 ]
%96 = phi double [ %15, %89 ], [ %98, %111 ]
%97 = fadd double %94, 2.000000e+00
%98 = fadd double %96, -1.000000e+00
%99 = insertelement <2 x double> poison, double %95, i64 0
%100 = insertelement <2 x double> %99, double %97, i64 1
%101 = fadd <2 x double> %100, <double -1.000000e+00, double -1.000000e+00>
%102 = insertelement <2 x double> <double 4.000000e+00, double poison>, double %97, i64 1
%103 = fmul <2 x double> %101, %102
%104 = extractelement <2 x double> %103, i64 0
%105 = fmul double %104, %98
%106 = extractelement <2 x double> %103, i64 1
%107 = fdiv double %105, %106
%108 = fmul double %93, %107
%109 = fadd double %92, %108
%110 = fcmp ogt double %109, %90
br i1 %110, label %261, label %111
111: ; preds = %91
%112 = fcmp ugt double %109, %92
%113 = extractelement <2 x double> %101, i64 0
%114 = fcmp ogt double %113, 1.500000e+00
%115 = select i1 %112, i1 %114, i1 false
br i1 %115, label %91, label %116
116: ; preds = %111, %84
%117 = phi double [ %87, %84 ], [ %109, %111 ]
%118 = fadd double %81, %117
%119 = fcmp olt double %118, %54
br i1 %119, label %261, label %120
120: ; preds = %116
%121 = fsub double %54, %117
%122 = fcmp ogt double %44, 1.000000e+00
br i1 %122, label %123, label %261
123: ; preds = %120, %139
%124 = phi double [ %137, %139 ], [ %53, %120 ]
%125 = phi double [ %136, %139 ], [ %43, %120 ]
%126 = phi double [ %130, %139 ], [ %37, %120 ]
%127 = phi double [ %129, %139 ], [ %36, %120 ]
%128 = phi double [ %141, %139 ], [ %44, %120 ]
%129 = fadd double %127, 1.000000e+00
%130 = fadd double %126, 1.000000e+00
%131 = fadd double %128, -1.000000e+00
%132 = fmul double %128, %131
%133 = fmul double %129, 4.000000e+00
%134 = fmul double %133, %130
%135 = fdiv double %132, %134
%136 = fmul double %125, %135
%137 = fadd double %124, %136
%138 = fcmp ult double %137, %121
br i1 %138, label %139, label %261
139: ; preds = %123
%140 = fcmp ugt double %137, %124
%141 = fadd double %128, -2.000000e+00
%142 = fcmp ogt double %141, 1.000000e+00
%143 = select i1 %140, i1 %142, i1 false
br i1 %143, label %123, label %261
144: ; preds = %17
%145 = icmp eq i64 %7, 0
br i1 %145, label %261, label %146
146: ; preds = %144
%147 = sitofp i64 %9 to double
%148 = fmul double %19, %147
%149 = fmul double %148, 0x3AC0000000000000
br label %150
150: ; preds = %169, %146
%151 = phi double [ %13, %146 ], [ %156, %169 ]
%152 = phi double [ %14, %146 ], [ %163, %169 ]
%153 = phi double [ %15, %146 ], [ %164, %169 ]
%154 = phi double [ 0.000000e+00, %146 ], [ %167, %169 ]
%155 = phi double [ 0x3ABFFFFFFFFFFE00, %146 ], [ %162, %169 ]
%156 = fadd double %151, 2.000000e+00
%157 = fmul double %152, 4.000000e+00
%158 = fmul double %157, %153
%159 = fadd double %156, -1.000000e+00
%160 = fmul double %156, %159
%161 = fdiv double %158, %160
%162 = fmul double %155, %161
%163 = fadd double %152, -1.000000e+00
%164 = fadd double %153, -1.000000e+00
%165 = fcmp olt double %162, 0x3AC0000000000000
br i1 %165, label %171, label %166
166: ; preds = %150
%167 = fadd double %154, %162
%168 = fcmp ogt double %167, %149
br i1 %168, label %261, label %169
169: ; preds = %166
%170 = fcmp ogt double %163, 5.000000e-01
br i1 %170, label %150, label %171
171: ; preds = %150, %169
%172 = phi double [ %167, %169 ], [ %154, %150 ]
%173 = phi double [ 0.000000e+00, %169 ], [ %162, %150 ]
%174 = fdiv double %172, %19
%175 = fadd double %173, 0x3ABFFFFFFFFFFE00
%176 = fcmp ult double %175, %174
br i1 %176, label %177, label %261
177: ; preds = %171
%178 = fadd double %156, 1.000000e+00
%179 = add nsw i64 %7, 1
%180 = sitofp i64 %179 to double
%181 = add nsw i64 %6, 1
%182 = sitofp i64 %181 to double
%183 = insertelement <2 x double> poison, double %13, i64 0
%184 = insertelement <2 x double> %183, double %163, i64 1
%185 = fadd <2 x double> %184, <double -1.000000e+00, double poison>
%186 = fmul <2 x double> %184, <double poison, double 4.000000e+00>
%187 = shufflevector <2 x double> %185, <2 x double> %186, <2 x i32> <i32 0, i32 3>
%188 = insertelement <2 x double> %183, double %164, i64 1
%189 = fmul <2 x double> %187, %188
%190 = insertelement <2 x double> poison, double %156, i64 1
%191 = insertelement <2 x double> %190, double %180, i64 0
%192 = fmul <2 x double> %191, <double 4.000000e+00, double poison>
%193 = fadd <2 x double> %191, <double poison, double 2.000000e+00>
%194 = shufflevector <2 x double> %192, <2 x double> %193, <2 x i32> <i32 0, i32 3>
%195 = insertelement <2 x double> poison, double %182, i64 0
%196 = insertelement <2 x double> %195, double %178, i64 1
%197 = fmul <2 x double> %194, %196
%198 = fdiv <2 x double> %189, %197
%199 = fsub <2 x double> <double 1.000000e+00, double 1.000000e+00>, %198
%200 = insertelement <2 x double> <double 0x3ABFFFFFFFFFFE00, double poison>, double %173, i64 1
%201 = fdiv <2 x double> %200, %199
%202 = extractelement <2 x double> %198, i64 0
%203 = fmul double %202, 0x3ABFFFFFFFFFFE00
%204 = fadd double %203, 0x3ABFFFFFFFFFFE00
%205 = extractelement <2 x double> %201, i64 0
%206 = extractelement <2 x double> %201, i64 1
%207 = fadd double %205, %206
%208 = fcmp olt double %207, %174
br i1 %208, label %261, label %209
209: ; preds = %177
%210 = icmp sgt i64 %0, 3
br i1 %210, label %211, label %234
211: ; preds = %209
%212 = fsub double %174, %173
br label %213
213: ; preds = %230, %211
%214 = phi double [ %204, %211 ], [ %228, %230 ]
%215 = phi double [ %203, %211 ], [ %227, %230 ]
%216 = phi double [ %13, %211 ], [ %219, %230 ]
%217 = phi double [ %180, %211 ], [ %220, %230 ]
%218 = phi double [ %182, %211 ], [ %221, %230 ]
%219 = fadd double %216, -2.000000e+00
%220 = fadd double %217, 1.000000e+00
%221 = fadd double %218, 1.000000e+00
%222 = fadd double %219, -1.000000e+00
%223 = fmul double %219, %222
%224 = fmul double %220, 4.000000e+00
%225 = fmul double %224, %221
%226 = fdiv double %223, %225
%227 = fmul double %215, %226
%228 = fadd double %214, %227
%229 = fcmp ogt double %228, %212
br i1 %229, label %261, label %230
230: ; preds = %213
%231 = fcmp ugt double %228, %214
%232 = fcmp ogt double %219, 3.500000e+00
%233 = select i1 %231, i1 %232, i1 false
br i1 %233, label %213, label %234
234: ; preds = %230, %209
%235 = phi double [ %204, %209 ], [ %228, %230 ]
%236 = fadd double %206, %235
%237 = fcmp olt double %236, %174
br i1 %237, label %261, label %238
238: ; preds = %234
%239 = fsub double %174, %235
br label %240
240: ; preds = %257, %238
%241 = phi double [ %156, %238 ], [ %248, %257 ]
%242 = phi double [ %163, %238 ], [ %259, %257 ]
%243 = phi double [ %164, %238 ], [ %258, %257 ]
%244 = phi double [ %162, %238 ], [ %254, %257 ]
%245 = phi double [ %173, %238 ], [ %255, %257 ]
%246 = fcmp ogt double %242, 5.000000e-01
br i1 %246, label %247, label %261
247: ; preds = %240
%248 = fadd double %241, 2.000000e+00
%249 = fmul double %242, 4.000000e+00
%250 = fmul double %249, %243
%251 = fadd double %248, -1.000000e+00
%252 = fmul double %248, %251
%253 = fdiv double %250, %252
%254 = fmul double %244, %253
%255 = fadd double %245, %254
%256 = fcmp ult double %255, %239
br i1 %256, label %257, label %261
257: ; preds = %247
%258 = fadd double %243, -1.000000e+00
%259 = fadd double %242, -1.000000e+00
%260 = fcmp ugt double %255, %245
br i1 %260, label %240, label %261
261: ; preds = %166, %213, %240, %257, %247, %46, %91, %123, %139, %120, %234, %177, %171, %144, %116, %57, %51, %24, %4
%262 = phi i64 [ 0, %4 ], [ 0, %24 ], [ 0, %51 ], [ 1, %57 ], [ 1, %116 ], [ 0, %144 ], [ 0, %171 ], [ 1, %177 ], [ 1, %234 ], [ 1, %120 ], [ 0, %123 ], [ 1, %139 ], [ 0, %91 ], [ 1, %46 ], [ 1, %240 ], [ 1, %257 ], [ 0, %247 ], [ 0, %213 ], [ 1, %166 ]
ret i64 %262
}