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

@.str.30 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [37 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 noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #1

declare noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef, ptr noundef) #1

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

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #1

; 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 { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef) #1

declare { double, double } @_ZN11alglib_impl16ae_v_cdotproductEPKNS_10ae_complexElPKcS2_lS4_l(ptr noundef, i64 noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) #1

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

declare noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double, double, ptr noundef) #1

declare { double, double } @_ZN11alglib_impl9ae_c_conjENS_10ae_complexEPNS_8ae_stateE(double, double, ptr noundef) #1

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

declare void @_ZN11alglib_impl10ae_v_csubcEPNS_10ae_complexElPKS0_lPKclS0_(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, double, double) #1

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double, double, double, double, double noundef, double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl24cmatrixscaledtrsafesolveEPNS_9ae_matrixEdlPNS_9ae_vectorEblbdPNS_8ae_stateE(ptr noundef %0, double noundef %1, i64 noundef %2, ptr noundef %3, i1 noundef zeroext %4, i64 noundef %5, i1 noundef zeroext %6, double noundef %7, ptr noundef %8) #4 {
  %10 = alloca i1, align 1
  %11 = alloca ptr, align 8
  %12 = alloca double, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i8, align 1
  %16 = alloca i64, align 8
  %17 = alloca i8, align 1
  %18 = alloca double, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"struct.alglib_impl::ae_frame", align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca i64, align 8
  %25 = alloca %"struct.alglib_impl::ae_complex", align 8
  %26 = alloca %"struct.alglib_impl::ae_complex", align 8
  %27 = alloca %"struct.alglib_impl::ae_complex", align 8
  %28 = alloca %"struct.alglib_impl::ae_vector", align 8
  %29 = alloca i8, align 1
  %30 = alloca i32, align 4
  %31 = alloca %"struct.alglib_impl::ae_complex", align 8
  %32 = alloca %"struct.alglib_impl::ae_complex", align 8
  %33 = alloca %"struct.alglib_impl::ae_complex", align 8
  %34 = alloca %"struct.alglib_impl::ae_complex", align 8
  %35 = alloca %"struct.alglib_impl::ae_complex", align 8
  %36 = alloca %"struct.alglib_impl::ae_complex", align 8
  %37 = alloca %"struct.alglib_impl::ae_complex", align 8
  %38 = alloca %"struct.alglib_impl::ae_complex", align 8
  %39 = alloca %"struct.alglib_impl::ae_complex", align 8
  %40 = alloca %"struct.alglib_impl::ae_complex", align 8
  %41 = alloca %"struct.alglib_impl::ae_complex", align 8
  %42 = alloca %"struct.alglib_impl::ae_complex", align 8
  %43 = alloca %"struct.alglib_impl::ae_complex", align 8
  %44 = alloca %"struct.alglib_impl::ae_complex", align 8
  %45 = alloca %"struct.alglib_impl::ae_complex", align 8
  %46 = alloca %"struct.alglib_impl::ae_complex", align 8
  %47 = alloca %"struct.alglib_impl::ae_complex", align 8
  %48 = alloca %"struct.alglib_impl::ae_complex", align 8
  %49 = alloca %"struct.alglib_impl::ae_complex", align 8
  %50 = alloca %"struct.alglib_impl::ae_complex", align 8
  %51 = alloca %"struct.alglib_impl::ae_complex", align 8
  %52 = alloca %"struct.alglib_impl::ae_complex", align 8
  %53 = alloca %"struct.alglib_impl::ae_complex", align 8
  %54 = alloca %"struct.alglib_impl::ae_complex", align 8
  %55 = alloca %"struct.alglib_impl::ae_complex", align 8
  %56 = alloca %"struct.alglib_impl::ae_complex", align 8
  %57 = alloca %"struct.alglib_impl::ae_complex", align 8
  %58 = alloca %"struct.alglib_impl::ae_complex", align 8
  %59 = alloca %"struct.alglib_impl::ae_complex", align 8
  %60 = alloca %"struct.alglib_impl::ae_complex", align 8
  %61 = alloca %"struct.alglib_impl::ae_complex", align 8
  %62 = alloca %"struct.alglib_impl::ae_complex", align 8
  %63 = alloca %"struct.alglib_impl::ae_complex", align 8
  %64 = alloca %"struct.alglib_impl::ae_complex", align 8
  %65 = alloca %"struct.alglib_impl::ae_complex", align 8
  %66 = alloca %"struct.alglib_impl::ae_complex", align 8
  %67 = alloca %"struct.alglib_impl::ae_complex", align 8
  %68 = alloca %"struct.alglib_impl::ae_complex", align 8
  %69 = alloca %"struct.alglib_impl::ae_complex", align 8
  %70 = alloca %"struct.alglib_impl::ae_complex", align 8
  %71 = alloca %"struct.alglib_impl::ae_complex", align 8
  %72 = alloca %"struct.alglib_impl::ae_complex", align 8
  %73 = alloca %"struct.alglib_impl::ae_complex", align 8
  %74 = alloca %"struct.alglib_impl::ae_complex", align 8
  %75 = alloca %"struct.alglib_impl::ae_complex", align 8
  store ptr %0, ptr %11, align 8, !tbaa !5
  store double %1, ptr %12, align 8, !tbaa !9
  store i64 %2, ptr %13, align 8, !tbaa !11
  store ptr %3, ptr %14, align 8, !tbaa !5
  %76 = zext i1 %4 to i8
  store i8 %76, ptr %15, align 1, !tbaa !13
  store i64 %5, ptr %16, align 8, !tbaa !11
  %77 = zext i1 %6 to i8
  store i8 %77, ptr %17, align 1, !tbaa !13
  store double %7, ptr %18, align 8, !tbaa !9
  store ptr %8, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #5
  %78 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %78, ptr noundef %20)
  call void @llvm.memset.p0.i64(ptr align 8 %28, i8 0, i64 64, i1 false)
  %79 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %28, i64 noundef 0, i64 noundef 4, ptr noundef %79, i1 noundef zeroext true)
  %80 = load i64, ptr %13, align 8, !tbaa !11
  %81 = icmp sgt i64 %80, 0
  %82 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %81, ptr noundef @.str.35, ptr noundef %82)
  %83 = load i64, ptr %16, align 8, !tbaa !11
  %84 = icmp eq i64 %83, 0
  br i1 %84, label %91, label %85

85:                                               ; preds = %9
  %86 = load i64, ptr %16, align 8, !tbaa !11
  %87 = icmp eq i64 %86, 1
  br i1 %87, label %91, label %88

88:                                               ; preds = %85
  %89 = load i64, ptr %16, align 8, !tbaa !11
  %90 = icmp eq i64 %89, 2
  br label %91

91:                                               ; preds = %88, %85, %9
  %92 = phi i1 [ true, %85 ], [ true, %9 ], [ %90, %88 ]
  %93 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %92, ptr noundef @.str.36, ptr noundef %93)
  store i8 1, ptr %29, align 1, !tbaa !13
  %94 = load ptr, ptr %19, align 8, !tbaa !5
  %95 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 1.000000e+300, ptr noundef %94)
  store double %95, ptr %21, align 8, !tbaa !9
  %96 = load i64, ptr %13, align 8, !tbaa !11
  %97 = icmp sle i64 %96, 0
  br i1 %97, label %98, label %102

98:                                               ; preds = %91
  %99 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %99)
  %100 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %101 = trunc i8 %100 to i1
  store i1 %101, ptr %10, align 1
  store i32 1, ptr %30, align 4
  br label %906

102:                                              ; preds = %91
  store double 0.000000e+00, ptr %22, align 8, !tbaa !9
  store i64 0, ptr %24, align 8, !tbaa !11
  br label %103

103:                                              ; preds = %123, %102
  %104 = load i64, ptr %24, align 8, !tbaa !11
  %105 = load i64, ptr %13, align 8, !tbaa !11
  %106 = sub nsw i64 %105, 1
  %107 = icmp sle i64 %104, %106
  br i1 %107, label %108, label %126

108:                                              ; preds = %103
  %109 = load double, ptr %22, align 8, !tbaa !9
  %110 = load ptr, ptr %14, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %110, i32 0, i32 4
  %112 = load ptr, ptr %111, align 8, !tbaa !17
  %113 = load i64, ptr %24, align 8, !tbaa !11
  %114 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %112, i64 %113
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %114, i64 16, i1 false), !tbaa.struct !18
  %115 = load ptr, ptr %19, align 8, !tbaa !5
  %116 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %117 = load double, ptr %116, align 8
  %118 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %119 = load double, ptr %118, align 8
  %120 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %117, double %119, ptr noundef %115)
  %121 = load ptr, ptr %19, align 8, !tbaa !5
  %122 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %109, double noundef %120, ptr noundef %121)
  store double %122, ptr %22, align 8, !tbaa !9
  br label %123

123:                                              ; preds = %108
  %124 = load i64, ptr %24, align 8, !tbaa !11
  %125 = add nsw i64 %124, 1
  store i64 %125, ptr %24, align 8, !tbaa !11
  br label %103, !llvm.loop !19

126:                                              ; preds = %103
  store double 0.000000e+00, ptr %23, align 8, !tbaa !9
  %127 = load i64, ptr %13, align 8, !tbaa !11
  %128 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %28, i64 noundef %127, ptr noundef %128)
  store i8 1, ptr %29, align 1, !tbaa !13
  %129 = load i8, ptr %15, align 1, !tbaa !13, !range !15, !noundef !16
  %130 = trunc i8 %129 to i1
  br i1 %130, label %131, label %274

131:                                              ; preds = %126
  %132 = load i64, ptr %16, align 8, !tbaa !11
  %133 = icmp eq i64 %132, 0
  br i1 %133, label %134, label %274

134:                                              ; preds = %131
  %135 = load i64, ptr %13, align 8, !tbaa !11
  %136 = sub nsw i64 %135, 1
  store i64 %136, ptr %24, align 8, !tbaa !11
  br label %137

137:                                              ; preds = %267, %134
  %138 = load i64, ptr %24, align 8, !tbaa !11
  %139 = icmp sge i64 %138, 0
  br i1 %139, label %140, label %270

140:                                              ; preds = %137
  %141 = load i8, ptr %17, align 1, !tbaa !13, !range !15, !noundef !16
  %142 = trunc i8 %141 to i1
  br i1 %142, label %143, label %150

143:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #5
  %144 = load double, ptr %12, align 8, !tbaa !9
  %145 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %144)
  %146 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %147 = extractvalue { double, double } %145, 0
  store double %147, ptr %146, align 8
  %148 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %149 = extractvalue { double, double } %145, 1
  store double %149, ptr %148, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %32, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #5
  br label %169

150:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #5
  %151 = load ptr, ptr %11, align 8, !tbaa !5
  %152 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %151, i32 0, i32 6
  %153 = load ptr, ptr %152, align 8, !tbaa !17
  %154 = load i64, ptr %24, align 8, !tbaa !11
  %155 = getelementptr inbounds ptr, ptr %153, i64 %154
  %156 = load ptr, ptr %155, align 8, !tbaa !5
  %157 = load i64, ptr %24, align 8, !tbaa !11
  %158 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %156, i64 %157
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 8 %158, i64 16, i1 false), !tbaa.struct !18
  %159 = load double, ptr %12, align 8, !tbaa !9
  %160 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 0
  %161 = load double, ptr %160, align 8
  %162 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 1
  %163 = load double, ptr %162, align 8
  %164 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %161, double %163, double noundef %159)
  %165 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %166 = extractvalue { double, double } %164, 0
  store double %166, ptr %165, align 8
  %167 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %168 = extractvalue { double, double } %164, 1
  store double %168, ptr %167, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %33, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #5
  br label %169

169:                                              ; preds = %150, %143
  %170 = load i64, ptr %24, align 8, !tbaa !11
  %171 = load i64, ptr %13, align 8, !tbaa !11
  %172 = sub nsw i64 %171, 1
  %173 = icmp slt i64 %170, %172
  br i1 %173, label %174, label %234

