; LLVM IR from InsightSoftwareConsortium/ITK :: Modules/ThirdParty/Netlib/src/netlib/slatec (d9gmit)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@c__3 = external hidden global i64, align 8
@c__1 = external hidden global i64, align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@c__2 = external hidden global i64, align 8
@.str.3 = external hidden unnamed_addr constant [47 x i8], align 1
@c_b19 = external hidden global double, align 8

; Function Attrs: nounwind uwtable
define dso_local double @d9gmit_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca double, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca i64, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  store double 0.000000e+00, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %30 = call double @d1mach_(ptr noundef @c__3)
  %31 = fmul double %30, 5.000000e-01
  store double %31, ptr %24, align 8, !tbaa !9
  %32 = call double @d1mach_(ptr noundef @c__1)
  %33 = call double @log(double noundef %32) #5
  store double %33, ptr %23, align 8, !tbaa !9
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = load double, ptr %34, align 8, !tbaa !9
  %36 = fcmp ole double %35, 0.000000e+00
  br i1 %36, label %37, label %39

37:                                               ; preds = %5
  %38 = call i32 @xermsg_(ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, ptr noundef @c__1, ptr noundef @c__2, i64 noundef 6, i64 noundef 6, i64 noundef 16)
  br label %39

39:                                               ; preds = %37, %5
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = load double, ptr %40, align 8, !tbaa !9
  %42 = fadd double %41, 5.000000e-01
  %43 = fptosi double %42 to i64
  store i64 %43, ptr %20, align 8, !tbaa !11
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = load double, ptr %44, align 8, !tbaa !9
  %46 = fcmp olt double %45, 0.000000e+00
  br i1 %46, label %47, label %52

47:                                               ; preds = %39
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = load double, ptr %48, align 8, !tbaa !9
  %50 = fsub double %49, 5.000000e-01
  %51 = fptosi double %50 to i64
  store i64 %51, ptr %20, align 8, !tbaa !11
  br label %52

52:                                               ; preds = %47, %39
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = load double, ptr %53, align 8, !tbaa !9
  %55 = load i64, ptr %20, align 8, !tbaa !11
  %56 = sitofp i64 %55 to double
  %57 = fsub double %54, %56
  store double %57, ptr %27, align 8, !tbaa !9
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load double, ptr %58, align 8, !tbaa !9
  store double %59, ptr %19, align 8, !tbaa !9
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = load double, ptr %60, align 8, !tbaa !9
  %62 = fcmp olt double %61, -5.000000e-01
  br i1 %62, label %63, label %65

63:                                               ; preds = %52
  %64 = load double, ptr %27, align 8, !tbaa !9
  store double %64, ptr %19, align 8, !tbaa !9
  br label %65

65:                                               ; preds = %63, %52
  store double 1.000000e+00, ptr %18, align 8, !tbaa !9
  %66 = load double, ptr %19, align 8, !tbaa !9
  store double %66, ptr %22, align 8, !tbaa !9
  %67 = load double, ptr %18, align 8, !tbaa !9
  store double %67, ptr %17, align 8, !tbaa !9
  store i64 1, ptr %15, align 8, !tbaa !11
  br label %68

68:                                               ; preds = %112, %65
  %69 = load i64, ptr %15, align 8, !tbaa !11
  %70 = icmp sle i64 %69, 200
  br i1 %70, label %71, label %115

71:                                               ; preds = %68
  %72 = load i64, ptr %15, align 8, !tbaa !11
  %73 = sitofp i64 %72 to double
  store double %73, ptr %21, align 8, !tbaa !9
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = load double, ptr %74, align 8, !tbaa !9
  %76 = fneg double %75
  %77 = load double, ptr %22, align 8, !tbaa !9
  %78 = fmul double %76, %77
  %79 = load double, ptr %21, align 8, !tbaa !9
  %80 = fdiv double %78, %79
  store double %80, ptr %22, align 8, !tbaa !9
  %81 = load double, ptr %22, align 8, !tbaa !9
  %82 = load double, ptr %19, align 8, !tbaa !9
  %83 = load double, ptr %21, align 8, !tbaa !9
  %84 = fadd double %82, %83
  %85 = fdiv double %81, %84
  store double %85, ptr %18, align 8, !tbaa !9
  %86 = load double, ptr %18, align 8, !tbaa !9
  %87 = load double, ptr %17, align 8, !tbaa !9
  %88 = fadd double %87, %86
  store double %88, ptr %17, align 8, !tbaa !9
  %89 = load double, ptr %18, align 8, !tbaa !9
  %90 = fcmp oge double %89, 0.000000e+00
  br i1 %90, label %91, label %93

