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

; 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_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon }
%union.anon = type { ptr }

; 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 nounwind uwtable
declare dso_local void @_ZN11alglib_impl8touchintEPlPNS_8ae_stateE(ptr noundef, ptr noundef) #1

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

declare noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) #2

declare void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef, i64 noundef, i64 noundef, double noundef) #2

declare void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, double noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl29symmetricmatrixvectormultiplyEPNS_9ae_matrixEbllPNS_9ae_vectorEdS3_PNS_8ae_stateE(ptr noundef %0, i1 noundef zeroext %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, double noundef %5, ptr noundef %6, ptr noundef %7) #3 {
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca double, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca double, align 8
  %26 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  %27 = zext i1 %1 to i8
  store i8 %27, ptr %10, align 1, !tbaa !9
  store i64 %2, ptr %11, align 8, !tbaa !11
  store i64 %3, ptr %12, align 8, !tbaa !11
  store ptr %4, ptr %13, align 8, !tbaa !5
  store double %5, ptr %14, align 8, !tbaa !13
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %28 = load i64, ptr %12, align 8, !tbaa !11
  %29 = load i64, ptr %11, align 8, !tbaa !11
  %30 = sub nsw i64 %28, %29
  %31 = add nsw i64 %30, 1
  store i64 %31, ptr %24, align 8, !tbaa !11
  %32 = load i64, ptr %24, align 8, !tbaa !11
  %33 = icmp sle i64 %32, 0
  br i1 %33, label %34, label %35

34:                                               ; preds = %8
  store i32 1, ptr %26, align 4
  br label %260

35:                                               ; preds = %8
  %36 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %36, ptr %17, align 8, !tbaa !11
  br label %37

37:                                               ; preds = %69, %35
  %38 = load i64, ptr %17, align 8, !tbaa !11
  %39 = load i64, ptr %12, align 8, !tbaa !11
  %40 = icmp sle i64 %38, %39
  br i1 %40, label %41, label %72

41:                                               ; preds = %37
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %42, i32 0, i32 6
  %44 = load ptr, ptr %43, align 8, !tbaa !15
  %45 = load i64, ptr %17, align 8, !tbaa !11
  %46 = getelementptr inbounds ptr, ptr %44, i64 %45
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = load i64, ptr %17, align 8, !tbaa !11
  %49 = getelementptr inbounds double, ptr %47, i64 %48
  %50 = load double, ptr %49, align 8, !tbaa !13
  %51 = load ptr, ptr %13, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %51, i32 0, i32 4
  %53 = load ptr, ptr %52, align 8, !tbaa !15
  %54 = load i64, ptr %17, align 8, !tbaa !11
  %55 = load i64, ptr %11, align 8, !tbaa !11
  %56 = sub nsw i64 %54, %55
  %57 = add nsw i64 %56, 1
  %58 = getelementptr inbounds double, ptr %53, i64 %57
  %59 = load double, ptr %58, align 8, !tbaa !13
  %60 = fmul double %50, %59
  %61 = load ptr, ptr %15, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %61, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !15
  %64 = load i64, ptr %17, align 8, !tbaa !11
  %65 = load i64, ptr %11, align 8, !tbaa !11
  %66 = sub nsw i64 %64, %65
  %67 = add nsw i64 %66, 1
  %68 = getelementptr inbounds double, ptr %63, i64 %67
  store double %60, ptr %68, align 8, !tbaa !13
  br label %69

69:                                               ; preds = %41
  %70 = load i64, ptr %17, align 8, !tbaa !11
  %71 = add nsw i64 %70, 1
  store i64 %71, ptr %17, align 8, !tbaa !11
  br label %37, !llvm.loop !16

72:                                               ; preds = %37
  %73 = load i8, ptr %10, align 1, !tbaa !9, !range !18, !noundef !19
  %74 = trunc i8 %73 to i1
  br i1 %74, label %75, label %165

75:                                               ; preds = %72
  %76 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %76, ptr %17, align 8, !tbaa !11
  br label %77

77:                                               ; preds = %161, %75
  %78 = load i64, ptr %17, align 8, !tbaa !11
  %79 = load i64, ptr %12, align 8, !tbaa !11
  %80 = sub nsw i64 %79, 1
  %81 = icmp sle i64 %78, %80
  br i1 %81, label %82, label %164

82:                                               ; preds = %77
  %83 = load ptr, ptr %13, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %83, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !15
  %86 = load i64, ptr %17, align 8, !tbaa !11
  %87 = load i64, ptr %11, align 8, !tbaa !11
  %88 = sub nsw i64 %86, %87
  %89 = add nsw i64 %88, 1
  %90 = getelementptr inbounds double, ptr %85, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !13
  store double %91, ptr %25, align 8, !tbaa !13
  %92 = load i64, ptr %17, align 8, !tbaa !11
  %93 = load i64, ptr %11, align 8, !tbaa !11
  %94 = sub nsw i64 %92, %93
  %95 = add nsw i64 %94, 2
  store i64 %95, ptr %20, align 8, !tbaa !11
  %96 = load i64, ptr %24, align 8, !tbaa !11
  store i64 %96, ptr %21, align 8, !tbaa !11
  %97 = load i64, ptr %17, align 8, !tbaa !11
  %98 = add nsw i64 %97, 1
  store i64 %98, ptr %18, align 8, !tbaa !11
  %99 = load i64, ptr %12, align 8, !tbaa !11
  store i64 %99, ptr %19, align 8, !tbaa !11
  %100 = load ptr, ptr %15, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %100, i32 0, i32 4
  %102 = load ptr, ptr %101, align 8, !tbaa !15
  %103 = load i64, ptr %20, align 8, !tbaa !11
  %104 = getelementptr inbounds double, ptr %102, i64 %103
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %105, i32 0, i32 6
  %107 = load ptr, ptr %106, align 8, !tbaa !15
  %108 = load i64, ptr %17, align 8, !tbaa !11
  %109 = getelementptr inbounds ptr, ptr %107, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  %111 = load i64, ptr %18, align 8, !tbaa !11
  %112 = getelementptr inbounds double, ptr %110, i64 %111
  %113 = load i64, ptr %20, align 8, !tbaa !11
  %114 = load i64, ptr %21, align 8, !tbaa !11
  %115 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %113, i64 noundef %114)
  %116 = load double, ptr %25, align 8, !tbaa !13
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %104, i64 noundef 1, ptr noundef %112, i64 noundef 1, i64 noundef %115, double noundef %116)
  %117 = load i64, ptr %17, align 8, !tbaa !11
  %118 = load i64, ptr %11, align 8, !tbaa !11
  %119 = sub nsw i64 %117, %118
  %120 = add nsw i64 %119, 2
  store i64 %120, ptr %22, align 8, !tbaa !11
  %121 = load i64, ptr %24, align 8, !tbaa !11
  store i64 %121, ptr %23, align 8, !tbaa !11
  %122 = load i64, ptr %17, align 8, !tbaa !11
  %123 = add nsw i64 %122, 1
  store i64 %123, ptr %18, align 8, !tbaa !11
  %124 = load i64, ptr %12, align 8, !tbaa !11
  store i64 %124, ptr %19, align 8, !tbaa !11
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %125, i32 0, i32 4
  %127 = load ptr, ptr %126, align 8, !tbaa !15
  %128 = load i64, ptr %22, align 8, !tbaa !11
  %129 = getelementptr inbounds double, ptr %127, i64 %128
  %130 = load ptr, ptr %9, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %130, i32 0, i32 6
  %132 = load ptr, ptr %131, align 8, !tbaa !15
  %133 = load i64, ptr %17, align 8, !tbaa !11
  %134 = getelementptr inbounds ptr, ptr %132, i64 %133
  %135 = load ptr, ptr %134, align 8, !tbaa !5
  %136 = load i64, ptr %18, align 8, !tbaa !11
  %137 = getelementptr inbounds double, ptr %135, i64 %136
  %138 = load i64, ptr %22, align 8, !tbaa !11
  %139 = load i64, ptr %23, align 8, !tbaa !11
  %140 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %138, i64 noundef %139)
  %141 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %129, i64 noundef 1, ptr noundef %137, i64 noundef 1, i64 noundef %140)
  store double %141, ptr %25, align 8, !tbaa !13
  %142 = load ptr, ptr %15, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %142, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !15
  %145 = load i64, ptr %17, align 8, !tbaa !11
  %146 = load i64, ptr %11, align 8, !tbaa !11
  %147 = sub nsw i64 %145, %146
  %148 = add nsw i64 %147, 1
  %149 = getelementptr inbounds double, ptr %144, i64 %148
  %150 = load double, ptr %149, align 8, !tbaa !13
  %151 = load double, ptr %25, align 8, !tbaa !13
  %152 = fadd double %150, %151
  %153 = load ptr, ptr %15, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %153, i32 0, i32 4
  %155 = load ptr, ptr %154, align 8, !tbaa !15
  %156 = load i64, ptr %17, align 8, !tbaa !11
  %157 = load i64, ptr %11, align 8, !tbaa !11
  %158 = sub nsw i64 %156, %157
  %159 = add nsw i64 %158, 1
  %160 = getelementptr inbounds double, ptr %155, i64 %159
  store double %152, ptr %160, align 8, !tbaa !13
  br label %161

161:                                              ; preds = %82
  %162 = load i64, ptr %17, align 8, !tbaa !11
  %163 = add nsw i64 %162, 1
  store i64 %163, ptr %17, align 8, !tbaa !11
  br label %77, !llvm.loop !20

164:                                              ; preds = %77
  br label %251

165:                                              ; preds = %72
  %166 = load i64, ptr %11, align 8, !tbaa !11
  %167 = add nsw i64 %166, 1
  store i64 %167, ptr %17, align 8, !tbaa !11
  br label %168

168:                                              ; preds = %247, %165
  %169 = load i64, ptr %17, align 8, !tbaa !11
  %170 = load i64, ptr %12, align 8, !tbaa !11
  %171 = icmp sle i64 %169, %170
  br i1 %171, label %172, label %250

172:                                              ; preds = %168
  store i64 1, ptr %22, align 8, !tbaa !11
  %173 = load i64, ptr %17, align 8, !tbaa !11
  %174 = load i64, ptr %11, align 8, !tbaa !11
  %175 = sub nsw i64 %173, %174
  store i64 %175, ptr %23, align 8, !tbaa !11
  %176 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %176, ptr %18, align 8, !tbaa !11
  %177 = load i64, ptr %17, align 8, !tbaa !11
  %178 = sub nsw i64 %177, 1
  store i64 %178, ptr %19, align 8, !tbaa !11
  %179 = load ptr, ptr %13, align 8, !tbaa !5
  %180 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %179, i32 0, i32 4
  %181 = load ptr, ptr %180, align 8, !tbaa !15
  %182 = load i64, ptr %22, align 8, !tbaa !11
  %183 = getelementptr inbounds double, ptr %181, i64 %182
  %184 = load ptr, ptr %9, align 8, !tbaa !5
  %185 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %184, i32 0, i32 6
  %186 = load ptr, ptr %185, align 8, !tbaa !15
  %187 = load i64, ptr %17, align 8, !tbaa !11
  %188 = getelementptr inbounds ptr, ptr %186, i64 %187
  %189 = load ptr, ptr %188, align 8, !tbaa !5
  %190 = load i64, ptr %18, align 8, !tbaa !11
  %191 = getelementptr inbounds double, ptr %189, i64 %190
  %192 = load i64, ptr %22, align 8, !tbaa !11
  %193 = load i64, ptr %23, align 8, !tbaa !11
  %194 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %192, i64 noundef %193)
  %195 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %183, i64 noundef 1, ptr noundef %191, i64 noundef 1, i64 noundef %194)
  store double %195, ptr %25, align 8, !tbaa !13
  %196 = load ptr, ptr %15, align 8, !tbaa !5
  %197 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %196, i32 0, i32 4
  %198 = load ptr, ptr %197, align 8, !tbaa !15
  %199 = load i64, ptr %17, align 8, !tbaa !11
  %200 = load i64, ptr %11, align 8, !tbaa !11
  %201 = sub nsw i64 %199, %200
  %202 = add nsw i64 %201, 1
  %203 = getelementptr inbounds double, ptr %198, i64 %202
  %204 = load double, ptr %203, align 8, !tbaa !13
  %205 = load double, ptr %25, align 8, !tbaa !13
  %206 = fadd double %204, %205
  %207 = load ptr, ptr %15, align 8, !tbaa !5
  %208 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %207, i32 0, i32 4
  %209 = load ptr, ptr %208, align 8, !tbaa !15
  %210 = load i64, ptr %17, align 8, !tbaa !11
  %211 = load i64, ptr %11, align 8, !tbaa !11
  %212 = sub nsw i64 %210, %211
  %213 = add nsw i64 %212, 1
  %214 = getelementptr inbounds double, ptr %209, i64 %213
  store double %206, ptr %214, align 8, !tbaa !13
  %215 = load ptr, ptr %13, align 8, !tbaa !5
  %216 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %215, i32 0, i32 4
  %217 = load ptr, ptr %216, align 8, !tbaa !15
  %218 = load i64, ptr %17, align 8, !tbaa !11
  %219 = load i64, ptr %11, align 8, !tbaa !11
  %220 = sub nsw i64 %218, %219
  %221 = add nsw i64 %220, 1
  %222 = getelementptr inbounds double, ptr %217, i64 %221
  %223 = load double, ptr %222, align 8, !tbaa !13
  store double %223, ptr %25, align 8, !tbaa !13
  store i64 1, ptr %20, align 8, !tbaa !11
  %224 = load i64, ptr %17, align 8, !tbaa !11
  %225 = load i64, ptr %11, align 8, !tbaa !11
  %226 = sub nsw i64 %224, %225
  store i64 %226, ptr %21, align 8, !tbaa !11
  %227 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %227, ptr %18, align 8, !tbaa !11
  %228 = load i64, ptr %17, align 8, !tbaa !11
  %229 = sub nsw i64 %228, 1
  store i64 %229, ptr %19, align 8, !tbaa !11
  %230 = load ptr, ptr %15, align 8, !tbaa !5
  %231 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %230, i32 0, i32 4
  %232 = load ptr, ptr %231, align 8, !tbaa !15
  %233 = load i64, ptr %20, align 8, !tbaa !11
  %234 = getelementptr inbounds double, ptr %232, i64 %233
  %235 = load ptr, ptr %9, align 8, !tbaa !5
  %236 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %235, i32 0, i32 6
  %237 = load ptr, ptr %236, align 8, !tbaa !15
  %238 = load i64, ptr %17, align 8, !tbaa !11
  %239 = getelementptr inbounds ptr, ptr %237, i64 %238
  %240 = load ptr, ptr %239, align 8, !tbaa !5
  %241 = load i64, ptr %18, align 8, !tbaa !11
  %242 = getelementptr inbounds double, ptr %240, i64 %241
  %243 = load i64, ptr %20, align 8, !tbaa !11
  %244 = load i64, ptr %21, align 8, !tbaa !11
  %245 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %243, i64 noundef %244)
  %246 = load double, ptr %25, align 8, !tbaa !13
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %234, i64 noundef 1, ptr noundef %242, i64 noundef 1, i64 noundef %245, double noundef %246)
  br label %247

247:                                              ; preds = %172
  %248 = load i64, ptr %17, align 8, !tbaa !11
  %249 = add nsw i64 %248, 1
  store i64 %249, ptr %17, align 8, !tbaa !11
  br label %168, !llvm.loop !21

250:                                              ; preds = %168
  br label %251

251:                                              ; preds = %250, %164
  %252 = load ptr, ptr %15, align 8, !tbaa !5
  %253 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %252, i32 0, i32 4
  %254 = load ptr, ptr %253, align 8, !tbaa !15
  %255 = getelementptr inbounds double, ptr %254, i64 1
  %256 = load i64, ptr %24, align 8, !tbaa !11
  %257 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %256)
  %258 = load double, ptr %14, align 8, !tbaa !13
  call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef %255, i64 noundef 1, i64 noundef %257, double noundef %258)
  %259 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl8touchintEPlPNS_8ae_stateE(ptr noundef %19, ptr noundef %259)
  store i32 0, ptr %26, align 4
  br label %260

260:                                              ; preds = %251, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  %261 = load i32, ptr %26, align 4
  switch i32 %261, label %263 [
    i32 0, label %262
    i32 1, label %262
  ]

262:                                              ; preds = %260, %260
  ret void

263:                                              ; preds = %260
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}


; 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"

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

declare noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl29symmetricmatrixvectormultiplyEPNS_9ae_matrixEbllPNS_9ae_vectorEdS3_PNS_8ae_stateE(ptr nocapture noundef readonly %0, i1 noundef zeroext %1, i64 noundef %2, i64 noundef %3, ptr nocapture noundef readonly %4, double noundef %5, ptr nocapture noundef readonly %6, ptr noundef %7) local_unnamed_addr #3 {
  %9 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %10 = sub nsw i64 %3, %2
  %11 = add nsw i64 %10, 1
  %12 = icmp slt i64 %10, 0
  br i1 %12, label %121, label %.preheader102

.preheader102:                                    ; preds = %8
  %.not103 = icmp sgt i64 %2, %3
  br i1 %.not103, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader102
  %13 = getelementptr inbounds i8, ptr %0, i64 72
  %14 = getelementptr inbounds i8, ptr %4, i64 56
  %15 = getelementptr inbounds i8, ptr %6, i64 56
  %16 = add i64 %3, %2
  %17 = and i64 %16, 1
  %lcmp.mod.not.not = icmp eq i64 %17, 0
  br i1 %lcmp.mod.not.not, label %.prol.loopexit.unr-lcssa, label %.prol.loopexit

.prol.loopexit.unr-lcssa:                         ; preds = %.lr.ph
  %18 = load ptr, ptr %13, align 8, !tbaa !5
  %19 = getelementptr inbounds ptr, ptr %18, i64 %2
  %20 = load ptr, ptr %19, align 8, !tbaa !8
  %21 = getelementptr inbounds double, ptr %20, i64 %2
  %22 = load double, ptr %21, align 8, !tbaa !10
  %23 = load ptr, ptr %14, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = load double, ptr %24, align 8, !tbaa !10
  %26 = fmul double %22, %25
  %27 = load ptr, ptr %15, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  store double %26, ptr %28, align 8, !tbaa !10
  %29 = add i64 %2, 1
  br label %.prol.loopexit

.prol.loopexit:                                   ; preds = %.prol.loopexit.unr-lcssa, %.lr.ph
  %.0104.unr = phi i64 [ %2, %.lr.ph ], [ %29, %.prol.loopexit.unr-lcssa ]
  %30 = icmp eq i64 %3, %2
  br i1 %30, label %._crit_edge, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.prol.loopexit, %.lr.ph.new
  %.0104 = phi i64 [ %58, %.lr.ph.new ], [ %.0104.unr, %.prol.loopexit ]
  %31 = load ptr, ptr %13, align 8, !tbaa !5
  %32 = getelementptr inbounds ptr, ptr %31, i64 %.0104
  %33 = load ptr, ptr %32, align 8, !tbaa !8
  %34 = getelementptr inbounds double, ptr %33, i64 %.0104
  %35 = load double, ptr %34, align 8, !tbaa !10
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  %37 = sub nsw i64 %.0104, %2
  %38 = add nsw i64 %37, 1
  %39 = getelementptr inbounds double, ptr %36, i64 %38
  %40 = load double, ptr %39, align 8, !tbaa !10
  %41 = fmul double %35, %40
  %42 = load ptr, ptr %15, align 8, !tbaa !5
  %43 = getelementptr inbounds double, ptr %42, i64 %38
  store double %41, ptr %43, align 8, !tbaa !10
  %44 = add i64 %.0104, 1
  %45 = load ptr, ptr %13, align 8, !tbaa !5
  %46 = getelementptr inbounds ptr, ptr %45, i64 %44
  %47 = load ptr, ptr %46, align 8, !tbaa !8
  %48 = getelementptr inbounds double, ptr %47, i64 %44
  %49 = load double, ptr %48, align 8, !tbaa !10
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  %51 = sub nsw i64 %44, %2
  %52 = add nsw i64 %51, 1
  %53 = getelementptr inbounds double, ptr %50, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !10
  %55 = fmul double %49, %54
  %56 = load ptr, ptr %15, align 8, !tbaa !5
  %57 = getelementptr inbounds double, ptr %56, i64 %52
  store double %55, ptr %57, align 8, !tbaa !10
  %58 = add i64 %.0104, 2
  %exitcond.not.1 = icmp eq i64 %44, %3
  br i1 %exitcond.not.1, label %._crit_edge, label %.lr.ph.new, !llvm.loop !12

._crit_edge:                                      ; preds = %.prol.loopexit, %.lr.ph.new, %.preheader102
  %.not99.not110 = icmp slt i64 %2, %3
  br i1 %1, label %.preheader, label %.preheader100

.preheader100:                                    ; preds = %._crit_edge
  br i1 %.not99.not110, label %.lr.ph108, label %.loopexit

.lr.ph108:                                        ; preds = %.preheader100
  %59 = getelementptr inbounds i8, ptr %4, i64 56
  %60 = getelementptr inbounds i8, ptr %0, i64 72
  %61 = getelementptr inbounds i8, ptr %6, i64 56
  br label %92

.preheader:                                       ; preds = %._crit_edge
  br i1 %.not99.not110, label %.lr.ph112, label %.loopexit

.lr.ph112:                                        ; preds = %.preheader
  %62 = getelementptr inbounds i8, ptr %4, i64 56
  %63 = getelementptr inbounds i8, ptr %6, i64 56
  %64 = getelementptr inbounds i8, ptr %0, i64 72
  br label %65

65:                                               ; preds = %.lr.ph112, %65
  %.1111 = phi i64 [ %2, %.lr.ph112 ], [ %72, %65 ]
  %66 = load ptr, ptr %62, align 8, !tbaa !5
  %67 = sub nsw i64 %.1111, %2
  %68 = add nsw i64 %67, 1
  %69 = getelementptr inbounds double, ptr %66, i64 %68
  %70 = load double, ptr %69, align 8, !tbaa !10
  %71 = add nsw i64 %67, 2
  %72 = add i64 %.1111, 1
  %73 = load ptr, ptr %63, align 8, !tbaa !5
  %74 = getelementptr inbounds double, ptr %73, i64 %71
  %75 = load ptr, ptr %64, align 8, !tbaa !5
  %76 = getelementptr inbounds ptr, ptr %75, i64 %.1111
  %77 = load ptr, ptr %76, align 8, !tbaa !8
  %78 = getelementptr inbounds double, ptr %77, i64 %72
  %79 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %71, i64 noundef %11)
  tail call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %74, i64 noundef 1, ptr noundef %78, i64 noundef 1, i64 noundef %79, double noundef %70)
  %80 = load ptr, ptr %62, align 8, !tbaa !5
  %81 = getelementptr inbounds double, ptr %80, i64 %71
  %82 = load ptr, ptr %64, align 8, !tbaa !5
  %83 = getelementptr inbounds ptr, ptr %82, i64 %.1111
  %84 = load ptr, ptr %83, align 8, !tbaa !8
  %85 = getelementptr inbounds double, ptr %84, i64 %72
  %86 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %71, i64 noundef %11)
  %87 = tail call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %81, i64 noundef 1, ptr noundef %85, i64 noundef 1, i64 noundef %86)
  %88 = load ptr, ptr %63, align 8, !tbaa !5
  %89 = getelementptr inbounds double, ptr %88, i64 %68
  %90 = load double, ptr %89, align 8, !tbaa !10
  %91 = fadd double %87, %90
  store double %91, ptr %89, align 8, !tbaa !10
  %exitcond115.not = icmp eq i64 %72, %3
  br i1 %exitcond115.not, label %.loopexit, label %65, !llvm.loop !14

92:                                               ; preds = %.lr.ph108, %92
  %.2.in107 = phi i64 [ %2, %.lr.ph108 ], [ %.2, %92 ]
  %.2 = add nsw i64 %.2.in107, 1
  %93 = sub nsw i64 %.2, %2
  %94 = load ptr, ptr %59, align 8, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %94, i64 8
  %96 = load ptr, ptr %60, align 8, !tbaa !5
  %97 = getelementptr inbounds ptr, ptr %96, i64 %.2
  %98 = load ptr, ptr %97, align 8, !tbaa !8
  %99 = getelementptr inbounds double, ptr %98, i64 %2
  %100 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %93)
  %101 = tail call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef nonnull %95, i64 noundef 1, ptr noundef %99, i64 noundef 1, i64 noundef %100)
  %102 = load ptr, ptr %61, align 8, !tbaa !5
  %103 = add nsw i64 %93, 1
  %104 = getelementptr inbounds double, ptr %102, i64 %103
  %105 = load double, ptr %104, align 8, !tbaa !10
  %106 = fadd double %101, %105
  store double %106, ptr %104, align 8, !tbaa !10
  %107 = load ptr, ptr %59, align 8, !tbaa !5
  %108 = getelementptr inbounds double, ptr %107, i64 %103
  %109 = load double, ptr %108, align 8, !tbaa !10
  %110 = load ptr, ptr %61, align 8, !tbaa !5
  %111 = getelementptr inbounds i8, ptr %110, i64 8
  %112 = load ptr, ptr %60, align 8, !tbaa !5
  %113 = getelementptr inbounds ptr, ptr %112, i64 %.2
  %114 = load ptr, ptr %113, align 8, !tbaa !8
  %115 = getelementptr inbounds double, ptr %114, i64 %2
  %116 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %93)
  tail call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef nonnull %111, i64 noundef 1, ptr noundef %115, i64 noundef 1, i64 noundef %116, double noundef %109)
  %exitcond114.not = icmp eq i64 %.2, %3
  br i1 %exitcond114.not, label %.loopexit, label %92, !llvm.loop !15

.loopexit:                                        ; preds = %92, %65, %.preheader100, %.preheader
  %storemerge = phi i64 [ %3, %.preheader ], [ undef, %.preheader100 ], [ %3, %65 ], [ %.2.in107, %92 ]
  store i64 %storemerge, ptr %9, align 8, !tbaa !16
  %117 = getelementptr inbounds i8, ptr %6, i64 56
  %118 = load ptr, ptr %117, align 8, !tbaa !5
  %119 = getelementptr inbounds i8, ptr %118, i64 8
  %120 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %11)
  tail call void @_ZN11alglib_impl9ae_v_muldEPdlld(ptr noundef nonnull %119, i64 noundef 1, i64 noundef %120, double noundef %5)
  call void @_ZN11alglib_impl8touchintEPlPNS_8ae_stateE(ptr noundef nonnull %9, ptr noundef %7)
  br label %121

121:                                              ; preds = %8, %.loopexit
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !6, i64 0}


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