174:                                              ; preds = %169
  %175 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %28, i32 0, i32 4
  %176 = load ptr, ptr %175, align 8, !tbaa !17
  %177 = load i64, ptr %24, align 8, !tbaa !11
  %178 = add nsw i64 %177, 1
  %179 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %176, i64 %178
  %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 !17
  %183 = load i64, ptr %24, align 8, !tbaa !11
  %184 = getelementptr inbounds ptr, ptr %182, i64 %183
  %185 = load ptr, ptr %184, align 8, !tbaa !5
  %186 = load i64, ptr %24, align 8, !tbaa !11
  %187 = add nsw i64 %186, 1
  %188 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %185, i64 %187
  %189 = load i64, ptr %24, align 8, !tbaa !11
  %190 = add nsw i64 %189, 1
  %191 = load i64, ptr %13, align 8, !tbaa !11
  %192 = sub nsw i64 %191, 1
  %193 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %190, i64 noundef %192)
  %194 = load double, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl11ae_v_cmovedEPNS_10ae_complexElPKS0_lPKcld(ptr noundef %179, i64 noundef 1, ptr noundef %188, i64 noundef 1, ptr noundef @.str.30, i64 noundef %193, double noundef %194)
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #5
  %195 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %28, i32 0, i32 4
  %196 = load ptr, ptr %195, align 8, !tbaa !17
  %197 = load i64, ptr %24, align 8, !tbaa !11
  %198 = add nsw i64 %197, 1
  %199 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %196, i64 %198
  %200 = load ptr, ptr %14, align 8, !tbaa !5
  %201 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %200, i32 0, i32 4
  %202 = load ptr, ptr %201, align 8, !tbaa !17
  %203 = load i64, ptr %24, align 8, !tbaa !11
  %204 = add nsw i64 %203, 1
  %205 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %202, i64 %204
  %206 = load i64, ptr %24, align 8, !tbaa !11
  %207 = add nsw i64 %206, 1
  %208 = load i64, ptr %13, align 8, !tbaa !11
  %209 = sub nsw i64 %208, 1
  %210 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %207, i64 noundef %209)
  %211 = call { double, double } @_ZN11alglib_impl16ae_v_cdotproductEPKNS_10ae_complexElPKcS2_lS4_l(ptr noundef %199, i64 noundef 1, ptr noundef @.str.30, ptr noundef %205, i64 noundef 1, ptr noundef @.str.30, i64 noundef %210)
  %212 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %213 = extractvalue { double, double } %211, 0
  store double %213, ptr %212, align 8
  %214 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %215 = extractvalue { double, double } %211, 1
  store double %215, ptr %214, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %35, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #5
  %216 = load ptr, ptr %14, align 8, !tbaa !5
  %217 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %216, i32 0, i32 4
  %218 = load ptr, ptr %217, align 8, !tbaa !17
  %219 = load i64, ptr %24, align 8, !tbaa !11
  %220 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %218, i64 %219
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %37, ptr align 8 %220, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %38, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !18
  %221 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %222 = load double, ptr %221, align 8
  %223 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %224 = load double, ptr %223, align 8
  %225 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 0
  %226 = load double, ptr %225, align 8
  %227 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 1
  %228 = load double, ptr %227, align 8
  %229 = call { double, double } @_ZN11alglib_impl8ae_c_subENS_10ae_complexES0_(double %222, double %224, double %226, double %228)
  %230 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 0
  %231 = extractvalue { double, double } %229, 0
  store double %231, ptr %230, align 8
  %232 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 1
  %233 = extractvalue { double, double } %229, 1
  store double %233, ptr %232, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %36, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #5
  br label %240

234:                                              ; preds = %169
  %235 = load ptr, ptr %14, align 8, !tbaa !5
  %236 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %235, i32 0, i32 4
  %237 = load ptr, ptr %236, align 8, !tbaa !17
  %238 = load i64, ptr %24, align 8, !tbaa !11
  %239 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %237, i64 %238
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %239, i64 16, i1 false), !tbaa.struct !18
  br label %240

240:                                              ; preds = %234, %174
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %39, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %40, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !18
  %241 = load double, ptr %21, align 8, !tbaa !9
  %242 = load double, ptr %22, align 8, !tbaa !9
  %243 = load double, ptr %18, align 8, !tbaa !9
  %244 = load ptr, ptr %19, align 8, !tbaa !5
  %245 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 0
  %246 = load double, ptr %245, align 8
  %247 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 1
  %248 = load double, ptr %247, align 8
  %249 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 0
  %250 = load double, ptr %249, align 8
  %251 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 1
  %252 = load double, ptr %251, align 8
  %253 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %246, double %248, double %250, double %252, double noundef %241, double noundef %242, double noundef %243, ptr noundef %23, ptr noundef %27, ptr noundef %244)
  %254 = zext i1 %253 to i8
  store i8 %254, ptr %29, align 1, !tbaa !13
  %255 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %256 = trunc i8 %255 to i1
  br i1 %256, label %261, label %257

257:                                              ; preds = %240
  %258 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %258)
  %259 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %260 = trunc i8 %259 to i1
  store i1 %260, ptr %10, align 1
  store i32 1, ptr %30, align 4
  br label %906

261:                                              ; preds = %240
  %262 = load ptr, ptr %14, align 8, !tbaa !5
  %263 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %262, i32 0, i32 4
  %264 = load ptr, ptr %263, align 8, !tbaa !17
  %265 = load i64, ptr %24, align 8, !tbaa !11
  %266 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %264, i64 %265
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %266, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !18
  br label %267

267:                                              ; preds = %261
  %268 = load i64, ptr %24, align 8, !tbaa !11
  %269 = add nsw i64 %268, -1
  store i64 %269, ptr %24, align 8, !tbaa !11
  br label %137, !llvm.loop !21

270:                                              ; preds = %137
  %271 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %271)
  %272 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %273 = trunc i8 %272 to i1
  store i1 %273, ptr %10, align 1
  store i32 1, ptr %30, align 4
  br label %906

274:                                              ; preds = %131, %126
  %275 = load i8, ptr %15, align 1, !tbaa !13, !range !15, !noundef !16
  %276 = trunc i8 %275 to i1
  br i1 %276, label %406, label %277

277:                                              ; preds = %274
  %278 = load i64, ptr %16, align 8, !tbaa !11
  %279 = icmp eq i64 %278, 0
  br i1 %279, label %280, label %406

280:                                              ; preds = %277
  store i64 0, ptr %24, align 8, !tbaa !11
  br label %281

281:                                              ; preds = %399, %280
  %282 = load i64, ptr %24, align 8, !tbaa !11
  %283 = load i64, ptr %13, align 8, !tbaa !11
  %284 = sub nsw i64 %283, 1
  %285 = icmp sle i64 %282, %284
  br i1 %285, label %286, label %402

286:                                              ; preds = %281
  %287 = load i8, ptr %17, align 1, !tbaa !13, !range !15, !noundef !16
  %288 = trunc i8 %287 to i1
  br i1 %288, label %289, label %296

289:                                              ; preds = %286
  call void @llvm.lifetime.start.p0(i64 16, ptr %41) #5
  %290 = load double, ptr %12, align 8, !tbaa !9
  %291 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %290)
  %292 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %293 = extractvalue { double, double } %291, 0
  store double %293, ptr %292, align 8
  %294 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %295 = extractvalue { double, double } %291, 1
  store double %295, ptr %294, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %41, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #5
  br label %315

296:                                              ; preds = %286
  call void @llvm.lifetime.start.p0(i64 16, ptr %42) #5
  %297 = load ptr, ptr %11, align 8, !tbaa !5
  %298 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %297, i32 0, i32 6
  %299 = load ptr, ptr %298, align 8, !tbaa !17
  %300 = load i64, ptr %24, align 8, !tbaa !11
  %301 = getelementptr inbounds ptr, ptr %299, i64 %300
  %302 = load ptr, ptr %301, align 8, !tbaa !5
  %303 = load i64, ptr %24, align 8, !tbaa !11
  %304 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %302, i64 %303
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %43, ptr align 8 %304, i64 16, i1 false), !tbaa.struct !18
  %305 = load double, ptr %12, align 8, !tbaa !9
  %306 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 0
  %307 = load double, ptr %306, align 8
  %308 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 1
  %309 = load double, ptr %308, align 8
  %310 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %307, double %309, double noundef %305)
  %311 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 0
  %312 = extractvalue { double, double } %310, 0
  store double %312, ptr %311, align 8
  %313 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 1
  %314 = extractvalue { double, double } %310, 1
  store double %314, ptr %313, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %42, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #5
  br label %315

315:                                              ; preds = %296, %289
  %316 = load i64, ptr %24, align 8, !tbaa !11
  %317 = icmp sgt i64 %316, 0
  br i1 %317, label %318, label %366

318:                                              ; preds = %315
  %319 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %28, i32 0, i32 4
  %320 = load ptr, ptr %319, align 8, !tbaa !17
  %321 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %320, i64 0
  %322 = load ptr, ptr %11, align 8, !tbaa !5
  %323 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %322, i32 0, i32 6
  %324 = load ptr, ptr %323, align 8, !tbaa !17
  %325 = load i64, ptr %24, align 8, !tbaa !11
  %326 = getelementptr inbounds ptr, ptr %324, i64 %325
  %327 = load ptr, ptr %326, align 8, !tbaa !5
  %328 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %327, i64 0
  %329 = load i64, ptr %24, align 8, !tbaa !11
  %330 = sub nsw i64 %329, 1
  %331 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %330)
  %332 = load double, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl11ae_v_cmovedEPNS_10ae_complexElPKS0_lPKcld(ptr noundef %321, i64 noundef 1, ptr noundef %328, i64 noundef 1, ptr noundef @.str.30, i64 noundef %331, double noundef %332)
  call void @llvm.lifetime.start.p0(i64 16, ptr %44) #5
  %333 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %28, i32 0, i32 4
  %334 = load ptr, ptr %333, align 8, !tbaa !17
  %335 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %334, i64 0
  %336 = load ptr, ptr %14, align 8, !tbaa !5
  %337 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %336, i32 0, i32 4
  %338 = load ptr, ptr %337, align 8, !tbaa !17
  %339 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %338, i64 0
  %340 = load i64, ptr %24, align 8, !tbaa !11
  %341 = sub nsw i64 %340, 1
  %342 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %341)
  %343 = call { double, double } @_ZN11alglib_impl16ae_v_cdotproductEPKNS_10ae_complexElPKcS2_lS4_l(ptr noundef %335, i64 noundef 1, ptr noundef @.str.30, ptr noundef %339, i64 noundef 1, ptr noundef @.str.30, i64 noundef %342)
  %344 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 0
  %345 = extractvalue { double, double } %343, 0
  store double %345, ptr %344, align 8
  %346 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 1
  %347 = extractvalue { double, double } %343, 1
  store double %347, ptr %346, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %44, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %45) #5
  %348 = load ptr, ptr %14, align 8, !tbaa !5
  %349 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %348, i32 0, i32 4
  %350 = load ptr, ptr %349, align 8, !tbaa !17
  %351 = load i64, ptr %24, align 8, !tbaa !11
  %352 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %350, i64 %351
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %46, ptr align 8 %352, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %47, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !18
  %353 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %354 = load double, ptr %353, align 8
  %355 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %356 = load double, ptr %355, align 8
  %357 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %358 = load double, ptr %357, align 8
  %359 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %360 = load double, ptr %359, align 8
  %361 = call { double, double } @_ZN11alglib_impl8ae_c_subENS_10ae_complexES0_(double %354, double %356, double %358, double %360)
  %362 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 0
  %363 = extractvalue { double, double } %361, 0
  store double %363, ptr %362, align 8
  %364 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 1
  %365 = extractvalue { double, double } %361, 1
  store double %365, ptr %364, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %45, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %45) #5
  br label %372

366:                                              ; preds = %315
  %367 = load ptr, ptr %14, align 8, !tbaa !5
  %368 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %367, i32 0, i32 4
  %369 = load ptr, ptr %368, align 8, !tbaa !17
  %370 = load i64, ptr %24, align 8, !tbaa !11
  %371 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %369, i64 %370
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %371, i64 16, i1 false), !tbaa.struct !18
  br label %372

372:                                              ; preds = %366, %318
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %48, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %49, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !18
  %373 = load double, ptr %21, align 8, !tbaa !9
  %374 = load double, ptr %22, align 8, !tbaa !9
  %375 = load double, ptr %18, align 8, !tbaa !9
  %376 = load ptr, ptr %19, align 8, !tbaa !5
  %377 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 0
  %378 = load double, ptr %377, align 8
  %379 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 1
  %380 = load double, ptr %379, align 8
  %381 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 0
  %382 = load double, ptr %381, align 8
  %383 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 1
  %384 = load double, ptr %383, align 8
  %385 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %378, double %380, double %382, double %384, double noundef %373, double noundef %374, double noundef %375, ptr noundef %23, ptr noundef %27, ptr noundef %376)
  %386 = zext i1 %385 to i8
  store i8 %386, ptr %29, align 1, !tbaa !13
  %387 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %388 = trunc i8 %387 to i1
  br i1 %388, label %393, label %389

389:                                              ; preds = %372
  %390 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %390)
  %391 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %392 = trunc i8 %391 to i1
  store i1 %392, ptr %10, align 1
  store i32 1, ptr %30, align 4
  br label %906

393:                                              ; preds = %372
  %394 = load ptr, ptr %14, align 8, !tbaa !5
  %395 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %394, i32 0, i32 4
  %396 = load ptr, ptr %395, align 8, !tbaa !17
  %397 = load i64, ptr %24, align 8, !tbaa !11
  %398 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %396, i64 %397
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %398, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !18
  br label %399

399:                                              ; preds = %393
  %400 = load i64, ptr %24, align 8, !tbaa !11
  %401 = add nsw i64 %400, 1
  store i64 %401, ptr %24, align 8, !tbaa !11
  br label %281, !llvm.loop !22

402:                                              ; preds = %281
  %403 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %403)
  %404 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %405 = trunc i8 %404 to i1
  store i1 %405, ptr %10, align 1
  store i32 1, ptr %30, align 4
  br label %906

406:                                              ; preds = %277, %274
  %407 = load i8, ptr %15, align 1, !tbaa !13, !range !15, !noundef !16
  %408 = trunc i8 %407 to i1
  br i1 %408, label %409, label %532

409:                                              ; preds = %406
  %410 = load i64, ptr %16, align 8, !tbaa !11
  %411 = icmp eq i64 %410, 1
  br i1 %411, label %412, label %532

412:                                              ; preds = %409
  store i64 0, ptr %24, align 8, !tbaa !11
  br label %413

413:                                              ; preds = %525, %412
  %414 = load i64, ptr %24, align 8, !tbaa !11
  %415 = load i64, ptr %13, align 8, !tbaa !11
  %416 = sub nsw i64 %415, 1
  %417 = icmp sle i64 %414, %416
  br i1 %417, label %418, label %528

418:                                              ; preds = %413
  %419 = load i8, ptr %17, align 1, !tbaa !13, !range !15, !noundef !16
  %420 = trunc i8 %419 to i1
  br i1 %420, label %421, label %428

421:                                              ; preds = %418
  call void @llvm.lifetime.start.p0(i64 16, ptr %50) #5
  %422 = load double, ptr %12, align 8, !tbaa !9
  %423 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %422)
  %424 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 0
  %425 = extractvalue { double, double } %423, 0
  store double %425, ptr %424, align 8
  %426 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 1
  %427 = extractvalue { double, double } %423, 1
  store double %427, ptr %426, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %50, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #5
  br label %447

428:                                              ; preds = %418
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #5
  %429 = load ptr, ptr %11, align 8, !tbaa !5
  %430 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %429, i32 0, i32 6
  %431 = load ptr, ptr %430, align 8, !tbaa !17
  %432 = load i64, ptr %24, align 8, !tbaa !11
  %433 = getelementptr inbounds ptr, ptr %431, i64 %432
  %434 = load ptr, ptr %433, align 8, !tbaa !5
  %435 = load i64, ptr %24, align 8, !tbaa !11
  %436 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %434, i64 %435
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %52, ptr align 8 %436, i64 16, i1 false), !tbaa.struct !18
  %437 = load double, ptr %12, align 8, !tbaa !9
  %438 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 0
  %439 = load double, ptr %438, align 8
  %440 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 1
  %441 = load double, ptr %440, align 8
  %442 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %439, double %441, double noundef %437)
  %443 = getelementptr inbounds { double, double }, ptr %51, i32 0, i32 0
  %444 = extractvalue { double, double } %442, 0
  store double %444, ptr %443, align 8
  %445 = getelementptr inbounds { double, double }, ptr %51, i32 0, i32 1
  %446 = extractvalue { double, double } %442, 1
  store double %446, ptr %445, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %51, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #5
  br label %447

447:                                              ; preds = %428, %421
  %448 = load ptr, ptr %14, align 8, !tbaa !5
  %449 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %448, i32 0, i32 4
  %450 = load ptr, ptr %449, align 8, !tbaa !17
  %451 = load i64, ptr %24, align 8, !tbaa !11
  %452 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %450, i64 %451
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %452, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %53, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %54, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !18
  %453 = load double, ptr %21, align 8, !tbaa !9
  %454 = load double, ptr %22, align 8, !tbaa !9
  %455 = load double, ptr %18, align 8, !tbaa !9
  %456 = load ptr, ptr %19, align 8, !tbaa !5
  %457 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 0
  %458 = load double, ptr %457, align 8
  %459 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 1
  %460 = load double, ptr %459, align 8
  %461 = getelementptr inbounds { double, double }, ptr %54, i32 0, i32 0
  %462 = load double, ptr %461, align 8
  %463 = getelementptr inbounds { double, double }, ptr %54, i32 0, i32 1
  %464 = load double, ptr %463, align 8
  %465 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %458, double %460, double %462, double %464, double noundef %453, double noundef %454, double noundef %455, ptr noundef %23, ptr noundef %27, ptr noundef %456)
  %466 = zext i1 %465 to i8
  store i8 %466, ptr %29, align 1, !tbaa !13
  %467 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %468 = trunc i8 %467 to i1
  br i1 %468, label %473, label %469

469:                                              ; preds = %447
  %470 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %470)
  %471 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %472 = trunc i8 %471 to i1
  store i1 %472, ptr %10, align 1
  store i32 1, ptr %30, align 4
  br label %906

473:                                              ; preds = %447
  %474 = load ptr, ptr %14, align 8, !tbaa !5
  %475 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %474, i32 0, i32 4
  %476 = load ptr, ptr %475, align 8, !tbaa !17
  %477 = load i64, ptr %24, align 8, !tbaa !11
  %478 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %476, i64 %477
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %478, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !18
  %479 = load i64, ptr %24, align 8, !tbaa !11
  %480 = load i64, ptr %13, align 8, !tbaa !11
  %481 = sub nsw i64 %480, 1
  %482 = icmp slt i64 %479, %481
  br i1 %482, label %483, label %524

483:                                              ; preds = %473
  %484 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %28, i32 0, i32 4
  %485 = load ptr, ptr %484, align 8, !tbaa !17
  %486 = load i64, ptr %24, align 8, !tbaa !11
  %487 = add nsw i64 %486, 1
  %488 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %485, i64 %487
  %489 = load ptr, ptr %11, align 8, !tbaa !5
  %490 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %489, i32 0, i32 6
  %491 = load ptr, ptr %490, align 8, !tbaa !17
  %492 = load i64, ptr %24, align 8, !tbaa !11
  %493 = getelementptr inbounds ptr, ptr %491, i64 %492
  %494 = load ptr, ptr %493, align 8, !tbaa !5
  %495 = load i64, ptr %24, align 8, !tbaa !11
  %496 = add nsw i64 %495, 1
  %497 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %494, i64 %496
  %498 = load i64, ptr %24, align 8, !tbaa !11
  %499 = add nsw i64 %498, 1
  %500 = load i64, ptr %13, align 8, !tbaa !11
  %501 = sub nsw i64 %500, 1
  %502 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %499, i64 noundef %501)
  %503 = load double, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl11ae_v_cmovedEPNS_10ae_complexElPKS0_lPKcld(ptr noundef %488, i64 noundef 1, ptr noundef %497, i64 noundef 1, ptr noundef @.str.30, i64 noundef %502, double noundef %503)
  %504 = load ptr, ptr %14, align 8, !tbaa !5
  %505 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %504, i32 0, i32 4
  %506 = load ptr, ptr %505, align 8, !tbaa !17
  %507 = load i64, ptr %24, align 8, !tbaa !11
  %508 = add nsw i64 %507, 1
  %509 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %506, i64 %508
  %510 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %28, i32 0, i32 4
  %511 = load ptr, ptr %510, align 8, !tbaa !17
  %512 = load i64, ptr %24, align 8, !tbaa !11
  %513 = add nsw i64 %512, 1
  %514 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %511, i64 %513
  %515 = load i64, ptr %24, align 8, !tbaa !11
  %516 = add nsw i64 %515, 1
  %517 = load i64, ptr %13, align 8, !tbaa !11
  %518 = sub nsw i64 %517, 1
  %519 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %516, i64 noundef %518)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %55, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !18
  %520 = getelementptr inbounds { double, double }, ptr %55, i32 0, i32 0
  %521 = load double, ptr %520, align 8
  %522 = getelementptr inbounds { double, double }, ptr %55, i32 0, i32 1
  %523 = load double, ptr %522, align 8
  call void @_ZN11alglib_impl10ae_v_csubcEPNS_10ae_complexElPKS0_lPKclS0_(ptr noundef %509, i64 noundef 1, ptr noundef %514, i64 noundef 1, ptr noundef @.str.30, i64 noundef %519, double %521, double %523)
  br label %524

524:                                              ; preds = %483, %473
  br label %525

525:                                              ; preds = %524
  %526 = load i64, ptr %24, align 8, !tbaa !11
  %527 = add nsw i64 %526, 1
  store i64 %527, ptr %24, align 8, !tbaa !11
  br label %413, !llvm.loop !23

528:                                              ; preds = %413
  %529 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %529)
  %530 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %531 = trunc i8 %530 to i1
  store i1 %531, ptr %10, align 1
  store i32 1, ptr %30, align 4
  br label %906

532:                                              ; preds = %409, %406
  %533 = load i8, ptr %15, align 1, !tbaa !13, !range !15, !noundef !16
  %534 = trunc i8 %533 to i1
  br i1 %534, label %644, label %535

535:                                              ; preds = %532
  %536 = load i64, ptr %16, align 8, !tbaa !11
  %537 = icmp eq i64 %536, 1
  br i1 %537, label %538, label %644

538:                                              ; preds = %535
  %539 = load i64, ptr %13, align 8, !tbaa !11
  %540 = sub nsw i64 %539, 1
  store i64 %540, ptr %24, align 8, !tbaa !11
  br label %541

541:                                              ; preds = %637, %538
  %542 = load i64, ptr %24, align 8, !tbaa !11
  %543 = icmp sge i64 %542, 0
  br i1 %543, label %544, label %640

544:                                              ; preds = %541
  %545 = load i8, ptr %17, align 1, !tbaa !13, !range !15, !noundef !16
  %546 = trunc i8 %545 to i1
  br i1 %546, label %547, label %554

547:                                              ; preds = %544
  call void @llvm.lifetime.start.p0(i64 16, ptr %56) #5
  %548 = load double, ptr %12, align 8, !tbaa !9
  %549 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %548)
  %550 = getelementptr inbounds { double, double }, ptr %56, i32 0, i32 0
  %551 = extractvalue { double, double } %549, 0
  store double %551, ptr %550, align 8
  %552 = getelementptr inbounds { double, double }, ptr %56, i32 0, i32 1
  %553 = extractvalue { double, double } %549, 1
  store double %553, ptr %552, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %56, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %56) #5
  br label %573

