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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl10smatrixevdEPKNS_9ae_matrixEllbPNS_9ae_vectorEPS0_PNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl11smatrixgevdEPKNS_9ae_matrixElbS2_bllPNS_9ae_vectorEPS0_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, i1 noundef zeroext %4, i64 noundef %5, i64 noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) #2 {
  %11 = alloca i1, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i8, align 1
  %15 = alloca ptr, align 8
  %16 = alloca i8, align 1
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %"struct.alglib_impl::ae_frame", align 8
  %23 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %24 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %25 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %26 = alloca i8, align 1
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca double, align 8
  %34 = alloca i8, align 1
  %35 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store i64 %1, ptr %13, align 8, !tbaa !9
  %36 = zext i1 %2 to i8
  store i8 %36, ptr %14, align 1, !tbaa !11
  store ptr %3, ptr %15, align 8, !tbaa !5
  %37 = zext i1 %4 to i8
  store i8 %37, ptr %16, align 1, !tbaa !11
  store i64 %5, ptr %17, align 8, !tbaa !9
  store i64 %6, ptr %18, align 8, !tbaa !9
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #4
  %38 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %38, ptr noundef %22)
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %24, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %25, i8 0, i64 80, i1 false)
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  %40 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef %23, ptr noundef %39, ptr noundef %40, i1 noundef zeroext true)
  %41 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %41)
  %42 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %42)
  %43 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %24, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %43, i1 noundef zeroext true)
  %44 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %25, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %44, i1 noundef zeroext true)
  %45 = load i64, ptr %13, align 8, !tbaa !9
  %46 = load i8, ptr %14, align 1, !tbaa !11, !range !13, !noundef !14
  %47 = trunc i8 %46 to i1
  %48 = load ptr, ptr %15, align 8, !tbaa !5
  %49 = load i8, ptr %16, align 1, !tbaa !11, !range !13, !noundef !14
  %50 = trunc i8 %49 to i1
  %51 = load i64, ptr %18, align 8, !tbaa !9
  %52 = load ptr, ptr %21, align 8, !tbaa !5
  %53 = call noundef zeroext i1 @_ZN11alglib_impl17smatrixgevdreduceEPNS_9ae_matrixElbPKS0_blS1_PbPNS_8ae_stateE(ptr noundef %23, i64 noundef %45, i1 noundef zeroext %47, ptr noundef %48, i1 noundef zeroext %50, i64 noundef %51, ptr noundef %24, ptr noundef %26, ptr noundef %52)
  %54 = zext i1 %53 to i8
  store i8 %54, ptr %34, align 1, !tbaa !11
  %55 = load i8, ptr %34, align 1, !tbaa !11, !range !13, !noundef !14
  %56 = trunc i8 %55 to i1
  br i1 %56, label %61, label %57

57:                                               ; preds = %10
  %58 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %58)
  %59 = load i8, ptr %34, align 1, !tbaa !11, !range !13, !noundef !14
  %60 = trunc i8 %59 to i1
  store i1 %60, ptr %11, align 1
  store i32 1, ptr %35, align 4
  br label %193

61:                                               ; preds = %10
  %62 = load i64, ptr %13, align 8, !tbaa !9
  %63 = load i64, ptr %17, align 8, !tbaa !9
  %64 = load i8, ptr %14, align 1, !tbaa !11, !range !13, !noundef !14
  %65 = trunc i8 %64 to i1
  %66 = load ptr, ptr %19, align 8, !tbaa !5
  %67 = load ptr, ptr %21, align 8, !tbaa !5
  %68 = call noundef zeroext i1 @_ZN11alglib_impl10smatrixevdEPKNS_9ae_matrixEllbPNS_9ae_vectorEPS0_PNS_8ae_stateE(ptr noundef %23, i64 noundef %62, i64 noundef %63, i1 noundef zeroext %65, ptr noundef %66, ptr noundef %25, ptr noundef %67)
  %69 = zext i1 %68 to i8
  store i8 %69, ptr %34, align 1, !tbaa !11
  %70 = load i8, ptr %34, align 1, !tbaa !11, !range !13, !noundef !14
  %71 = trunc i8 %70 to i1
  br i1 %71, label %76, label %72

72:                                               ; preds = %61
  %73 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %73)
  %74 = load i8, ptr %34, align 1, !tbaa !11, !range !13, !noundef !14
  %75 = trunc i8 %74 to i1
  store i1 %75, ptr %11, align 1
  store i32 1, ptr %35, align 4
  br label %193

