; 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.33 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.34 = 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_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr noundef) #1

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 noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl24rmatrixscaledtrsafesolveEPNS_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 double, align 8
  %28 = alloca %"struct.alglib_impl::ae_complex", align 8
  %29 = alloca %"struct.alglib_impl::ae_vector", align 8
  %30 = alloca i8, align 1
  %31 = alloca i32, align 4
  %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
  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
  %54 = zext i1 %4 to i8
  store i8 %54, ptr %15, align 1, !tbaa !13
  store i64 %5, ptr %16, align 8, !tbaa !11
  %55 = zext i1 %6 to i8
  store i8 %55, 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 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #5
  %56 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %56, ptr noundef %20)
  call void @llvm.memset.p0.i64(ptr align 8 %29, i8 0, i64 64, i1 false)
  %57 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %29, i64 noundef 0, i64 noundef 3, ptr noundef %57, i1 noundef zeroext true)
  %58 = load i64, ptr %13, align 8, !tbaa !11
  %59 = icmp sgt i64 %58, 0
  %60 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %59, ptr noundef @.str.33, ptr noundef %60)
  %61 = load i64, ptr %16, align 8, !tbaa !11
  %62 = icmp eq i64 %61, 0
  br i1 %62, label %66, label %63

63:                                               ; preds = %9
  %64 = load i64, ptr %16, align 8, !tbaa !11
  %65 = icmp eq i64 %64, 1
  br label %66

66:                                               ; preds = %63, %9
  %67 = phi i1 [ true, %9 ], [ %65, %63 ]
  %68 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %67, ptr noundef @.str.34, ptr noundef %68)
  store i8 1, ptr %30, align 1, !tbaa !13
  %69 = load ptr, ptr %19, align 8, !tbaa !5
  %70 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 1.000000e+300, ptr noundef %69)
  store double %70, ptr %21, align 8, !tbaa !9
  %71 = load i64, ptr %13, align 8, !tbaa !11
  %72 = icmp sle i64 %71, 0
  br i1 %72, label %73, label %77

73:                                               ; preds = %66
  %74 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %74)
  %75 = load i8, ptr %30, align 1, !tbaa !13, !range !15, !noundef !16
  %76 = trunc i8 %75 to i1
  store i1 %76, ptr %10, align 1
  store i32 1, ptr %31, align 4
  br label %624

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

78:                                               ; preds = %95, %77
  %79 = load i64, ptr %24, align 8, !tbaa !11
  %80 = load i64, ptr %13, align 8, !tbaa !11
  %81 = sub nsw i64 %80, 1
  %82 = icmp sle i64 %79, %81
  br i1 %82, label %83, label %98

83:                                               ; preds = %78
  %84 = load double, ptr %22, align 8, !tbaa !9
  %85 = load ptr, ptr %14, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %85, i32 0, i32 4
  %87 = load ptr, ptr %86, align 8, !tbaa !17
  %88 = load i64, ptr %24, align 8, !tbaa !11
  %89 = getelementptr inbounds double, ptr %87, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !9
  %91 = load ptr, ptr %19, align 8, !tbaa !5
  %92 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %90, ptr noundef %91)
  %93 = load ptr, ptr %19, align 8, !tbaa !5
  %94 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %84, double noundef %92, ptr noundef %93)
  store double %94, ptr %22, align 8, !tbaa !9
  br label %95

95:                                               ; preds = %83
  %96 = load i64, ptr %24, align 8, !tbaa !11
  %97 = add nsw i64 %96, 1
  store i64 %97, ptr %24, align 8, !tbaa !11
  br label %78, !llvm.loop !18

98:                                               ; preds = %78
  store double 0.000000e+00, ptr %23, align 8, !tbaa !9
  %99 = load i64, ptr %13, align 8, !tbaa !11
  %100 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %29, i64 noundef %99, ptr noundef %100)
  store i8 1, ptr %30, align 1, !tbaa !13
  %101 = load i8, ptr %15, align 1, !tbaa !13, !range !15, !noundef !16
  %102 = trunc i8 %101 to i1
  br i1 %102, label %103, label %243

103:                                              ; preds = %98
  %104 = load i64, ptr %16, align 8, !tbaa !11
  %105 = icmp eq i64 %104, 0
  br i1 %105, label %106, label %243

106:                                              ; preds = %103
  %107 = load i64, ptr %13, align 8, !tbaa !11
  %108 = sub nsw i64 %107, 1
  store i64 %108, ptr %24, align 8, !tbaa !11
  br label %109

109:                                              ; preds = %236, %106
  %110 = load i64, ptr %24, align 8, !tbaa !11
  %111 = icmp sge i64 %110, 0
  br i1 %111, label %112, label %239

112:                                              ; preds = %109
  %113 = load i8, ptr %17, align 1, !tbaa !13, !range !15, !noundef !16
  %114 = trunc i8 %113 to i1
  br i1 %114, label %115, label %122

115:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #5
  %116 = load double, ptr %12, align 8, !tbaa !9
  %117 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %116)
  %118 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %119 = extractvalue { double, double } %117, 0
  store double %119, ptr %118, align 8
  %120 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %121 = extractvalue { double, double } %117, 1
  store double %121, ptr %120, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %32, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #5
  br label %139

122:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #5
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %123, i32 0, i32 6
  %125 = load ptr, ptr %124, align 8, !tbaa !17
  %126 = load i64, ptr %24, align 8, !tbaa !11
  %127 = getelementptr inbounds ptr, ptr %125, i64 %126
  %128 = load ptr, ptr %127, align 8, !tbaa !5
  %129 = load i64, ptr %24, align 8, !tbaa !11
  %130 = getelementptr inbounds double, ptr %128, i64 %129
  %131 = load double, ptr %130, align 8, !tbaa !9
  %132 = load double, ptr %12, align 8, !tbaa !9
  %133 = fmul double %131, %132
  %134 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %133)
  %135 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %136 = extractvalue { double, double } %134, 0
  store double %136, ptr %135, align 8
  %137 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %138 = extractvalue { double, double } %134, 1
  store double %138, ptr %137, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %33, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #5
  br label %139

139:                                              ; preds = %122, %115
  %140 = load i64, ptr %24, align 8, !tbaa !11
  %141 = load i64, ptr %13, align 8, !tbaa !11
  %142 = sub nsw i64 %141, 1
  %143 = icmp slt i64 %140, %142
  br i1 %143, label %144, label %195

