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

; 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_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::sparsematrix" = type { %"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", i64, i64, i64, i64, i64, i64 }
%"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.325 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.326 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.327 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.328 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.329 = external hidden unnamed_addr constant [37 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 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) #1

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) #1

declare void @_ZN11alglib_impl7rallocmEllPNS_9ae_matrixEPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl7rcopyrrElPKNS_9ae_matrixElPS0_lPNS_8ae_stateE(i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef, ptr noundef) #1

declare void @_ZN11alglib_impl5rsetrEldPNS_9ae_matrixElPNS_8ae_stateE(i64 noundef, double noundef, ptr noundef, i64 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl30converttwosidedlctoonesidedoldEPKNS_12sparsematrixElPKNS_9ae_matrixEllPKNS_9ae_vectorES8_PS3_PS6_PlPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10) #2 {
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store i64 %1, ptr %13, align 8, !tbaa !9
  store ptr %2, ptr %14, align 8, !tbaa !5
  store i64 %3, ptr %15, align 8, !tbaa !9
  store i64 %4, ptr %16, align 8, !tbaa !9
  store ptr %5, ptr %17, align 8, !tbaa !5
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  store ptr %10, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  %29 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 0, ptr %29, align 8, !tbaa !9
  store i64 0, ptr %23, align 8, !tbaa !9
  br label %30

30:                                               ; preds = %143, %11
  %31 = load i64, ptr %23, align 8, !tbaa !9
  %32 = load i64, ptr %13, align 8, !tbaa !9
  %33 = load i64, ptr %15, align 8, !tbaa !9
  %34 = add nsw i64 %32, %33
  %35 = sub nsw i64 %34, 1
  %36 = icmp sle i64 %31, %35
  br i1 %36, label %37, label %146

37:                                               ; preds = %30
  %38 = load ptr, ptr %17, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %38, i32 0, i32 4
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = load i64, ptr %23, align 8, !tbaa !9
  %42 = getelementptr inbounds double, ptr %40, i64 %41
  %43 = load double, ptr %42, align 8, !tbaa !12
  %44 = load ptr, ptr %22, align 8, !tbaa !5
  %45 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %43, ptr noundef %44)
  br i1 %45, label %55, label %46

46:                                               ; preds = %37
  %47 = load ptr, ptr %17, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %47, i32 0, i32 4
  %49 = load ptr, ptr %48, align 8, !tbaa !11
  %50 = load i64, ptr %23, align 8, !tbaa !9
  %51 = getelementptr inbounds double, ptr %49, i64 %50
  %52 = load double, ptr %51, align 8, !tbaa !12
  %53 = load ptr, ptr %22, align 8, !tbaa !5
  %54 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef %52, ptr noundef %53)
  br label %55

55:                                               ; preds = %46, %37
  %56 = phi i1 [ true, %37 ], [ %54, %46 ]
  %57 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %56, ptr noundef @.str.325, ptr noundef %57)
  %58 = load ptr, ptr %18, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %58, i32 0, i32 4
  %60 = load ptr, ptr %59, align 8, !tbaa !11
  %61 = load i64, ptr %23, align 8, !tbaa !9
  %62 = getelementptr inbounds double, ptr %60, i64 %61
  %63 = load double, ptr %62, align 8, !tbaa !12
  %64 = load ptr, ptr %22, align 8, !tbaa !5
  %65 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %63, ptr noundef %64)
  br i1 %65, label %75, label %66

66:                                               ; preds = %55
  %67 = load ptr, ptr %18, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %67, i32 0, i32 4
  %69 = load ptr, ptr %68, align 8, !tbaa !11
  %70 = load i64, ptr %23, align 8, !tbaa !9
  %71 = getelementptr inbounds double, ptr %69, i64 %70
  %72 = load double, ptr %71, align 8, !tbaa !12
  %73 = load ptr, ptr %22, align 8, !tbaa !5
  %74 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef %72, ptr noundef %73)
  br label %75

75:                                               ; preds = %66, %55
  %76 = phi i1 [ true, %55 ], [ %74, %66 ]
  %77 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %76, ptr noundef @.str.326, ptr noundef %77)
  %78 = load ptr, ptr %17, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %78, i32 0, i32 4
  %80 = load ptr, ptr %79, align 8, !tbaa !11
  %81 = load i64, ptr %23, align 8, !tbaa !9
  %82 = getelementptr inbounds double, ptr %80, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !12
  %84 = load ptr, ptr %22, align 8, !tbaa !5
  %85 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %83, ptr noundef %84)
  br i1 %85, label %86, label %114

86:                                               ; preds = %75
  %87 = load ptr, ptr %18, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %87, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !11
  %90 = load i64, ptr %23, align 8, !tbaa !9
  %91 = getelementptr inbounds double, ptr %89, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !12
  %93 = load ptr, ptr %22, align 8, !tbaa !5
  %94 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %92, ptr noundef %93)
  br i1 %94, label %95, label %114

95:                                               ; preds = %86
  %96 = load ptr, ptr %17, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %96, i32 0, i32 4
  %98 = load ptr, ptr %97, align 8, !tbaa !11
  %99 = load i64, ptr %23, align 8, !tbaa !9
  %100 = getelementptr inbounds double, ptr %98, i64 %99
  %101 = load double, ptr %100, align 8, !tbaa !12
  %102 = load ptr, ptr %18, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %102, i32 0, i32 4
  %104 = load ptr, ptr %103, align 8, !tbaa !11
  %105 = load i64, ptr %23, align 8, !tbaa !9
  %106 = getelementptr inbounds double, ptr %104, i64 %105
  %107 = load double, ptr %106, align 8, !tbaa !12
  %108 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %101, double noundef %107)
  br i1 %108, label %109, label %114

109:                                              ; preds = %95
  %110 = load ptr, ptr %21, align 8, !tbaa !5
  %111 = load i64, ptr %110, align 8, !tbaa !9
  %112 = add nsw i64 %111, 1
  %113 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 %112, ptr %113, align 8, !tbaa !9
  br label %143

