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

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

@.str.1 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [25 x i8], align 1
@__func__.array_interpolate_spline_growing_closeby = external hidden unnamed_addr constant [41 x i8], align 1

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

declare void @class_protect_sprintf(ptr noundef, ptr noundef, ...) #1

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

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @array_interpolate_spline_growing_closeby(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, double noundef %5, ptr noundef %6, ptr noundef %7, i32 noundef %8, ptr noundef %9) #4 {
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca double, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca [2048 x i8], align 16
  %29 = alloca [2048 x i8], align 16
  %30 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store i32 %1, ptr %13, align 4, !tbaa !9
  store ptr %2, ptr %14, align 8, !tbaa !5
  store ptr %3, ptr %15, align 8, !tbaa !5
  store i32 %4, ptr %16, align 4, !tbaa !9
  store double %5, ptr %17, align 8, !tbaa !11
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store i32 %8, ptr %20, align 4, !tbaa !9
  store ptr %9, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 4, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %31 = load ptr, ptr %18, align 8, !tbaa !5
  %32 = load i32, ptr %31, align 4, !tbaa !9
  store i32 %32, ptr %22, align 4, !tbaa !9
  %33 = load i32, ptr %22, align 4, !tbaa !9
  %34 = icmp slt i32 %33, 0
  br i1 %34, label %40, label %35

35:                                               ; preds = %10
  %36 = load i32, ptr %22, align 4, !tbaa !9
  %37 = load i32, ptr %13, align 4, !tbaa !9
  %38 = sub nsw i32 %37, 1
  %39 = icmp sgt i32 %36, %38
  br i1 %39, label %40, label %49

40:                                               ; preds = %35, %10
  call void @llvm.lifetime.start.p0(i64 2048, ptr %28) #5
  %41 = getelementptr inbounds [2048 x i8], ptr %28, i64 0, i64 0
  %42 = load i32, ptr %22, align 4, !tbaa !9
  %43 = load i32, ptr %13, align 4, !tbaa !9
  %44 = sub nsw i32 %43, 1
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %41, ptr noundef @.str.34, i32 noundef %42, i32 noundef %44)
  call void @llvm.lifetime.start.p0(i64 2048, ptr %29) #5
  %45 = getelementptr inbounds [2048 x i8], ptr %29, i64 0, i64 0
  %46 = getelementptr inbounds [2048 x i8], ptr %28, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %45, ptr noundef @.str.1, ptr noundef @.str.35, ptr noundef %46)
  %47 = load ptr, ptr %21, align 8, !tbaa !5
  %48 = getelementptr inbounds [2048 x i8], ptr %29, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %47, ptr noundef @.str.3, ptr noundef @__func__.array_interpolate_spline_growing_closeby, i32 noundef 2422, ptr noundef %48)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr %28) #5
  store i32 1, ptr %11, align 4
  store i32 1, ptr %30, align 4
  br label %206

49:                                               ; preds = %35
  br label %50

50:                                               ; preds = %70, %49
  %51 = load double, ptr %17, align 8, !tbaa !11
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = load i32, ptr %22, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds double, ptr %52, i64 %54
  %56 = load double, ptr %55, align 8, !tbaa !11
  %57 = fcmp olt double %51, %56
  br i1 %57, label %58, label %71

58:                                               ; preds = %50
  %59 = load i32, ptr %22, align 4, !tbaa !9
  %60 = add nsw i32 %59, -1
  store i32 %60, ptr %22, align 4, !tbaa !9
  %61 = load i32, ptr %22, align 4, !tbaa !9
  %62 = icmp slt i32 %61, 0
  br i1 %62, label %63, label %70

63:                                               ; preds = %58
  %64 = load ptr, ptr %21, align 8, !tbaa !5
  %65 = load double, ptr %17, align 8, !tbaa !11
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = getelementptr inbounds double, ptr %66, i64 0
  %68 = load double, ptr %67, align 8, !tbaa !11
  %69 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %64, ptr noundef @.str.30, ptr noundef @__func__.array_interpolate_spline_growing_closeby, i32 noundef 2426, double noundef %65, double noundef %68) #5
  store i32 1, ptr %11, align 4
  store i32 1, ptr %30, align 4
  br label %206

70:                                               ; preds = %58
  br label %50, !llvm.loop !13