554:                                              ; preds = %544
  call void @llvm.lifetime.start.p0(i64 16, ptr %57) #5
  %555 = load ptr, ptr %11, align 8, !tbaa !5
  %556 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %555, i32 0, i32 6
  %557 = load ptr, ptr %556, align 8, !tbaa !17
  %558 = load i64, ptr %24, align 8, !tbaa !11
  %559 = getelementptr inbounds ptr, ptr %557, i64 %558
  %560 = load ptr, ptr %559, align 8, !tbaa !5
  %561 = load i64, ptr %24, align 8, !tbaa !11
  %562 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %560, i64 %561
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %58, ptr align 8 %562, i64 16, i1 false), !tbaa.struct !18
  %563 = load double, ptr %12, align 8, !tbaa !9
  %564 = getelementptr inbounds { double, double }, ptr %58, i32 0, i32 0
  %565 = load double, ptr %564, align 8
  %566 = getelementptr inbounds { double, double }, ptr %58, i32 0, i32 1
  %567 = load double, ptr %566, align 8
  %568 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %565, double %567, double noundef %563)
  %569 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 0
  %570 = extractvalue { double, double } %568, 0
  store double %570, ptr %569, align 8
  %571 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 1
  %572 = extractvalue { double, double } %568, 1
  store double %572, ptr %571, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %57, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #5
  br label %573

573:                                              ; preds = %554, %547
  %574 = load ptr, ptr %14, align 8, !tbaa !5
  %575 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %574, i32 0, i32 4
  %576 = load ptr, ptr %575, align 8, !tbaa !17
  %577 = load i64, ptr %24, align 8, !tbaa !11
  %578 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %576, i64 %577
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %578, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %59, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %60, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !18
  %579 = load double, ptr %21, align 8, !tbaa !9
  %580 = load double, ptr %22, align 8, !tbaa !9
  %581 = load double, ptr %18, align 8, !tbaa !9
  %582 = load ptr, ptr %19, align 8, !tbaa !5
  %583 = getelementptr inbounds { double, double }, ptr %59, i32 0, i32 0
  %584 = load double, ptr %583, align 8
  %585 = getelementptr inbounds { double, double }, ptr %59, i32 0, i32 1
  %586 = load double, ptr %585, align 8
  %587 = getelementptr inbounds { double, double }, ptr %60, i32 0, i32 0
  %588 = load double, ptr %587, align 8
  %589 = getelementptr inbounds { double, double }, ptr %60, i32 0, i32 1
  %590 = load double, ptr %589, align 8
  %591 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %584, double %586, double %588, double %590, double noundef %579, double noundef %580, double noundef %581, ptr noundef %23, ptr noundef %27, ptr noundef %582)
  %592 = zext i1 %591 to i8
  store i8 %592, ptr %29, align 1, !tbaa !13
  %593 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %594 = trunc i8 %593 to i1
  br i1 %594, label %599, label %595

595:                                              ; preds = %573
  %596 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %596)
  %597 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %598 = trunc i8 %597 to i1
  store i1 %598, ptr %10, align 1
  store i32 1, ptr %30, align 4
  br label %906

599:                                              ; preds = %573
  %600 = load ptr, ptr %14, align 8, !tbaa !5
  %601 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %600, i32 0, i32 4
  %602 = load ptr, ptr %601, align 8, !tbaa !17
  %603 = load i64, ptr %24, align 8, !tbaa !11
  %604 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %602, i64 %603
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %604, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !18
  %605 = load i64, ptr %24, align 8, !tbaa !11
  %606 = icmp sgt i64 %605, 0
  br i1 %606, label %607, label %636

607:                                              ; preds = %599
  %608 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %28, i32 0, i32 4
  %609 = load ptr, ptr %608, align 8, !tbaa !17
  %610 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %609, i64 0
  %611 = load ptr, ptr %11, align 8, !tbaa !5
  %612 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %611, i32 0, i32 6
  %613 = load ptr, ptr %612, align 8, !tbaa !17
  %614 = load i64, ptr %24, align 8, !tbaa !11
  %615 = getelementptr inbounds ptr, ptr %613, i64 %614
  %616 = load ptr, ptr %615, align 8, !tbaa !5
  %617 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %616, i64 0
  %618 = load i64, ptr %24, align 8, !tbaa !11
  %619 = sub nsw i64 %618, 1
  %620 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %619)
  %621 = load double, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl11ae_v_cmovedEPNS_10ae_complexElPKS0_lPKcld(ptr noundef %610, i64 noundef 1, ptr noundef %617, i64 noundef 1, ptr noundef @.str.30, i64 noundef %620, double noundef %621)
  %622 = load ptr, ptr %14, align 8, !tbaa !5
  %623 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %622, i32 0, i32 4
  %624 = load ptr, ptr %623, align 8, !tbaa !17
  %625 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %624, i64 0
  %626 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %28, i32 0, i32 4
  %627 = load ptr, ptr %626, align 8, !tbaa !17
  %628 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %627, i64 0
  %629 = load i64, ptr %24, align 8, !tbaa !11
  %630 = sub nsw i64 %629, 1
  %631 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %630)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %61, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !18
  %632 = getelementptr inbounds { double, double }, ptr %61, i32 0, i32 0
  %633 = load double, ptr %632, align 8
  %634 = getelementptr inbounds { double, double }, ptr %61, i32 0, i32 1
  %635 = load double, ptr %634, align 8
  call void @_ZN11alglib_impl10ae_v_csubcEPNS_10ae_complexElPKS0_lPKclS0_(ptr noundef %625, i64 noundef 1, ptr noundef %628, i64 noundef 1, ptr noundef @.str.30, i64 noundef %631, double %633, double %635)
  br label %636

636:                                              ; preds = %607, %599
  br label %637

637:                                              ; preds = %636
  %638 = load i64, ptr %24, align 8, !tbaa !11
  %639 = add nsw i64 %638, -1
  store i64 %639, ptr %24, align 8, !tbaa !11
  br label %541, !llvm.loop !24

640:                                              ; preds = %541
  %641 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %641)
  %642 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %643 = trunc i8 %642 to i1
  store i1 %643, ptr %10, align 1
  store i32 1, ptr %30, align 4
  br label %906

644:                                              ; preds = %535, %532
  %645 = load i8, ptr %15, align 1, !tbaa !13, !range !15, !noundef !16
  %646 = trunc i8 %645 to i1
  br i1 %646, label %647, label %780

647:                                              ; preds = %644
  %648 = load i64, ptr %16, align 8, !tbaa !11
  %649 = icmp eq i64 %648, 2
  br i1 %649, label %650, label %780

650:                                              ; preds = %647
  store i64 0, ptr %24, align 8, !tbaa !11
  br label %651

651:                                              ; preds = %773, %650
  %652 = load i64, ptr %24, align 8, !tbaa !11
  %653 = load i64, ptr %13, align 8, !tbaa !11
  %654 = sub nsw i64 %653, 1
  %655 = icmp sle i64 %652, %654
  br i1 %655, label %656, label %776

656:                                              ; preds = %651
  %657 = load i8, ptr %17, align 1, !tbaa !13, !range !15, !noundef !16
  %658 = trunc i8 %657 to i1
  br i1 %658, label %659, label %666

659:                                              ; preds = %656
  call void @llvm.lifetime.start.p0(i64 16, ptr %62) #5
  %660 = load double, ptr %12, align 8, !tbaa !9
  %661 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %660)
  %662 = getelementptr inbounds { double, double }, ptr %62, i32 0, i32 0
  %663 = extractvalue { double, double } %661, 0
  store double %663, ptr %662, align 8
  %664 = getelementptr inbounds { double, double }, ptr %62, i32 0, i32 1
  %665 = extractvalue { double, double } %661, 1
  store double %665, ptr %664, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %62, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %62) #5
  br label %695

666:                                              ; preds = %656
  call void @llvm.lifetime.start.p0(i64 16, ptr %63) #5
  %667 = load ptr, ptr %11, align 8, !tbaa !5
  %668 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %667, i32 0, i32 6
  %669 = load ptr, ptr %668, align 8, !tbaa !17
  %670 = load i64, ptr %24, align 8, !tbaa !11
  %671 = getelementptr inbounds ptr, ptr %669, i64 %670
  %672 = load ptr, ptr %671, align 8, !tbaa !5
  %673 = load i64, ptr %24, align 8, !tbaa !11
  %674 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %672, i64 %673
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %65, ptr align 8 %674, i64 16, i1 false), !tbaa.struct !18
  %675 = load ptr, ptr %19, align 8, !tbaa !5
  %676 = getelementptr inbounds { double, double }, ptr %65, i32 0, i32 0
  %677 = load double, ptr %676, align 8
  %678 = getelementptr inbounds { double, double }, ptr %65, i32 0, i32 1
  %679 = load double, ptr %678, align 8
  %680 = call { double, double } @_ZN11alglib_impl9ae_c_conjENS_10ae_complexEPNS_8ae_stateE(double %677, double %679, ptr noundef %675)
  %681 = getelementptr inbounds { double, double }, ptr %64, i32 0, i32 0
  %682 = extractvalue { double, double } %680, 0
  store double %682, ptr %681, align 8
  %683 = getelementptr inbounds { double, double }, ptr %64, i32 0, i32 1
  %684 = extractvalue { double, double } %680, 1
  store double %684, ptr %683, align 8
  %685 = load double, ptr %12, align 8, !tbaa !9
  %686 = getelementptr inbounds { double, double }, ptr %64, i32 0, i32 0
  %687 = load double, ptr %686, align 8
  %688 = getelementptr inbounds { double, double }, ptr %64, i32 0, i32 1
  %689 = load double, ptr %688, align 8
  %690 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %687, double %689, double noundef %685)
  %691 = getelementptr inbounds { double, double }, ptr %63, i32 0, i32 0
  %692 = extractvalue { double, double } %690, 0
  store double %692, ptr %691, align 8
  %693 = getelementptr inbounds { double, double }, ptr %63, i32 0, i32 1
  %694 = extractvalue { double, double } %690, 1
  store double %694, ptr %693, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %63, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %63) #5
  br label %695

695:                                              ; preds = %666, %659
  %696 = load ptr, ptr %14, align 8, !tbaa !5
  %697 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %696, i32 0, i32 4
  %698 = load ptr, ptr %697, align 8, !tbaa !17
  %699 = load i64, ptr %24, align 8, !tbaa !11
  %700 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %698, i64 %699
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %700, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %66, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %67, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !18
  %701 = load double, ptr %21, align 8, !tbaa !9
  %702 = load double, ptr %22, align 8, !tbaa !9
  %703 = load double, ptr %18, align 8, !tbaa !9
  %704 = load ptr, ptr %19, align 8, !tbaa !5
  %705 = getelementptr inbounds { double, double }, ptr %66, i32 0, i32 0
  %706 = load double, ptr %705, align 8
  %707 = getelementptr inbounds { double, double }, ptr %66, i32 0, i32 1
  %708 = load double, ptr %707, align 8
  %709 = getelementptr inbounds { double, double }, ptr %67, i32 0, i32 0
  %710 = load double, ptr %709, align 8
  %711 = getelementptr inbounds { double, double }, ptr %67, i32 0, i32 1
  %712 = load double, ptr %711, align 8
  %713 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %706, double %708, double %710, double %712, double noundef %701, double noundef %702, double noundef %703, ptr noundef %23, ptr noundef %27, ptr noundef %704)
  %714 = zext i1 %713 to i8
  store i8 %714, ptr %29, align 1, !tbaa !13
  %715 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %716 = trunc i8 %715 to i1
  br i1 %716, label %721, label %717

717:                                              ; preds = %695
  %718 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %718)
  %719 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %720 = trunc i8 %719 to i1
  store i1 %720, ptr %10, align 1
  store i32 1, ptr %30, align 4
  br label %906

721:                                              ; preds = %695
  %722 = load ptr, ptr %14, align 8, !tbaa !5
  %723 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %722, i32 0, i32 4
  %724 = load ptr, ptr %723, align 8, !tbaa !17
  %725 = load i64, ptr %24, align 8, !tbaa !11
  %726 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %724, i64 %725
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %726, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !18
  %727 = load i64, ptr %24, align 8, !tbaa !11
  %728 = load i64, ptr %13, align 8, !tbaa !11
  %729 = sub nsw i64 %728, 1
  %730 = icmp slt i64 %727, %729
  br i1 %730, label %731, label %772

