; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src (interpolation)

; 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.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::spline2dinterpolant" = type { i64, i8, i64, i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }

@.str.820 = external hidden unnamed_addr constant [61 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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl17spline2dlintransfEPNS_19spline2dinterpolantEddPNS_8ae_stateE(ptr noundef %0, double noundef %1, double noundef %2, ptr noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca %"struct.alglib_impl::ae_vector", align 8
  %11 = alloca %"struct.alglib_impl::ae_vector", align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", align 8
  %13 = alloca %"struct.alglib_impl::ae_vector", align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, 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 32, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 64, 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
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %16, ptr noundef %9)
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 64, i1 false)
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %10, i64 noundef 0, i64 noundef 3, ptr noundef %17, i1 noundef zeroext true)
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %11, i64 noundef 0, i64 noundef 3, ptr noundef %18, i1 noundef zeroext true)
  %19 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %12, i64 noundef 0, i64 noundef 3, ptr noundef %19, i1 noundef zeroext true)
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %13, i64 noundef 0, i64 noundef 1, ptr noundef %20, i1 noundef zeroext true)
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %21, i32 0, i32 0
  %23 = load i64, ptr %22, align 8, !tbaa !11
  %24 = icmp eq i64 %23, -3
  br i1 %24, label %30, label %25

25:                                               ; preds = %4
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %26, i32 0, i32 0
  %28 = load i64, ptr %27, align 8, !tbaa !11
  %29 = icmp eq i64 %28, -1
  br label %30

30:                                               ; preds = %25, %4
  %31 = phi i1 [ true, %4 ], [ %29, %25 ]
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef @.str.820, ptr noundef %32)
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %33, i32 0, i32 0
  %35 = load i64, ptr %34, align 8, !tbaa !11
  %36 = icmp eq i64 %35, -1
  br i1 %36, label %37, label %131

37:                                               ; preds = %30
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %38, i32 0, i32 1
  %40 = load i8, ptr %39, align 8, !tbaa !17, !range !18, !noundef !19
  %41 = trunc i8 %40 to i1
  br i1 %41, label %79, label %42

42:                                               ; preds = %37
  store i64 0, ptr %14, align 8, !tbaa !20
  br label %43

43:                                               ; preds = %75, %42
  %44 = load i64, ptr %14, align 8, !tbaa !20
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %45, i32 0, i32 3
  %47 = load i64, ptr %46, align 8, !tbaa !21
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %48, i32 0, i32 2
  %50 = load i64, ptr %49, align 8, !tbaa !22
  %51 = mul nsw i64 %47, %50
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %52, i32 0, i32 4
  %54 = load i64, ptr %53, align 8, !tbaa !23
  %55 = mul nsw i64 %51, %54
  %56 = sub nsw i64 %55, 1
  %57 = icmp sle i64 %44, %56
  br i1 %57, label %58, label %78

58:                                               ; preds = %43
  %59 = load double, ptr %6, align 8, !tbaa !9
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %60, i32 0, i32 7
  %62 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %61, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !24
  %64 = load i64, ptr %14, align 8, !tbaa !20
  %65 = getelementptr inbounds double, ptr %63, i64 %64
  %66 = load double, ptr %65, align 8, !tbaa !9
  %67 = load double, ptr %7, align 8, !tbaa !9
  %68 = call double @llvm.fmuladd.f64(double %59, double %66, double %67)
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %69, i32 0, i32 7
  %71 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %70, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !24
  %73 = load i64, ptr %14, align 8, !tbaa !20
  %74 = getelementptr inbounds double, ptr %72, i64 %73
  store double %68, ptr %74, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %58
  %76 = load i64, ptr %14, align 8, !tbaa !20
  %77 = add nsw i64 %76, 1
  store i64 %77, ptr %14, align 8, !tbaa !20
  br label %43, !llvm.loop !25

78:                                               ; preds = %43
  br label %130

79:                                               ; preds = %37
  store i64 0, ptr %14, align 8, !tbaa !20
  br label %80

80:                                               ; preds = %126, %79
  %81 = load i64, ptr %14, align 8, !tbaa !20
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %82, i32 0, i32 3
  %84 = load i64, ptr %83, align 8, !tbaa !21
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %85, i32 0, i32 2
  %87 = load i64, ptr %86, align 8, !tbaa !22
  %88 = mul nsw i64 %84, %87
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %89, i32 0, i32 4
  %91 = load i64, ptr %90, align 8, !tbaa !23
  %92 = mul nsw i64 %88, %91
  %93 = sub nsw i64 %92, 1
  %94 = icmp sle i64 %81, %93
  br i1 %94, label %95, label %129

95:                                               ; preds = %80
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %96, i32 0, i32 8
  %98 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %97, i32 0, i32 4
  %99 = load ptr, ptr %98, align 8, !tbaa !24
  %100 = load i64, ptr %14, align 8, !tbaa !20
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %101, i32 0, i32 4
  %103 = load i64, ptr %102, align 8, !tbaa !23
  %104 = sdiv i64 %100, %103
  %105 = getelementptr inbounds i8, ptr %99, i64 %104
  %106 = load i8, ptr %105, align 1, !tbaa !27, !range !18, !noundef !19
  %107 = trunc i8 %106 to i1
  br i1 %107, label %125, label %108

108:                                              ; preds = %95
  %109 = load double, ptr %6, align 8, !tbaa !9
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %110, i32 0, i32 7
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %111, i32 0, i32 4
  %113 = load ptr, ptr %112, align 8, !tbaa !24
  %114 = load i64, ptr %14, align 8, !tbaa !20
  %115 = getelementptr inbounds double, ptr %113, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !9
  %117 = load double, ptr %7, align 8, !tbaa !9
  %118 = call double @llvm.fmuladd.f64(double %109, double %116, double %117)
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %119, i32 0, i32 7
  %121 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %120, i32 0, i32 4
  %122 = load ptr, ptr %121, align 8, !tbaa !24
  %123 = load i64, ptr %14, align 8, !tbaa !20
  %124 = getelementptr inbounds double, ptr %122, i64 %123
  store double %118, ptr %124, align 8, !tbaa !9
  br label %125

125:                                              ; preds = %108, %95
  br label %126

126:                                              ; preds = %125
  %127 = load i64, ptr %14, align 8, !tbaa !20
  %128 = add nsw i64 %127, 1
  store i64 %128, ptr %14, align 8, !tbaa !20
  br label %80, !llvm.loop !28

129:                                              ; preds = %80
  br label %130

130:                                              ; preds = %129, %78
  br label %357

131:                                              ; preds = %30
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %132, i32 0, i32 1
  %134 = load i8, ptr %133, align 8, !tbaa !17, !range !18, !noundef !19
  %135 = trunc i8 %134 to i1
  br i1 %135, label %220, label %136

136:                                              ; preds = %131
  store i64 0, ptr %14, align 8, !tbaa !20
  br label %137

137:                                              ; preds = %169, %136
  %138 = load i64, ptr %14, align 8, !tbaa !20
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %139, i32 0, i32 3
  %141 = load i64, ptr %140, align 8, !tbaa !21
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %142, i32 0, i32 2
  %144 = load i64, ptr %143, align 8, !tbaa !22
  %145 = mul nsw i64 %141, %144
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %146, i32 0, i32 4
  %148 = load i64, ptr %147, align 8, !tbaa !23
  %149 = mul nsw i64 %145, %148
  %150 = sub nsw i64 %149, 1
  %151 = icmp sle i64 %138, %150
  br i1 %151, label %152, label %172

152:                                              ; preds = %137
  %153 = load double, ptr %6, align 8, !tbaa !9
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %154, i32 0, i32 7
  %156 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %155, i32 0, i32 4
  %157 = load ptr, ptr %156, align 8, !tbaa !24
  %158 = load i64, ptr %14, align 8, !tbaa !20
  %159 = getelementptr inbounds double, ptr %157, i64 %158
  %160 = load double, ptr %159, align 8, !tbaa !9
  %161 = load double, ptr %7, align 8, !tbaa !9
  %162 = call double @llvm.fmuladd.f64(double %153, double %160, double %161)
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %163, i32 0, i32 7
  %165 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %164, i32 0, i32 4
  %166 = load ptr, ptr %165, align 8, !tbaa !24
  %167 = load i64, ptr %14, align 8, !tbaa !20
  %168 = getelementptr inbounds double, ptr %166, i64 %167
  store double %162, ptr %168, align 8, !tbaa !9
  br label %169

169:                                              ; preds = %152
  %170 = load i64, ptr %14, align 8, !tbaa !20
  %171 = add nsw i64 %170, 1
  store i64 %171, ptr %14, align 8, !tbaa !20
  br label %137, !llvm.loop !29

172:                                              ; preds = %137
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %173, i32 0, i32 3
  %175 = load i64, ptr %174, align 8, !tbaa !21
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %176, i32 0, i32 2
  %178 = load i64, ptr %177, align 8, !tbaa !22
  %179 = mul nsw i64 %175, %178
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %180, i32 0, i32 4
  %182 = load i64, ptr %181, align 8, !tbaa !23
  %183 = mul nsw i64 %179, %182
  store i64 %183, ptr %14, align 8, !tbaa !20
  br label %184

184:                                              ; preds = %216, %172
  %185 = load i64, ptr %14, align 8, !tbaa !20
  %186 = load ptr, ptr %5, align 8, !tbaa !5
  %187 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %186, i32 0, i32 3
  %188 = load i64, ptr %187, align 8, !tbaa !21
  %189 = mul nsw i64 4, %188
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %190, i32 0, i32 2
  %192 = load i64, ptr %191, align 8, !tbaa !22
  %193 = mul nsw i64 %189, %192
  %194 = load ptr, ptr %5, align 8, !tbaa !5
  %195 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %194, i32 0, i32 4
  %196 = load i64, ptr %195, align 8, !tbaa !23
  %197 = mul nsw i64 %193, %196
  %198 = sub nsw i64 %197, 1
  %199 = icmp sle i64 %185, %198
  br i1 %199, label %200, label %219

200:                                              ; preds = %184
  %201 = load double, ptr %6, align 8, !tbaa !9
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %202, i32 0, i32 7
  %204 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %203, i32 0, i32 4
  %205 = load ptr, ptr %204, align 8, !tbaa !24
  %206 = load i64, ptr %14, align 8, !tbaa !20
  %207 = getelementptr inbounds double, ptr %205, i64 %206
  %208 = load double, ptr %207, align 8, !tbaa !9
  %209 = fmul double %201, %208
  %210 = load ptr, ptr %5, align 8, !tbaa !5
  %211 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %210, i32 0, i32 7
  %212 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %211, i32 0, i32 4
  %213 = load ptr, ptr %212, align 8, !tbaa !24
  %214 = load i64, ptr %14, align 8, !tbaa !20
  %215 = getelementptr inbounds double, ptr %213, i64 %214
  store double %209, ptr %215, align 8, !tbaa !9
  br label %216

216:                                              ; preds = %200
  %217 = load i64, ptr %14, align 8, !tbaa !20
  %218 = add nsw i64 %217, 1
  store i64 %218, ptr %14, align 8, !tbaa !20
  br label %184, !llvm.loop !30

219:                                              ; preds = %184
  br label %356