71:                                               ; preds = %50
  %72 = load i32, ptr %22, align 4, !tbaa !9
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %23, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %99, %71
  %75 = load double, ptr %17, align 8, !tbaa !11
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = load i32, ptr %23, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds double, ptr %76, i64 %78
  %80 = load double, ptr %79, align 8, !tbaa !11
  %81 = fcmp ogt double %75, %80
  br i1 %81, label %82, label %100

82:                                               ; preds = %74
  %83 = load i32, ptr %23, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %23, align 4, !tbaa !9
  %85 = load i32, ptr %23, align 4, !tbaa !9
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = sub nsw i32 %86, 1
  %88 = icmp sgt i32 %85, %87
  br i1 %88, label %89, label %99

89:                                               ; preds = %82
  %90 = load ptr, ptr %21, align 8, !tbaa !5
  %91 = load double, ptr %17, align 8, !tbaa !11
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  %93 = load i32, ptr %13, align 4, !tbaa !9
  %94 = sub nsw i32 %93, 1
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds double, ptr %92, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !11
  %98 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %90, ptr noundef @.str.31, ptr noundef @__func__.array_interpolate_spline_growing_closeby, i32 noundef 2435, double noundef %91, double noundef %97) #5
  store i32 1, ptr %11, align 4
  store i32 1, ptr %30, align 4
  br label %206

99:                                               ; preds = %82
  br label %74, !llvm.loop !15

100:                                              ; preds = %74
  %101 = load i32, ptr %23, align 4, !tbaa !9
  %102 = sub nsw i32 %101, 1
  store i32 %102, ptr %22, align 4, !tbaa !9
  %103 = load i32, ptr %22, align 4, !tbaa !9
  %104 = load ptr, ptr %18, align 8, !tbaa !5
  store i32 %103, ptr %104, align 4, !tbaa !9
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = load i32, ptr %23, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds double, ptr %105, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !11
  %110 = load ptr, ptr %12, align 8, !tbaa !5
  %111 = load i32, ptr %22, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds double, ptr %110, i64 %112
  %114 = load double, ptr %113, align 8, !tbaa !11
  %115 = fsub double %109, %114
  store double %115, ptr %25, align 8, !tbaa !11
  %116 = load double, ptr %17, align 8, !tbaa !11
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = load i32, ptr %22, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds double, ptr %117, i64 %119
  %121 = load double, ptr %120, align 8, !tbaa !11
  %122 = fsub double %116, %121
  %123 = load double, ptr %25, align 8, !tbaa !11
  %124 = fdiv double %122, %123
  store double %124, ptr %27, align 8, !tbaa !11
  %125 = load double, ptr %27, align 8, !tbaa !11
  %126 = fsub double 1.000000e+00, %125
  store double %126, ptr %26, align 8, !tbaa !11
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %127

127:                                              ; preds = %202, %100
  %128 = load i32, ptr %24, align 4, !tbaa !9
  %129 = load i32, ptr %20, align 4, !tbaa !9
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %131, label %205

