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

; 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_complex" = type { double, double }
%"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.124 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.200 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.201 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.202 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.203 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.204 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.205 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.206 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.207 = external hidden unnamed_addr constant [58 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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl19cmatrixlusolvemfastEPKNS_9ae_matrixEPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5) #2 {
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.alglib_impl::ae_complex", align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i8, align 1
  %19 = alloca %"struct.alglib_impl::ae_complex", align 8
  %20 = alloca %"struct.alglib_impl::ae_complex", align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i64 %2, ptr %10, align 8, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i64 %4, ptr %12, align 8, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #4
  %22 = load i64, ptr %10, align 8, !tbaa !9
  %23 = icmp sgt i64 %22, 0
  %24 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %23, ptr noundef @.str.200, ptr noundef %24)
  %25 = load i64, ptr %12, align 8, !tbaa !9
  %26 = icmp sgt i64 %25, 0
  %27 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %26, ptr noundef @.str.201, ptr noundef %27)
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %28, i32 0, i32 0
  %30 = load i64, ptr %29, align 8, !tbaa !11
  %31 = load i64, ptr %10, align 8, !tbaa !9
  %32 = icmp sge i64 %30, %31
  %33 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %32, ptr noundef @.str.202, ptr noundef %33)
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %34, i32 0, i32 1
  %36 = load i64, ptr %35, align 8, !tbaa !15
  %37 = load i64, ptr %10, align 8, !tbaa !9
  %38 = icmp sge i64 %36, %37
  %39 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %38, ptr noundef @.str.203, ptr noundef %39)
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %40, i32 0, i32 0
  %42 = load i64, ptr %41, align 8, !tbaa !16
  %43 = load i64, ptr %10, align 8, !tbaa !9
  %44 = icmp sge i64 %42, %43
  %45 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %44, ptr noundef @.str.204, ptr noundef %45)
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %46, i32 0, i32 0
  %48 = load i64, ptr %47, align 8, !tbaa !11
  %49 = load i64, ptr %10, align 8, !tbaa !9
  %50 = icmp sge i64 %48, %49
  %51 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %50, ptr noundef @.str.205, ptr noundef %51)
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %52, i32 0, i32 1
  %54 = load i64, ptr %53, align 8, !tbaa !15
  %55 = load i64, ptr %12, align 8, !tbaa !9
  %56 = icmp sge i64 %54, %55
  %57 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %56, ptr noundef @.str.206, ptr noundef %57)
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = load i64, ptr %10, align 8, !tbaa !9
  %60 = load i64, ptr %10, align 8, !tbaa !9
  %61 = load ptr, ptr %13, align 8, !tbaa !5
  %62 = call noundef zeroext i1 @_ZN11alglib_impl15isfinitecmatrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %58, i64 noundef %59, i64 noundef %60, ptr noundef %61)
  %63 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %62, ptr noundef @.str.207, ptr noundef %63)
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = load i64, ptr %10, align 8, !tbaa !9
  %66 = load i64, ptr %12, align 8, !tbaa !9
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  %68 = call noundef zeroext i1 @_ZN11alglib_impl15isfinitecmatrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %64, i64 noundef %65, i64 noundef %66, ptr noundef %67)
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %68, ptr noundef @.str.207, ptr noundef %69)
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %70

70:                                               ; preds = %95, %6
  %71 = load i64, ptr %15, align 8, !tbaa !9
  %72 = load i64, ptr %10, align 8, !tbaa !9
  %73 = sub nsw i64 %72, 1
  %74 = icmp sle i64 %71, %73
  br i1 %74, label %75, label %98

75:                                               ; preds = %70
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %76, i32 0, i32 4
  %78 = load ptr, ptr %77, align 8, !tbaa !18
  %79 = load i64, ptr %15, align 8, !tbaa !9
  %80 = getelementptr inbounds i64, ptr %78, i64 %79
  %81 = load i64, ptr %80, align 8, !tbaa !9
  %82 = icmp sge i64 %81, 0
  br i1 %82, label %83, label %92

83:                                               ; preds = %75
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %84, i32 0, i32 4
  %86 = load ptr, ptr %85, align 8, !tbaa !18
  %87 = load i64, ptr %15, align 8, !tbaa !9
  %88 = getelementptr inbounds i64, ptr %86, i64 %87
  %89 = load i64, ptr %88, align 8, !tbaa !9
  %90 = load i64, ptr %10, align 8, !tbaa !9
  %91 = icmp slt i64 %89, %90
  br label %92

