; LLVM IR from venumb/ZSPACE :: cpp/depends/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::rbfv2model" = type { i64, 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", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", double, i64, double, i64, %"struct.alglib_impl::rbfv2calcbuffer" }
%"struct.alglib_impl::rbfv2calcbuffer" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }

@.str.682 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.683 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.684 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.685 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.686 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.687 = external hidden unnamed_addr constant [50 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

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

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 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_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) #2

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #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
define dso_local void @_ZN11alglib_impl14rbfv2gridcalc2EPNS_10rbfv2modelEPNS_9ae_vectorElS3_lPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6) #3 {
  %8 = alloca ptr, align 8
  %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 ptr, align 8
  %15 = alloca %"struct.alglib_impl::ae_frame", align 8
  %16 = alloca %"struct.alglib_impl::ae_vector", align 8
  %17 = alloca %"struct.alglib_impl::ae_vector", align 8
  %18 = alloca %"struct.alglib_impl::ae_vector", align 8
  %19 = alloca %"struct.alglib_impl::ae_vector", align 8
  %20 = alloca %"struct.alglib_impl::ae_vector", align 8
  %21 = alloca %"struct.alglib_impl::ae_vector", align 8
  %22 = alloca %"struct.alglib_impl::ae_vector", align 8
  %23 = alloca %"struct.alglib_impl::ae_vector", align 8
  %24 = alloca %"struct.alglib_impl::ae_vector", align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i64 %2, ptr %10, align 8, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i64 %4, ptr %12, align 8, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 64, 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
  %28 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %28, ptr noundef %15)
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 64, i1 false)
  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 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %24, i8 0, i64 64, i1 false)
  %29 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %29)
  %30 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %16, i64 noundef 0, i64 noundef 3, ptr noundef %30, i1 noundef zeroext true)
  %31 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %17, i64 noundef 0, i64 noundef 3, ptr noundef %31, i1 noundef zeroext true)
  %32 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %18, i64 noundef 0, i64 noundef 3, ptr noundef %32, i1 noundef zeroext true)
  %33 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %19, i64 noundef 0, i64 noundef 3, ptr noundef %33, i1 noundef zeroext true)
  %34 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %20, i64 noundef 0, i64 noundef 1, ptr noundef %34, i1 noundef zeroext true)
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %21, i64 noundef 0, i64 noundef 2, ptr noundef %35, i1 noundef zeroext true)
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %22, i64 noundef 0, i64 noundef 2, ptr noundef %36, i1 noundef zeroext true)
  %37 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %23, i64 noundef 0, i64 noundef 2, ptr noundef %37, i1 noundef zeroext true)
  %38 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %24, i64 noundef 0, i64 noundef 3, ptr noundef %38, i1 noundef zeroext true)
  %39 = load i64, ptr %10, align 8, !tbaa !9
  %40 = icmp sgt i64 %39, 0
  %41 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %40, ptr noundef @.str.682, ptr noundef %41)
  %42 = load i64, ptr %12, align 8, !tbaa !9
  %43 = icmp sgt i64 %42, 0
  %44 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %43, ptr noundef @.str.683, 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
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %49, ptr noundef @.str.684, ptr noundef %50)
  %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
  %56 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %55, ptr noundef @.str.685, ptr noundef %56)
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = load i64, ptr %10, align 8, !tbaa !9
  %59 = load ptr, ptr %14, align 8, !tbaa !5
  %60 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %57, i64 noundef %58, ptr noundef %59)
  %61 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %60, ptr noundef @.str.686, ptr noundef %61)
  %62 = load ptr, ptr %11, align 8, !tbaa !5
  %63 = load i64, ptr %12, align 8, !tbaa !9
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  %65 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %62, i64 noundef %63, ptr noundef %64)
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %65, ptr noundef @.str.687, ptr noundef %66)
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  %68 = load i64, ptr %10, align 8, !tbaa !9
  %69 = load i64, ptr %12, align 8, !tbaa !9
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %67, i64 noundef %68, i64 noundef %69, ptr noundef %70)
  store i64 0, ptr %25, align 8, !tbaa !9
  br label %71

71:                                               ; preds = %95, %7
  %72 = load i64, ptr %25, align 8, !tbaa !9
  %73 = load i64, ptr %10, align 8, !tbaa !9
  %74 = sub nsw i64 %73, 1
  %75 = icmp sle i64 %72, %74
  br i1 %75, label %76, label %98

76:                                               ; preds = %71
  store i64 0, ptr %26, align 8, !tbaa !9
  br label %77

77:                                               ; preds = %91, %76
  %78 = load i64, ptr %26, align 8, !tbaa !9
  %79 = load i64, ptr %12, align 8, !tbaa !9
  %80 = sub nsw i64 %79, 1
  %81 = icmp sle i64 %78, %80
  br i1 %81, label %82, label %94