731:                                              ; preds = %721
  %732 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %28, i32 0, i32 4
  %733 = load ptr, ptr %732, align 8, !tbaa !17
  %734 = load i64, ptr %24, align 8, !tbaa !11
  %735 = add nsw i64 %734, 1
  %736 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %733, i64 %735
  %737 = load ptr, ptr %11, align 8, !tbaa !5
  %738 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %737, i32 0, i32 6
  %739 = load ptr, ptr %738, align 8, !tbaa !17
  %740 = load i64, ptr %24, align 8, !tbaa !11
  %741 = getelementptr inbounds ptr, ptr %739, i64 %740
  %742 = load ptr, ptr %741, align 8, !tbaa !5
  %743 = load i64, ptr %24, align 8, !tbaa !11
  %744 = add nsw i64 %743, 1
  %745 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %742, i64 %744
  %746 = load i64, ptr %24, align 8, !tbaa !11
  %747 = add nsw i64 %746, 1
  %748 = load i64, ptr %13, align 8, !tbaa !11
  %749 = sub nsw i64 %748, 1
  %750 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %747, i64 noundef %749)
  %751 = load double, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl11ae_v_cmovedEPNS_10ae_complexElPKS0_lPKcld(ptr noundef %736, i64 noundef 1, ptr noundef %745, i64 noundef 1, ptr noundef @.str.31, i64 noundef %750, double noundef %751)
  %752 = load ptr, ptr %14, align 8, !tbaa !5
  %753 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %752, i32 0, i32 4
  %754 = load ptr, ptr %753, align 8, !tbaa !17
  %755 = load i64, ptr %24, align 8, !tbaa !11
  %756 = add nsw i64 %755, 1
  %757 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %754, i64 %756
  %758 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %28, i32 0, i32 4
  %759 = load ptr, ptr %758, align 8, !tbaa !17
  %760 = load i64, ptr %24, align 8, !tbaa !11
  %761 = add nsw i64 %760, 1
  %762 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %759, i64 %761
  %763 = load i64, ptr %24, align 8, !tbaa !11
  %764 = add nsw i64 %763, 1
  %765 = load i64, ptr %13, align 8, !tbaa !11
  %766 = sub nsw i64 %765, 1
  %767 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %764, i64 noundef %766)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %68, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !18
  %768 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 0
  %769 = load double, ptr %768, align 8
  %770 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 1
  %771 = load double, ptr %770, align 8
  call void @_ZN11alglib_impl10ae_v_csubcEPNS_10ae_complexElPKS0_lPKclS0_(ptr noundef %757, i64 noundef 1, ptr noundef %762, i64 noundef 1, ptr noundef @.str.30, i64 noundef %767, double %769, double %771)
  br label %772

772:                                              ; preds = %731, %721
  br label %773

773:                                              ; preds = %772
  %774 = load i64, ptr %24, align 8, !tbaa !11
  %775 = add nsw i64 %774, 1
  store i64 %775, ptr %24, align 8, !tbaa !11
  br label %651, !llvm.loop !25

776:                                              ; preds = %651
  %777 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %777)
  %778 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %779 = trunc i8 %778 to i1
  store i1 %779, ptr %10, align 1
  store i32 1, ptr %30, align 4
  br label %906

780:                                              ; preds = %647, %644
  %781 = load i8, ptr %15, align 1, !tbaa !13, !range !15, !noundef !16
  %782 = trunc i8 %781 to i1
  br i1 %782, label %902, label %783

783:                                              ; preds = %780
  %784 = load i64, ptr %16, align 8, !tbaa !11
  %785 = icmp eq i64 %784, 2
  br i1 %785, label %786, label %902

786:                                              ; preds = %783
  %787 = load i64, ptr %13, align 8, !tbaa !11
  %788 = sub nsw i64 %787, 1
  store i64 %788, ptr %24, align 8, !tbaa !11
  br label %789

789:                                              ; preds = %895, %786
  %790 = load i64, ptr %24, align 8, !tbaa !11
  %791 = icmp sge i64 %790, 0
  br i1 %791, label %792, label %898

792:                                              ; preds = %789
  %793 = load i8, ptr %17, align 1, !tbaa !13, !range !15, !noundef !16
  %794 = trunc i8 %793 to i1
  br i1 %794, label %795, label %802

795:                                              ; preds = %792
  call void @llvm.lifetime.start.p0(i64 16, ptr %69) #5
  %796 = load double, ptr %12, align 8, !tbaa !9
  %797 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %796)
  %798 = getelementptr inbounds { double, double }, ptr %69, i32 0, i32 0
  %799 = extractvalue { double, double } %797, 0
  store double %799, ptr %798, align 8
  %800 = getelementptr inbounds { double, double }, ptr %69, i32 0, i32 1
  %801 = extractvalue { double, double } %797, 1
  store double %801, ptr %800, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %69, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %69) #5
  br label %831

802:                                              ; preds = %792
  call void @llvm.lifetime.start.p0(i64 16, ptr %70) #5
  %803 = load ptr, ptr %11, align 8, !tbaa !5
  %804 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %803, i32 0, i32 6
  %805 = load ptr, ptr %804, align 8, !tbaa !17
  %806 = load i64, ptr %24, align 8, !tbaa !11
  %807 = getelementptr inbounds ptr, ptr %805, i64 %806
  %808 = load ptr, ptr %807, align 8, !tbaa !5
  %809 = load i64, ptr %24, align 8, !tbaa !11
  %810 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %808, i64 %809
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %72, ptr align 8 %810, i64 16, i1 false), !tbaa.struct !18
  %811 = load ptr, ptr %19, align 8, !tbaa !5
  %812 = getelementptr inbounds { double, double }, ptr %72, i32 0, i32 0
  %813 = load double, ptr %812, align 8
  %814 = getelementptr inbounds { double, double }, ptr %72, i32 0, i32 1
  %815 = load double, ptr %814, align 8
  %816 = call { double, double } @_ZN11alglib_impl9ae_c_conjENS_10ae_complexEPNS_8ae_stateE(double %813, double %815, ptr noundef %811)
  %817 = getelementptr inbounds { double, double }, ptr %71, i32 0, i32 0
  %818 = extractvalue { double, double } %816, 0
  store double %818, ptr %817, align 8
  %819 = getelementptr inbounds { double, double }, ptr %71, i32 0, i32 1
  %820 = extractvalue { double, double } %816, 1
  store double %820, ptr %819, align 8
  %821 = load double, ptr %12, align 8, !tbaa !9
  %822 = getelementptr inbounds { double, double }, ptr %71, i32 0, i32 0
  %823 = load double, ptr %822, align 8
  %824 = getelementptr inbounds { double, double }, ptr %71, i32 0, i32 1
  %825 = load double, ptr %824, align 8
  %826 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %823, double %825, double noundef %821)
  %827 = getelementptr inbounds { double, double }, ptr %70, i32 0, i32 0
  %828 = extractvalue { double, double } %826, 0
  store double %828, ptr %827, align 8
  %829 = getelementptr inbounds { double, double }, ptr %70, i32 0, i32 1
  %830 = extractvalue { double, double } %826, 1
  store double %830, ptr %829, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %70, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %70) #5
  br label %831

831:                                              ; preds = %802, %795
  %832 = load ptr, ptr %14, align 8, !tbaa !5
  %833 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %832, i32 0, i32 4
  %834 = load ptr, ptr %833, align 8, !tbaa !17
  %835 = load i64, ptr %24, align 8, !tbaa !11
  %836 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %834, i64 %835
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %836, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %73, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %74, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !18
  %837 = load double, ptr %21, align 8, !tbaa !9
  %838 = load double, ptr %22, align 8, !tbaa !9
  %839 = load double, ptr %18, align 8, !tbaa !9
  %840 = load ptr, ptr %19, align 8, !tbaa !5
  %841 = getelementptr inbounds { double, double }, ptr %73, i32 0, i32 0
  %842 = load double, ptr %841, align 8
  %843 = getelementptr inbounds { double, double }, ptr %73, i32 0, i32 1
  %844 = load double, ptr %843, align 8
  %845 = getelementptr inbounds { double, double }, ptr %74, i32 0, i32 0
  %846 = load double, ptr %845, align 8
  %847 = getelementptr inbounds { double, double }, ptr %74, i32 0, i32 1
  %848 = load double, ptr %847, align 8
  %849 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %842, double %844, double %846, double %848, double noundef %837, double noundef %838, double noundef %839, ptr noundef %23, ptr noundef %27, ptr noundef %840)
  %850 = zext i1 %849 to i8
  store i8 %850, ptr %29, align 1, !tbaa !13
  %851 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %852 = trunc i8 %851 to i1
  br i1 %852, label %857, label %853

853:                                              ; preds = %831
  %854 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %854)
  %855 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %856 = trunc i8 %855 to i1
  store i1 %856, ptr %10, align 1
  store i32 1, ptr %30, align 4
  br label %906

857:                                              ; preds = %831
  %858 = load ptr, ptr %14, align 8, !tbaa !5
  %859 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %858, i32 0, i32 4
  %860 = load ptr, ptr %859, align 8, !tbaa !17
  %861 = load i64, ptr %24, align 8, !tbaa !11
  %862 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %860, i64 %861
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %862, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !18
  %863 = load i64, ptr %24, align 8, !tbaa !11
  %864 = icmp sgt i64 %863, 0
  br i1 %864, label %865, label %894

865:                                              ; preds = %857
  %866 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %28, i32 0, i32 4
  %867 = load ptr, ptr %866, align 8, !tbaa !17
  %868 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %867, i64 0
  %869 = load ptr, ptr %11, align 8, !tbaa !5
  %870 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %869, i32 0, i32 6
  %871 = load ptr, ptr %870, align 8, !tbaa !17
  %872 = load i64, ptr %24, align 8, !tbaa !11
  %873 = getelementptr inbounds ptr, ptr %871, i64 %872
  %874 = load ptr, ptr %873, align 8, !tbaa !5
  %875 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %874, i64 0
  %876 = load i64, ptr %24, align 8, !tbaa !11
  %877 = sub nsw i64 %876, 1
  %878 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %877)
  %879 = load double, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl11ae_v_cmovedEPNS_10ae_complexElPKS0_lPKcld(ptr noundef %868, i64 noundef 1, ptr noundef %875, i64 noundef 1, ptr noundef @.str.31, i64 noundef %878, double noundef %879)
  %880 = load ptr, ptr %14, align 8, !tbaa !5
  %881 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %880, i32 0, i32 4
  %882 = load ptr, ptr %881, align 8, !tbaa !17
  %883 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %882, i64 0
  %884 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %28, i32 0, i32 4
  %885 = load ptr, ptr %884, align 8, !tbaa !17
  %886 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %885, i64 0
  %887 = load i64, ptr %24, align 8, !tbaa !11
  %888 = sub nsw i64 %887, 1
  %889 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %888)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %75, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !18
  %890 = getelementptr inbounds { double, double }, ptr %75, i32 0, i32 0
  %891 = load double, ptr %890, align 8
  %892 = getelementptr inbounds { double, double }, ptr %75, i32 0, i32 1
  %893 = load double, ptr %892, align 8
  call void @_ZN11alglib_impl10ae_v_csubcEPNS_10ae_complexElPKS0_lPKclS0_(ptr noundef %883, i64 noundef 1, ptr noundef %886, i64 noundef 1, ptr noundef @.str.30, i64 noundef %889, double %891, double %893)
  br label %894

894:                                              ; preds = %865, %857
  br label %895

895:                                              ; preds = %894
  %896 = load i64, ptr %24, align 8, !tbaa !11
  %897 = add nsw i64 %896, -1
  store i64 %897, ptr %24, align 8, !tbaa !11
  br label %789, !llvm.loop !26

898:                                              ; preds = %789
  %899 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %899)
  %900 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %901 = trunc i8 %900 to i1
  store i1 %901, ptr %10, align 1
  store i32 1, ptr %30, align 4
  br label %906

