; 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::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = 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.874 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.875 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.876 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.877 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.878 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.879 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.880 = external hidden unnamed_addr constant [56 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_impl24spline2dbuildbicubicvbufEPKNS_9ae_vectorElS2_lS2_lPNS_19spline2dinterpolantEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, i64 noundef %5, ptr noundef %6, ptr noundef %7) #3 {
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.alglib_impl::ae_frame", align 8
  %18 = alloca %"struct.alglib_impl::ae_vector", align 8
  %19 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %20 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %21 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %22 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %23 = alloca %"struct.alglib_impl::ae_vector", align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i64 %1, ptr %10, align 8, !tbaa !9
  store ptr %2, ptr %11, align 8, !tbaa !5
  store i64 %3, ptr %12, align 8, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !5
  store i64 %5, ptr %14, align 8, !tbaa !9
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %28 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %28, ptr noundef %17)
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 64, i1 false)
  %29 = load ptr, ptr %13, align 8, !tbaa !5
  %30 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %18, ptr noundef %29, ptr noundef %30, i1 noundef zeroext true)
  %31 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %19, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %31, i1 noundef zeroext true)
  %32 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %20, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %32, i1 noundef zeroext true)
  %33 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %21, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %33, i1 noundef zeroext true)
  %34 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %22, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %34, i1 noundef zeroext true)
  %35 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %23, i64 noundef 0, i64 noundef 3, ptr noundef %35, i1 noundef zeroext true)
  %36 = load i64, ptr %10, align 8, !tbaa !9
  %37 = icmp sge i64 %36, 2
  %38 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %37, ptr noundef @.str.874, ptr noundef %38)
  %39 = load i64, ptr %12, align 8, !tbaa !9
  %40 = icmp sge i64 %39, 2
  %41 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %40, ptr noundef @.str.875, ptr noundef %41)
  %42 = load i64, ptr %14, align 8, !tbaa !9
  %43 = icmp sge i64 %42, 1
  %44 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %43, ptr noundef @.str.876, ptr noundef %44)
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %45, i32 0, i32 0
  %47 = load i64, ptr %46, align 8, !tbaa !11
  %48 = load i64, ptr %10, align 8, !tbaa !9
  %49 = icmp sge i64 %47, %48
  br i1 %49, label %50, label %56

50:                                               ; preds = %8
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %51, i32 0, i32 0
  %53 = load i64, ptr %52, align 8, !tbaa !11
  %54 = load i64, ptr %12, align 8, !tbaa !9
  %55 = icmp sge i64 %53, %54
  br label %56

56:                                               ; preds = %50, %8
  %57 = phi i1 [ false, %8 ], [ %55, %50 ]
  %58 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %57, ptr noundef @.str.877, ptr noundef %58)
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = load i64, ptr %10, align 8, !tbaa !9
  %61 = load ptr, ptr %16, align 8, !tbaa !5
  %62 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %59, i64 noundef %60, ptr noundef %61)
  br i1 %62, label %63, label %68

63:                                               ; preds = %56
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = load i64, ptr %12, align 8, !tbaa !9
  %66 = load ptr, ptr %16, align 8, !tbaa !5
  %67 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %64, i64 noundef %65, ptr noundef %66)
  br label %68

68:                                               ; preds = %63, %56
  %69 = phi i1 [ false, %56 ], [ %67, %63 ]
  %70 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %69, ptr noundef @.str.878, ptr noundef %70)
  %71 = load i64, ptr %10, align 8, !tbaa !9
  %72 = load i64, ptr %12, align 8, !tbaa !9
  %73 = mul nsw i64 %71, %72
  %74 = load i64, ptr %14, align 8, !tbaa !9
  %75 = mul nsw i64 %73, %74
  store i64 %75, ptr %26, align 8, !tbaa !9
  %76 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 0
  %77 = load i64, ptr %76, align 8, !tbaa !11
  %78 = load i64, ptr %26, align 8, !tbaa !9
  %79 = icmp sge i64 %77, %78
  %80 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %79, ptr noundef @.str.879, ptr noundef %80)
  %81 = load i64, ptr %26, align 8, !tbaa !9
  %82 = load ptr, ptr %16, align 8, !tbaa !5
  %83 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %18, i64 noundef %81, ptr noundef %82)
  %84 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %83, ptr noundef @.str.880, ptr noundef %84)
  %85 = load i64, ptr %14, align 8, !tbaa !9
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %86, i32 0, i32 4
  store i64 %85, ptr %87, align 8, !tbaa !15
  %88 = load i64, ptr %10, align 8, !tbaa !9
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %89, i32 0, i32 2
  store i64 %88, ptr %90, align 8, !tbaa !17
  %91 = load i64, ptr %12, align 8, !tbaa !9
  %92 = load ptr, ptr %15, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %92, i32 0, i32 3
  store i64 %91, ptr %93, align 8, !tbaa !18
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %94, i32 0, i32 0
  store i64 -3, ptr %95, align 8, !tbaa !19
  %96 = load ptr, ptr %15, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %96, i32 0, i32 1
  store i8 0, ptr %97, align 8, !tbaa !20
  %98 = load i64, ptr %26, align 8, !tbaa !9
  %99 = mul nsw i64 4, %98
  store i64 %99, ptr %26, align 8, !tbaa !9
  %100 = load ptr, ptr %15, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %100, i32 0, i32 5
  %102 = load ptr, ptr %15, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %102, i32 0, i32 2
  %104 = load i64, ptr %103, align 8, !tbaa !17
  %105 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %101, i64 noundef %104, ptr noundef %105)
  %106 = load ptr, ptr %15, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %106, i32 0, i32 6
  %108 = load ptr, ptr %15, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %108, i32 0, i32 3
  %110 = load i64, ptr %109, align 8, !tbaa !18
  %111 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %107, i64 noundef %110, ptr noundef %111)
  %112 = load ptr, ptr %15, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %112, i32 0, i32 7
  %114 = load i64, ptr %26, align 8, !tbaa !9
  %115 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %113, i64 noundef %114, ptr noundef %115)
  %116 = load ptr, ptr %15, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %116, i32 0, i32 3
  %118 = load i64, ptr %117, align 8, !tbaa !18
  %119 = load ptr, ptr %15, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %119, i32 0, i32 2
  %121 = load i64, ptr %120, align 8, !tbaa !17
  %122 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %19, i64 noundef %118, i64 noundef %121, ptr noundef %122)
  store i64 0, ptr %24, align 8, !tbaa !9
  br label %123