131:                                              ; preds = %127
  %132 = load double, ptr %26, align 8, !tbaa !11
  %133 = load ptr, ptr %14, align 8, !tbaa !5
  %134 = load i32, ptr %22, align 4, !tbaa !9
  %135 = load i32, ptr %16, align 4, !tbaa !9
  %136 = mul nsw i32 %134, %135
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds double, ptr %133, i64 %137
  %139 = load i32, ptr %24, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds double, ptr %138, i64 %140
  %142 = load double, ptr %141, align 8, !tbaa !11
  %143 = load double, ptr %27, align 8, !tbaa !11
  %144 = load ptr, ptr %14, align 8, !tbaa !5
  %145 = load i32, ptr %23, align 4, !tbaa !9
  %146 = load i32, ptr %16, align 4, !tbaa !9
  %147 = mul nsw i32 %145, %146
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds double, ptr %144, i64 %148
  %150 = load i32, ptr %24, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds double, ptr %149, i64 %151
  %153 = load double, ptr %152, align 8, !tbaa !11
  %154 = fmul double %143, %153
  %155 = call double @llvm.fmuladd.f64(double %132, double %142, double %154)
  %156 = load double, ptr %26, align 8, !tbaa !11
  %157 = load double, ptr %26, align 8, !tbaa !11
  %158 = fmul double %156, %157
  %159 = load double, ptr %26, align 8, !tbaa !11
  %160 = load double, ptr %26, align 8, !tbaa !11
  %161 = fneg double %160
  %162 = call double @llvm.fmuladd.f64(double %158, double %159, double %161)
  %163 = load ptr, ptr %15, align 8, !tbaa !5
  %164 = load i32, ptr %22, align 4, !tbaa !9
  %165 = load i32, ptr %16, align 4, !tbaa !9
  %166 = mul nsw i32 %164, %165
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds double, ptr %163, i64 %167
  %169 = load i32, ptr %24, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds double, ptr %168, i64 %170
  %172 = load double, ptr %171, align 8, !tbaa !11
  %173 = load double, ptr %27, align 8, !tbaa !11
  %174 = load double, ptr %27, align 8, !tbaa !11
  %175 = fmul double %173, %174
  %176 = load double, ptr %27, align 8, !tbaa !11
  %177 = load double, ptr %27, align 8, !tbaa !11
  %178 = fneg double %177
  %179 = call double @llvm.fmuladd.f64(double %175, double %176, double %178)
  %180 = load ptr, ptr %15, align 8, !tbaa !5
  %181 = load i32, ptr %23, align 4, !tbaa !9
  %182 = load i32, ptr %16, align 4, !tbaa !9
  %183 = mul nsw i32 %181, %182
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds double, ptr %180, i64 %184
  %186 = load i32, ptr %24, align 4, !tbaa !9
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds double, ptr %185, i64 %187
  %189 = load double, ptr %188, align 8, !tbaa !11
  %190 = fmul double %179, %189
  %191 = call double @llvm.fmuladd.f64(double %162, double %172, double %190)
  %192 = load double, ptr %25, align 8, !tbaa !11
  %193 = fmul double %191, %192
  %194 = load double, ptr %25, align 8, !tbaa !11
  %195 = fmul double %193, %194
  %196 = fdiv double %195, 6.000000e+00
  %197 = fadd double %155, %196
  %198 = load ptr, ptr %19, align 8, !tbaa !5
  %199 = load i32, ptr %24, align 4, !tbaa !9
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds double, ptr %198, i64 %200
  store double %197, ptr %201, align 8, !tbaa !11
  br label %202

202:                                              ; preds = %131
  %203 = load i32, ptr %24, align 4, !tbaa !9
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %24, align 4, !tbaa !9
  br label %127, !llvm.loop !16

205:                                              ; preds = %127
  store i32 0, ptr %11, align 4
  store i32 1, ptr %30, align 4
  br label %206

206:                                              ; preds = %205, %89, %63, %40
  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 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  %207 = load i32, ptr %11, align 4
  ret i32 %207
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = { 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !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"

@.str.1 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [25 x i8], align 1
@__func__.array_interpolate_spline_growing_closeby = external hidden unnamed_addr constant [41 x i8], align 1

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

declare void @class_protect_sprintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #1

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @array_interpolate_spline_growing_closeby(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3, i32 noundef %4, double noundef %5, ptr nocapture noundef %6, ptr nocapture noundef writeonly %7, i32 noundef %8, ptr noundef %9) local_unnamed_addr #4 {
  %11 = ptrtoint ptr %3 to i64
  %12 = ptrtoint ptr %2 to i64
  %13 = ptrtoint ptr %7 to i64
  %14 = alloca [2048 x i8], align 16
  %15 = alloca [2048 x i8], align 16
  %16 = load i32, ptr %6, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, -1
  %.pre = add nsw i32 %1, -1
  %.not = icmp slt i32 %16, %1
  %or.cond = and i1 %17, %.not
  br i1 %or.cond, label %.preheader80.preheader, label %._crit_edge

.preheader80.preheader:                           ; preds = %10
  %18 = zext nneg i32 %16 to i64
  br label %.preheader80

._crit_edge:                                      ; preds = %10
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %14) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %14, ptr noundef nonnull @.str.34, i32 noundef %16, i32 noundef %.pre) #6
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %15) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %15, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.35, ptr noundef nonnull %14) #6
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %9, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.array_interpolate_spline_growing_closeby, i32 noundef 2422, ptr noundef nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %14) #6
  br label %.loopexit