902:                                              ; preds = %783, %780
  store i8 0, ptr %29, align 1, !tbaa !13
  %903 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %903)
  %904 = load i8, ptr %29, align 1, !tbaa !13, !range !15, !noundef !16
  %905 = trunc i8 %904 to i1
  store i1 %905, ptr %10, align 1
  store i32 1, ptr %30, align 4
  br label %906

906:                                              ; preds = %902, %898, %853, %776, %717, %640, %595, %528, %469, %402, %389, %270, %257, %98
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  %907 = load i1, ptr %10, align 1
  ret i1 %907
}

declare void @_ZN11alglib_impl11ae_v_cmovedEPNS_10ae_complexElPKS0_lPKcld(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, double noundef) #1

declare { double, double } @_ZN11alglib_impl8ae_c_subENS_10ae_complexES0_(double, double, double, double) #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!7, !7, i64 0}
!18 = !{i64 0, i64 8, !9, i64 8, i64 8, !9}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}
!23 = distinct !{!23, !20}
!24 = distinct !{!24, !20}
!25 = distinct !{!25, !20}
!26 = distinct !{!26, !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_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_complex" = type { double, double }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon }
%union.anon = type { ptr }

@.str.30 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [37 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 noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #1

declare noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #1

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

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #1

; 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 { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef) local_unnamed_addr #1

declare { double, double } @_ZN11alglib_impl16ae_v_cdotproductEPKNS_10ae_complexElPKcS2_lS4_l(ptr noundef, i64 noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

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

declare noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double, double, ptr noundef) local_unnamed_addr #1

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

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

declare void @_ZN11alglib_impl10ae_v_csubcEPNS_10ae_complexElPKS0_lPKclS0_(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, double, double) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double, double, double, double, double noundef, double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl24cmatrixscaledtrsafesolveEPNS_9ae_matrixEdlPNS_9ae_vectorEblbdPNS_8ae_stateE(ptr nocapture noundef readonly %0, double noundef %1, i64 noundef %2, ptr nocapture noundef readonly %3, i1 noundef zeroext %4, i64 noundef %5, i1 noundef zeroext %6, double noundef %7, ptr noundef %8) local_unnamed_addr #4 {
  %10 = alloca %"struct.alglib_impl::ae_frame", align 8
  %11 = alloca double, align 8
  %12 = alloca %"struct.alglib_impl::ae_complex", align 8
  %13 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %8, ptr noundef nonnull %10)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %13, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %13, i64 noundef 0, i64 noundef 4, ptr noundef %8, i1 noundef zeroext true)
  %14 = icmp sgt i64 %2, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %14, ptr noundef nonnull @.str.35, ptr noundef %8)
  %15 = icmp eq i64 %5, 0
  %16 = icmp eq i64 %5, 1
  %17 = icmp eq i64 %5, 2
  %spec.select = icmp ult i64 %5, 3
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %spec.select, ptr noundef nonnull @.str.36, ptr noundef %8)
  %18 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 1.000000e+300, ptr noundef %8)
  %19 = icmp slt i64 %2, 1
  br i1 %19, label %._crit_edge417, label %.preheader396

.preheader396:                                    ; preds = %9
  %20 = getelementptr inbounds i8, ptr %3, i64 56
  br label %21

21:                                               ; preds = %.preheader396, %21
  %.0356398 = phi double [ 0.000000e+00, %.preheader396 ], [ %25, %21 ]
  %.0357397 = phi i64 [ 0, %.preheader396 ], [ %26, %21 ]
  %22 = load ptr, ptr %20, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %22, i64 %.0357397
  %.sroa.0101.0.copyload = load double, ptr %23, align 8, !tbaa !8
  %.sroa.2102.0..sroa_idx = getelementptr inbounds i8, ptr %23, i64 8
  %.sroa.2102.0.copyload = load double, ptr %.sroa.2102.0..sroa_idx, align 8, !tbaa !8
  %24 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %.sroa.0101.0.copyload, double %.sroa.2102.0.copyload, ptr noundef %8)
  %25 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.0356398, double noundef %24, ptr noundef %8)
  %26 = add nuw nsw i64 %.0357397, 1
  %exitcond.not = icmp eq i64 %26, %2
  br i1 %exitcond.not, label %27, label %21, !llvm.loop !10

27:                                               ; preds = %21
  %28 = add nsw i64 %2, -1
  store double 0.000000e+00, ptr %11, align 8, !tbaa !8
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %13, i64 noundef %2, ptr noundef %8)
  %or.cond3 = and i1 %15, %4
  br i1 %or.cond3, label %.lr.ph416, label %74

.lr.ph416:                                        ; preds = %27
  %29 = getelementptr inbounds i8, ptr %0, i64 72
  %30 = getelementptr inbounds i8, ptr %13, i64 56
  %.sroa.494.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  br label %31

31:                                               ; preds = %.lr.ph416, %69
  %.1415 = phi i64 [ %28, %.lr.ph416 ], [ %72, %69 ]
  br i1 %6, label %32, label %34

32:                                               ; preds = %31
  %33 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %1)
  br label %40

34:                                               ; preds = %31
  %35 = load ptr, ptr %29, align 8, !tbaa !5
  %36 = getelementptr inbounds ptr, ptr %35, i64 %.1415
  %37 = load ptr, ptr %36, align 8, !tbaa !12
  %38 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %37, i64 %.1415
  %.sroa.095.0.copyload = load double, ptr %38, align 8, !tbaa !8
  %.sroa.296.0..sroa_idx = getelementptr inbounds i8, ptr %38, i64 8
  %.sroa.296.0.copyload = load double, ptr %.sroa.296.0..sroa_idx, align 8, !tbaa !8
  %39 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %.sroa.095.0.copyload, double %.sroa.296.0.copyload, double noundef %1)
  br label %40

40:                                               ; preds = %34, %32
  %.pn389 = phi { double, double } [ %33, %32 ], [ %39, %34 ]
  %.sroa.20.0 = extractvalue { double, double } %.pn389, 1
  %.sroa.0138.0 = extractvalue { double, double } %.pn389, 0
  %41 = icmp slt i64 %.1415, %28
  br i1 %41, label %42, label %64

42:                                               ; preds = %40
  %43 = load ptr, ptr %30, align 8, !tbaa !5
  %44 = add nuw nsw i64 %.1415, 1
  %45 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %43, i64 %44
  %46 = load ptr, ptr %29, align 8, !tbaa !5
  %47 = getelementptr inbounds ptr, ptr %46, i64 %.1415
  %48 = load ptr, ptr %47, align 8, !tbaa !12
  %49 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %48, i64 %44
  %50 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %44, i64 noundef %28)
  call void @_ZN11alglib_impl11ae_v_cmovedEPNS_10ae_complexElPKS0_lPKcld(ptr noundef nonnull %45, i64 noundef 1, ptr noundef nonnull %49, i64 noundef 1, ptr noundef nonnull @.str.30, i64 noundef %50, double noundef %1)
  %51 = load ptr, ptr %30, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %51, i64 %44
  %53 = load ptr, ptr %20, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %53, i64 %44
  %55 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %44, i64 noundef %28)
  %56 = call { double, double } @_ZN11alglib_impl16ae_v_cdotproductEPKNS_10ae_complexElPKcS2_lS4_l(ptr noundef nonnull %52, i64 noundef 1, ptr noundef nonnull @.str.30, ptr noundef nonnull %54, i64 noundef 1, ptr noundef nonnull @.str.30, i64 noundef %55)
  %57 = extractvalue { double, double } %56, 0
  %58 = extractvalue { double, double } %56, 1
  store double %57, ptr %12, align 8, !tbaa !8
  store double %58, ptr %.sroa.494.0..sroa_idx, align 8, !tbaa !8
  %59 = load ptr, ptr %20, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %59, i64 %.1415
  %.sroa.089.0.copyload = load double, ptr %60, align 8, !tbaa !8
  %.sroa.290.0..sroa_idx = getelementptr inbounds i8, ptr %60, i64 8
  %.sroa.290.0.copyload = load double, ptr %.sroa.290.0..sroa_idx, align 8, !tbaa !8
  %61 = call { double, double } @_ZN11alglib_impl8ae_c_subENS_10ae_complexES0_(double %.sroa.089.0.copyload, double %.sroa.290.0.copyload, double %57, double %58)
  %62 = extractvalue { double, double } %61, 0
  %63 = extractvalue { double, double } %61, 1
  br label %67

64:                                               ; preds = %40
  %65 = load ptr, ptr %20, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %65, i64 %.1415
  %.sroa.0122.0.copyload = load double, ptr %66, align 8, !tbaa !8
  %.sroa.16.0..sroa_idx = getelementptr inbounds i8, ptr %66, i64 8
  %.sroa.16.0.copyload = load double, ptr %.sroa.16.0..sroa_idx, align 8, !tbaa !8
  br label %67

67:                                               ; preds = %64, %42
  %.sroa.0122.0 = phi double [ %62, %42 ], [ %.sroa.0122.0.copyload, %64 ]
  %.sroa.16.0 = phi double [ %63, %42 ], [ %.sroa.16.0.copyload, %64 ]
  %68 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %.sroa.0138.0, double %.sroa.20.0, double %.sroa.0122.0, double %.sroa.16.0, double noundef %18, double noundef %25, double noundef %7, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef %8)
  br i1 %68, label %69, label %._crit_edge417

69:                                               ; preds = %67
  %70 = load ptr, ptr %20, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %70, i64 %.1415
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %71, ptr noundef nonnull align 8 dereferenceable(16) %12, i64 16, i1 false), !tbaa.struct !14
  %72 = add nsw i64 %.1415, -1
  %73 = icmp sgt i64 %.1415, 0
  br i1 %73, label %31, label %._crit_edge417, !llvm.loop !15

74:                                               ; preds = %27
  %.not = xor i1 %4, true
  %or.cond5 = and i1 %15, %.not
  br i1 %or.cond5, label %.lr.ph413, label %119

.lr.ph413:                                        ; preds = %74
  %75 = getelementptr inbounds i8, ptr %0, i64 72
  %76 = getelementptr inbounds i8, ptr %13, i64 56
  %.sroa.476.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  br i1 %6, label %81, label %77

77:                                               ; preds = %.lr.ph413
  %78 = load ptr, ptr %75, align 8, !tbaa !5
  %79 = load ptr, ptr %78, align 8, !tbaa !12
  %.sroa.077.0.copyload.peel = load double, ptr %79, align 8, !tbaa !8
  %.sroa.278.0..sroa_idx.peel = getelementptr inbounds i8, ptr %79, i64 8
  %.sroa.278.0.copyload.peel = load double, ptr %.sroa.278.0..sroa_idx.peel, align 8, !tbaa !8
  %80 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %.sroa.077.0.copyload.peel, double %.sroa.278.0.copyload.peel, double noundef %1)
  br label %83

81:                                               ; preds = %.lr.ph413
  %82 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %1)
  br label %83

83:                                               ; preds = %81, %77
  %.pn386.peel = phi { double, double } [ %82, %81 ], [ %80, %77 ]
  %.sroa.20.1.peel = extractvalue { double, double } %.pn386.peel, 1
  %.sroa.0138.1.peel = extractvalue { double, double } %.pn386.peel, 0
  %84 = load ptr, ptr %20, align 8, !tbaa !5
  %.sroa.16.0..sroa_idx128.peel = getelementptr inbounds i8, ptr %84, i64 8
  %.sroa.16.0.copyload129.peel = load double, ptr %.sroa.16.0..sroa_idx128.peel, align 8, !tbaa !8
  %.sroa.0122.0.copyload123.peel = load double, ptr %84, align 8, !tbaa !8
  %85 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %.sroa.0138.1.peel, double %.sroa.20.1.peel, double %.sroa.0122.0.copyload123.peel, double %.sroa.16.0.copyload129.peel, double noundef %18, double noundef %25, double noundef %7, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef %8)
  br i1 %85, label %86, label %._crit_edge417

86:                                               ; preds = %83
  %87 = load ptr, ptr %20, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %87, ptr noundef nonnull align 8 dereferenceable(16) %12, i64 16, i1 false), !tbaa.struct !14
  %exitcond420.peel.not = icmp eq i64 %2, 1
  br i1 %exitcond420.peel.not, label %._crit_edge417, label %.peel.next

.peel.next:                                       ; preds = %86, %115
  %.2412 = phi i64 [ %118, %115 ], [ 1, %86 ]
  br i1 %6, label %88, label %90

88:                                               ; preds = %.peel.next
  %89 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %1)
  br label %96

90:                                               ; preds = %.peel.next
  %91 = load ptr, ptr %75, align 8, !tbaa !5
  %92 = getelementptr inbounds ptr, ptr %91, i64 %.2412
  %93 = load ptr, ptr %92, align 8, !tbaa !12
  %94 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %93, i64 %.2412
  %.sroa.077.0.copyload = load double, ptr %94, align 8, !tbaa !8
  %.sroa.278.0..sroa_idx = getelementptr inbounds i8, ptr %94, i64 8
  %.sroa.278.0.copyload = load double, ptr %.sroa.278.0..sroa_idx, align 8, !tbaa !8
  %95 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %.sroa.077.0.copyload, double %.sroa.278.0.copyload, double noundef %1)
  br label %96

96:                                               ; preds = %90, %88
  %.pn386 = phi { double, double } [ %89, %88 ], [ %95, %90 ]
  %.sroa.20.1 = extractvalue { double, double } %.pn386, 1
  %.sroa.0138.1 = extractvalue { double, double } %.pn386, 0
  %97 = load ptr, ptr %76, align 8, !tbaa !5
  %98 = load ptr, ptr %75, align 8, !tbaa !5
  %99 = getelementptr inbounds ptr, ptr %98, i64 %.2412
  %100 = load ptr, ptr %99, align 8, !tbaa !12
  %101 = add nsw i64 %.2412, -1
  %102 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %101)
  call void @_ZN11alglib_impl11ae_v_cmovedEPNS_10ae_complexElPKS0_lPKcld(ptr noundef %97, i64 noundef 1, ptr noundef %100, i64 noundef 1, ptr noundef nonnull @.str.30, i64 noundef %102, double noundef %1)
  %103 = load ptr, ptr %76, align 8, !tbaa !5
  %104 = load ptr, ptr %20, align 8, !tbaa !5
  %105 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %101)
  %106 = call { double, double } @_ZN11alglib_impl16ae_v_cdotproductEPKNS_10ae_complexElPKcS2_lS4_l(ptr noundef %103, i64 noundef 1, ptr noundef nonnull @.str.30, ptr noundef %104, i64 noundef 1, ptr noundef nonnull @.str.30, i64 noundef %105)
  %107 = extractvalue { double, double } %106, 0
  %108 = extractvalue { double, double } %106, 1
  store double %107, ptr %12, align 8, !tbaa !8
  store double %108, ptr %.sroa.476.0..sroa_idx, align 8, !tbaa !8
  %109 = load ptr, ptr %20, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %109, i64 %.2412
  %.sroa.071.0.copyload = load double, ptr %110, align 8, !tbaa !8
  %.sroa.272.0..sroa_idx = getelementptr inbounds i8, ptr %110, i64 8
  %.sroa.272.0.copyload = load double, ptr %.sroa.272.0..sroa_idx, align 8, !tbaa !8
  %111 = call { double, double } @_ZN11alglib_impl8ae_c_subENS_10ae_complexES0_(double %.sroa.071.0.copyload, double %.sroa.272.0.copyload, double %107, double %108)
  %112 = extractvalue { double, double } %111, 1
  %113 = extractvalue { double, double } %111, 0
  %114 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %.sroa.0138.1, double %.sroa.20.1, double %113, double %112, double noundef %18, double noundef %25, double noundef %7, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef %8)
  br i1 %114, label %115, label %._crit_edge417

115:                                              ; preds = %96
  %116 = load ptr, ptr %20, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %116, i64 %.2412
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %117, ptr noundef nonnull align 8 dereferenceable(16) %12, i64 16, i1 false), !tbaa.struct !14
  %118 = add nuw nsw i64 %.2412, 1
  %exitcond420.not = icmp eq i64 %118, %2
  br i1 %exitcond420.not, label %._crit_edge417, label %.peel.next, !llvm.loop !16

119:                                              ; preds = %74
  %or.cond7 = and i1 %16, %4
  br i1 %or.cond7, label %.lr.ph409, label %154

.lr.ph409:                                        ; preds = %119
  %120 = getelementptr inbounds i8, ptr %0, i64 72
  %121 = getelementptr inbounds i8, ptr %13, i64 56
  %.sroa.254.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  br label %122

122:                                              ; preds = %.lr.ph409, %153
  %.3408 = phi i64 [ 0, %.lr.ph409 ], [ %.pre-phi, %153 ]
  br i1 %6, label %123, label %125

123:                                              ; preds = %122
  %124 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %1)
  br label %131

125:                                              ; preds = %122
  %126 = load ptr, ptr %120, align 8, !tbaa !5
  %127 = getelementptr inbounds ptr, ptr %126, i64 %.3408
  %128 = load ptr, ptr %127, align 8, !tbaa !12
  %129 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %128, i64 %.3408
  %.sroa.059.0.copyload = load double, ptr %129, align 8, !tbaa !8
  %.sroa.260.0..sroa_idx = getelementptr inbounds i8, ptr %129, i64 8
  %.sroa.260.0.copyload = load double, ptr %.sroa.260.0..sroa_idx, align 8, !tbaa !8
  %130 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %.sroa.059.0.copyload, double %.sroa.260.0.copyload, double noundef %1)
  br label %131

131:                                              ; preds = %125, %123
  %.pn383 = phi { double, double } [ %124, %123 ], [ %130, %125 ]
  %.sroa.20.2 = extractvalue { double, double } %.pn383, 1
  %.sroa.0138.2 = extractvalue { double, double } %.pn383, 0
  %132 = load ptr, ptr %20, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %132, i64 %.3408
  %.sroa.0122.0.copyload124 = load double, ptr %133, align 8, !tbaa !8
  %.sroa.16.0..sroa_idx130 = getelementptr inbounds i8, ptr %133, i64 8
  %.sroa.16.0.copyload131 = load double, ptr %.sroa.16.0..sroa_idx130, align 8, !tbaa !8
  %134 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %.sroa.0138.2, double %.sroa.20.2, double %.sroa.0122.0.copyload124, double %.sroa.16.0.copyload131, double noundef %18, double noundef %25, double noundef %7, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef %8)
  br i1 %134, label %135, label %._crit_edge417

135:                                              ; preds = %131
  %136 = load ptr, ptr %20, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %136, i64 %.3408
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %137, ptr noundef nonnull align 8 dereferenceable(16) %12, i64 16, i1 false), !tbaa.struct !14
  %138 = icmp slt i64 %.3408, %28
  br i1 %138, label %139, label %._crit_edge425

._crit_edge425:                                   ; preds = %135
  %.pre = add nuw nsw i64 %.3408, 1
  br label %153

139:                                              ; preds = %135
  %140 = load ptr, ptr %121, align 8, !tbaa !5
  %141 = add nuw nsw i64 %.3408, 1
  %142 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %140, i64 %141
  %143 = load ptr, ptr %120, align 8, !tbaa !5
  %144 = getelementptr inbounds ptr, ptr %143, i64 %.3408
  %145 = load ptr, ptr %144, align 8, !tbaa !12
  %146 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %145, i64 %141
  %147 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %141, i64 noundef %28)
  call void @_ZN11alglib_impl11ae_v_cmovedEPNS_10ae_complexElPKS0_lPKcld(ptr noundef nonnull %142, i64 noundef 1, ptr noundef nonnull %146, i64 noundef 1, ptr noundef nonnull @.str.30, i64 noundef %147, double noundef %1)
  %148 = load ptr, ptr %20, align 8, !tbaa !5
  %149 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %148, i64 %141
  %150 = load ptr, ptr %121, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %150, i64 %141
  %152 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %141, i64 noundef %28)
  %.sroa.053.0.copyload = load double, ptr %12, align 8, !tbaa !8
  %.sroa.254.0.copyload = load double, ptr %.sroa.254.0..sroa_idx, align 8, !tbaa !8
  call void @_ZN11alglib_impl10ae_v_csubcEPNS_10ae_complexElPKS0_lPKclS0_(ptr noundef nonnull %149, i64 noundef 1, ptr noundef nonnull %151, i64 noundef 1, ptr noundef nonnull @.str.30, i64 noundef %152, double %.sroa.053.0.copyload, double %.sroa.254.0.copyload)
  br label %153

153:                                              ; preds = %._crit_edge425, %139
  %.pre-phi = phi i64 [ %.pre, %._crit_edge425 ], [ %141, %139 ]
  %exitcond419.not = icmp eq i64 %.pre-phi, %2
  br i1 %exitcond419.not, label %._crit_edge417, label %122, !llvm.loop !18

154:                                              ; preds = %119
  %or.cond10 = and i1 %16, %.not
  br i1 %or.cond10, label %.lr.ph405, label %183

.lr.ph405:                                        ; preds = %154
  %155 = getelementptr inbounds i8, ptr %0, i64 72
  %156 = getelementptr inbounds i8, ptr %13, i64 56
  %.sroa.242.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  br label %157

157:                                              ; preds = %.lr.ph405, %._crit_edge424
  %.4404 = phi i64 [ %28, %.lr.ph405 ], [ %177, %._crit_edge424 ]
  br i1 %6, label %158, label %160

158:                                              ; preds = %157
  %159 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %1)
  br label %166

160:                                              ; preds = %157
  %161 = load ptr, ptr %155, align 8, !tbaa !5
  %162 = getelementptr inbounds ptr, ptr %161, i64 %.4404
  %163 = load ptr, ptr %162, align 8, !tbaa !12
  %164 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %163, i64 %.4404
  %.sroa.047.0.copyload = load double, ptr %164, align 8, !tbaa !8
  %.sroa.248.0..sroa_idx = getelementptr inbounds i8, ptr %164, i64 8
  %.sroa.248.0.copyload = load double, ptr %.sroa.248.0..sroa_idx, align 8, !tbaa !8
  %165 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %.sroa.047.0.copyload, double %.sroa.248.0.copyload, double noundef %1)
  br label %166

166:                                              ; preds = %160, %158
  %.pn379 = phi { double, double } [ %159, %158 ], [ %165, %160 ]
  %.sroa.20.3 = extractvalue { double, double } %.pn379, 1
  %.sroa.0138.3 = extractvalue { double, double } %.pn379, 0
  %167 = load ptr, ptr %20, align 8, !tbaa !5
  %168 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %167, i64 %.4404
  %.sroa.0122.0.copyload125 = load double, ptr %168, align 8, !tbaa !8
  %.sroa.16.0..sroa_idx132 = getelementptr inbounds i8, ptr %168, i64 8
  %.sroa.16.0.copyload133 = load double, ptr %.sroa.16.0..sroa_idx132, align 8, !tbaa !8
  %169 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %.sroa.0138.3, double %.sroa.20.3, double %.sroa.0122.0.copyload125, double %.sroa.16.0.copyload133, double noundef %18, double noundef %25, double noundef %7, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef %8)
  br i1 %169, label %170, label %._crit_edge417

170:                                              ; preds = %166
  %171 = load ptr, ptr %20, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %171, i64 %.4404
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %172, ptr noundef nonnull align 8 dereferenceable(16) %12, i64 16, i1 false), !tbaa.struct !14
  %.not381 = icmp eq i64 %.4404, 0
  br i1 %.not381, label %._crit_edge417, label %._crit_edge424