144:                                              ; preds = %139
  %145 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %146 = load ptr, ptr %145, align 8, !tbaa !17
  %147 = load i64, ptr %24, align 8, !tbaa !11
  %148 = add nsw i64 %147, 1
  %149 = getelementptr inbounds double, ptr %146, i64 %148
  %150 = load ptr, ptr %11, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %150, i32 0, i32 6
  %152 = load ptr, ptr %151, align 8, !tbaa !17
  %153 = load i64, ptr %24, align 8, !tbaa !11
  %154 = getelementptr inbounds ptr, ptr %152, i64 %153
  %155 = load ptr, ptr %154, align 8, !tbaa !5
  %156 = load i64, ptr %24, align 8, !tbaa !11
  %157 = add nsw i64 %156, 1
  %158 = getelementptr inbounds double, ptr %155, i64 %157
  %159 = load i64, ptr %24, align 8, !tbaa !11
  %160 = add nsw i64 %159, 1
  %161 = load i64, ptr %13, align 8, !tbaa !11
  %162 = sub nsw i64 %161, 1
  %163 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %160, i64 noundef %162)
  %164 = load double, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl10ae_v_movedEPdlPKdlld(ptr noundef %149, i64 noundef 1, ptr noundef %158, i64 noundef 1, i64 noundef %163, double noundef %164)
  %165 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %166 = load ptr, ptr %165, align 8, !tbaa !17
  %167 = load i64, ptr %24, align 8, !tbaa !11
  %168 = add nsw i64 %167, 1
  %169 = getelementptr inbounds double, ptr %166, i64 %168
  %170 = load ptr, ptr %14, align 8, !tbaa !5
  %171 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %170, i32 0, i32 4
  %172 = load ptr, ptr %171, align 8, !tbaa !17
  %173 = load i64, ptr %24, align 8, !tbaa !11
  %174 = add nsw i64 %173, 1
  %175 = getelementptr inbounds double, ptr %172, i64 %174
  %176 = load i64, ptr %24, align 8, !tbaa !11
  %177 = add nsw i64 %176, 1
  %178 = load i64, ptr %13, align 8, !tbaa !11
  %179 = sub nsw i64 %178, 1
  %180 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %177, i64 noundef %179)
  %181 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %169, i64 noundef 1, ptr noundef %175, i64 noundef 1, i64 noundef %180)
  store double %181, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #5
  %182 = load ptr, ptr %14, align 8, !tbaa !5
  %183 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %182, i32 0, i32 4
  %184 = load ptr, ptr %183, align 8, !tbaa !17
  %185 = load i64, ptr %24, align 8, !tbaa !11
  %186 = getelementptr inbounds double, ptr %184, i64 %185
  %187 = load double, ptr %186, align 8, !tbaa !9
  %188 = load double, ptr %27, align 8, !tbaa !9
  %189 = fsub double %187, %188
  %190 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %189)
  %191 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 0
  %192 = extractvalue { double, double } %190, 0
  store double %192, ptr %191, align 8
  %193 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 1
  %194 = extractvalue { double, double } %190, 1
  store double %194, ptr %193, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %34, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #5
  br label %207

195:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #5
  %196 = load ptr, ptr %14, align 8, !tbaa !5
  %197 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %196, i32 0, i32 4
  %198 = load ptr, ptr %197, align 8, !tbaa !17
  %199 = load i64, ptr %24, align 8, !tbaa !11
  %200 = getelementptr inbounds double, ptr %198, i64 %199
  %201 = load double, ptr %200, align 8, !tbaa !9
  %202 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %201)
  %203 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %204 = extractvalue { double, double } %202, 0
  store double %204, ptr %203, align 8
  %205 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %206 = extractvalue { double, double } %202, 1
  store double %206, ptr %205, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %35, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #5
  br label %207

207:                                              ; preds = %195, %144
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %36, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %37, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !20
  %208 = load double, ptr %21, align 8, !tbaa !9
  %209 = load double, ptr %22, align 8, !tbaa !9
  %210 = load double, ptr %18, align 8, !tbaa !9
  %211 = load ptr, ptr %19, align 8, !tbaa !5
  %212 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 0
  %213 = load double, ptr %212, align 8
  %214 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 1
  %215 = load double, ptr %214, align 8
  %216 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %217 = load double, ptr %216, align 8
  %218 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %219 = load double, ptr %218, align 8
  %220 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %213, double %215, double %217, double %219, double noundef %208, double noundef %209, double noundef %210, ptr noundef %23, ptr noundef %28, ptr noundef %211)
  %221 = zext i1 %220 to i8
  store i8 %221, ptr %30, align 1, !tbaa !13
  %222 = load i8, ptr %30, align 1, !tbaa !13, !range !15, !noundef !16
  %223 = trunc i8 %222 to i1
  br i1 %223, label %228, label %224

224:                                              ; preds = %207
  %225 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %225)
  %226 = load i8, ptr %30, align 1, !tbaa !13, !range !15, !noundef !16
  %227 = trunc i8 %226 to i1
  store i1 %227, ptr %10, align 1
  store i32 1, ptr %31, align 4
  br label %624

228:                                              ; preds = %207
  %229 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %28, i32 0, i32 0
  %230 = load double, ptr %229, align 8, !tbaa !21
  %231 = load ptr, ptr %14, align 8, !tbaa !5
  %232 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %231, i32 0, i32 4
  %233 = load ptr, ptr %232, align 8, !tbaa !17
  %234 = load i64, ptr %24, align 8, !tbaa !11
  %235 = getelementptr inbounds double, ptr %233, i64 %234
  store double %230, ptr %235, align 8, !tbaa !9
  br label %236

236:                                              ; preds = %228
  %237 = load i64, ptr %24, align 8, !tbaa !11
  %238 = add nsw i64 %237, -1
  store i64 %238, ptr %24, align 8, !tbaa !11
  br label %109, !llvm.loop !23

239:                                              ; preds = %109
  %240 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %240)
  %241 = load i8, ptr %30, align 1, !tbaa !13, !range !15, !noundef !16
  %242 = trunc i8 %241 to i1
  store i1 %242, ptr %10, align 1
  store i32 1, ptr %31, align 4
  br label %624

243:                                              ; preds = %103, %98
  %244 = load i8, ptr %15, align 1, !tbaa !13, !range !15, !noundef !16
  %245 = trunc i8 %244 to i1
  br i1 %245, label %372, label %246

246:                                              ; preds = %243
  %247 = load i64, ptr %16, align 8, !tbaa !11
  %248 = icmp eq i64 %247, 0
  br i1 %248, label %249, label %372

249:                                              ; preds = %246
  store i64 0, ptr %24, align 8, !tbaa !11
  br label %250

250:                                              ; preds = %365, %249
  %251 = load i64, ptr %24, align 8, !tbaa !11
  %252 = load i64, ptr %13, align 8, !tbaa !11
  %253 = sub nsw i64 %252, 1
  %254 = icmp sle i64 %251, %253
  br i1 %254, label %255, label %368

255:                                              ; preds = %250
  %256 = load i8, ptr %17, align 1, !tbaa !13, !range !15, !noundef !16
  %257 = trunc i8 %256 to i1
  br i1 %257, label %258, label %265

258:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 16, ptr %38) #5
  %259 = load double, ptr %12, align 8, !tbaa !9
  %260 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %259)
  %261 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 0
  %262 = extractvalue { double, double } %260, 0
  store double %262, ptr %261, align 8
  %263 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 1
  %264 = extractvalue { double, double } %260, 1
  store double %264, ptr %263, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %38, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #5
  br label %282

265:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #5
  %266 = load ptr, ptr %11, align 8, !tbaa !5
  %267 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %266, i32 0, i32 6
  %268 = load ptr, ptr %267, align 8, !tbaa !17
  %269 = load i64, ptr %24, align 8, !tbaa !11
  %270 = getelementptr inbounds ptr, ptr %268, i64 %269
  %271 = load ptr, ptr %270, align 8, !tbaa !5
  %272 = load i64, ptr %24, align 8, !tbaa !11
  %273 = getelementptr inbounds double, ptr %271, i64 %272
  %274 = load double, ptr %273, align 8, !tbaa !9
  %275 = load double, ptr %12, align 8, !tbaa !9
  %276 = fmul double %274, %275
  %277 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %276)
  %278 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 0
  %279 = extractvalue { double, double } %277, 0
  store double %279, ptr %278, align 8
  %280 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 1
  %281 = extractvalue { double, double } %277, 1
  store double %281, ptr %280, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %39, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #5
  br label %282

282:                                              ; preds = %265, %258
  %283 = load i64, ptr %24, align 8, !tbaa !11
  %284 = icmp sgt i64 %283, 0
  br i1 %284, label %285, label %324

285:                                              ; preds = %282
  %286 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %287 = load ptr, ptr %286, align 8, !tbaa !17
  %288 = getelementptr inbounds double, ptr %287, i64 0
  %289 = load ptr, ptr %11, align 8, !tbaa !5
  %290 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %289, i32 0, i32 6
  %291 = load ptr, ptr %290, align 8, !tbaa !17
  %292 = load i64, ptr %24, align 8, !tbaa !11
  %293 = getelementptr inbounds ptr, ptr %291, i64 %292
  %294 = load ptr, ptr %293, align 8, !tbaa !5
  %295 = getelementptr inbounds double, ptr %294, i64 0
  %296 = load i64, ptr %24, align 8, !tbaa !11
  %297 = sub nsw i64 %296, 1
  %298 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %297)
  %299 = load double, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl10ae_v_movedEPdlPKdlld(ptr noundef %288, i64 noundef 1, ptr noundef %295, i64 noundef 1, i64 noundef %298, double noundef %299)
  %300 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %301 = load ptr, ptr %300, align 8, !tbaa !17
  %302 = getelementptr inbounds double, ptr %301, i64 0
  %303 = load ptr, ptr %14, align 8, !tbaa !5
  %304 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %303, i32 0, i32 4
  %305 = load ptr, ptr %304, align 8, !tbaa !17
  %306 = getelementptr inbounds double, ptr %305, i64 0
  %307 = load i64, ptr %24, align 8, !tbaa !11
  %308 = sub nsw i64 %307, 1
  %309 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %308)
  %310 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %302, i64 noundef 1, ptr noundef %306, i64 noundef 1, i64 noundef %309)
  store double %310, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #5
  %311 = load ptr, ptr %14, align 8, !tbaa !5
  %312 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %311, i32 0, i32 4
  %313 = load ptr, ptr %312, align 8, !tbaa !17
  %314 = load i64, ptr %24, align 8, !tbaa !11
  %315 = getelementptr inbounds double, ptr %313, i64 %314
  %316 = load double, ptr %315, align 8, !tbaa !9
  %317 = load double, ptr %27, align 8, !tbaa !9
  %318 = fsub double %316, %317
  %319 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %318)
  %320 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 0
  %321 = extractvalue { double, double } %319, 0
  store double %321, ptr %320, align 8
  %322 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 1
  %323 = extractvalue { double, double } %319, 1
  store double %323, ptr %322, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %40, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #5
  br label %336

324:                                              ; preds = %282
  call void @llvm.lifetime.start.p0(i64 16, ptr %41) #5
  %325 = load ptr, ptr %14, align 8, !tbaa !5
  %326 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %325, i32 0, i32 4
  %327 = load ptr, ptr %326, align 8, !tbaa !17
  %328 = load i64, ptr %24, align 8, !tbaa !11
  %329 = getelementptr inbounds double, ptr %327, i64 %328
  %330 = load double, ptr %329, align 8, !tbaa !9
  %331 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %330)
  %332 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %333 = extractvalue { double, double } %331, 0
  store double %333, ptr %332, align 8
  %334 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %335 = extractvalue { double, double } %331, 1
  store double %335, ptr %334, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %41, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #5
  br label %336

336:                                              ; preds = %324, %285
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %42, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %43, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !20
  %337 = load double, ptr %21, align 8, !tbaa !9
  %338 = load double, ptr %22, align 8, !tbaa !9
  %339 = load double, ptr %18, align 8, !tbaa !9
  %340 = load ptr, ptr %19, align 8, !tbaa !5
  %341 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 0
  %342 = load double, ptr %341, align 8
  %343 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 1
  %344 = load double, ptr %343, align 8
  %345 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 0
  %346 = load double, ptr %345, align 8
  %347 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 1
  %348 = load double, ptr %347, align 8
  %349 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %342, double %344, double %346, double %348, double noundef %337, double noundef %338, double noundef %339, ptr noundef %23, ptr noundef %28, ptr noundef %340)
  %350 = zext i1 %349 to i8
  store i8 %350, ptr %30, align 1, !tbaa !13
  %351 = load i8, ptr %30, align 1, !tbaa !13, !range !15, !noundef !16
  %352 = trunc i8 %351 to i1
  br i1 %352, label %357, label %353

353:                                              ; preds = %336
  %354 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %354)
  %355 = load i8, ptr %30, align 1, !tbaa !13, !range !15, !noundef !16
  %356 = trunc i8 %355 to i1
  store i1 %356, ptr %10, align 1
  store i32 1, ptr %31, align 4
  br label %624

357:                                              ; preds = %336
  %358 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %28, i32 0, i32 0
  %359 = load double, ptr %358, align 8, !tbaa !21
  %360 = load ptr, ptr %14, align 8, !tbaa !5
  %361 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %360, i32 0, i32 4
  %362 = load ptr, ptr %361, align 8, !tbaa !17
  %363 = load i64, ptr %24, align 8, !tbaa !11
  %364 = getelementptr inbounds double, ptr %362, i64 %363
  store double %359, ptr %364, align 8, !tbaa !9
  br label %365

365:                                              ; preds = %357
  %366 = load i64, ptr %24, align 8, !tbaa !11
  %367 = add nsw i64 %366, 1
  store i64 %367, ptr %24, align 8, !tbaa !11
  br label %250, !llvm.loop !24

368:                                              ; preds = %250
  %369 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %369)
  %370 = load i8, ptr %30, align 1, !tbaa !13, !range !15, !noundef !16
  %371 = trunc i8 %370 to i1
  store i1 %371, ptr %10, align 1
  store i32 1, ptr %31, align 4
  br label %624

372:                                              ; preds = %246, %243
  %373 = load i8, ptr %15, align 1, !tbaa !13, !range !15, !noundef !16
  %374 = trunc i8 %373 to i1
  br i1 %374, label %375, label %503

375:                                              ; preds = %372
  %376 = load i64, ptr %16, align 8, !tbaa !11
  %377 = icmp eq i64 %376, 1
  br i1 %377, label %378, label %503