114:                                              ; preds = %95, %86, %75
  %115 = load ptr, ptr %17, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %115, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !11
  %118 = load i64, ptr %23, align 8, !tbaa !9
  %119 = getelementptr inbounds double, ptr %117, i64 %118
  %120 = load double, ptr %119, align 8, !tbaa !12
  %121 = load ptr, ptr %22, align 8, !tbaa !5
  %122 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %120, ptr noundef %121)
  br i1 %122, label %123, label %128

123:                                              ; preds = %114
  %124 = load ptr, ptr %21, align 8, !tbaa !5
  %125 = load i64, ptr %124, align 8, !tbaa !9
  %126 = add nsw i64 %125, 1
  %127 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 %126, ptr %127, align 8, !tbaa !9
  br label %128

128:                                              ; preds = %123, %114
  %129 = load ptr, ptr %18, align 8, !tbaa !5
  %130 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %129, i32 0, i32 4
  %131 = load ptr, ptr %130, align 8, !tbaa !11
  %132 = load i64, ptr %23, align 8, !tbaa !9
  %133 = getelementptr inbounds double, ptr %131, i64 %132
  %134 = load double, ptr %133, align 8, !tbaa !12
  %135 = load ptr, ptr %22, align 8, !tbaa !5
  %136 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %134, ptr noundef %135)
  br i1 %136, label %137, label %142

137:                                              ; preds = %128
  %138 = load ptr, ptr %21, align 8, !tbaa !5
  %139 = load i64, ptr %138, align 8, !tbaa !9
  %140 = add nsw i64 %139, 1
  %141 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 %140, ptr %141, align 8, !tbaa !9
  br label %142

142:                                              ; preds = %137, %128
  br label %143

143:                                              ; preds = %142, %109
  %144 = load i64, ptr %23, align 8, !tbaa !9
  %145 = add nsw i64 %144, 1
  store i64 %145, ptr %23, align 8, !tbaa !9
  br label %30, !llvm.loop !14

146:                                              ; preds = %30
  %147 = load ptr, ptr %21, align 8, !tbaa !5
  %148 = load i64, ptr %147, align 8, !tbaa !9
  %149 = icmp eq i64 %148, 0
  br i1 %149, label %150, label %151

150:                                              ; preds = %146
  store i32 1, ptr %28, align 4
  br label %437

151:                                              ; preds = %146
  store i64 0, ptr %27, align 8, !tbaa !9
  %152 = load ptr, ptr %21, align 8, !tbaa !5
  %153 = load i64, ptr %152, align 8, !tbaa !9
  %154 = load i64, ptr %16, align 8, !tbaa !9
  %155 = add nsw i64 %154, 1
  %156 = load ptr, ptr %19, align 8, !tbaa !5
  %157 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocmEllPNS_9ae_matrixEPNS_8ae_stateE(i64 noundef %153, i64 noundef %155, ptr noundef %156, ptr noundef %157)
  %158 = load ptr, ptr %21, align 8, !tbaa !5
  %159 = load i64, ptr %158, align 8, !tbaa !9
  %160 = load ptr, ptr %20, align 8, !tbaa !5
  %161 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl7iallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %159, ptr noundef %160, ptr noundef %161)
  store i64 0, ptr %23, align 8, !tbaa !9
  br label %162

162:                                              ; preds = %428, %151
  %163 = load i64, ptr %23, align 8, !tbaa !9
  %164 = load i64, ptr %13, align 8, !tbaa !9
  %165 = load i64, ptr %15, align 8, !tbaa !9
  %166 = add nsw i64 %164, %165
  %167 = sub nsw i64 %166, 1
  %168 = icmp sle i64 %163, %167
  br i1 %168, label %169, label %431

169:                                              ; preds = %162
  %170 = load ptr, ptr %17, align 8, !tbaa !5
  %171 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %170, i32 0, i32 4
  %172 = load ptr, ptr %171, align 8, !tbaa !11
  %173 = load i64, ptr %23, align 8, !tbaa !9
  %174 = getelementptr inbounds double, ptr %172, i64 %173
  %175 = load double, ptr %174, align 8, !tbaa !12
  %176 = load ptr, ptr %22, align 8, !tbaa !5
  %177 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %175, ptr noundef %176)
  br i1 %177, label %188, label %178

178:                                              ; preds = %169
  %179 = load ptr, ptr %18, align 8, !tbaa !5
  %180 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %179, i32 0, i32 4
  %181 = load ptr, ptr %180, align 8, !tbaa !11
  %182 = load i64, ptr %23, align 8, !tbaa !9
  %183 = getelementptr inbounds double, ptr %181, i64 %182
  %184 = load double, ptr %183, align 8, !tbaa !12
  %185 = load ptr, ptr %22, align 8, !tbaa !5
  %186 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %184, ptr noundef %185)
  br i1 %186, label %188, label %187

187:                                              ; preds = %178
  br label %428

188:                                              ; preds = %178, %169
  %189 = load i64, ptr %27, align 8, !tbaa !9
  %190 = load ptr, ptr %21, align 8, !tbaa !5
  %191 = load i64, ptr %190, align 8, !tbaa !9
  %192 = icmp slt i64 %189, %191
  %193 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %192, ptr noundef @.str.327, ptr noundef %193)
  %194 = load i64, ptr %23, align 8, !tbaa !9
  %195 = load i64, ptr %13, align 8, !tbaa !9
  %196 = icmp slt i64 %194, %195
  br i1 %196, label %197, label %249

197:                                              ; preds = %188
  %198 = load i64, ptr %16, align 8, !tbaa !9
  %199 = load ptr, ptr %19, align 8, !tbaa !5
  %200 = load i64, ptr %27, align 8, !tbaa !9
  %201 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl5rsetrEldPNS_9ae_matrixElPNS_8ae_stateE(i64 noundef %198, double noundef 0.000000e+00, ptr noundef %199, i64 noundef %200, ptr noundef %201)
  %202 = load ptr, ptr %12, align 8, !tbaa !5
  %203 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %202, i32 0, i32 2
  %204 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %203, i32 0, i32 4
  %205 = load ptr, ptr %204, align 8, !tbaa !11
  %206 = load i64, ptr %23, align 8, !tbaa !9
  %207 = getelementptr inbounds i64, ptr %205, i64 %206
  %208 = load i64, ptr %207, align 8, !tbaa !9
  store i64 %208, ptr %25, align 8, !tbaa !9
  %209 = load ptr, ptr %12, align 8, !tbaa !5
  %210 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %209, i32 0, i32 2
  %211 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %210, i32 0, i32 4
  %212 = load ptr, ptr %211, align 8, !tbaa !11
  %213 = load i64, ptr %23, align 8, !tbaa !9
  %214 = add nsw i64 %213, 1
  %215 = getelementptr inbounds i64, ptr %212, i64 %214
  %216 = load i64, ptr %215, align 8, !tbaa !9
  %217 = sub nsw i64 %216, 1
  store i64 %217, ptr %26, align 8, !tbaa !9
  %218 = load i64, ptr %25, align 8, !tbaa !9
  store i64 %218, ptr %24, align 8, !tbaa !9
  br label %219

