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

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

@.str.141 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [55 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl18sparseappendmatrixEPNS_12sparsematrixEPKS0_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %10, i32 0, i32 5
  %12 = load i64, ptr %11, align 8, !tbaa !9
  %13 = icmp eq i64 %12, 1
  br i1 %13, label %19, label %14

14:                                               ; preds = %3
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %15, i32 0, i32 5
  %17 = load i64, ptr %16, align 8, !tbaa !9
  %18 = icmp eq i64 %17, -10083
  br label %19

19:                                               ; preds = %14, %3
  %20 = phi i1 [ true, %3 ], [ %18, %14 ]
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef @.str.141, ptr noundef %21)
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %22, i32 0, i32 9
  %24 = load i64, ptr %23, align 8, !tbaa !15
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %25, i32 0, i32 2
  %27 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %26, i32 0, i32 4
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %29, i32 0, i32 6
  %31 = load i64, ptr %30, align 8, !tbaa !17
  %32 = getelementptr inbounds i64, ptr %28, i64 %31
  %33 = load i64, ptr %32, align 8, !tbaa !18
  %34 = icmp eq i64 %24, %33
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %34, ptr noundef @.str.142, ptr noundef %35)
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %36, i32 0, i32 5
  %38 = load i64, ptr %37, align 8, !tbaa !9
  %39 = icmp eq i64 %38, 1
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %39, ptr noundef @.str.143, ptr noundef %40)
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %41, i32 0, i32 9
  %43 = load i64, ptr %42, align 8, !tbaa !15
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %44, i32 0, i32 2
  %46 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %45, i32 0, i32 4
  %47 = load ptr, ptr %46, align 8, !tbaa !16
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %48, i32 0, i32 6
  %50 = load i64, ptr %49, align 8, !tbaa !17
  %51 = getelementptr inbounds i64, ptr %47, i64 %50
  %52 = load i64, ptr %51, align 8, !tbaa !18
  %53 = icmp eq i64 %43, %52
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %53, ptr noundef @.str.144, ptr noundef %54)
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %55, i32 0, i32 6
  %57 = load i64, ptr %56, align 8, !tbaa !17
  store i64 %57, ptr %8, align 8, !tbaa !18
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %58, i32 0, i32 6
  %60 = load i64, ptr %59, align 8, !tbaa !17
  store i64 %60, ptr %7, align 8, !tbaa !18
  %61 = load i64, ptr %8, align 8, !tbaa !18
  %62 = load i64, ptr %7, align 8, !tbaa !18
  %63 = add nsw i64 %61, %62
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %64, i32 0, i32 3
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %63, ptr noundef %65, ptr noundef %66)
  %67 = load i64, ptr %8, align 8, !tbaa !18
  %68 = load i64, ptr %7, align 8, !tbaa !18
  %69 = add nsw i64 %67, %68
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %70, i32 0, i32 4
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %69, ptr noundef %71, ptr noundef %72)
  %73 = load i64, ptr %8, align 8, !tbaa !18
  %74 = load i64, ptr %7, align 8, !tbaa !18
  %75 = add nsw i64 %73, %74
  %76 = add nsw i64 %75, 1
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %77, i32 0, i32 2
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %76, ptr noundef %78, ptr noundef %79)
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %80, i32 0, i32 2
  %82 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %81, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !16
  %84 = load i64, ptr %8, align 8, !tbaa !18
  %85 = getelementptr inbounds i64, ptr %83, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !18
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %87, i32 0, i32 2
  %89 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %88, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !16
  %91 = load i64, ptr %7, align 8, !tbaa !18
  %92 = getelementptr inbounds i64, ptr %90, i64 %91
  %93 = load i64, ptr %92, align 8, !tbaa !18
  %94 = add nsw i64 %86, %93
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %95, i32 0, i32 1
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %94, ptr noundef %96, ptr noundef %97)
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %98, i32 0, i32 2
  %100 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %99, i32 0, i32 4
  %101 = load ptr, ptr %100, align 8, !tbaa !16
  %102 = load i64, ptr %8, align 8, !tbaa !18
  %103 = getelementptr inbounds i64, ptr %101, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !18
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %105, i32 0, i32 2
  %107 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %106, i32 0, i32 4
  %108 = load ptr, ptr %107, align 8, !tbaa !16
  %109 = load i64, ptr %7, align 8, !tbaa !18
  %110 = getelementptr inbounds i64, ptr %108, i64 %109
  %111 = load i64, ptr %110, align 8, !tbaa !18
  %112 = add nsw i64 %104, %111
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl6rgrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %112, ptr noundef %114, ptr noundef %115)
  store i64 0, ptr %9, align 8, !tbaa !18
  br label %116

116:                                              ; preds = %187, %19
  %117 = load i64, ptr %9, align 8, !tbaa !18
  %118 = load i64, ptr %7, align 8, !tbaa !18
  %119 = sub nsw i64 %118, 1
  %120 = icmp sle i64 %117, %119
  br i1 %120, label %121, label %190

121:                                              ; preds = %116
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %122, i32 0, i32 2
  %124 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %123, i32 0, i32 4
  %125 = load ptr, ptr %124, align 8, !tbaa !16
  %126 = load i64, ptr %8, align 8, !tbaa !18
  %127 = load i64, ptr %9, align 8, !tbaa !18
  %128 = add nsw i64 %126, %127
  %129 = getelementptr inbounds i64, ptr %125, i64 %128
  %130 = load i64, ptr %129, align 8, !tbaa !18
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %131, i32 0, i32 2
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %132, i32 0, i32 4
  %134 = load ptr, ptr %133, align 8, !tbaa !16
  %135 = load i64, ptr %9, align 8, !tbaa !18
  %136 = add nsw i64 %135, 1
  %137 = getelementptr inbounds i64, ptr %134, i64 %136
  %138 = load i64, ptr %137, align 8, !tbaa !18
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %139, i32 0, i32 2
  %141 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %140, i32 0, i32 4
  %142 = load ptr, ptr %141, align 8, !tbaa !16
  %143 = load i64, ptr %9, align 8, !tbaa !18
  %144 = getelementptr inbounds i64, ptr %142, i64 %143
  %145 = load i64, ptr %144, align 8, !tbaa !18
  %146 = sub nsw i64 %138, %145
  %147 = add nsw i64 %130, %146
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %148, i32 0, i32 2
  %150 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %149, i32 0, i32 4
  %151 = load ptr, ptr %150, align 8, !tbaa !16
  %152 = load i64, ptr %8, align 8, !tbaa !18
  %153 = load i64, ptr %9, align 8, !tbaa !18
  %154 = add nsw i64 %152, %153
  %155 = add nsw i64 %154, 1
  %156 = getelementptr inbounds i64, ptr %151, i64 %155
  store i64 %147, ptr %156, align 8, !tbaa !18
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %157, i32 0, i32 3
  %159 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %158, i32 0, i32 4
  %160 = load ptr, ptr %159, align 8, !tbaa !16
  %161 = load i64, ptr %9, align 8, !tbaa !18
  %162 = getelementptr inbounds i64, ptr %160, i64 %161
  %163 = load i64, ptr %162, align 8, !tbaa !18
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %164, i32 0, i32 3
  %166 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %165, i32 0, i32 4
  %167 = load ptr, ptr %166, align 8, !tbaa !16
  %168 = load i64, ptr %8, align 8, !tbaa !18
  %169 = load i64, ptr %9, align 8, !tbaa !18
  %170 = add nsw i64 %168, %169
  %171 = getelementptr inbounds i64, ptr %167, i64 %170
  store i64 %163, ptr %171, align 8, !tbaa !18
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  %173 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %172, i32 0, i32 4
  %174 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %173, i32 0, i32 4
  %175 = load ptr, ptr %174, align 8, !tbaa !16
  %176 = load i64, ptr %9, align 8, !tbaa !18
  %177 = getelementptr inbounds i64, ptr %175, i64 %176
  %178 = load i64, ptr %177, align 8, !tbaa !18
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %179, i32 0, i32 4
  %181 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %180, i32 0, i32 4
  %182 = load ptr, ptr %181, align 8, !tbaa !16
  %183 = load i64, ptr %8, align 8, !tbaa !18
  %184 = load i64, ptr %9, align 8, !tbaa !18
  %185 = add nsw i64 %183, %184
  %186 = getelementptr inbounds i64, ptr %182, i64 %185
  store i64 %178, ptr %186, align 8, !tbaa !18
  br label %187

187:                                              ; preds = %121
  %188 = load i64, ptr %9, align 8, !tbaa !18
  %189 = add nsw i64 %188, 1
  store i64 %189, ptr %9, align 8, !tbaa !18
  br label %116, !llvm.loop !19

190:                                              ; preds = %116
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %191, i32 0, i32 2
  %193 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %192, i32 0, i32 4
  %194 = load ptr, ptr %193, align 8, !tbaa !16
  %195 = load i64, ptr %7, align 8, !tbaa !18
  %196 = getelementptr inbounds i64, ptr %194, i64 %195
  %197 = load i64, ptr %196, align 8, !tbaa !18
  %198 = load ptr, ptr %5, align 8, !tbaa !5
  %199 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %198, i32 0, i32 1
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %200, i32 0, i32 1
  %202 = load ptr, ptr %4, 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 !16
  %206 = load i64, ptr %8, align 8, !tbaa !18
  %207 = getelementptr inbounds i64, ptr %205, i64 %206
  %208 = load i64, ptr %207, align 8, !tbaa !18
  %209 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl7icopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %197, ptr noundef %199, i64 noundef 0, ptr noundef %201, i64 noundef %208, ptr noundef %209)
  %210 = load ptr, ptr %5, align 8, !tbaa !5
  %211 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %210, i32 0, i32 2
  %212 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %211, i32 0, i32 4
  %213 = load ptr, ptr %212, align 8, !tbaa !16
  %214 = load i64, ptr %7, align 8, !tbaa !18
  %215 = getelementptr inbounds i64, ptr %213, i64 %214
  %216 = load i64, ptr %215, align 8, !tbaa !18
  %217 = load ptr, ptr %5, align 8, !tbaa !5
  %218 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %217, i32 0, i32 0
  %219 = load ptr, ptr %4, align 8, !tbaa !5
  %220 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %219, i32 0, i32 0
  %221 = load ptr, ptr %4, align 8, !tbaa !5
  %222 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %221, i32 0, i32 2
  %223 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %222, i32 0, i32 4
  %224 = load ptr, ptr %223, align 8, !tbaa !16
  %225 = load i64, ptr %8, align 8, !tbaa !18
  %226 = getelementptr inbounds i64, ptr %224, i64 %225
  %227 = load i64, ptr %226, align 8, !tbaa !18
  %228 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %216, ptr noundef %218, i64 noundef 0, ptr noundef %220, i64 noundef %227, ptr noundef %228)
  %229 = load ptr, ptr %4, align 8, !tbaa !5
  %230 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %229, i32 0, i32 5
  store i64 1, ptr %230, align 8, !tbaa !9
  %231 = load i64, ptr %8, align 8, !tbaa !18
  %232 = load i64, ptr %7, align 8, !tbaa !18
  %233 = add nsw i64 %231, %232
  %234 = load ptr, ptr %4, align 8, !tbaa !5
  %235 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %234, i32 0, i32 6
  store i64 %233, ptr %235, align 8, !tbaa !17
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  %237 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %236, i32 0, i32 2
  %238 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %237, i32 0, i32 4
  %239 = load ptr, ptr %238, align 8, !tbaa !16
  %240 = load i64, ptr %8, align 8, !tbaa !18
  %241 = load i64, ptr %7, align 8, !tbaa !18
  %242 = add nsw i64 %240, %241
  %243 = getelementptr inbounds i64, ptr %239, i64 %242
  %244 = load i64, ptr %243, align 8, !tbaa !18
  %245 = load ptr, ptr %4, align 8, !tbaa !5
  %246 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %245, i32 0, i32 9
  store i64 %244, ptr %246, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl7icopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl6rgrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #2 = { mustprogress nounwind 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, !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 352}
!16 = !{!7, !7, i64 0}
!17 = !{!10, !12, i64 328}
!18 = !{!12, !12, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; 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.141 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [55 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl18sparseappendmatrixEPNS_12sparsematrixEPKS0_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 320
  %5 = load i64, ptr %4, align 8, !tbaa !5
  %6 = icmp eq i64 %5, 1
  %7 = icmp eq i64 %5, -10083
  %spec.select = or i1 %6, %7
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select, ptr noundef nonnull @.str.141, ptr noundef %2)
  %8 = getelementptr inbounds i8, ptr %0, i64 352
  %9 = load i64, ptr %8, align 8, !tbaa !14
  %10 = getelementptr inbounds i8, ptr %0, i64 128
  %11 = getelementptr inbounds i8, ptr %0, i64 184
  %12 = load ptr, ptr %11, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %0, i64 328
  %14 = load i64, ptr %13, align 8, !tbaa !16
  %15 = getelementptr inbounds i64, ptr %12, i64 %14
  %16 = load i64, ptr %15, align 8, !tbaa !17
  %17 = icmp eq i64 %9, %16
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.142, ptr noundef %2)
  %18 = getelementptr inbounds i8, ptr %1, i64 320
  %19 = load i64, ptr %18, align 8, !tbaa !5
  %20 = icmp eq i64 %19, 1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.143, ptr noundef %2)
  %21 = getelementptr inbounds i8, ptr %1, i64 352
  %22 = load i64, ptr %21, align 8, !tbaa !14
  %23 = getelementptr inbounds i8, ptr %1, i64 184
  %24 = load ptr, ptr %23, align 8, !tbaa !15
  %25 = getelementptr inbounds i8, ptr %1, i64 328
  %26 = load i64, ptr %25, align 8, !tbaa !16
  %27 = getelementptr inbounds i64, ptr %24, i64 %26
  %28 = load i64, ptr %27, align 8, !tbaa !17
  %29 = icmp eq i64 %22, %28
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %29, ptr noundef nonnull @.str.144, ptr noundef %2)
  %30 = load i64, ptr %13, align 8, !tbaa !16
  %31 = load i64, ptr %25, align 8, !tbaa !16
  %32 = add nsw i64 %31, %30
  %33 = getelementptr inbounds i8, ptr %0, i64 192
  tail call void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %32, ptr noundef nonnull %33, ptr noundef %2)
  %34 = getelementptr inbounds i8, ptr %0, i64 256
  tail call void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %32, ptr noundef nonnull %34, ptr noundef %2)
  %35 = add nsw i64 %32, 1
  tail call void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %35, ptr noundef nonnull %10, ptr noundef %2)
  %36 = load ptr, ptr %11, align 8, !tbaa !15
  %37 = getelementptr inbounds i64, ptr %36, i64 %30
  %38 = load i64, ptr %37, align 8, !tbaa !17
  %39 = load ptr, ptr %23, align 8, !tbaa !15
  %40 = getelementptr inbounds i64, ptr %39, i64 %31
  %41 = load i64, ptr %40, align 8, !tbaa !17
  %42 = add nsw i64 %41, %38
  %43 = getelementptr inbounds i8, ptr %0, i64 64
  tail call void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %42, ptr noundef nonnull %43, ptr noundef %2)
  %44 = load ptr, ptr %11, align 8, !tbaa !15
  %45 = getelementptr inbounds i64, ptr %44, i64 %30
  %46 = load i64, ptr %45, align 8, !tbaa !17
  %47 = load ptr, ptr %23, align 8, !tbaa !15
  %48 = getelementptr inbounds i64, ptr %47, i64 %31
  %49 = load i64, ptr %48, align 8, !tbaa !17
  %50 = add nsw i64 %49, %46
  tail call void @_ZN11alglib_impl6rgrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %50, ptr noundef %0, ptr noundef %2)
  %.not.not84 = icmp sgt i64 %31, 0
  br i1 %.not.not84, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  %51 = getelementptr inbounds i8, ptr %1, i64 248
  %52 = getelementptr inbounds i8, ptr %0, i64 248
  %53 = getelementptr inbounds i8, ptr %1, i64 312
  %54 = getelementptr inbounds i8, ptr %0, i64 312
  br label %55

55:                                               ; preds = %.lr.ph, %55
  %.085 = phi i64 [ 0, %.lr.ph ], [ %61, %55 ]
  %56 = load ptr, ptr %11, align 8, !tbaa !15
  %57 = add nsw i64 %.085, %30
  %58 = getelementptr inbounds i64, ptr %56, i64 %57
  %59 = load i64, ptr %58, align 8, !tbaa !17
  %60 = load ptr, ptr %23, align 8, !tbaa !15
  %61 = add nuw nsw i64 %.085, 1
  %62 = getelementptr inbounds i64, ptr %60, i64 %61
  %63 = load i64, ptr %62, align 8, !tbaa !17
  %64 = getelementptr inbounds i64, ptr %60, i64 %.085
  %65 = load i64, ptr %64, align 8, !tbaa !17
  %66 = add i64 %63, %59
  %67 = sub i64 %66, %65
  %68 = getelementptr i8, ptr %58, i64 8
  store i64 %67, ptr %68, align 8, !tbaa !17
  %69 = load ptr, ptr %51, align 8, !tbaa !15
  %70 = getelementptr inbounds i64, ptr %69, i64 %.085
  %71 = load i64, ptr %70, align 8, !tbaa !17
  %72 = load ptr, ptr %52, align 8, !tbaa !15
  %73 = getelementptr inbounds i64, ptr %72, i64 %57
  store i64 %71, ptr %73, align 8, !tbaa !17
  %74 = load ptr, ptr %53, align 8, !tbaa !15
  %75 = getelementptr inbounds i64, ptr %74, i64 %.085
  %76 = load i64, ptr %75, align 8, !tbaa !17
  %77 = load ptr, ptr %54, align 8, !tbaa !15
  %78 = getelementptr inbounds i64, ptr %77, i64 %57
  store i64 %76, ptr %78, align 8, !tbaa !17
  %exitcond.not = icmp eq i64 %61, %31
  br i1 %exitcond.not, label %._crit_edge, label %55, !llvm.loop !18

._crit_edge:                                      ; preds = %55, %3
  %79 = load ptr, ptr %23, align 8, !tbaa !15
  %80 = getelementptr inbounds i64, ptr %79, i64 %31
  %81 = load i64, ptr %80, align 8, !tbaa !17
  %82 = getelementptr inbounds i8, ptr %1, i64 64
  %83 = load ptr, ptr %11, align 8, !tbaa !15
  %84 = getelementptr inbounds i64, ptr %83, i64 %30
  %85 = load i64, ptr %84, align 8, !tbaa !17
  tail call void @_ZN11alglib_impl7icopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %81, ptr noundef nonnull %82, i64 noundef 0, ptr noundef nonnull %43, i64 noundef %85, ptr noundef %2)
  %86 = load ptr, ptr %23, align 8, !tbaa !15
  %87 = getelementptr inbounds i64, ptr %86, i64 %31
  %88 = load i64, ptr %87, align 8, !tbaa !17
  %89 = load ptr, ptr %11, align 8, !tbaa !15
  %90 = getelementptr inbounds i64, ptr %89, i64 %30
  %91 = load i64, ptr %90, align 8, !tbaa !17
  tail call void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef %88, ptr noundef nonnull %1, i64 noundef 0, ptr noundef nonnull %0, i64 noundef %91, ptr noundef %2)
  store i64 1, ptr %4, align 8, !tbaa !5
  store i64 %32, ptr %13, align 8, !tbaa !16
  %92 = load ptr, ptr %11, align 8, !tbaa !15
  %93 = getelementptr inbounds i64, ptr %92, i64 %32
  %94 = load i64, ptr %93, align 8, !tbaa !17
  store i64 %94, ptr %8, align 8, !tbaa !14
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl7rcopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl7icopyvxElPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl6igrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl6rgrowvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #0 = { 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 #1 = { mustprogress nounwind 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, !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 352}
!15 = !{!9, !9, i64 0}
!16 = !{!6, !8, i64 328}
!17 = !{!8, !8, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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