378:                                              ; preds = %375
  store i64 0, ptr %24, align 8, !tbaa !11
  br label %379

379:                                              ; preds = %496, %378
  %380 = load i64, ptr %24, align 8, !tbaa !11
  %381 = load i64, ptr %13, align 8, !tbaa !11
  %382 = sub nsw i64 %381, 1
  %383 = icmp sle i64 %380, %382
  br i1 %383, label %384, label %499

384:                                              ; preds = %379
  %385 = load i8, ptr %17, align 1, !tbaa !13, !range !15, !noundef !16
  %386 = trunc i8 %385 to i1
  br i1 %386, label %387, label %394

387:                                              ; preds = %384
  call void @llvm.lifetime.start.p0(i64 16, ptr %44) #5
  %388 = load double, ptr %12, align 8, !tbaa !9
  %389 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %388)
  %390 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 0
  %391 = extractvalue { double, double } %389, 0
  store double %391, ptr %390, align 8
  %392 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 1
  %393 = extractvalue { double, double } %389, 1
  store double %393, ptr %392, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %44, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #5
  br label %411

394:                                              ; preds = %384
  call void @llvm.lifetime.start.p0(i64 16, ptr %45) #5
  %395 = load ptr, ptr %11, align 8, !tbaa !5
  %396 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %395, i32 0, i32 6
  %397 = load ptr, ptr %396, align 8, !tbaa !17
  %398 = load i64, ptr %24, align 8, !tbaa !11
  %399 = getelementptr inbounds ptr, ptr %397, i64 %398
  %400 = load ptr, ptr %399, align 8, !tbaa !5
  %401 = load i64, ptr %24, align 8, !tbaa !11
  %402 = getelementptr inbounds double, ptr %400, i64 %401
  %403 = load double, ptr %402, align 8, !tbaa !9
  %404 = load double, ptr %12, align 8, !tbaa !9
  %405 = fmul double %403, %404
  %406 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %405)
  %407 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 0
  %408 = extractvalue { double, double } %406, 0
  store double %408, ptr %407, align 8
  %409 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 1
  %410 = extractvalue { double, double } %406, 1
  store double %410, ptr %409, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %45, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %45) #5
  br label %411

411:                                              ; preds = %394, %387
  call void @llvm.lifetime.start.p0(i64 16, ptr %46) #5
  %412 = load ptr, ptr %14, align 8, !tbaa !5
  %413 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %412, i32 0, i32 4
  %414 = load ptr, ptr %413, align 8, !tbaa !17
  %415 = load i64, ptr %24, align 8, !tbaa !11
  %416 = getelementptr inbounds double, ptr %414, i64 %415
  %417 = load double, ptr %416, align 8, !tbaa !9
  %418 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %417)
  %419 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %420 = extractvalue { double, double } %418, 0
  store double %420, ptr %419, align 8
  %421 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %422 = extractvalue { double, double } %418, 1
  store double %422, ptr %421, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %46, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %47, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %48, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !20
  %423 = load double, ptr %21, align 8, !tbaa !9
  %424 = load double, ptr %22, align 8, !tbaa !9
  %425 = load double, ptr %18, align 8, !tbaa !9
  %426 = load ptr, ptr %19, align 8, !tbaa !5
  %427 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %428 = load double, ptr %427, align 8
  %429 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %430 = load double, ptr %429, align 8
  %431 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 0
  %432 = load double, ptr %431, align 8
  %433 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 1
  %434 = load double, ptr %433, align 8
  %435 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %428, double %430, double %432, double %434, double noundef %423, double noundef %424, double noundef %425, ptr noundef %23, ptr noundef %28, ptr noundef %426)
  %436 = zext i1 %435 to i8
  store i8 %436, ptr %30, align 1, !tbaa !13
  %437 = load i8, ptr %30, align 1, !tbaa !13, !range !15, !noundef !16
  %438 = trunc i8 %437 to i1
  br i1 %438, label %443, label %439

439:                                              ; preds = %411
  %440 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %440)
  %441 = load i8, ptr %30, align 1, !tbaa !13, !range !15, !noundef !16
  %442 = trunc i8 %441 to i1
  store i1 %442, ptr %10, align 1
  store i32 1, ptr %31, align 4
  br label %624

443:                                              ; preds = %411
  %444 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %28, i32 0, i32 0
  %445 = load double, ptr %444, align 8, !tbaa !21
  %446 = load ptr, ptr %14, align 8, !tbaa !5
  %447 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %446, i32 0, i32 4
  %448 = load ptr, ptr %447, align 8, !tbaa !17
  %449 = load i64, ptr %24, align 8, !tbaa !11
  %450 = getelementptr inbounds double, ptr %448, i64 %449
  store double %445, ptr %450, align 8, !tbaa !9
  %451 = load i64, ptr %24, align 8, !tbaa !11
  %452 = load i64, ptr %13, align 8, !tbaa !11
  %453 = sub nsw i64 %452, 1
  %454 = icmp slt i64 %451, %453
  br i1 %454, label %455, label %495

455:                                              ; preds = %443
  %456 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %28, i32 0, i32 0
  %457 = load double, ptr %456, align 8, !tbaa !21
  store double %457, ptr %27, align 8, !tbaa !9
  %458 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %459 = load ptr, ptr %458, align 8, !tbaa !17
  %460 = load i64, ptr %24, align 8, !tbaa !11
  %461 = add nsw i64 %460, 1
  %462 = getelementptr inbounds double, ptr %459, i64 %461
  %463 = load ptr, ptr %11, align 8, !tbaa !5
  %464 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %463, i32 0, i32 6
  %465 = load ptr, ptr %464, align 8, !tbaa !17
  %466 = load i64, ptr %24, align 8, !tbaa !11
  %467 = getelementptr inbounds ptr, ptr %465, i64 %466
  %468 = load ptr, ptr %467, align 8, !tbaa !5
  %469 = load i64, ptr %24, align 8, !tbaa !11
  %470 = add nsw i64 %469, 1
  %471 = getelementptr inbounds double, ptr %468, i64 %470
  %472 = load i64, ptr %24, align 8, !tbaa !11
  %473 = add nsw i64 %472, 1
  %474 = load i64, ptr %13, align 8, !tbaa !11
  %475 = sub nsw i64 %474, 1
  %476 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %473, i64 noundef %475)
  %477 = load double, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl10ae_v_movedEPdlPKdlld(ptr noundef %462, i64 noundef 1, ptr noundef %471, i64 noundef 1, i64 noundef %476, double noundef %477)
  %478 = load ptr, ptr %14, align 8, !tbaa !5
  %479 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %478, i32 0, i32 4
  %480 = load ptr, ptr %479, align 8, !tbaa !17
  %481 = load i64, ptr %24, align 8, !tbaa !11
  %482 = add nsw i64 %481, 1
  %483 = getelementptr inbounds double, ptr %480, i64 %482
  %484 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, 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 double, ptr %485, i64 %487
  %489 = load i64, ptr %24, align 8, !tbaa !11
  %490 = add nsw i64 %489, 1
  %491 = load i64, ptr %13, align 8, !tbaa !11
  %492 = sub nsw i64 %491, 1
  %493 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %490, i64 noundef %492)
  %494 = load double, ptr %27, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_v_subdEPdlPKdlld(ptr noundef %483, i64 noundef 1, ptr noundef %488, i64 noundef 1, i64 noundef %493, double noundef %494)
  br label %495