.preheader80:                                     ; preds = %.preheader80.preheader, %23
  %indvars.iv91 = phi i32 [ %16, %.preheader80.preheader ], [ %indvars.iv.next92, %23 ]
  %indvars.iv = phi i64 [ %18, %.preheader80.preheader ], [ %indvars.iv.next, %23 ]
  %19 = getelementptr inbounds double, ptr %0, i64 %indvars.iv
  %20 = load double, ptr %19, align 8, !tbaa !9
  %21 = fcmp ogt double %20, %5
  br i1 %21, label %23, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader80
  %22 = zext i32 %indvars.iv91 to i64
  br label %.preheader

23:                                               ; preds = %.preheader80
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %24 = icmp slt i64 %indvars.iv, 1
  %indvars.iv.next92 = add i32 %indvars.iv91, -1
  br i1 %24, label %25, label %.preheader80, !llvm.loop !11

25:                                               ; preds = %23
  %26 = load double, ptr %0, align 8, !tbaa !9
  %27 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) @.str.30, ptr noundef nonnull @__func__.array_interpolate_spline_growing_closeby, i32 noundef 2426, double noundef %5, double noundef %26) #6
  br label %.loopexit

.preheader:                                       ; preds = %.preheader.preheader, %31
  %indvars.iv94 = phi i64 [ %22, %.preheader.preheader ], [ %indvars.iv.next95, %31 ]
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %28 = getelementptr inbounds double, ptr %0, i64 %indvars.iv.next95
  %29 = load double, ptr %28, align 8, !tbaa !9
  %30 = fcmp olt double %29, %5
  br i1 %30, label %31, label %38

31:                                               ; preds = %.preheader
  %32 = trunc nuw i64 %indvars.iv.next95 to i32
  %.not79 = icmp sgt i32 %.pre, %32
  br i1 %.not79, label %.preheader, label %33, !llvm.loop !13

33:                                               ; preds = %31
  %34 = sext i32 %.pre to i64
  %35 = getelementptr inbounds double, ptr %0, i64 %34
  %36 = load double, ptr %35, align 8, !tbaa !9
  %37 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) @.str.31, ptr noundef nonnull @__func__.array_interpolate_spline_growing_closeby, i32 noundef 2435, double noundef %5, double noundef %36) #6
  br label %.loopexit