91:                                               ; preds = %71
  %92 = load double, ptr %18, align 8, !tbaa !9
  br label %96

93:                                               ; preds = %71
  %94 = load double, ptr %18, align 8, !tbaa !9
  %95 = fneg double %94
  br label %96

96:                                               ; preds = %93, %91
  %97 = phi double [ %92, %91 ], [ %95, %93 ]
  %98 = load double, ptr %24, align 8, !tbaa !9
  %99 = load double, ptr %17, align 8, !tbaa !9
  %100 = fcmp oge double %99, 0.000000e+00
  br i1 %100, label %101, label %103

101:                                              ; preds = %96
  %102 = load double, ptr %17, align 8, !tbaa !9
  br label %106

103:                                              ; preds = %96
  %104 = load double, ptr %17, align 8, !tbaa !9
  %105 = fneg double %104
  br label %106

106:                                              ; preds = %103, %101
  %107 = phi double [ %102, %101 ], [ %105, %103 ]
  %108 = fmul double %98, %107
  %109 = fcmp olt double %97, %108
  br i1 %109, label %110, label %111

110:                                              ; preds = %106
  br label %117

111:                                              ; preds = %106
  br label %112

112:                                              ; preds = %111
  %113 = load i64, ptr %15, align 8, !tbaa !11
  %114 = add nsw i64 %113, 1
  store i64 %114, ptr %15, align 8, !tbaa !11
  br label %68, !llvm.loop !13

115:                                              ; preds = %68
  %116 = call i32 @xermsg_(ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.3, ptr noundef @c__2, ptr noundef @c__2, i64 noundef 6, i64 noundef 6, i64 noundef 46)
  br label %117

117:                                              ; preds = %115, %110
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = load double, ptr %118, align 8, !tbaa !9
  %120 = fcmp oge double %119, -5.000000e-01
  br i1 %120, label %121, label %128

121:                                              ; preds = %117
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = load double, ptr %122, align 8, !tbaa !9
  %124 = fneg double %123
  %125 = load double, ptr %17, align 8, !tbaa !9
  %126 = call double @log(double noundef %125) #5
  %127 = fadd double %124, %126
  store double %127, ptr %26, align 8, !tbaa !9
  br label %128

128:                                              ; preds = %121, %117
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  %130 = load double, ptr %129, align 8, !tbaa !9
  %131 = fcmp oge double %130, -5.000000e-01
  br i1 %131, label %132, label %133

132:                                              ; preds = %128
  br label %252

133:                                              ; preds = %128
  %134 = load double, ptr %27, align 8, !tbaa !9
  %135 = fadd double %134, 1.000000e+00
  store double %135, ptr %14, align 8, !tbaa !9
  %136 = call double @dlngam_(ptr noundef %14)
  %137 = fneg double %136
  %138 = load double, ptr %17, align 8, !tbaa !9
  %139 = call double @log(double noundef %138) #5
  %140 = fadd double %137, %139
  store double %140, ptr %26, align 8, !tbaa !9
  store double 1.000000e+00, ptr %17, align 8, !tbaa !9
  %141 = load i64, ptr %20, align 8, !tbaa !11
  %142 = sub nsw i64 0, %141
  %143 = sub nsw i64 %142, 1
  store i64 %143, ptr %16, align 8, !tbaa !11
  %144 = load i64, ptr %16, align 8, !tbaa !11
  %145 = icmp eq i64 %144, 0
  br i1 %145, label %146, label %147

146:                                              ; preds = %133
  br label %196