92:                                               ; preds = %83, %75
  %93 = phi i1 [ false, %75 ], [ %91, %83 ]
  %94 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %93, ptr noundef @.str.124, ptr noundef %94)
  br label %95

95:                                               ; preds = %92
  %96 = load i64, ptr %15, align 8, !tbaa !9
  %97 = add nsw i64 %96, 1
  store i64 %97, ptr %15, align 8, !tbaa !9
  br label %70, !llvm.loop !19

98:                                               ; preds = %70
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %99

99:                                               ; preds = %155, %98
  %100 = load i64, ptr %15, align 8, !tbaa !9
  %101 = load i64, ptr %10, align 8, !tbaa !9
  %102 = sub nsw i64 %101, 1
  %103 = icmp sle i64 %100, %102
  br i1 %103, label %104, label %158

104:                                              ; preds = %99
  %105 = load ptr, ptr %8, 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 !18
  %108 = load i64, ptr %15, align 8, !tbaa !9
  %109 = getelementptr inbounds ptr, ptr %107, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  %111 = load i64, ptr %15, align 8, !tbaa !9
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %110, i64 %111
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %112, i64 16, i1 false), !tbaa.struct !21
  %113 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %114 = load double, ptr %113, align 8
  %115 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %116 = load double, ptr %115, align 8
  %117 = call noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double %114, double %116, double noundef 0.000000e+00)
  br i1 %117, label %118, label %154

118:                                              ; preds = %104
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %119

119:                                              ; preds = %148, %118
  %120 = load i64, ptr %16, align 8, !tbaa !9
  %121 = load i64, ptr %10, align 8, !tbaa !9
  %122 = sub nsw i64 %121, 1
  %123 = icmp sle i64 %120, %122
  br i1 %123, label %124, label %151

124:                                              ; preds = %119
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %125

125:                                              ; preds = %144, %124
  %126 = load i64, ptr %17, align 8, !tbaa !9
  %127 = load i64, ptr %12, align 8, !tbaa !9
  %128 = sub nsw i64 %127, 1
  %129 = icmp sle i64 %126, %128
  br i1 %129, label %130, label %147

130:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  %131 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %132 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %133 = extractvalue { double, double } %131, 0
  store double %133, ptr %132, align 8
  %134 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %135 = extractvalue { double, double } %131, 1
  store double %135, ptr %134, align 8
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %136, i32 0, i32 6
  %138 = load ptr, ptr %137, align 8, !tbaa !18
  %139 = load i64, ptr %16, align 8, !tbaa !9
  %140 = getelementptr inbounds ptr, ptr %138, i64 %139
  %141 = load ptr, ptr %140, align 8, !tbaa !5
  %142 = load i64, ptr %17, align 8, !tbaa !9
  %143 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %141, i64 %142
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %143, ptr align 8 %20, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  br label %144

144:                                              ; preds = %130
  %145 = load i64, ptr %17, align 8, !tbaa !9
  %146 = add nsw i64 %145, 1
  store i64 %146, ptr %17, align 8, !tbaa !9
  br label %125, !llvm.loop !24

147:                                              ; preds = %125
  br label %148

148:                                              ; preds = %147
  %149 = load i64, ptr %16, align 8, !tbaa !9
  %150 = add nsw i64 %149, 1
  store i64 %150, ptr %16, align 8, !tbaa !9
  br label %119, !llvm.loop !25

151:                                              ; preds = %119
  store i8 0, ptr %18, align 1, !tbaa !26
  %152 = load i8, ptr %18, align 1, !tbaa !26, !range !27, !noundef !28
  %153 = trunc i8 %152 to i1
  store i1 %153, ptr %7, align 1
  store i32 1, ptr %21, align 4
  br label %243

154:                                              ; preds = %104
  br label %155

155:                                              ; preds = %154
  %156 = load i64, ptr %15, align 8, !tbaa !9
  %157 = add nsw i64 %156, 1
  store i64 %157, ptr %15, align 8, !tbaa !9
  br label %99, !llvm.loop !29

158:                                              ; preds = %99
  store i8 1, ptr %18, align 1, !tbaa !26
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %159

159:                                              ; preds = %227, %158
  %160 = load i64, ptr %15, align 8, !tbaa !9
  %161 = load i64, ptr %10, align 8, !tbaa !9
  %162 = sub nsw i64 %161, 1
  %163 = icmp sle i64 %160, %162
  br i1 %163, label %164, label %230