495:                                              ; preds = %455, %443
  br label %496

496:                                              ; preds = %495
  %497 = load i64, ptr %24, align 8, !tbaa !11
  %498 = add nsw i64 %497, 1
  store i64 %498, ptr %24, align 8, !tbaa !11
  br label %379, !llvm.loop !25

499:                                              ; preds = %379
  %500 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %500)
  %501 = load i8, ptr %30, align 1, !tbaa !13, !range !15, !noundef !16
  %502 = trunc i8 %501 to i1
  store i1 %502, ptr %10, align 1
  store i32 1, ptr %31, align 4
  br label %624

503:                                              ; preds = %375, %372
  %504 = load i8, ptr %15, align 1, !tbaa !13, !range !15, !noundef !16
  %505 = trunc i8 %504 to i1
  br i1 %505, label %620, label %506

506:                                              ; preds = %503
  %507 = load i64, ptr %16, align 8, !tbaa !11
  %508 = icmp eq i64 %507, 1
  br i1 %508, label %509, label %620

509:                                              ; preds = %506
  %510 = load i64, ptr %13, align 8, !tbaa !11
  %511 = sub nsw i64 %510, 1
  store i64 %511, ptr %24, align 8, !tbaa !11
  br label %512

512:                                              ; preds = %613, %509
  %513 = load i64, ptr %24, align 8, !tbaa !11
  %514 = icmp sge i64 %513, 0
  br i1 %514, label %515, label %616

515:                                              ; preds = %512
  %516 = load i8, ptr %17, align 1, !tbaa !13, !range !15, !noundef !16
  %517 = trunc i8 %516 to i1
  br i1 %517, label %518, label %525

518:                                              ; preds = %515
  call void @llvm.lifetime.start.p0(i64 16, ptr %49) #5
  %519 = load double, ptr %12, align 8, !tbaa !9
  %520 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %519)
  %521 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 0
  %522 = extractvalue { double, double } %520, 0
  store double %522, ptr %521, align 8
  %523 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 1
  %524 = extractvalue { double, double } %520, 1
  store double %524, ptr %523, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %49, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #5
  br label %542

525:                                              ; preds = %515
  call void @llvm.lifetime.start.p0(i64 16, ptr %50) #5
  %526 = load ptr, ptr %11, align 8, !tbaa !5
  %527 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %526, i32 0, i32 6
  %528 = load ptr, ptr %527, align 8, !tbaa !17
  %529 = load i64, ptr %24, align 8, !tbaa !11
  %530 = getelementptr inbounds ptr, ptr %528, i64 %529
  %531 = load ptr, ptr %530, align 8, !tbaa !5
  %532 = load i64, ptr %24, align 8, !tbaa !11
  %533 = getelementptr inbounds double, ptr %531, i64 %532
  %534 = load double, ptr %533, align 8, !tbaa !9
  %535 = load double, ptr %12, align 8, !tbaa !9
  %536 = fmul double %534, %535
  %537 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %536)
  %538 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 0
  %539 = extractvalue { double, double } %537, 0
  store double %539, ptr %538, align 8
  %540 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 1
  %541 = extractvalue { double, double } %537, 1
  store double %541, ptr %540, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %50, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #5
  br label %542

542:                                              ; preds = %525, %518
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #5
  %543 = load ptr, ptr %14, align 8, !tbaa !5
  %544 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %543, i32 0, i32 4
  %545 = load ptr, ptr %544, align 8, !tbaa !17
  %546 = load i64, ptr %24, align 8, !tbaa !11
  %547 = getelementptr inbounds double, ptr %545, i64 %546
  %548 = load double, ptr %547, align 8, !tbaa !9
  %549 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %548)
  %550 = getelementptr inbounds { double, double }, ptr %51, i32 0, i32 0
  %551 = extractvalue { double, double } %549, 0
  store double %551, ptr %550, align 8
  %552 = getelementptr inbounds { double, double }, ptr %51, 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 %26, ptr align 8 %51, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %52, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %53, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !20
  %554 = load double, ptr %21, align 8, !tbaa !9
  %555 = load double, ptr %22, align 8, !tbaa !9
  %556 = load double, ptr %18, align 8, !tbaa !9
  %557 = load ptr, ptr %19, align 8, !tbaa !5
  %558 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 0
  %559 = load double, ptr %558, align 8
  %560 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 1
  %561 = load double, ptr %560, align 8
  %562 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 0
  %563 = load double, ptr %562, align 8
  %564 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 1
  %565 = load double, ptr %564, align 8
  %566 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %559, double %561, double %563, double %565, double noundef %554, double noundef %555, double noundef %556, ptr noundef %23, ptr noundef %28, ptr noundef %557)
  %567 = zext i1 %566 to i8
  store i8 %567, ptr %30, align 1, !tbaa !13
  %568 = load i8, ptr %30, align 1, !tbaa !13, !range !15, !noundef !16
  %569 = trunc i8 %568 to i1
  br i1 %569, label %574, label %570

570:                                              ; preds = %542
  %571 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %571)
  %572 = load i8, ptr %30, align 1, !tbaa !13, !range !15, !noundef !16
  %573 = trunc i8 %572 to i1
  store i1 %573, ptr %10, align 1
  store i32 1, ptr %31, align 4
  br label %624

574:                                              ; preds = %542
  %575 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %28, i32 0, i32 0
  %576 = load double, ptr %575, align 8, !tbaa !21
  %577 = load ptr, ptr %14, align 8, !tbaa !5
  %578 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %577, i32 0, i32 4
  %579 = load ptr, ptr %578, align 8, !tbaa !17
  %580 = load i64, ptr %24, align 8, !tbaa !11
  %581 = getelementptr inbounds double, ptr %579, i64 %580
  store double %576, ptr %581, align 8, !tbaa !9
  %582 = load i64, ptr %24, align 8, !tbaa !11
  %583 = icmp sgt i64 %582, 0
  br i1 %583, label %584, label %612