220:                                              ; preds = %131
  %221 = load ptr, ptr %5, align 8, !tbaa !5
  %222 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %221, i32 0, i32 2
  %223 = load i64, ptr %222, align 8, !tbaa !22
  %224 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %10, i64 noundef %223, ptr noundef %224)
  %225 = load ptr, ptr %5, align 8, !tbaa !5
  %226 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %225, i32 0, i32 3
  %227 = load i64, ptr %226, align 8, !tbaa !21
  %228 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %11, i64 noundef %227, ptr noundef %228)
  %229 = load ptr, ptr %5, align 8, !tbaa !5
  %230 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %229, i32 0, i32 3
  %231 = load i64, ptr %230, align 8, !tbaa !21
  %232 = load ptr, ptr %5, align 8, !tbaa !5
  %233 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %232, i32 0, i32 2
  %234 = load i64, ptr %233, align 8, !tbaa !22
  %235 = mul nsw i64 %231, %234
  %236 = load ptr, ptr %5, align 8, !tbaa !5
  %237 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %236, i32 0, i32 4
  %238 = load i64, ptr %237, align 8, !tbaa !23
  %239 = mul nsw i64 %235, %238
  %240 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl10rsetallocvEldPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %239, double noundef 0.000000e+00, ptr noundef %12, ptr noundef %240)
  store i64 0, ptr %15, align 8, !tbaa !20
  br label %241

241:                                              ; preds = %260, %220
  %242 = load i64, ptr %15, align 8, !tbaa !20
  %243 = load ptr, ptr %5, align 8, !tbaa !5
  %244 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %243, i32 0, i32 2
  %245 = load i64, ptr %244, align 8, !tbaa !22
  %246 = sub nsw i64 %245, 1
  %247 = icmp sle i64 %242, %246
  br i1 %247, label %248, label %263

248:                                              ; preds = %241
  %249 = load ptr, ptr %5, align 8, !tbaa !5
  %250 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %249, i32 0, i32 5
  %251 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %250, i32 0, i32 4
  %252 = load ptr, ptr %251, align 8, !tbaa !24
  %253 = load i64, ptr %15, align 8, !tbaa !20
  %254 = getelementptr inbounds double, ptr %252, i64 %253
  %255 = load double, ptr %254, align 8, !tbaa !9
  %256 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %10, i32 0, i32 4
  %257 = load ptr, ptr %256, align 8, !tbaa !24
  %258 = load i64, ptr %15, align 8, !tbaa !20
  %259 = getelementptr inbounds double, ptr %257, i64 %258
  store double %255, ptr %259, align 8, !tbaa !9
  br label %260

260:                                              ; preds = %248
  %261 = load i64, ptr %15, align 8, !tbaa !20
  %262 = add nsw i64 %261, 1
  store i64 %262, ptr %15, align 8, !tbaa !20
  br label %241, !llvm.loop !31

263:                                              ; preds = %241
  store i64 0, ptr %14, align 8, !tbaa !20
  br label %264

264:                                              ; preds = %283, %263
  %265 = load i64, ptr %14, align 8, !tbaa !20
  %266 = load ptr, ptr %5, align 8, !tbaa !5
  %267 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %266, i32 0, i32 3
  %268 = load i64, ptr %267, align 8, !tbaa !21
  %269 = sub nsw i64 %268, 1
  %270 = icmp sle i64 %265, %269
  br i1 %270, label %271, label %286

271:                                              ; preds = %264
  %272 = load ptr, ptr %5, align 8, !tbaa !5
  %273 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %272, i32 0, i32 6
  %274 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %273, i32 0, i32 4
  %275 = load ptr, ptr %274, align 8, !tbaa !24
  %276 = load i64, ptr %14, align 8, !tbaa !20
  %277 = getelementptr inbounds double, ptr %275, i64 %276
  %278 = load double, ptr %277, align 8, !tbaa !9
  %279 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %11, i32 0, i32 4
  %280 = load ptr, ptr %279, align 8, !tbaa !24
  %281 = load i64, ptr %14, align 8, !tbaa !20
  %282 = getelementptr inbounds double, ptr %280, i64 %281
  store double %278, ptr %282, align 8, !tbaa !9
  br label %283

283:                                              ; preds = %271
  %284 = load i64, ptr %14, align 8, !tbaa !20
  %285 = add nsw i64 %284, 1
  store i64 %285, ptr %14, align 8, !tbaa !20
  br label %264, !llvm.loop !32

286:                                              ; preds = %264
  store i64 0, ptr %14, align 8, !tbaa !20
  br label %287

287:                                              ; preds = %331, %286
  %288 = load i64, ptr %14, align 8, !tbaa !20
  %289 = load ptr, ptr %5, align 8, !tbaa !5
  %290 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %289, i32 0, i32 3
  %291 = load i64, ptr %290, align 8, !tbaa !21
  %292 = load ptr, ptr %5, align 8, !tbaa !5
  %293 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %292, i32 0, i32 2
  %294 = load i64, ptr %293, align 8, !tbaa !22
  %295 = mul nsw i64 %291, %294
  %296 = load ptr, ptr %5, align 8, !tbaa !5
  %297 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %296, i32 0, i32 4
  %298 = load i64, ptr %297, align 8, !tbaa !23
  %299 = mul nsw i64 %295, %298
  %300 = sub nsw i64 %299, 1
  %301 = icmp sle i64 %288, %300
  br i1 %301, label %302, label %334

302:                                              ; preds = %287
  %303 = load ptr, ptr %5, align 8, !tbaa !5
  %304 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %303, i32 0, i32 8
  %305 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %304, i32 0, i32 4
  %306 = load ptr, ptr %305, align 8, !tbaa !24
  %307 = load i64, ptr %14, align 8, !tbaa !20
  %308 = load ptr, ptr %5, align 8, !tbaa !5
  %309 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %308, i32 0, i32 4
  %310 = load i64, ptr %309, align 8, !tbaa !23
  %311 = sdiv i64 %307, %310
  %312 = getelementptr inbounds i8, ptr %306, i64 %311
  %313 = load i8, ptr %312, align 1, !tbaa !27, !range !18, !noundef !19
  %314 = trunc i8 %313 to i1
  br i1 %314, label %330, label %315