164:                                              ; preds = %159
  %165 = load ptr, ptr %9, align 8, !tbaa !5
  %166 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %165, i32 0, i32 4
  %167 = load ptr, ptr %166, align 8, !tbaa !18
  %168 = load i64, ptr %15, align 8, !tbaa !9
  %169 = getelementptr inbounds i64, ptr %167, i64 %168
  %170 = load i64, ptr %169, align 8, !tbaa !9
  %171 = load i64, ptr %15, align 8, !tbaa !9
  %172 = icmp ne i64 %170, %171
  br i1 %172, label %173, label %226

173:                                              ; preds = %164
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %174

174:                                              ; preds = %222, %173
  %175 = load i64, ptr %16, align 8, !tbaa !9
  %176 = load i64, ptr %12, align 8, !tbaa !9
  %177 = sub nsw i64 %176, 1
  %178 = icmp sle i64 %175, %177
  br i1 %178, label %179, label %225

179:                                              ; preds = %174
  %180 = load ptr, ptr %11, 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 !18
  %183 = load i64, ptr %15, align 8, !tbaa !9
  %184 = getelementptr inbounds ptr, ptr %182, i64 %183
  %185 = load ptr, ptr %184, align 8, !tbaa !5
  %186 = load i64, ptr %16, align 8, !tbaa !9
  %187 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %185, i64 %186
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %187, i64 16, i1 false), !tbaa.struct !21
  %188 = load ptr, ptr %11, align 8, !tbaa !5
  %189 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %188, i32 0, i32 6
  %190 = load ptr, ptr %189, align 8, !tbaa !18
  %191 = load ptr, ptr %9, align 8, !tbaa !5
  %192 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %191, i32 0, i32 4
  %193 = load ptr, ptr %192, align 8, !tbaa !18
  %194 = load i64, ptr %15, align 8, !tbaa !9
  %195 = getelementptr inbounds i64, ptr %193, i64 %194
  %196 = load i64, ptr %195, align 8, !tbaa !9
  %197 = getelementptr inbounds ptr, ptr %190, i64 %196
  %198 = load ptr, ptr %197, align 8, !tbaa !5
  %199 = load i64, ptr %16, align 8, !tbaa !9
  %200 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %198, i64 %199
  %201 = load ptr, ptr %11, align 8, !tbaa !5
  %202 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %201, i32 0, i32 6
  %203 = load ptr, ptr %202, align 8, !tbaa !18
  %204 = load i64, ptr %15, align 8, !tbaa !9
  %205 = getelementptr inbounds ptr, ptr %203, i64 %204
  %206 = load ptr, ptr %205, align 8, !tbaa !5
  %207 = load i64, ptr %16, align 8, !tbaa !9
  %208 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %206, i64 %207
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %208, ptr align 8 %200, i64 16, i1 false), !tbaa.struct !21
  %209 = load ptr, ptr %11, align 8, !tbaa !5
  %210 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %209, i32 0, i32 6
  %211 = load ptr, ptr %210, align 8, !tbaa !18
  %212 = load ptr, ptr %9, align 8, !tbaa !5
  %213 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %212, i32 0, i32 4
  %214 = load ptr, ptr %213, align 8, !tbaa !18
  %215 = load i64, ptr %15, align 8, !tbaa !9
  %216 = getelementptr inbounds i64, ptr %214, i64 %215
  %217 = load i64, ptr %216, align 8, !tbaa !9
  %218 = getelementptr inbounds ptr, ptr %211, i64 %217
  %219 = load ptr, ptr %218, align 8, !tbaa !5
  %220 = load i64, ptr %16, align 8, !tbaa !9
  %221 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %219, i64 %220
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %221, ptr align 8 %14, i64 16, i1 false), !tbaa.struct !21
  br label %222

222:                                              ; preds = %179
  %223 = load i64, ptr %16, align 8, !tbaa !9
  %224 = add nsw i64 %223, 1
  store i64 %224, ptr %16, align 8, !tbaa !9
  br label %174, !llvm.loop !30

225:                                              ; preds = %174
  br label %226

226:                                              ; preds = %225, %164
  br label %227

227:                                              ; preds = %226
  %228 = load i64, ptr %15, align 8, !tbaa !9
  %229 = add nsw i64 %228, 1
  store i64 %229, ptr %15, align 8, !tbaa !9
  br label %159, !llvm.loop !31