123:                                              ; preds = %143, %68
  %124 = load i64, ptr %24, align 8, !tbaa !9
  %125 = load ptr, ptr %15, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %125, i32 0, i32 2
  %127 = load i64, ptr %126, align 8, !tbaa !17
  %128 = sub nsw i64 %127, 1
  %129 = icmp sle i64 %124, %128
  br i1 %129, label %130, label %146

130:                                              ; preds = %123
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %131, i32 0, i32 4
  %133 = load ptr, ptr %132, align 8, !tbaa !21
  %134 = load i64, ptr %24, align 8, !tbaa !9
  %135 = getelementptr inbounds double, ptr %133, i64 %134
  %136 = load double, ptr %135, align 8, !tbaa !22
  %137 = load ptr, ptr %15, align 8, !tbaa !5
  %138 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %137, i32 0, i32 5
  %139 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %138, i32 0, i32 4
  %140 = load ptr, ptr %139, align 8, !tbaa !21
  %141 = load i64, ptr %24, align 8, !tbaa !9
  %142 = getelementptr inbounds double, ptr %140, i64 %141
  store double %136, ptr %142, align 8, !tbaa !22
  br label %143

143:                                              ; preds = %130
  %144 = load i64, ptr %24, align 8, !tbaa !9
  %145 = add nsw i64 %144, 1
  store i64 %145, ptr %24, align 8, !tbaa !9
  br label %123, !llvm.loop !24

146:                                              ; preds = %123
  store i64 0, ptr %24, align 8, !tbaa !9
  br label %147

147:                                              ; preds = %167, %146
  %148 = load i64, ptr %24, align 8, !tbaa !9
  %149 = load ptr, ptr %15, align 8, !tbaa !5
  %150 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %149, i32 0, i32 3
  %151 = load i64, ptr %150, align 8, !tbaa !18
  %152 = sub nsw i64 %151, 1
  %153 = icmp sle i64 %148, %152
  br i1 %153, label %154, label %170

154:                                              ; preds = %147
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  %156 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %155, i32 0, i32 4
  %157 = load ptr, ptr %156, align 8, !tbaa !21
  %158 = load i64, ptr %24, align 8, !tbaa !9
  %159 = getelementptr inbounds double, ptr %157, i64 %158
  %160 = load double, ptr %159, align 8, !tbaa !22
  %161 = load ptr, ptr %15, align 8, !tbaa !5
  %162 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %161, i32 0, i32 6
  %163 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %162, i32 0, i32 4
  %164 = load ptr, ptr %163, align 8, !tbaa !21
  %165 = load i64, ptr %24, align 8, !tbaa !9
  %166 = getelementptr inbounds double, ptr %164, i64 %165
  store double %160, ptr %166, align 8, !tbaa !22
  br label %167

167:                                              ; preds = %154
  %168 = load i64, ptr %24, align 8, !tbaa !9
  %169 = add nsw i64 %168, 1
  store i64 %169, ptr %24, align 8, !tbaa !9
  br label %147, !llvm.loop !26

170:                                              ; preds = %147
  %171 = load ptr, ptr %15, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %171, i32 0, i32 5
  %173 = load i64, ptr %10, align 8, !tbaa !9
  %174 = load ptr, ptr %15, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %174, i32 0, i32 6
  %176 = load i64, ptr %12, align 8, !tbaa !9
  %177 = load ptr, ptr %15, align 8, !tbaa !5
  %178 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %177, i32 0, i32 5
  %179 = load ptr, ptr %15, align 8, !tbaa !5
  %180 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %179, i32 0, i32 5
  %181 = load ptr, ptr %15, align 8, !tbaa !5
  %182 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %181, i32 0, i32 6
  %183 = load ptr, ptr %15, align 8, !tbaa !5
  %184 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %183, i32 0, i32 6
  %185 = load i64, ptr %14, align 8, !tbaa !9
  %186 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_implL17spline2d_sortgridEPNS_9ae_vectorElS1_lS1_bS1_bS1_bS1_bS1_lS1_S1_S1_bPNS_8ae_stateE(ptr noundef %172, i64 noundef %173, ptr noundef %175, i64 noundef %176, ptr noundef %178, i1 noundef zeroext false, ptr noundef %180, i1 noundef zeroext false, ptr noundef %182, i1 noundef zeroext false, ptr noundef %184, i1 noundef zeroext false, ptr noundef %18, i64 noundef %185, ptr noundef %23, ptr noundef %23, ptr noundef %23, i1 noundef zeroext false, ptr noundef %186)
  store i64 0, ptr %27, align 8, !tbaa !9
  br label %187

187:                                              ; preds = %385, %170
  %188 = load i64, ptr %27, align 8, !tbaa !9
  %189 = load ptr, ptr %15, align 8, !tbaa !5
  %190 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %189, i32 0, i32 4
  %191 = load i64, ptr %190, align 8, !tbaa !15
  %192 = sub nsw i64 %191, 1
  %193 = icmp sle i64 %188, %192
  br i1 %193, label %194, label %388

194:                                              ; preds = %187
  store i64 0, ptr %24, align 8, !tbaa !9
  br label %195

195:                                              ; preds = %239, %194
  %196 = load i64, ptr %24, align 8, !tbaa !9
  %197 = load ptr, ptr %15, align 8, !tbaa !5
  %198 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %197, i32 0, i32 3
  %199 = load i64, ptr %198, align 8, !tbaa !18
  %200 = sub nsw i64 %199, 1
  %201 = icmp sle i64 %196, %200
  br i1 %201, label %202, label %242

202:                                              ; preds = %195
  store i64 0, ptr %25, align 8, !tbaa !9
  br label %203

203:                                              ; preds = %235, %202
  %204 = load i64, ptr %25, align 8, !tbaa !9
  %205 = load ptr, ptr %15, align 8, !tbaa !5
  %206 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %205, i32 0, i32 2
  %207 = load i64, ptr %206, align 8, !tbaa !17
  %208 = sub nsw i64 %207, 1
  %209 = icmp sle i64 %204, %208
  br i1 %209, label %210, label %238

210:                                              ; preds = %203
  %211 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %212 = load ptr, ptr %211, align 8, !tbaa !21
  %213 = load ptr, ptr %15, align 8, !tbaa !5
  %214 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %213, i32 0, i32 4
  %215 = load i64, ptr %214, align 8, !tbaa !15
  %216 = load i64, ptr %24, align 8, !tbaa !9
  %217 = load ptr, ptr %15, align 8, !tbaa !5
  %218 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %217, i32 0, i32 2
  %219 = load i64, ptr %218, align 8, !tbaa !17
  %220 = mul nsw i64 %216, %219
  %221 = load i64, ptr %25, align 8, !tbaa !9
  %222 = add nsw i64 %220, %221
  %223 = mul nsw i64 %215, %222
  %224 = load i64, ptr %27, align 8, !tbaa !9
  %225 = add nsw i64 %223, %224
  %226 = getelementptr inbounds double, ptr %212, i64 %225
  %227 = load double, ptr %226, align 8, !tbaa !22
  %228 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %19, i32 0, i32 6
  %229 = load ptr, ptr %228, align 8, !tbaa !21
  %230 = load i64, ptr %24, align 8, !tbaa !9
  %231 = getelementptr inbounds ptr, ptr %229, i64 %230
  %232 = load ptr, ptr %231, align 8, !tbaa !5
  %233 = load i64, ptr %25, align 8, !tbaa !9
  %234 = getelementptr inbounds double, ptr %232, i64 %233
  store double %227, ptr %234, align 8, !tbaa !22
  br label %235

235:                                              ; preds = %210
  %236 = load i64, ptr %25, align 8, !tbaa !9
  %237 = add nsw i64 %236, 1
  store i64 %237, ptr %25, align 8, !tbaa !9
  br label %203, !llvm.loop !27

238:                                              ; preds = %203
  br label %239

239:                                              ; preds = %238
  %240 = load i64, ptr %24, align 8, !tbaa !9
  %241 = add nsw i64 %240, 1
  store i64 %241, ptr %24, align 8, !tbaa !9
  br label %195, !llvm.loop !28

242:                                              ; preds = %195
  %243 = load ptr, ptr %15, align 8, !tbaa !5
  %244 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %243, i32 0, i32 5
  %245 = load ptr, ptr %15, align 8, !tbaa !5
  %246 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %245, i32 0, i32 6
  %247 = load ptr, ptr %15, align 8, !tbaa !5
  %248 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %247, i32 0, i32 3
  %249 = load i64, ptr %248, align 8, !tbaa !18
  %250 = load ptr, ptr %15, align 8, !tbaa !5
  %251 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %250, i32 0, i32 2
  %252 = load i64, ptr %251, align 8, !tbaa !17
  %253 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_implL31spline2d_bicubiccalcderivativesEPKNS_9ae_matrixEPKNS_9ae_vectorES5_llS5_lS5_lS5_lS5_lS5_PS0_S6_S6_PNS_8ae_stateE(ptr noundef %19, ptr noundef %244, ptr noundef %246, i64 noundef %249, i64 noundef %252, ptr noundef %23, i64 noundef 0, ptr noundef %23, i64 noundef 0, ptr noundef %23, i64 noundef 0, ptr noundef %23, i64 noundef 0, ptr noundef %23, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %253)
  store i64 0, ptr %24, align 8, !tbaa !9
  br label %254

254:                                              ; preds = %381, %242
  %255 = load i64, ptr %24, align 8, !tbaa !9
  %256 = load ptr, ptr %15, align 8, !tbaa !5
  %257 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %256, i32 0, i32 3
  %258 = load i64, ptr %257, align 8, !tbaa !18
  %259 = sub nsw i64 %258, 1
  %260 = icmp sle i64 %255, %259
  br i1 %260, label %261, label %384

261:                                              ; preds = %254
  store i64 0, ptr %25, align 8, !tbaa !9
  br label %262

262:                                              ; preds = %377, %261
  %263 = load i64, ptr %25, align 8, !tbaa !9
  %264 = load ptr, ptr %15, align 8, !tbaa !5
  %265 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %264, i32 0, i32 2
  %266 = load i64, ptr %265, align 8, !tbaa !17
  %267 = sub nsw i64 %266, 1
  %268 = icmp sle i64 %263, %267
  br i1 %268, label %269, label %380