219:                                              ; preds = %245, %197
  %220 = load i64, ptr %24, align 8, !tbaa !9
  %221 = load i64, ptr %26, align 8, !tbaa !9
  %222 = icmp sle i64 %220, %221
  br i1 %222, label %223, label %248

223:                                              ; preds = %219
  %224 = load ptr, ptr %12, align 8, !tbaa !5
  %225 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %224, i32 0, i32 0
  %226 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %225, i32 0, i32 4
  %227 = load ptr, ptr %226, align 8, !tbaa !11
  %228 = load i64, ptr %24, align 8, !tbaa !9
  %229 = getelementptr inbounds double, ptr %227, i64 %228
  %230 = load double, ptr %229, align 8, !tbaa !12
  %231 = load ptr, ptr %19, align 8, !tbaa !5
  %232 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %231, i32 0, i32 6
  %233 = load ptr, ptr %232, align 8, !tbaa !11
  %234 = load i64, ptr %27, align 8, !tbaa !9
  %235 = getelementptr inbounds ptr, ptr %233, i64 %234
  %236 = load ptr, ptr %235, align 8, !tbaa !5
  %237 = load ptr, ptr %12, align 8, !tbaa !5
  %238 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %237, i32 0, i32 1
  %239 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %238, i32 0, i32 4
  %240 = load ptr, ptr %239, align 8, !tbaa !11
  %241 = load i64, ptr %24, align 8, !tbaa !9
  %242 = getelementptr inbounds i64, ptr %240, i64 %241
  %243 = load i64, ptr %242, align 8, !tbaa !9
  %244 = getelementptr inbounds double, ptr %236, i64 %243
  store double %230, ptr %244, align 8, !tbaa !12
  br label %245

245:                                              ; preds = %223
  %246 = load i64, ptr %24, align 8, !tbaa !9
  %247 = add nsw i64 %246, 1
  store i64 %247, ptr %24, align 8, !tbaa !9
  br label %219, !llvm.loop !16

248:                                              ; preds = %219
  br label %258

249:                                              ; preds = %188
  %250 = load i64, ptr %16, align 8, !tbaa !9
  %251 = load ptr, ptr %14, align 8, !tbaa !5
  %252 = load i64, ptr %23, align 8, !tbaa !9
  %253 = load i64, ptr %13, align 8, !tbaa !9
  %254 = sub nsw i64 %252, %253
  %255 = load ptr, ptr %19, align 8, !tbaa !5
  %256 = load i64, ptr %27, align 8, !tbaa !9
  %257 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rcopyrrElPKNS_9ae_matrixElPS0_lPNS_8ae_stateE(i64 noundef %250, ptr noundef %251, i64 noundef %254, ptr noundef %255, i64 noundef %256, ptr noundef %257)
  br label %258

258:                                              ; preds = %249, %248
  %259 = load ptr, ptr %17, align 8, !tbaa !5
  %260 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %259, i32 0, i32 4
  %261 = load ptr, ptr %260, align 8, !tbaa !11
  %262 = load i64, ptr %23, align 8, !tbaa !9
  %263 = getelementptr inbounds double, ptr %261, i64 %262
  %264 = load double, ptr %263, align 8, !tbaa !12
  %265 = load ptr, ptr %22, align 8, !tbaa !5
  %266 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %264, ptr noundef %265)
  br i1 %266, label %267, label %364

267:                                              ; preds = %258
  %268 = load ptr, ptr %18, align 8, !tbaa !5
  %269 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %268, i32 0, i32 4
  %270 = load ptr, ptr %269, align 8, !tbaa !11
  %271 = load i64, ptr %23, align 8, !tbaa !9
  %272 = getelementptr inbounds double, ptr %270, i64 %271
  %273 = load double, ptr %272, align 8, !tbaa !12
  %274 = load ptr, ptr %22, align 8, !tbaa !5
  %275 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %273, ptr noundef %274)
  br i1 %275, label %276, label %364

276:                                              ; preds = %267
  %277 = load ptr, ptr %17, align 8, !tbaa !5
  %278 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %277, i32 0, i32 4
  %279 = load ptr, ptr %278, align 8, !tbaa !11
  %280 = load i64, ptr %23, align 8, !tbaa !9
  %281 = getelementptr inbounds double, ptr %279, i64 %280
  %282 = load double, ptr %281, align 8, !tbaa !12
  %283 = load ptr, ptr %18, align 8, !tbaa !5
  %284 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %283, i32 0, i32 4
  %285 = load ptr, ptr %284, align 8, !tbaa !11
  %286 = load i64, ptr %23, align 8, !tbaa !9
  %287 = getelementptr inbounds double, ptr %285, i64 %286
  %288 = load double, ptr %287, align 8, !tbaa !12
  %289 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %282, double noundef %288)
  br i1 %289, label %290, label %312