230:                                              ; preds = %159
  %231 = load i64, ptr %10, align 8, !tbaa !9
  %232 = load i64, ptr %12, align 8, !tbaa !9
  %233 = load ptr, ptr %8, align 8, !tbaa !5
  %234 = load ptr, ptr %11, align 8, !tbaa !5
  %235 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %231, i64 noundef %232, ptr noundef %233, i64 noundef 0, i64 noundef 0, i1 noundef zeroext false, i1 noundef zeroext true, i64 noundef 0, ptr noundef %234, i64 noundef 0, i64 noundef 0, ptr noundef %235)
  %236 = load i64, ptr %10, align 8, !tbaa !9
  %237 = load i64, ptr %12, align 8, !tbaa !9
  %238 = load ptr, ptr %8, align 8, !tbaa !5
  %239 = load ptr, ptr %11, align 8, !tbaa !5
  %240 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %236, i64 noundef %237, ptr noundef %238, i64 noundef 0, i64 noundef 0, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 0, ptr noundef %239, i64 noundef 0, i64 noundef 0, ptr noundef %240)
  %241 = load i8, ptr %18, align 1, !tbaa !26, !range !27, !noundef !28
  %242 = trunc i8 %241 to i1
  store i1 %242, ptr %7, align 1
  store i32 1, ptr %21, align 4
  br label %243

243:                                              ; preds = %230, %151
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #4
  %244 = load i1, ptr %7, align 1
  ret i1 %244
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

declare noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double, double, double noundef) #1

declare { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef) #1

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !10, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !14, i64 40, !7, i64 72}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!12, !10, i64 8}
!16 = !{!17, !10, i64 0}
!17 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{i64 0, i64 8, !22, i64 8, i64 8, !22}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = distinct !{!24, !20}
!25 = distinct !{!25, !20}
!26 = !{!13, !13, i64 0}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = distinct !{!29, !20}
!30 = distinct !{!30, !20}
!31 = distinct !{!31, !20}


; 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_complex" = type { double, double }

@.str.124 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.200 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.201 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.202 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.203 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.204 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.205 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.206 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.207 = external hidden unnamed_addr constant [58 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl19cmatrixlusolvemfastEPKNS_9ae_matrixEPKNS_9ae_vectorElPS0_lPNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef readonly %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5) local_unnamed_addr #2 {
  %7 = alloca %"struct.alglib_impl::ae_complex", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7)
  %8 = icmp sgt i64 %2, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.200, ptr noundef %5)
  %9 = icmp sgt i64 %4, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.201, ptr noundef %5)
  %10 = load i64, ptr %0, align 8, !tbaa !5
  %11 = icmp sge i64 %10, %2
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.202, ptr noundef %5)
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load i64, ptr %12, align 8, !tbaa !13
  %14 = icmp sge i64 %13, %2
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %14, ptr noundef nonnull @.str.203, ptr noundef %5)
  %15 = load i64, ptr %1, align 8, !tbaa !14
  %16 = icmp sge i64 %15, %2
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.204, ptr noundef %5)
  %17 = load i64, ptr %3, align 8, !tbaa !5
  %18 = icmp sge i64 %17, %2
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.205, ptr noundef %5)
  %19 = getelementptr inbounds i8, ptr %3, i64 8
  %20 = load i64, ptr %19, align 8, !tbaa !13
  %21 = icmp sge i64 %20, %4
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef nonnull @.str.206, ptr noundef %5)
  %22 = tail call noundef zeroext i1 @_ZN11alglib_impl15isfinitecmatrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %2, i64 noundef %2, ptr noundef %5)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef nonnull @.str.207, ptr noundef %5)
  %23 = tail call noundef zeroext i1 @_ZN11alglib_impl15isfinitecmatrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %2, i64 noundef %4, ptr noundef %5)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %23, ptr noundef nonnull @.str.207, ptr noundef %5)
  br i1 %8, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %6
  %24 = getelementptr inbounds i8, ptr %1, i64 56
  br label %29

.lr.ph112:                                        ; preds = %29
  %25 = getelementptr inbounds i8, ptr %0, i64 72
  %26 = load ptr, ptr %25, align 8, !tbaa !16
  %27 = load ptr, ptr %26, align 8, !tbaa !17
  %.sroa.01.0.copyload139 = load double, ptr %27, align 8, !tbaa !18
  %.sroa.2.0..sroa_idx140 = getelementptr inbounds i8, ptr %27, i64 8
  %.sroa.2.0.copyload141 = load double, ptr %.sroa.2.0..sroa_idx140, align 8, !tbaa !18
  %28 = tail call noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double %.sroa.01.0.copyload139, double %.sroa.2.0.copyload141, double noundef 0.000000e+00)
  br i1 %28, label %.preheader101.lr.ph, label %.lr.ph143