76:                                               ; preds = %61
  %77 = load i64, ptr %17, align 8, !tbaa !9
  %78 = icmp ne i64 %77, 0
  br i1 %78, label %79, label %189

79:                                               ; preds = %76
  %80 = load ptr, ptr %20, align 8, !tbaa !5
  %81 = load i64, ptr %13, align 8, !tbaa !9
  %82 = sub nsw i64 %81, 1
  %83 = add nsw i64 %82, 1
  %84 = load i64, ptr %13, align 8, !tbaa !9
  %85 = sub nsw i64 %84, 1
  %86 = add nsw i64 %85, 1
  %87 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %80, i64 noundef %83, i64 noundef %86, ptr noundef %87)
  store i64 0, ptr %32, align 8, !tbaa !9
  br label %88

88:                                               ; preds = %101, %79
  %89 = load i64, ptr %32, align 8, !tbaa !9
  %90 = load i64, ptr %13, align 8, !tbaa !9
  %91 = sub nsw i64 %90, 1
  %92 = icmp sle i64 %89, %91
  br i1 %92, label %93, label %104

93:                                               ; preds = %88
  %94 = load ptr, ptr %20, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %94, i32 0, i32 6
  %96 = load ptr, ptr %95, align 8, !tbaa !15
  %97 = getelementptr inbounds ptr, ptr %96, i64 0
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = load i64, ptr %32, align 8, !tbaa !9
  %100 = getelementptr inbounds double, ptr %98, i64 %99
  store double 0.000000e+00, ptr %100, align 8, !tbaa !16
  br label %101

101:                                              ; preds = %93
  %102 = load i64, ptr %32, align 8, !tbaa !9
  %103 = add nsw i64 %102, 1
  store i64 %103, ptr %32, align 8, !tbaa !9
  br label %88, !llvm.loop !18

104:                                              ; preds = %88
  store i64 1, ptr %31, align 8, !tbaa !9
  br label %105

105:                                              ; preds = %127, %104
  %106 = load i64, ptr %31, align 8, !tbaa !9
  %107 = load i64, ptr %13, align 8, !tbaa !9
  %108 = sub nsw i64 %107, 1
  %109 = icmp sle i64 %106, %108
  br i1 %109, label %110, label %130

110:                                              ; preds = %105
  %111 = load ptr, ptr %20, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %111, i32 0, i32 6
  %113 = load ptr, ptr %112, align 8, !tbaa !15
  %114 = load i64, ptr %31, align 8, !tbaa !9
  %115 = getelementptr inbounds ptr, ptr %113, i64 %114
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = getelementptr inbounds double, ptr %116, i64 0
  %118 = load ptr, ptr %20, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %118, i32 0, i32 6
  %120 = load ptr, ptr %119, align 8, !tbaa !15
  %121 = getelementptr inbounds ptr, ptr %120, i64 0
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  %123 = getelementptr inbounds double, ptr %122, i64 0
  %124 = load i64, ptr %13, align 8, !tbaa !9
  %125 = sub nsw i64 %124, 1
  %126 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %125)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %117, i64 noundef 1, ptr noundef %123, i64 noundef 1, i64 noundef %126)
  br label %127

127:                                              ; preds = %110
  %128 = load i64, ptr %31, align 8, !tbaa !9
  %129 = add nsw i64 %128, 1
  store i64 %129, ptr %31, align 8, !tbaa !9
  br label %105, !llvm.loop !20

130:                                              ; preds = %105
  %131 = load i8, ptr %26, align 1, !tbaa !11, !range !13, !noundef !14
  %132 = trunc i8 %131 to i1
  br i1 %132, label %133, label %136

133:                                              ; preds = %130
  store i64 0, ptr %27, align 8, !tbaa !9
  %134 = load i64, ptr %13, align 8, !tbaa !9
  %135 = sub nsw i64 %134, 1
  store i64 %135, ptr %28, align 8, !tbaa !9
  store i64 1, ptr %29, align 8, !tbaa !9
  store i64 0, ptr %30, align 8, !tbaa !9
  br label %137

136:                                              ; preds = %130
  store i64 0, ptr %27, align 8, !tbaa !9
  store i64 0, ptr %28, align 8, !tbaa !9
  store i64 0, ptr %29, align 8, !tbaa !9
  store i64 1, ptr %30, align 8, !tbaa !9
  br label %137

137:                                              ; preds = %136, %133
  store i64 0, ptr %31, align 8, !tbaa !9
  br label %138