584:                                              ; preds = %574
  %585 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %28, i32 0, i32 0
  %586 = load double, ptr %585, align 8, !tbaa !21
  store double %586, ptr %27, align 8, !tbaa !9
  %587 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %588 = load ptr, ptr %587, align 8, !tbaa !17
  %589 = getelementptr inbounds double, ptr %588, i64 0
  %590 = load ptr, ptr %11, align 8, !tbaa !5
  %591 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %590, i32 0, i32 6
  %592 = load ptr, ptr %591, align 8, !tbaa !17
  %593 = load i64, ptr %24, align 8, !tbaa !11
  %594 = getelementptr inbounds ptr, ptr %592, i64 %593
  %595 = load ptr, ptr %594, align 8, !tbaa !5
  %596 = getelementptr inbounds double, ptr %595, i64 0
  %597 = load i64, ptr %24, align 8, !tbaa !11
  %598 = sub nsw i64 %597, 1
  %599 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %598)
  %600 = load double, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl10ae_v_movedEPdlPKdlld(ptr noundef %589, i64 noundef 1, ptr noundef %596, i64 noundef 1, i64 noundef %599, double noundef %600)
  %601 = load ptr, ptr %14, align 8, !tbaa !5
  %602 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %601, i32 0, i32 4
  %603 = load ptr, ptr %602, align 8, !tbaa !17
  %604 = getelementptr inbounds double, ptr %603, i64 0
  %605 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %606 = load ptr, ptr %605, align 8, !tbaa !17
  %607 = getelementptr inbounds double, ptr %606, i64 0
  %608 = load i64, ptr %24, align 8, !tbaa !11
  %609 = sub nsw i64 %608, 1
  %610 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %609)
  %611 = load double, ptr %27, align 8, !tbaa !9
  call void @_ZN11alglib_impl9ae_v_subdEPdlPKdlld(ptr noundef %604, i64 noundef 1, ptr noundef %607, i64 noundef 1, i64 noundef %610, double noundef %611)
  br label %612

612:                                              ; preds = %584, %574
  br label %613

613:                                              ; preds = %612
  %614 = load i64, ptr %24, align 8, !tbaa !11
  %615 = add nsw i64 %614, -1
  store i64 %615, ptr %24, align 8, !tbaa !11
  br label %512, !llvm.loop !26

616:                                              ; preds = %512
  %617 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %617)
  %618 = load i8, ptr %30, align 1, !tbaa !13, !range !15, !noundef !16
  %619 = trunc i8 %618 to i1
  store i1 %619, ptr %10, align 1
  store i32 1, ptr %31, align 4
  br label %624

620:                                              ; preds = %506, %503
  store i8 0, ptr %30, align 1, !tbaa !13
  %621 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %621)
  %622 = load i8, ptr %30, align 1, !tbaa !13, !range !15, !noundef !16
  %623 = trunc i8 %622 to i1
  store i1 %623, ptr %10, align 1
  store i32 1, ptr %31, align 4
  br label %624

624:                                              ; preds = %620, %616, %570, %499, %439, %368, %353, %239, %224, %73
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, 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
  %625 = load i1, ptr %10, align 1
  ret i1 %625
}

; 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

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 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{i64 0, i64 8, !9, i64 8, i64 8, !9}
!21 = !{!22, !10, i64 0}
!22 = !{!"_ZTSN11alglib_impl10ae_complexE", !10, i64 0, !10, i64 8}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}
!25 = distinct !{!25, !19}
!26 = distinct !{!26, !19}


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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_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.33 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.34 = 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_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl24rmatrixscaledtrsafesolveEPNS_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 #3 {
  %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) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #4
  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 3, 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.33, ptr noundef %8)
  %15 = icmp eq i64 %5, 0
  %16 = icmp eq i64 %5, 1
  %17 = icmp ult i64 %5, 2
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.34, 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_edge265, label %.preheader251

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

21:                                               ; preds = %.preheader251, %21
  %.0220253 = phi double [ 0.000000e+00, %.preheader251 ], [ %26, %21 ]
  %.0221252 = phi i64 [ 0, %.preheader251 ], [ %27, %21 ]
  %22 = load ptr, ptr %20, align 8, !tbaa !5
  %23 = getelementptr inbounds double, ptr %22, i64 %.0221252
  %24 = load double, ptr %23, align 8, !tbaa !8
  %25 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %24, ptr noundef %8)
  %26 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.0220253, double noundef %25, ptr noundef %8)
  %27 = add nuw nsw i64 %.0221252, 1
  %exitcond.not = icmp eq i64 %27, %2
  br i1 %exitcond.not, label %28, label %21, !llvm.loop !10

28:                                               ; preds = %21
  %29 = 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.cond = and i1 %15, %4
  br i1 %or.cond, label %.lr.ph264, label %75

.lr.ph264:                                        ; preds = %28
  %30 = getelementptr inbounds i8, ptr %0, i64 72
  %31 = getelementptr inbounds i8, ptr %13, i64 56
  br label %32

32:                                               ; preds = %.lr.ph264, %69
  %.1263 = phi i64 [ %29, %.lr.ph264 ], [ %73, %69 ]
  br i1 %6, label %40, label %33

33:                                               ; preds = %32
  %34 = load ptr, ptr %30, align 8, !tbaa !5
  %35 = getelementptr inbounds ptr, ptr %34, i64 %.1263
  %36 = load ptr, ptr %35, align 8, !tbaa !12
  %37 = getelementptr inbounds double, ptr %36, i64 %.1263
  %38 = load double, ptr %37, align 8, !tbaa !8
  %39 = fmul double %38, %1
  br label %40

40:                                               ; preds = %32, %33
  %.sink = phi double [ %39, %33 ], [ %1, %32 ]
  %41 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %.sink)
  %.sroa.14.0 = extractvalue { double, double } %41, 1
  %.sroa.067.0 = extractvalue { double, double } %41, 0
  %42 = icmp slt i64 %.1263, %29
  br i1 %42, label %43, label %62

43:                                               ; preds = %40
  %44 = load ptr, ptr %31, align 8, !tbaa !5
  %45 = add nuw nsw i64 %.1263, 1
  %46 = getelementptr inbounds double, ptr %44, i64 %45
  %47 = load ptr, ptr %30, align 8, !tbaa !5
  %48 = getelementptr inbounds ptr, ptr %47, i64 %.1263
  %49 = load ptr, ptr %48, align 8, !tbaa !12
  %50 = getelementptr inbounds double, ptr %49, i64 %45
  %51 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %45, i64 noundef %29)
  call void @_ZN11alglib_impl10ae_v_movedEPdlPKdlld(ptr noundef nonnull %46, i64 noundef 1, ptr noundef nonnull %50, i64 noundef 1, i64 noundef %51, double noundef %1)
  %52 = load ptr, ptr %31, align 8, !tbaa !5
  %53 = getelementptr inbounds double, ptr %52, i64 %45
  %54 = load ptr, ptr %20, align 8, !tbaa !5
  %55 = getelementptr inbounds double, ptr %54, i64 %45
  %56 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %45, i64 noundef %29)
  %57 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef nonnull %53, i64 noundef 1, ptr noundef nonnull %55, i64 noundef 1, i64 noundef %56)
  %58 = load ptr, ptr %20, align 8, !tbaa !5
  %59 = getelementptr inbounds double, ptr %58, i64 %.1263
  %60 = load double, ptr %59, align 8, !tbaa !8
  %61 = fsub double %60, %57
  br label %66

62:                                               ; preds = %40
  %63 = load ptr, ptr %20, align 8, !tbaa !5
  %64 = getelementptr inbounds double, ptr %63, i64 %.1263
  %65 = load double, ptr %64, align 8, !tbaa !8
  br label %66

66:                                               ; preds = %62, %43
  %.sink274 = phi double [ %65, %62 ], [ %61, %43 ]
  %67 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %.sink274)
  %.sroa.12.0 = extractvalue { double, double } %67, 1
  %.sroa.066.0 = extractvalue { double, double } %67, 0
  %68 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %.sroa.067.0, double %.sroa.14.0, double %.sroa.066.0, double %.sroa.12.0, double noundef %18, double noundef %26, double noundef %7, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef %8)
  br i1 %68, label %69, label %._crit_edge265

69:                                               ; preds = %66
  %70 = load double, ptr %12, align 8, !tbaa !14
  %71 = load ptr, ptr %20, align 8, !tbaa !5
  %72 = getelementptr inbounds double, ptr %71, i64 %.1263
  store double %70, ptr %72, align 8, !tbaa !8
  %73 = add nsw i64 %.1263, -1
  %74 = icmp sgt i64 %.1263, 0
  br i1 %74, label %32, label %._crit_edge265, !llvm.loop !16

75:                                               ; preds = %28
  %.not = xor i1 %4, true
  %or.cond3 = and i1 %15, %.not
  br i1 %or.cond3, label %.lr.ph261, label %122

.lr.ph261:                                        ; preds = %75
  %76 = getelementptr inbounds i8, ptr %0, i64 72
  %77 = getelementptr inbounds i8, ptr %13, i64 56
  br i1 %6, label %83, label %78

78:                                               ; preds = %.lr.ph261
  %79 = load ptr, ptr %76, align 8, !tbaa !5
  %80 = load ptr, ptr %79, align 8, !tbaa !12
  %81 = load double, ptr %80, align 8, !tbaa !8
  %82 = fmul double %81, %1
  br label %83

83:                                               ; preds = %.lr.ph261, %78
  %.sink275 = phi double [ %82, %78 ], [ %1, %.lr.ph261 ]
  %84 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %.sink275)
  %.sroa.14.1.peel = extractvalue { double, double } %84, 1
  %.sroa.067.1.peel = extractvalue { double, double } %84, 0
  %85 = load ptr, ptr %20, align 8, !tbaa !5
  %86 = load double, ptr %85, align 8, !tbaa !8
  %87 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %86)
  %.sroa.12.1.peel = extractvalue { double, double } %87, 1
  %.sroa.066.1.peel = extractvalue { double, double } %87, 0
  %88 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %.sroa.067.1.peel, double %.sroa.14.1.peel, double %.sroa.066.1.peel, double %.sroa.12.1.peel, double noundef %18, double noundef %26, double noundef %7, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef %8)
  br i1 %88, label %89, label %._crit_edge265

89:                                               ; preds = %83
  %90 = load double, ptr %12, align 8, !tbaa !14
  %91 = load ptr, ptr %20, align 8, !tbaa !5
  store double %90, ptr %91, align 8, !tbaa !8
  %exitcond267.peel.not = icmp eq i64 %2, 1
  br i1 %exitcond267.peel.not, label %._crit_edge265, label %.peel.next

.peel.next:                                       ; preds = %89, %117
  %.2260 = phi i64 [ %121, %117 ], [ 1, %89 ]
  br i1 %6, label %99, label %92

92:                                               ; preds = %.peel.next
  %93 = load ptr, ptr %76, align 8, !tbaa !5
  %94 = getelementptr inbounds ptr, ptr %93, i64 %.2260
  %95 = load ptr, ptr %94, align 8, !tbaa !12
  %96 = getelementptr inbounds double, ptr %95, i64 %.2260
  %97 = load double, ptr %96, align 8, !tbaa !8
  %98 = fmul double %97, %1
  br label %99

99:                                               ; preds = %.peel.next, %92
  %.sink276 = phi double [ %98, %92 ], [ %1, %.peel.next ]
  %100 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %.sink276)
  %.sroa.14.1 = extractvalue { double, double } %100, 1
  %.sroa.067.1 = extractvalue { double, double } %100, 0
  %101 = load ptr, ptr %77, align 8, !tbaa !5
  %102 = load ptr, ptr %76, align 8, !tbaa !5
  %103 = getelementptr inbounds ptr, ptr %102, i64 %.2260
  %104 = load ptr, ptr %103, align 8, !tbaa !12
  %105 = add nsw i64 %.2260, -1
  %106 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %105)
  call void @_ZN11alglib_impl10ae_v_movedEPdlPKdlld(ptr noundef %101, i64 noundef 1, ptr noundef %104, i64 noundef 1, i64 noundef %106, double noundef %1)
  %107 = load ptr, ptr %77, align 8, !tbaa !5
  %108 = load ptr, ptr %20, align 8, !tbaa !5
  %109 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %105)
  %110 = call noundef double @_ZN11alglib_impl15ae_v_dotproductEPKdlS1_ll(ptr noundef %107, i64 noundef 1, ptr noundef %108, i64 noundef 1, i64 noundef %109)
  %111 = load ptr, ptr %20, align 8, !tbaa !5
  %112 = getelementptr inbounds double, ptr %111, i64 %.2260
  %113 = load double, ptr %112, align 8, !tbaa !8
  %114 = fsub double %113, %110
  %115 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %114)
  %.sroa.12.1 = extractvalue { double, double } %115, 1
  %.sroa.066.1 = extractvalue { double, double } %115, 0
  %116 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %.sroa.067.1, double %.sroa.14.1, double %.sroa.066.1, double %.sroa.12.1, double noundef %18, double noundef %26, double noundef %7, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef %8)
  br i1 %116, label %117, label %._crit_edge265

117:                                              ; preds = %99
  %118 = load double, ptr %12, align 8, !tbaa !14
  %119 = load ptr, ptr %20, align 8, !tbaa !5
  %120 = getelementptr inbounds double, ptr %119, i64 %.2260
  store double %118, ptr %120, align 8, !tbaa !8
  %121 = add nuw nsw i64 %.2260, 1
  %exitcond267.not = icmp eq i64 %121, %2
  br i1 %exitcond267.not, label %._crit_edge265, label %.peel.next, !llvm.loop !17

122:                                              ; preds = %75
  %or.cond5 = and i1 %16, %4
  br i1 %or.cond5, label %.lr.ph257, label %162

.lr.ph257:                                        ; preds = %122
  %123 = getelementptr inbounds i8, ptr %0, i64 72
  %124 = getelementptr inbounds i8, ptr %13, i64 56
  br label %125

125:                                              ; preds = %.lr.ph257, %161
  %.3256 = phi i64 [ 0, %.lr.ph257 ], [ %.pre-phi, %161 ]
  br i1 %6, label %133, label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %123, align 8, !tbaa !5
  %128 = getelementptr inbounds ptr, ptr %127, i64 %.3256
  %129 = load ptr, ptr %128, align 8, !tbaa !12
  %130 = getelementptr inbounds double, ptr %129, i64 %.3256
  %131 = load double, ptr %130, align 8, !tbaa !8
  %132 = fmul double %131, %1
  br label %133

133:                                              ; preds = %125, %126
  %.sink277 = phi double [ %132, %126 ], [ %1, %125 ]
  %134 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %.sink277)
  %.sroa.14.2 = extractvalue { double, double } %134, 1
  %.sroa.067.2 = extractvalue { double, double } %134, 0
  %135 = load ptr, ptr %20, align 8, !tbaa !5
  %136 = getelementptr inbounds double, ptr %135, i64 %.3256
  %137 = load double, ptr %136, align 8, !tbaa !8
  %138 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %137)
  %139 = extractvalue { double, double } %138, 0
  %140 = extractvalue { double, double } %138, 1
  %141 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %.sroa.067.2, double %.sroa.14.2, double %139, double %140, double noundef %18, double noundef %26, double noundef %7, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef %8)
  br i1 %141, label %142, label %._crit_edge265

142:                                              ; preds = %133
  %143 = load double, ptr %12, align 8, !tbaa !14
  %144 = load ptr, ptr %20, align 8, !tbaa !5
  %145 = getelementptr inbounds double, ptr %144, i64 %.3256
  store double %143, ptr %145, align 8, !tbaa !8
  %146 = icmp slt i64 %.3256, %29
  br i1 %146, label %147, label %._crit_edge270

._crit_edge270:                                   ; preds = %142
  %.pre = add nuw nsw i64 %.3256, 1
  br label %161

147:                                              ; preds = %142
  %148 = load ptr, ptr %124, align 8, !tbaa !5
  %149 = add nuw nsw i64 %.3256, 1
  %150 = getelementptr inbounds double, ptr %148, i64 %149
  %151 = load ptr, ptr %123, align 8, !tbaa !5
  %152 = getelementptr inbounds ptr, ptr %151, i64 %.3256
  %153 = load ptr, ptr %152, align 8, !tbaa !12
  %154 = getelementptr inbounds double, ptr %153, i64 %149
  %155 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %149, i64 noundef %29)
  call void @_ZN11alglib_impl10ae_v_movedEPdlPKdlld(ptr noundef nonnull %150, i64 noundef 1, ptr noundef nonnull %154, i64 noundef 1, i64 noundef %155, double noundef %1)
  %156 = load ptr, ptr %20, align 8, !tbaa !5
  %157 = getelementptr inbounds double, ptr %156, i64 %149
  %158 = load ptr, ptr %124, align 8, !tbaa !5
  %159 = getelementptr inbounds double, ptr %158, i64 %149
  %160 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %149, i64 noundef %29)
  call void @_ZN11alglib_impl9ae_v_subdEPdlPKdlld(ptr noundef nonnull %157, i64 noundef 1, ptr noundef nonnull %159, i64 noundef 1, i64 noundef %160, double noundef %143)
  br label %161

161:                                              ; preds = %._crit_edge270, %147
  %.pre-phi = phi i64 [ %.pre, %._crit_edge270 ], [ %149, %147 ]
  %exitcond266.not = icmp eq i64 %.pre-phi, %2
  br i1 %exitcond266.not, label %._crit_edge265, label %125, !llvm.loop !19

162:                                              ; preds = %122
  %or.cond8 = and i1 %16, %.not
  br i1 %or.cond8, label %.lr.ph, label %._crit_edge265

.lr.ph:                                           ; preds = %162
  %163 = getelementptr inbounds i8, ptr %0, i64 72
  %164 = getelementptr inbounds i8, ptr %13, i64 56
  br label %165

165:                                              ; preds = %.lr.ph, %._crit_edge269
  %.4254 = phi i64 [ %29, %.lr.ph ], [ %190, %._crit_edge269 ]
  br i1 %6, label %173, label %166

166:                                              ; preds = %165
  %167 = load ptr, ptr %163, align 8, !tbaa !5
  %168 = getelementptr inbounds ptr, ptr %167, i64 %.4254
  %169 = load ptr, ptr %168, align 8, !tbaa !12
  %170 = getelementptr inbounds double, ptr %169, i64 %.4254
  %171 = load double, ptr %170, align 8, !tbaa !8
  %172 = fmul double %171, %1
  br label %173

173:                                              ; preds = %165, %166
  %.sink278 = phi double [ %172, %166 ], [ %1, %165 ]
  %174 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %.sink278)
  %.sroa.14.3 = extractvalue { double, double } %174, 1
  %.sroa.067.3 = extractvalue { double, double } %174, 0
  %175 = load ptr, ptr %20, align 8, !tbaa !5
  %176 = getelementptr inbounds double, ptr %175, i64 %.4254
  %177 = load double, ptr %176, align 8, !tbaa !8
  %178 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef %177)
  %179 = extractvalue { double, double } %178, 0
  %180 = extractvalue { double, double } %178, 1
  %181 = call noundef zeroext i1 @_ZN11alglib_implL30safesolve_cbasicsolveandupdateENS_10ae_complexES0_dddPdPS0_PNS_8ae_stateE(double %.sroa.067.3, double %.sroa.14.3, double %179, double %180, double noundef %18, double noundef %26, double noundef %7, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef %8)
  br i1 %181, label %182, label %._crit_edge265

182:                                              ; preds = %173
  %183 = load double, ptr %12, align 8, !tbaa !14
  %184 = load ptr, ptr %20, align 8, !tbaa !5
  %185 = getelementptr inbounds double, ptr %184, i64 %.4254
  store double %183, ptr %185, align 8, !tbaa !8
  %.not234 = icmp eq i64 %.4254, 0
  br i1 %.not234, label %._crit_edge265, label %._crit_edge269

._crit_edge269:                                   ; preds = %182
  %186 = load ptr, ptr %164, align 8, !tbaa !5
  %187 = load ptr, ptr %163, align 8, !tbaa !5
  %188 = getelementptr inbounds ptr, ptr %187, i64 %.4254
  %189 = load ptr, ptr %188, align 8, !tbaa !12
  %190 = add nsw i64 %.4254, -1
  %191 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %190)
  call void @_ZN11alglib_impl10ae_v_movedEPdlPKdlld(ptr noundef %186, i64 noundef 1, ptr noundef %189, i64 noundef 1, i64 noundef %191, double noundef %1)
  %192 = load ptr, ptr %20, align 8, !tbaa !5
  %193 = load ptr, ptr %164, align 8, !tbaa !5
  %194 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %190)
  call void @_ZN11alglib_impl9ae_v_subdEPdlPKdlld(ptr noundef %192, i64 noundef 1, ptr noundef %193, i64 noundef 1, i64 noundef %194, double noundef %183)
  %195 = icmp sgt i64 %.4254, 0
  br i1 %195, label %165, label %._crit_edge265, !llvm.loop !20

._crit_edge265:                                   ; preds = %._crit_edge269, %182, %173, %161, %133, %117, %99, %69, %66, %162, %89, %83, %9
  %.0 = phi i1 [ true, %9 ], [ false, %83 ], [ true, %89 ], [ false, %162 ], [ %68, %66 ], [ %68, %69 ], [ %116, %99 ], [ %116, %117 ], [ %141, %133 ], [ %141, %161 ], [ %181, %173 ], [ %181, %182 ], [ %181, %._crit_edge269 ]
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %8)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  ret i1 %.0
}

; 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 #3

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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

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