29:                                               ; preds = %.lr.ph, %29
  %.089108 = phi i64 [ 0, %.lr.ph ], [ %33, %29 ]
  %30 = load ptr, ptr %24, align 8, !tbaa !16
  %31 = getelementptr inbounds i64, ptr %30, i64 %.089108
  %32 = load i64, ptr %31, align 8, !tbaa !20
  %spec.select = icmp ult i64 %32, %2
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select, ptr noundef nonnull @.str.124, ptr noundef %5)
  %33 = add nuw nsw i64 %.089108, 1
  %exitcond.not = icmp eq i64 %33, %2
  br i1 %exitcond.not, label %.lr.ph112, label %29, !llvm.loop !21

.lr.ph143:                                        ; preds = %.lr.ph112, %59
  %.1110142 = phi i64 [ %34, %59 ], [ 0, %.lr.ph112 ]
  %34 = add nuw nsw i64 %.1110142, 1
  %exitcond129 = icmp eq i64 %34, %2
  br i1 %exitcond129, label %.preheader100, label %59, !llvm.loop !23

.preheader100:                                    ; preds = %.lr.ph143
  br i1 %8, label %.lr.ph124, label %._crit_edge

.lr.ph124:                                        ; preds = %.preheader100
  %35 = getelementptr inbounds i8, ptr %1, i64 56
  %36 = getelementptr inbounds i8, ptr %3, i64 72
  br i1 %9, label %.lr.ph124.split.us, label %._crit_edge

.lr.ph124.split.us:                               ; preds = %.lr.ph124, %..loopexit_crit_edge.us
  %.2122.us = phi i64 [ %58, %..loopexit_crit_edge.us ], [ 0, %.lr.ph124 ]
  %37 = load ptr, ptr %35, align 8, !tbaa !16
  %38 = getelementptr inbounds i64, ptr %37, i64 %.2122.us
  %39 = load i64, ptr %38, align 8, !tbaa !20
  %.not.us = icmp eq i64 %39, %.2122.us
  br i1 %.not.us, label %..loopexit_crit_edge.us, label %.preheader.us

.preheader.us:                                    ; preds = %.lr.ph124.split.us, %.preheader.us
  %.191119.us = phi i64 [ %57, %.preheader.us ], [ 0, %.lr.ph124.split.us ]
  %40 = load ptr, ptr %36, align 8, !tbaa !16
  %41 = getelementptr inbounds ptr, ptr %40, i64 %.2122.us
  %42 = load ptr, ptr %41, align 8, !tbaa !17
  %43 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %42, i64 %.191119.us
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %43, i64 16, i1 false), !tbaa.struct !24
  %44 = load ptr, ptr %35, align 8, !tbaa !16
  %45 = getelementptr inbounds i64, ptr %44, i64 %.2122.us
  %46 = load i64, ptr %45, align 8, !tbaa !20
  %47 = getelementptr inbounds ptr, ptr %40, i64 %46
  %48 = load ptr, ptr %47, align 8, !tbaa !17
  %49 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %48, i64 %.191119.us
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(16) %49, i64 16, i1 false), !tbaa.struct !24
  %50 = load ptr, ptr %36, align 8, !tbaa !16
  %51 = load ptr, ptr %35, align 8, !tbaa !16
  %52 = getelementptr inbounds i64, ptr %51, i64 %.2122.us
  %53 = load i64, ptr %52, align 8, !tbaa !20
  %54 = getelementptr inbounds ptr, ptr %50, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !17
  %56 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %55, i64 %.191119.us
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef nonnull align 8 dereferenceable(16) %7, i64 16, i1 false), !tbaa.struct !24
  %57 = add nuw nsw i64 %.191119.us, 1
  %exitcond132.not = icmp eq i64 %57, %4
  br i1 %exitcond132.not, label %..loopexit_crit_edge.us, label %.preheader.us, !llvm.loop !25

..loopexit_crit_edge.us:                          ; preds = %.preheader.us, %.lr.ph124.split.us
  %58 = add nuw nsw i64 %.2122.us, 1
  %exitcond133.not = icmp eq i64 %58, %2
  br i1 %exitcond133.not, label %._crit_edge, label %.lr.ph124.split.us, !llvm.loop !26

59:                                               ; preds = %.lr.ph143
  %60 = load ptr, ptr %25, align 8, !tbaa !16
  %61 = getelementptr inbounds ptr, ptr %60, i64 %34
  %62 = load ptr, ptr %61, align 8, !tbaa !17
  %63 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %62, i64 %34
  %.sroa.01.0.copyload = load double, ptr %63, align 8, !tbaa !18
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %63, i64 8
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !18
  %64 = tail call noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double %.sroa.01.0.copyload, double %.sroa.2.0.copyload, double noundef 0.000000e+00)
  br i1 %64, label %.preheader101.lr.ph.loopexit, label %.lr.ph143, !llvm.loop !23

.preheader101.lr.ph.loopexit:                     ; preds = %59
  %.not.not95.le = icmp sge i64 %34, %2
  br label %.preheader101.lr.ph

.preheader101.lr.ph:                              ; preds = %.preheader101.lr.ph.loopexit, %.lr.ph112
  %.not.not95111.lcssa = phi i1 [ false, %.lr.ph112 ], [ %.not.not95.le, %.preheader101.lr.ph.loopexit ]
  %65 = getelementptr inbounds i8, ptr %3, i64 72
  br i1 %9, label %.preheader101.us, label %.loopexit103

.preheader101.us:                                 ; preds = %.preheader101.lr.ph, %._crit_edge.us
  %.090117.us = phi i64 [ %75, %._crit_edge.us ], [ 0, %.preheader101.lr.ph ]
  br label %66

66:                                               ; preds = %.preheader101.us, %66
  %.092114.us = phi i64 [ 0, %.preheader101.us ], [ %74, %66 ]
  %67 = tail call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %68 = extractvalue { double, double } %67, 0
  %69 = extractvalue { double, double } %67, 1
  %70 = load ptr, ptr %65, align 8, !tbaa !16
  %71 = getelementptr inbounds ptr, ptr %70, i64 %.090117.us
  %72 = load ptr, ptr %71, align 8, !tbaa !17
  %73 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %72, i64 %.092114.us
  store double %68, ptr %73, align 8, !tbaa !18
  %.sroa.4.0..sroa_idx.us = getelementptr inbounds i8, ptr %73, i64 8
  store double %69, ptr %.sroa.4.0..sroa_idx.us, align 8, !tbaa !18
  %74 = add nuw nsw i64 %.092114.us, 1
  %exitcond130.not = icmp eq i64 %74, %4
  br i1 %exitcond130.not, label %._crit_edge.us, label %66, !llvm.loop !27

._crit_edge.us:                                   ; preds = %66
  %75 = add nuw nsw i64 %.090117.us, 1
  %exitcond131.not = icmp eq i64 %75, %2
  br i1 %exitcond131.not, label %.loopexit103, label %.preheader101.us, !llvm.loop !28

._crit_edge:                                      ; preds = %..loopexit_crit_edge.us, %6, %.lr.ph124, %.preheader100
  tail call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %2, i64 noundef %4, ptr noundef nonnull %0, i64 noundef 0, i64 noundef 0, i1 noundef zeroext false, i1 noundef zeroext true, i64 noundef 0, ptr noundef nonnull %3, i64 noundef 0, i64 noundef 0, ptr noundef %5)
  tail call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %2, i64 noundef %4, ptr noundef nonnull %0, i64 noundef 0, i64 noundef 0, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 0, ptr noundef nonnull %3, i64 noundef 0, i64 noundef 0, ptr noundef %5)
  br label %.loopexit103

.loopexit103:                                     ; preds = %._crit_edge.us, %.preheader101.lr.ph, %._crit_edge
  %.not.not95106 = phi i1 [ true, %._crit_edge ], [ %.not.not95111.lcssa, %.preheader101.lr.ph ], [ %.not.not95111.lcssa, %._crit_edge.us ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7)
  ret i1 %.not.not95106
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

declare noundef zeroext i1 @_ZN11alglib_impl9ae_c_eq_dENS_10ae_complexEd(double, double, double noundef) local_unnamed_addr #1

declare { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i1 noundef zeroext, i1 noundef zeroext, i64 noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }

!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 0}
!6 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !8, i64 72}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!6, !7, i64 8}
!14 = !{!15, !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !8, i64 56}
!16 = !{!8, !8, i64 0}
!17 = !{!12, !12, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !8, i64 0}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{i64 0, i64 8, !18, i64 8, i64 8, !18}
!25 = distinct !{!25, !22}
!26 = distinct !{!26, !22}
!27 = distinct !{!27, !22}
!28 = distinct !{!28, !22}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass