; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (linalg)

; 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::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 }

@.str.187 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.188 = external hidden unnamed_addr constant [59 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl15sparseenumerateEPNS_12sparsematrixEPlS2_S2_S2_PdPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

27:                                               ; preds = %2
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %28, i32 0, i32 5
  %30 = load i64, ptr %29, align 8, !tbaa !9
  %31 = icmp eq i64 %30, 1
  br i1 %31, label %37, label %32

32:                                               ; preds = %27
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %33, i32 0, i32 5
  %35 = load i64, ptr %34, align 8, !tbaa !9
  %36 = icmp eq i64 %35, 2
  br label %37

37:                                               ; preds = %32, %27, %2
  %38 = phi i1 [ true, %27 ], [ true, %2 ], [ %36, %32 ]
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %38, ptr noundef @.str.187, ptr noundef %39)
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %40, i32 0, i32 6
  %42 = load i64, ptr %41, align 8, !tbaa !15
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %43, i32 0, i32 7
  %45 = load i64, ptr %44, align 8, !tbaa !16
  %46 = icmp eq i64 %42, %45
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %46, ptr noundef @.str.188, ptr noundef %47)
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %48, i32 0, i32 7
  %50 = load i64, ptr %49, align 8, !tbaa !16
  store i64 %50, ptr %10, align 8, !tbaa !17
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %51, i32 0, i32 5
  %53 = load i64, ptr %52, align 8, !tbaa !9
  %54 = icmp eq i64 %53, 2
  br i1 %54, label %55, label %57

55:                                               ; preds = %37
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %56)
  store i32 1, ptr %17, align 4
  br label %294

57:                                               ; preds = %37
  %58 = load i64, ptr %10, align 8, !tbaa !17
  %59 = add nsw i64 %58, 1
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %7, i64 noundef %59, ptr noundef %60)
  %61 = load i64, ptr %10, align 8, !tbaa !17
  %62 = add nsw i64 %61, 1
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %8, i64 noundef %62, ptr noundef %63)
  store i64 0, ptr %13, align 8, !tbaa !17
  br label %64

64:                                               ; preds = %77, %57
  %65 = load i64, ptr %13, align 8, !tbaa !17
  %66 = load i64, ptr %10, align 8, !tbaa !17
  %67 = icmp sle i64 %65, %66
  br i1 %67, label %68, label %80

68:                                               ; preds = %64
  %69 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %7, i32 0, i32 4
  %70 = load ptr, ptr %69, align 8, !tbaa !18
  %71 = load i64, ptr %13, align 8, !tbaa !17
  %72 = getelementptr inbounds i64, ptr %70, i64 %71
  store i64 0, ptr %72, align 8, !tbaa !17
  %73 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %8, i32 0, i32 4
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = load i64, ptr %13, align 8, !tbaa !17
  %76 = getelementptr inbounds i64, ptr %74, i64 %75
  store i64 0, ptr %76, align 8, !tbaa !17
  br label %77

77:                                               ; preds = %68
  %78 = load i64, ptr %13, align 8, !tbaa !17
  %79 = add nsw i64 %78, 1
  store i64 %79, ptr %13, align 8, !tbaa !17
  br label %64, !llvm.loop !19

80:                                               ; preds = %64
  store i64 0, ptr %11, align 8, !tbaa !17
  store i64 0, ptr %12, align 8, !tbaa !17
  br label %81

81:                                               ; preds = %119, %80
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = call noundef zeroext i1 @_ZN11alglib_impl15sparseenumerateEPNS_12sparsematrixEPlS2_S2_S2_PdPNS_8ae_stateE(ptr noundef %82, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %16, ptr noundef %83)
  br i1 %84, label %85, label %120

85:                                               ; preds = %81
  %86 = load i64, ptr %14, align 8, !tbaa !17
  %87 = load i64, ptr %13, align 8, !tbaa !17
  %88 = icmp slt i64 %86, %87
  br i1 %88, label %89, label %104

89:                                               ; preds = %85
  %90 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %7, i32 0, i32 4
  %91 = load ptr, ptr %90, align 8, !tbaa !18
  %92 = load i64, ptr %13, align 8, !tbaa !17
  %93 = getelementptr inbounds i64, ptr %91, i64 %92
  %94 = load i64, ptr %93, align 8, !tbaa !17
  %95 = load i64, ptr %13, align 8, !tbaa !17
  %96 = load i64, ptr %14, align 8, !tbaa !17
  %97 = sub nsw i64 %95, %96
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %94, i64 noundef %97, ptr noundef %98)
  %100 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %7, i32 0, i32 4
  %101 = load ptr, ptr %100, align 8, !tbaa !18
  %102 = load i64, ptr %13, align 8, !tbaa !17
  %103 = getelementptr inbounds i64, ptr %101, i64 %102
  store i64 %99, ptr %103, align 8, !tbaa !17
  br label %119

104:                                              ; preds = %85
  %105 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %8, i32 0, i32 4
  %106 = load ptr, ptr %105, align 8, !tbaa !18
  %107 = load i64, ptr %14, align 8, !tbaa !17
  %108 = getelementptr inbounds i64, ptr %106, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !17
  %110 = load i64, ptr %14, align 8, !tbaa !17
  %111 = load i64, ptr %13, align 8, !tbaa !17
  %112 = sub nsw i64 %110, %111
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %109, i64 noundef %112, ptr noundef %113)
  %115 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %8, i32 0, i32 4
  %116 = load ptr, ptr %115, align 8, !tbaa !18
  %117 = load i64, ptr %14, align 8, !tbaa !17
  %118 = getelementptr inbounds i64, ptr %116, i64 %117
  store i64 %114, ptr %118, align 8, !tbaa !17
  br label %119

119:                                              ; preds = %104, %89
  br label %81, !llvm.loop !21

120:                                              ; preds = %81
  %121 = load i64, ptr %10, align 8, !tbaa !17
  %122 = add nsw i64 %121, 1
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %6, i64 noundef %122, ptr noundef %123)
  %124 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %6, i32 0, i32 4
  %125 = load ptr, ptr %124, align 8, !tbaa !18
  %126 = getelementptr inbounds i64, ptr %125, i64 0
  store i64 0, ptr %126, align 8, !tbaa !17
  store i64 1, ptr %13, align 8, !tbaa !17
  br label %127

127:                                              ; preds = %157, %120
  %128 = load i64, ptr %13, align 8, !tbaa !17
  %129 = load i64, ptr %10, align 8, !tbaa !17
  %130 = icmp sle i64 %128, %129
  br i1 %130, label %131, label %160

131:                                              ; preds = %127
  %132 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %6, i32 0, i32 4
  %133 = load ptr, ptr %132, align 8, !tbaa !18
  %134 = load i64, ptr %13, align 8, !tbaa !17
  %135 = sub nsw i64 %134, 1
  %136 = getelementptr inbounds i64, ptr %133, i64 %135
  %137 = load i64, ptr %136, align 8, !tbaa !17
  %138 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %7, i32 0, i32 4
  %139 = load ptr, ptr %138, align 8, !tbaa !18
  %140 = load i64, ptr %13, align 8, !tbaa !17
  %141 = sub nsw i64 %140, 1
  %142 = getelementptr inbounds i64, ptr %139, i64 %141
  %143 = load i64, ptr %142, align 8, !tbaa !17
  %144 = add nsw i64 %137, %143
  %145 = add nsw i64 %144, 1
  %146 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %8, i32 0, i32 4
  %147 = load ptr, ptr %146, align 8, !tbaa !18
  %148 = load i64, ptr %13, align 8, !tbaa !17
  %149 = sub nsw i64 %148, 1
  %150 = getelementptr inbounds i64, ptr %147, i64 %149
  %151 = load i64, ptr %150, align 8, !tbaa !17
  %152 = add nsw i64 %145, %151
  %153 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %6, i32 0, i32 4
  %154 = load ptr, ptr %153, align 8, !tbaa !18
  %155 = load i64, ptr %13, align 8, !tbaa !17
  %156 = getelementptr inbounds i64, ptr %154, i64 %155
  store i64 %152, ptr %156, align 8, !tbaa !17
  br label %157

157:                                              ; preds = %131
  %158 = load i64, ptr %13, align 8, !tbaa !17
  %159 = add nsw i64 %158, 1
  store i64 %159, ptr %13, align 8, !tbaa !17
  br label %127, !llvm.loop !22

160:                                              ; preds = %127
  %161 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %6, i32 0, i32 4
  %162 = load ptr, ptr %161, align 8, !tbaa !18
  %163 = load i64, ptr %10, align 8, !tbaa !17
  %164 = getelementptr inbounds i64, ptr %162, i64 %163
  %165 = load i64, ptr %164, align 8, !tbaa !17
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %9, i64 noundef %165, ptr noundef %166)
  %167 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %6, i32 0, i32 4
  %168 = load ptr, ptr %167, align 8, !tbaa !18
  %169 = load i64, ptr %10, align 8, !tbaa !17
  %170 = getelementptr inbounds i64, ptr %168, i64 %169
  %171 = load i64, ptr %170, align 8, !tbaa !17
  store i64 %171, ptr %15, align 8, !tbaa !17
  store i64 0, ptr %13, align 8, !tbaa !17
  br label %172

172:                                              ; preds = %182, %160
  %173 = load i64, ptr %13, align 8, !tbaa !17
  %174 = load i64, ptr %15, align 8, !tbaa !17
  %175 = sub nsw i64 %174, 1
  %176 = icmp sle i64 %173, %175
  br i1 %176, label %177, label %185

177:                                              ; preds = %172
  %178 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %9, i32 0, i32 4
  %179 = load ptr, ptr %178, align 8, !tbaa !18
  %180 = load i64, ptr %13, align 8, !tbaa !17
  %181 = getelementptr inbounds double, ptr %179, i64 %180
  store double 0.000000e+00, ptr %181, align 8, !tbaa !23
  br label %182

182:                                              ; preds = %177
  %183 = load i64, ptr %13, align 8, !tbaa !17
  %184 = add nsw i64 %183, 1
  store i64 %184, ptr %13, align 8, !tbaa !17
  br label %172, !llvm.loop !25