138:                                              ; preds = %185, %137
  %139 = load i64, ptr %31, align 8, !tbaa !9
  %140 = load i64, ptr %13, align 8, !tbaa !9
  %141 = sub nsw i64 %140, 1
  %142 = icmp sle i64 %139, %141
  br i1 %142, label %143, label %188

143:                                              ; preds = %138
  %144 = load i64, ptr %27, align 8, !tbaa !9
  store i64 %144, ptr %32, align 8, !tbaa !9
  br label %145

145:                                              ; preds = %175, %143
  %146 = load i64, ptr %32, align 8, !tbaa !9
  %147 = load i64, ptr %28, align 8, !tbaa !9
  %148 = icmp sle i64 %146, %147
  br i1 %148, label %149, label %178

149:                                              ; preds = %145
  %150 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %24, i32 0, i32 6
  %151 = load ptr, ptr %150, align 8, !tbaa !15
  %152 = load i64, ptr %31, align 8, !tbaa !9
  %153 = getelementptr inbounds ptr, ptr %151, i64 %152
  %154 = load ptr, ptr %153, align 8, !tbaa !5
  %155 = load i64, ptr %32, align 8, !tbaa !9
  %156 = getelementptr inbounds double, ptr %154, i64 %155
  %157 = load double, ptr %156, align 8, !tbaa !16
  store double %157, ptr %33, align 8, !tbaa !16
  %158 = load ptr, ptr %20, align 8, !tbaa !5
  %159 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %158, i32 0, i32 6
  %160 = load ptr, ptr %159, align 8, !tbaa !15
  %161 = load i64, ptr %31, align 8, !tbaa !9
  %162 = getelementptr inbounds ptr, ptr %160, i64 %161
  %163 = load ptr, ptr %162, align 8, !tbaa !5
  %164 = getelementptr inbounds double, ptr %163, i64 0
  %165 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %25, i32 0, i32 6
  %166 = load ptr, ptr %165, align 8, !tbaa !15
  %167 = load i64, ptr %32, align 8, !tbaa !9
  %168 = getelementptr inbounds ptr, ptr %166, i64 %167
  %169 = load ptr, ptr %168, align 8, !tbaa !5
  %170 = getelementptr inbounds double, ptr %169, i64 0
  %171 = load i64, ptr %13, align 8, !tbaa !9
  %172 = sub nsw i64 %171, 1
  %173 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %172)
  %174 = load double, ptr %33, align 8, !tbaa !16
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %164, i64 noundef 1, ptr noundef %170, i64 noundef 1, i64 noundef %173, double noundef %174)
  br label %175

175:                                              ; preds = %149
  %176 = load i64, ptr %32, align 8, !tbaa !9
  %177 = add nsw i64 %176, 1
  store i64 %177, ptr %32, align 8, !tbaa !9
  br label %145, !llvm.loop !21

178:                                              ; preds = %145
  %179 = load i64, ptr %27, align 8, !tbaa !9
  %180 = load i64, ptr %29, align 8, !tbaa !9
  %181 = add nsw i64 %179, %180
  store i64 %181, ptr %27, align 8, !tbaa !9
  %182 = load i64, ptr %28, align 8, !tbaa !9
  %183 = load i64, ptr %30, align 8, !tbaa !9
  %184 = add nsw i64 %182, %183
  store i64 %184, ptr %28, align 8, !tbaa !9
  br label %185

185:                                              ; preds = %178
  %186 = load i64, ptr %31, align 8, !tbaa !9
  %187 = add nsw i64 %186, 1
  store i64 %187, ptr %31, align 8, !tbaa !9
  br label %138, !llvm.loop !22

188:                                              ; preds = %138
  br label %189

189:                                              ; preds = %188, %76
  %190 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %190)
  %191 = load i8, ptr %34, align 1, !tbaa !11, !range !13, !noundef !14
  %192 = trunc i8 %191 to i1
  store i1 %192, ptr %11, align 1
  store i32 1, ptr %35, align 4
  br label %193

193:                                              ; preds = %189, %72, %57
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #4
  %194 = load i1, ptr %11, align 1
  ret i1 %194
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl17smatrixgevdreduceEPNS_9ae_matrixElbPKS0_blS1_PbPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, i64 noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

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

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #3

declare void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

declare void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) #3

declare void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { "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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}


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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl10smatrixevdEPKNS_9ae_matrixEllbPNS_9ae_vectorEPS0_PNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl11smatrixgevdEPKNS_9ae_matrixElbS2_bllPNS_9ae_vectorEPS0_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, i1 noundef zeroext %4, i64 noundef %5, i64 noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) local_unnamed_addr #2 {
  %11 = alloca %"struct.alglib_impl::ae_frame", align 8
  %12 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %13 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %14 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %15 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %9, ptr noundef nonnull %11)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %12, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %13, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %14, i8 0, i64 80, i1 false)
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %12, ptr noundef %0, ptr noundef %9, i1 noundef zeroext true)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %7)
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %8)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %13, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %9, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %14, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %9, i1 noundef zeroext true)
  %16 = call noundef zeroext i1 @_ZN11alglib_impl17smatrixgevdreduceEPNS_9ae_matrixElbPKS0_blS1_PbPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, i1 noundef zeroext %4, i64 noundef %6, ptr noundef nonnull %13, ptr noundef nonnull %15, ptr noundef %9)
  br i1 %16, label %17, label %.loopexit

17:                                               ; preds = %10
  %18 = call noundef zeroext i1 @_ZN11alglib_impl10smatrixevdEPKNS_9ae_matrixEllbPNS_9ae_vectorEPS0_PNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef %1, i64 noundef %5, i1 noundef zeroext %2, ptr noundef %7, ptr noundef nonnull %14, ptr noundef %9)
  br i1 %18, label %19, label %.loopexit

19:                                               ; preds = %17
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %.loopexit, label %20

20:                                               ; preds = %19
  %21 = add nsw i64 %1, -1
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %8, i64 noundef %1, i64 noundef %1, ptr noundef %9)
  %.not75.not82 = icmp sgt i64 %1, 0
  br i1 %.not75.not82, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %20
  %22 = getelementptr inbounds i8, ptr %8, i64 72
  %xtraiter = and i64 %1, 3
  %23 = icmp ult i64 %1, 4
  br i1 %23, label %.preheader81.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %1, 9223372036854775804
  br label %29

.preheader81.unr-lcssa:                           ; preds = %29, %.lr.ph
  %.06283.unr = phi i64 [ 0, %.lr.ph ], [ %45, %29 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader81, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader81.unr-lcssa, %.epil.preheader
  %.06283.epil = phi i64 [ %27, %.epil.preheader ], [ %.06283.unr, %.preheader81.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader81.unr-lcssa ]
  %24 = load ptr, ptr %22, align 8, !tbaa !5
  %25 = load ptr, ptr %24, align 8, !tbaa !8
  %26 = getelementptr inbounds double, ptr %25, i64 %.06283.epil
  store double 0.000000e+00, ptr %26, align 8, !tbaa !10
  %27 = add nuw nsw i64 %.06283.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader81, label %.epil.preheader, !llvm.loop !12

.preheader81:                                     ; preds = %.epil.preheader, %.preheader81.unr-lcssa
  %.not76.not84.not = icmp eq i64 %1, 1
  br i1 %.not76.not84.not, label %._crit_edge, label %.lr.ph86

.lr.ph86:                                         ; preds = %.preheader81
  %28 = getelementptr inbounds i8, ptr %8, i64 72
  br label %46

29:                                               ; preds = %29, %.lr.ph.new
  %.06283 = phi i64 [ 0, %.lr.ph.new ], [ %45, %29 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %29 ]
  %30 = load ptr, ptr %22, align 8, !tbaa !5
  %31 = load ptr, ptr %30, align 8, !tbaa !8
  %32 = getelementptr inbounds double, ptr %31, i64 %.06283
  store double 0.000000e+00, ptr %32, align 8, !tbaa !10
  %33 = or disjoint i64 %.06283, 1
  %34 = load ptr, ptr %22, align 8, !tbaa !5
  %35 = load ptr, ptr %34, align 8, !tbaa !8
  %36 = getelementptr inbounds double, ptr %35, i64 %33
  store double 0.000000e+00, ptr %36, align 8, !tbaa !10
  %37 = or disjoint i64 %.06283, 2
  %38 = load ptr, ptr %22, align 8, !tbaa !5
  %39 = load ptr, ptr %38, align 8, !tbaa !8
  %40 = getelementptr inbounds double, ptr %39, i64 %37
  store double 0.000000e+00, ptr %40, align 8, !tbaa !10
  %41 = or disjoint i64 %.06283, 3
  %42 = load ptr, ptr %22, align 8, !tbaa !5
  %43 = load ptr, ptr %42, align 8, !tbaa !8
  %44 = getelementptr inbounds double, ptr %43, i64 %41
  store double 0.000000e+00, ptr %44, align 8, !tbaa !10
  %45 = add nuw nsw i64 %.06283, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader81.unr-lcssa, label %29, !llvm.loop !14

46:                                               ; preds = %.lr.ph86, %46
  %.06385 = phi i64 [ 1, %.lr.ph86 ], [ %52, %46 ]
  %47 = load ptr, ptr %28, align 8, !tbaa !5
  %48 = getelementptr inbounds ptr, ptr %47, i64 %.06385
  %49 = load ptr, ptr %48, align 8, !tbaa !8
  %50 = load ptr, ptr %47, align 8, !tbaa !8
  %51 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %21)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %49, i64 noundef 1, ptr noundef %50, i64 noundef 1, i64 noundef %51)
  %52 = add nuw nsw i64 %.06385, 1
  %exitcond95.not = icmp eq i64 %52, %1
  br i1 %exitcond95.not, label %._crit_edge, label %46, !llvm.loop !16

._crit_edge:                                      ; preds = %46, %.preheader81
  %53 = load i8, ptr %15, align 1, !tbaa !17, !range !19, !noundef !20
  %54 = trunc nuw i8 %53 to i1
  %.79 = zext nneg i8 %53 to i64
  %not. = xor i1 %54, true
  %.80 = zext i1 %not. to i64
  br i1 %.not75.not82, label %.preheader.lr.ph, label %.loopexit

.preheader.lr.ph:                                 ; preds = %._crit_edge
  %. = select i1 %54, i64 %21, i64 0
  %55 = getelementptr inbounds i8, ptr %13, i64 72
  %56 = getelementptr inbounds i8, ptr %8, i64 72
  %57 = getelementptr inbounds i8, ptr %14, i64 72
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge90
  %.16494 = phi i64 [ 0, %.preheader.lr.ph ], [ %73, %._crit_edge90 ]
  %.16893 = phi i64 [ %., %.preheader.lr.ph ], [ %72, %._crit_edge90 ]
  %.17092 = phi i64 [ 0, %.preheader.lr.ph ], [ %71, %._crit_edge90 ]
  %.not7887 = icmp sgt i64 %.17092, %.16893
  br i1 %.not7887, label %._crit_edge90, label %.lr.ph89

.lr.ph89:                                         ; preds = %.preheader, %.lr.ph89
  %.188 = phi i64 [ %70, %.lr.ph89 ], [ %.17092, %.preheader ]
  %58 = load ptr, ptr %55, align 8, !tbaa !5
  %59 = getelementptr inbounds ptr, ptr %58, i64 %.16494
  %60 = load ptr, ptr %59, align 8, !tbaa !8
  %61 = getelementptr inbounds double, ptr %60, i64 %.188
  %62 = load double, ptr %61, align 8, !tbaa !10
  %63 = load ptr, ptr %56, align 8, !tbaa !5
  %64 = getelementptr inbounds ptr, ptr %63, i64 %.16494
  %65 = load ptr, ptr %64, align 8, !tbaa !8
  %66 = load ptr, ptr %57, align 8, !tbaa !5
  %67 = getelementptr inbounds ptr, ptr %66, i64 %.188
  %68 = load ptr, ptr %67, align 8, !tbaa !8
  %69 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %21)
  call void @_ZN11alglib_impl9ae_v_adddEPdlPKdlld(ptr noundef %65, i64 noundef 1, ptr noundef %68, i64 noundef 1, i64 noundef %69, double noundef %62)
  %70 = add nuw nsw i64 %.188, 1
  %.not78.not = icmp slt i64 %.188, %.16893
  br i1 %.not78.not, label %.lr.ph89, label %._crit_edge90, !llvm.loop !21

._crit_edge90:                                    ; preds = %.lr.ph89, %.preheader
  %71 = add nuw nsw i64 %.17092, %.79
  %72 = add nsw i64 %.16893, %.80
  %73 = add nuw nsw i64 %.16494, 1
  %exitcond96.not = icmp eq i64 %73, %1
  br i1 %exitcond96.not, label %.loopexit, label %.preheader, !llvm.loop !22

.loopexit:                                        ; preds = %._crit_edge90, %19, %._crit_edge, %20, %17, %10
  %.0 = phi i1 [ false, %10 ], [ false, %17 ], [ true, %20 ], [ true, %._crit_edge ], [ true, %19 ], [ true, %._crit_edge90 ]
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %9)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  ret i1 %.0
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl17smatrixgevdreduceEPNS_9ae_matrixElbPKS0_blS1_PbPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { "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.unroll.disable"}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !6, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}


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