315:                                              ; preds = %302
  %316 = load double, ptr %6, align 8, !tbaa !9
  %317 = load ptr, ptr %5, align 8, !tbaa !5
  %318 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %317, i32 0, i32 7
  %319 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %318, i32 0, i32 4
  %320 = load ptr, ptr %319, align 8, !tbaa !24
  %321 = load i64, ptr %14, align 8, !tbaa !20
  %322 = getelementptr inbounds double, ptr %320, i64 %321
  %323 = load double, ptr %322, align 8, !tbaa !9
  %324 = load double, ptr %7, align 8, !tbaa !9
  %325 = call double @llvm.fmuladd.f64(double %316, double %323, double %324)
  %326 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %327 = load ptr, ptr %326, align 8, !tbaa !24
  %328 = load i64, ptr %14, align 8, !tbaa !20
  %329 = getelementptr inbounds double, ptr %327, i64 %328
  store double %325, ptr %329, align 8, !tbaa !9
  br label %330

330:                                              ; preds = %315, %302
  br label %331

331:                                              ; preds = %330
  %332 = load i64, ptr %14, align 8, !tbaa !20
  %333 = add nsw i64 %332, 1
  store i64 %333, ptr %14, align 8, !tbaa !20
  br label %287, !llvm.loop !33

334:                                              ; preds = %287
  %335 = load ptr, ptr %5, align 8, !tbaa !5
  %336 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %335, i32 0, i32 3
  %337 = load i64, ptr %336, align 8, !tbaa !21
  %338 = load ptr, ptr %5, align 8, !tbaa !5
  %339 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %338, i32 0, i32 2
  %340 = load i64, ptr %339, align 8, !tbaa !22
  %341 = mul nsw i64 %337, %340
  %342 = load ptr, ptr %5, align 8, !tbaa !5
  %343 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %342, i32 0, i32 8
  %344 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl11bcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %341, ptr noundef %343, ptr noundef %13, ptr noundef %344)
  %345 = load ptr, ptr %5, align 8, !tbaa !5
  %346 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %345, i32 0, i32 2
  %347 = load i64, ptr %346, align 8, !tbaa !22
  %348 = load ptr, ptr %5, align 8, !tbaa !5
  %349 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %348, i32 0, i32 3
  %350 = load i64, ptr %349, align 8, !tbaa !21
  %351 = load ptr, ptr %5, align 8, !tbaa !5
  %352 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %351, i32 0, i32 4
  %353 = load i64, ptr %352, align 8, !tbaa !23
  %354 = load ptr, ptr %5, align 8, !tbaa !5
  %355 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl30spline2dbuildbicubicmissingbufEPKNS_9ae_vectorElS2_lS2_S2_lPNS_19spline2dinterpolantEPNS_8ae_stateE(ptr noundef %10, i64 noundef %347, ptr noundef %11, i64 noundef %350, ptr noundef %12, ptr noundef %13, i64 noundef %353, ptr noundef %354, ptr noundef %355)
  br label %356

356:                                              ; preds = %334, %219
  br label %357

357:                                              ; preds = %356, %130
  %358 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %358)
  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 64, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl30spline2dbuildbicubicmissingbufEPKNS_9ae_vectorElS2_lS2_S2_lPNS_19spline2dinterpolantEPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i64 noundef, 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 void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) #2

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

declare void @_ZN11alglib_impl10rsetallocvEldPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, double noundef, ptr noundef, ptr noundef) #2

declare void @_ZN11alglib_impl11bcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 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 #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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN11alglib_impl19spline2dinterpolantE", !13, i64 0, !14, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !15, i64 40, !15, i64 104, !15, i64 168, !15, i64 232, !15, i64 296}
!13 = !{!"long", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !13, i64 0, !13, i64 8, !14, i64 16, !16, i64 24, !7, i64 56}
!16 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!12, !14, i64 8}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!13, !13, i64 0}
!21 = !{!12, !13, i64 24}
!22 = !{!12, !13, i64 16}
!23 = !{!12, !13, i64 32}
!24 = !{!7, !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!14, !14, i64 0}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !26}
!30 = distinct !{!30, !26}
!31 = distinct !{!31, !26}
!32 = distinct !{!32, !26}
!33 = distinct !{!33, !26}


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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.820 = external hidden unnamed_addr constant [61 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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl17spline2dlintransfEPNS_19spline2dinterpolantEddPNS_8ae_stateE(ptr noundef %0, double noundef %1, double noundef %2, ptr noundef %3) local_unnamed_addr #3 {
  %5 = alloca %"struct.alglib_impl::ae_frame", align 8
  %6 = alloca %"struct.alglib_impl::ae_vector", align 8
  %7 = alloca %"struct.alglib_impl::ae_vector", align 8
  %8 = alloca %"struct.alglib_impl::ae_vector", align 8
  %9 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %3, ptr noundef nonnull %5)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %6, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %7, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %8, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %9, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %6, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %7, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %9, i64 noundef 0, i64 noundef 1, ptr noundef %3, i1 noundef zeroext true)
  %10 = load i64, ptr %0, align 8, !tbaa !5
  %11 = and i64 %10, -3
  %spec.select = icmp eq i64 %11, -3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select, ptr noundef nonnull @.str.820, ptr noundef %3)
  %12 = load i64, ptr %0, align 8, !tbaa !5
  %13 = icmp eq i64 %12, -1
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load i8, ptr %14, align 8, !tbaa !14, !range !15, !noundef !16
  %16 = trunc nuw i8 %15 to i1
  br i1 %13, label %17, label %54

17:                                               ; preds = %4
  %18 = getelementptr inbounds i8, ptr %0, i64 24
  %19 = load i64, ptr %18, align 8, !tbaa !17
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  %21 = load i64, ptr %20, align 8, !tbaa !18
  %22 = mul i64 %21, %19
  %23 = getelementptr inbounds i8, ptr %0, i64 32
  %24 = load i64, ptr %23, align 8, !tbaa !19
  %25 = mul i64 %22, %24
  %.not.not109146 = icmp sgt i64 %25, 0
  br i1 %16, label %.preheader, label %.preheader110

.preheader110:                                    ; preds = %17
  br i1 %.not.not109146, label %.lr.ph145, label %.loopexit

.lr.ph145:                                        ; preds = %.preheader110
  %26 = getelementptr inbounds i8, ptr %0, i64 224
  %xtraiter174 = and i64 %25, 1
  %27 = icmp eq i64 %25, 1
  br i1 %27, label %.loopexit.loopexit160.unr-lcssa, label %.lr.ph145.new

.lr.ph145.new:                                    ; preds = %.lr.ph145
  %unroll_iter177 = and i64 %25, 9223372036854775806
  br label %30

.preheader:                                       ; preds = %17
  br i1 %.not.not109146, label %.lr.ph148, label %.loopexit

.lr.ph148:                                        ; preds = %.preheader
  %28 = getelementptr inbounds i8, ptr %0, i64 288
  %29 = getelementptr inbounds i8, ptr %0, i64 224
  br label %41

30:                                               ; preds = %30, %.lr.ph145.new
  %.0102144 = phi i64 [ 0, %.lr.ph145.new ], [ %40, %30 ]
  %niter178 = phi i64 [ 0, %.lr.ph145.new ], [ %niter178.next.1, %30 ]
  %31 = load ptr, ptr %26, align 8, !tbaa !20
  %32 = getelementptr inbounds double, ptr %31, i64 %.0102144
  %33 = load double, ptr %32, align 8, !tbaa !21
  %34 = call double @llvm.fmuladd.f64(double %1, double %33, double %2)
  store double %34, ptr %32, align 8, !tbaa !21
  %35 = or disjoint i64 %.0102144, 1
  %36 = load ptr, ptr %26, align 8, !tbaa !20
  %37 = getelementptr inbounds double, ptr %36, i64 %35
  %38 = load double, ptr %37, align 8, !tbaa !21
  %39 = call double @llvm.fmuladd.f64(double %1, double %38, double %2)
  store double %39, ptr %37, align 8, !tbaa !21
  %40 = add nuw nsw i64 %.0102144, 2
  %niter178.next.1 = add i64 %niter178, 2
  %niter178.ncmp.1 = icmp eq i64 %niter178.next.1, %unroll_iter177
  br i1 %niter178.ncmp.1, label %.loopexit.loopexit160.unr-lcssa, label %30, !llvm.loop !23

41:                                               ; preds = %.lr.ph148, %52
  %.1147 = phi i64 [ 0, %.lr.ph148 ], [ %53, %52 ]
  %42 = load ptr, ptr %28, align 8, !tbaa !20
  %43 = sdiv i64 %.1147, %24
  %44 = getelementptr inbounds i8, ptr %42, i64 %43
  %45 = load i8, ptr %44, align 1, !tbaa !25, !range !15, !noundef !16
  %46 = trunc nuw i8 %45 to i1
  br i1 %46, label %52, label %47

47:                                               ; preds = %41
  %48 = load ptr, ptr %29, align 8, !tbaa !20
  %49 = getelementptr inbounds double, ptr %48, i64 %.1147
  %50 = load double, ptr %49, align 8, !tbaa !21
  %51 = call double @llvm.fmuladd.f64(double %1, double %50, double %2)
  store double %51, ptr %49, align 8, !tbaa !21
  br label %52

52:                                               ; preds = %41, %47
  %53 = add nuw nsw i64 %.1147, 1
  %exitcond155.not = icmp eq i64 %53, %25
  br i1 %exitcond155.not, label %.loopexit, label %41, !llvm.loop !26

54:                                               ; preds = %4
  br i1 %16, label %89, label %.preheader116

.preheader116:                                    ; preds = %54
  %55 = getelementptr inbounds i8, ptr %0, i64 24
  %56 = load i64, ptr %55, align 8, !tbaa !17
  %57 = getelementptr inbounds i8, ptr %0, i64 16
  %58 = load i64, ptr %57, align 8, !tbaa !18
  %59 = getelementptr inbounds i8, ptr %0, i64 32
  %60 = load i64, ptr %59, align 8, !tbaa !19
  %61 = mul i64 %60, %58
  %62 = mul i64 %61, %56
  %.not.not123 = icmp sgt i64 %62, 0
  br i1 %.not.not123, label %.lr.ph, label %.preheader114

.lr.ph:                                           ; preds = %.preheader116
  %63 = getelementptr inbounds i8, ptr %0, i64 224
  %xtraiter = and i64 %62, 1
  %64 = icmp eq i64 %62, 1
  br i1 %64, label %.preheader114.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %62, 9223372036854775806
  br label %72

.preheader114.loopexit.unr-lcssa:                 ; preds = %72, %.lr.ph
  %.2124.unr = phi i64 [ 0, %.lr.ph ], [ %82, %72 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader114, label %.preheader114.loopexit.epilog-lcssa

.preheader114.loopexit.epilog-lcssa:              ; preds = %.preheader114.loopexit.unr-lcssa
  %65 = load ptr, ptr %63, align 8, !tbaa !20
  %66 = getelementptr inbounds double, ptr %65, i64 %.2124.unr
  %67 = load double, ptr %66, align 8, !tbaa !21
  %68 = call double @llvm.fmuladd.f64(double %1, double %67, double %2)
  store double %68, ptr %66, align 8, !tbaa !21
  br label %.preheader114

.preheader114:                                    ; preds = %.preheader114.loopexit.epilog-lcssa, %.preheader114.loopexit.unr-lcssa, %.preheader116
  %69 = shl i64 %61, 2
  %70 = mul i64 %69, %56
  %.not.not104128 = icmp slt i64 %62, %70
  br i1 %.not.not104128, label %.lr.ph130, label %.loopexit

.lr.ph130:                                        ; preds = %.preheader114
  %71 = getelementptr inbounds i8, ptr %0, i64 224
  br label %83

72:                                               ; preds = %72, %.lr.ph.new
  %.2124 = phi i64 [ 0, %.lr.ph.new ], [ %82, %72 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %72 ]
  %73 = load ptr, ptr %63, align 8, !tbaa !20
  %74 = getelementptr inbounds double, ptr %73, i64 %.2124
  %75 = load double, ptr %74, align 8, !tbaa !21
  %76 = call double @llvm.fmuladd.f64(double %1, double %75, double %2)
  store double %76, ptr %74, align 8, !tbaa !21
  %77 = or disjoint i64 %.2124, 1
  %78 = load ptr, ptr %63, align 8, !tbaa !20
  %79 = getelementptr inbounds double, ptr %78, i64 %77
  %80 = load double, ptr %79, align 8, !tbaa !21
  %81 = call double @llvm.fmuladd.f64(double %1, double %80, double %2)
  store double %81, ptr %79, align 8, !tbaa !21
  %82 = add nuw nsw i64 %.2124, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader114.loopexit.unr-lcssa, label %72, !llvm.loop !27

83:                                               ; preds = %.lr.ph130, %83
  %.3129 = phi i64 [ %62, %.lr.ph130 ], [ %88, %83 ]
  %84 = load ptr, ptr %71, align 8, !tbaa !20
  %85 = getelementptr inbounds double, ptr %84, i64 %.3129
  %86 = load double, ptr %85, align 8, !tbaa !21
  %87 = fmul double %86, %1
  store double %87, ptr %85, align 8, !tbaa !21
  %88 = add nsw i64 %.3129, 1
  %.not.not104 = icmp slt i64 %88, %70
  br i1 %.not.not104, label %83, label %.loopexit, !llvm.loop !28

89:                                               ; preds = %54
  %90 = getelementptr inbounds i8, ptr %0, i64 16
  %91 = load i64, ptr %90, align 8, !tbaa !18
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %91, ptr noundef %3)
  %92 = getelementptr inbounds i8, ptr %0, i64 24
  %93 = load i64, ptr %92, align 8, !tbaa !17
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %93, ptr noundef %3)
  %94 = load i64, ptr %92, align 8, !tbaa !17
  %95 = load i64, ptr %90, align 8, !tbaa !18
  %96 = mul nsw i64 %95, %94
  %97 = getelementptr inbounds i8, ptr %0, i64 32
  %98 = load i64, ptr %97, align 8, !tbaa !19
  %99 = mul nsw i64 %96, %98
  call void @_ZN11alglib_impl10rsetallocvEldPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %99, double noundef 0.000000e+00, ptr noundef nonnull %8, ptr noundef %3)
  %100 = load i64, ptr %90, align 8, !tbaa !18
  %.not.not105131 = icmp sgt i64 %100, 0
  br i1 %.not.not105131, label %.lr.ph133, label %.preheader113

.lr.ph133:                                        ; preds = %89
  %101 = getelementptr inbounds i8, ptr %0, i64 96
  %102 = getelementptr inbounds i8, ptr %6, i64 56
  %xtraiter163 = and i64 %100, 3
  %103 = icmp ult i64 %100, 4
  br i1 %103, label %.preheader113.loopexit.unr-lcssa, label %.lr.ph133.new

.lr.ph133.new:                                    ; preds = %.lr.ph133
  %unroll_iter165 = and i64 %100, 9223372036854775804
  br label %114

.preheader113.loopexit.unr-lcssa:                 ; preds = %114, %.lr.ph133
  %.0132.unr = phi i64 [ 0, %.lr.ph133 ], [ %138, %114 ]
  %lcmp.mod164.not = icmp eq i64 %xtraiter163, 0
  br i1 %lcmp.mod164.not, label %.preheader113, label %.epil.preheader162

.epil.preheader162:                               ; preds = %.preheader113.loopexit.unr-lcssa, %.epil.preheader162
  %.0132.epil = phi i64 [ %109, %.epil.preheader162 ], [ %.0132.unr, %.preheader113.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader162 ], [ 0, %.preheader113.loopexit.unr-lcssa ]
  %104 = load ptr, ptr %101, align 8, !tbaa !20
  %105 = getelementptr inbounds double, ptr %104, i64 %.0132.epil
  %106 = load double, ptr %105, align 8, !tbaa !21
  %107 = load ptr, ptr %102, align 8, !tbaa !20
  %108 = getelementptr inbounds double, ptr %107, i64 %.0132.epil
  store double %106, ptr %108, align 8, !tbaa !21
  %109 = add nuw nsw i64 %.0132.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter163
  br i1 %epil.iter.cmp.not, label %.preheader113, label %.epil.preheader162, !llvm.loop !29

.preheader113:                                    ; preds = %.preheader113.loopexit.unr-lcssa, %.epil.preheader162, %89
  %110 = load i64, ptr %92, align 8, !tbaa !17
  %.not.not106135 = icmp sgt i64 %110, 0
  br i1 %.not.not106135, label %.lr.ph137, label %.preheader112

.lr.ph137:                                        ; preds = %.preheader113
  %111 = getelementptr inbounds i8, ptr %0, i64 160
  %112 = getelementptr inbounds i8, ptr %7, i64 56
  %xtraiter168 = and i64 %110, 3
  %113 = icmp ult i64 %110, 4
  br i1 %113, label %.preheader112.loopexit.unr-lcssa, label %.lr.ph137.new

