#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 */
int /*<<< orphan*/ assert(int);
double cnd(int);
double exp(double);
double log(double);
double sqrt(int);
double TimeSwitchOption(int fCall, double S, double X, double a, double T,
                        int m, double dt, double r, double b, double v) {
  int i, Z, n;
  double logSX, vv, erT, sum;
  assert(((S) == (S)) && (S) >= 0.000001 && (S) <= 1000000000000.0);
  assert(((X) == (X)) && (X) >= 0.000001 && (X) <= 1000000000000.0);
  assert(((T) == (T)) && (T) >= (1.0 / (253.0 * 24.0)) && (T) <= (20.0));
  assert(((r) == (r)) && (r) >= 0.0 && (r) <= 1000.0);
  assert(((b) == (b)) && (b) >= -1000.0 && (b) <= 1000.0);
  assert(((v) == (v)) && (v) >= 0.0000001 && v <= 100.99999);
  if (fCall)
    Z = 1;
  else
    Z = -1;
  {
    double tmp = T / dt;
    n = (int)tmp;
  }
  logSX = log(S / X);
  vv = v * v;
  erT = exp(-r * T);
  sum = 0;
  for (i = 1; i <= n; i++) {
    double d = (logSX + (b - vv / 2.0) * i * dt) / (v * sqrt(i * dt));
    sum += cnd(Z * d) * dt;
  }
  return (a * erT * sum) + (dt * a * erT * m);
}


x86 assembly (clang, -O0):
<TimeSwitchOption>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
mov    %esi,-0x2c(%rbp)
movsd  %xmm4,-0x38(%rbp)
movsd  %xmm5,-0x40(%rbp)
movsd  %xmm6,-0x48(%rbp)
movsd  %xmm7,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x91(%rbp)
jne    11dc <TimeSwitchOption+0x8c>
jp     11dc <TimeSwitchOption+0x8c>
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe4a(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x91(%rbp)
jb     11dc <TimeSwitchOption+0x8c>
movsd  0xe3a(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
mov    %al,-0x91(%rbp)
mov    -0x91(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x18(%rbp),%xmm0
mov    %al,-0x92(%rbp)
jne    123f <TimeSwitchOption+0xef>
jp     123f <TimeSwitchOption+0xef>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
movsd  0xde7(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x92(%rbp)
jb     123f <TimeSwitchOption+0xef>
movsd  0xdd7(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
setae  %al
mov    %al,-0x92(%rbp)
mov    -0x92(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x28(%rbp),%xmm0
mov    %al,-0x93(%rbp)
jne    12a2 <TimeSwitchOption+0x152>
jp     12a2 <TimeSwitchOption+0x152>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
movsd  0xd94(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x93(%rbp)
jb     12a2 <TimeSwitchOption+0x152>
movsd  0xd84(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
setae  %al
mov    %al,-0x93(%rbp)
mov    -0x93(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x40(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x40(%rbp),%xmm0
mov    %al,-0x94(%rbp)
jne    1300 <TimeSwitchOption+0x1b0>
jp     1300 <TimeSwitchOption+0x1b0>
movsd  -0x40(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x94(%rbp)
jb     1300 <TimeSwitchOption+0x1b0>
movsd  0xd2e(%rip),%xmm0
ucomisd -0x40(%rbp),%xmm0
setae  %al
mov    %al,-0x94(%rbp)
mov    -0x94(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x48(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x48(%rbp),%xmm0
mov    %al,-0x95(%rbp)
jne    1363 <TimeSwitchOption+0x213>
jp     1363 <TimeSwitchOption+0x213>
movsd  -0x48(%rbp),%xmm0
xor    %eax,%eax
movsd  0xceb(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x95(%rbp)
jb     1363 <TimeSwitchOption+0x213>
movsd  0xccb(%rip),%xmm0
ucomisd -0x48(%rbp),%xmm0
setae  %al
mov    %al,-0x95(%rbp)
mov    -0x95(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x50(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x50(%rbp),%xmm0
mov    %al,-0x96(%rbp)
jne    13c6 <TimeSwitchOption+0x276>
jp     13c6 <TimeSwitchOption+0x276>
movsd  -0x50(%rbp),%xmm0
xor    %eax,%eax
movsd  0xc90(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x96(%rbp)
jb     13c6 <TimeSwitchOption+0x276>
movsd  0xc80(%rip),%xmm0
ucomisd -0x50(%rbp),%xmm0
setae  %al
mov    %al,-0x96(%rbp)
mov    -0x96(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x4(%rbp)
je     13ec <TimeSwitchOption+0x29c>
movl   $0x1,-0x58(%rbp)
jmp    13f3 <TimeSwitchOption+0x2a3>
movl   $0xffffffff,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
cvttsd2si -0x88(%rbp),%eax
ff
mov    %eax,-0x5c(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1050 <log@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x1,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jg     1534 <TimeSwitchOption+0x3e4>
movsd  -0x68(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  0xbb0(%rip),%xmm3
divsd  %xmm3,%xmm2
subsd  %xmm2,%xmm0
cvtsi2sdl -0x54(%rbp),%xmm2
mulsd  %xmm2,%xmm0
movsd  -0x38(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
cvtsi2sdl -0x54(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sqrt@plt>
movsd  -0xa8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
cvtsi2sdl -0x58(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1060 <cnd@plt>
movsd  -0x38(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    146d <TimeSwitchOption+0x31d>
movsd  -0x20(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
cvtsi2sdl -0x2c(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimeSwitchOption>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x58,%rsp
movsd  %xmm0,0x20(%rsp)
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xe91(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xe8b(%rip),%xmm8
ucomisd %xmm0,%xmm8
mov    %esi,%r14d
movsd  %xmm7,0x28(%rsp)
movsd  %xmm6,0x10(%rsp)
movaps %xmm5,0x30(%rsp)
movsd  %xmm4,0x18(%rsp)
movsd  %xmm3,0x8(%rsp)
movsd  %xmm2,0x50(%rsp)
movsd  %xmm1,0x40(%rsp)
mov    %edi,%r15d
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  0x40(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xe2d(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xe28(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  0x8(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xe0a(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xe05(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1030 <assert@plt>
xorpd  %xmm0,%xmm0
movapd 0x30(%rsp),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
movsd  0xde3(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
movsd  0x10(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xdc5(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xdb0(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  0x28(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xd9a(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xd95(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  0x8(%rsp),%xmm0
divsd  0x18(%rsp),%xmm0
cvttsd2si %xmm0,%ebx
movsd  0x20(%rsp),%xmm0
divsd  0x40(%rsp),%xmm0
call   1050 <log@plt>
movsd  %xmm0,0x20(%rsp)
movapd 0x30(%rsp),%xmm0
xorpd  0xd67(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <exp@plt>
xorpd  %xmm3,%xmm3
movsd  0x18(%rsp),%xmm2
movsd  %xmm0,0x30(%rsp)
test   %ebx,%ebx
jle    13c7 <TimeSwitchOption+0x277>
movsd  0x28(%rsp),%xmm0
mulsd  %xmm0,%xmm0
mulsd  0xd22(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
neg    %ebx
xorpd  %xmm3,%xmm3
mov    $0x1,%ebp
jmp    136f <TimeSwitchOption+0x21f>
nopl   0x0(%rax,%rax,1)
cvttsd2si %xmm0,%edi
call   1060 <cnd@plt>
movsd  0x18(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0x8(%rsp),%xmm3
addsd  %xmm0,%xmm3
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
je     13c7 <TimeSwitchOption+0x277>
movsd  %xmm3,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movapd %xmm0,0x40(%rsp)
mulsd  %xmm2,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sqrt@plt>
movapd 0x40(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm1
addsd  0x20(%rsp),%xmm1
mulsd  0x28(%rsp),%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
test   %r15d,%r15d
jne    1340 <TimeSwitchOption+0x1f0>
xorpd  0xc8e(%rip),%xmm0
jmp    1340 <TimeSwitchOption+0x1f0>
movsd  0x30(%rsp),%xmm4
movapd %xmm4,%xmm1
movsd  0x50(%rsp),%xmm0
mulsd  %xmm0,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm0,%xmm2
mulsd  %xmm4,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x58,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double @TimeSwitchOption(i32 %0, double %1, double %2, double %3, double %4, i32 %5, double %6, double %7, double %8, double %9) {
%11 = alloca i32
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca i32
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
store i32 %0, i32* %11
store double %1, double* %12
store double %2, double* %13
store double %3, double* %14
store double %4, double* %15
store i32 %5, i32* %16
store double %6, double* %17
store double %7, double* %18
store double %8, double* %19
store double %9, double* %20
%30 = load double, double* %12
%31 = load double, double* %12
%32 = fcmp oeq double %30, %31
br i1 %32, label %33, label %39
33: ; preds = %10
%34 = load double, double* %12
%35 = fcmp oge double %34, 0x3EB0C6F7A0B5ED8D
br i1 %35, label %36, label %39
36: ; preds = %33
%37 = load double, double* %12
%38 = fcmp ole double %37, 1.000000e+12
br label %39
39: ; preds = %36, %33, %10
%40 = phi i1 [ false, %33 ], [ false, %10 ], [ %38, %36 ]
%41 = zext i1 %40 to i32
%42 = call i32 @assert(i32 %41)
%43 = load double, double* %13
%44 = load double, double* %13
%45 = fcmp oeq double %43, %44
br i1 %45, label %46, label %52
46: ; preds = %39
%47 = load double, double* %13
%48 = fcmp oge double %47, 0x3EB0C6F7A0B5ED8D
br i1 %48, label %49, label %52
49: ; preds = %46
%50 = load double, double* %13
%51 = fcmp ole double %50, 1.000000e+12
br label %52
52: ; preds = %49, %46, %39
%53 = phi i1 [ false, %46 ], [ false, %39 ], [ %51, %49 ]
%54 = zext i1 %53 to i32
%55 = call i32 @assert(i32 %54)
%56 = load double, double* %15
%57 = load double, double* %15
%58 = fcmp oeq double %56, %57
br i1 %58, label %59, label %65
59: ; preds = %52
%60 = load double, double* %15
%61 = fcmp oge double %60, 0x3F2596179C29D2CE
br i1 %61, label %62, label %65
62: ; preds = %59
%63 = load double, double* %15
%64 = fcmp ole double %63, 2.000000e+01
br label %65
65: ; preds = %62, %59, %52
%66 = phi i1 [ false, %59 ], [ false, %52 ], [ %64, %62 ]
%67 = zext i1 %66 to i32
%68 = call i32 @assert(i32 %67)
%69 = load double, double* %18
%70 = load double, double* %18
%71 = fcmp oeq double %69, %70
br i1 %71, label %72, label %78
72: ; preds = %65
%73 = load double, double* %18
%74 = fcmp oge double %73, 0.000000e+00
br i1 %74, label %75, label %78
75: ; preds = %72
%76 = load double, double* %18
%77 = fcmp ole double %76, 1.000000e+03
br label %78
78: ; preds = %75, %72, %65
%79 = phi i1 [ false, %72 ], [ false, %65 ], [ %77, %75 ]
%80 = zext i1 %79 to i32
%81 = call i32 @assert(i32 %80)
%82 = load double, double* %19
%83 = load double, double* %19
%84 = fcmp oeq double %82, %83
br i1 %84, label %85, label %91
85: ; preds = %78
%86 = load double, double* %19
%87 = fcmp oge double %86, -1.000000e+03
br i1 %87, label %88, label %91
88: ; preds = %85
%89 = load double, double* %19
%90 = fcmp ole double %89, 1.000000e+03
br label %91
91: ; preds = %88, %85, %78
%92 = phi i1 [ false, %85 ], [ false, %78 ], [ %90, %88 ]
%93 = zext i1 %92 to i32
%94 = call i32 @assert(i32 %93)
%95 = load double, double* %20
%96 = load double, double* %20
%97 = fcmp oeq double %95, %96
br i1 %97, label %98, label %104
98: ; preds = %91
%99 = load double, double* %20
%100 = fcmp oge double %99, 0x3E7AD7F29ABCAF48
br i1 %100, label %101, label %104
101: ; preds = %98
%102 = load double, double* %20
%103 = fcmp ole double %102, 0x40593FFFD60E94EE
br label %104
104: ; preds = %101, %98, %91
%105 = phi i1 [ false, %98 ], [ false, %91 ], [ %103, %101 ]
%106 = zext i1 %105 to i32
%107 = call i32 @assert(i32 %106)
%108 = load i32, i32* %11
%109 = icmp ne i32 %108, 0
br i1 %109, label %110, label %111
110: ; preds = %104
store i32 1, i32* %22
br label %112
111: ; preds = %104
store i32 -1, i32* %22
br label %112
112: ; preds = %111, %110
%113 = load double, double* %15
%114 = load double, double* %17
%115 = fdiv double %113, %114
store double %115, double* %28
%116 = load double, double* %28
%117 = fptosi double %116 to i32
store i32 %117, i32* %23
%118 = load double, double* %12
%119 = load double, double* %13
%120 = fdiv double %118, %119
%121 = call double @log(double %120)
store double %121, double* %24
%122 = load double, double* %20
%123 = load double, double* %20
%124 = fmul double %122, %123
store double %124, double* %25
%125 = load double, double* %18
%126 = fneg double %125
%127 = load double, double* %15
%128 = fmul double %126, %127
%129 = call double @exp(double %128)
store double %129, double* %26
store double 0.000000e+00, double* %27
store i32 1, i32* %21
br label %130
130: ; preds = %163, %112
%131 = load i32, i32* %21
%132 = load i32, i32* %23
%133 = icmp sle i32 %131, %132
br i1 %133, label %134, label %166
134: ; preds = %130
%135 = load double, double* %24
%136 = load double, double* %19
%137 = load double, double* %25
%138 = fdiv double %137, 2.000000e+00
%139 = fsub double %136, %138
%140 = load i32, i32* %21
%141 = sitofp i32 %140 to double
%142 = fmul double %139, %141
%143 = load double, double* %17
%144 = call double @llvm.fmuladd.f64(double %142, double %143, double %135)
%145 = load double, double* %20
%146 = load i32, i32* %21
%147 = sitofp i32 %146 to double
%148 = load double, double* %17
%149 = fmul double %147, %148
%150 = fptosi double %149 to i32
%151 = call double @sqrt(i32 %150)
%152 = fmul double %145, %151
%153 = fdiv double %144, %152
store double %153, double* %29
%154 = load i32, i32* %22
%155 = sitofp i32 %154 to double
%156 = load double, double* %29
%157 = fmul double %155, %156
%158 = fptosi double %157 to i32
%159 = call double @cnd(i32 %158)
%160 = load double, double* %17
%161 = load double, double* %27
%162 = call double @llvm.fmuladd.f64(double %159, double %160, double %161)
store double %162, double* %27
br label %163
163: ; preds = %134
%164 = load i32, i32* %21
%165 = add nsw i32 %164, 1
store i32 %165, i32* %21
br label %130
166: ; preds = %130
%167 = load double, double* %14
%168 = load double, double* %26
%169 = fmul double %167, %168
%170 = load double, double* %27
%171 = load double, double* %17
%172 = load double, double* %14
%173 = fmul double %171, %172
%174 = load double, double* %26
%175 = fmul double %173, %174
%176 = load i32, i32* %16
%177 = sitofp i32 %176 to double
%178 = fmul double %175, %177
%179 = call double @llvm.fmuladd.f64(double %169, double %170, double %178)
ret double %179
}

LLVM IR (-O2):
define double @TimeSwitchOption(i32 %0, double %1, double %2, double %3, double %4, i32 %5, double %6, double %7, double %8, double %9) {
%11 = fcmp ord double %1, 0.000000e+00
%12 = fcmp oge double %1, 0x3EB0C6F7A0B5ED8D
%13 = and i1 %11, %12
%14 = fcmp ole double %1, 1.000000e+12
%15 = and i1 %14, %13
%16 = zext i1 %15 to i32
%17 = tail call i32 @assert(i32 %16)
%18 = fcmp ord double %2, 0.000000e+00
%19 = fcmp oge double %2, 0x3EB0C6F7A0B5ED8D
%20 = and i1 %18, %19
%21 = fcmp ole double %2, 1.000000e+12
%22 = and i1 %21, %20
%23 = zext i1 %22 to i32
%24 = tail call i32 @assert(i32 %23)
%25 = fcmp ord double %4, 0.000000e+00
%26 = fcmp oge double %4, 0x3F2596179C29D2CE
%27 = and i1 %25, %26
%28 = fcmp ole double %4, 2.000000e+01
%29 = and i1 %28, %27
%30 = zext i1 %29 to i32
%31 = tail call i32 @assert(i32 %30)
%32 = fcmp oge double %7, 0.000000e+00
%33 = fcmp ole double %7, 1.000000e+03
%34 = and i1 %32, %33
%35 = zext i1 %34 to i32
%36 = tail call i32 @assert(i32 %35)
%37 = fcmp ord double %8, 0.000000e+00
%38 = fcmp oge double %8, -1.000000e+03
%39 = and i1 %37, %38
%40 = fcmp ole double %8, 1.000000e+03
%41 = and i1 %40, %39
%42 = zext i1 %41 to i32
%43 = tail call i32 @assert(i32 %42)
%44 = fcmp ord double %9, 0.000000e+00
%45 = fcmp oge double %9, 0x3E7AD7F29ABCAF48
%46 = and i1 %44, %45
%47 = fcmp ole double %9, 0x40593FFFD60E94EE
%48 = and i1 %47, %46
%49 = zext i1 %48 to i32
%50 = tail call i32 @assert(i32 %49)
%51 = icmp eq i32 %0, 0
%52 = fdiv double %4, %6
%53 = fptosi double %52 to i32
%54 = fdiv double %1, %2
%55 = tail call double @log(double %54)
%56 = fneg double %7
%57 = fmul double %56, %4
%58 = tail call double @exp(double %57)
%59 = icmp slt i32 %53, 1
br i1 %59, label %82, label %60
60: ; preds = %10
%61 = fmul double %9, %9
%62 = fmul double %61, 5.000000e-01
%63 = fsub double %8, %62
br label %64
64: ; preds = %60, %64
%65 = phi i32 [ 1, %60 ], [ %80, %64 ]
%66 = phi double [ 0.000000e+00, %60 ], [ %79, %64 ]
%67 = sitofp i32 %65 to double
%68 = fmul double %63, %67
%69 = tail call double @llvm.fmuladd.f64(double %68, double %6, double %55)
%70 = fmul double %67, %6
%71 = fptosi double %70 to i32
%72 = tail call double @sqrt(i32 %71)
%73 = fmul double %72, %9
%74 = fdiv double %69, %73
%75 = fneg double %74
%76 = select i1 %51, double %75, double %74
%77 = fptosi double %76 to i32
%78 = tail call double @cnd(i32 %77)
%79 = tail call double @llvm.fmuladd.f64(double %78, double %6, double %66)
%80 = add nuw i32 %65, 1
%81 = icmp eq i32 %65, %53
br i1 %81, label %82, label %64
82: ; preds = %64, %10
%83 = phi double [ 0.000000e+00, %10 ], [ %79, %64 ]
%84 = fmul double %58, %3
%85 = fmul double %3, %6
%86 = fmul double %85, %58
%87 = sitofp i32 %5 to double
%88 = fmul double %86, %87
%89 = tail call double @llvm.fmuladd.f64(double %84, double %83, double %88)
ret double %89
}