; LLVM IR from CLASS-SZ/class_sz :: class-sz/tools (hyperspherical)

; 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"

%struct.HypersphericalInterpolationStructure = type { i32, double, double, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr }

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @hyperspherical_Hermite_interpolation_vector(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @hyperspherical_get_xmin(ptr noundef %0, double noundef %1, double noundef %2, ptr noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !9
  store double %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.HypersphericalInterpolationStructure, ptr %23, i32 0, i32 4
  %25 = load i32, ptr %24, align 4, !tbaa !11
  store i32 %25, ptr %13, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.HypersphericalInterpolationStructure, ptr %26, i32 0, i32 7
  %28 = load i32, ptr %27, align 8, !tbaa !15
  store i32 %28, ptr %14, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 10, ptr %15, align 4, !tbaa !14
  %29 = load i32, ptr %15, align 4, !tbaa !14
  %30 = zext i32 %29 to i64
  %31 = call ptr @llvm.stacksave.p0()
  store ptr %31, ptr %16, align 8
  %32 = alloca double, i64 %30, align 16
  store i64 %30, ptr %17, align 8
  %33 = load i32, ptr %15, align 4, !tbaa !14
  %34 = zext i32 %33 to i64
  %35 = alloca double, i64 %34, align 16
  store i64 %34, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.HypersphericalInterpolationStructure, ptr %36, i32 0, i32 11
  %38 = load ptr, ptr %37, align 8, !tbaa !16
  store ptr %38, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.HypersphericalInterpolationStructure, ptr %39, i32 0, i32 8
  %41 = load ptr, ptr %40, align 8, !tbaa !17
  store ptr %41, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  store i32 0, ptr %11, align 4, !tbaa !14
  br label %42

42:                                               ; preds = %182, %4
  %43 = load i32, ptr %11, align 4, !tbaa !14
  %44 = load i32, ptr %13, align 4, !tbaa !14
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %46, label %185

46:                                               ; preds = %42
  store i32 0, ptr %10, align 4, !tbaa !14
  br label %47

47:                                               ; preds = %66, %46
  %48 = load i32, ptr %10, align 4, !tbaa !14
  %49 = load i32, ptr %14, align 4, !tbaa !14
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %51, label %69

51:                                               ; preds = %47
  %52 = load ptr, ptr %19, align 8, !tbaa !5
  %53 = load i32, ptr %11, align 4, !tbaa !14
  %54 = load i32, ptr %14, align 4, !tbaa !14
  %55 = mul nsw i32 %53, %54
  %56 = load i32, ptr %10, align 4, !tbaa !14
  %57 = add nsw i32 %55, %56
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds double, ptr %52, i64 %58
  %60 = load double, ptr %59, align 8, !tbaa !9
  %61 = call double @llvm.fabs.f64(double %60)
  %62 = load double, ptr %7, align 8, !tbaa !9
  %63 = fcmp ogt double %61, %62
  br i1 %63, label %64, label %65

64:                                               ; preds = %51
  br label %69

65:                                               ; preds = %51
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %10, align 4, !tbaa !14
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %10, align 4, !tbaa !14
  br label %47, !llvm.loop !18

69:                                               ; preds = %64, %47
  %70 = load i32, ptr %10, align 4, !tbaa !14
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %72, label %80

72:                                               ; preds = %69
  %73 = load ptr, ptr %20, align 8, !tbaa !5
  %74 = getelementptr inbounds double, ptr %73, i64 0
  %75 = load double, ptr %74, align 8, !tbaa !9
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = load i32, ptr %11, align 4, !tbaa !14
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds double, ptr %76, i64 %78
  store double %75, ptr %79, align 8, !tbaa !9
  br label %182

80:                                               ; preds = %69
  %81 = load i32, ptr %10, align 4, !tbaa !14
  %82 = load i32, ptr %14, align 4, !tbaa !14
  %83 = icmp eq i32 %81, %82
  br i1 %83, label %84, label %95

84:                                               ; preds = %80
  %85 = load ptr, ptr %20, align 8, !tbaa !5
  %86 = load i32, ptr %14, align 4, !tbaa !14
  %87 = sub nsw i32 %86, 1
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds double, ptr %85, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !9
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = load i32, ptr %11, align 4, !tbaa !14
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds double, ptr %91, i64 %93
  store double %90, ptr %94, align 8, !tbaa !9
  br label %182

95:                                               ; preds = %80
  %96 = load i32, ptr %10, align 4, !tbaa !14
  %97 = sub nsw i32 %96, 1
  store i32 %97, ptr %9, align 4, !tbaa !14
  %98 = load ptr, ptr %20, align 8, !tbaa !5
  %99 = load i32, ptr %9, align 4, !tbaa !14
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds double, ptr %98, i64 %100
  %102 = load double, ptr %101, align 8, !tbaa !9
  store double %102, ptr %21, align 8, !tbaa !9
  %103 = load ptr, ptr %20, align 8, !tbaa !5
  %104 = load i32, ptr %10, align 4, !tbaa !14
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds double, ptr %103, i64 %105
  %107 = load double, ptr %106, align 8, !tbaa !9
  store double %107, ptr %22, align 8, !tbaa !9
  %108 = load double, ptr %22, align 8, !tbaa !9
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = load i32, ptr %11, align 4, !tbaa !14
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds double, ptr %109, i64 %111
  store double %108, ptr %112, align 8, !tbaa !9
  br label %113

113:                                              ; preds = %165, %95
  %114 = load double, ptr %22, align 8, !tbaa !9
  %115 = load double, ptr %21, align 8, !tbaa !9
  %116 = fsub double %114, %115
  %117 = load double, ptr %6, align 8, !tbaa !9
  %118 = fcmp ogt double %116, %117
  br i1 %118, label %119, label %181

119:                                              ; preds = %113
  store i32 0, ptr %12, align 4, !tbaa !14
  br label %120

120:                                              ; preds = %140, %119
  %121 = load i32, ptr %12, align 4, !tbaa !14
  %122 = load i32, ptr %15, align 4, !tbaa !14
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %124, label %143

124:                                              ; preds = %120
  %125 = load double, ptr %21, align 8, !tbaa !9
  %126 = load i32, ptr %12, align 4, !tbaa !14
  %127 = sitofp i32 %126 to double
  %128 = load double, ptr %22, align 8, !tbaa !9
  %129 = load double, ptr %21, align 8, !tbaa !9
  %130 = fsub double %128, %129
  %131 = fmul double %127, %130
  %132 = load i32, ptr %15, align 4, !tbaa !14
  %133 = sitofp i32 %132 to double
  %134 = fsub double %133, 1.000000e+00
  %135 = fdiv double %131, %134
  %136 = fadd double %125, %135
  %137 = load i32, ptr %12, align 4, !tbaa !14
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds double, ptr %32, i64 %138
  store double %136, ptr %139, align 8, !tbaa !9
  br label %140

140:                                              ; preds = %124
  %141 = load i32, ptr %12, align 4, !tbaa !14
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %12, align 4, !tbaa !14
  br label %120, !llvm.loop !20

143:                                              ; preds = %120
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = load i32, ptr %15, align 4, !tbaa !14
  %146 = load i32, ptr %11, align 4, !tbaa !14
  %147 = call i32 @hyperspherical_Hermite_interpolation_vector(ptr noundef %144, i32 noundef %145, i32 noundef %146, ptr noundef %32, ptr noundef %35, ptr noundef null, ptr noundef null)
  store i32 1, ptr %10, align 4, !tbaa !14
  br label %148

148:                                              ; preds = %162, %143
  %149 = load i32, ptr %10, align 4, !tbaa !14
  %150 = load i32, ptr %15, align 4, !tbaa !14
  %151 = icmp slt i32 %149, %150
  br i1 %151, label %152, label %165

152:                                              ; preds = %148
  %153 = load i32, ptr %10, align 4, !tbaa !14
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds double, ptr %35, i64 %154
  %156 = load double, ptr %155, align 8, !tbaa !9
  %157 = call double @llvm.fabs.f64(double %156)
  %158 = load double, ptr %7, align 8, !tbaa !9
  %159 = fcmp ogt double %157, %158
  br i1 %159, label %160, label %161

160:                                              ; preds = %152
  br label %165

161:                                              ; preds = %152
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %10, align 4, !tbaa !14
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %10, align 4, !tbaa !14
  br label %148, !llvm.loop !21

165:                                              ; preds = %160, %148
  %166 = load i32, ptr %10, align 4, !tbaa !14
  %167 = sub nsw i32 %166, 1
  store i32 %167, ptr %9, align 4, !tbaa !14
  %168 = load i32, ptr %9, align 4, !tbaa !14
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds double, ptr %32, i64 %169
  %171 = load double, ptr %170, align 8, !tbaa !9
  store double %171, ptr %21, align 8, !tbaa !9
  %172 = load i32, ptr %10, align 4, !tbaa !14
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds double, ptr %32, i64 %173
  %175 = load double, ptr %174, align 8, !tbaa !9
  store double %175, ptr %22, align 8, !tbaa !9
  %176 = load double, ptr %22, align 8, !tbaa !9
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = load i32, ptr %11, align 4, !tbaa !14
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds double, ptr %177, i64 %179
  store double %176, ptr %180, align 8, !tbaa !9
  br label %113, !llvm.loop !22

181:                                              ; preds = %113
  br label %182

182:                                              ; preds = %181, %84, %72
  %183 = load i32, ptr %11, align 4, !tbaa !14
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %11, align 4, !tbaa !14
  br label %42, !llvm.loop !23

185:                                              ; preds = %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  %186 = load ptr, ptr %16, align 8
  call void @llvm.stackrestore.p0(ptr %186)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret i32 0
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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, !13, i64 28}
!12 = !{!"HypersphericalInterpolationStructure", !13, i64 0, !10, i64 8, !10, i64 16, !13, i64 24, !13, i64 28, !6, i64 32, !6, i64 40, !13, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!12, !13, i64 48}
!16 = !{!12, !6, i64 80}
!17 = !{!12, !6, i64 56}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}