290:                                              ; preds = %276
  %291 = load ptr, ptr %20, align 8, !tbaa !5
  %292 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %291, i32 0, i32 4
  %293 = load ptr, ptr %292, align 8, !tbaa !11
  %294 = load i64, ptr %27, align 8, !tbaa !9
  %295 = getelementptr inbounds i64, ptr %293, i64 %294
  store i64 0, ptr %295, align 8, !tbaa !9
  %296 = load ptr, ptr %17, align 8, !tbaa !5
  %297 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %296, i32 0, i32 4
  %298 = load ptr, ptr %297, align 8, !tbaa !11
  %299 = load i64, ptr %23, align 8, !tbaa !9
  %300 = getelementptr inbounds double, ptr %298, i64 %299
  %301 = load double, ptr %300, align 8, !tbaa !12
  %302 = load ptr, ptr %19, align 8, !tbaa !5
  %303 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %302, i32 0, i32 6
  %304 = load ptr, ptr %303, align 8, !tbaa !11
  %305 = load i64, ptr %27, align 8, !tbaa !9
  %306 = getelementptr inbounds ptr, ptr %304, i64 %305
  %307 = load ptr, ptr %306, align 8, !tbaa !5
  %308 = load i64, ptr %16, align 8, !tbaa !9
  %309 = getelementptr inbounds double, ptr %307, i64 %308
  store double %301, ptr %309, align 8, !tbaa !12
  %310 = load i64, ptr %27, align 8, !tbaa !9
  %311 = add nsw i64 %310, 1
  store i64 %311, ptr %27, align 8, !tbaa !9
  br label %428

312:                                              ; preds = %276
  %313 = load i64, ptr %16, align 8, !tbaa !9
  %314 = load ptr, ptr %19, align 8, !tbaa !5
  %315 = load i64, ptr %27, align 8, !tbaa !9
  %316 = load ptr, ptr %19, align 8, !tbaa !5
  %317 = load i64, ptr %27, align 8, !tbaa !9
  %318 = add nsw i64 %317, 1
  %319 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rcopyrrElPKNS_9ae_matrixElPS0_lPNS_8ae_stateE(i64 noundef %313, ptr noundef %314, i64 noundef %315, ptr noundef %316, i64 noundef %318, ptr noundef %319)
  %320 = load ptr, ptr %20, align 8, !tbaa !5
  %321 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %320, i32 0, i32 4
  %322 = load ptr, ptr %321, align 8, !tbaa !11
  %323 = load i64, ptr %27, align 8, !tbaa !9
  %324 = add nsw i64 %323, 0
  %325 = getelementptr inbounds i64, ptr %322, i64 %324
  store i64 1, ptr %325, align 8, !tbaa !9
  %326 = load ptr, ptr %20, align 8, !tbaa !5
  %327 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %326, i32 0, i32 4
  %328 = load ptr, ptr %327, align 8, !tbaa !11
  %329 = load i64, ptr %27, align 8, !tbaa !9
  %330 = add nsw i64 %329, 1
  %331 = getelementptr inbounds i64, ptr %328, i64 %330
  store i64 -1, ptr %331, align 8, !tbaa !9
  %332 = load ptr, ptr %17, align 8, !tbaa !5
  %333 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %332, i32 0, i32 4
  %334 = load ptr, ptr %333, align 8, !tbaa !11
  %335 = load i64, ptr %23, align 8, !tbaa !9
  %336 = getelementptr inbounds double, ptr %334, i64 %335
  %337 = load double, ptr %336, align 8, !tbaa !12
  %338 = load ptr, ptr %19, align 8, !tbaa !5
  %339 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %338, i32 0, i32 6
  %340 = load ptr, ptr %339, align 8, !tbaa !11
  %341 = load i64, ptr %27, align 8, !tbaa !9
  %342 = add nsw i64 %341, 0
  %343 = getelementptr inbounds ptr, ptr %340, i64 %342
  %344 = load ptr, ptr %343, align 8, !tbaa !5
  %345 = load i64, ptr %16, align 8, !tbaa !9
  %346 = getelementptr inbounds double, ptr %344, i64 %345
  store double %337, ptr %346, align 8, !tbaa !12
  %347 = load ptr, ptr %18, align 8, !tbaa !5
  %348 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %347, i32 0, i32 4
  %349 = load ptr, ptr %348, align 8, !tbaa !11
  %350 = load i64, ptr %23, align 8, !tbaa !9
  %351 = getelementptr inbounds double, ptr %349, i64 %350
  %352 = load double, ptr %351, align 8, !tbaa !12
  %353 = load ptr, ptr %19, align 8, !tbaa !5
  %354 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %353, i32 0, i32 6
  %355 = load ptr, ptr %354, align 8, !tbaa !11
  %356 = load i64, ptr %27, align 8, !tbaa !9
  %357 = add nsw i64 %356, 1
  %358 = getelementptr inbounds ptr, ptr %355, i64 %357
  %359 = load ptr, ptr %358, align 8, !tbaa !5
  %360 = load i64, ptr %16, align 8, !tbaa !9
  %361 = getelementptr inbounds double, ptr %359, i64 %360
  store double %352, ptr %361, align 8, !tbaa !12
  %362 = load i64, ptr %27, align 8, !tbaa !9
  %363 = add nsw i64 %362, 2
  store i64 %363, ptr %27, align 8, !tbaa !9
  br label %428

364:                                              ; preds = %267, %258
  %365 = load ptr, ptr %17, align 8, !tbaa !5
  %366 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %365, i32 0, i32 4
  %367 = load ptr, ptr %366, align 8, !tbaa !11
  %368 = load i64, ptr %23, align 8, !tbaa !9
  %369 = getelementptr inbounds double, ptr %367, i64 %368
  %370 = load double, ptr %369, align 8, !tbaa !12
  %371 = load ptr, ptr %22, align 8, !tbaa !5
  %372 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %370, ptr noundef %371)
  br i1 %372, label %373, label %395