._crit_edge424:                                   ; preds = %170
  %173 = load ptr, ptr %156, align 8, !tbaa !5
  %174 = load ptr, ptr %155, align 8, !tbaa !5
  %175 = getelementptr inbounds ptr, ptr %174, i64 %.4404
  %176 = load ptr, ptr %175, align 8, !tbaa !12
  %177 = add nsw i64 %.4404, -1
  %178 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %177)
  call void @_ZN11alglib_impl11ae_v_cmovedEPNS_10ae_complexElPKS0_lPKcld(ptr noundef %173, i64 noundef 1, ptr noundef %176, i64 noundef 1, ptr noundef nonnull @.str.30, i64 noundef %178, double noundef %1)
  %179 = load ptr, ptr %20, align 8, !tbaa !5
  %180 = load ptr, ptr %156, align 8, !tbaa !5
  %181 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %177)
  %.sroa.041.0.copyload = load double, ptr %12, align 8, !tbaa !8
  %.sroa.242.0.copyload = load double, ptr %.sroa.242.0..sroa_idx, align 8, !tbaa !8
  call void @_ZN11alglib_impl10ae_v_csubcEPNS_10ae_complexElPKS0_lPKclS0_(ptr noundef %179, i64 noundef 1, ptr noundef %180, i64 noundef 1, ptr noundef nonnull @.str.30, i64 noundef %181, double %.sroa.041.0.copyload, double %.sroa.242.0.copyload)
  %182 = icmp sgt i64 %.4404, 0
  br i1 %182, label %157, label %._crit_edge417, !llvm.loop !19

183:                                              ; preds = %154
  %or.cond12 = and i1 %17, %4
  br i1 %or.cond12, label %.lr.ph402, label %221

.lr.ph402:                                        ; preds = %183
  %184 = getelementptr inbounds i8, ptr %0, i64 72
  %185 = getelementptr inbounds i8, ptr %13, i64 56
  %.sroa.228.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  br label %186

186:                                              ; preds = %.lr.ph402, %220
  %.5401 = phi i64 [ 0, %.lr.ph402 ], [ %.pre-phi429, %220 ]
  br i1 %6, label %187, label %189

187:                                              ; preds = %186
  %188 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %1)
  br label %198

189:                                              ; preds = %186
  %190 = load ptr, ptr %184, align 8, !tbaa !5
  %191 = getelementptr inbounds ptr, ptr %190, i64 %.5401
  %192 = load ptr, ptr %191, align 8, !tbaa !12
  %193 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %192, i64 %.5401
  %.sroa.033.0.copyload = load double, ptr %193, align 8, !tbaa !8
  %.sroa.234.0..sroa_idx = getelementptr inbounds i8, ptr %193, i64 8
  %.sroa.234.0.copyload = load double, ptr %.sroa.234.0..sroa_idx, align 8, !tbaa !8
  %194 = call { double, double } @_ZN11alglib_impl9ae_c_conjENS_10ae_complexEPNS_8ae_stateE(double %.sroa.033.0.copyload, double %.sroa.234.0.copyload, ptr noundef %8)
  %195 = extractvalue { double, double } %194, 0
  %196 = extractvalue { double, double } %194, 1
  %197 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %195, double %196, double noundef %1)
  br label %198

198:                                              ; preds = %189, %187
  %.pn377 = phi { double, double } [ %188, %187 ], [ %197, %189 ]
  %.sroa.20.4 = extractvalue { double, double } %.pn377, 1
  %.sroa.0138.4 = extractvalue { double, double } %.pn377, 0
  %199 = load ptr, ptr %20, align 8, !tbaa !5
  %200 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %199, i64 %.5401
  %.sroa.0122.0.copyload126 = load double, ptr %200, align 8, !tbaa !8
  %.sroa.16.0..sroa_idx134 = getelementptr inbounds i8, ptr %200, i64 8
  %.sroa.16.0.copyload135 = load double, ptr %.sroa.16.0..sroa_idx134, align 8, !tbaa !8
  %201 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %.sroa.0138.4, double %.sroa.20.4, double %.sroa.0122.0.copyload126, double %.sroa.16.0.copyload135, double noundef %18, double noundef %25, double noundef %7, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef %8)
  br i1 %201, label %202, label %._crit_edge417

202:                                              ; preds = %198
  %203 = load ptr, ptr %20, align 8, !tbaa !5
  %204 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %203, i64 %.5401
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %204, ptr noundef nonnull align 8 dereferenceable(16) %12, i64 16, i1 false), !tbaa.struct !14
  %205 = icmp slt i64 %.5401, %28
  br i1 %205, label %206, label %._crit_edge423

._crit_edge423:                                   ; preds = %202
  %.pre428 = add nuw nsw i64 %.5401, 1
  br label %220

206:                                              ; preds = %202
  %207 = load ptr, ptr %185, align 8, !tbaa !5
  %208 = add nuw nsw i64 %.5401, 1
  %209 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %207, i64 %208
  %210 = load ptr, ptr %184, align 8, !tbaa !5
  %211 = getelementptr inbounds ptr, ptr %210, i64 %.5401
  %212 = load ptr, ptr %211, align 8, !tbaa !12
  %213 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %212, i64 %208
  %214 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %208, i64 noundef %28)
  call void @_ZN11alglib_impl11ae_v_cmovedEPNS_10ae_complexElPKS0_lPKcld(ptr noundef nonnull %209, i64 noundef 1, ptr noundef nonnull %213, i64 noundef 1, ptr noundef nonnull @.str.31, i64 noundef %214, double noundef %1)
  %215 = load ptr, ptr %20, align 8, !tbaa !5
  %216 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %215, i64 %208
  %217 = load ptr, ptr %185, align 8, !tbaa !5
  %218 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %217, i64 %208
  %219 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %208, i64 noundef %28)
  %.sroa.027.0.copyload = load double, ptr %12, align 8, !tbaa !8
  %.sroa.228.0.copyload = load double, ptr %.sroa.228.0..sroa_idx, align 8, !tbaa !8
  call void @_ZN11alglib_impl10ae_v_csubcEPNS_10ae_complexElPKS0_lPKclS0_(ptr noundef nonnull %216, i64 noundef 1, ptr noundef nonnull %218, i64 noundef 1, ptr noundef nonnull @.str.30, i64 noundef %219, double %.sroa.027.0.copyload, double %.sroa.228.0.copyload)
  br label %220

220:                                              ; preds = %._crit_edge423, %206
  %.pre-phi429 = phi i64 [ %.pre428, %._crit_edge423 ], [ %208, %206 ]
  %exitcond418.not = icmp eq i64 %.pre-phi429, %2
  br i1 %exitcond418.not, label %._crit_edge417, label %186, !llvm.loop !20

221:                                              ; preds = %183
  %or.cond15 = and i1 %17, %.not
  br i1 %or.cond15, label %.lr.ph, label %._crit_edge417

.lr.ph:                                           ; preds = %221
  %222 = getelementptr inbounds i8, ptr %0, i64 72
  %223 = getelementptr inbounds i8, ptr %13, i64 56
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  br label %224

224:                                              ; preds = %.lr.ph, %._crit_edge422
  %.6399 = phi i64 [ %28, %.lr.ph ], [ %247, %._crit_edge422 ]
  br i1 %6, label %225, label %227

225:                                              ; preds = %224
  %226 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %1)
  br label %236

227:                                              ; preds = %224
  %228 = load ptr, ptr %222, align 8, !tbaa !5
  %229 = getelementptr inbounds ptr, ptr %228, i64 %.6399
  %230 = load ptr, ptr %229, align 8, !tbaa !12
  %231 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %230, i64 %.6399
  %.sroa.020.0.copyload = load double, ptr %231, align 8, !tbaa !8
  %.sroa.221.0..sroa_idx = getelementptr inbounds i8, ptr %231, i64 8
  %.sroa.221.0.copyload = load double, ptr %.sroa.221.0..sroa_idx, align 8, !tbaa !8
  %232 = call { double, double } @_ZN11alglib_impl9ae_c_conjENS_10ae_complexEPNS_8ae_stateE(double %.sroa.020.0.copyload, double %.sroa.221.0.copyload, ptr noundef %8)
  %233 = extractvalue { double, double } %232, 0
  %234 = extractvalue { double, double } %232, 1
  %235 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %233, double %234, double noundef %1)
  br label %236

236:                                              ; preds = %227, %225
  %.pn = phi { double, double } [ %226, %225 ], [ %235, %227 ]
  %.sroa.20.5 = extractvalue { double, double } %.pn, 1
  %.sroa.0138.5 = extractvalue { double, double } %.pn, 0
  %237 = load ptr, ptr %20, align 8, !tbaa !5
  %238 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %237, i64 %.6399
  %.sroa.0122.0.copyload127 = load double, ptr %238, align 8, !tbaa !8
  %.sroa.16.0..sroa_idx136 = getelementptr inbounds i8, ptr %238, i64 8
  %.sroa.16.0.copyload137 = load double, ptr %.sroa.16.0..sroa_idx136, align 8, !tbaa !8
  %239 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %.sroa.0138.5, double %.sroa.20.5, double %.sroa.0122.0.copyload127, double %.sroa.16.0.copyload137, double noundef %18, double noundef %25, double noundef %7, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef %8)
  br i1 %239, label %240, label %._crit_edge417

240:                                              ; preds = %236
  %241 = load ptr, ptr %20, align 8, !tbaa !5
  %242 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %241, i64 %.6399
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %242, ptr noundef nonnull align 8 dereferenceable(16) %12, i64 16, i1 false), !tbaa.struct !14
  %.not375 = icmp eq i64 %.6399, 0
  br i1 %.not375, label %._crit_edge417, label %._crit_edge422

._crit_edge422:                                   ; preds = %240
  %243 = load ptr, ptr %223, align 8, !tbaa !5
  %244 = load ptr, ptr %222, align 8, !tbaa !5
  %245 = getelementptr inbounds ptr, ptr %244, i64 %.6399
  %246 = load ptr, ptr %245, align 8, !tbaa !12
  %247 = add nsw i64 %.6399, -1
  %248 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %247)
  call void @_ZN11alglib_impl11ae_v_cmovedEPNS_10ae_complexElPKS0_lPKcld(ptr noundef %243, i64 noundef 1, ptr noundef %246, i64 noundef 1, ptr noundef nonnull @.str.31, i64 noundef %248, double noundef %1)
  %249 = load ptr, ptr %20, align 8, !tbaa !5
  %250 = load ptr, ptr %223, align 8, !tbaa !5
  %251 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %247)
  %.sroa.0.0.copyload = load double, ptr %12, align 8, !tbaa !8
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !8
  call void @_ZN11alglib_impl10ae_v_csubcEPNS_10ae_complexElPKS0_lPKclS0_(ptr noundef %249, i64 noundef 1, ptr noundef %250, i64 noundef 1, ptr noundef nonnull @.str.30, i64 noundef %251, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %252 = icmp sgt i64 %.6399, 0
  br i1 %252, label %224, label %._crit_edge417, !llvm.loop !21

._crit_edge417:                                   ; preds = %._crit_edge422, %240, %236, %220, %198, %._crit_edge424, %170, %166, %153, %131, %115, %96, %69, %67, %221, %86, %83, %9
  %.0 = phi i1 [ true, %9 ], [ false, %83 ], [ true, %86 ], [ false, %221 ], [ %68, %67 ], [ %68, %69 ], [ %114, %96 ], [ %114, %115 ], [ %134, %131 ], [ %134, %153 ], [ %169, %166 ], [ %169, %170 ], [ %169, %._crit_edge424 ], [ %201, %198 ], [ %201, %220 ], [ %239, %236 ], [ %239, %240 ], [ %239, %._crit_edge422 ]
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %8)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  ret i1 %.0
}

declare void @_ZN11alglib_impl11ae_v_cmovedEPNS_10ae_complexElPKS0_lPKcld(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, double noundef) local_unnamed_addr #1

declare { double, double } @_ZN11alglib_impl8ae_c_subENS_10ae_complexES0_(double, double, double, double) 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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 = !{!"double", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !6, i64 0}
!14 = !{i64 0, i64 8, !8, i64 8, i64 8, !8}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11, !17}
!17 = !{!"llvm.loop.peeled.count", i32 1}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !11}
!20 = distinct !{!20, !11}
!21 = distinct !{!21, !11}


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