147:                                              ; preds = %133
  store double 1.000000e+00, ptr %18, align 8, !tbaa !9
  %148 = load i64, ptr %16, align 8, !tbaa !11
  store i64 %148, ptr %12, align 8, !tbaa !11
  store i64 1, ptr %15, align 8, !tbaa !11
  br label %149

149:                                              ; preds = %192, %147
  %150 = load i64, ptr %15, align 8, !tbaa !11
  %151 = load i64, ptr %12, align 8, !tbaa !11
  %152 = icmp sle i64 %150, %151
  br i1 %152, label %153, label %195

153:                                              ; preds = %149
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = load double, ptr %154, align 8, !tbaa !9
  %156 = load double, ptr %18, align 8, !tbaa !9
  %157 = fmul double %155, %156
  %158 = load double, ptr %27, align 8, !tbaa !9
  %159 = load i64, ptr %16, align 8, !tbaa !11
  %160 = add nsw i64 %159, 1
  %161 = load i64, ptr %15, align 8, !tbaa !11
  %162 = sub nsw i64 %160, %161
  %163 = sitofp i64 %162 to double
  %164 = fsub double %158, %163
  %165 = fdiv double %157, %164
  store double %165, ptr %18, align 8, !tbaa !9
  %166 = load double, ptr %18, align 8, !tbaa !9
  %167 = load double, ptr %17, align 8, !tbaa !9
  %168 = fadd double %167, %166
  store double %168, ptr %17, align 8, !tbaa !9
  %169 = load double, ptr %18, align 8, !tbaa !9
  %170 = fcmp oge double %169, 0.000000e+00
  br i1 %170, label %171, label %173

171:                                              ; preds = %153
  %172 = load double, ptr %18, align 8, !tbaa !9
  br label %176

173:                                              ; preds = %153
  %174 = load double, ptr %18, align 8, !tbaa !9
  %175 = fneg double %174
  br label %176

176:                                              ; preds = %173, %171
  %177 = phi double [ %172, %171 ], [ %175, %173 ]
  %178 = load double, ptr %24, align 8, !tbaa !9
  %179 = load double, ptr %17, align 8, !tbaa !9
  %180 = fcmp oge double %179, 0.000000e+00
  br i1 %180, label %181, label %183

181:                                              ; preds = %176
  %182 = load double, ptr %17, align 8, !tbaa !9
  br label %186

183:                                              ; preds = %176
  %184 = load double, ptr %17, align 8, !tbaa !9
  %185 = fneg double %184
  br label %186

186:                                              ; preds = %183, %181
  %187 = phi double [ %182, %181 ], [ %185, %183 ]
  %188 = fmul double %178, %187
  %189 = fcmp olt double %177, %188
  br i1 %189, label %190, label %191

190:                                              ; preds = %186
  br label %196

191:                                              ; preds = %186
  br label %192

192:                                              ; preds = %191
  %193 = load i64, ptr %15, align 8, !tbaa !11
  %194 = add nsw i64 %193, 1
  store i64 %194, ptr %15, align 8, !tbaa !11
  br label %149, !llvm.loop !15

195:                                              ; preds = %149
  br label %196

196:                                              ; preds = %195, %190, %146
  store double 0.000000e+00, ptr %13, align 8, !tbaa !9
  %197 = load i64, ptr %20, align 8, !tbaa !11
  %198 = sub nsw i64 0, %197
  %199 = sitofp i64 %198 to double
  %200 = load ptr, ptr %8, align 8, !tbaa !5
  %201 = load double, ptr %200, align 8, !tbaa !9
  %202 = call double @log(double noundef %201) #5
  %203 = load double, ptr %26, align 8, !tbaa !9
  %204 = call double @llvm.fmuladd.f64(double %199, double %202, double %203)
  store double %204, ptr %26, align 8, !tbaa !9
  %205 = load double, ptr %17, align 8, !tbaa !9
  %206 = fcmp oeq double %205, 0.000000e+00
  br i1 %206, label %210, label %207

207:                                              ; preds = %196
  %208 = load double, ptr %27, align 8, !tbaa !9
  %209 = fcmp oeq double %208, 0.000000e+00
  br i1 %209, label %210, label %211

210:                                              ; preds = %207, %196
  br label %252