82:                                               ; preds = %77
  %83 = load ptr, ptr %13, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %83, i32 0, i32 6
  %85 = load ptr, ptr %84, align 8, !tbaa !15
  %86 = load i64, ptr %25, align 8, !tbaa !9
  %87 = getelementptr inbounds ptr, ptr %85, i64 %86
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  %89 = load i64, ptr %26, align 8, !tbaa !9
  %90 = getelementptr inbounds double, ptr %88, i64 %89
  store double 0.000000e+00, ptr %90, align 8, !tbaa !16
  br label %91

91:                                               ; preds = %82
  %92 = load i64, ptr %26, align 8, !tbaa !9
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %26, align 8, !tbaa !9
  br label %77, !llvm.loop !18

94:                                               ; preds = %77
  br label %95

95:                                               ; preds = %94
  %96 = load i64, ptr %25, align 8, !tbaa !9
  %97 = add nsw i64 %96, 1
  store i64 %97, ptr %25, align 8, !tbaa !9
  br label %71, !llvm.loop !20

98:                                               ; preds = %71
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %99, i32 0, i32 0
  %101 = load i64, ptr %100, align 8, !tbaa !21
  %102 = icmp ne i64 %101, 1
  br i1 %102, label %108, label %103

103:                                              ; preds = %98
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %104, i32 0, i32 1
  %106 = load i64, ptr %105, align 8, !tbaa !25
  %107 = icmp ne i64 %106, 2
  br i1 %107, label %108, label %110

108:                                              ; preds = %103, %98
  %109 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %109)
  store i32 1, ptr %27, align 4
  br label %213

110:                                              ; preds = %103
  %111 = load i64, ptr %10, align 8, !tbaa !9
  %112 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %16, i64 noundef %111, ptr noundef %112)
  store i64 0, ptr %25, align 8, !tbaa !9
  br label %113

113:                                              ; preds = %129, %110
  %114 = load i64, ptr %25, align 8, !tbaa !9
  %115 = load i64, ptr %10, align 8, !tbaa !9
  %116 = sub nsw i64 %115, 1
  %117 = icmp sle i64 %114, %116
  br i1 %117, label %118, label %132

118:                                              ; preds = %113
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %119, i32 0, i32 4
  %121 = load ptr, ptr %120, align 8, !tbaa !15
  %122 = load i64, ptr %25, align 8, !tbaa !9
  %123 = getelementptr inbounds double, ptr %121, i64 %122
  %124 = load double, ptr %123, align 8, !tbaa !16
  %125 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %126 = load ptr, ptr %125, align 8, !tbaa !15
  %127 = load i64, ptr %25, align 8, !tbaa !9
  %128 = getelementptr inbounds double, ptr %126, i64 %127
  store double %124, ptr %128, align 8, !tbaa !16
  br label %129

129:                                              ; preds = %118
  %130 = load i64, ptr %25, align 8, !tbaa !9
  %131 = add nsw i64 %130, 1
  store i64 %131, ptr %25, align 8, !tbaa !9
  br label %113, !llvm.loop !26

132:                                              ; preds = %113
  %133 = load i64, ptr %10, align 8, !tbaa !9
  %134 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl7tagsortEPNS_9ae_vectorElS1_S1_PNS_8ae_stateE(ptr noundef %16, i64 noundef %133, ptr noundef %21, ptr noundef %23, ptr noundef %134)
  %135 = load i64, ptr %12, align 8, !tbaa !9
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %17, i64 noundef %135, ptr noundef %136)
  store i64 0, ptr %25, align 8, !tbaa !9
  br label %137

137:                                              ; preds = %153, %132
  %138 = load i64, ptr %25, align 8, !tbaa !9
  %139 = load i64, ptr %12, align 8, !tbaa !9
  %140 = sub nsw i64 %139, 1
  %141 = icmp sle i64 %138, %140
  br i1 %141, label %142, label %156

142:                                              ; preds = %137
  %143 = load ptr, ptr %11, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %143, i32 0, i32 4
  %145 = load ptr, ptr %144, align 8, !tbaa !15
  %146 = load i64, ptr %25, align 8, !tbaa !9
  %147 = getelementptr inbounds double, ptr %145, i64 %146
  %148 = load double, ptr %147, align 8, !tbaa !16
  %149 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %150 = load ptr, ptr %149, align 8, !tbaa !15
  %151 = load i64, ptr %25, align 8, !tbaa !9
  %152 = getelementptr inbounds double, ptr %150, i64 %151
  store double %148, ptr %152, align 8, !tbaa !16
  br label %153

153:                                              ; preds = %142
  %154 = load i64, ptr %25, align 8, !tbaa !9
  %155 = add nsw i64 %154, 1
  store i64 %155, ptr %25, align 8, !tbaa !9
  br label %137, !llvm.loop !27

156:                                              ; preds = %137
  %157 = load i64, ptr %12, align 8, !tbaa !9
  %158 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl7tagsortEPNS_9ae_vectorElS1_S1_PNS_8ae_stateE(ptr noundef %17, i64 noundef %157, ptr noundef %22, ptr noundef %23, ptr noundef %158)
  %159 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %18, i64 noundef 1, ptr noundef %159)
  %160 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %18, i32 0, i32 4
  %161 = load ptr, ptr %160, align 8, !tbaa !15
  %162 = getelementptr inbounds double, ptr %161, i64 0
  store double 0.000000e+00, ptr %162, align 8, !tbaa !16
  %163 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %19, i64 noundef 1, ptr noundef %163)
  %164 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %165 = load ptr, ptr %164, align 8, !tbaa !15
  %166 = getelementptr inbounds double, ptr %165, i64 0
  store double 0.000000e+00, ptr %166, align 8, !tbaa !16
  %167 = load i64, ptr %10, align 8, !tbaa !9
  %168 = load i64, ptr %12, align 8, !tbaa !9
  %169 = mul nsw i64 %167, %168
  %170 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %24, i64 noundef %169, ptr noundef %170)
  %171 = load ptr, ptr %8, align 8, !tbaa !5
  %172 = load i64, ptr %10, align 8, !tbaa !9
  %173 = load i64, ptr %12, align 8, !tbaa !9
  %174 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl15rbfv2gridcalcvxEPNS_10rbfv2modelEPNS_9ae_vectorElS3_lS3_lS3_lS3_bS3_PNS_8ae_stateE(ptr noundef %171, ptr noundef %16, i64 noundef %172, ptr noundef %17, i64 noundef %173, ptr noundef %18, i64 noundef 1, ptr noundef %19, i64 noundef 1, ptr noundef %20, i1 noundef zeroext false, ptr noundef %24, ptr noundef %174)
  store i64 0, ptr %25, align 8, !tbaa !9
  br label %175

175:                                              ; preds = %208, %156
  %176 = load i64, ptr %25, align 8, !tbaa !9
  %177 = load i64, ptr %10, align 8, !tbaa !9
  %178 = sub nsw i64 %177, 1
  %179 = icmp sle i64 %176, %178
  br i1 %179, label %180, label %211

180:                                              ; preds = %175
  store i64 0, ptr %26, align 8, !tbaa !9
  br label %181

181:                                              ; preds = %204, %180
  %182 = load i64, ptr %26, align 8, !tbaa !9
  %183 = load i64, ptr %12, align 8, !tbaa !9
  %184 = sub nsw i64 %183, 1
  %185 = icmp sle i64 %182, %184
  br i1 %185, label %186, label %207

186:                                              ; preds = %181
  %187 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %24, i32 0, i32 4
  %188 = load ptr, ptr %187, align 8, !tbaa !15
  %189 = load i64, ptr %25, align 8, !tbaa !9
  %190 = load i64, ptr %26, align 8, !tbaa !9
  %191 = load i64, ptr %10, align 8, !tbaa !9
  %192 = mul nsw i64 %190, %191
  %193 = add nsw i64 %189, %192
  %194 = getelementptr inbounds double, ptr %188, i64 %193
  %195 = load double, ptr %194, align 8, !tbaa !16
  %196 = load ptr, ptr %13, align 8, !tbaa !5
  %197 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %196, i32 0, i32 6
  %198 = load ptr, ptr %197, align 8, !tbaa !15
  %199 = load i64, ptr %25, align 8, !tbaa !9
  %200 = getelementptr inbounds ptr, ptr %198, i64 %199
  %201 = load ptr, ptr %200, align 8, !tbaa !5
  %202 = load i64, ptr %26, align 8, !tbaa !9
  %203 = getelementptr inbounds double, ptr %201, i64 %202
  store double %195, ptr %203, align 8, !tbaa !16
  br label %204

204:                                              ; preds = %186
  %205 = load i64, ptr %26, align 8, !tbaa !9
  %206 = add nsw i64 %205, 1
  store i64 %206, ptr %26, align 8, !tbaa !9
  br label %181, !llvm.loop !28

207:                                              ; preds = %181
  br label %208

208:                                              ; preds = %207
  %209 = load i64, ptr %25, align 8, !tbaa !9
  %210 = add nsw i64 %209, 1
  store i64 %210, ptr %25, align 8, !tbaa !9
  br label %175, !llvm.loop !29

211:                                              ; preds = %175
  %212 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %212)
  store i32 0, ptr %27, align 4
  br label %213

213:                                              ; preds = %211, %108
  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 64, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  %214 = load i32, ptr %27, align 4
  switch i32 %214, label %216 [
    i32 0, label %215
    i32 1, label %215
  ]

215:                                              ; preds = %213, %213
  ret void

216:                                              ; preds = %213
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl15rbfv2gridcalcvxEPNS_10rbfv2modelEPNS_9ae_vectorElS3_lS3_lS3_lS3_bS3_PNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i1 noundef zeroext, 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 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!22, !10, i64 0}
!22 = !{!"_ZTSN11alglib_impl10rbfv2modelE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !12, i64 32, !12, i64 96, !12, i64 160, !12, i64 224, !12, i64 288, !12, i64 352, !12, i64 416, !12, i64 480, !23, i64 544, !17, i64 624, !10, i64 632, !17, i64 640, !10, i64 648, !24, i64 656}
!23 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !14, i64 40, !7, i64 72}
!24 = !{!"_ZTSN11alglib_impl15rbfv2calcbufferE", !12, i64 0, !12, i64 64, !12, i64 128, !17, i64 192, !12, i64 200, !12, i64 264}
!25 = !{!22, !10, i64 8}
!26 = distinct !{!26, !19}
!27 = distinct !{!27, !19}
!28 = distinct !{!28, !19}
!29 = distinct !{!29, !19}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"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.682 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.683 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.684 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.685 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.686 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.687 = external hidden unnamed_addr constant [50 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

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

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 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_impl15ae_matrix_clearEPNS_9ae_matrixE(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_frame_leaveEPNS_8ae_stateE(ptr noundef) 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
define dso_local void @_ZN11alglib_impl14rbfv2gridcalc2EPNS_10rbfv2modelEPNS_9ae_vectorElS3_lPNS_9ae_matrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #3 {
  %8 = alloca %"struct.alglib_impl::ae_frame", align 8
  %9 = alloca %"struct.alglib_impl::ae_vector", 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 %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca %"struct.alglib_impl::ae_vector", align 8
  %16 = alloca %"struct.alglib_impl::ae_vector", align 8
  %17 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %17) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %6, ptr noundef nonnull %8)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %9, i8 0, i64 64, i1 false)
  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(64) %11, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %12, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %13, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %14, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %15, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %16, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %17, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %5)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %9, i64 noundef 0, i64 noundef 3, ptr noundef %6, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %10, i64 noundef 0, i64 noundef 3, ptr noundef %6, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %11, i64 noundef 0, i64 noundef 3, ptr noundef %6, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %12, i64 noundef 0, i64 noundef 3, ptr noundef %6, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %13, i64 noundef 0, i64 noundef 1, ptr noundef %6, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %14, i64 noundef 0, i64 noundef 2, ptr noundef %6, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %15, i64 noundef 0, i64 noundef 2, ptr noundef %6, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %16, i64 noundef 0, i64 noundef 2, ptr noundef %6, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %17, i64 noundef 0, i64 noundef 3, ptr noundef %6, i1 noundef zeroext true)
  %18 = icmp sgt i64 %2, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.682, ptr noundef %6)
  %19 = icmp sgt i64 %4, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.683, ptr noundef %6)
  %20 = load i64, ptr %1, align 8, !tbaa !5
  %21 = icmp sge i64 %20, %2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef nonnull @.str.684, ptr noundef %6)
  %22 = load i64, ptr %3, align 8, !tbaa !5
  %23 = icmp sge i64 %22, %4
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %23, ptr noundef nonnull @.str.685, ptr noundef %6)
  %24 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %1, i64 noundef %2, ptr noundef %6)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %24, ptr noundef nonnull @.str.686, ptr noundef %6)
  %25 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %4, ptr noundef %6)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef nonnull @.str.687, ptr noundef %6)
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %5, i64 noundef %2, i64 noundef %4, ptr noundef %6)
  br i1 %18, label %.preheader96.lr.ph, label %._crit_edge101

.preheader96.lr.ph:                               ; preds = %7
  %26 = getelementptr inbounds i8, ptr %5, i64 72
  br i1 %19, label %.preheader96.us.preheader, label %._crit_edge101

.preheader96.us.preheader:                        ; preds = %.preheader96.lr.ph
  %xtraiter = and i64 %4, 3
  %27 = icmp ult i64 %4, 4
  %unroll_iter = and i64 %4, 9223372036854775804
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader96.us

.preheader96.us:                                  ; preds = %.preheader96.us.preheader, %._crit_edge.us
  %.086100.us = phi i64 [ %53, %._crit_edge.us ], [ 0, %.preheader96.us.preheader ]
  br i1 %27, label %._crit_edge.us.unr-lcssa, label %.preheader96.us.new

.preheader96.us.new:                              ; preds = %.preheader96.us, %.preheader96.us.new
  %.098.us = phi i64 [ %47, %.preheader96.us.new ], [ 0, %.preheader96.us ]
  %niter = phi i64 [ %niter.next.3, %.preheader96.us.new ], [ 0, %.preheader96.us ]
  %28 = load ptr, ptr %26, align 8, !tbaa !13
  %29 = getelementptr inbounds ptr, ptr %28, i64 %.086100.us
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  %31 = getelementptr inbounds double, ptr %30, i64 %.098.us
  store double 0.000000e+00, ptr %31, align 8, !tbaa !15
  %32 = or disjoint i64 %.098.us, 1
  %33 = load ptr, ptr %26, align 8, !tbaa !13
  %34 = getelementptr inbounds ptr, ptr %33, i64 %.086100.us
  %35 = load ptr, ptr %34, align 8, !tbaa !14
  %36 = getelementptr inbounds double, ptr %35, i64 %32
  store double 0.000000e+00, ptr %36, align 8, !tbaa !15
  %37 = or disjoint i64 %.098.us, 2
  %38 = load ptr, ptr %26, align 8, !tbaa !13
  %39 = getelementptr inbounds ptr, ptr %38, i64 %.086100.us
  %40 = load ptr, ptr %39, align 8, !tbaa !14
  %41 = getelementptr inbounds double, ptr %40, i64 %37
  store double 0.000000e+00, ptr %41, align 8, !tbaa !15
  %42 = or disjoint i64 %.098.us, 3
  %43 = load ptr, ptr %26, align 8, !tbaa !13
  %44 = getelementptr inbounds ptr, ptr %43, i64 %.086100.us
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  %46 = getelementptr inbounds double, ptr %45, i64 %42
  store double 0.000000e+00, ptr %46, align 8, !tbaa !15
  %47 = add nuw nsw i64 %.098.us, 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 %._crit_edge.us.unr-lcssa, label %.preheader96.us.new, !llvm.loop !17

._crit_edge.us.unr-lcssa:                         ; preds = %.preheader96.us.new, %.preheader96.us
  %.098.us.unr = phi i64 [ 0, %.preheader96.us ], [ %47, %.preheader96.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.unr-lcssa, %.epil.preheader
  %.098.us.epil = phi i64 [ %52, %.epil.preheader ], [ %.098.us.unr, %._crit_edge.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.us.unr-lcssa ]
  %48 = load ptr, ptr %26, align 8, !tbaa !13
  %49 = getelementptr inbounds ptr, ptr %48, i64 %.086100.us
  %50 = load ptr, ptr %49, align 8, !tbaa !14
  %51 = getelementptr inbounds double, ptr %50, i64 %.098.us.epil
  store double 0.000000e+00, ptr %51, align 8, !tbaa !15
  %52 = add nuw nsw i64 %.098.us.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 %._crit_edge.us, label %.epil.preheader, !llvm.loop !19

._crit_edge.us:                                   ; preds = %.epil.preheader, %._crit_edge.us.unr-lcssa
  %53 = add nuw nsw i64 %.086100.us, 1
  %exitcond118.not = icmp eq i64 %53, %2
  br i1 %exitcond118.not, label %._crit_edge101, label %.preheader96.us, !llvm.loop !21

._crit_edge101:                                   ; preds = %._crit_edge.us, %.preheader96.lr.ph, %7
  %54 = load i64, ptr %0, align 8, !tbaa !22
  %.not = icmp eq i64 %54, 1
  br i1 %.not, label %55, label %._crit_edge115

55:                                               ; preds = %._crit_edge101
  %56 = getelementptr inbounds i8, ptr %0, i64 8
  %57 = load i64, ptr %56, align 8, !tbaa !26
  %.not90 = icmp eq i64 %57, 2
  br i1 %.not90, label %58, label %._crit_edge115

58:                                               ; preds = %55
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %2, ptr noundef %6)
  br i1 %18, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %58
  %59 = getelementptr inbounds i8, ptr %1, i64 56
  %60 = getelementptr inbounds i8, ptr %9, i64 56
  %xtraiter124 = and i64 %2, 3
  %61 = icmp ult i64 %2, 4
  br i1 %61, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter127 = and i64 %2, 9223372036854775804
  br label %62

62:                                               ; preds = %62, %.lr.ph.new
  %.187103 = phi i64 [ 0, %.lr.ph.new ], [ %86, %62 ]
  %niter128 = phi i64 [ 0, %.lr.ph.new ], [ %niter128.next.3, %62 ]
  %63 = load ptr, ptr %59, align 8, !tbaa !13
  %64 = getelementptr inbounds double, ptr %63, i64 %.187103
  %65 = load double, ptr %64, align 8, !tbaa !15
  %66 = load ptr, ptr %60, align 8, !tbaa !13
  %67 = getelementptr inbounds double, ptr %66, i64 %.187103
  store double %65, ptr %67, align 8, !tbaa !15
  %68 = or disjoint i64 %.187103, 1
  %69 = load ptr, ptr %59, align 8, !tbaa !13
  %70 = getelementptr inbounds double, ptr %69, i64 %68
  %71 = load double, ptr %70, align 8, !tbaa !15
  %72 = load ptr, ptr %60, align 8, !tbaa !13
  %73 = getelementptr inbounds double, ptr %72, i64 %68
  store double %71, ptr %73, align 8, !tbaa !15
  %74 = or disjoint i64 %.187103, 2
  %75 = load ptr, ptr %59, align 8, !tbaa !13
  %76 = getelementptr inbounds double, ptr %75, i64 %74
  %77 = load double, ptr %76, align 8, !tbaa !15
  %78 = load ptr, ptr %60, align 8, !tbaa !13
  %79 = getelementptr inbounds double, ptr %78, i64 %74
  store double %77, ptr %79, align 8, !tbaa !15
  %80 = or disjoint i64 %.187103, 3
  %81 = load ptr, ptr %59, align 8, !tbaa !13
  %82 = getelementptr inbounds double, ptr %81, i64 %80
  %83 = load double, ptr %82, align 8, !tbaa !15
  %84 = load ptr, ptr %60, align 8, !tbaa !13
  %85 = getelementptr inbounds double, ptr %84, i64 %80
  store double %83, ptr %85, align 8, !tbaa !15
  %86 = add nuw nsw i64 %.187103, 4
  %niter128.next.3 = add i64 %niter128, 4
  %niter128.ncmp.3 = icmp eq i64 %niter128.next.3, %unroll_iter127
  br i1 %niter128.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %62, !llvm.loop !27

._crit_edge.loopexit.unr-lcssa:                   ; preds = %62, %.lr.ph
  %.187103.unr = phi i64 [ 0, %.lr.ph ], [ %86, %62 ]
  %lcmp.mod126.not = icmp eq i64 %xtraiter124, 0
  br i1 %lcmp.mod126.not, label %._crit_edge, label %.epil.preheader123

.epil.preheader123:                               ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader123
  %.187103.epil = phi i64 [ %92, %.epil.preheader123 ], [ %.187103.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter125 = phi i64 [ %epil.iter125.next, %.epil.preheader123 ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %87 = load ptr, ptr %59, align 8, !tbaa !13
  %88 = getelementptr inbounds double, ptr %87, i64 %.187103.epil
  %89 = load double, ptr %88, align 8, !tbaa !15
  %90 = load ptr, ptr %60, align 8, !tbaa !13
  %91 = getelementptr inbounds double, ptr %90, i64 %.187103.epil
  store double %89, ptr %91, align 8, !tbaa !15
  %92 = add nuw nsw i64 %.187103.epil, 1
  %epil.iter125.next = add i64 %epil.iter125, 1
  %epil.iter125.cmp.not = icmp eq i64 %epil.iter125.next, %xtraiter124
  br i1 %epil.iter125.cmp.not, label %._crit_edge, label %.epil.preheader123, !llvm.loop !28

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader123, %58
  call void @_ZN11alglib_impl7tagsortEPNS_9ae_vectorElS1_S1_PNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %2, ptr noundef nonnull %14, ptr noundef nonnull %16, ptr noundef %6)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %4, ptr noundef %6)
  br i1 %19, label %.lr.ph107, label %._crit_edge108

.lr.ph107:                                        ; preds = %._crit_edge
  %93 = getelementptr inbounds i8, ptr %3, i64 56
  %94 = getelementptr inbounds i8, ptr %10, i64 56
  %xtraiter130 = and i64 %4, 3
  %95 = icmp ult i64 %4, 4
  br i1 %95, label %._crit_edge108.loopexit.unr-lcssa, label %.lr.ph107.new

.lr.ph107.new:                                    ; preds = %.lr.ph107
  %unroll_iter133 = and i64 %4, 9223372036854775804
  br label %96

96:                                               ; preds = %96, %.lr.ph107.new
  %.2105 = phi i64 [ 0, %.lr.ph107.new ], [ %120, %96 ]
  %niter134 = phi i64 [ 0, %.lr.ph107.new ], [ %niter134.next.3, %96 ]
  %97 = load ptr, ptr %93, align 8, !tbaa !13
  %98 = getelementptr inbounds double, ptr %97, i64 %.2105
  %99 = load double, ptr %98, align 8, !tbaa !15
  %100 = load ptr, ptr %94, align 8, !tbaa !13
  %101 = getelementptr inbounds double, ptr %100, i64 %.2105
  store double %99, ptr %101, align 8, !tbaa !15
  %102 = or disjoint i64 %.2105, 1
  %103 = load ptr, ptr %93, align 8, !tbaa !13
  %104 = getelementptr inbounds double, ptr %103, i64 %102
  %105 = load double, ptr %104, align 8, !tbaa !15
  %106 = load ptr, ptr %94, align 8, !tbaa !13
  %107 = getelementptr inbounds double, ptr %106, i64 %102
  store double %105, ptr %107, align 8, !tbaa !15
  %108 = or disjoint i64 %.2105, 2
  %109 = load ptr, ptr %93, align 8, !tbaa !13
  %110 = getelementptr inbounds double, ptr %109, i64 %108
  %111 = load double, ptr %110, align 8, !tbaa !15
  %112 = load ptr, ptr %94, align 8, !tbaa !13
  %113 = getelementptr inbounds double, ptr %112, i64 %108
  store double %111, ptr %113, align 8, !tbaa !15
  %114 = or disjoint i64 %.2105, 3
  %115 = load ptr, ptr %93, align 8, !tbaa !13
  %116 = getelementptr inbounds double, ptr %115, i64 %114
  %117 = load double, ptr %116, align 8, !tbaa !15
  %118 = load ptr, ptr %94, align 8, !tbaa !13
  %119 = getelementptr inbounds double, ptr %118, i64 %114
  store double %117, ptr %119, align 8, !tbaa !15
  %120 = add nuw nsw i64 %.2105, 4
  %niter134.next.3 = add i64 %niter134, 4
  %niter134.ncmp.3 = icmp eq i64 %niter134.next.3, %unroll_iter133
  br i1 %niter134.ncmp.3, label %._crit_edge108.loopexit.unr-lcssa, label %96, !llvm.loop !29

._crit_edge108.loopexit.unr-lcssa:                ; preds = %96, %.lr.ph107
  %.2105.unr = phi i64 [ 0, %.lr.ph107 ], [ %120, %96 ]
  %lcmp.mod132.not = icmp eq i64 %xtraiter130, 0
  br i1 %lcmp.mod132.not, label %._crit_edge108, label %.epil.preheader129

.epil.preheader129:                               ; preds = %._crit_edge108.loopexit.unr-lcssa, %.epil.preheader129
  %.2105.epil = phi i64 [ %126, %.epil.preheader129 ], [ %.2105.unr, %._crit_edge108.loopexit.unr-lcssa ]
  %epil.iter131 = phi i64 [ %epil.iter131.next, %.epil.preheader129 ], [ 0, %._crit_edge108.loopexit.unr-lcssa ]
  %121 = load ptr, ptr %93, align 8, !tbaa !13
  %122 = getelementptr inbounds double, ptr %121, i64 %.2105.epil
  %123 = load double, ptr %122, align 8, !tbaa !15
  %124 = load ptr, ptr %94, align 8, !tbaa !13
  %125 = getelementptr inbounds double, ptr %124, i64 %.2105.epil
  store double %123, ptr %125, align 8, !tbaa !15
  %126 = add nuw nsw i64 %.2105.epil, 1
  %epil.iter131.next = add i64 %epil.iter131, 1
  %epil.iter131.cmp.not = icmp eq i64 %epil.iter131.next, %xtraiter130
  br i1 %epil.iter131.cmp.not, label %._crit_edge108, label %.epil.preheader129, !llvm.loop !30

._crit_edge108:                                   ; preds = %._crit_edge108.loopexit.unr-lcssa, %.epil.preheader129, %._crit_edge
  call void @_ZN11alglib_impl7tagsortEPNS_9ae_vectorElS1_S1_PNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %4, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef %6)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef 1, ptr noundef %6)
  %127 = getelementptr inbounds i8, ptr %11, i64 56
  %128 = load ptr, ptr %127, align 8, !tbaa !13
  store double 0.000000e+00, ptr %128, align 8, !tbaa !15
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef 1, ptr noundef %6)
  %129 = getelementptr inbounds i8, ptr %12, i64 56
  %130 = load ptr, ptr %129, align 8, !tbaa !13
  store double 0.000000e+00, ptr %130, align 8, !tbaa !15
  %131 = mul nsw i64 %4, %2
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %17, i64 noundef %131, ptr noundef %6)
  call void @_ZN11alglib_impl15rbfv2gridcalcvxEPNS_10rbfv2modelEPNS_9ae_vectorElS3_lS3_lS3_lS3_bS3_PNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef nonnull %9, i64 noundef %2, ptr noundef nonnull %10, i64 noundef %4, ptr noundef nonnull %11, i64 noundef 1, ptr noundef nonnull %12, i64 noundef 1, ptr noundef nonnull %13, i1 noundef zeroext false, ptr noundef nonnull %17, ptr noundef %6)
  br i1 %18, label %.preheader.lr.ph, label %._crit_edge115

.preheader.lr.ph:                                 ; preds = %._crit_edge108
  %132 = getelementptr inbounds i8, ptr %17, i64 56
  %133 = getelementptr inbounds i8, ptr %5, i64 72
  br i1 %19, label %.preheader.us.preheader, label %._crit_edge115

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %xtraiter136 = and i64 %4, 1
  %134 = icmp eq i64 %4, 1
  %unroll_iter139 = and i64 %4, 9223372036854775806
  %lcmp.mod138.not = icmp eq i64 %xtraiter136, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge112.us
  %.3114.us = phi i64 [ %164, %._crit_edge112.us ], [ 0, %.preheader.us.preheader ]
  br i1 %134, label %._crit_edge112.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %.1110.us = phi i64 [ %154, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter140 = phi i64 [ %niter140.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %135 = load ptr, ptr %132, align 8, !tbaa !13
  %136 = mul nuw nsw i64 %.1110.us, %2
  %137 = getelementptr double, ptr %135, i64 %.3114.us
  %138 = getelementptr double, ptr %137, i64 %136
  %139 = load double, ptr %138, align 8, !tbaa !15
  %140 = load ptr, ptr %133, align 8, !tbaa !13
  %141 = getelementptr inbounds ptr, ptr %140, i64 %.3114.us
  %142 = load ptr, ptr %141, align 8, !tbaa !14
  %143 = getelementptr inbounds double, ptr %142, i64 %.1110.us
  store double %139, ptr %143, align 8, !tbaa !15
  %144 = or disjoint i64 %.1110.us, 1
  %145 = load ptr, ptr %132, align 8, !tbaa !13
  %146 = mul nuw nsw i64 %144, %2
  %147 = getelementptr double, ptr %145, i64 %.3114.us
  %148 = getelementptr double, ptr %147, i64 %146
  %149 = load double, ptr %148, align 8, !tbaa !15
  %150 = load ptr, ptr %133, align 8, !tbaa !13
  %151 = getelementptr inbounds ptr, ptr %150, i64 %.3114.us
  %152 = load ptr, ptr %151, align 8, !tbaa !14
  %153 = getelementptr inbounds double, ptr %152, i64 %144
  store double %149, ptr %153, align 8, !tbaa !15
  %154 = add nuw nsw i64 %.1110.us, 2
  %niter140.next.1 = add i64 %niter140, 2
  %niter140.ncmp.1 = icmp eq i64 %niter140.next.1, %unroll_iter139
  br i1 %niter140.ncmp.1, label %._crit_edge112.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !31

._crit_edge112.us.unr-lcssa:                      ; preds = %.preheader.us.new, %.preheader.us
  %.1110.us.unr = phi i64 [ 0, %.preheader.us ], [ %154, %.preheader.us.new ]
  br i1 %lcmp.mod138.not, label %._crit_edge112.us, label %._crit_edge112.us.epilog-lcssa

._crit_edge112.us.epilog-lcssa:                   ; preds = %._crit_edge112.us.unr-lcssa
  %155 = load ptr, ptr %132, align 8, !tbaa !13
  %156 = mul nuw nsw i64 %.1110.us.unr, %2
  %157 = getelementptr double, ptr %155, i64 %.3114.us
  %158 = getelementptr double, ptr %157, i64 %156
  %159 = load double, ptr %158, align 8, !tbaa !15
  %160 = load ptr, ptr %133, align 8, !tbaa !13
  %161 = getelementptr inbounds ptr, ptr %160, i64 %.3114.us
  %162 = load ptr, ptr %161, align 8, !tbaa !14
  %163 = getelementptr inbounds double, ptr %162, i64 %.1110.us.unr
  store double %159, ptr %163, align 8, !tbaa !15
  br label %._crit_edge112.us

._crit_edge112.us:                                ; preds = %._crit_edge112.us.unr-lcssa, %._crit_edge112.us.epilog-lcssa
  %164 = add nuw nsw i64 %.3114.us, 1
  %exitcond122.not = icmp eq i64 %164, %2
  br i1 %exitcond122.not, label %._crit_edge115, label %.preheader.us, !llvm.loop !32

._crit_edge115:                                   ; preds = %._crit_edge112.us, %._crit_edge108, %.preheader.lr.ph, %._crit_edge101, %55
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %6)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl15rbfv2gridcalcvxEPNS_10rbfv2modelEPNS_9ae_vectorElS3_lS3_lS3_lS3_bS3_PNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i1 noundef zeroext, 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 = !{!8, !8, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = distinct !{!21, !18}
!22 = !{!23, !7, i64 0}
!23 = !{!"_ZTSN11alglib_impl10rbfv2modelE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !6, i64 32, !6, i64 96, !6, i64 160, !6, i64 224, !6, i64 288, !6, i64 352, !6, i64 416, !6, i64 480, !24, i64 544, !16, i64 624, !7, i64 632, !16, i64 640, !7, i64 648, !25, i64 656}
!24 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !8, i64 72}
!25 = !{!"_ZTSN11alglib_impl15rbfv2calcbufferE", !6, i64 0, !6, i64 64, !6, i64 128, !16, i64 192, !6, i64 200, !6, i64 264}
!26 = !{!23, !7, i64 8}
!27 = distinct !{!27, !18}
!28 = distinct !{!28, !20}
!29 = distinct !{!29, !18}
!30 = distinct !{!30, !20}
!31 = distinct !{!31, !18}
!32 = distinct !{!32, !18}


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