#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 int32_t;

/* Variables and functions */
double INFINITY;
double binom_1sided(int32_t succ, int32_t obs, double rate) {
  double cur_prob =
      0.00000000000000000000000010339757656912845935892608650874535669572651386260986328125;
  double left_prob = cur_prob;
  double right_prob = 0;
  double rate_mult_incr = rate / (1 - rate);
  double rate_mult_decr = (1 - rate) / rate;
  double cur_succ = succ;
  double cur_fail = obs - succ;
  double preaddp;
  if (obs * rate < succ) {
    while (cur_succ > 0.5) {
      cur_fail += 1;
      cur_prob *= rate_mult_decr * cur_succ / cur_fail;
      cur_succ -= 1;
      preaddp = left_prob;
      left_prob += cur_prob;
      if (left_prob <= preaddp) {
        break;
      }
      if (left_prob >= 1.0) {
        return 1;
      }
    }
    cur_succ = succ;
    cur_fail = obs - succ;
    cur_prob =
        0.00000000000000000000000010339757656912845935892608650874535669572651386260986328125;
    right_prob = left_prob;
    while (cur_fail > 0.5) {
      cur_succ += 1;
      cur_prob *= rate_mult_incr * cur_fail / cur_succ;
      cur_fail -= 1;
      preaddp = right_prob;
      right_prob += cur_prob;
      if (right_prob <= preaddp) {
        break;
      }
    }
    return left_prob / right_prob;
  } else {
    while (cur_fail > 0.5) {
      cur_succ += 1;
      cur_prob *= rate_mult_incr * cur_fail / cur_succ;
      cur_fail -= 1;
      preaddp = right_prob;
      right_prob += cur_prob;
      if (right_prob == INFINITY) {
        return 0;
      }
      if (right_prob <= preaddp) {
        break;
      }
    }
    cur_succ = succ;
    cur_fail = obs - succ;
    cur_prob =
        0.00000000000000000000000010339757656912845935892608650874535669572651386260986328125;
    while (cur_succ > 0.5) {
      cur_fail += 1;
      cur_prob *= rate_mult_decr * cur_succ / cur_fail;
      cur_succ -= 1;
      preaddp = left_prob;
      left_prob += cur_prob;
      if (left_prob <= preaddp) {
        break;
      }
    }
    return left_prob / (left_prob + right_prob);
  }
}


x86 assembly (clang, -O0):
<binom_1sided>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  0xeed(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xec1(%rip),%xmm1
subsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xeab(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1326 <binom_1sided+0x226>
jmp    119b <binom_1sided+0x9b>
movsd  -0x50(%rbp),%xmm0
movsd  0xe68(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1253 <binom_1sided+0x153>
movsd  0xe46(%rip),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xe16(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1225 <binom_1sided+0x125>
jmp    1253 <binom_1sided+0x153>
movsd  -0x30(%rbp),%xmm0
movsd  0xdce(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     124e <binom_1sided+0x14e>
movsd  0xdbc(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    14b0 <binom_1sided+0x3b0>
jmp    119b <binom_1sided+0x9b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xd94(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xd80(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1312 <binom_1sided+0x212>
movsd  0xd5e(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xd2e(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     130d <binom_1sided+0x20d>
jmp    1312 <binom_1sided+0x212>
jmp    1283 <binom_1sided+0x183>
movsd  -0x30(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    14b0 <binom_1sided+0x3b0>
jmp    132b <binom_1sided+0x22b>
movsd  -0x58(%rbp),%xmm0
movsd  0xcd8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13e3 <binom_1sided+0x2e3>
movsd  0xcb6(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xc86(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    0x2c40(%rip),%rax
ucomisd (%rax),%xmm0
jne    13c5 <binom_1sided+0x2c5>
jp     13c5 <binom_1sided+0x2c5>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    14b0 <binom_1sided+0x3b0>
movsd  -0x38(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     13de <binom_1sided+0x2de>
jmp    13e3 <binom_1sided+0x2e3>
jmp    132b <binom_1sided+0x22b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xc04(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xbfa(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1498 <binom_1sided+0x398>
movsd  0xbd8(%rip),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
divsd  -0x58(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xba8(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1493 <binom_1sided+0x393>
jmp    1498 <binom_1sided+0x398>
jmp    1409 <binom_1sided+0x309>
movsd  -0x30(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
addsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<binom_1sided>:
movsd  0xef7(%rip),%xmm11
movapd %xmm11,%xmm13
subsd  %xmm2,%xmm13
movapd %xmm2,%xmm12
divsd  %xmm13,%xmm12
divsd  %xmm2,%xmm13
movapd %xmm1,%xmm7
subsd  %xmm0,%xmm7
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    11a8 <binom_1sided+0xa8>
movsd  0xed4(%rip),%xmm2
movsd  0xec4(%rip),%xmm5
movsd  0xecb(%rip),%xmm8
movapd %xmm2,%xmm3
movapd %xmm0,%xmm4
movapd %xmm7,%xmm6
nopl   0x0(%rax)
ucomisd %xmm5,%xmm4
jbe    12b4 <binom_1sided+0x1b4>
addsd  %xmm11,%xmm6
movapd %xmm13,%xmm1
mulsd  %xmm4,%xmm1
divsd  %xmm6,%xmm1
mulsd  %xmm1,%xmm3
movapd %xmm2,%xmm1
addsd  %xmm3,%xmm1
ucomisd %xmm1,%xmm2
jae    12b0 <binom_1sided+0x1b0>
addsd  %xmm8,%xmm4
ucomisd %xmm11,%xmm1
movapd %xmm1,%xmm2
jb     1160 <binom_1sided+0x60>
movapd %xmm11,%xmm0
ret
xorpd  %xmm1,%xmm1
ucomisd 0xe54(%rip),%xmm7
jbe    123f <binom_1sided+0x13f>
mov    0x2e27(%rip),%rax
movsd  (%rax),%xmm10
movsd  0xe42(%rip),%xmm5
xorpd  %xmm2,%xmm2
movsd  0xe3d(%rip),%xmm8
movsd  0xe24(%rip),%xmm9
xorpd  %xmm6,%xmm6
movapd %xmm0,%xmm4
movapd %xmm7,%xmm3
xorpd  %xmm1,%xmm1
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movapd %xmm5,%xmm14
addsd  %xmm11,%xmm4
movapd %xmm12,%xmm5
mulsd  %xmm3,%xmm5
divsd  %xmm4,%xmm5
mulsd  %xmm14,%xmm5
addsd  %xmm8,%xmm3
addsd  %xmm5,%xmm1
ucomisd %xmm10,%xmm1
jne    122e <binom_1sided+0x12e>
jnp    12ab <binom_1sided+0x1ab>
ucomisd %xmm1,%xmm6
jae    123f <binom_1sided+0x13f>
ucomisd %xmm9,%xmm3
movapd %xmm1,%xmm6
ja     1200 <binom_1sided+0x100>
movsd  0xdc9(%rip),%xmm2
ucomisd 0xdb9(%rip),%xmm0
jbe    12a3 <binom_1sided+0x1a3>
movsd  0xdbe(%rip),%xmm8
movsd  0xda6(%rip),%xmm3
movapd %xmm2,%xmm5
cs nopw 0x0(%rax,%rax,1)
movapd %xmm5,%xmm6
movapd %xmm2,%xmm4
addsd  %xmm11,%xmm7
movapd %xmm13,%xmm5
mulsd  %xmm0,%xmm5
divsd  %xmm7,%xmm5
mulsd  %xmm6,%xmm5
addsd  %xmm8,%xmm0
addsd  %xmm5,%xmm2
ucomisd %xmm2,%xmm4
jae    12a3 <binom_1sided+0x1a3>
ucomisd %xmm3,%xmm0
ja     1270 <binom_1sided+0x170>
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
ret
movapd %xmm1,%xmm2
ucomisd 0xd4c(%rip),%xmm7
movapd %xmm2,%xmm4
jbe    1313 <binom_1sided+0x213>
movsd  0xd46(%rip),%xmm6
movsd  0xd2d(%rip),%xmm9
movapd %xmm2,%xmm4
nopw   0x0(%rax,%rax,1)
movapd %xmm6,%xmm1
movapd %xmm4,%xmm3
addsd  %xmm9,%xmm0
movapd %xmm12,%xmm6
mulsd  %xmm7,%xmm6
divsd  %xmm0,%xmm6
mulsd  %xmm1,%xmm6
addsd  %xmm8,%xmm7
addsd  %xmm6,%xmm4
ucomisd %xmm4,%xmm3
jae    1313 <binom_1sided+0x213>
ucomisd %xmm5,%xmm7
ja     12e0 <binom_1sided+0x1e0>
divsd  %xmm4,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
@INFINITY = global double 0.000000e+00
define double @binom_1sided(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double 0x3AC0000000000000, double* %8
%16 = load double, double* %8
store double %16, double* %9
store double 0.000000e+00, double* %10
%17 = load double, double* %7
%18 = load double, double* %7
%19 = fsub double 1.000000e+00, %18
%20 = fdiv double %17, %19
store double %20, double* %11
%21 = load double, double* %7
%22 = fsub double 1.000000e+00, %21
%23 = load double, double* %7
%24 = fdiv double %22, %23
store double %24, double* %12
%25 = load double, double* %5
store double %25, double* %13
%26 = load double, double* %6
%27 = load double, double* %5
%28 = fsub double %26, %27
store double %28, double* %14
%29 = load double, double* %6
%30 = load double, double* %7
%31 = fmul double %29, %30
%32 = load double, double* %5
%33 = fcmp olt double %31, %32
br i1 %33, label %34, label %97
34: ; preds = %3
br label %35
35: ; preds = %62, %34
%36 = load double, double* %13
%37 = fcmp ogt double %36, 5.000000e-01
br i1 %37, label %38, label %63
38: ; preds = %35
%39 = load double, double* %14
%40 = fadd double %39, 1.000000e+00
store double %40, double* %14
%41 = load double, double* %12
%42 = load double, double* %13
%43 = fmul double %41, %42
%44 = load double, double* %14
%45 = fdiv double %43, %44
%46 = load double, double* %8
%47 = fmul double %46, %45
store double %47, double* %8
%48 = load double, double* %13
%49 = fsub double %48, 1.000000e+00
store double %49, double* %13
%50 = load double, double* %9
store double %50, double* %15
%51 = load double, double* %8
%52 = load double, double* %9
%53 = fadd double %52, %51
store double %53, double* %9
%54 = load double, double* %9
%55 = load double, double* %15
%56 = fcmp ole double %54, %55
br i1 %56, label %57, label %58
57: ; preds = %38
br label %63
58: ; preds = %38
%59 = load double, double* %9
%60 = fcmp oge double %59, 1.000000e+00
br i1 %60, label %61, label %62
61: ; preds = %58
store double 1.000000e+00, double* %4
br label %162
62: ; preds = %58
br label %35
63: ; preds = %57, %35
%64 = load double, double* %5
store double %64, double* %13
%65 = load double, double* %6
%66 = load double, double* %5
%67 = fsub double %65, %66
store double %67, double* %14
store double 0x3AC0000000000000, double* %8
%68 = load double, double* %9
store double %68, double* %10
br label %69
69: ; preds = %92, %63
%70 = load double, double* %14
%71 = fcmp ogt double %70, 5.000000e-01
br i1 %71, label %72, label %93
72: ; preds = %69
%73 = load double, double* %13
%74 = fadd double %73, 1.000000e+00
store double %74, double* %13
%75 = load double, double* %11
%76 = load double, double* %14
%77 = fmul double %75, %76
%78 = load double, double* %13
%79 = fdiv double %77, %78
%80 = load double, double* %8
%81 = fmul double %80, %79
store double %81, double* %8
%82 = load double, double* %14
%83 = fsub double %82, 1.000000e+00
store double %83, double* %14
%84 = load double, double* %10
store double %84, double* %15
%85 = load double, double* %8
%86 = load double, double* %10
%87 = fadd double %86, %85
store double %87, double* %10
%88 = load double, double* %10
%89 = load double, double* %15
%90 = fcmp ole double %88, %89
br i1 %90, label %91, label %92
91: ; preds = %72
br label %93
92: ; preds = %72
br label %69
93: ; preds = %91, %69
%94 = load double, double* %9
%95 = load double, double* %10
%96 = fdiv double %94, %95
store double %96, double* %4
br label %162
97: ; preds = %3
br label %98
98: ; preds = %126, %97
%99 = load double, double* %14
%100 = fcmp ogt double %99, 5.000000e-01
br i1 %100, label %101, label %127
101: ; preds = %98
%102 = load double, double* %13
%103 = fadd double %102, 1.000000e+00
store double %103, double* %13
%104 = load double, double* %11
%105 = load double, double* %14
%106 = fmul double %104, %105
%107 = load double, double* %13
%108 = fdiv double %106, %107
%109 = load double, double* %8
%110 = fmul double %109, %108
store double %110, double* %8
%111 = load double, double* %14
%112 = fsub double %111, 1.000000e+00
store double %112, double* %14
%113 = load double, double* %10
store double %113, double* %15
%114 = load double, double* %8
%115 = load double, double* %10
%116 = fadd double %115, %114
store double %116, double* %10
%117 = load double, double* %10
%118 = load double, double* @INFINITY
%119 = fcmp oeq double %117, %118
br i1 %119, label %120, label %121
120: ; preds = %101
store double 0.000000e+00, double* %4
br label %162
121: ; preds = %101
%122 = load double, double* %10
%123 = load double, double* %15
%124 = fcmp ole double %122, %123
br i1 %124, label %125, label %126
125: ; preds = %121
br label %127
126: ; preds = %121
br label %98
127: ; preds = %125, %98
%128 = load double, double* %5
store double %128, double* %13
%129 = load double, double* %6
%130 = load double, double* %5
%131 = fsub double %129, %130
store double %131, double* %14
store double 0x3AC0000000000000, double* %8
br label %132
132: ; preds = %155, %127
%133 = load double, double* %13
%134 = fcmp ogt double %133, 5.000000e-01
br i1 %134, label %135, label %156
135: ; preds = %132
%136 = load double, double* %14
%137 = fadd double %136, 1.000000e+00
store double %137, double* %14
%138 = load double, double* %12
%139 = load double, double* %13
%140 = fmul double %138, %139
%141 = load double, double* %14
%142 = fdiv double %140, %141
%143 = load double, double* %8
%144 = fmul double %143, %142
store double %144, double* %8
%145 = load double, double* %13
%146 = fsub double %145, 1.000000e+00
store double %146, double* %13
%147 = load double, double* %9
store double %147, double* %15
%148 = load double, double* %8
%149 = load double, double* %9
%150 = fadd double %149, %148
store double %150, double* %9
%151 = load double, double* %9
%152 = load double, double* %15
%153 = fcmp ole double %151, %152
br i1 %153, label %154, label %155
154: ; preds = %135
br label %156
155: ; preds = %135
br label %132
156: ; preds = %154, %132
%157 = load double, double* %9
%158 = load double, double* %9
%159 = load double, double* %10
%160 = fadd double %158, %159
%161 = fdiv double %157, %160
store double %161, double* %4
br label %162
162: ; preds = %156, %120, %93, %61
%163 = load double, double* %4
ret double %163
}

LLVM IR (-O2):
@INFINITY = global double 0.000000e+00
define double @binom_1sided(double %0, double %1, double %2) {
%4 = fsub double 1.000000e+00, %2
%5 = fdiv double %2, %4
%6 = fdiv double %4, %2
%7 = fsub double %1, %0
%8 = fmul double %1, %2
%9 = fcmp olt double %8, %0
br i1 %9, label %10, label %46
10: ; preds = %3, %23
%11 = phi double [ %21, %23 ], [ 0x3AC0000000000000, %3 ]
%12 = phi double [ %20, %23 ], [ 0x3AC0000000000000, %3 ]
%13 = phi double [ %24, %23 ], [ %0, %3 ]
%14 = phi double [ %17, %23 ], [ %7, %3 ]
%15 = fcmp ogt double %13, 5.000000e-01
br i1 %15, label %16, label %26
16: ; preds = %10
%17 = fadd double %14, 1.000000e+00
%18 = fmul double %6, %13
%19 = fdiv double %18, %17
%20 = fmul double %12, %19
%21 = fadd double %11, %20
%22 = fcmp ugt double %21, %11
br i1 %22, label %23, label %26
23: ; preds = %16
%24 = fadd double %13, -1.000000e+00
%25 = fcmp ult double %21, 1.000000e+00
br i1 %25, label %10, label %87
26: ; preds = %16, %10
%27 = phi double [ %21, %16 ], [ %11, %10 ]
%28 = fcmp ogt double %7, 5.000000e-01
br i1 %28, label %29, label %43
29: ; preds = %26, %29
%30 = phi double [ %39, %29 ], [ %27, %26 ]
%31 = phi double [ %37, %29 ], [ 0x3AC0000000000000, %26 ]
%32 = phi double [ %34, %29 ], [ %0, %26 ]
%33 = phi double [ %38, %29 ], [ %7, %26 ]
%34 = fadd double %32, 1.000000e+00
%35 = fmul double %5, %33
%36 = fdiv double %35, %34
%37 = fmul double %31, %36
%38 = fadd double %33, -1.000000e+00
%39 = fadd double %30, %37
%40 = fcmp ugt double %39, %30
%41 = fcmp ogt double %38, 5.000000e-01
%42 = select i1 %40, i1 %41, i1 false
br i1 %42, label %29, label %43
43: ; preds = %29, %26
%44 = phi double [ %27, %26 ], [ %39, %29 ]
%45 = fdiv double %27, %44
br label %87
46: ; preds = %3
%47 = fcmp ogt double %7, 5.000000e-01
br i1 %47, label %48, label %66
48: ; preds = %46
%49 = load double, double* @INFINITY
br label %50
50: ; preds = %48, %62
%51 = phi double [ %60, %62 ], [ 0.000000e+00, %48 ]
%52 = phi double [ %58, %62 ], [ 0x3AC0000000000000, %48 ]
%53 = phi double [ %55, %62 ], [ %0, %48 ]
%54 = phi double [ %59, %62 ], [ %7, %48 ]
%55 = fadd double %53, 1.000000e+00
%56 = fmul double %5, %54
%57 = fdiv double %56, %55
%58 = fmul double %52, %57
%59 = fadd double %54, -1.000000e+00
%60 = fadd double %51, %58
%61 = fcmp oeq double %60, %49
br i1 %61, label %87, label %62
62: ; preds = %50
%63 = fcmp ugt double %60, %51
%64 = fcmp ogt double %59, 5.000000e-01
%65 = select i1 %63, i1 %64, i1 false
br i1 %65, label %50, label %66
66: ; preds = %62, %46
%67 = phi double [ 0.000000e+00, %46 ], [ %60, %62 ]
%68 = fcmp ogt double %0, 5.000000e-01
br i1 %68, label %69, label %83
69: ; preds = %66, %69
%70 = phi double [ %79, %69 ], [ 0x3AC0000000000000, %66 ]
%71 = phi double [ %77, %69 ], [ 0x3AC0000000000000, %66 ]
%72 = phi double [ %78, %69 ], [ %0, %66 ]
%73 = phi double [ %74, %69 ], [ %7, %66 ]
%74 = fadd double %73, 1.000000e+00
%75 = fmul double %6, %72
%76 = fdiv double %75, %74
%77 = fmul double %71, %76
%78 = fadd double %72, -1.000000e+00
%79 = fadd double %70, %77
%80 = fcmp ugt double %79, %70
%81 = fcmp ogt double %78, 5.000000e-01
%82 = select i1 %80, i1 %81, i1 false
br i1 %82, label %69, label %83
83: ; preds = %69, %66
%84 = phi double [ 0x3AC0000000000000, %66 ], [ %79, %69 ]
%85 = fadd double %67, %84
%86 = fdiv double %84, %85
br label %87
87: ; preds = %50, %23, %83, %43
%88 = phi double [ %45, %43 ], [ %86, %83 ], [ 1.000000e+00, %23 ], [ 0.000000e+00, %50 ]
ret double %88
}