211:                                              ; preds = %207
  %212 = load ptr, ptr %10, align 8, !tbaa !5
  %213 = load double, ptr %212, align 8, !tbaa !9
  %214 = call double @v3p_netlib_d_sign(ptr noundef @c_b19, ptr noundef %17)
  %215 = fmul double %213, %214
  store double %215, ptr %28, align 8, !tbaa !9
  %216 = load ptr, ptr %8, align 8, !tbaa !5
  %217 = load double, ptr %216, align 8, !tbaa !9
  %218 = fneg double %217
  %219 = load ptr, ptr %9, align 8, !tbaa !5
  %220 = load double, ptr %219, align 8, !tbaa !9
  %221 = fsub double %218, %220
  %222 = load double, ptr %17, align 8, !tbaa !9
  %223 = fcmp oge double %222, 0.000000e+00
  br i1 %223, label %224, label %226

224:                                              ; preds = %211
  %225 = load double, ptr %17, align 8, !tbaa !9
  br label %229

226:                                              ; preds = %211
  %227 = load double, ptr %17, align 8, !tbaa !9
  %228 = fneg double %227
  br label %229

229:                                              ; preds = %226, %224
  %230 = phi double [ %225, %224 ], [ %228, %226 ]
  %231 = call double @log(double noundef %230) #5
  %232 = fadd double %221, %231
  store double %232, ptr %25, align 8, !tbaa !9
  %233 = load double, ptr %25, align 8, !tbaa !9
  %234 = load double, ptr %23, align 8, !tbaa !9
  %235 = fcmp ogt double %233, %234
  br i1 %235, label %236, label %241

236:                                              ; preds = %229
  %237 = load double, ptr %28, align 8, !tbaa !9
  %238 = load double, ptr %25, align 8, !tbaa !9
  %239 = call double @exp(double noundef %238) #5
  %240 = fmul double %237, %239
  store double %240, ptr %13, align 8, !tbaa !9
  br label %241

241:                                              ; preds = %236, %229
  %242 = load double, ptr %26, align 8, !tbaa !9
  %243 = load double, ptr %23, align 8, !tbaa !9
  %244 = fcmp ogt double %242, %243
  br i1 %244, label %245, label %250

245:                                              ; preds = %241
  %246 = load double, ptr %26, align 8, !tbaa !9
  %247 = call double @exp(double noundef %246) #5
  %248 = load double, ptr %13, align 8, !tbaa !9
  %249 = fadd double %248, %247
  store double %249, ptr %13, align 8, !tbaa !9
  br label %250

250:                                              ; preds = %245, %241
  %251 = load double, ptr %13, align 8, !tbaa !9
  store double %251, ptr %6, align 8
  store i32 1, ptr %29, align 4
  br label %256

252:                                              ; preds = %210, %132
  %253 = load double, ptr %26, align 8, !tbaa !9
  %254 = call double @exp(double noundef %253) #5
  store double %254, ptr %13, align 8, !tbaa !9
  %255 = load double, ptr %13, align 8, !tbaa !9
  store double %255, ptr %6, align 8
  store i32 1, ptr %29, align 4
  br label %256

256:                                              ; preds = %252, %250
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %257 = load double, ptr %6, align 8
  ret double %257
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

declare double @d1mach_(ptr noundef) #2

; Function Attrs: nounwind
declare double @log(double noundef) #3

declare i32 @xermsg_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef) #2