185:                                              ; preds = %172
  store i64 0, ptr %11, align 8, !tbaa !17
  store i64 0, ptr %12, align 8, !tbaa !17
  br label %186

186:                                              ; preds = %229, %185
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = load ptr, ptr %4, align 8, !tbaa !5
  %189 = call noundef zeroext i1 @_ZN11alglib_impl15sparseenumerateEPNS_12sparsematrixEPlS2_S2_S2_PdPNS_8ae_stateE(ptr noundef %187, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %16, ptr noundef %188)
  br i1 %189, label %190, label %230

190:                                              ; preds = %186
  %191 = load i64, ptr %14, align 8, !tbaa !17
  %192 = load i64, ptr %13, align 8, !tbaa !17
  %193 = icmp sle i64 %191, %192
  br i1 %193, label %194, label %214

194:                                              ; preds = %190
  %195 = load double, ptr %16, align 8, !tbaa !23
  %196 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %9, i32 0, i32 4
  %197 = load ptr, ptr %196, align 8, !tbaa !18
  %198 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %6, i32 0, i32 4
  %199 = load ptr, ptr %198, align 8, !tbaa !18
  %200 = load i64, ptr %13, align 8, !tbaa !17
  %201 = getelementptr inbounds i64, ptr %199, i64 %200
  %202 = load i64, ptr %201, align 8, !tbaa !17
  %203 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %7, i32 0, i32 4
  %204 = load ptr, ptr %203, align 8, !tbaa !18
  %205 = load i64, ptr %13, align 8, !tbaa !17
  %206 = getelementptr inbounds i64, ptr %204, i64 %205
  %207 = load i64, ptr %206, align 8, !tbaa !17
  %208 = add nsw i64 %202, %207
  %209 = load i64, ptr %13, align 8, !tbaa !17
  %210 = load i64, ptr %14, align 8, !tbaa !17
  %211 = sub nsw i64 %209, %210
  %212 = sub nsw i64 %208, %211
  %213 = getelementptr inbounds double, ptr %197, i64 %212
  store double %195, ptr %213, align 8, !tbaa !23
  br label %229

214:                                              ; preds = %190
  %215 = load double, ptr %16, align 8, !tbaa !23
  %216 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %9, i32 0, i32 4
  %217 = load ptr, ptr %216, align 8, !tbaa !18
  %218 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %6, i32 0, i32 4
  %219 = load ptr, ptr %218, align 8, !tbaa !18
  %220 = load i64, ptr %14, align 8, !tbaa !17
  %221 = add nsw i64 %220, 1
  %222 = getelementptr inbounds i64, ptr %219, i64 %221
  %223 = load i64, ptr %222, align 8, !tbaa !17
  %224 = load i64, ptr %14, align 8, !tbaa !17
  %225 = load i64, ptr %13, align 8, !tbaa !17
  %226 = sub nsw i64 %224, %225
  %227 = sub nsw i64 %223, %226
  %228 = getelementptr inbounds double, ptr %217, i64 %227
  store double %215, ptr %228, align 8, !tbaa !23
  br label %229

229:                                              ; preds = %214, %194
  br label %186, !llvm.loop !26

230:                                              ; preds = %186
  store i64 0, ptr %13, align 8, !tbaa !17
  br label %231

231:                                              ; preds = %269, %230
  %232 = load i64, ptr %13, align 8, !tbaa !17
  %233 = load i64, ptr %10, align 8, !tbaa !17
  %234 = sub nsw i64 %233, 1
  %235 = icmp sle i64 %232, %234
  br i1 %235, label %236, label %272

236:                                              ; preds = %231
  %237 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %7, i32 0, i32 4
  %238 = load ptr, ptr %237, align 8, !tbaa !18
  %239 = load i64, ptr %10, align 8, !tbaa !17
  %240 = getelementptr inbounds i64, ptr %238, i64 %239
  %241 = load i64, ptr %240, align 8, !tbaa !17
  %242 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %7, i32 0, i32 4
  %243 = load ptr, ptr %242, align 8, !tbaa !18
  %244 = load i64, ptr %13, align 8, !tbaa !17
  %245 = getelementptr inbounds i64, ptr %243, i64 %244
  %246 = load i64, ptr %245, align 8, !tbaa !17
  %247 = load ptr, ptr %4, align 8, !tbaa !5
  %248 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %241, i64 noundef %246, ptr noundef %247)
  %249 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %7, i32 0, i32 4
  %250 = load ptr, ptr %249, align 8, !tbaa !18
  %251 = load i64, ptr %10, align 8, !tbaa !17
  %252 = getelementptr inbounds i64, ptr %250, i64 %251
  store i64 %248, ptr %252, align 8, !tbaa !17
  %253 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %8, i32 0, i32 4
  %254 = load ptr, ptr %253, align 8, !tbaa !18
  %255 = load i64, ptr %10, align 8, !tbaa !17
  %256 = getelementptr inbounds i64, ptr %254, i64 %255
  %257 = load i64, ptr %256, align 8, !tbaa !17
  %258 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %8, i32 0, i32 4
  %259 = load ptr, ptr %258, align 8, !tbaa !18
  %260 = load i64, ptr %13, align 8, !tbaa !17
  %261 = getelementptr inbounds i64, ptr %259, i64 %260
  %262 = load i64, ptr %261, align 8, !tbaa !17
  %263 = load ptr, ptr %4, align 8, !tbaa !5
  %264 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %257, i64 noundef %262, ptr noundef %263)
  %265 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %8, i32 0, i32 4
  %266 = load ptr, ptr %265, align 8, !tbaa !18
  %267 = load i64, ptr %10, align 8, !tbaa !17
  %268 = getelementptr inbounds i64, ptr %266, i64 %267
  store i64 %264, ptr %268, align 8, !tbaa !17
  br label %269

269:                                              ; preds = %236
  %270 = load i64, ptr %13, align 8, !tbaa !17
  %271 = add nsw i64 %270, 1
  store i64 %271, ptr %13, align 8, !tbaa !17
  br label %231, !llvm.loop !27

272:                                              ; preds = %231
  %273 = load ptr, ptr %3, align 8, !tbaa !5
  %274 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %273, i32 0, i32 5
  store i64 2, ptr %274, align 8, !tbaa !9
  %275 = load ptr, ptr %3, align 8, !tbaa !5
  %276 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %275, i32 0, i32 9
  store i64 0, ptr %276, align 8, !tbaa !28
  %277 = load ptr, ptr %3, align 8, !tbaa !5
  %278 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %277, i32 0, i32 8
  store i64 0, ptr %278, align 8, !tbaa !29
  %279 = load i64, ptr %10, align 8, !tbaa !17
  %280 = load ptr, ptr %3, align 8, !tbaa !5
  %281 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %280, i32 0, i32 6
  store i64 %279, ptr %281, align 8, !tbaa !15
  %282 = load i64, ptr %10, align 8, !tbaa !17
  %283 = load ptr, ptr %3, align 8, !tbaa !5
  %284 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %283, i32 0, i32 7
  store i64 %282, ptr %284, align 8, !tbaa !16
  %285 = load ptr, ptr %3, align 8, !tbaa !5
  %286 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %285, i32 0, i32 3
  call void @_ZN11alglib_impl15ae_swap_vectorsEPNS_9ae_vectorES1_(ptr noundef %286, ptr noundef %7)
  %287 = load ptr, ptr %3, align 8, !tbaa !5
  %288 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %287, i32 0, i32 4
  call void @_ZN11alglib_impl15ae_swap_vectorsEPNS_9ae_vectorES1_(ptr noundef %288, ptr noundef %8)
  %289 = load ptr, ptr %3, align 8, !tbaa !5
  %290 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %289, i32 0, i32 2
  call void @_ZN11alglib_impl15ae_swap_vectorsEPNS_9ae_vectorES1_(ptr noundef %290, ptr noundef %6)
  %291 = load ptr, ptr %3, align 8, !tbaa !5
  %292 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %291, i32 0, i32 0
  call void @_ZN11alglib_impl15ae_swap_vectorsEPNS_9ae_vectorES1_(ptr noundef %292, ptr noundef %9)
  %293 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %293)
  store i32 0, ptr %17, align 4
  br label %294

294:                                              ; preds = %272, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #4
  %295 = load i32, ptr %17, align 4
  switch i32 %295, label %297 [
    i32 0, label %296
    i32 1, label %296
  ]

296:                                              ; preds = %294, %294
  ret void

297:                                              ; preds = %294
  unreachable
}

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

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

declare noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #2

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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, !12, i64 320}
!10 = !{!"_ZTSN11alglib_impl12sparsematrixE", !11, i64 0, !11, i64 64, !11, i64 128, !11, i64 192, !11, i64 256, !12, i64 320, !12, i64 328, !12, i64 336, !12, i64 344, !12, i64 352, !12, i64 360}
!11 = !{!"_ZTSN11alglib_impl9ae_vectorE", !12, i64 0, !12, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!12 = !{!"long", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!10, !12, i64 328}
!16 = !{!10, !12, i64 336}
!17 = !{!12, !12, i64 0}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}
!23 = !{!24, !24, i64 0}
!24 = !{!"double", !7, i64 0}
!25 = distinct !{!25, !20}
!26 = distinct !{!26, !20}
!27 = distinct !{!27, !20}
!28 = !{!10, !12, i64 352}
!29 = !{!10, !12, i64 344}


; 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.187 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.188 = external hidden unnamed_addr constant [59 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl15sparseenumerateEPNS_12sparsematrixEPlS2_S2_S2_PdPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl18sparseconverttosksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1) local_unnamed_addr #3 {
switch.edge:
  %2 = alloca %"struct.alglib_impl::ae_frame", align 8
  %3 = alloca %"struct.alglib_impl::ae_vector", align 8
  %4 = alloca %"struct.alglib_impl::ae_vector", align 8
  %5 = alloca %"struct.alglib_impl::ae_vector", align 8
  %6 = alloca %"struct.alglib_impl::ae_vector", align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %1, ptr noundef nonnull %2)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %3, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %4, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %5, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %6, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %3, i64 noundef 0, i64 noundef 2, ptr noundef %1, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %4, i64 noundef 0, i64 noundef 2, ptr noundef %1, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %5, i64 noundef 0, i64 noundef 2, ptr noundef %1, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %6, i64 noundef 0, i64 noundef 3, ptr noundef %1, i1 noundef zeroext true)
  %12 = getelementptr inbounds i8, ptr %0, i64 320
  %13 = load i64, ptr %12, align 8, !tbaa !5
  %switch = icmp ult i64 %13, 3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %switch, ptr noundef nonnull @.str.187, ptr noundef %1)
  %14 = getelementptr inbounds i8, ptr %0, i64 328
  %15 = load i64, ptr %14, align 8, !tbaa !14
  %16 = getelementptr inbounds i8, ptr %0, i64 336
  %17 = load i64, ptr %16, align 8, !tbaa !15
  %18 = icmp eq i64 %15, %17
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.188, ptr noundef %1)
  %19 = load i64, ptr %16, align 8, !tbaa !15
  %20 = load i64, ptr %12, align 8, !tbaa !5
  %21 = icmp eq i64 %20, 2
  br i1 %21, label %170, label %22

22:                                               ; preds = %switch.edge
  %23 = add nsw i64 %19, 1
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %4, i64 noundef %23, ptr noundef %1)
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %5, i64 noundef %23, ptr noundef %1)
  store i64 0, ptr %9, align 8, !tbaa !16
  %.not71 = icmp slt i64 %19, 0
  br i1 %.not71, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %22
  %24 = getelementptr inbounds i8, ptr %4, i64 56
  %25 = getelementptr inbounds i8, ptr %5, i64 56
  %26 = icmp eq i64 %19, 0
  br i1 %26, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %27 = add nuw i64 %19, 1
  %unroll_iter = and i64 %27, -2
  br label %28

28:                                               ; preds = %28, %.lr.ph.new
  %29 = phi i64 [ 0, %.lr.ph.new ], [ %39, %28 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %28 ]
  %30 = load ptr, ptr %24, align 8, !tbaa !17
  %31 = getelementptr inbounds i64, ptr %30, i64 %29
  store i64 0, ptr %31, align 8, !tbaa !16
  %32 = load ptr, ptr %25, align 8, !tbaa !17
  %33 = getelementptr inbounds i64, ptr %32, i64 %29
  store i64 0, ptr %33, align 8, !tbaa !16
  %34 = or disjoint i64 %29, 1
  store i64 %34, ptr %9, align 8, !tbaa !16
  %35 = load ptr, ptr %24, align 8, !tbaa !17
  %36 = getelementptr inbounds i64, ptr %35, i64 %34
  store i64 0, ptr %36, align 8, !tbaa !16
  %37 = load ptr, ptr %25, align 8, !tbaa !17
  %38 = getelementptr inbounds i64, ptr %37, i64 %34
  store i64 0, ptr %38, align 8, !tbaa !16
  %39 = add nuw nsw i64 %29, 2
  store i64 %39, ptr %9, align 8, !tbaa !16
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1.not = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1.not, label %._crit_edge.loopexit.unr-lcssa, label %28, !llvm.loop !18

._crit_edge.loopexit.unr-lcssa:                   ; preds = %28, %.lr.ph
  %.unr = phi i64 [ 0, %.lr.ph ], [ %39, %28 ]
  %40 = and i64 %19, 1
  %lcmp.mod.not.not = icmp eq i64 %40, 0
  br i1 %lcmp.mod.not.not, label %._crit_edge.loopexit.epilog-lcssa, label %._crit_edge

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %41 = load ptr, ptr %24, align 8, !tbaa !17
  %42 = getelementptr inbounds i64, ptr %41, i64 %.unr
  store i64 0, ptr %42, align 8, !tbaa !16
  %43 = load ptr, ptr %25, align 8, !tbaa !17
  %44 = getelementptr inbounds i64, ptr %43, i64 %.unr
  store i64 0, ptr %44, align 8, !tbaa !16
  %45 = add nuw nsw i64 %.unr, 1
  store i64 %45, ptr %9, align 8, !tbaa !16
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %22
  store i64 0, ptr %7, align 8, !tbaa !16
  store i64 0, ptr %8, align 8, !tbaa !16
  %46 = call noundef zeroext i1 @_ZN11alglib_impl15sparseenumerateEPNS_12sparsematrixEPlS2_S2_S2_PdPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef %1)
  br i1 %46, label %.lr.ph74, label %._crit_edge75

.lr.ph74:                                         ; preds = %._crit_edge
  %47 = getelementptr inbounds i8, ptr %5, i64 56
  %48 = getelementptr inbounds i8, ptr %4, i64 56
  br label %49

49:                                               ; preds = %.lr.ph74, %71
  %50 = load i64, ptr %10, align 8, !tbaa !16
  %51 = load i64, ptr %9, align 8, !tbaa !16
  %52 = icmp slt i64 %50, %51
  br i1 %52, label %53, label %62

53:                                               ; preds = %49
  %54 = load ptr, ptr %48, align 8, !tbaa !17
  %55 = getelementptr inbounds i64, ptr %54, i64 %51
  %56 = load i64, ptr %55, align 8, !tbaa !16
  %57 = sub nsw i64 %51, %50
  %58 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %56, i64 noundef %57, ptr noundef %1)
  %59 = load ptr, ptr %48, align 8, !tbaa !17
  %60 = load i64, ptr %9, align 8, !tbaa !16
  %61 = getelementptr inbounds i64, ptr %59, i64 %60
  store i64 %58, ptr %61, align 8, !tbaa !16
  br label %71

62:                                               ; preds = %49
  %63 = load ptr, ptr %47, align 8, !tbaa !17
  %64 = getelementptr inbounds i64, ptr %63, i64 %50
  %65 = load i64, ptr %64, align 8, !tbaa !16
  %66 = sub nsw i64 %50, %51
  %67 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %65, i64 noundef %66, ptr noundef %1)
  %68 = load ptr, ptr %47, align 8, !tbaa !17
  %69 = load i64, ptr %10, align 8, !tbaa !16
  %70 = getelementptr inbounds i64, ptr %68, i64 %69
  store i64 %67, ptr %70, align 8, !tbaa !16
  br label %71

71:                                               ; preds = %62, %53
  %72 = call noundef zeroext i1 @_ZN11alglib_impl15sparseenumerateEPNS_12sparsematrixEPlS2_S2_S2_PdPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef %1)
  br i1 %72, label %49, label %._crit_edge75, !llvm.loop !20

._crit_edge75:                                    ; preds = %71, %._crit_edge
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %23, ptr noundef %1)
  %73 = getelementptr inbounds i8, ptr %3, i64 56
  %74 = load ptr, ptr %73, align 8, !tbaa !17
  store i64 0, ptr %74, align 8, !tbaa !16
  store i64 1, ptr %9, align 8, !tbaa !16
  %.not6476 = icmp slt i64 %19, 1
  br i1 %.not6476, label %._crit_edge80, label %.lr.ph79

.lr.ph79:                                         ; preds = %._crit_edge75
  %75 = getelementptr inbounds i8, ptr %4, i64 56
  %76 = getelementptr inbounds i8, ptr %5, i64 56
  br label %77

77:                                               ; preds = %.lr.ph79, %77
  %storemerge6377 = phi i64 [ 1, %.lr.ph79 ], [ %93, %77 ]
  %78 = load ptr, ptr %73, align 8, !tbaa !17
  %79 = add nsw i64 %storemerge6377, -1
  %80 = getelementptr inbounds i64, ptr %78, i64 %79
  %81 = load i64, ptr %80, align 8, !tbaa !16
  %82 = load ptr, ptr %75, align 8, !tbaa !17
  %83 = getelementptr inbounds i64, ptr %82, i64 %79
  %84 = load i64, ptr %83, align 8, !tbaa !16
  %85 = load ptr, ptr %76, align 8, !tbaa !17
  %86 = getelementptr inbounds i64, ptr %85, i64 %79
  %87 = load i64, ptr %86, align 8, !tbaa !16
  %88 = add i64 %81, 1
  %89 = add i64 %88, %84
  %90 = add nsw i64 %89, %87
  %91 = getelementptr inbounds i64, ptr %78, i64 %storemerge6377
  store i64 %90, ptr %91, align 8, !tbaa !16
  %92 = load i64, ptr %9, align 8, !tbaa !16
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %9, align 8, !tbaa !16
  %.not64.not = icmp slt i64 %92, %19
  br i1 %.not64.not, label %77, label %._crit_edge80, !llvm.loop !21

._crit_edge80:                                    ; preds = %77, %._crit_edge75
  %94 = load ptr, ptr %73, align 8, !tbaa !17
  %95 = getelementptr inbounds i64, ptr %94, i64 %19
  %96 = load i64, ptr %95, align 8, !tbaa !16
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %96, ptr noundef %1)
  %97 = load ptr, ptr %73, align 8, !tbaa !17
  %98 = getelementptr inbounds i64, ptr %97, i64 %19
  %99 = load i64, ptr %98, align 8, !tbaa !16
  %.not66.not81 = icmp sgt i64 %99, 0
  br i1 %.not66.not81, label %.lr.ph84, label %._crit_edge85

.lr.ph84:                                         ; preds = %._crit_edge80
  %100 = getelementptr inbounds i8, ptr %6, i64 56
  %xtraiter93 = and i64 %99, 3
  %101 = icmp ult i64 %99, 4
  br i1 %101, label %._crit_edge85.loopexit.unr-lcssa, label %.lr.ph84.new

.lr.ph84.new:                                     ; preds = %.lr.ph84
  %unroll_iter95 = and i64 %99, 9223372036854775804
  br label %102

102:                                              ; preds = %102, %.lr.ph84.new
  %storemerge6582 = phi i64 [ 0, %.lr.ph84.new ], [ %114, %102 ]
  %niter96 = phi i64 [ 0, %.lr.ph84.new ], [ %niter96.next.3, %102 ]
  %103 = load ptr, ptr %100, align 8, !tbaa !17
  %104 = getelementptr inbounds double, ptr %103, i64 %storemerge6582
  store double 0.000000e+00, ptr %104, align 8, !tbaa !22
  %105 = or disjoint i64 %storemerge6582, 1
  %106 = load ptr, ptr %100, align 8, !tbaa !17
  %107 = getelementptr inbounds double, ptr %106, i64 %105
  store double 0.000000e+00, ptr %107, align 8, !tbaa !22
  %108 = or disjoint i64 %storemerge6582, 2
  %109 = load ptr, ptr %100, align 8, !tbaa !17
  %110 = getelementptr inbounds double, ptr %109, i64 %108
  store double 0.000000e+00, ptr %110, align 8, !tbaa !22
  %111 = or disjoint i64 %storemerge6582, 3
  %112 = load ptr, ptr %100, align 8, !tbaa !17
  %113 = getelementptr inbounds double, ptr %112, i64 %111
  store double 0.000000e+00, ptr %113, align 8, !tbaa !22
  %114 = add nuw nsw i64 %storemerge6582, 4
  %niter96.next.3 = add i64 %niter96, 4
  %niter96.ncmp.3 = icmp eq i64 %niter96.next.3, %unroll_iter95
  br i1 %niter96.ncmp.3, label %._crit_edge85.loopexit.unr-lcssa, label %102, !llvm.loop !24

._crit_edge85.loopexit.unr-lcssa:                 ; preds = %102, %.lr.ph84
  %storemerge6582.unr = phi i64 [ 0, %.lr.ph84 ], [ %114, %102 ]
  %lcmp.mod94.not = icmp eq i64 %xtraiter93, 0
  br i1 %lcmp.mod94.not, label %._crit_edge85, label %.epil.preheader92

.epil.preheader92:                                ; preds = %._crit_edge85.loopexit.unr-lcssa, %.epil.preheader92
  %storemerge6582.epil = phi i64 [ %117, %.epil.preheader92 ], [ %storemerge6582.unr, %._crit_edge85.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader92 ], [ 0, %._crit_edge85.loopexit.unr-lcssa ]
  %115 = load ptr, ptr %100, align 8, !tbaa !17
  %116 = getelementptr inbounds double, ptr %115, i64 %storemerge6582.epil
  store double 0.000000e+00, ptr %116, align 8, !tbaa !22
  %117 = add nuw nsw i64 %storemerge6582.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter93
  br i1 %epil.iter.cmp.not, label %._crit_edge85, label %.epil.preheader92, !llvm.loop !25

._crit_edge85:                                    ; preds = %._crit_edge85.loopexit.unr-lcssa, %.epil.preheader92, %._crit_edge80
  %storemerge65.lcssa = phi i64 [ 0, %._crit_edge80 ], [ %99, %.epil.preheader92 ], [ %99, %._crit_edge85.loopexit.unr-lcssa ]
  store i64 %storemerge65.lcssa, ptr %9, align 8, !tbaa !16
  store i64 0, ptr %7, align 8, !tbaa !16
  store i64 0, ptr %8, align 8, !tbaa !16
  %118 = call noundef zeroext i1 @_ZN11alglib_impl15sparseenumerateEPNS_12sparsematrixEPlS2_S2_S2_PdPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef %1)
  br i1 %118, label %.lr.ph87, label %.preheader

.lr.ph87:                                         ; preds = %._crit_edge85
  %119 = getelementptr inbounds i8, ptr %6, i64 56
  %120 = getelementptr inbounds i8, ptr %4, i64 56
  br label %123

.preheader:                                       ; preds = %144, %._crit_edge85
  store i64 0, ptr %9, align 8, !tbaa !16
  %.not68.not88 = icmp sgt i64 %19, 0
  br i1 %.not68.not88, label %.lr.ph90, label %._crit_edge91

.lr.ph90:                                         ; preds = %.preheader
  %121 = getelementptr inbounds i8, ptr %4, i64 56
  %122 = getelementptr inbounds i8, ptr %5, i64 56
  br label %146

123:                                              ; preds = %.lr.ph87, %144
  %124 = load i64, ptr %10, align 8, !tbaa !16
  %125 = load i64, ptr %9, align 8, !tbaa !16
  %.not69 = icmp sgt i64 %124, %125
  %126 = load double, ptr %11, align 8, !tbaa !22
  %127 = load ptr, ptr %119, align 8, !tbaa !17
  %128 = load ptr, ptr %73, align 8, !tbaa !17
  br i1 %.not69, label %138, label %129

129:                                              ; preds = %123
  %130 = getelementptr inbounds i64, ptr %128, i64 %125
  %131 = load i64, ptr %130, align 8, !tbaa !16
  %132 = load ptr, ptr %120, align 8, !tbaa !17
  %133 = getelementptr inbounds i64, ptr %132, i64 %125
  %134 = load i64, ptr %133, align 8, !tbaa !16
  %.neg70 = sub i64 %124, %125
  %135 = getelementptr double, ptr %127, i64 %.neg70
  %136 = getelementptr double, ptr %135, i64 %131
  %137 = getelementptr double, ptr %136, i64 %134
  br label %144

138:                                              ; preds = %123
  %139 = getelementptr i64, ptr %128, i64 %124
  %140 = getelementptr i8, ptr %139, i64 8
  %141 = load i64, ptr %140, align 8, !tbaa !16
  %.neg = sub i64 %125, %124
  %142 = getelementptr double, ptr %127, i64 %.neg
  %143 = getelementptr double, ptr %142, i64 %141
  br label %144

144:                                              ; preds = %138, %129
  %.sink = phi ptr [ %143, %138 ], [ %137, %129 ]
  store double %126, ptr %.sink, align 8, !tbaa !22
  %145 = call noundef zeroext i1 @_ZN11alglib_impl15sparseenumerateEPNS_12sparsematrixEPlS2_S2_S2_PdPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef %1)
  br i1 %145, label %123, label %.preheader, !llvm.loop !27

146:                                              ; preds = %.lr.ph90, %146
  %storemerge6789 = phi i64 [ 0, %.lr.ph90 ], [ %165, %146 ]
  %147 = load ptr, ptr %121, align 8, !tbaa !17
  %148 = getelementptr inbounds i64, ptr %147, i64 %19
  %149 = load i64, ptr %148, align 8, !tbaa !16
  %150 = getelementptr inbounds i64, ptr %147, i64 %storemerge6789
  %151 = load i64, ptr %150, align 8, !tbaa !16
  %152 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %149, i64 noundef %151, ptr noundef %1)
  %153 = load ptr, ptr %121, align 8, !tbaa !17
  %154 = getelementptr inbounds i64, ptr %153, i64 %19
  store i64 %152, ptr %154, align 8, !tbaa !16
  %155 = load ptr, ptr %122, align 8, !tbaa !17
  %156 = getelementptr inbounds i64, ptr %155, i64 %19
  %157 = load i64, ptr %156, align 8, !tbaa !16
  %158 = load i64, ptr %9, align 8, !tbaa !16
  %159 = getelementptr inbounds i64, ptr %155, i64 %158
  %160 = load i64, ptr %159, align 8, !tbaa !16
  %161 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %157, i64 noundef %160, ptr noundef %1)
  %162 = load ptr, ptr %122, align 8, !tbaa !17
  %163 = getelementptr inbounds i64, ptr %162, i64 %19
  store i64 %161, ptr %163, align 8, !tbaa !16
  %164 = load i64, ptr %9, align 8, !tbaa !16
  %165 = add nsw i64 %164, 1
  store i64 %165, ptr %9, align 8, !tbaa !16
  %.not68.not = icmp slt i64 %165, %19
  br i1 %.not68.not, label %146, label %._crit_edge91, !llvm.loop !28

._crit_edge91:                                    ; preds = %146, %.preheader
  store i64 2, ptr %12, align 8, !tbaa !5
  %166 = getelementptr inbounds i8, ptr %0, i64 344
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %166, i8 0, i64 16, i1 false)
  store i64 %19, ptr %14, align 8, !tbaa !14
  store i64 %19, ptr %16, align 8, !tbaa !15
  %167 = getelementptr inbounds i8, ptr %0, i64 192
  call void @_ZN11alglib_impl15ae_swap_vectorsEPNS_9ae_vectorES1_(ptr noundef nonnull %167, ptr noundef nonnull %4)
  %168 = getelementptr inbounds i8, ptr %0, i64 256
  call void @_ZN11alglib_impl15ae_swap_vectorsEPNS_9ae_vectorES1_(ptr noundef nonnull %168, ptr noundef nonnull %5)
  %169 = getelementptr inbounds i8, ptr %0, i64 128
  call void @_ZN11alglib_impl15ae_swap_vectorsEPNS_9ae_vectorES1_(ptr noundef nonnull %169, ptr noundef nonnull %3)
  call void @_ZN11alglib_impl15ae_swap_vectorsEPNS_9ae_vectorES1_(ptr noundef %0, ptr noundef nonnull %6)
  br label %170

170:                                              ; preds = %switch.edge, %._crit_edge91
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  ret void
}

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

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

declare noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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, !8, i64 320}
!6 = !{!"_ZTSN11alglib_impl12sparsematrixE", !7, i64 0, !7, i64 64, !7, i64 128, !7, i64 192, !7, i64 256, !8, i64 320, !8, i64 328, !8, i64 336, !8, i64 344, !8, i64 352, !8, i64 360}
!7 = !{!"_ZTSN11alglib_impl9ae_vectorE", !8, i64 0, !8, i64 8, !11, i64 16, !12, i64 24, !9, i64 56}
!8 = !{!"long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"bool", !9, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !9, i64 0}
!14 = !{!6, !8, i64 328}
!15 = !{!6, !8, i64 336}
!16 = !{!8, !8, i64 0}
!17 = !{!9, !9, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !9, i64 0}
!24 = distinct !{!24, !19}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.unroll.disable"}
!27 = distinct !{!27, !19}
!28 = distinct !{!28, !19}


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