269:                                              ; preds = %262
  %270 = load ptr, ptr %15, align 8, !tbaa !5
  %271 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %270, i32 0, i32 4
  %272 = load i64, ptr %271, align 8, !tbaa !15
  %273 = load i64, ptr %24, align 8, !tbaa !9
  %274 = load ptr, ptr %15, align 8, !tbaa !5
  %275 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %274, i32 0, i32 2
  %276 = load i64, ptr %275, align 8, !tbaa !17
  %277 = mul nsw i64 %273, %276
  %278 = load i64, ptr %25, align 8, !tbaa !9
  %279 = add nsw i64 %277, %278
  %280 = mul nsw i64 %272, %279
  %281 = load i64, ptr %27, align 8, !tbaa !9
  %282 = add nsw i64 %280, %281
  store i64 %282, ptr %26, align 8, !tbaa !9
  %283 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %19, i32 0, i32 6
  %284 = load ptr, ptr %283, align 8, !tbaa !21
  %285 = load i64, ptr %24, align 8, !tbaa !9
  %286 = getelementptr inbounds ptr, ptr %284, i64 %285
  %287 = load ptr, ptr %286, align 8, !tbaa !5
  %288 = load i64, ptr %25, align 8, !tbaa !9
  %289 = getelementptr inbounds double, ptr %287, i64 %288
  %290 = load double, ptr %289, align 8, !tbaa !22
  %291 = load ptr, ptr %15, align 8, !tbaa !5
  %292 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %291, i32 0, i32 7
  %293 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %292, i32 0, i32 4
  %294 = load ptr, ptr %293, align 8, !tbaa !21
  %295 = load i64, ptr %26, align 8, !tbaa !9
  %296 = getelementptr inbounds double, ptr %294, i64 %295
  store double %290, ptr %296, align 8, !tbaa !22
  %297 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %20, i32 0, i32 6
  %298 = load ptr, ptr %297, align 8, !tbaa !21
  %299 = load i64, ptr %24, align 8, !tbaa !9
  %300 = getelementptr inbounds ptr, ptr %298, i64 %299
  %301 = load ptr, ptr %300, align 8, !tbaa !5
  %302 = load i64, ptr %25, align 8, !tbaa !9
  %303 = getelementptr inbounds double, ptr %301, i64 %302
  %304 = load double, ptr %303, align 8, !tbaa !22
  %305 = load ptr, ptr %15, align 8, !tbaa !5
  %306 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %305, i32 0, i32 7
  %307 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %306, i32 0, i32 4
  %308 = load ptr, ptr %307, align 8, !tbaa !21
  %309 = load ptr, ptr %15, align 8, !tbaa !5
  %310 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %309, i32 0, i32 2
  %311 = load i64, ptr %310, align 8, !tbaa !17
  %312 = load ptr, ptr %15, align 8, !tbaa !5
  %313 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %312, i32 0, i32 3
  %314 = load i64, ptr %313, align 8, !tbaa !18
  %315 = mul nsw i64 %311, %314
  %316 = load ptr, ptr %15, align 8, !tbaa !5
  %317 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %316, i32 0, i32 4
  %318 = load i64, ptr %317, align 8, !tbaa !15
  %319 = mul nsw i64 %315, %318
  %320 = load i64, ptr %26, align 8, !tbaa !9
  %321 = add nsw i64 %319, %320
  %322 = getelementptr inbounds double, ptr %308, i64 %321
  store double %304, ptr %322, align 8, !tbaa !22
  %323 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %21, i32 0, i32 6
  %324 = load ptr, ptr %323, align 8, !tbaa !21
  %325 = load i64, ptr %24, align 8, !tbaa !9
  %326 = getelementptr inbounds ptr, ptr %324, i64 %325
  %327 = load ptr, ptr %326, align 8, !tbaa !5
  %328 = load i64, ptr %25, align 8, !tbaa !9
  %329 = getelementptr inbounds double, ptr %327, i64 %328
  %330 = load double, ptr %329, align 8, !tbaa !22
  %331 = load ptr, ptr %15, align 8, !tbaa !5
  %332 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %331, i32 0, i32 7
  %333 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %332, i32 0, i32 4
  %334 = load ptr, ptr %333, align 8, !tbaa !21
  %335 = load ptr, ptr %15, align 8, !tbaa !5
  %336 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %335, i32 0, i32 2
  %337 = load i64, ptr %336, align 8, !tbaa !17
  %338 = mul nsw i64 2, %337
  %339 = load ptr, ptr %15, align 8, !tbaa !5
  %340 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %339, i32 0, i32 3
  %341 = load i64, ptr %340, align 8, !tbaa !18
  %342 = mul nsw i64 %338, %341
  %343 = load ptr, ptr %15, align 8, !tbaa !5
  %344 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %343, i32 0, i32 4
  %345 = load i64, ptr %344, align 8, !tbaa !15
  %346 = mul nsw i64 %342, %345
  %347 = load i64, ptr %26, align 8, !tbaa !9
  %348 = add nsw i64 %346, %347
  %349 = getelementptr inbounds double, ptr %334, i64 %348
  store double %330, ptr %349, align 8, !tbaa !22
  %350 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %22, i32 0, i32 6
  %351 = load ptr, ptr %350, align 8, !tbaa !21
  %352 = load i64, ptr %24, align 8, !tbaa !9
  %353 = getelementptr inbounds ptr, ptr %351, i64 %352
  %354 = load ptr, ptr %353, align 8, !tbaa !5
  %355 = load i64, ptr %25, align 8, !tbaa !9
  %356 = getelementptr inbounds double, ptr %354, i64 %355
  %357 = load double, ptr %356, align 8, !tbaa !22
  %358 = load ptr, ptr %15, align 8, !tbaa !5
  %359 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %358, i32 0, i32 7
  %360 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %359, i32 0, i32 4
  %361 = load ptr, ptr %360, align 8, !tbaa !21
  %362 = load ptr, ptr %15, align 8, !tbaa !5
  %363 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %362, i32 0, i32 2
  %364 = load i64, ptr %363, align 8, !tbaa !17
  %365 = mul nsw i64 3, %364
  %366 = load ptr, ptr %15, align 8, !tbaa !5
  %367 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %366, i32 0, i32 3
  %368 = load i64, ptr %367, align 8, !tbaa !18
  %369 = mul nsw i64 %365, %368
  %370 = load ptr, ptr %15, align 8, !tbaa !5
  %371 = getelementptr inbounds %"struct.alglib_impl::spline2dinterpolant", ptr %370, i32 0, i32 4
  %372 = load i64, ptr %371, align 8, !tbaa !15
  %373 = mul nsw i64 %369, %372
  %374 = load i64, ptr %26, align 8, !tbaa !9
  %375 = add nsw i64 %373, %374
  %376 = getelementptr inbounds double, ptr %361, i64 %375
  store double %357, ptr %376, align 8, !tbaa !22
  br label %377

377:                                              ; preds = %269
  %378 = load i64, ptr %25, align 8, !tbaa !9
  %379 = add nsw i64 %378, 1
  store i64 %379, ptr %25, align 8, !tbaa !9
  br label %262, !llvm.loop !29

380:                                              ; preds = %262
  br label %381

381:                                              ; preds = %380
  %382 = load i64, ptr %24, align 8, !tbaa !9
  %383 = add nsw i64 %382, 1
  store i64 %383, ptr %24, align 8, !tbaa !9
  br label %254, !llvm.loop !30

384:                                              ; preds = %254
  br label %385

385:                                              ; preds = %384
  %386 = load i64, ptr %27, align 8, !tbaa !9
  %387 = add nsw i64 %386, 1
  store i64 %387, ptr %27, align 8, !tbaa !9
  br label %187, !llvm.loop !31

388:                                              ; preds = %187
  %389 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %389)
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #4
  ret void
}

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_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL17spline2d_sortgridEPNS_9ae_vectorElS1_lS1_bS1_bS1_bS1_bS1_lS1_S1_S1_bPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL31spline2d_bicubiccalcderivativesEPKNS_9ae_matrixEPKNS_9ae_vectorES5_llS5_lS5_lS5_lS5_lS5_PS0_S6_S6_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!16, !10, i64 32}
!16 = !{!"_ZTSN11alglib_impl19spline2dinterpolantE", !10, i64 0, !13, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !12, i64 40, !12, i64 104, !12, i64 168, !12, i64 232, !12, i64 296}
!17 = !{!16, !10, i64 16}
!18 = !{!16, !10, i64 24}
!19 = !{!16, !10, i64 0}
!20 = !{!16, !13, i64 8}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !25}
!29 = distinct !{!29, !25}
!30 = distinct !{!30, !25}
!31 = distinct !{!31, !25}


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

@.str.874 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.875 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.876 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.877 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.878 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.879 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.880 = external hidden unnamed_addr constant [56 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_impl24spline2dbuildbicubicvbufEPKNS_9ae_vectorElS2_lS2_lPNS_19spline2dinterpolantEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, i64 noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #3 {
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca %"struct.alglib_impl::ae_vector", align 8
  %11 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %12 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %13 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %14 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %15 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %15) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %7, ptr noundef nonnull %9)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %10, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %11, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %12, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %13, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %14, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %15, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %10, ptr noundef %4, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %11, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %12, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %13, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %14, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %15, i64 noundef 0, i64 noundef 3, ptr noundef %7, i1 noundef zeroext true)
  %16 = icmp sgt i64 %1, 1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.874, ptr noundef %7)
  %17 = icmp sgt i64 %3, 1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.875, ptr noundef %7)
  %18 = icmp sgt i64 %5, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.876, ptr noundef %7)
  %19 = load i64, ptr %0, align 8, !tbaa !5
  %.not = icmp slt i64 %19, %1
  br i1 %.not, label %23, label %20

20:                                               ; preds = %8
  %21 = load i64, ptr %2, align 8, !tbaa !5
  %22 = icmp sge i64 %21, %3
  br label %23

23:                                               ; preds = %20, %8
  %24 = phi i1 [ false, %8 ], [ %22, %20 ]
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef nonnull @.str.877, ptr noundef %7)
  %25 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %1, ptr noundef %7)
  br i1 %25, label %26, label %28

26:                                               ; preds = %23
  %27 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %2, i64 noundef %3, ptr noundef %7)
  br label %28

28:                                               ; preds = %26, %23
  %29 = phi i1 [ false, %23 ], [ %27, %26 ]
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %29, ptr noundef nonnull @.str.878, ptr noundef %7)
  %30 = mul nsw i64 %3, %1
  %31 = mul nsw i64 %30, %5
  %32 = load i64, ptr %10, align 8, !tbaa !5
  %33 = icmp sge i64 %32, %31
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef nonnull @.str.879, ptr noundef %7)
  %34 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %31, ptr noundef %7)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %34, ptr noundef nonnull @.str.880, ptr noundef %7)
  %35 = getelementptr inbounds i8, ptr %6, i64 32
  store i64 %5, ptr %35, align 8, !tbaa !13
  %36 = getelementptr inbounds i8, ptr %6, i64 16
  store i64 %1, ptr %36, align 8, !tbaa !15
  %37 = getelementptr inbounds i8, ptr %6, i64 24
  store i64 %3, ptr %37, align 8, !tbaa !16
  store i64 -3, ptr %6, align 8, !tbaa !17
  %38 = getelementptr inbounds i8, ptr %6, i64 8
  store i8 0, ptr %38, align 8, !tbaa !18
  %39 = shl nsw i64 %31, 2
  %40 = getelementptr inbounds i8, ptr %6, i64 40
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %40, i64 noundef %1, ptr noundef %7)
  %41 = getelementptr inbounds i8, ptr %6, i64 104
  %42 = load i64, ptr %37, align 8, !tbaa !16
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %41, i64 noundef %42, ptr noundef %7)
  %43 = getelementptr inbounds i8, ptr %6, i64 168
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %43, i64 noundef %39, ptr noundef %7)
  %44 = load i64, ptr %37, align 8, !tbaa !16
  %45 = load i64, ptr %36, align 8, !tbaa !15
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %44, i64 noundef %45, ptr noundef %7)
  %46 = load i64, ptr %36, align 8, !tbaa !15
  %.not139.not149 = icmp sgt i64 %46, 0
  br i1 %.not139.not149, label %.lr.ph, label %.preheader148

.lr.ph:                                           ; preds = %28
  %47 = getelementptr inbounds i8, ptr %0, i64 56
  %48 = getelementptr inbounds i8, ptr %6, i64 96
  %xtraiter = and i64 %46, 3
  %49 = icmp ult i64 %46, 4
  br i1 %49, label %.preheader148.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %46, 9223372036854775804
  br label %60

.preheader148.loopexit.unr-lcssa:                 ; preds = %60, %.lr.ph
  %.0137150.unr = phi i64 [ 0, %.lr.ph ], [ %84, %60 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader148, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader148.loopexit.unr-lcssa, %.epil.preheader
  %.0137150.epil = phi i64 [ %55, %.epil.preheader ], [ %.0137150.unr, %.preheader148.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader148.loopexit.unr-lcssa ]
  %50 = load ptr, ptr %47, align 8, !tbaa !19
  %51 = getelementptr inbounds double, ptr %50, i64 %.0137150.epil
  %52 = load double, ptr %51, align 8, !tbaa !20
  %53 = load ptr, ptr %48, align 8, !tbaa !19
  %54 = getelementptr inbounds double, ptr %53, i64 %.0137150.epil
  store double %52, ptr %54, align 8, !tbaa !20
  %55 = add nuw nsw i64 %.0137150.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader148, label %.epil.preheader, !llvm.loop !22

.preheader148:                                    ; preds = %.preheader148.loopexit.unr-lcssa, %.epil.preheader, %28
  %56 = load i64, ptr %37, align 8, !tbaa !16
  %.not140.not151 = icmp sgt i64 %56, 0
  br i1 %.not140.not151, label %.lr.ph153, label %._crit_edge

.lr.ph153:                                        ; preds = %.preheader148
  %57 = getelementptr inbounds i8, ptr %2, i64 56
  %58 = getelementptr inbounds i8, ptr %6, i64 160
  %xtraiter184 = and i64 %56, 3
  %59 = icmp ult i64 %56, 4
  br i1 %59, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph153.new

.lr.ph153.new:                                    ; preds = %.lr.ph153
  %unroll_iter187 = and i64 %56, 9223372036854775804
  br label %85

60:                                               ; preds = %60, %.lr.ph.new
  %.0137150 = phi i64 [ 0, %.lr.ph.new ], [ %84, %60 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %60 ]
  %61 = load ptr, ptr %47, align 8, !tbaa !19
  %62 = getelementptr inbounds double, ptr %61, i64 %.0137150
  %63 = load double, ptr %62, align 8, !tbaa !20
  %64 = load ptr, ptr %48, align 8, !tbaa !19
  %65 = getelementptr inbounds double, ptr %64, i64 %.0137150
  store double %63, ptr %65, align 8, !tbaa !20
  %66 = or disjoint i64 %.0137150, 1
  %67 = load ptr, ptr %47, align 8, !tbaa !19
  %68 = getelementptr inbounds double, ptr %67, i64 %66
  %69 = load double, ptr %68, align 8, !tbaa !20
  %70 = load ptr, ptr %48, align 8, !tbaa !19
  %71 = getelementptr inbounds double, ptr %70, i64 %66
  store double %69, ptr %71, align 8, !tbaa !20
  %72 = or disjoint i64 %.0137150, 2
  %73 = load ptr, ptr %47, align 8, !tbaa !19
  %74 = getelementptr inbounds double, ptr %73, i64 %72
  %75 = load double, ptr %74, align 8, !tbaa !20
  %76 = load ptr, ptr %48, align 8, !tbaa !19
  %77 = getelementptr inbounds double, ptr %76, i64 %72
  store double %75, ptr %77, align 8, !tbaa !20
  %78 = or disjoint i64 %.0137150, 3
  %79 = load ptr, ptr %47, align 8, !tbaa !19
  %80 = getelementptr inbounds double, ptr %79, i64 %78
  %81 = load double, ptr %80, align 8, !tbaa !20
  %82 = load ptr, ptr %48, align 8, !tbaa !19
  %83 = getelementptr inbounds double, ptr %82, i64 %78
  store double %81, ptr %83, align 8, !tbaa !20
  %84 = add nuw nsw i64 %.0137150, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader148.loopexit.unr-lcssa, label %60, !llvm.loop !24

85:                                               ; preds = %85, %.lr.ph153.new
  %.1138152 = phi i64 [ 0, %.lr.ph153.new ], [ %109, %85 ]
  %niter188 = phi i64 [ 0, %.lr.ph153.new ], [ %niter188.next.3, %85 ]
  %86 = load ptr, ptr %57, align 8, !tbaa !19
  %87 = getelementptr inbounds double, ptr %86, i64 %.1138152
  %88 = load double, ptr %87, align 8, !tbaa !20
  %89 = load ptr, ptr %58, align 8, !tbaa !19
  %90 = getelementptr inbounds double, ptr %89, i64 %.1138152
  store double %88, ptr %90, align 8, !tbaa !20
  %91 = or disjoint i64 %.1138152, 1
  %92 = load ptr, ptr %57, align 8, !tbaa !19
  %93 = getelementptr inbounds double, ptr %92, i64 %91
  %94 = load double, ptr %93, align 8, !tbaa !20
  %95 = load ptr, ptr %58, align 8, !tbaa !19
  %96 = getelementptr inbounds double, ptr %95, i64 %91
  store double %94, ptr %96, align 8, !tbaa !20
  %97 = or disjoint i64 %.1138152, 2
  %98 = load ptr, ptr %57, align 8, !tbaa !19
  %99 = getelementptr inbounds double, ptr %98, i64 %97
  %100 = load double, ptr %99, align 8, !tbaa !20
  %101 = load ptr, ptr %58, align 8, !tbaa !19
  %102 = getelementptr inbounds double, ptr %101, i64 %97
  store double %100, ptr %102, align 8, !tbaa !20
  %103 = or disjoint i64 %.1138152, 3
  %104 = load ptr, ptr %57, align 8, !tbaa !19
  %105 = getelementptr inbounds double, ptr %104, i64 %103
  %106 = load double, ptr %105, align 8, !tbaa !20
  %107 = load ptr, ptr %58, align 8, !tbaa !19
  %108 = getelementptr inbounds double, ptr %107, i64 %103
  store double %106, ptr %108, align 8, !tbaa !20
  %109 = add nuw nsw i64 %.1138152, 4
  %niter188.next.3 = add i64 %niter188, 4
  %niter188.ncmp.3 = icmp eq i64 %niter188.next.3, %unroll_iter187
  br i1 %niter188.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %85, !llvm.loop !26

._crit_edge.loopexit.unr-lcssa:                   ; preds = %85, %.lr.ph153
  %.1138152.unr = phi i64 [ 0, %.lr.ph153 ], [ %109, %85 ]
  %lcmp.mod186.not = icmp eq i64 %xtraiter184, 0
  br i1 %lcmp.mod186.not, label %._crit_edge, label %.epil.preheader183

.epil.preheader183:                               ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader183
  %.1138152.epil = phi i64 [ %115, %.epil.preheader183 ], [ %.1138152.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter185 = phi i64 [ %epil.iter185.next, %.epil.preheader183 ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %110 = load ptr, ptr %57, align 8, !tbaa !19
  %111 = getelementptr inbounds double, ptr %110, i64 %.1138152.epil
  %112 = load double, ptr %111, align 8, !tbaa !20
  %113 = load ptr, ptr %58, align 8, !tbaa !19
  %114 = getelementptr inbounds double, ptr %113, i64 %.1138152.epil
  store double %112, ptr %114, align 8, !tbaa !20
  %115 = add nuw nsw i64 %.1138152.epil, 1
  %epil.iter185.next = add i64 %epil.iter185, 1
  %epil.iter185.cmp.not = icmp eq i64 %epil.iter185.next, %xtraiter184
  br i1 %epil.iter185.cmp.not, label %._crit_edge, label %.epil.preheader183, !llvm.loop !27

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader183, %.preheader148
  call void @_ZN11alglib_implL17spline2d_sortgridEPNS_9ae_vectorElS1_lS1_bS1_bS1_bS1_bS1_lS1_S1_S1_bPNS_8ae_stateE(ptr noundef nonnull %40, i64 noundef %1, ptr noundef nonnull %41, i64 noundef %3, ptr noundef nonnull %40, i1 noundef zeroext false, ptr noundef nonnull %40, i1 noundef zeroext false, ptr noundef nonnull %41, i1 noundef zeroext false, ptr noundef nonnull %41, i1 noundef zeroext false, ptr noundef nonnull %10, i64 noundef %5, ptr noundef nonnull %15, ptr noundef nonnull %15, ptr noundef nonnull %15, i1 noundef zeroext false, ptr noundef %7)
  %116 = load i64, ptr %35, align 8, !tbaa !13
  %.not141.not171 = icmp sgt i64 %116, 0
  br i1 %.not141.not171, label %.preheader147.lr.ph, label %._crit_edge174

.preheader147.lr.ph:                              ; preds = %._crit_edge
  %117 = getelementptr inbounds i8, ptr %10, i64 56
  %118 = getelementptr inbounds i8, ptr %11, i64 72
  %119 = getelementptr inbounds i8, ptr %6, i64 224
  %120 = getelementptr inbounds i8, ptr %12, i64 72
  %121 = getelementptr inbounds i8, ptr %13, i64 72
  %122 = getelementptr inbounds i8, ptr %14, i64 72
  %.pre = load i64, ptr %37, align 8, !tbaa !16
  br label %.preheader147

.preheader147:                                    ; preds = %.preheader147.lr.ph, %._crit_edge170
  %123 = phi i64 [ %.pre, %.preheader147.lr.ph ], [ %160, %._crit_edge170 ]
  %124 = phi i64 [ %116, %.preheader147.lr.ph ], [ %206, %._crit_edge170 ]
  %.0172 = phi i64 [ 0, %.preheader147.lr.ph ], [ %205, %._crit_edge170 ]
  %.not142.not158 = icmp sgt i64 %123, 0
  %.pre182 = load i64, ptr %36, align 8, !tbaa !15
  %.not145.not154 = icmp sgt i64 %.pre182, 0
  %or.cond = select i1 %.not142.not158, i1 %.not145.not154, i1 false
  br i1 %or.cond, label %.preheader146.us.preheader, label %._crit_edge160

.preheader146.us.preheader:                       ; preds = %.preheader147
  %xtraiter190 = and i64 %.pre182, 1
  %125 = icmp eq i64 %.pre182, 1
  %unroll_iter193 = and i64 %.pre182, 9223372036854775806
  %lcmp.mod192.not = icmp eq i64 %xtraiter190, 0
  br label %.preheader146.us

.preheader146.us:                                 ; preds = %.preheader146.us.preheader, %._crit_edge157.us
  %.2159.us = phi i64 [ %159, %._crit_edge157.us ], [ 0, %.preheader146.us.preheader ]
  %126 = mul nuw nsw i64 %.pre182, %.2159.us
  br i1 %125, label %._crit_edge157.us.unr-lcssa, label %.preheader146.us.new

.preheader146.us.new:                             ; preds = %.preheader146.us, %.preheader146.us.new
  %.0136155.us = phi i64 [ %148, %.preheader146.us.new ], [ 0, %.preheader146.us ]
  %niter194 = phi i64 [ %niter194.next.1, %.preheader146.us.new ], [ 0, %.preheader146.us ]
  %127 = load ptr, ptr %117, align 8, !tbaa !19
  %128 = add nuw nsw i64 %126, %.0136155.us
  %129 = mul nsw i64 %128, %124
  %130 = getelementptr double, ptr %127, i64 %129
  %131 = getelementptr double, ptr %130, i64 %.0172
  %132 = load double, ptr %131, align 8, !tbaa !20
  %133 = load ptr, ptr %118, align 8, !tbaa !19
  %134 = getelementptr inbounds ptr, ptr %133, i64 %.2159.us
  %135 = load ptr, ptr %134, align 8, !tbaa !28
  %136 = getelementptr inbounds double, ptr %135, i64 %.0136155.us
  store double %132, ptr %136, align 8, !tbaa !20
  %137 = or disjoint i64 %.0136155.us, 1
  %138 = load ptr, ptr %117, align 8, !tbaa !19
  %139 = add nuw nsw i64 %126, %137
  %140 = mul nsw i64 %139, %124
  %141 = getelementptr double, ptr %138, i64 %140
  %142 = getelementptr double, ptr %141, i64 %.0172
  %143 = load double, ptr %142, align 8, !tbaa !20
  %144 = load ptr, ptr %118, align 8, !tbaa !19
  %145 = getelementptr inbounds ptr, ptr %144, i64 %.2159.us
  %146 = load ptr, ptr %145, align 8, !tbaa !28
  %147 = getelementptr inbounds double, ptr %146, i64 %137
  store double %143, ptr %147, align 8, !tbaa !20
  %148 = add nuw nsw i64 %.0136155.us, 2
  %niter194.next.1 = add i64 %niter194, 2
  %niter194.ncmp.1 = icmp eq i64 %niter194.next.1, %unroll_iter193
  br i1 %niter194.ncmp.1, label %._crit_edge157.us.unr-lcssa, label %.preheader146.us.new, !llvm.loop !29

._crit_edge157.us.unr-lcssa:                      ; preds = %.preheader146.us.new, %.preheader146.us
  %.0136155.us.unr = phi i64 [ 0, %.preheader146.us ], [ %148, %.preheader146.us.new ]
  br i1 %lcmp.mod192.not, label %._crit_edge157.us, label %._crit_edge157.us.epilog-lcssa

._crit_edge157.us.epilog-lcssa:                   ; preds = %._crit_edge157.us.unr-lcssa
  %149 = load ptr, ptr %117, align 8, !tbaa !19
  %150 = add nuw nsw i64 %126, %.0136155.us.unr
  %151 = mul nsw i64 %150, %124
  %152 = getelementptr double, ptr %149, i64 %151
  %153 = getelementptr double, ptr %152, i64 %.0172
  %154 = load double, ptr %153, align 8, !tbaa !20
  %155 = load ptr, ptr %118, align 8, !tbaa !19
  %156 = getelementptr inbounds ptr, ptr %155, i64 %.2159.us
  %157 = load ptr, ptr %156, align 8, !tbaa !28
  %158 = getelementptr inbounds double, ptr %157, i64 %.0136155.us.unr
  store double %154, ptr %158, align 8, !tbaa !20
  br label %._crit_edge157.us

._crit_edge157.us:                                ; preds = %._crit_edge157.us.unr-lcssa, %._crit_edge157.us.epilog-lcssa
  %159 = add nuw nsw i64 %.2159.us, 1
  %exitcond179.not = icmp eq i64 %159, %123
  br i1 %exitcond179.not, label %._crit_edge160, label %.preheader146.us, !llvm.loop !30

._crit_edge160:                                   ; preds = %._crit_edge157.us, %.preheader147
  call void @_ZN11alglib_implL31spline2d_bicubiccalcderivativesEPKNS_9ae_matrixEPKNS_9ae_vectorES5_llS5_lS5_lS5_lS5_lS5_PS0_S6_S6_PNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef nonnull %40, ptr noundef nonnull %41, i64 noundef %123, i64 noundef %.pre182, ptr noundef nonnull %15, i64 noundef 0, ptr noundef nonnull %15, i64 noundef 0, ptr noundef nonnull %15, i64 noundef 0, ptr noundef nonnull %15, i64 noundef 0, ptr noundef nonnull %15, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef %7)
  %160 = load i64, ptr %37, align 8, !tbaa !16
  %.not143.not168 = icmp sgt i64 %160, 0
  br i1 %.not143.not168, label %.preheader.lr.ph, label %._crit_edge170

.preheader.lr.ph:                                 ; preds = %._crit_edge160
  %161 = load i64, ptr %36, align 8, !tbaa !15
  %.not144.not163 = icmp sgt i64 %161, 0
  br i1 %.not144.not163, label %.preheader.lr.ph.split.us, label %._crit_edge170

.preheader.lr.ph.split.us:                        ; preds = %.preheader.lr.ph
  %162 = mul nuw nsw i64 %161, %160
  %factor.op.mul = mul i64 %160, 3
  %factor.op.mul161.reass = mul i64 %factor.op.mul, %161
  %factor.op.mul167 = shl nuw i64 %160, 1
  %factor.op.mul.reass = mul i64 %factor.op.mul167, %161
  %163 = load i64, ptr %35, align 8, !tbaa !13
  %164 = mul nsw i64 %162, %163
  %165 = mul nsw i64 %factor.op.mul.reass, %163
  %166 = mul nsw i64 %factor.op.mul161.reass, %163
  br label %.preheader.us

.preheader.us:                                    ; preds = %._crit_edge166.us, %.preheader.lr.ph.split.us
  %.3169.us = phi i64 [ 0, %.preheader.lr.ph.split.us ], [ %204, %._crit_edge166.us ]
  %167 = mul nuw nsw i64 %161, %.3169.us
  br label %168

168:                                              ; preds = %.preheader.us, %168
  %.1164.us = phi i64 [ 0, %.preheader.us ], [ %203, %168 ]
  %169 = add nuw nsw i64 %167, %.1164.us
  %170 = mul nsw i64 %163, %169
  %171 = add nsw i64 %170, %.0172
  %172 = load ptr, ptr %118, align 8, !tbaa !19
  %173 = getelementptr inbounds ptr, ptr %172, i64 %.3169.us
  %174 = load ptr, ptr %173, align 8, !tbaa !28
  %175 = getelementptr inbounds double, ptr %174, i64 %.1164.us
  %176 = load double, ptr %175, align 8, !tbaa !20
  %177 = load ptr, ptr %119, align 8, !tbaa !19
  %178 = getelementptr inbounds double, ptr %177, i64 %171
  store double %176, ptr %178, align 8, !tbaa !20
  %179 = load ptr, ptr %120, align 8, !tbaa !19
  %180 = getelementptr inbounds ptr, ptr %179, i64 %.3169.us
  %181 = load ptr, ptr %180, align 8, !tbaa !28
  %182 = getelementptr inbounds double, ptr %181, i64 %.1164.us
  %183 = load double, ptr %182, align 8, !tbaa !20
  %184 = load ptr, ptr %119, align 8, !tbaa !19
  %185 = getelementptr double, ptr %184, i64 %164
  %186 = getelementptr double, ptr %185, i64 %171
  store double %183, ptr %186, align 8, !tbaa !20
  %187 = load ptr, ptr %121, align 8, !tbaa !19
  %188 = getelementptr inbounds ptr, ptr %187, i64 %.3169.us
  %189 = load ptr, ptr %188, align 8, !tbaa !28
  %190 = getelementptr inbounds double, ptr %189, i64 %.1164.us
  %191 = load double, ptr %190, align 8, !tbaa !20
  %192 = load ptr, ptr %119, align 8, !tbaa !19
  %193 = getelementptr double, ptr %192, i64 %165
  %194 = getelementptr double, ptr %193, i64 %171
  store double %191, ptr %194, align 8, !tbaa !20
  %195 = load ptr, ptr %122, align 8, !tbaa !19
  %196 = getelementptr inbounds ptr, ptr %195, i64 %.3169.us
  %197 = load ptr, ptr %196, align 8, !tbaa !28
  %198 = getelementptr inbounds double, ptr %197, i64 %.1164.us
  %199 = load double, ptr %198, align 8, !tbaa !20
  %200 = load ptr, ptr %119, align 8, !tbaa !19
  %201 = getelementptr double, ptr %200, i64 %166
  %202 = getelementptr double, ptr %201, i64 %171
  store double %199, ptr %202, align 8, !tbaa !20
  %203 = add nuw nsw i64 %.1164.us, 1
  %exitcond180.not = icmp eq i64 %203, %161
  br i1 %exitcond180.not, label %._crit_edge166.us, label %168, !llvm.loop !31

._crit_edge166.us:                                ; preds = %168
  %204 = add nuw nsw i64 %.3169.us, 1
  %exitcond181.not = icmp eq i64 %204, %160
  br i1 %exitcond181.not, label %._crit_edge170, label %.preheader.us, !llvm.loop !32

._crit_edge170:                                   ; preds = %._crit_edge166.us, %.preheader.lr.ph, %._crit_edge160
  %205 = add nuw nsw i64 %.0172, 1
  %206 = load i64, ptr %35, align 8, !tbaa !13
  %.not141.not = icmp slt i64 %205, %206
  br i1 %.not141.not, label %.preheader147, label %._crit_edge174, !llvm.loop !33

._crit_edge174:                                   ; preds = %._crit_edge170, %._crit_edge
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %7)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  ret void
}

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_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL17spline2d_sortgridEPNS_9ae_vectorElS1_lS1_bS1_bS1_bS1_bS1_lS1_S1_S1_bPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL31spline2d_bicubiccalcderivativesEPKNS_9ae_matrixEPKNS_9ae_vectorES5_llS5_lS5_lS5_lS5_lS5_PS0_S6_S6_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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 = { 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_impl9ae_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !8, i64 56}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!14, !7, i64 32}
!14 = !{!"_ZTSN11alglib_impl19spline2dinterpolantE", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !6, i64 40, !6, i64 104, !6, i64 168, !6, i64 232, !6, i64 296}
!15 = !{!14, !7, i64 16}
!16 = !{!14, !7, i64 24}
!17 = !{!14, !7, i64 0}
!18 = !{!14, !10, i64 8}
!19 = !{!8, !8, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !8, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !23}
!28 = !{!12, !12, i64 0}
!29 = distinct !{!29, !25}
!30 = distinct !{!30, !25}
!31 = distinct !{!31, !25}
!32 = distinct !{!32, !25}
!33 = distinct !{!33, !25}


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