.lr.ph137.new:                                    ; preds = %.lr.ph137
  %unroll_iter171 = and i64 %110, 9223372036854775804
  br label %151

114:                                              ; preds = %114, %.lr.ph133.new
  %.0132 = phi i64 [ 0, %.lr.ph133.new ], [ %138, %114 ]
  %niter166 = phi i64 [ 0, %.lr.ph133.new ], [ %niter166.next.3, %114 ]
  %115 = load ptr, ptr %101, align 8, !tbaa !20
  %116 = getelementptr inbounds double, ptr %115, i64 %.0132
  %117 = load double, ptr %116, align 8, !tbaa !21
  %118 = load ptr, ptr %102, align 8, !tbaa !20
  %119 = getelementptr inbounds double, ptr %118, i64 %.0132
  store double %117, ptr %119, align 8, !tbaa !21
  %120 = or disjoint i64 %.0132, 1
  %121 = load ptr, ptr %101, align 8, !tbaa !20
  %122 = getelementptr inbounds double, ptr %121, i64 %120
  %123 = load double, ptr %122, align 8, !tbaa !21
  %124 = load ptr, ptr %102, align 8, !tbaa !20
  %125 = getelementptr inbounds double, ptr %124, i64 %120
  store double %123, ptr %125, align 8, !tbaa !21
  %126 = or disjoint i64 %.0132, 2
  %127 = load ptr, ptr %101, align 8, !tbaa !20
  %128 = getelementptr inbounds double, ptr %127, i64 %126
  %129 = load double, ptr %128, align 8, !tbaa !21
  %130 = load ptr, ptr %102, align 8, !tbaa !20
  %131 = getelementptr inbounds double, ptr %130, i64 %126
  store double %129, ptr %131, align 8, !tbaa !21
  %132 = or disjoint i64 %.0132, 3
  %133 = load ptr, ptr %101, align 8, !tbaa !20
  %134 = getelementptr inbounds double, ptr %133, i64 %132
  %135 = load double, ptr %134, align 8, !tbaa !21
  %136 = load ptr, ptr %102, align 8, !tbaa !20
  %137 = getelementptr inbounds double, ptr %136, i64 %132
  store double %135, ptr %137, align 8, !tbaa !21
  %138 = add nuw nsw i64 %.0132, 4
  %niter166.next.3 = add i64 %niter166, 4
  %niter166.ncmp.3 = icmp eq i64 %niter166.next.3, %unroll_iter165
  br i1 %niter166.ncmp.3, label %.preheader113.loopexit.unr-lcssa, label %114, !llvm.loop !31

.preheader112.loopexit.unr-lcssa:                 ; preds = %151, %.lr.ph137
  %.4136.unr = phi i64 [ 0, %.lr.ph137 ], [ %175, %151 ]
  %lcmp.mod170.not = icmp eq i64 %xtraiter168, 0
  br i1 %lcmp.mod170.not, label %.preheader112, label %.epil.preheader167

.epil.preheader167:                               ; preds = %.preheader112.loopexit.unr-lcssa, %.epil.preheader167
  %.4136.epil = phi i64 [ %144, %.epil.preheader167 ], [ %.4136.unr, %.preheader112.loopexit.unr-lcssa ]
  %epil.iter169 = phi i64 [ %epil.iter169.next, %.epil.preheader167 ], [ 0, %.preheader112.loopexit.unr-lcssa ]
  %139 = load ptr, ptr %111, align 8, !tbaa !20
  %140 = getelementptr inbounds double, ptr %139, i64 %.4136.epil
  %141 = load double, ptr %140, align 8, !tbaa !21
  %142 = load ptr, ptr %112, align 8, !tbaa !20
  %143 = getelementptr inbounds double, ptr %142, i64 %.4136.epil
  store double %141, ptr %143, align 8, !tbaa !21
  %144 = add nuw nsw i64 %.4136.epil, 1
  %epil.iter169.next = add i64 %epil.iter169, 1
  %epil.iter169.cmp.not = icmp eq i64 %epil.iter169.next, %xtraiter168
  br i1 %epil.iter169.cmp.not, label %.preheader112, label %.epil.preheader167, !llvm.loop !32

.preheader112:                                    ; preds = %.preheader112.loopexit.unr-lcssa, %.epil.preheader167, %.preheader113
  %145 = mul nsw i64 %110, %100
  %146 = load i64, ptr %97, align 8, !tbaa !19
  %147 = mul nsw i64 %146, %145
  %.not.not107139 = icmp sgt i64 %147, 0
  br i1 %.not.not107139, label %.lr.ph141, label %._crit_edge

.lr.ph141:                                        ; preds = %.preheader112
  %148 = getelementptr inbounds i8, ptr %0, i64 288
  %149 = getelementptr inbounds i8, ptr %0, i64 224
  %150 = getelementptr inbounds i8, ptr %8, i64 56
  br label %176

151:                                              ; preds = %151, %.lr.ph137.new
  %.4136 = phi i64 [ 0, %.lr.ph137.new ], [ %175, %151 ]
  %niter172 = phi i64 [ 0, %.lr.ph137.new ], [ %niter172.next.3, %151 ]
  %152 = load ptr, ptr %111, align 8, !tbaa !20
  %153 = getelementptr inbounds double, ptr %152, i64 %.4136
  %154 = load double, ptr %153, align 8, !tbaa !21
  %155 = load ptr, ptr %112, align 8, !tbaa !20
  %156 = getelementptr inbounds double, ptr %155, i64 %.4136
  store double %154, ptr %156, align 8, !tbaa !21
  %157 = or disjoint i64 %.4136, 1
  %158 = load ptr, ptr %111, align 8, !tbaa !20
  %159 = getelementptr inbounds double, ptr %158, i64 %157
  %160 = load double, ptr %159, align 8, !tbaa !21
  %161 = load ptr, ptr %112, align 8, !tbaa !20
  %162 = getelementptr inbounds double, ptr %161, i64 %157
  store double %160, ptr %162, align 8, !tbaa !21
  %163 = or disjoint i64 %.4136, 2
  %164 = load ptr, ptr %111, align 8, !tbaa !20
  %165 = getelementptr inbounds double, ptr %164, i64 %163
  %166 = load double, ptr %165, align 8, !tbaa !21
  %167 = load ptr, ptr %112, align 8, !tbaa !20
  %168 = getelementptr inbounds double, ptr %167, i64 %163
  store double %166, ptr %168, align 8, !tbaa !21
  %169 = or disjoint i64 %.4136, 3
  %170 = load ptr, ptr %111, align 8, !tbaa !20
  %171 = getelementptr inbounds double, ptr %170, i64 %169
  %172 = load double, ptr %171, align 8, !tbaa !21
  %173 = load ptr, ptr %112, align 8, !tbaa !20
  %174 = getelementptr inbounds double, ptr %173, i64 %169
  store double %172, ptr %174, align 8, !tbaa !21
  %175 = add nuw nsw i64 %.4136, 4
  %niter172.next.3 = add i64 %niter172, 4
  %niter172.ncmp.3 = icmp eq i64 %niter172.next.3, %unroll_iter171
  br i1 %niter172.ncmp.3, label %.preheader112.loopexit.unr-lcssa, label %151, !llvm.loop !33

176:                                              ; preds = %.lr.ph141, %189
  %.5140 = phi i64 [ 0, %.lr.ph141 ], [ %190, %189 ]
  %177 = load ptr, ptr %148, align 8, !tbaa !20
  %178 = sdiv i64 %.5140, %146
  %179 = getelementptr inbounds i8, ptr %177, i64 %178
  %180 = load i8, ptr %179, align 1, !tbaa !25, !range !15, !noundef !16
  %181 = trunc nuw i8 %180 to i1
  br i1 %181, label %189, label %182

182:                                              ; preds = %176
  %183 = load ptr, ptr %149, align 8, !tbaa !20
  %184 = getelementptr inbounds double, ptr %183, i64 %.5140
  %185 = load double, ptr %184, align 8, !tbaa !21
  %186 = call double @llvm.fmuladd.f64(double %1, double %185, double %2)
  %187 = load ptr, ptr %150, align 8, !tbaa !20
  %188 = getelementptr inbounds double, ptr %187, i64 %.5140
  store double %186, ptr %188, align 8, !tbaa !21
  br label %189

189:                                              ; preds = %176, %182
  %190 = add nuw nsw i64 %.5140, 1
  %exitcond153.not = icmp eq i64 %190, %147
  br i1 %exitcond153.not, label %._crit_edge, label %176, !llvm.loop !34

._crit_edge:                                      ; preds = %189, %.preheader112
  %191 = getelementptr inbounds i8, ptr %0, i64 232
  call void @_ZN11alglib_impl11bcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %145, ptr noundef nonnull %191, ptr noundef nonnull %9, ptr noundef %3)
  %192 = load i64, ptr %90, align 8, !tbaa !18
  %193 = load i64, ptr %92, align 8, !tbaa !17
  %194 = load i64, ptr %97, align 8, !tbaa !19
  call void @_ZN11alglib_impl30spline2dbuildbicubicmissingbufEPKNS_9ae_vectorElS2_lS2_S2_lPNS_19spline2dinterpolantEPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %192, ptr noundef nonnull %7, i64 noundef %193, ptr noundef nonnull %8, ptr noundef nonnull %9, i64 noundef %194, ptr noundef nonnull %0, ptr noundef %3)
  br label %.loopexit

.loopexit.loopexit160.unr-lcssa:                  ; preds = %30, %.lr.ph145
  %.0102144.unr = phi i64 [ 0, %.lr.ph145 ], [ %40, %30 ]
  %lcmp.mod176.not = icmp eq i64 %xtraiter174, 0
  br i1 %lcmp.mod176.not, label %.loopexit, label %.loopexit.loopexit160.epilog-lcssa

.loopexit.loopexit160.epilog-lcssa:               ; preds = %.loopexit.loopexit160.unr-lcssa
  %195 = load ptr, ptr %26, align 8, !tbaa !20
  %196 = getelementptr inbounds double, ptr %195, i64 %.0102144.unr
  %197 = load double, ptr %196, align 8, !tbaa !21
  %198 = call double @llvm.fmuladd.f64(double %1, double %197, double %2)
  store double %198, ptr %196, align 8, !tbaa !21
  br label %.loopexit

.loopexit:                                        ; preds = %83, %.loopexit.loopexit160.epilog-lcssa, %.loopexit.loopexit160.unr-lcssa, %52, %.preheader114, %.preheader110, %.preheader, %._crit_edge
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl30spline2dbuildbicubicmissingbufEPKNS_9ae_vectorElS2_lS2_S2_lPNS_19spline2dinterpolantEPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, i64 noundef, 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 void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl10rsetallocvEldPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl11bcopyallocvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 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 #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, !7, i64 0}
!6 = !{!"_ZTSN11alglib_impl19spline2dinterpolantE", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !11, i64 40, !11, i64 104, !11, i64 168, !11, i64 232, !11, i64 296}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !12, i64 24, !8, i64 56}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!6, !10, i64 8}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!6, !7, i64 24}
!18 = !{!6, !7, i64 16}
!19 = !{!6, !7, i64 32}
!20 = !{!8, !8, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"double", !8, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!10, !10, i64 0}
!26 = distinct !{!26, !24}
!27 = distinct !{!27, !24}
!28 = distinct !{!28, !24}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.unroll.disable"}
!31 = distinct !{!31, !24}
!32 = distinct !{!32, !30}
!33 = distinct !{!33, !24}
!34 = distinct !{!34, !24}


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