declare double @dlngam_(ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

declare double @v3p_netlib_d_sign(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare double @exp(double noundef) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@c__3 = external hidden global i64, align 8
@c__1 = external hidden global i64, align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@c__2 = external hidden global i64, align 8
@.str.3 = external hidden unnamed_addr constant [47 x i8], align 1
@c_b19 = external hidden global double, align 8

; Function Attrs: nounwind uwtable
define dso_local double @d9gmit_(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3, ptr nocapture noundef readnone %4) local_unnamed_addr #0 {
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %8 = tail call double @d1mach_(ptr noundef nonnull @c__3) #5
  %9 = fmul double %8, 5.000000e-01
  %10 = tail call double @d1mach_(ptr noundef nonnull @c__1) #5
  %11 = tail call double @log(double noundef %10) #5
  %12 = load double, ptr %1, align 8, !tbaa !5
  %13 = fcmp ugt double %12, 0.000000e+00
  br i1 %13, label %16, label %14

14:                                               ; preds = %5
  %15 = tail call i32 @xermsg_(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, ptr noundef nonnull @c__1, ptr noundef nonnull @c__2, i64 noundef 6, i64 noundef 6, i64 noundef 16) #5
  %.pre = load double, ptr %1, align 8, !tbaa !5
  br label %16

16:                                               ; preds = %14, %5
  %17 = phi double [ %.pre, %14 ], [ %12, %5 ]
  %18 = load double, ptr %0, align 8, !tbaa !5
  %19 = fcmp olt double %18, 0.000000e+00
  %.072.in.v = select i1 %19, double -5.000000e-01, double 5.000000e-01
  %.072.in = fadd double %18, %.072.in.v
  %.072 = fptosi double %.072.in to i64
  %20 = sitofp i64 %.072 to double
  %21 = fsub double %18, %20
  %22 = fcmp olt double %18, -5.000000e-01
  %.070 = select i1 %22, double %21, double %18
  %23 = fneg double %17
  br label %26

24:                                               ; preds = %26
  %25 = add nuw nsw i64 %.06781, 1
  %exitcond.not = icmp eq i64 %25, 201
  br i1 %exitcond.not, label %42, label %26, !llvm.loop !9

26:                                               ; preds = %16, %24
  %.06781 = phi i64 [ 1, %16 ], [ %25, %24 ]
  %.07180 = phi double [ %.070, %16 ], [ %30, %24 ]
  %27 = phi double [ 1.000000e+00, %16 ], [ %33, %24 ]
  %28 = uitofp nneg i64 %.06781 to double
  %29 = fmul double %.07180, %23
  %30 = fdiv double %29, %28
  %31 = fadd double %.070, %28
  %32 = fdiv double %30, %31
  %33 = fadd double %27, %32
  %34 = fcmp oge double %32, 0.000000e+00
  %35 = fneg double %32
  %36 = select i1 %34, double %32, double %35
  %37 = fcmp oge double %33, 0.000000e+00
  %38 = fneg double %33
  %39 = select i1 %37, double %33, double %38
  %40 = fmul double %9, %39
  %41 = fcmp olt double %36, %40
  br i1 %41, label %.loopexit78, label %24

42:                                               ; preds = %24
  %43 = tail call i32 @xermsg_(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.3, ptr noundef nonnull @c__2, ptr noundef nonnull @c__2, i64 noundef 6, i64 noundef 6, i64 noundef 46) #5
  %.pre91 = load double, ptr %0, align 8, !tbaa !5
  br label %.loopexit78

.loopexit78:                                      ; preds = %26, %42
  %44 = phi double [ %.pre91, %42 ], [ %18, %26 ]
  %45 = fcmp ult double %44, -5.000000e-01
  br i1 %45, label %50, label %46

46:                                               ; preds = %.loopexit78
  %47 = load double, ptr %2, align 8, !tbaa !5
  %48 = tail call double @log(double noundef %33) #5
  %49 = fsub double %48, %47
  %.pr = load double, ptr %0, align 8, !tbaa !5
  br label %50

50:                                               ; preds = %46, %.loopexit78
  %51 = phi double [ %.pr, %46 ], [ %44, %.loopexit78 ]
  %.065 = phi double [ %49, %46 ], [ 0.000000e+00, %.loopexit78 ]
  %52 = fcmp ult double %51, -5.000000e-01
  br i1 %52, label %53, label %110

53:                                               ; preds = %50
  %54 = fadd double %21, 1.000000e+00
  store double %54, ptr %6, align 8, !tbaa !5
  %55 = call double @dlngam_(ptr noundef nonnull %6) #5
  %56 = call double @log(double noundef %33) #5
  %57 = fsub double %56, %55
  store double 1.000000e+00, ptr %7, align 8, !tbaa !5
  %58 = sub i64 0, %.072
  %59 = icmp eq i64 %.072, -1
  br i1 %59, label %80, label %.preheader

.preheader:                                       ; preds = %53
  %.not83 = icmp sgt i64 %.072, -2
  br i1 %.not83, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %60 = load double, ptr %1, align 8, !tbaa !5
  br label %61

61:                                               ; preds = %61, %.lr.ph
  %.16885 = phi i64 [ 1, %.lr.ph ], [ %77, %61 ]
  %.06984 = phi double [ 1.000000e+00, %.lr.ph ], [ %67, %61 ]
  %62 = phi double [ 1.000000e+00, %.lr.ph ], [ %68, %61 ]
  %63 = fmul double %.06984, %60
  %64 = sub nsw i64 %58, %.16885
  %65 = sitofp i64 %64 to double
  %66 = fsub double %21, %65
  %67 = fdiv double %63, %66
  %68 = fadd double %62, %67
  %69 = fcmp oge double %67, 0.000000e+00
  %70 = fneg double %67
  %71 = select i1 %69, double %67, double %70
  %72 = fcmp oge double %68, 0.000000e+00
  %73 = fneg double %68
  %74 = select i1 %72, double %68, double %73
  %75 = fmul double %9, %74
  %76 = fcmp olt double %71, %75
  %77 = add nuw i64 %.16885, 1
  %exitcond90.not = icmp eq i64 %77, %58
  %or.cond94 = select i1 %76, i1 true, i1 %exitcond90.not
  br i1 %or.cond94, label %.loopexit, label %61, !llvm.loop !11

.loopexit:                                        ; preds = %61, %.preheader
  %78 = phi double [ 1.000000e+00, %.preheader ], [ %68, %61 ]
  store double %78, ptr %7, align 8, !tbaa !5
  %79 = fcmp oeq double %78, 0.000000e+00
  br label %80

80:                                               ; preds = %.loopexit, %53
  %81 = phi i1 [ %79, %.loopexit ], [ false, %53 ]
  %82 = sitofp i64 %58 to double
  %83 = load double, ptr %1, align 8, !tbaa !5
  %84 = call double @log(double noundef %83) #5
  %85 = call double @llvm.fmuladd.f64(double %82, double %84, double %57)
  %86 = fcmp oeq double %21, 0.000000e+00
  %or.cond = select i1 %81, i1 true, i1 %86
  br i1 %or.cond, label %110, label %87

87:                                               ; preds = %80
  %88 = load double, ptr %3, align 8, !tbaa !5
  %89 = call double @v3p_netlib_d_sign(ptr noundef nonnull @c_b19, ptr noundef nonnull %7) #5
  %90 = load double, ptr %1, align 8, !tbaa !5
  %91 = fneg double %90
  %92 = load double, ptr %2, align 8, !tbaa !5
  %93 = fsub double %91, %92
  %94 = load double, ptr %7, align 8
  %95 = fcmp oge double %94, 0.000000e+00
  %96 = fneg double %94
  %97 = select i1 %95, double %94, double %96
  %98 = call double @log(double noundef %97) #5
  %99 = fadd double %93, %98
  %100 = fcmp ogt double %99, %11
  br i1 %100, label %101, label %105

101:                                              ; preds = %87
  %102 = fmul double %88, %89
  %103 = call double @exp(double noundef %99) #5
  %104 = fmul double %102, %103
  br label %105

105:                                              ; preds = %101, %87
  %.064 = phi double [ %104, %101 ], [ 0.000000e+00, %87 ]
  %106 = fcmp ogt double %85, %11
  br i1 %106, label %107, label %112

107:                                              ; preds = %105
  %108 = call double @exp(double noundef %85) #5
  %109 = fadd double %.064, %108
  br label %112

110:                                              ; preds = %80, %50
  %.166 = phi double [ %.065, %50 ], [ %85, %80 ]
  %111 = call double @exp(double noundef %.166) #5
  br label %112

112:                                              ; preds = %105, %107, %110
  %.0 = phi double [ %111, %110 ], [ %109, %107 ], [ %.064, %105 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  ret double %.0
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

declare double @d1mach_(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @log(double noundef) local_unnamed_addr #3

declare i32 @xermsg_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

declare double @dlngam_(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

declare double @v3p_netlib_d_sign(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @exp(double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass