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

; 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__4 = 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 [14 x i8], align 1
@c__2 = external hidden global i64, align 8
@c_b10 = external hidden global double, align 8
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local double @dgamit_(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca double, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #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
  %22 = call double @d1mach_(ptr noundef @c__3)
  %23 = call double @log(double noundef %22) #5
  %24 = fneg double %23
  store double %24, ptr %20, align 8, !tbaa !9
  %25 = call double @d1mach_(ptr noundef @c__4)
  %26 = call double @sqrt(double noundef %25) #5
  store double %26, ptr %17, align 8, !tbaa !9
  %27 = call double @d1mach_(ptr noundef @c__1)
  %28 = call double @log(double noundef %27) #5
  store double %28, ptr %13, align 8, !tbaa !9
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = load double, ptr %29, align 8, !tbaa !9
  %31 = fcmp olt double %30, 0.000000e+00
  br i1 %31, label %32, label %34

32:                                               ; preds = %2
  %33 = call i32 @xermsg_(ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, ptr noundef @c__2, ptr noundef @c__2, i64 noundef 6, i64 noundef 6, i64 noundef 13)
  br label %34

34:                                               ; preds = %32, %2
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = load double, ptr %35, align 8, !tbaa !9
  %37 = fcmp une double %36, 0.000000e+00
  br i1 %37, label %38, label %42

38:                                               ; preds = %34
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = load double, ptr %39, align 8, !tbaa !9
  %41 = call double @log(double noundef %40) #5
  store double %41, ptr %12, align 8, !tbaa !9
  br label %42

42:                                               ; preds = %38, %34
  store double 1.000000e+00, ptr %11, align 8, !tbaa !9
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = load double, ptr %43, align 8, !tbaa !9
  %45 = fcmp une double %44, 0.000000e+00
  br i1 %45, label %46, label %49

46:                                               ; preds = %42
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = call double @v3p_netlib_d_sign(ptr noundef @c_b10, ptr noundef %47)
  store double %48, ptr %11, align 8, !tbaa !9
  br label %49

49:                                               ; preds = %46, %42
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = load double, ptr %50, align 8, !tbaa !9
  %52 = load double, ptr %11, align 8, !tbaa !9
  %53 = call double @llvm.fmuladd.f64(double %52, double 5.000000e-01, double %51)
  store double %53, ptr %7, align 8, !tbaa !9
  %54 = call double @d_int(ptr noundef %7)
  store double %54, ptr %16, align 8, !tbaa !9
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load double, ptr %55, align 8, !tbaa !9
  %57 = load double, ptr %16, align 8, !tbaa !9
  %58 = fsub double %56, %57
  store double %58, ptr %15, align 8, !tbaa !9
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = load double, ptr %59, align 8, !tbaa !9
  %61 = fcmp ogt double %60, 0.000000e+00
  br i1 %61, label %62, label %63

62:                                               ; preds = %49
  br label %76

63:                                               ; preds = %49
  store double 0.000000e+00, ptr %6, align 8, !tbaa !9
  %64 = load double, ptr %16, align 8, !tbaa !9
  %65 = fcmp ogt double %64, 0.000000e+00
  br i1 %65, label %69, label %66

66:                                               ; preds = %63
  %67 = load double, ptr %15, align 8, !tbaa !9
  %68 = fcmp une double %67, 0.000000e+00
  br i1 %68, label %69, label %74

69:                                               ; preds = %66, %63
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = load double, ptr %70, align 8, !tbaa !9
  %72 = fadd double %71, 1.000000e+00
  store double %72, ptr %7, align 8, !tbaa !9
  %73 = call double @dgamr_(ptr noundef %7)
  store double %73, ptr %6, align 8, !tbaa !9
  br label %74

74:                                               ; preds = %69, %66
  %75 = load double, ptr %6, align 8, !tbaa !9
  store double %75, ptr %3, align 8
  store i32 1, ptr %21, align 4
  br label %230

76:                                               ; preds = %62
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = load double, ptr %77, align 8, !tbaa !9
  %79 = fcmp ogt double %78, 1.000000e+00
  br i1 %79, label %80, label %81

80:                                               ; preds = %76
  br label %98

81:                                               ; preds = %76
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = load double, ptr %82, align 8, !tbaa !9
  %84 = fcmp oge double %83, -5.000000e-01
  br i1 %84, label %88, label %85

85:                                               ; preds = %81
  %86 = load double, ptr %15, align 8, !tbaa !9
  %87 = fcmp une double %86, 0.000000e+00
  br i1 %87, label %88, label %93

88:                                               ; preds = %85, %81
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = load double, ptr %89, align 8, !tbaa !9
  %91 = fadd double %90, 1.000000e+00
  store double %91, ptr %7, align 8, !tbaa !9
  %92 = call i32 @dlgams_(ptr noundef %7, ptr noundef %18, ptr noundef %19)
  br label %93

93:                                               ; preds = %88, %85
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = call double @d9gmit_(ptr noundef %94, ptr noundef %95, ptr noundef %18, ptr noundef %19, ptr noundef %12)
  store double %96, ptr %6, align 8, !tbaa !9
  %97 = load double, ptr %6, align 8, !tbaa !9
  store double %97, ptr %3, align 8
  store i32 1, ptr %21, align 4
  br label %230

98:                                               ; preds = %80
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = load double, ptr %99, align 8, !tbaa !9
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = load double, ptr %101, align 8, !tbaa !9
  %103 = fcmp olt double %100, %102
  br i1 %103, label %104, label %105

104:                                              ; preds = %98
  br label %121

105:                                              ; preds = %98
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = load double, ptr %106, align 8, !tbaa !9
  %108 = fadd double %107, 1.000000e+00
  store double %108, ptr %8, align 8, !tbaa !9
  %109 = call double @dlngam_(ptr noundef %8)
  store double %109, ptr %7, align 8, !tbaa !9
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = call double @d9lgit_(ptr noundef %110, ptr noundef %111, ptr noundef %7)
  store double %112, ptr %10, align 8, !tbaa !9
  %113 = load double, ptr %10, align 8, !tbaa !9
  %114 = load double, ptr %13, align 8, !tbaa !9
  %115 = fcmp olt double %113, %114
  br i1 %115, label %116, label %117

116:                                              ; preds = %105
  br label %117

117:                                              ; preds = %116, %105
  %118 = load double, ptr %10, align 8, !tbaa !9
  %119 = call double @exp(double noundef %118) #5
  store double %119, ptr %6, align 8, !tbaa !9
  %120 = load double, ptr %6, align 8, !tbaa !9
  store double %120, ptr %3, align 8
  store i32 1, ptr %21, align 4
  br label %230

121:                                              ; preds = %104
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = call double @d9lgic_(ptr noundef %122, ptr noundef %123, ptr noundef %12)
  store double %124, ptr %14, align 8, !tbaa !9
  store double 1.000000e+00, ptr %9, align 8, !tbaa !9
  %125 = load double, ptr %15, align 8, !tbaa !9
  %126 = fcmp oeq double %125, 0.000000e+00
  br i1 %126, label %127, label %131

127:                                              ; preds = %121
  %128 = load double, ptr %16, align 8, !tbaa !9
  %129 = fcmp ole double %128, 0.000000e+00
  br i1 %129, label %130, label %131

130:                                              ; preds = %127
  br label %185

131:                                              ; preds = %127, %121
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = load double, ptr %132, align 8, !tbaa !9
  %134 = fadd double %133, 1.000000e+00
  store double %134, ptr %7, align 8, !tbaa !9
  %135 = call i32 @dlgams_(ptr noundef %7, ptr noundef %18, ptr noundef %19)
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = load double, ptr %136, align 8, !tbaa !9
  %138 = fcmp oge double %137, 0.000000e+00
  br i1 %138, label %139, label %142

139:                                              ; preds = %131
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = load double, ptr %140, align 8, !tbaa !9
  br label %146

142:                                              ; preds = %131
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = load double, ptr %143, align 8, !tbaa !9
  %145 = fneg double %144
  br label %146

146:                                              ; preds = %142, %139
  %147 = phi double [ %141, %139 ], [ %145, %142 ]
  %148 = call double @log(double noundef %147) #5
  %149 = load double, ptr %14, align 8, !tbaa !9
  %150 = fadd double %148, %149
  %151 = load double, ptr %18, align 8, !tbaa !9
  %152 = fsub double %150, %151
  store double %152, ptr %10, align 8, !tbaa !9
  %153 = load double, ptr %10, align 8, !tbaa !9
  %154 = load double, ptr %20, align 8, !tbaa !9
  %155 = fcmp ogt double %153, %154
  br i1 %155, label %156, label %157

156:                                              ; preds = %146
  br label %210

157:                                              ; preds = %146
  %158 = load double, ptr %10, align 8, !tbaa !9
  %159 = load double, ptr %20, align 8, !tbaa !9
  %160 = fneg double %159
  %161 = fcmp ogt double %158, %160
  br i1 %161, label %162, label %170

162:                                              ; preds = %157
  %163 = load double, ptr %11, align 8, !tbaa !9
  %164 = load double, ptr %19, align 8, !tbaa !9
  %165 = fmul double %163, %164
  %166 = load double, ptr %10, align 8, !tbaa !9
  %167 = call double @exp(double noundef %166) #5
  %168 = fneg double %165
  %169 = call double @llvm.fmuladd.f64(double %168, double %167, double 1.000000e+00)
  store double %169, ptr %9, align 8, !tbaa !9
  br label %170

170:                                              ; preds = %162, %157
  %171 = load double, ptr %9, align 8, !tbaa !9
  %172 = fcmp oge double %171, 0.000000e+00
  br i1 %172, label %173, label %175

173:                                              ; preds = %170
  %174 = load double, ptr %9, align 8, !tbaa !9
  br label %178

175:                                              ; preds = %170
  %176 = load double, ptr %9, align 8, !tbaa !9
  %177 = fneg double %176
  br label %178

178:                                              ; preds = %175, %173
  %179 = phi double [ %174, %173 ], [ %177, %175 ]
  %180 = load double, ptr %17, align 8, !tbaa !9
  %181 = fcmp ogt double %179, %180
  br i1 %181, label %182, label %183

182:                                              ; preds = %178
  br label %185

183:                                              ; preds = %178
  %184 = call i32 @xermsg_(ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.3, ptr noundef @c__1, ptr noundef @c__1, i64 noundef 6, i64 noundef 6, i64 noundef 24)
  br label %185

185:                                              ; preds = %183, %182, %130
  %186 = load ptr, ptr %4, align 8, !tbaa !5
  %187 = load double, ptr %186, align 8, !tbaa !9
  %188 = fneg double %187
  %189 = load double, ptr %12, align 8, !tbaa !9
  %190 = load double, ptr %9, align 8, !tbaa !9
  %191 = fcmp oge double %190, 0.000000e+00
  br i1 %191, label %192, label %194

192:                                              ; preds = %185
  %193 = load double, ptr %9, align 8, !tbaa !9
  br label %197

194:                                              ; preds = %185
  %195 = load double, ptr %9, align 8, !tbaa !9
  %196 = fneg double %195
  br label %197

197:                                              ; preds = %194, %192
  %198 = phi double [ %193, %192 ], [ %196, %194 ]
  %199 = call double @log(double noundef %198) #5
  %200 = call double @llvm.fmuladd.f64(double %188, double %189, double %199)
  store double %200, ptr %10, align 8, !tbaa !9
  %201 = load double, ptr %10, align 8, !tbaa !9
  %202 = load double, ptr %13, align 8, !tbaa !9
  %203 = fcmp olt double %201, %202
  br i1 %203, label %204, label %205

204:                                              ; preds = %197
  br label %205

205:                                              ; preds = %204, %197
  %206 = load double, ptr %10, align 8, !tbaa !9
  %207 = call double @exp(double noundef %206) #5
  store double %207, ptr %7, align 8, !tbaa !9
  %208 = call double @v3p_netlib_d_sign(ptr noundef %7, ptr noundef %9)
  store double %208, ptr %6, align 8, !tbaa !9
  %209 = load double, ptr %6, align 8, !tbaa !9
  store double %209, ptr %3, align 8
  store i32 1, ptr %21, align 4
  br label %230

210:                                              ; preds = %156
  %211 = load ptr, ptr %4, align 8, !tbaa !5
  %212 = load double, ptr %211, align 8, !tbaa !9
  %213 = load double, ptr %12, align 8, !tbaa !9
  %214 = load double, ptr %10, align 8, !tbaa !9
  %215 = fneg double %212
  %216 = call double @llvm.fmuladd.f64(double %215, double %213, double %214)
  store double %216, ptr %10, align 8, !tbaa !9
  %217 = load double, ptr %10, align 8, !tbaa !9
  %218 = load double, ptr %13, align 8, !tbaa !9
  %219 = fcmp olt double %217, %218
  br i1 %219, label %220, label %221

220:                                              ; preds = %210
  br label %221

221:                                              ; preds = %220, %210
  %222 = load double, ptr %11, align 8, !tbaa !9
  %223 = fneg double %222
  %224 = load double, ptr %19, align 8, !tbaa !9
  %225 = fmul double %223, %224
  %226 = load double, ptr %10, align 8, !tbaa !9
  %227 = call double @exp(double noundef %226) #5
  %228 = fmul double %225, %227
  store double %228, ptr %6, align 8, !tbaa !9
  %229 = load double, ptr %6, align 8, !tbaa !9
  store double %229, ptr %3, align 8
  store i32 1, ptr %21, align 4
  br label %230

230:                                              ; preds = %221, %205, %117, %93, %74
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %231 = load double, ptr %3, align 8
  ret double %231
}

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

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

declare double @d1mach_(ptr noundef) #3

; Function Attrs: nounwind
declare double @sqrt(double noundef) #2

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

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

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

declare double @d_int(ptr noundef) #3

declare double @dgamr_(ptr noundef) #3

declare i32 @dlgams_(ptr noundef, ptr noundef, ptr noundef) #3

declare double @d9gmit_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare double @dlngam_(ptr noundef) #3

declare double @d9lgit_(ptr noundef, ptr noundef, ptr noundef) #3

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

declare double @d9lgic_(ptr noundef, ptr noundef, ptr 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 = { 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 #3 = { "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}


; 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__4 = 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 [14 x i8], align 1
@c__2 = external hidden global i64, align 8
@c_b10 = external hidden global double, align 8
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local double @dgamit_(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %9 = tail call double @d1mach_(ptr noundef nonnull @c__3) #5
  %10 = tail call double @log(double noundef %9) #5
  %11 = fneg double %10
  %12 = tail call double @d1mach_(ptr noundef nonnull @c__4) #5
  %13 = tail call double @sqrt(double noundef %12) #5
  %14 = tail call double @d1mach_(ptr noundef nonnull @c__1) #5
  %15 = fcmp ugt double %14, 0.000000e+00
  br i1 %15, label %cdce.end, label %cdce.call, !prof !5

cdce.call:                                        ; preds = %2
  %16 = tail call double @log(double noundef %14) #5
  br label %cdce.end

cdce.end:                                         ; preds = %2, %cdce.call
  %17 = load double, ptr %1, align 8, !tbaa !6
  %18 = fcmp olt double %17, 0.000000e+00
  br i1 %18, label %19, label %21

19:                                               ; preds = %cdce.end
  %20 = tail call i32 @xermsg_(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, ptr noundef nonnull @c__2, ptr noundef nonnull @c__2, i64 noundef 6, i64 noundef 6, i64 noundef 13) #5
  %.pr = load double, ptr %1, align 8, !tbaa !6
  br label %21

21:                                               ; preds = %19, %cdce.end
  %22 = phi double [ %.pr, %19 ], [ %17, %cdce.end ]
  %23 = fcmp une double %22, 0.000000e+00
  br i1 %23, label %24, label %26

24:                                               ; preds = %21
  %25 = tail call double @log(double noundef %22) #5
  store double %25, ptr %6, align 8, !tbaa !6
  br label %26

26:                                               ; preds = %24, %21
  %27 = load double, ptr %0, align 8, !tbaa !6
  %28 = fcmp une double %27, 0.000000e+00
  br i1 %28, label %29, label %31

29:                                               ; preds = %26
  %30 = tail call double @v3p_netlib_d_sign(ptr noundef nonnull @c_b10, ptr noundef nonnull %0) #5
  %.pre = load double, ptr %0, align 8, !tbaa !6
  br label %31

31:                                               ; preds = %29, %26
  %32 = phi double [ %.pre, %29 ], [ %27, %26 ]
  %.065 = phi double [ %30, %29 ], [ 1.000000e+00, %26 ]
  %33 = tail call double @llvm.fmuladd.f64(double %.065, double 5.000000e-01, double %32)
  store double %33, ptr %3, align 8, !tbaa !6
  %34 = call double @d_int(ptr noundef nonnull %3) #5
  %35 = load double, ptr %0, align 8, !tbaa !6
  %36 = fsub double %35, %34
  %37 = load double, ptr %1, align 8, !tbaa !6
  %38 = fcmp ogt double %37, 0.000000e+00
  br i1 %38, label %45, label %39

39:                                               ; preds = %31
  %40 = fcmp ogt double %34, 0.000000e+00
  %41 = fcmp une double %36, 0.000000e+00
  %or.cond = select i1 %40, i1 true, i1 %41
  br i1 %or.cond, label %42, label %116

42:                                               ; preds = %39
  %43 = fadd double %35, 1.000000e+00
  store double %43, ptr %3, align 8, !tbaa !6
  %44 = call double @dgamr_(ptr noundef nonnull %3) #5
  br label %116

45:                                               ; preds = %31
  %46 = fcmp ogt double %37, 1.000000e+00
  br i1 %46, label %55, label %47

47:                                               ; preds = %45
  %48 = fcmp oge double %35, -5.000000e-01
  %49 = fcmp une double %36, 0.000000e+00
  %or.cond3 = select i1 %48, i1 true, i1 %49
  br i1 %or.cond3, label %50, label %53

50:                                               ; preds = %47
  %51 = fadd double %35, 1.000000e+00
  store double %51, ptr %3, align 8, !tbaa !6
  %52 = call i32 @dlgams_(ptr noundef nonnull %3, ptr noundef nonnull %7, ptr noundef nonnull %8) #5
  br label %53

53:                                               ; preds = %47, %50
  %54 = call double @d9gmit_(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %6) #5
  br label %116

55:                                               ; preds = %45
  %56 = fcmp olt double %35, %37
  br i1 %56, label %62, label %57

57:                                               ; preds = %55
  %58 = fadd double %35, 1.000000e+00
  store double %58, ptr %4, align 8, !tbaa !6
  %59 = call double @dlngam_(ptr noundef nonnull %4) #5
  store double %59, ptr %3, align 8, !tbaa !6
  %60 = call double @d9lgit_(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %3) #5
  %61 = call double @exp(double noundef %60) #5
  br label %116

62:                                               ; preds = %55
  %63 = call double @d9lgic_(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %6) #5
  store double 1.000000e+00, ptr %5, align 8, !tbaa !6
  %64 = fcmp oeq double %36, 0.000000e+00
  %65 = fcmp ole double %34, 0.000000e+00
  %or.cond5 = and i1 %65, %64
  br i1 %or.cond5, label %._crit_edge, label %66

66:                                               ; preds = %62
  %67 = load double, ptr %0, align 8, !tbaa !6
  %68 = fadd double %67, 1.000000e+00
  store double %68, ptr %3, align 8, !tbaa !6
  %69 = call i32 @dlgams_(ptr noundef nonnull %3, ptr noundef nonnull %7, ptr noundef nonnull %8) #5
  %70 = load double, ptr %0, align 8, !tbaa !6
  %71 = fcmp ult double %70, 0.000000e+00
  %72 = fneg double %70
  %73 = select i1 %71, double %72, double %70
  %74 = call double @log(double noundef %73) #5
  %75 = fadd double %63, %74
  %76 = load double, ptr %7, align 8, !tbaa !6
  %77 = fsub double %75, %76
  %78 = fcmp ogt double %77, %11
  br i1 %78, label %106, label %79

79:                                               ; preds = %66
  %80 = fcmp ogt double %77, %10
  br i1 %80, label %81, label %87

81:                                               ; preds = %79
  %82 = load double, ptr %8, align 8, !tbaa !6
  %83 = call double @exp(double noundef %77) #5
  %84 = fneg double %.065
  %85 = fmul double %82, %84
  %86 = call double @llvm.fmuladd.f64(double %85, double %83, double 1.000000e+00)
  store double %86, ptr %5, align 8, !tbaa !6
  br label %87

87:                                               ; preds = %81, %79
  %88 = phi double [ %86, %81 ], [ 1.000000e+00, %79 ]
  %89 = fcmp oge double %88, 0.000000e+00
  %90 = fneg double %88
  %91 = select i1 %89, double %88, double %90
  %92 = fcmp ogt double %91, %13
  br i1 %92, label %._crit_edge, label %93

93:                                               ; preds = %87
  %94 = call i32 @xermsg_(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.3, ptr noundef nonnull @c__1, ptr noundef nonnull @c__1, i64 noundef 6, i64 noundef 6, i64 noundef 24) #5
  br label %._crit_edge

._crit_edge:                                      ; preds = %62, %87, %93
  %95 = phi double [ %88, %87 ], [ %88, %93 ], [ 1.000000e+00, %62 ]
  %96 = load double, ptr %0, align 8, !tbaa !6
  %97 = fneg double %96
  %98 = load double, ptr %6, align 8, !tbaa !6
  %99 = fcmp oge double %95, 0.000000e+00
  %100 = fneg double %95
  %101 = select i1 %99, double %95, double %100
  %102 = call double @log(double noundef %101) #5
  %103 = call double @llvm.fmuladd.f64(double %97, double %98, double %102)
  %104 = call double @exp(double noundef %103) #5
  store double %104, ptr %3, align 8, !tbaa !6
  %105 = call double @v3p_netlib_d_sign(ptr noundef nonnull %3, ptr noundef nonnull %5) #5
  br label %116

106:                                              ; preds = %66
  %107 = load double, ptr %0, align 8, !tbaa !6
  %108 = load double, ptr %6, align 8, !tbaa !6
  %109 = fneg double %107
  %110 = call double @llvm.fmuladd.f64(double %109, double %108, double %77)
  %111 = fneg double %.065
  %112 = load double, ptr %8, align 8, !tbaa !6
  %113 = fmul double %112, %111
  %114 = call double @exp(double noundef %110) #5
  %115 = fmul double %113, %114
  br label %116

116:                                              ; preds = %42, %39, %106, %._crit_edge, %57, %53
  %.0 = phi double [ %105, %._crit_edge ], [ %115, %106 ], [ %61, %57 ], [ %54, %53 ], [ %44, %42 ], [ 0.000000e+00, %39 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #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

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

declare double @d1mach_(ptr noundef) local_unnamed_addr #3

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

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

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

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

declare double @d_int(ptr noundef) local_unnamed_addr #3

declare double @dgamr_(ptr noundef) local_unnamed_addr #3

declare i32 @dlgams_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare double @d9gmit_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare double @dlngam_(ptr noundef) local_unnamed_addr #3

declare double @d9lgit_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare double @d9lgic_(ptr noundef, ptr noundef, ptr 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 = { 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 #3 = { "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 = !{!"branch_weights", i32 1048575, i32 1}
!6 = !{!7, !7, i64 0}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LibCallsShrinkWrapPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass