; LLVM IR from venumb/ZSPACE :: cpp/depends/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::sactiveset" = type { i64, i64, %"struct.alglib_impl::ae_vector", i8, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i8, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", i64, %"struct.alglib_impl::ae_vector", i64, i64, i8, i8, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::snnlssolver", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::snnlssolver" = type { i64, i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.1 = type { 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.167 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.168 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.169 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.170 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.171 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.172 = external hidden unnamed_addr constant [45 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 void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl8sassetlcEPNS_10sactivesetEPNS_9ae_matrixEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i64 %3, ptr %9, align 8, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %14, i32 0, i32 1
  %16 = load i64, ptr %15, align 8, !tbaa !11
  %17 = icmp eq i64 %16, 0
  %18 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef @.str.167, ptr noundef %18)
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %19, i32 0, i32 0
  %21 = load i64, ptr %20, align 8, !tbaa !19
  store i64 %21, ptr %11, align 8, !tbaa !9
  %22 = load i64, ptr %9, align 8, !tbaa !9
  %23 = icmp sge i64 %22, 0
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %23, ptr noundef @.str.168, ptr noundef %24)
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %25, i32 0, i32 1
  %27 = load i64, ptr %26, align 8, !tbaa !20
  %28 = load i64, ptr %11, align 8, !tbaa !9
  %29 = add nsw i64 %28, 1
  %30 = icmp sge i64 %27, %29
  br i1 %30, label %34, label %31

31:                                               ; preds = %5
  %32 = load i64, ptr %9, align 8, !tbaa !9
  %33 = icmp eq i64 %32, 0
  br label %34

34:                                               ; preds = %31, %5
  %35 = phi i1 [ true, %5 ], [ %33, %31 ]
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %35, ptr noundef @.str.169, ptr noundef %36)
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %37, i32 0, i32 0
  %39 = load i64, ptr %38, align 8, !tbaa !21
  %40 = load i64, ptr %9, align 8, !tbaa !9
  %41 = icmp sge i64 %39, %40
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %41, ptr noundef @.str.170, ptr noundef %42)
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %43, i32 0, i32 0
  %45 = load i64, ptr %44, align 8, !tbaa !22
  %46 = load i64, ptr %9, align 8, !tbaa !9
  %47 = icmp sge i64 %45, %46
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %47, ptr noundef @.str.171, ptr noundef %48)
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = load i64, ptr %9, align 8, !tbaa !9
  %51 = load i64, ptr %11, align 8, !tbaa !9
  %52 = add nsw i64 %51, 1
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %49, i64 noundef %50, i64 noundef %52, ptr noundef %53)
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %54, ptr noundef @.str.172, ptr noundef %55)
  %56 = load i64, ptr %9, align 8, !tbaa !9
  %57 = icmp eq i64 %56, 0
  br i1 %57, label %58, label %65

58:                                               ; preds = %34
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %59, i32 0, i32 22
  store i64 0, ptr %60, align 8, !tbaa !23
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %61, i32 0, i32 23
  store i64 0, ptr %62, align 8, !tbaa !24
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %63, i32 0, i32 16
  store i8 1, ptr %64, align 1, !tbaa !25
  store i32 1, ptr %13, align 4
  br label %203

65:                                               ; preds = %34
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %66, i32 0, i32 21
  %68 = load i64, ptr %9, align 8, !tbaa !9
  %69 = load i64, ptr %11, align 8, !tbaa !9
  %70 = add nsw i64 %69, 1
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %67, i64 noundef %68, i64 noundef %70, ptr noundef %71)
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %72, i32 0, i32 22
  store i64 0, ptr %73, align 8, !tbaa !23
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %74, i32 0, i32 23
  store i64 0, ptr %75, align 8, !tbaa !24
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %76

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

81:                                               ; preds = %76
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %82, i32 0, i32 4
  %84 = load ptr, ptr %83, align 8, !tbaa !26
  %85 = load i64, ptr %12, align 8, !tbaa !9
  %86 = getelementptr inbounds i64, ptr %84, i64 %85
  %87 = load i64, ptr %86, align 8, !tbaa !9
  %88 = icmp eq i64 %87, 0
  br i1 %88, label %89, label %115

89:                                               ; preds = %81
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %90, i32 0, i32 21
  %92 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %91, i32 0, i32 6
  %93 = load ptr, ptr %92, align 8, !tbaa !26
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %94, i32 0, i32 22
  %96 = load i64, ptr %95, align 8, !tbaa !23
  %97 = getelementptr inbounds ptr, ptr %93, i64 %96
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = getelementptr inbounds double, ptr %98, i64 0
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %100, i32 0, i32 6
  %102 = load ptr, ptr %101, align 8, !tbaa !26
  %103 = load i64, ptr %12, align 8, !tbaa !9
  %104 = getelementptr inbounds ptr, ptr %102, i64 %103
  %105 = load ptr, ptr %104, align 8, !tbaa !5
  %106 = getelementptr inbounds double, ptr %105, i64 0
  %107 = load i64, ptr %11, align 8, !tbaa !9
  %108 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %107)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %99, i64 noundef 1, ptr noundef %106, i64 noundef 1, i64 noundef %108)
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %109, i32 0, i32 22
  %111 = load i64, ptr %110, align 8, !tbaa !23
  %112 = add nsw i64 %111, 1
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %113, i32 0, i32 22
  store i64 %112, ptr %114, align 8, !tbaa !23
  br label %115

115:                                              ; preds = %89, %81
  br label %116

116:                                              ; preds = %115
  %117 = load i64, ptr %12, align 8, !tbaa !9
  %118 = add nsw i64 %117, 1
  store i64 %118, ptr %12, align 8, !tbaa !9
  br label %76, !llvm.loop !27

119:                                              ; preds = %76
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %120

120:                                              ; preds = %197, %119
  %121 = load i64, ptr %12, align 8, !tbaa !9
  %122 = load i64, ptr %9, align 8, !tbaa !9
  %123 = sub nsw i64 %122, 1
  %124 = icmp sle i64 %121, %123
  br i1 %124, label %125, label %200

125:                                              ; preds = %120
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %126, i32 0, i32 4
  %128 = load ptr, ptr %127, align 8, !tbaa !26
  %129 = load i64, ptr %12, align 8, !tbaa !9
  %130 = getelementptr inbounds i64, ptr %128, i64 %129
  %131 = load i64, ptr %130, align 8, !tbaa !9
  %132 = icmp ne i64 %131, 0
  br i1 %132, label %133, label %196

133:                                              ; preds = %125
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %134, i32 0, i32 4
  %136 = load ptr, ptr %135, align 8, !tbaa !26
  %137 = load i64, ptr %12, align 8, !tbaa !9
  %138 = getelementptr inbounds i64, ptr %136, i64 %137
  %139 = load i64, ptr %138, align 8, !tbaa !9
  %140 = icmp sgt i64 %139, 0
  br i1 %140, label %141, label %165

141:                                              ; preds = %133
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %142, i32 0, i32 21
  %144 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %143, i32 0, i32 6
  %145 = load ptr, ptr %144, align 8, !tbaa !26
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %146, i32 0, i32 22
  %148 = load i64, ptr %147, align 8, !tbaa !23
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %149, i32 0, i32 23
  %151 = load i64, ptr %150, align 8, !tbaa !24
  %152 = add nsw i64 %148, %151
  %153 = getelementptr inbounds ptr, ptr %145, i64 %152
  %154 = load ptr, ptr %153, align 8, !tbaa !5
  %155 = getelementptr inbounds double, ptr %154, i64 0
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %156, i32 0, i32 6
  %158 = load ptr, ptr %157, align 8, !tbaa !26
  %159 = load i64, ptr %12, align 8, !tbaa !9
  %160 = getelementptr inbounds ptr, ptr %158, i64 %159
  %161 = load ptr, ptr %160, align 8, !tbaa !5
  %162 = getelementptr inbounds double, ptr %161, i64 0
  %163 = load i64, ptr %11, align 8, !tbaa !9
  %164 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %163)
  call void @_ZN11alglib_impl12ae_v_movenegEPdlPKdll(ptr noundef %155, i64 noundef 1, ptr noundef %162, i64 noundef 1, i64 noundef %164)
  br label %189

165:                                              ; preds = %133
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  %167 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %166, i32 0, i32 21
  %168 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %167, i32 0, i32 6
  %169 = load ptr, ptr %168, align 8, !tbaa !26
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  %171 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %170, i32 0, i32 22
  %172 = load i64, ptr %171, align 8, !tbaa !23
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %173, i32 0, i32 23
  %175 = load i64, ptr %174, align 8, !tbaa !24
  %176 = add nsw i64 %172, %175
  %177 = getelementptr inbounds ptr, ptr %169, i64 %176
  %178 = load ptr, ptr %177, align 8, !tbaa !5
  %179 = getelementptr inbounds double, ptr %178, i64 0
  %180 = load ptr, ptr %7, align 8, !tbaa !5
  %181 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %180, i32 0, i32 6
  %182 = load ptr, ptr %181, align 8, !tbaa !26
  %183 = load i64, ptr %12, align 8, !tbaa !9
  %184 = getelementptr inbounds ptr, ptr %182, i64 %183
  %185 = load ptr, ptr %184, align 8, !tbaa !5
  %186 = getelementptr inbounds double, ptr %185, i64 0
  %187 = load i64, ptr %11, align 8, !tbaa !9
  %188 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %187)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %179, i64 noundef 1, ptr noundef %186, i64 noundef 1, i64 noundef %188)
  br label %189

189:                                              ; preds = %165, %141
  %190 = load ptr, ptr %6, align 8, !tbaa !5
  %191 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %190, i32 0, i32 23
  %192 = load i64, ptr %191, align 8, !tbaa !24
  %193 = add nsw i64 %192, 1
  %194 = load ptr, ptr %6, align 8, !tbaa !5
  %195 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %194, i32 0, i32 23
  store i64 %193, ptr %195, align 8, !tbaa !24
  br label %196

196:                                              ; preds = %189, %125
  br label %197

197:                                              ; preds = %196
  %198 = load i64, ptr %12, align 8, !tbaa !9
  %199 = add nsw i64 %198, 1
  store i64 %199, ptr %12, align 8, !tbaa !9
  br label %120, !llvm.loop !29

200:                                              ; preds = %120
  %201 = load ptr, ptr %6, align 8, !tbaa !5
  %202 = getelementptr inbounds %"struct.alglib_impl::sactiveset", ptr %201, i32 0, i32 16
  store i8 1, ptr %202, align 1, !tbaa !25
  store i32 0, ptr %13, align 4
  br label %203

203:                                              ; preds = %200, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %204 = load i32, ptr %13, align 4
  switch i32 %204, label %206 [
    i32 0, label %205
    i32 1, label %205
  ]

205:                                              ; preds = %203, %203
  ret void

206:                                              ; preds = %203
  unreachable
}

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 = !{!12, !10, i64 8}
!12 = !{!"_ZTSN11alglib_impl10sactivesetE", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 80, !13, i64 88, !13, i64 152, !13, i64 216, !14, i64 280, !16, i64 288, !16, i64 368, !16, i64 448, !10, i64 528, !13, i64 536, !10, i64 600, !10, i64 608, !14, i64 616, !14, i64 617, !13, i64 624, !13, i64 688, !13, i64 752, !13, i64 816, !16, i64 880, !10, i64 960, !10, i64 968, !13, i64 976, !13, i64 1040, !13, i64 1104, !13, i64 1168, !13, i64 1232, !13, i64 1296, !17, i64 1360, !13, i64 3000, !13, i64 3064, !13, i64 3128, !16, i64 3192, !13, i64 3272, !13, i64 3336, !13, i64 3400, !16, i64 3464, !16, i64 3544, !13, i64 3624, !13, i64 3688, !13, i64 3752, !16, i64 3816, !13, i64 3896, !13, i64 3960, !13, i64 4024, !13, i64 4088, !13, i64 4152, !13, i64 4216, !13, i64 4280}
!13 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !14, i64 16, !15, i64 24, !7, i64 56}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !14, i64 32, !15, i64 40, !7, i64 72}
!17 = !{!"_ZTSN11alglib_impl11snnlssolverE", !10, i64 0, !10, i64 8, !10, i64 16, !16, i64 24, !13, i64 104, !13, i64 168, !18, i64 232, !10, i64 240, !13, i64 248, !13, i64 312, !16, i64 376, !16, i64 456, !16, i64 536, !13, i64 616, !13, i64 680, !13, i64 744, !13, i64 808, !13, i64 872, !13, i64 936, !13, i64 1000, !13, i64 1064, !13, i64 1128, !13, i64 1192, !13, i64 1256, !13, i64 1320, !13, i64 1384, !13, i64 1448, !13, i64 1512, !13, i64 1576}
!18 = !{!"double", !7, i64 0}
!19 = !{!12, !10, i64 0}
!20 = !{!16, !10, i64 8}
!21 = !{!16, !10, i64 0}
!22 = !{!13, !10, i64 0}
!23 = !{!12, !10, i64 960}
!24 = !{!12, !10, i64 968}
!25 = !{!12, !14, i64 617}
!26 = !{!7, !7, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}


; 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.167 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.168 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.169 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.170 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.171 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.172 = external hidden unnamed_addr constant [45 x i8], align 1

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

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

declare noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl8sassetlcEPNS_10sactivesetEPNS_9ae_matrixEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2, i64 noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load i64, ptr %6, align 8, !tbaa !5
  %8 = icmp eq i64 %7, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.167, ptr noundef %4)
  %9 = load i64, ptr %0, align 8, !tbaa !17
  %10 = icmp sgt i64 %3, -1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.168, ptr noundef %4)
  %11 = getelementptr inbounds i8, ptr %1, i64 8
  %12 = load i64, ptr %11, align 8, !tbaa !18
  %13 = add nsw i64 %9, 1
  %14 = icmp sgt i64 %12, %9
  %15 = icmp eq i64 %3, 0
  %16 = or i1 %15, %14
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.169, ptr noundef %4)
  %17 = load i64, ptr %1, align 8, !tbaa !19
  %18 = icmp sge i64 %17, %3
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.170, ptr noundef %4)
  %19 = load i64, ptr %2, align 8, !tbaa !20
  %20 = icmp sge i64 %19, %3
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.171, ptr noundef %4)
  %21 = tail call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %1, i64 noundef %3, i64 noundef %13, ptr noundef %4)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef nonnull @.str.172, ptr noundef %4)
  br i1 %15, label %22, label %24

22:                                               ; preds = %5
  %23 = getelementptr inbounds i8, ptr %0, i64 960
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %23, i8 0, i64 16, i1 false)
  br label %._crit_edge

24:                                               ; preds = %5
  %25 = getelementptr inbounds i8, ptr %0, i64 880
  tail call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %25, i64 noundef %3, i64 noundef %13, ptr noundef %4)
  %26 = getelementptr inbounds i8, ptr %0, i64 960
  %27 = getelementptr inbounds i8, ptr %0, i64 968
  %.not.not67 = icmp sgt i64 %3, 0
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %26, i8 0, i64 16, i1 false)
  br i1 %.not.not67, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %24
  %28 = getelementptr inbounds i8, ptr %2, i64 56
  %29 = getelementptr inbounds i8, ptr %0, i64 952
  %30 = getelementptr inbounds i8, ptr %1, i64 72
  br label %34

.preheader:                                       ; preds = %50
  br i1 %.not.not67, label %.lr.ph72, label %._crit_edge

.lr.ph72:                                         ; preds = %.preheader
  %31 = getelementptr inbounds i8, ptr %2, i64 56
  %32 = getelementptr inbounds i8, ptr %0, i64 952
  %33 = getelementptr inbounds i8, ptr %1, i64 72
  br label %53

34:                                               ; preds = %.lr.ph, %50
  %35 = phi i64 [ 0, %.lr.ph ], [ %51, %50 ]
  %.068 = phi i64 [ 0, %.lr.ph ], [ %52, %50 ]
  %36 = load ptr, ptr %28, align 8, !tbaa !21
  %37 = getelementptr inbounds i64, ptr %36, i64 %.068
  %38 = load i64, ptr %37, align 8, !tbaa !22
  %39 = icmp eq i64 %38, 0
  br i1 %39, label %40, label %50

40:                                               ; preds = %34
  %41 = load ptr, ptr %29, align 8, !tbaa !21
  %42 = getelementptr inbounds ptr, ptr %41, i64 %35
  %43 = load ptr, ptr %42, align 8, !tbaa !23
  %44 = load ptr, ptr %30, align 8, !tbaa !21
  %45 = getelementptr inbounds ptr, ptr %44, i64 %.068
  %46 = load ptr, ptr %45, align 8, !tbaa !23
  %47 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %9)
  tail call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %43, i64 noundef 1, ptr noundef %46, i64 noundef 1, i64 noundef %47)
  %48 = load i64, ptr %26, align 8, !tbaa !24
  %49 = add nsw i64 %48, 1
  store i64 %49, ptr %26, align 8, !tbaa !24
  br label %50

50:                                               ; preds = %34, %40
  %51 = phi i64 [ %35, %34 ], [ %49, %40 ]
  %52 = add nuw nsw i64 %.068, 1
  %exitcond.not = icmp eq i64 %52, %3
  br i1 %exitcond.not, label %.preheader, label %34, !llvm.loop !25

53:                                               ; preds = %.lr.ph72, %74
  %.170 = phi i64 [ 0, %.lr.ph72 ], [ %75, %74 ]
  %54 = load ptr, ptr %31, align 8, !tbaa !21
  %55 = getelementptr inbounds i64, ptr %54, i64 %.170
  %56 = load i64, ptr %55, align 8, !tbaa !22
  %.not = icmp eq i64 %56, 0
  br i1 %.not, label %74, label %57

57:                                               ; preds = %53
  %58 = icmp sgt i64 %56, 0
  %59 = load ptr, ptr %32, align 8, !tbaa !21
  %60 = load i64, ptr %26, align 8, !tbaa !24
  %61 = load i64, ptr %27, align 8, !tbaa !27
  %62 = getelementptr ptr, ptr %59, i64 %60
  %63 = getelementptr ptr, ptr %62, i64 %61
  %64 = load ptr, ptr %63, align 8, !tbaa !23
  %65 = load ptr, ptr %33, align 8, !tbaa !21
  %66 = getelementptr inbounds ptr, ptr %65, i64 %.170
  %67 = load ptr, ptr %66, align 8, !tbaa !23
  %68 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %9)
  br i1 %58, label %69, label %70

69:                                               ; preds = %57
  tail call void @_ZN11alglib_impl12ae_v_movenegEPdlPKdll(ptr noundef %64, i64 noundef 1, ptr noundef %67, i64 noundef 1, i64 noundef %68)
  br label %71

70:                                               ; preds = %57
  tail call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %64, i64 noundef 1, ptr noundef %67, i64 noundef 1, i64 noundef %68)
  br label %71

71:                                               ; preds = %70, %69
  %72 = load i64, ptr %27, align 8, !tbaa !27
  %73 = add nsw i64 %72, 1
  store i64 %73, ptr %27, align 8, !tbaa !27
  br label %74

74:                                               ; preds = %53, %71
  %75 = add nuw nsw i64 %.170, 1
  %exitcond73.not = icmp eq i64 %75, %3
  br i1 %exitcond73.not, label %._crit_edge, label %53, !llvm.loop !28

._crit_edge:                                      ; preds = %74, %.preheader, %24, %22
  %.sink = getelementptr inbounds i8, ptr %0, i64 617
  store i8 1, ptr %.sink, align 1, !tbaa !29
  ret void
}

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

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" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_ZTSN11alglib_impl10sactivesetE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 80, !10, i64 88, !10, i64 152, !10, i64 216, !11, i64 280, !14, i64 288, !14, i64 368, !14, i64 448, !7, i64 528, !10, i64 536, !7, i64 600, !7, i64 608, !11, i64 616, !11, i64 617, !10, i64 624, !10, i64 688, !10, i64 752, !10, i64 816, !14, i64 880, !7, i64 960, !7, i64 968, !10, i64 976, !10, i64 1040, !10, i64 1104, !10, i64 1168, !10, i64 1232, !10, i64 1296, !15, i64 1360, !10, i64 3000, !10, i64 3064, !10, i64 3128, !14, i64 3192, !10, i64 3272, !10, i64 3336, !10, i64 3400, !14, i64 3464, !14, i64 3544, !10, i64 3624, !10, i64 3688, !10, i64 3752, !14, i64 3816, !10, i64 3896, !10, i64 3960, !10, i64 4024, !10, i64 4088, !10, i64 4152, !10, i64 4216, !10, i64 4280}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !8, i64 56}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !12, i64 40, !8, i64 72}
!15 = !{!"_ZTSN11alglib_impl11snnlssolverE", !7, i64 0, !7, i64 8, !7, i64 16, !14, i64 24, !10, i64 104, !10, i64 168, !16, i64 232, !7, i64 240, !10, i64 248, !10, i64 312, !14, i64 376, !14, i64 456, !14, i64 536, !10, i64 616, !10, i64 680, !10, i64 744, !10, i64 808, !10, i64 872, !10, i64 936, !10, i64 1000, !10, i64 1064, !10, i64 1128, !10, i64 1192, !10, i64 1256, !10, i64 1320, !10, i64 1384, !10, i64 1448, !10, i64 1512, !10, i64 1576}
!16 = !{!"double", !8, i64 0}
!17 = !{!6, !7, i64 0}
!18 = !{!14, !7, i64 8}
!19 = !{!14, !7, i64 0}
!20 = !{!10, !7, i64 0}
!21 = !{!8, !8, i64 0}
!22 = !{!7, !7, i64 0}
!23 = !{!13, !13, i64 0}
!24 = !{!6, !7, i64 960}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!6, !7, i64 968}
!28 = distinct !{!28, !26}
!29 = !{!6, !11, i64 617}


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