#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
unsigned long __ecm_gcd(unsigned long, unsigned long);
int log(double);
int /*<<< orphan*/ printf(char *, unsigned long, unsigned long, unsigned long,
                          double);
double prob(double, double, double, double, int, double);
double pm1prob_rm(double B1, double B2, double N, double nr, int S,
                  unsigned long r, unsigned long m) {
  unsigned long cof;
  double smoothness = 1.2269688;
  unsigned long p;
  cof = m;
  for (p = 2UL; p < 100UL; p++)
    if (cof % p == 0UL) {
      unsigned long cof_r, k, i;
      smoothness -= (double)p / ((p - 1) * (p - 1)) * log((double)p);
      cof_r = __ecm_gcd(r - 1UL, m);
      for (k = 0UL; cof_r % p == 0UL; k++)
        cof_r /= p;
      smoothness += k * log((double)p);
      cof_r = m;
      for (i = 0UL; cof_r % p == 0UL; i++)
        cof_r /= p;
      if (i == k)
        smoothness += (1. / (p - 1.) * log((double)p));
      while (cof % p == 0UL)
        cof /= p;
      printf("pm1prob_rm: p = %lu, k = %lu, i = %lu, new smoothness = %f\n", p,
             i, k, smoothness);
    }
  return prob(B1, B2, N, nr, S, smoothness);
}


x86 assembly (clang, -O0):
<pm1prob_rm>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    %edi,-0x24(%rbp)
mov    %rsi,-0x30(%rbp)
mov    %rdx,-0x38(%rbp)
movsd  0xe8e(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
movq   $0x2,-0x50(%rbp)
cmpq   $0x64,-0x50(%rbp)
jae    1429 <pm1prob_rm+0x2e9>
mov    -0x40(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x50(%rbp)
cmp    $0x0,%rdx
jne    1413 <pm1prob_rm+0x2d3>
mov    -0x50(%rbp),%rax
movq   %rax,%xmm0
movaps 0xe58(%rip),%xmm3
punpckldq %xmm3,%xmm0
movapd 0xe5c(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm2
unpckhpd %xmm0,%xmm0
addsd  %xmm2,%xmm0
add    $0xffffffffffffffff,%rax
imul   %rax,%rax
movq   %rax,%xmm2
punpckldq %xmm3,%xmm2
subpd  %xmm1,%xmm2
movaps %xmm2,%xmm1
unpckhpd %xmm2,%xmm2
addsd  %xmm1,%xmm2
movaps %xmm0,%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,-0x70(%rbp)
call   1050 <log@plt>
movsd  -0x70(%rbp),%xmm0
cvtsi2sd %eax,%xmm2
movsd  -0x48(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x30(%rbp),%rdi
sub    $0x1,%rdi
mov    -0x38(%rbp),%rsi
call   1030 <__ecm_gcd@plt>
mov    %rax,-0x58(%rbp)
movq   $0x0,-0x60(%rbp)
mov    -0x58(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x50(%rbp)
cmp    $0x0,%rdx
jne    128b <pm1prob_rm+0x14b>
mov    -0x50(%rbp),%rcx
mov    -0x58(%rbp),%rax
xor    %edx,%edx
div    %rcx
mov    %rax,-0x58(%rbp)
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1253 <pm1prob_rm+0x113>
mov    -0x60(%rbp),%rax
mov    %rax,-0x78(%rbp)
movq   -0x50(%rbp),%xmm0
movaps 0xd71(%rip),%xmm1
movaps %xmm1,-0xa0(%rbp)
punpckldq %xmm1,%xmm0
movapd 0xd6e(%rip),%xmm1
movaps %xmm1,-0x90(%rbp)
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
call   1050 <log@plt>
movaps -0xa0(%rbp),%xmm2
movaps -0x90(%rbp),%xmm1
mov    %eax,%ecx
mov    -0x78(%rbp),%rax
movslq %ecx,%rcx
imul   %rcx,%rax
movq   %rax,%xmm0
punpckldq %xmm2,%xmm0
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x58(%rbp)
movq   $0x0,-0x68(%rbp)
mov    -0x58(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x50(%rbp)
cmp    $0x0,%rdx
jne    1352 <pm1prob_rm+0x212>
mov    -0x50(%rbp),%rcx
mov    -0x58(%rbp),%rax
xor    %edx,%edx
div    %rcx
mov    %rax,-0x58(%rbp)
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
jmp    131a <pm1prob_rm+0x1da>
mov    -0x68(%rbp),%rax
cmp    -0x60(%rbp),%rax
jne    13c5 <pm1prob_rm+0x285>
movaps 0xca9(%rip),%xmm1
movq   -0x50(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xca8(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xc79(%rip),%xmm1
movaps %xmm0,%xmm2
subsd  %xmm1,%xmm2
divsd  %xmm2,%xmm1
movsd  %xmm1,-0xa8(%rbp)
ff
call   1050 <log@plt>
movsd  -0xa8(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    13ca <pm1prob_rm+0x28a>
mov    -0x40(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x50(%rbp)
cmp    $0x0,%rdx
jne    13f6 <pm1prob_rm+0x2b6>
mov    -0x50(%rbp),%rcx
mov    -0x40(%rbp),%rax
xor    %edx,%edx
div    %rcx
mov    %rax,-0x40(%rbp)
jmp    13ca <pm1prob_rm+0x28a>
mov    -0x50(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x60(%rbp),%rcx
movsd  -0x48(%rbp),%xmm0
lea    0xc22(%rip),%rdi
call   1040 <printf@plt>
jmp    1418 <pm1prob_rm+0x2d8>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    1187 <pm1prob_rm+0x47>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
mov    -0x24(%rbp),%edi
movsd  -0x48(%rbp),%xmm4
call   1060 <prob@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm1prob_rm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rdx,%r13
mov    %edi,0xc(%rsp)
movsd  %xmm3,0x48(%rsp)
movsd  %xmm2,0x40(%rsp)
movsd  %xmm1,0x38(%rsp)
movsd  %xmm0,0x30(%rsp)
add    $0xffffffffffffffff,%rsi
mov    %rsi,0x50(%rsp)
movsd  0xe82(%rip),%xmm0
movapd %xmm0,0x20(%rsp)
mov    $0x2,%ebp
mov    %rdx,%rbx
jmp    11bd <pm1prob_rm+0x7d>
xchg   %ax,%ax
lea    0xea9(%rip),%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
movapd %xmm1,0x20(%rsp)
movapd %xmm1,%xmm0
call   1040 <printf@plt>
add    $0x1,%rbp
cmp    $0x64,%rbp
je     1464 <pm1prob_rm+0x324>
mov    %rbx,%rax
or     %rbp,%rax
shr    $0x20,%rax
je     11e0 <pm1prob_rm+0xa0>
mov    %rbx,%rax
xor    %edx,%edx
div    %rbp
test   %rdx,%rdx
jne    11af <pm1prob_rm+0x6f>
jmp    11eb <pm1prob_rm+0xab>
nopl   0x0(%rax,%rax,1)
mov    %ebx,%eax
xor    %edx,%edx
div    %ebp
test   %rdx,%rdx
jne    11af <pm1prob_rm+0x6f>
movq   %rbp,%xmm1
punpckldq 0xe28(%rip),%xmm1
subpd  0xe30(%rip),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
movapd %xmm0,0x10(%rsp)
call   1050 <log@plt>
mov    %eax,%r15d
mov    0x50(%rsp),%rdi
mov    %r13,%rsi
call   1030 <__ecm_gcd@plt>
mov    %rax,%rcx
or     %rbp,%rax
shr    $0x20,%rax
je     123d <pm1prob_rm+0xfd>
mov    %rcx,%rax
xor    %edx,%edx
div    %rbp
jmp    1243 <pm1prob_rm+0x103>
mov    %ecx,%eax
xor    %edx,%edx
div    %ebp
movapd 0x10(%rsp),%xmm0
mov    $0x0,%r14d
test   %rdx,%rdx
je     1271 <pm1prob_rm+0x131>
jmp    12b3 <pm1prob_rm+0x173>
cs nopw 0x0(%rax,%rax,1)
mov    %rcx,%rax
xor    %edx,%edx
div    %rbp
add    $0x1,%r14
test   %rdx,%rdx
jne    12b3 <pm1prob_rm+0x173>
mov    %rcx,%rax
or     %rbp,%rax
shr    $0x20,%rax
je     1290 <pm1prob_rm+0x150>
mov    %rcx,%rax
xor    %edx,%edx
div    %rbp
mov    %rax,%rcx
jmp    1298 <pm1prob_rm+0x158>
nopw   0x0(%rax,%rax,1)
mov    %ecx,%eax
xor    %edx,%edx
div    %ebp
mov    %eax,%ecx
mov    %rcx,%rax
or     %rbp,%rax
shr    $0x20,%rax
jne    1260 <pm1prob_rm+0x120>
mov    %ecx,%eax
xor    %edx,%edx
div    %ebp
add    $0x1,%r14
test   %rdx,%rdx
je     1271 <pm1prob_rm+0x131>
lea    -0x1(%rbp),%r12
call   1050 <log@plt>
cltq
imul   %r14,%rax
movq   %rax,%xmm4
punpckldq 0xd51(%rip),%xmm4
subpd  0xd59(%rip),%xmm4
mov    %r13,%rax
or     %rbp,%rax
shr    $0x20,%rax
je     12ed <pm1prob_rm+0x1ad>
mov    %r13,%rax
xor    %edx,%edx
div    %rbp
jmp    12f4 <pm1prob_rm+0x1b4>
mov    %r13d,%eax
xor    %edx,%edx
div    %ebp
movapd 0x10(%rsp),%xmm0
mov    %r15d,%esi
imul   %r12,%r12
mov    $0x0,%r15d
mov    %r13,%rcx
test   %rdx,%rdx
je     1331 <pm1prob_rm+0x1f1>
jmp    1373 <pm1prob_rm+0x233>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rcx,%rax
xor    %edx,%edx
div    %rbp
add    $0x1,%r15
test   %rdx,%rdx
jne    1373 <pm1prob_rm+0x233>
mov    %rcx,%rax
or     %rbp,%rax
shr    $0x20,%rax
je     1350 <pm1prob_rm+0x210>
mov    %rcx,%rax
xor    %edx,%edx
div    %rbp
mov    %rax,%rcx
jmp    1358 <pm1prob_rm+0x218>
nopw   0x0(%rax,%rax,1)
mov    %ecx,%eax
xor    %edx,%edx
div    %ebp
mov    %eax,%ecx
mov    %rcx,%rax
or     %rbp,%rax
shr    $0x20,%rax
jne    1320 <pm1prob_rm+0x1e0>
mov    %ecx,%eax
xor    %edx,%edx
div    %ebp
add    $0x1,%r15
test   %rdx,%rdx
je     1331 <pm1prob_rm+0x1f1>
movq   %r12,%xmm1
punpckldq 0xca0(%rip),%xmm1
subpd  0xca8(%rip),%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
cvtsi2sd %esi,%xmm3
addsd  %xmm1,%xmm2
movapd %xmm0,%xmm1
divsd  %xmm2,%xmm1
mulsd  %xmm3,%xmm1
movapd 0x20(%rsp),%xmm2
subsd  %xmm1,%xmm2
movapd %xmm4,%xmm1
unpckhpd %xmm4,%xmm1
addsd  %xmm4,%xmm1
addsd  %xmm2,%xmm1
cmp    %r14,%r15
jne    1421 <pm1prob_rm+0x2e1>
movapd %xmm0,%xmm3
addsd  0xc39(%rip),%xmm3
movsd  0xc39(%rip),%xmm2
divsd  %xmm3,%xmm2
movsd  %xmm2,0x10(%rsp)
movapd %xmm1,0x20(%rsp)
call   1050 <log@plt>
movapd 0x20(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  %xmm0,%xmm1
jmp    1421 <pm1prob_rm+0x2e1>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rax
xor    %edx,%edx
div    %rbp
test   %rdx,%rdx
jne    1190 <pm1prob_rm+0x50>
mov    %rbx,%rax
or     %rbp,%rax
shr    $0x20,%rax
je     1440 <pm1prob_rm+0x300>
mov    %rbx,%rax
xor    %edx,%edx
div    %rbp
mov    %rax,%rbx
jmp    1448 <pm1prob_rm+0x308>
nopw   0x0(%rax,%rax,1)
mov    %ebx,%eax
xor    %edx,%edx
div    %ebp
mov    %eax,%ebx
mov    %rbx,%rax
or     %rbp,%rax
shr    $0x20,%rax
jne    1410 <pm1prob_rm+0x2d0>
mov    %ebx,%eax
xor    %edx,%edx
div    %ebp
test   %rdx,%rdx
je     1421 <pm1prob_rm+0x2e1>
jmp    1190 <pm1prob_rm+0x50>
movsd  0x30(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
movsd  0x40(%rsp),%xmm2
movsd  0x48(%rsp),%xmm3
mov    0xc(%rsp),%edi
movaps 0x20(%rsp),%xmm4
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <prob@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"pm1prob_rm: p = %lu, k = %lu, i = %lu, new smoothness = %f\0A\00"
define double @pm1prob_rm(double %0, double %1, double %2, double %3, i32 %4, i64 %5, i64 %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca i32
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca double
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store i32 %4, i32* %12
store i64 %5, i64* %13
store i64 %6, i64* %14
store double 0x3FF3A1AA095365D9, double* %16
%21 = load i64, i64* %14
store i64 %21, i64* %15
store i64 2, i64* %17
br label %22
22: ; preds = %118, %7
%23 = load i64, i64* %17
%24 = icmp ult i64 %23, 100
br i1 %24, label %25, label %121
25: ; preds = %22
%26 = load i64, i64* %15
%27 = load i64, i64* %17
%28 = urem i64 %26, %27
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %117
30: ; preds = %25
%31 = load i64, i64* %17
%32 = uitofp i64 %31 to double
%33 = load i64, i64* %17
%34 = sub i64 %33, 1
%35 = load i64, i64* %17
%36 = sub i64 %35, 1
%37 = mul i64 %34, %36
%38 = uitofp i64 %37 to double
%39 = fdiv double %32, %38
%40 = load i64, i64* %17
%41 = uitofp i64 %40 to double
%42 = call i32 @log(double %41)
%43 = sitofp i32 %42 to double
%44 = load double, double* %16
%45 = fneg double %39
%46 = call double @llvm.fmuladd.f64(double %45, double %43, double %44)
store double %46, double* %16
%47 = load i64, i64* %13
%48 = sub i64 %47, 1
%49 = load i64, i64* %14
%50 = call i64 @__ecm_gcd(i64 %48, i64 %49)
store i64 %50, i64* %18
store i64 0, i64* %19
br label %51
51: ; preds = %60, %30
%52 = load i64, i64* %18
%53 = load i64, i64* %17
%54 = urem i64 %52, %53
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %63
56: ; preds = %51
%57 = load i64, i64* %17
%58 = load i64, i64* %18
%59 = udiv i64 %58, %57
store i64 %59, i64* %18
br label %60
60: ; preds = %56
%61 = load i64, i64* %19
%62 = add i64 %61, 1
store i64 %62, i64* %19
br label %51
63: ; preds = %51
%64 = load i64, i64* %19
%65 = load i64, i64* %17
%66 = uitofp i64 %65 to double
%67 = call i32 @log(double %66)
%68 = sext i32 %67 to i64
%69 = mul i64 %64, %68
%70 = uitofp i64 %69 to double
%71 = load double, double* %16
%72 = fadd double %71, %70
store double %72, double* %16
%73 = load i64, i64* %14
store i64 %73, i64* %18
store i64 0, i64* %20
br label %74
74: ; preds = %83, %63
%75 = load i64, i64* %18
%76 = load i64, i64* %17
%77 = urem i64 %75, %76
%78 = icmp eq i64 %77, 0
br i1 %78, label %79, label %86
79: ; preds = %74
%80 = load i64, i64* %17
%81 = load i64, i64* %18
%82 = udiv i64 %81, %80
store i64 %82, i64* %18
br label %83
83: ; preds = %79
%84 = load i64, i64* %20
%85 = add i64 %84, 1
store i64 %85, i64* %20
br label %74
86: ; preds = %74
%87 = load i64, i64* %20
%88 = load i64, i64* %19
%89 = icmp eq i64 %87, %88
br i1 %89, label %90, label %101
90: ; preds = %86
%91 = load i64, i64* %17
%92 = uitofp i64 %91 to double
%93 = fsub double %92, 1.000000e+00
%94 = fdiv double 1.000000e+00, %93
%95 = load i64, i64* %17
%96 = uitofp i64 %95 to double
%97 = call i32 @log(double %96)
%98 = sitofp i32 %97 to double
%99 = load double, double* %16
%100 = call double @llvm.fmuladd.f64(double %94, double %98, double %99)
store double %100, double* %16
br label %101
101: ; preds = %90, %86
br label %102
102: ; preds = %107, %101
%103 = load i64, i64* %15
%104 = load i64, i64* %17
%105 = urem i64 %103, %104
%106 = icmp eq i64 %105, 0
br i1 %106, label %107, label %111
107: ; preds = %102
%108 = load i64, i64* %17
%109 = load i64, i64* %15
%110 = udiv i64 %109, %108
store i64 %110, i64* %15
br label %102
111: ; preds = %102
%112 = load i64, i64* %17
%113 = load i64, i64* %20
%114 = load i64, i64* %19
%115 = load double, double* %16
%116 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i64 %112, i64 %113, i64 %114, double %115)
br label %117
117: ; preds = %111, %25
br label %118
118: ; preds = %117
%119 = load i64, i64* %17
%120 = add i64 %119, 1
store i64 %120, i64* %17
br label %22
121: ; preds = %22
%122 = load double, double* %8
%123 = load double, double* %9
%124 = load double, double* %10
%125 = load double, double* %11
%126 = load i32, i32* %12
%127 = load double, double* %16
%128 = call double @prob(double %122, double %123, double %124, double %125, i32 %126, double %127)
ret double %128
}

LLVM IR (-O2):
@.str = [60 x i8] c"pm1prob_rm: p = %lu, k = %lu, i = %lu, new smoothness = %f\0A\00"
define double @pm1prob_rm(double %0, double %1, double %2, double %3, i32 %4, i64 %5, i64 %6) {
%8 = add i64 %5, -1
br label %9
9: ; preds = %7, %69
%10 = phi i64 [ 2, %7 ], [ %72, %69 ]
%11 = phi double [ 0x3FF3A1AA095365D9, %7 ], [ %71, %69 ]
%12 = phi i64 [ %6, %7 ], [ %70, %69 ]
%13 = urem i64 %12, %10
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %69
15: ; preds = %9
%16 = uitofp i64 %10 to double
%17 = add nsw i64 %10, -1
%18 = mul nsw i64 %17, %17
%19 = uitofp i64 %18 to double
%20 = tail call i32 @log(double %16)
%21 = sitofp i32 %20 to double
%22 = fneg double %16
%23 = fdiv double %22, %19
%24 = tail call double @llvm.fmuladd.f64(double %23, double %21, double %11)
%25 = tail call i64 @__ecm_gcd(i64 %8, i64 %6)
%26 = urem i64 %25, %10
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %35
28: ; preds = %15, %28
%29 = phi i64 [ %32, %28 ], [ 0, %15 ]
%30 = phi i64 [ %31, %28 ], [ %25, %15 ]
%31 = udiv i64 %30, %10
%32 = add i64 %29, 1
%33 = urem i64 %31, %10
%34 = icmp eq i64 %33, 0
br i1 %34, label %28, label %35
35: ; preds = %28, %15
%36 = phi i64 [ 0, %15 ], [ %32, %28 ]
%37 = tail call i32 @log(double %16)
%38 = sext i32 %37 to i64
%39 = mul i64 %36, %38
%40 = uitofp i64 %39 to double
%41 = fadd double %24, %40
%42 = urem i64 %6, %10
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %51
44: ; preds = %35, %44
%45 = phi i64 [ %48, %44 ], [ 0, %35 ]
%46 = phi i64 [ %47, %44 ], [ %6, %35 ]
%47 = udiv i64 %46, %10
%48 = add i64 %45, 1
%49 = urem i64 %47, %10
%50 = icmp eq i64 %49, 0
br i1 %50, label %44, label %51
51: ; preds = %44, %35
%52 = phi i64 [ 0, %35 ], [ %48, %44 ]
%53 = icmp eq i64 %52, %36
br i1 %53, label %54, label %60
54: ; preds = %51
%55 = fadd double %16, -1.000000e+00
%56 = fdiv double 1.000000e+00, %55
%57 = tail call i32 @log(double %16)
%58 = sitofp i32 %57 to double
%59 = tail call double @llvm.fmuladd.f64(double %56, double %58, double %41)
br label %60
60: ; preds = %51, %54
%61 = phi double [ %59, %54 ], [ %41, %51 ]
br label %62
62: ; preds = %60, %62
%63 = phi i64 [ %64, %62 ], [ %12, %60 ]
%64 = udiv i64 %63, %10
%65 = urem i64 %64, %10
%66 = icmp eq i64 %65, 0
br i1 %66, label %62, label %67
67: ; preds = %62
%68 = tail call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i64 %10, i64 %52, i64 %36, double %61)
br label %69
69: ; preds = %9, %67
%70 = phi i64 [ %64, %67 ], [ %12, %9 ]
%71 = phi double [ %61, %67 ], [ %11, %9 ]
%72 = add nuw nsw i64 %10, 1
%73 = icmp eq i64 %72, 100
br i1 %73, label %74, label %9
74: ; preds = %69
%75 = tail call double @prob(double %0, double %1, double %2, double %3, i32 %4, double %71)
ret double %75
}