38:                                               ; preds = %.preheader
  %39 = trunc nuw i64 %indvars.iv94 to i32
  store i32 %39, ptr %6, align 4, !tbaa !5
  %40 = and i64 %indvars.iv94, 4294967295
  %41 = getelementptr inbounds double, ptr %0, i64 %40
  %42 = load double, ptr %41, align 8, !tbaa !9
  %43 = fsub double %29, %42
  %44 = fsub double %5, %42
  %45 = fdiv double %44, %43
  %46 = fsub double 1.000000e+00, %45
  %47 = icmp sgt i32 %8, 0
  br i1 %47, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %38
  %48 = trunc nuw i64 %indvars.iv.next95 to i32
  %49 = mul nsw i32 %39, %4
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds double, ptr %2, i64 %50
  %52 = mul nsw i32 %48, %4
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds double, ptr %2, i64 %53
  %55 = fmul double %46, %46
  %56 = fneg double %46
  %57 = tail call double @llvm.fmuladd.f64(double %55, double %46, double %56)
  %58 = getelementptr inbounds double, ptr %3, i64 %50
  %59 = fmul double %45, %45
  %60 = fneg double %45
  %61 = tail call double @llvm.fmuladd.f64(double %59, double %45, double %60)
  %62 = getelementptr inbounds double, ptr %3, i64 %53
  %wide.trip.count = zext nneg i32 %8 to i64
  %min.iters.check = icmp ult i32 %8, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph
  %63 = sub i64 %13, %12
  %64 = shl nsw i64 %53, 3
  %65 = sub i64 %63, %64
  %diff.check = icmp ult i64 %65, 16
  %66 = shl nsw i64 %50, 3
  %67 = sub i64 %63, %66
  %diff.check108 = icmp ult i64 %67, 16
  %conflict.rdx = or i1 %diff.check, %diff.check108
  %68 = sub i64 %13, %11
  %69 = sub i64 %68, %64
  %diff.check109 = icmp ult i64 %69, 16
  %conflict.rdx110 = or i1 %conflict.rdx, %diff.check109
  %70 = sub i64 %68, %66
  %diff.check111 = icmp ult i64 %70, 16
  %conflict.rdx112 = or i1 %conflict.rdx110, %diff.check111
  br i1 %conflict.rdx112, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 2147483646
  %broadcast.splatinsert = insertelement <2 x double> poison, double %45, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert114 = insertelement <2 x double> poison, double %46, i64 0
  %broadcast.splat115 = shufflevector <2 x double> %broadcast.splatinsert114, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert118 = insertelement <2 x double> poison, double %61, i64 0
  %broadcast.splat119 = shufflevector <2 x double> %broadcast.splatinsert118, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert120 = insertelement <2 x double> poison, double %57, i64 0
  %broadcast.splat121 = shufflevector <2 x double> %broadcast.splatinsert120, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert122 = insertelement <2 x double> poison, double %43, i64 0
  %broadcast.splat123 = shufflevector <2 x double> %broadcast.splatinsert122, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %71 = getelementptr inbounds double, ptr %51, i64 %index
  %wide.load = load <2 x double>, ptr %71, align 8, !tbaa !9
  %72 = getelementptr inbounds double, ptr %54, i64 %index
  %wide.load113 = load <2 x double>, ptr %72, align 8, !tbaa !9
  %73 = fmul <2 x double> %broadcast.splat, %wide.load113
  %74 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat115, <2 x double> %wide.load, <2 x double> %73)
  %75 = getelementptr inbounds double, ptr %58, i64 %index
  %wide.load116 = load <2 x double>, ptr %75, align 8, !tbaa !9
  %76 = getelementptr inbounds double, ptr %62, i64 %index
  %wide.load117 = load <2 x double>, ptr %76, align 8, !tbaa !9
  %77 = fmul <2 x double> %broadcast.splat119, %wide.load117
  %78 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat121, <2 x double> %wide.load116, <2 x double> %77)
  %79 = fmul <2 x double> %broadcast.splat123, %78
  %80 = fmul <2 x double> %broadcast.splat123, %79
  %81 = fdiv <2 x double> %80, <double 6.000000e+00, double 6.000000e+00>
  %82 = fadd <2 x double> %74, %81
  %83 = getelementptr inbounds double, ptr %7, i64 %index
  store <2 x double> %82, ptr %83, align 8, !tbaa !9
  %index.next = add nuw i64 %index, 2
  %84 = icmp eq i64 %index.next, %n.vec
  br i1 %84, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.loopexit, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph
  %indvars.iv97.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv97 = phi i64 [ %indvars.iv.next98, %scalar.ph ], [ %indvars.iv97.ph, %scalar.ph.preheader ]
  %85 = getelementptr inbounds double, ptr %51, i64 %indvars.iv97
  %86 = load double, ptr %85, align 8, !tbaa !9
  %87 = getelementptr inbounds double, ptr %54, i64 %indvars.iv97
  %88 = load double, ptr %87, align 8, !tbaa !9
  %89 = fmul double %45, %88
  %90 = tail call double @llvm.fmuladd.f64(double %46, double %86, double %89)
  %91 = getelementptr inbounds double, ptr %58, i64 %indvars.iv97
  %92 = load double, ptr %91, align 8, !tbaa !9
  %93 = getelementptr inbounds double, ptr %62, i64 %indvars.iv97
  %94 = load double, ptr %93, align 8, !tbaa !9
  %95 = fmul double %61, %94
  %96 = tail call double @llvm.fmuladd.f64(double %57, double %92, double %95)
  %97 = fmul double %43, %96
  %98 = fmul double %43, %97
  %99 = fdiv double %98, 6.000000e+00
  %100 = fadd double %90, %99
  %101 = getelementptr inbounds double, ptr %7, i64 %indvars.iv97
  store double %100, ptr %101, align 8, !tbaa !9
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next98, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %scalar.ph, !llvm.loop !17

.loopexit:                                        ; preds = %scalar.ph, %middle.block, %38, %33, %25, %._crit_edge
  %.0 = phi i32 [ 1, %._crit_edge ], [ 1, %25 ], [ 1, %33 ], [ 0, %38 ], [ 0, %middle.block ], [ 0, %scalar.ph ]
  ret i32 %.0
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nofree 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 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 = !{!"int", !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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !12, !15}


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