373:                                              ; preds = %364
  %374 = load ptr, ptr %20, align 8, !tbaa !5
  %375 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %374, i32 0, i32 4
  %376 = load ptr, ptr %375, align 8, !tbaa !11
  %377 = load i64, ptr %27, align 8, !tbaa !9
  %378 = getelementptr inbounds i64, ptr %376, i64 %377
  store i64 1, ptr %378, align 8, !tbaa !9
  %379 = load ptr, ptr %17, align 8, !tbaa !5
  %380 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %379, i32 0, i32 4
  %381 = load ptr, ptr %380, align 8, !tbaa !11
  %382 = load i64, ptr %23, align 8, !tbaa !9
  %383 = getelementptr inbounds double, ptr %381, i64 %382
  %384 = load double, ptr %383, align 8, !tbaa !12
  %385 = load ptr, ptr %19, align 8, !tbaa !5
  %386 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %385, i32 0, i32 6
  %387 = load ptr, ptr %386, align 8, !tbaa !11
  %388 = load i64, ptr %27, align 8, !tbaa !9
  %389 = getelementptr inbounds ptr, ptr %387, i64 %388
  %390 = load ptr, ptr %389, align 8, !tbaa !5
  %391 = load i64, ptr %16, align 8, !tbaa !9
  %392 = getelementptr inbounds double, ptr %390, i64 %391
  store double %384, ptr %392, align 8, !tbaa !12
  %393 = load i64, ptr %27, align 8, !tbaa !9
  %394 = add nsw i64 %393, 1
  store i64 %394, ptr %27, align 8, !tbaa !9
  br label %428

395:                                              ; preds = %364
  %396 = load ptr, ptr %18, align 8, !tbaa !5
  %397 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %396, i32 0, i32 4
  %398 = load ptr, ptr %397, align 8, !tbaa !11
  %399 = load i64, ptr %23, align 8, !tbaa !9
  %400 = getelementptr inbounds double, ptr %398, i64 %399
  %401 = load double, ptr %400, align 8, !tbaa !12
  %402 = load ptr, ptr %22, align 8, !tbaa !5
  %403 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %401, ptr noundef %402)
  br i1 %403, label %404, label %426

404:                                              ; preds = %395
  %405 = load ptr, ptr %20, align 8, !tbaa !5
  %406 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %405, i32 0, i32 4
  %407 = load ptr, ptr %406, align 8, !tbaa !11
  %408 = load i64, ptr %27, align 8, !tbaa !9
  %409 = getelementptr inbounds i64, ptr %407, i64 %408
  store i64 -1, ptr %409, align 8, !tbaa !9
  %410 = load ptr, ptr %18, align 8, !tbaa !5
  %411 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %410, i32 0, i32 4
  %412 = load ptr, ptr %411, align 8, !tbaa !11
  %413 = load i64, ptr %23, align 8, !tbaa !9
  %414 = getelementptr inbounds double, ptr %412, i64 %413
  %415 = load double, ptr %414, align 8, !tbaa !12
  %416 = load ptr, ptr %19, align 8, !tbaa !5
  %417 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %416, i32 0, i32 6
  %418 = load ptr, ptr %417, align 8, !tbaa !11
  %419 = load i64, ptr %27, align 8, !tbaa !9
  %420 = getelementptr inbounds ptr, ptr %418, i64 %419
  %421 = load ptr, ptr %420, align 8, !tbaa !5
  %422 = load i64, ptr %16, align 8, !tbaa !9
  %423 = getelementptr inbounds double, ptr %421, i64 %422
  store double %415, ptr %423, align 8, !tbaa !12
  %424 = load i64, ptr %27, align 8, !tbaa !9
  %425 = add nsw i64 %424, 1
  store i64 %425, ptr %27, align 8, !tbaa !9
  br label %428

426:                                              ; preds = %395
  %427 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef @.str.328, ptr noundef %427)
  br label %428

428:                                              ; preds = %426, %404, %373, %312, %290, %187
  %429 = load i64, ptr %23, align 8, !tbaa !9
  %430 = add nsw i64 %429, 1
  store i64 %430, ptr %23, align 8, !tbaa !9
  br label %162, !llvm.loop !17

431:                                              ; preds = %162
  %432 = load i64, ptr %27, align 8, !tbaa !9
  %433 = load ptr, ptr %21, align 8, !tbaa !5
  %434 = load i64, ptr %433, align 8, !tbaa !9
  %435 = icmp eq i64 %432, %434
  %436 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %435, ptr noundef @.str.329, ptr noundef %436)
  store i32 0, ptr %28, align 4
  br label %437

437:                                              ; preds = %431, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  %438 = load i32, ptr %28, align 4
  switch i32 %438, label %440 [
    i32 0, label %439
    i32 1, label %439
  ]

439:                                              ; preds = %437, %437
  ret void

440:                                              ; preds = %437
  unreachable
}

declare void @_ZN11alglib_impl7iallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { 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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}


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

@.str.325 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.326 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.327 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.328 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.329 = external hidden unnamed_addr constant [37 x i8], align 1

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

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) local_unnamed_addr #0

declare void @_ZN11alglib_impl7rallocmEllPNS_9ae_matrixEPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @_ZN11alglib_impl7rcopyrrElPKNS_9ae_matrixElPS0_lPNS_8ae_stateE(i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

declare void @_ZN11alglib_impl5rsetrEldPNS_9ae_matrixElPNS_8ae_stateE(i64 noundef, double noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl30converttwosidedlctoonesidedoldEPKNS_12sparsematrixElPKNS_9ae_matrixEllPKNS_9ae_vectorES8_PS3_PS6_PlPNS_8ae_stateE(ptr nocapture noundef readonly %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, i64 noundef %4, ptr nocapture noundef readonly %5, ptr nocapture noundef readonly %6, ptr noundef %7, ptr noundef %8, ptr nocapture noundef %9, ptr noundef %10) local_unnamed_addr #1 {
  store i64 0, ptr %9, align 8, !tbaa !5
  %12 = add nsw i64 %3, %1
  %.not.not161 = icmp sgt i64 %12, 0
  br i1 %.not.not161, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %11
  %13 = getelementptr inbounds i8, ptr %5, i64 56
  %14 = getelementptr inbounds i8, ptr %6, i64 56
  br label %15

15:                                               ; preds = %.lr.ph, %70
  %.0153162 = phi i64 [ 0, %.lr.ph ], [ %71, %70 ]
  %16 = load ptr, ptr %13, align 8, !tbaa !9
  %17 = getelementptr inbounds double, ptr %16, i64 %.0153162
  %18 = load double, ptr %17, align 8, !tbaa !10
  %19 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %18, ptr noundef %10)
  br i1 %19, label %25, label %20

20:                                               ; preds = %15
  %21 = load ptr, ptr %13, align 8, !tbaa !9
  %22 = getelementptr inbounds double, ptr %21, i64 %.0153162
  %23 = load double, ptr %22, align 8, !tbaa !10
  %24 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef %23, ptr noundef %10)
  br label %25

25:                                               ; preds = %20, %15
  %26 = phi i1 [ true, %15 ], [ %24, %20 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %26, ptr noundef nonnull @.str.325, ptr noundef %10)
  %27 = load ptr, ptr %14, align 8, !tbaa !9
  %28 = getelementptr inbounds double, ptr %27, i64 %.0153162
  %29 = load double, ptr %28, align 8, !tbaa !10
  %30 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %29, ptr noundef %10)
  br i1 %30, label %36, label %31

31:                                               ; preds = %25
  %32 = load ptr, ptr %14, align 8, !tbaa !9
  %33 = getelementptr inbounds double, ptr %32, i64 %.0153162
  %34 = load double, ptr %33, align 8, !tbaa !10
  %35 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef %34, ptr noundef %10)
  br label %36

36:                                               ; preds = %31, %25
  %37 = phi i1 [ true, %25 ], [ %35, %31 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %37, ptr noundef nonnull @.str.326, ptr noundef %10)
  %38 = load ptr, ptr %13, align 8, !tbaa !9
  %39 = getelementptr inbounds double, ptr %38, i64 %.0153162
  %40 = load double, ptr %39, align 8, !tbaa !10
  %41 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %40, ptr noundef %10)
  br i1 %41, label %42, label %55

42:                                               ; preds = %36
  %43 = load ptr, ptr %14, align 8, !tbaa !9
  %44 = getelementptr inbounds double, ptr %43, i64 %.0153162
  %45 = load double, ptr %44, align 8, !tbaa !10
  %46 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %45, ptr noundef %10)
  br i1 %46, label %47, label %55

47:                                               ; preds = %42
  %48 = load ptr, ptr %13, align 8, !tbaa !9
  %49 = getelementptr inbounds double, ptr %48, i64 %.0153162
  %50 = load double, ptr %49, align 8, !tbaa !10
  %51 = load ptr, ptr %14, align 8, !tbaa !9
  %52 = getelementptr inbounds double, ptr %51, i64 %.0153162
  %53 = load double, ptr %52, align 8, !tbaa !10
  %54 = tail call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %50, double noundef %53)
  br i1 %54, label %.sink.split, label %55

55:                                               ; preds = %47, %42, %36
  %56 = load ptr, ptr %13, align 8, !tbaa !9
  %57 = getelementptr inbounds double, ptr %56, i64 %.0153162
  %58 = load double, ptr %57, align 8, !tbaa !10
  %59 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %58, ptr noundef %10)
  br i1 %59, label %60, label %63

60:                                               ; preds = %55
  %61 = load i64, ptr %9, align 8, !tbaa !5
  %62 = add nsw i64 %61, 1
  store i64 %62, ptr %9, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %60, %55
  %64 = load ptr, ptr %14, align 8, !tbaa !9
  %65 = getelementptr inbounds double, ptr %64, i64 %.0153162
  %66 = load double, ptr %65, align 8, !tbaa !10
  %67 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %66, ptr noundef %10)
  br i1 %67, label %.sink.split, label %70

.sink.split:                                      ; preds = %63, %47
  %68 = load i64, ptr %9, align 8, !tbaa !5
  %69 = add nsw i64 %68, 1
  store i64 %69, ptr %9, align 8, !tbaa !5
  br label %70

70:                                               ; preds = %.sink.split, %63
  %71 = add nuw nsw i64 %.0153162, 1
  %exitcond.not = icmp eq i64 %71, %12
  br i1 %exitcond.not, label %._crit_edge, label %15, !llvm.loop !12

._crit_edge:                                      ; preds = %70
  %.pre = load i64, ptr %9, align 8, !tbaa !5
  %72 = icmp eq i64 %.pre, 0
  br i1 %72, label %._crit_edge.thread, label %73

73:                                               ; preds = %._crit_edge
  %74 = add nsw i64 %4, 1
  tail call void @_ZN11alglib_impl7rallocmEllPNS_9ae_matrixEPNS_8ae_stateE(i64 noundef %.pre, i64 noundef %74, ptr noundef %7, ptr noundef %10)
  %75 = load i64, ptr %9, align 8, !tbaa !5
  tail call void @_ZN11alglib_impl7iallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %75, ptr noundef %8, ptr noundef %10)
  br i1 %.not.not161, label %.lr.ph172, label %._crit_edge173

.lr.ph172:                                        ; preds = %73
  %76 = getelementptr inbounds i8, ptr %5, i64 56
  %77 = getelementptr inbounds i8, ptr %6, i64 56
  %78 = getelementptr inbounds i8, ptr %0, i64 184
  %79 = getelementptr inbounds i8, ptr %0, i64 56
  %80 = getelementptr inbounds i8, ptr %7, i64 72
  %81 = getelementptr inbounds i8, ptr %0, i64 120
  %82 = getelementptr inbounds i8, ptr %8, i64 56
  br label %83

83:                                               ; preds = %.lr.ph172, %222
  %.0170 = phi i64 [ 0, %.lr.ph172 ], [ %.1, %222 ]
  %.1154169 = phi i64 [ 0, %.lr.ph172 ], [ %223, %222 ]
  %84 = load ptr, ptr %76, align 8, !tbaa !9
  %85 = getelementptr inbounds double, ptr %84, i64 %.1154169
  %86 = load double, ptr %85, align 8, !tbaa !10
  %87 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %86, ptr noundef %10)
  br i1 %87, label %93, label %88

88:                                               ; preds = %83
  %89 = load ptr, ptr %77, align 8, !tbaa !9
  %90 = getelementptr inbounds double, ptr %89, i64 %.1154169
  %91 = load double, ptr %90, align 8, !tbaa !10
  %92 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %91, ptr noundef %10)
  br i1 %92, label %93, label %222

93:                                               ; preds = %88, %83
  %94 = load i64, ptr %9, align 8, !tbaa !5
  %95 = icmp slt i64 %.0170, %94
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %95, ptr noundef nonnull @.str.327, ptr noundef %10)
  %96 = icmp slt i64 %.1154169, %1
  br i1 %96, label %97, label %138

97:                                               ; preds = %93
  tail call void @_ZN11alglib_impl5rsetrEldPNS_9ae_matrixElPNS_8ae_stateE(i64 noundef %4, double noundef 0.000000e+00, ptr noundef %7, i64 noundef %.0170, ptr noundef %10)
  %98 = load ptr, ptr %78, align 8, !tbaa !9
  %99 = getelementptr inbounds i64, ptr %98, i64 %.1154169
  %100 = load i64, ptr %99, align 8, !tbaa !5
  %101 = getelementptr inbounds i8, ptr %99, i64 8
  %102 = load i64, ptr %101, align 8, !tbaa !5
  %.not.not160164 = icmp slt i64 %100, %102
  br i1 %.not.not160164, label %.lr.ph167.preheader, label %.loopexit

.lr.ph167.preheader:                              ; preds = %97
  %103 = sub i64 %102, %100
  %.neg = add i64 %100, 1
  %xtraiter = and i64 %103, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph167.prol.loopexit, label %.lr.ph167.prol

.lr.ph167.prol:                                   ; preds = %.lr.ph167.preheader
  %104 = load ptr, ptr %79, align 8, !tbaa !9
  %105 = getelementptr inbounds double, ptr %104, i64 %100
  %106 = load double, ptr %105, align 8, !tbaa !10
  %107 = load ptr, ptr %80, align 8, !tbaa !9
  %108 = getelementptr inbounds ptr, ptr %107, i64 %.0170
  %109 = load ptr, ptr %108, align 8, !tbaa !14
  %110 = load ptr, ptr %81, align 8, !tbaa !9
  %111 = getelementptr inbounds i64, ptr %110, i64 %100
  %112 = load i64, ptr %111, align 8, !tbaa !5
  %113 = getelementptr inbounds double, ptr %109, i64 %112
  store double %106, ptr %113, align 8, !tbaa !10
  %114 = add nsw i64 %100, 1
  br label %.lr.ph167.prol.loopexit

.lr.ph167.prol.loopexit:                          ; preds = %.lr.ph167.prol, %.lr.ph167.preheader
  %.0155165.unr = phi i64 [ %100, %.lr.ph167.preheader ], [ %114, %.lr.ph167.prol ]
  %115 = icmp eq i64 %102, %.neg
  br i1 %115, label %.loopexit, label %.lr.ph167

.lr.ph167:                                        ; preds = %.lr.ph167.prol.loopexit, %.lr.ph167
  %.0155165 = phi i64 [ %137, %.lr.ph167 ], [ %.0155165.unr, %.lr.ph167.prol.loopexit ]
  %116 = load ptr, ptr %79, align 8, !tbaa !9
  %117 = getelementptr inbounds double, ptr %116, i64 %.0155165
  %118 = load double, ptr %117, align 8, !tbaa !10
  %119 = load ptr, ptr %80, align 8, !tbaa !9
  %120 = getelementptr inbounds ptr, ptr %119, i64 %.0170
  %121 = load ptr, ptr %120, align 8, !tbaa !14
  %122 = load ptr, ptr %81, align 8, !tbaa !9
  %123 = getelementptr inbounds i64, ptr %122, i64 %.0155165
  %124 = load i64, ptr %123, align 8, !tbaa !5
  %125 = getelementptr inbounds double, ptr %121, i64 %124
  store double %118, ptr %125, align 8, !tbaa !10
  %126 = add nsw i64 %.0155165, 1
  %127 = load ptr, ptr %79, align 8, !tbaa !9
  %128 = getelementptr inbounds double, ptr %127, i64 %126
  %129 = load double, ptr %128, align 8, !tbaa !10
  %130 = load ptr, ptr %80, align 8, !tbaa !9
  %131 = getelementptr inbounds ptr, ptr %130, i64 %.0170
  %132 = load ptr, ptr %131, align 8, !tbaa !14
  %133 = load ptr, ptr %81, align 8, !tbaa !9
  %134 = getelementptr inbounds i64, ptr %133, i64 %126
  %135 = load i64, ptr %134, align 8, !tbaa !5
  %136 = getelementptr inbounds double, ptr %132, i64 %135
  store double %129, ptr %136, align 8, !tbaa !10
  %137 = add nsw i64 %.0155165, 2
  %exitcond175.not.1 = icmp eq i64 %137, %102
  br i1 %exitcond175.not.1, label %.loopexit, label %.lr.ph167, !llvm.loop !16

138:                                              ; preds = %93
  %139 = sub nsw i64 %.1154169, %1
  tail call void @_ZN11alglib_impl7rcopyrrElPKNS_9ae_matrixElPS0_lPNS_8ae_stateE(i64 noundef %4, ptr noundef %2, i64 noundef %139, ptr noundef %7, i64 noundef %.0170, ptr noundef %10)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph167.prol.loopexit, %.lr.ph167, %97, %138
  %140 = load ptr, ptr %76, align 8, !tbaa !9
  %141 = getelementptr inbounds double, ptr %140, i64 %.1154169
  %142 = load double, ptr %141, align 8, !tbaa !10
  %143 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %142, ptr noundef %10)
  br i1 %143, label %144, label %189

144:                                              ; preds = %.loopexit
  %145 = load ptr, ptr %77, align 8, !tbaa !9
  %146 = getelementptr inbounds double, ptr %145, i64 %.1154169
  %147 = load double, ptr %146, align 8, !tbaa !10
  %148 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %147, ptr noundef %10)
  br i1 %148, label %149, label %189

149:                                              ; preds = %144
  %150 = load ptr, ptr %76, align 8, !tbaa !9
  %151 = getelementptr inbounds double, ptr %150, i64 %.1154169
  %152 = load double, ptr %151, align 8, !tbaa !10
  %153 = load ptr, ptr %77, align 8, !tbaa !9
  %154 = getelementptr inbounds double, ptr %153, i64 %.1154169
  %155 = load double, ptr %154, align 8, !tbaa !10
  %156 = tail call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %152, double noundef %155)
  br i1 %156, label %157, label %168

157:                                              ; preds = %149
  %158 = load ptr, ptr %82, align 8, !tbaa !9
  %159 = getelementptr inbounds i64, ptr %158, i64 %.0170
  store i64 0, ptr %159, align 8, !tbaa !5
  %160 = load ptr, ptr %76, align 8, !tbaa !9
  %161 = getelementptr inbounds double, ptr %160, i64 %.1154169
  %162 = load double, ptr %161, align 8, !tbaa !10
  %163 = load ptr, ptr %80, align 8, !tbaa !9
  %164 = getelementptr inbounds ptr, ptr %163, i64 %.0170
  %165 = load ptr, ptr %164, align 8, !tbaa !14
  %166 = getelementptr inbounds double, ptr %165, i64 %4
  store double %162, ptr %166, align 8, !tbaa !10
  %167 = add nsw i64 %.0170, 1
  br label %222

168:                                              ; preds = %149
  %169 = add nsw i64 %.0170, 1
  tail call void @_ZN11alglib_impl7rcopyrrElPKNS_9ae_matrixElPS0_lPNS_8ae_stateE(i64 noundef %4, ptr noundef %7, i64 noundef %.0170, ptr noundef %7, i64 noundef %169, ptr noundef %10)
  %170 = load ptr, ptr %82, align 8, !tbaa !9
  %171 = getelementptr inbounds i64, ptr %170, i64 %.0170
  store i64 1, ptr %171, align 8, !tbaa !5
  %172 = load ptr, ptr %82, align 8, !tbaa !9
  %173 = getelementptr inbounds i64, ptr %172, i64 %169
  store i64 -1, ptr %173, align 8, !tbaa !5
  %174 = load ptr, ptr %76, align 8, !tbaa !9
  %175 = getelementptr inbounds double, ptr %174, i64 %.1154169
  %176 = load double, ptr %175, align 8, !tbaa !10
  %177 = load ptr, ptr %80, align 8, !tbaa !9
  %178 = getelementptr inbounds ptr, ptr %177, i64 %.0170
  %179 = load ptr, ptr %178, align 8, !tbaa !14
  %180 = getelementptr inbounds double, ptr %179, i64 %4
  store double %176, ptr %180, align 8, !tbaa !10
  %181 = load ptr, ptr %77, align 8, !tbaa !9
  %182 = getelementptr inbounds double, ptr %181, i64 %.1154169
  %183 = load double, ptr %182, align 8, !tbaa !10
  %184 = load ptr, ptr %80, align 8, !tbaa !9
  %185 = getelementptr inbounds ptr, ptr %184, i64 %169
  %186 = load ptr, ptr %185, align 8, !tbaa !14
  %187 = getelementptr inbounds double, ptr %186, i64 %4
  store double %183, ptr %187, align 8, !tbaa !10
  %188 = add nsw i64 %.0170, 2
  br label %222

189:                                              ; preds = %144, %.loopexit
  %190 = load ptr, ptr %76, align 8, !tbaa !9
  %191 = getelementptr inbounds double, ptr %190, i64 %.1154169
  %192 = load double, ptr %191, align 8, !tbaa !10
  %193 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %192, ptr noundef %10)
  br i1 %193, label %194, label %205

194:                                              ; preds = %189
  %195 = load ptr, ptr %82, align 8, !tbaa !9
  %196 = getelementptr inbounds i64, ptr %195, i64 %.0170
  store i64 1, ptr %196, align 8, !tbaa !5
  %197 = load ptr, ptr %76, align 8, !tbaa !9
  %198 = getelementptr inbounds double, ptr %197, i64 %.1154169
  %199 = load double, ptr %198, align 8, !tbaa !10
  %200 = load ptr, ptr %80, align 8, !tbaa !9
  %201 = getelementptr inbounds ptr, ptr %200, i64 %.0170
  %202 = load ptr, ptr %201, align 8, !tbaa !14
  %203 = getelementptr inbounds double, ptr %202, i64 %4
  store double %199, ptr %203, align 8, !tbaa !10
  %204 = add nsw i64 %.0170, 1
  br label %222

205:                                              ; preds = %189
  %206 = load ptr, ptr %77, align 8, !tbaa !9
  %207 = getelementptr inbounds double, ptr %206, i64 %.1154169
  %208 = load double, ptr %207, align 8, !tbaa !10
  %209 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %208, ptr noundef %10)
  br i1 %209, label %210, label %221

210:                                              ; preds = %205
  %211 = load ptr, ptr %82, align 8, !tbaa !9
  %212 = getelementptr inbounds i64, ptr %211, i64 %.0170
  store i64 -1, ptr %212, align 8, !tbaa !5
  %213 = load ptr, ptr %77, align 8, !tbaa !9
  %214 = getelementptr inbounds double, ptr %213, i64 %.1154169
  %215 = load double, ptr %214, align 8, !tbaa !10
  %216 = load ptr, ptr %80, align 8, !tbaa !9
  %217 = getelementptr inbounds ptr, ptr %216, i64 %.0170
  %218 = load ptr, ptr %217, align 8, !tbaa !14
  %219 = getelementptr inbounds double, ptr %218, i64 %4
  store double %215, ptr %219, align 8, !tbaa !10
  %220 = add nsw i64 %.0170, 1
  br label %222

221:                                              ; preds = %205
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext false, ptr noundef nonnull @.str.328, ptr noundef %10)
  br label %222

222:                                              ; preds = %88, %221, %210, %194, %168, %157
  %.1 = phi i64 [ %167, %157 ], [ %188, %168 ], [ %204, %194 ], [ %220, %210 ], [ %.0170, %221 ], [ %.0170, %88 ]
  %223 = add nuw nsw i64 %.1154169, 1
  %exitcond176.not = icmp eq i64 %223, %12
  br i1 %exitcond176.not, label %._crit_edge173, label %83, !llvm.loop !17

._crit_edge173:                                   ; preds = %222, %73
  %.0.lcssa = phi i64 [ 0, %73 ], [ %.1, %222 ]
  %224 = load i64, ptr %9, align 8, !tbaa !5
  %225 = icmp eq i64 %.0.lcssa, %224
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %225, ptr noundef nonnull @.str.329, ptr noundef %10)
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %11, %._crit_edge, %._crit_edge173
  ret void
}

declare void @_ZN11alglib_impl7iallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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" }

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


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