; 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"

; Function Attrs: nounwind uwtable
declare dso_local i32 @hyperspherical_Hermite_interpolation_vector(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @hyperspherical_get_xmin(ptr noundef %0, double noundef %1, double noundef %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 28
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 48
  %8 = load i32, ptr %7, align 8, !tbaa !12
  %9 = alloca [10 x double], align 16
  %10 = alloca [10 x double], align 16
  %11 = getelementptr inbounds i8, ptr %0, i64 80
  %12 = load ptr, ptr %11, align 8, !tbaa !13
  %13 = getelementptr inbounds i8, ptr %0, i64 56
  %14 = load ptr, ptr %13, align 8, !tbaa !14
  %15 = icmp sgt i32 %6, 0
  %.1.lcssa.sroa.gep = getelementptr inbounds i8, ptr %9, i64 8
  %.1.lcssa.sroa.gep102 = getelementptr inbounds i8, ptr %9, i64 16
  %.1.lcssa.sroa.gep103 = getelementptr inbounds i8, ptr %9, i64 24
  %.1.lcssa.sroa.gep104 = getelementptr inbounds i8, ptr %9, i64 32
  %.1.lcssa.sroa.gep105 = getelementptr inbounds i8, ptr %9, i64 40
  %.1.lcssa.sroa.gep106 = getelementptr inbounds i8, ptr %9, i64 48
  %.1.lcssa.sroa.gep107 = getelementptr inbounds i8, ptr %9, i64 56
  %.1.lcssa.sroa.gep108 = getelementptr inbounds i8, ptr %9, i64 64
  %.1.lcssa.sroa.gep109 = getelementptr inbounds i8, ptr %9, i64 72
  %.1.lcssa.sroa.gep110 = getelementptr inbounds i8, ptr %9, i64 80
  br i1 %15, label %.preheader68.lr.ph, label %._crit_edge79

.preheader68.lr.ph:                               ; preds = %4
  %invariant.gep = getelementptr i8, ptr %14, i64 -8
  %16 = icmp sgt i32 %8, 0
  %17 = sext i32 %8 to i64
  %gep = getelementptr double, ptr %invariant.gep, i64 %17
  %wide.trip.count92 = zext nneg i32 %6 to i64
  %wide.trip.count = zext nneg i32 %8 to i64
  %18 = getelementptr inbounds i8, ptr %9, i64 16
  %19 = getelementptr inbounds i8, ptr %9, i64 32
  %20 = getelementptr inbounds i8, ptr %9, i64 48
  %21 = getelementptr inbounds i8, ptr %9, i64 64
  %22 = getelementptr inbounds i8, ptr %10, i64 8
  %23 = getelementptr inbounds i8, ptr %10, i64 16
  %24 = getelementptr inbounds i8, ptr %10, i64 24
  %25 = getelementptr inbounds i8, ptr %10, i64 32
  %26 = getelementptr inbounds i8, ptr %10, i64 40
  %27 = getelementptr inbounds i8, ptr %10, i64 48
  %28 = getelementptr inbounds i8, ptr %10, i64 56
  %29 = getelementptr inbounds i8, ptr %10, i64 64
  %30 = getelementptr inbounds i8, ptr %10, i64 72
  br label %.preheader68

.preheader68:                                     ; preds = %.preheader68.lr.ph, %.loopexit
  %indvars.iv89 = phi i64 [ 0, %.preheader68.lr.ph ], [ %indvars.iv.next90, %.loopexit ]
  br i1 %16, label %.lr.ph.preheader, label %.loopexit.sink.split

.lr.ph.preheader:                                 ; preds = %.preheader68
  %31 = trunc i64 %indvars.iv89 to i32
  %32 = mul i32 %8, %31
  %33 = zext i32 %32 to i64
  %invariant.gep97 = getelementptr inbounds double, ptr %12, i64 %33
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %37
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %37 ]
  %gep98 = getelementptr inbounds double, ptr %invariant.gep97, i64 %indvars.iv
  %34 = load double, ptr %gep98, align 8, !tbaa !15
  %35 = call double @llvm.fabs.f64(double %34)
  %36 = fcmp ogt double %35, %2
  br i1 %36, label %._crit_edge.split.loop.exit95, label %37

37:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !16

._crit_edge.split.loop.exit95:                    ; preds = %.lr.ph
  %38 = trunc nuw nsw i64 %indvars.iv to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %37, %._crit_edge.split.loop.exit95
  %.062.lcssa = phi i32 [ %38, %._crit_edge.split.loop.exit95 ], [ %8, %37 ]
  %39 = icmp eq i32 %.062.lcssa, 0
  br i1 %39, label %.loopexit.sink.split, label %40

40:                                               ; preds = %._crit_edge
  %41 = icmp eq i32 %.062.lcssa, %8
  br i1 %41, label %.loopexit.sink.split, label %42

42:                                               ; preds = %40
  %43 = zext nneg i32 %.062.lcssa to i64
  %44 = getelementptr double, ptr %14, i64 %43
  %45 = getelementptr inbounds double, ptr %3, i64 %indvars.iv89
  %.061.in74 = getelementptr i8, ptr %44, i64 -8
  %.075 = load double, ptr %44, align 8, !tbaa !15
  %.06176 = load double, ptr %.061.in74, align 8, !tbaa !15
  store double %.075, ptr %45, align 8, !tbaa !15
  %46 = fsub double %.075, %.06176
  %47 = fcmp ogt double %46, %1
  br i1 %47, label %.preheader.preheader, label %.loopexit

.preheader.preheader:                             ; preds = %42
  %48 = trunc nuw nsw i64 %indvars.iv89 to i32
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %108
  %49 = phi double [ %109, %108 ], [ %46, %.preheader.preheader ]
  %.06177 = phi double [ %.061, %108 ], [ %.06176, %.preheader.preheader ]
  %50 = fmul double %49, 0.000000e+00
  %51 = insertelement <2 x double> poison, double %50, i64 0
  %52 = insertelement <2 x double> %51, double %49, i64 1
  %53 = fdiv <2 x double> %52, <double 9.000000e+00, double 9.000000e+00>
  %54 = insertelement <2 x double> poison, double %.06177, i64 0
  %55 = shufflevector <2 x double> %54, <2 x double> poison, <2 x i32> zeroinitializer
  %56 = fadd <2 x double> %55, %53
  store <2 x double> %56, ptr %9, align 16, !tbaa !15
  %57 = insertelement <2 x double> poison, double %49, i64 0
  %58 = shufflevector <2 x double> %57, <2 x double> poison, <2 x i32> zeroinitializer
  %59 = fmul <2 x double> %58, <double 2.000000e+00, double 3.000000e+00>
  %60 = fdiv <2 x double> %59, <double 9.000000e+00, double 9.000000e+00>
  %61 = fadd <2 x double> %55, %60
  store <2 x double> %61, ptr %18, align 16, !tbaa !15
  %62 = fmul <2 x double> %58, <double 4.000000e+00, double 5.000000e+00>
  %63 = fdiv <2 x double> %62, <double 9.000000e+00, double 9.000000e+00>
  %64 = fadd <2 x double> %55, %63
  store <2 x double> %64, ptr %19, align 16, !tbaa !15
  %65 = fmul <2 x double> %58, <double 6.000000e+00, double 7.000000e+00>
  %66 = fdiv <2 x double> %65, <double 9.000000e+00, double 9.000000e+00>
  %67 = fadd <2 x double> %55, %66
  store <2 x double> %67, ptr %20, align 16, !tbaa !15
  %68 = fmul <2 x double> %58, <double 8.000000e+00, double 9.000000e+00>
  %69 = fdiv <2 x double> %68, <double 9.000000e+00, double 9.000000e+00>
  %70 = fadd <2 x double> %55, %69
  store <2 x double> %70, ptr %21, align 16, !tbaa !15
  %71 = call i32 @hyperspherical_Hermite_interpolation_vector(ptr noundef %0, i32 noundef 10, i32 noundef %48, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef null, ptr noundef null)
  %72 = load double, ptr %22, align 8, !tbaa !15
  %73 = call double @llvm.fabs.f64(double %72)
  %74 = fcmp ogt double %73, %2
  br i1 %74, label %108, label %75

75:                                               ; preds = %.preheader
  %76 = load double, ptr %23, align 16, !tbaa !15
  %77 = call double @llvm.fabs.f64(double %76)
  %78 = fcmp ogt double %77, %2
  br i1 %78, label %108, label %79

79:                                               ; preds = %75
  %80 = load double, ptr %24, align 8, !tbaa !15
  %81 = call double @llvm.fabs.f64(double %80)
  %82 = fcmp ogt double %81, %2
  br i1 %82, label %108, label %83

83:                                               ; preds = %79
  %84 = load double, ptr %25, align 16, !tbaa !15
  %85 = call double @llvm.fabs.f64(double %84)
  %86 = fcmp ogt double %85, %2
  br i1 %86, label %108, label %87

87:                                               ; preds = %83
  %88 = load double, ptr %26, align 8, !tbaa !15
  %89 = call double @llvm.fabs.f64(double %88)
  %90 = fcmp ogt double %89, %2
  br i1 %90, label %108, label %91

91:                                               ; preds = %87
  %92 = load double, ptr %27, align 16, !tbaa !15
  %93 = call double @llvm.fabs.f64(double %92)
  %94 = fcmp ogt double %93, %2
  br i1 %94, label %108, label %95

95:                                               ; preds = %91
  %96 = load double, ptr %28, align 8, !tbaa !15
  %97 = call double @llvm.fabs.f64(double %96)
  %98 = fcmp ogt double %97, %2
  br i1 %98, label %108, label %99

99:                                               ; preds = %95
  %100 = load double, ptr %29, align 16, !tbaa !15
  %101 = call double @llvm.fabs.f64(double %100)
  %102 = fcmp ogt double %101, %2
  br i1 %102, label %108, label %103

103:                                              ; preds = %99
  %104 = load double, ptr %30, align 8, !tbaa !15
  %105 = call double @llvm.fabs.f64(double %104)
  %106 = fcmp ogt double %105, %2
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  br label %108

108:                                              ; preds = %107, %103, %99, %95, %91, %87, %83, %79, %75, %.preheader
  %.1.lcssa.sroa.phi = phi ptr [ %.1.lcssa.sroa.gep, %.preheader ], [ %.1.lcssa.sroa.gep102, %75 ], [ %.1.lcssa.sroa.gep103, %79 ], [ %.1.lcssa.sroa.gep104, %83 ], [ %.1.lcssa.sroa.gep105, %87 ], [ %.1.lcssa.sroa.gep106, %91 ], [ %.1.lcssa.sroa.gep107, %95 ], [ %.1.lcssa.sroa.gep108, %99 ], [ %.1.lcssa.sroa.gep109, %103 ], [ %.1.lcssa.sroa.gep110, %107 ]
  %.061.in = getelementptr i8, ptr %.1.lcssa.sroa.phi, i64 -8
  %.0 = load double, ptr %.1.lcssa.sroa.phi, align 8, !tbaa !15
  %.061 = load double, ptr %.061.in, align 8, !tbaa !15
  store double %.0, ptr %45, align 8, !tbaa !15
  %109 = fsub double %.0, %.061
  %110 = fcmp ogt double %109, %1
  br i1 %110, label %.preheader, label %.loopexit, !llvm.loop !18

.loopexit.sink.split:                             ; preds = %40, %._crit_edge, %.preheader68
  %gep.sink = phi ptr [ %14, %.preheader68 ], [ %14, %._crit_edge ], [ %gep, %40 ]
  %111 = load double, ptr %gep.sink, align 8, !tbaa !15
  %112 = getelementptr inbounds double, ptr %3, i64 %indvars.iv89
  store double %111, ptr %112, align 8, !tbaa !15
  br label %.loopexit

.loopexit:                                        ; preds = %108, %.loopexit.sink.split, %42
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %exitcond93.not = icmp eq i64 %indvars.iv.next90, %wide.trip.count92
  br i1 %exitcond93.not, label %._crit_edge79, label %.preheader68, !llvm.loop !19

._crit_edge79:                                    ; preds = %.loopexit, %4
  ret i32 0
}

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 speculatable willreturn memory(none) }

!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, !7, i64 28}
!6 = !{!"HypersphericalInterpolationStructure", !7, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !11, i64 32, !11, i64 40, !7, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !7, i64 48}
!13 = !{!6, !11, i64 80}
!14 = !{!6, !11, i64 56}
!15 = !{!10, !10, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


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