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

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

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

@.str.84 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [51 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl15polynomialsolveEPKNS_9ae_vectorElPS0_PNS_22polynomialsolverreportEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #3 {
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.alglib_impl::ae_frame", align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", align 8
  %13 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %14 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %15 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %16 = alloca %"struct.alglib_impl::ae_vector", align 8
  %17 = alloca %"struct.alglib_impl::ae_vector", align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i8, align 1
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca %"struct.alglib_impl::ae_complex", align 8
  %24 = alloca %"struct.alglib_impl::ae_complex", 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_complex", align 8
  %29 = alloca %"struct.alglib_impl::ae_complex", align 8
  %30 = alloca %"struct.alglib_impl::ae_complex", align 8
  %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
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 1, 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 16, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #5
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %36, ptr noundef %11)
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 64, i1 false)
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %12, ptr noundef %37, ptr noundef %38, i1 noundef zeroext true)
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %39)
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl29_polynomialsolverreport_clearEPv(ptr noundef %40)
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %13, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %41, i1 noundef zeroext true)
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %14, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %42, i1 noundef zeroext true)
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %15, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %43, i1 noundef zeroext true)
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %16, i64 noundef 0, i64 noundef 3, ptr noundef %44, i1 noundef zeroext true)
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %17, i64 noundef 0, i64 noundef 3, ptr noundef %45, i1 noundef zeroext true)
  %46 = load i64, ptr %7, align 8, !tbaa !9
  %47 = icmp sgt i64 %46, 0
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %47, ptr noundef @.str.84, ptr noundef %48)
  %49 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 0
  %50 = load i64, ptr %49, align 8, !tbaa !11
  %51 = load i64, ptr %7, align 8, !tbaa !9
  %52 = add nsw i64 %51, 1
  %53 = icmp sge i64 %50, %52
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %53, ptr noundef @.str.85, ptr noundef %54)
  %55 = load i64, ptr %7, align 8, !tbaa !9
  %56 = add nsw i64 %55, 1
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %12, i64 noundef %56, ptr noundef %57)
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %58, ptr noundef @.str.86, ptr noundef %59)
  %60 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %61 = load ptr, ptr %60, align 8, !tbaa !15
  %62 = load i64, ptr %7, align 8, !tbaa !9
  %63 = getelementptr inbounds double, ptr %61, i64 %62
  %64 = load double, ptr %63, align 8, !tbaa !16
  %65 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %64, double noundef 0.000000e+00)
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %65, ptr noundef @.str.87, ptr noundef %66)
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = load i64, ptr %7, align 8, !tbaa !9
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %67, i64 noundef %68, ptr noundef %69)
  store i64 0, ptr %21, align 8, !tbaa !9
  br label %70

70:                                               ; preds = %83, %5
  %71 = load i64, ptr %21, align 8, !tbaa !9
  %72 = load i64, ptr %7, align 8, !tbaa !9
  %73 = icmp slt i64 %71, %72
  br i1 %73, label %74, label %81

74:                                               ; preds = %70
  %75 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !15
  %77 = load i64, ptr %21, align 8, !tbaa !9
  %78 = getelementptr inbounds double, ptr %76, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !16
  %80 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %79, double noundef 0.000000e+00)
  br label %81

81:                                               ; preds = %74, %70
  %82 = phi i1 [ false, %70 ], [ %80, %74 ]
  br i1 %82, label %83, label %86

83:                                               ; preds = %81
  %84 = load i64, ptr %21, align 8, !tbaa !9
  %85 = add nsw i64 %84, 1
  store i64 %85, ptr %21, align 8, !tbaa !9
  br label %70, !llvm.loop !18

86:                                               ; preds = %81
  %87 = load i64, ptr %7, align 8, !tbaa !9
  %88 = load i64, ptr %21, align 8, !tbaa !9
  %89 = sub nsw i64 %87, %88
  store i64 %89, ptr %22, align 8, !tbaa !9
  %90 = load i64, ptr %21, align 8, !tbaa !9
  store i64 %90, ptr %18, align 8, !tbaa !9
  br label %91

91:                                               ; preds = %113, %86
  %92 = load i64, ptr %18, align 8, !tbaa !9
  %93 = load i64, ptr %7, align 8, !tbaa !9
  %94 = icmp sle i64 %92, %93
  br i1 %94, label %95, label %116

95:                                               ; preds = %91
  %96 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %97 = load ptr, ptr %96, align 8, !tbaa !15
  %98 = load i64, ptr %18, align 8, !tbaa !9
  %99 = getelementptr inbounds double, ptr %97, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !16
  %101 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %102 = load ptr, ptr %101, align 8, !tbaa !15
  %103 = load i64, ptr %7, align 8, !tbaa !9
  %104 = getelementptr inbounds double, ptr %102, i64 %103
  %105 = load double, ptr %104, align 8, !tbaa !16
  %106 = fdiv double %100, %105
  %107 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %108 = load ptr, ptr %107, align 8, !tbaa !15
  %109 = load i64, ptr %18, align 8, !tbaa !9
  %110 = load i64, ptr %21, align 8, !tbaa !9
  %111 = sub nsw i64 %109, %110
  %112 = getelementptr inbounds double, ptr %108, i64 %111
  store double %106, ptr %112, align 8, !tbaa !16
  br label %113

113:                                              ; preds = %95
  %114 = load i64, ptr %18, align 8, !tbaa !9
  %115 = add nsw i64 %114, 1
  store i64 %115, ptr %18, align 8, !tbaa !9
  br label %91, !llvm.loop !20

116:                                              ; preds = %91
  %117 = load i64, ptr %22, align 8, !tbaa !9
  %118 = icmp sgt i64 %117, 0
  br i1 %118, label %119, label %233

119:                                              ; preds = %116
  %120 = load i64, ptr %22, align 8, !tbaa !9
  %121 = load i64, ptr %22, align 8, !tbaa !9
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %13, i64 noundef %120, i64 noundef %121, ptr noundef %122)
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %123

123:                                              ; preds = %146, %119
  %124 = load i64, ptr %18, align 8, !tbaa !9
  %125 = load i64, ptr %22, align 8, !tbaa !9
  %126 = sub nsw i64 %125, 1
  %127 = icmp sle i64 %124, %126
  br i1 %127, label %128, label %149

128:                                              ; preds = %123
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %129

129:                                              ; preds = %142, %128
  %130 = load i64, ptr %19, align 8, !tbaa !9
  %131 = load i64, ptr %22, align 8, !tbaa !9
  %132 = sub nsw i64 %131, 1
  %133 = icmp sle i64 %130, %132
  br i1 %133, label %134, label %145

134:                                              ; preds = %129
  %135 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %136 = load ptr, ptr %135, align 8, !tbaa !15
  %137 = load i64, ptr %18, align 8, !tbaa !9
  %138 = getelementptr inbounds ptr, ptr %136, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = load i64, ptr %19, align 8, !tbaa !9
  %141 = getelementptr inbounds double, ptr %139, i64 %140
  store double 0.000000e+00, ptr %141, align 8, !tbaa !16
  br label %142

142:                                              ; preds = %134
  %143 = load i64, ptr %19, align 8, !tbaa !9
  %144 = add nsw i64 %143, 1
  store i64 %144, ptr %19, align 8, !tbaa !9
  br label %129, !llvm.loop !21

145:                                              ; preds = %129
  br label %146

146:                                              ; preds = %145
  %147 = load i64, ptr %18, align 8, !tbaa !9
  %148 = add nsw i64 %147, 1
  store i64 %148, ptr %18, align 8, !tbaa !9
  br label %123, !llvm.loop !22

149:                                              ; preds = %123
  %150 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %151 = load ptr, ptr %150, align 8, !tbaa !15
  %152 = getelementptr inbounds double, ptr %151, i64 0
  %153 = load double, ptr %152, align 8, !tbaa !16
  %154 = fneg double %153
  %155 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %156 = load ptr, ptr %155, align 8, !tbaa !15
  %157 = getelementptr inbounds ptr, ptr %156, i64 0
  %158 = load ptr, ptr %157, align 8, !tbaa !5
  %159 = load i64, ptr %22, align 8, !tbaa !9
  %160 = sub nsw i64 %159, 1
  %161 = getelementptr inbounds double, ptr %158, i64 %160
  store double %154, ptr %161, align 8, !tbaa !16
  store i64 1, ptr %18, align 8, !tbaa !9
  br label %162

162:                                              ; preds = %190, %149
  %163 = load i64, ptr %18, align 8, !tbaa !9
  %164 = load i64, ptr %22, align 8, !tbaa !9
  %165 = sub nsw i64 %164, 1
  %166 = icmp sle i64 %163, %165
  br i1 %166, label %167, label %193

167:                                              ; preds = %162
  %168 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %169 = load ptr, ptr %168, align 8, !tbaa !15
  %170 = load i64, ptr %18, align 8, !tbaa !9
  %171 = getelementptr inbounds ptr, ptr %169, i64 %170
  %172 = load ptr, ptr %171, align 8, !tbaa !5
  %173 = load i64, ptr %18, align 8, !tbaa !9
  %174 = sub nsw i64 %173, 1
  %175 = getelementptr inbounds double, ptr %172, i64 %174
  store double 1.000000e+00, ptr %175, align 8, !tbaa !16
  %176 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %177 = load ptr, ptr %176, align 8, !tbaa !15
  %178 = load i64, ptr %18, align 8, !tbaa !9
  %179 = getelementptr inbounds double, ptr %177, i64 %178
  %180 = load double, ptr %179, align 8, !tbaa !16
  %181 = fneg double %180
  %182 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %13, i32 0, i32 6
  %183 = load ptr, ptr %182, align 8, !tbaa !15
  %184 = load i64, ptr %18, align 8, !tbaa !9
  %185 = getelementptr inbounds ptr, ptr %183, i64 %184
  %186 = load ptr, ptr %185, align 8, !tbaa !5
  %187 = load i64, ptr %22, align 8, !tbaa !9
  %188 = sub nsw i64 %187, 1
  %189 = getelementptr inbounds double, ptr %186, i64 %188
  store double %181, ptr %189, align 8, !tbaa !16
  br label %190

190:                                              ; preds = %167
  %191 = load i64, ptr %18, align 8, !tbaa !9
  %192 = add nsw i64 %191, 1
  store i64 %192, ptr %18, align 8, !tbaa !9
  br label %162, !llvm.loop !23

193:                                              ; preds = %162
  %194 = load i64, ptr %22, align 8, !tbaa !9
  %195 = load ptr, ptr %10, align 8, !tbaa !5
  %196 = call noundef zeroext i1 @_ZN11alglib_impl10rmatrixevdEPKNS_9ae_matrixEllPNS_9ae_vectorES4_PS0_S5_PNS_8ae_stateE(ptr noundef %13, i64 noundef %194, i64 noundef 0, ptr noundef %16, ptr noundef %17, ptr noundef %14, ptr noundef %15, ptr noundef %195)
  %197 = zext i1 %196 to i8
  store i8 %197, ptr %20, align 1, !tbaa !24
  %198 = load i8, ptr %20, align 1, !tbaa !24, !range !25, !noundef !26
  %199 = trunc i8 %198 to i1
  %200 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %199, ptr noundef @.str.88, ptr noundef %200)
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %201

201:                                              ; preds = %229, %193
  %202 = load i64, ptr %18, align 8, !tbaa !9
  %203 = load i64, ptr %22, align 8, !tbaa !9
  %204 = sub nsw i64 %203, 1
  %205 = icmp sle i64 %202, %204
  br i1 %205, label %206, label %232

206:                                              ; preds = %201
  %207 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %16, i32 0, i32 4
  %208 = load ptr, ptr %207, align 8, !tbaa !15
  %209 = load i64, ptr %18, align 8, !tbaa !9
  %210 = getelementptr inbounds double, ptr %208, i64 %209
  %211 = load double, ptr %210, align 8, !tbaa !16
  %212 = load ptr, ptr %8, align 8, !tbaa !5
  %213 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %212, i32 0, i32 4
  %214 = load ptr, ptr %213, align 8, !tbaa !15
  %215 = load i64, ptr %18, align 8, !tbaa !9
  %216 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %214, i64 %215
  %217 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %216, i32 0, i32 0
  store double %211, ptr %217, align 8, !tbaa !27
  %218 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %219 = load ptr, ptr %218, align 8, !tbaa !15
  %220 = load i64, ptr %18, align 8, !tbaa !9
  %221 = getelementptr inbounds double, ptr %219, i64 %220
  %222 = load double, ptr %221, align 8, !tbaa !16
  %223 = load ptr, ptr %8, align 8, !tbaa !5
  %224 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %223, i32 0, i32 4
  %225 = load ptr, ptr %224, align 8, !tbaa !15
  %226 = load i64, ptr %18, align 8, !tbaa !9
  %227 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %225, i64 %226
  %228 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %227, i32 0, i32 1
  store double %222, ptr %228, align 8, !tbaa !29
  br label %229

229:                                              ; preds = %206
  %230 = load i64, ptr %18, align 8, !tbaa !9
  %231 = add nsw i64 %230, 1
  store i64 %231, ptr %18, align 8, !tbaa !9
  br label %201, !llvm.loop !30

232:                                              ; preds = %201
  br label %233

233:                                              ; preds = %232, %116
  %234 = load i64, ptr %22, align 8, !tbaa !9
  store i64 %234, ptr %18, align 8, !tbaa !9
  br label %235

235:                                              ; preds = %251, %233
  %236 = load i64, ptr %18, align 8, !tbaa !9
  %237 = load i64, ptr %7, align 8, !tbaa !9
  %238 = sub nsw i64 %237, 1
  %239 = icmp sle i64 %236, %238
  br i1 %239, label %240, label %254

240:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  %241 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 0)
  %242 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %243 = extractvalue { double, double } %241, 0
  store double %243, ptr %242, align 8
  %244 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %245 = extractvalue { double, double } %241, 1
  store double %245, ptr %244, align 8
  %246 = load ptr, ptr %8, align 8, !tbaa !5
  %247 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %246, i32 0, i32 4
  %248 = load ptr, ptr %247, align 8, !tbaa !15
  %249 = load i64, ptr %18, align 8, !tbaa !9
  %250 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %248, i64 %249
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %250, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  br label %251

251:                                              ; preds = %240
  %252 = load i64, ptr %18, align 8, !tbaa !9
  %253 = add nsw i64 %252, 1
  store i64 %253, ptr %18, align 8, !tbaa !9
  br label %235, !llvm.loop !32

254:                                              ; preds = %235
  %255 = load ptr, ptr %9, align 8, !tbaa !5
  %256 = getelementptr inbounds %"struct.alglib_impl::polynomialsolverreport", ptr %255, i32 0, i32 0
  store double 0.000000e+00, ptr %256, align 8, !tbaa !33
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %257

257:                                              ; preds = %340, %254
  %258 = load i64, ptr %18, align 8, !tbaa !9
  %259 = load i64, ptr %22, align 8, !tbaa !9
  %260 = sub nsw i64 %259, 1
  %261 = icmp sle i64 %258, %260
  br i1 %261, label %262, label %343

262:                                              ; preds = %257
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #5
  %263 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 0)
  %264 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %265 = extractvalue { double, double } %263, 0
  store double %265, ptr %264, align 8
  %266 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %267 = extractvalue { double, double } %263, 1
  store double %267, ptr %266, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #5
  %268 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 1)
  %269 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %270 = extractvalue { double, double } %268, 0
  store double %270, ptr %269, align 8
  %271 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %272 = extractvalue { double, double } %268, 1
  store double %272, ptr %271, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #5
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %273

273:                                              ; preds = %323, %262
  %274 = load i64, ptr %19, align 8, !tbaa !9
  %275 = load i64, ptr %22, align 8, !tbaa !9
  %276 = icmp sle i64 %274, %275
  br i1 %276, label %277, label %326

277:                                              ; preds = %273
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %29, ptr align 8 %23, i64 16, i1 false), !tbaa.struct !31
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %24, i64 16, i1 false), !tbaa.struct !31
  %278 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %279 = load ptr, ptr %278, align 8, !tbaa !15
  %280 = load i64, ptr %19, align 8, !tbaa !9
  %281 = getelementptr inbounds double, ptr %279, i64 %280
  %282 = load double, ptr %281, align 8, !tbaa !16
  %283 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %284 = load double, ptr %283, align 8
  %285 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %286 = load double, ptr %285, align 8
  %287 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %284, double %286, double noundef %282)
  %288 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %289 = extractvalue { double, double } %287, 0
  store double %289, ptr %288, align 8
  %290 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %291 = extractvalue { double, double } %287, 1
  store double %291, ptr %290, align 8
  %292 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %293 = load double, ptr %292, align 8
  %294 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %295 = load double, ptr %294, align 8
  %296 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %297 = load double, ptr %296, align 8
  %298 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %299 = load double, ptr %298, align 8
  %300 = call { double, double } @_ZN11alglib_impl8ae_c_addENS_10ae_complexES0_(double %293, double %295, double %297, double %299)
  %301 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %302 = extractvalue { double, double } %300, 0
  store double %302, ptr %301, align 8
  %303 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %304 = extractvalue { double, double } %300, 1
  store double %304, ptr %303, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %28, i64 16, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %24, i64 16, i1 false), !tbaa.struct !31
  %305 = load ptr, ptr %8, align 8, !tbaa !5
  %306 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %305, i32 0, i32 4
  %307 = load ptr, ptr %306, align 8, !tbaa !15
  %308 = load i64, ptr %18, align 8, !tbaa !9
  %309 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %307, i64 %308
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 8 %309, i64 16, i1 false), !tbaa.struct !31
  %310 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %311 = load double, ptr %310, align 8
  %312 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %313 = load double, ptr %312, align 8
  %314 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 0
  %315 = load double, ptr %314, align 8
  %316 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 1
  %317 = load double, ptr %316, align 8
  %318 = call { double, double } @_ZN11alglib_impl8ae_c_mulENS_10ae_complexES0_(double %311, double %313, double %315, double %317)
  %319 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %320 = extractvalue { double, double } %318, 0
  store double %320, ptr %319, align 8
  %321 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %322 = extractvalue { double, double } %318, 1
  store double %322, ptr %321, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %32, i64 16, i1 false), !tbaa.struct !31
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #5
  br label %323

323:                                              ; preds = %277
  %324 = load i64, ptr %19, align 8, !tbaa !9
  %325 = add nsw i64 %324, 1
  store i64 %325, ptr %19, align 8, !tbaa !9
  br label %273, !llvm.loop !35

326:                                              ; preds = %273
  %327 = load ptr, ptr %9, align 8, !tbaa !5
  %328 = getelementptr inbounds %"struct.alglib_impl::polynomialsolverreport", ptr %327, i32 0, i32 0
  %329 = load double, ptr %328, align 8, !tbaa !33
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %23, i64 16, i1 false), !tbaa.struct !31
  %330 = load ptr, ptr %10, align 8, !tbaa !5
  %331 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %332 = load double, ptr %331, align 8
  %333 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %334 = load double, ptr %333, align 8
  %335 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %332, double %334, ptr noundef %330)
  %336 = load ptr, ptr %10, align 8, !tbaa !5
  %337 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %329, double noundef %335, ptr noundef %336)
  %338 = load ptr, ptr %9, align 8, !tbaa !5
  %339 = getelementptr inbounds %"struct.alglib_impl::polynomialsolverreport", ptr %338, i32 0, i32 0
  store double %337, ptr %339, align 8, !tbaa !33
  br label %340

340:                                              ; preds = %326
  %341 = load i64, ptr %18, align 8, !tbaa !9
  %342 = add nsw i64 %341, 1
  store i64 %342, ptr %18, align 8, !tbaa !9
  br label %257, !llvm.loop !36

343:                                              ; preds = %257
  %344 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %344)
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 16, 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 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  ret void
}

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

declare void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl29_polynomialsolverreport_clearEPv(ptr noundef) #3

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

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

declare noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef, double noundef) #2

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

declare noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) #2

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

declare noundef zeroext i1 @_ZN11alglib_impl10rmatrixevdEPKNS_9ae_matrixEllPNS_9ae_vectorES4_PS0_S5_PNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef) #2

; 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) #4

declare { double, double } @_ZN11alglib_impl8ae_c_addENS_10ae_complexES0_(double, double, double, double) #2

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

declare { double, double } @_ZN11alglib_impl8ae_c_mulENS_10ae_complexES0_(double, double, double, double) #2

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #2

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}
!24 = !{!13, !13, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!28, !17, i64 0}
!28 = !{!"_ZTSN11alglib_impl10ae_complexE", !17, i64 0, !17, i64 8}
!29 = !{!28, !17, i64 8}
!30 = distinct !{!30, !19}
!31 = !{i64 0, i64 8, !16, i64 8, i64 8, !16}
!32 = distinct !{!32, !19}
!33 = !{!34, !17, i64 0}
!34 = !{!"_ZTSN11alglib_impl22polynomialsolverreportE", !17, i64 0}
!35 = distinct !{!35, !19}
!36 = distinct !{!36, !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_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_complex" = type { double, double }

@.str.84 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [51 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl15polynomialsolveEPKNS_9ae_vectorElPS0_PNS_22polynomialsolverreportEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #3 {
  %6 = alloca %"struct.alglib_impl::ae_frame", align 8
  %7 = alloca %"struct.alglib_impl::ae_vector", align 8
  %8 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %9 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %10 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %11 = alloca %"struct.alglib_impl::ae_vector", align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %4, ptr noundef nonnull %6)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %7, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %8, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %9, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %10, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %11, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %12, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %7, ptr noundef %0, ptr noundef %4, i1 noundef zeroext true)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %2)
  call void @_ZN11alglib_impl29_polynomialsolverreport_clearEPv(ptr noundef %3)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %9, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %10, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %11, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %12, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  %13 = icmp sgt i64 %1, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.84, ptr noundef %4)
  %14 = load i64, ptr %7, align 8, !tbaa !5
  %15 = add i64 %1, 1
  %16 = icmp sgt i64 %14, %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.85, ptr noundef %4)
  %17 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %15, ptr noundef %4)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.86, ptr noundef %4)
  %18 = getelementptr inbounds i8, ptr %7, i64 56
  %19 = load ptr, ptr %18, align 8, !tbaa !13
  %20 = getelementptr inbounds double, ptr %19, i64 %1
  %21 = load double, ptr %20, align 8, !tbaa !14
  %22 = call noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef %21, double noundef 0.000000e+00)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef nonnull @.str.87, ptr noundef %4)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %2, i64 noundef %1, ptr noundef %4)
  br i1 %13, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %5, %27
  %.0114130 = phi i64 [ %28, %27 ], [ 0, %5 ]
  %23 = load ptr, ptr %18, align 8, !tbaa !13
  %24 = getelementptr inbounds double, ptr %23, i64 %.0114130
  %25 = load double, ptr %24, align 8, !tbaa !14
  %26 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %25, double noundef 0.000000e+00)
  br i1 %26, label %27, label %.critedge

27:                                               ; preds = %.lr.ph
  %28 = add nuw nsw i64 %.0114130, 1
  %exitcond.not = icmp eq i64 %28, %1
  br i1 %exitcond.not, label %.lr.ph135.preheader, label %.lr.ph, !llvm.loop !16

.critedge:                                        ; preds = %.lr.ph, %5
  %.0114.lcssa = phi i64 [ 0, %5 ], [ %.0114130, %.lr.ph ]
  %29 = sub i64 %1, %.0114.lcssa
  %.not133 = icmp sgt i64 %.0114.lcssa, %1
  br i1 %.not133, label %._crit_edge, label %.lr.ph135.preheader

.lr.ph135.preheader:                              ; preds = %27, %.critedge
  %30 = phi i64 [ %29, %.critedge ], [ 0, %27 ]
  %.0114.lcssa185 = phi i64 [ %.0114.lcssa, %.critedge ], [ %1, %27 ]
  %31 = add i64 %.0114.lcssa185, %1
  %32 = and i64 %31, 1
  %lcmp.mod.not.not = icmp eq i64 %32, 0
  br i1 %lcmp.mod.not.not, label %.lr.ph135.prol, label %.lr.ph135.prol.loopexit

.lr.ph135.prol:                                   ; preds = %.lr.ph135.preheader
  %33 = load ptr, ptr %18, align 8, !tbaa !13
  %34 = getelementptr inbounds double, ptr %33, i64 %.0114.lcssa185
  %35 = load double, ptr %34, align 8, !tbaa !14
  %36 = getelementptr inbounds double, ptr %33, i64 %1
  %37 = load double, ptr %36, align 8, !tbaa !14
  %38 = fdiv double %35, %37
  store double %38, ptr %33, align 8, !tbaa !14
  %39 = add i64 %.0114.lcssa185, 1
  br label %.lr.ph135.prol.loopexit

.lr.ph135.prol.loopexit:                          ; preds = %.lr.ph135.prol, %.lr.ph135.preheader
  %.0134.unr = phi i64 [ %.0114.lcssa185, %.lr.ph135.preheader ], [ %39, %.lr.ph135.prol ]
  %40 = icmp eq i64 %.0114.lcssa185, %1
  br i1 %40, label %._crit_edge, label %.lr.ph135

.lr.ph135:                                        ; preds = %.lr.ph135.prol.loopexit, %.lr.ph135
  %.0134 = phi i64 [ %58, %.lr.ph135 ], [ %.0134.unr, %.lr.ph135.prol.loopexit ]
  %41 = load ptr, ptr %18, align 8, !tbaa !13
  %42 = getelementptr inbounds double, ptr %41, i64 %.0134
  %43 = load double, ptr %42, align 8, !tbaa !14
  %44 = getelementptr inbounds double, ptr %41, i64 %1
  %45 = load double, ptr %44, align 8, !tbaa !14
  %46 = fdiv double %43, %45
  %47 = sub nuw nsw i64 %.0134, %.0114.lcssa185
  %48 = getelementptr inbounds double, ptr %41, i64 %47
  store double %46, ptr %48, align 8, !tbaa !14
  %49 = add i64 %.0134, 1
  %50 = load ptr, ptr %18, align 8, !tbaa !13
  %51 = getelementptr inbounds double, ptr %50, i64 %49
  %52 = load double, ptr %51, align 8, !tbaa !14
  %53 = getelementptr inbounds double, ptr %50, i64 %1
  %54 = load double, ptr %53, align 8, !tbaa !14
  %55 = fdiv double %52, %54
  %56 = sub nuw nsw i64 %49, %.0114.lcssa185
  %57 = getelementptr inbounds double, ptr %50, i64 %56
  store double %55, ptr %57, align 8, !tbaa !14
  %58 = add i64 %.0134, 2
  %exitcond176.not.1 = icmp eq i64 %49, %1
  br i1 %exitcond176.not.1, label %._crit_edge, label %.lr.ph135, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph135.prol.loopexit, %.lr.ph135, %.critedge
  %59 = phi i64 [ %29, %.critedge ], [ %30, %.lr.ph135 ], [ %30, %.lr.ph135.prol.loopexit ]
  %.0114.lcssa186 = phi i64 [ %.0114.lcssa, %.critedge ], [ %.0114.lcssa185, %.lr.ph135 ], [ %.0114.lcssa185, %.lr.ph135.prol.loopexit ]
  %60 = icmp sgt i64 %59, 0
  br i1 %60, label %.split.us, label %.loopexit

.split.us:                                        ; preds = %._crit_edge
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %59, i64 noundef %59, ptr noundef %4)
  %61 = getelementptr inbounds i8, ptr %8, i64 72
  %62 = add nsw i64 %59, -1
  %xtraiter190 = and i64 %59, 3
  %63 = icmp ult i64 %59, 4
  %unroll_iter = and i64 %59, 9223372036854775804
  %lcmp.mod191.not = icmp eq i64 %xtraiter190, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %._crit_edge139.us, %.split.us
  %.1140.us = phi i64 [ 0, %.split.us ], [ %89, %._crit_edge139.us ]
  br i1 %63, label %._crit_edge139.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %.0112137.us = phi i64 [ %83, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter = phi i64 [ %niter.next.3, %.preheader.us.new ], [ 0, %.preheader.us ]
  %64 = load ptr, ptr %61, align 8, !tbaa !13
  %65 = getelementptr inbounds ptr, ptr %64, i64 %.1140.us
  %66 = load ptr, ptr %65, align 8, !tbaa !19
  %67 = getelementptr inbounds double, ptr %66, i64 %.0112137.us
  store double 0.000000e+00, ptr %67, align 8, !tbaa !14
  %68 = or disjoint i64 %.0112137.us, 1
  %69 = load ptr, ptr %61, align 8, !tbaa !13
  %70 = getelementptr inbounds ptr, ptr %69, i64 %.1140.us
  %71 = load ptr, ptr %70, align 8, !tbaa !19
  %72 = getelementptr inbounds double, ptr %71, i64 %68
  store double 0.000000e+00, ptr %72, align 8, !tbaa !14
  %73 = or disjoint i64 %.0112137.us, 2
  %74 = load ptr, ptr %61, align 8, !tbaa !13
  %75 = getelementptr inbounds ptr, ptr %74, i64 %.1140.us
  %76 = load ptr, ptr %75, align 8, !tbaa !19
  %77 = getelementptr inbounds double, ptr %76, i64 %73
  store double 0.000000e+00, ptr %77, align 8, !tbaa !14
  %78 = or disjoint i64 %.0112137.us, 3
  %79 = load ptr, ptr %61, align 8, !tbaa !13
  %80 = getelementptr inbounds ptr, ptr %79, i64 %.1140.us
  %81 = load ptr, ptr %80, align 8, !tbaa !19
  %82 = getelementptr inbounds double, ptr %81, i64 %78
  store double 0.000000e+00, ptr %82, align 8, !tbaa !14
  %83 = add nuw nsw i64 %.0112137.us, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge139.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !20

._crit_edge139.us.unr-lcssa:                      ; preds = %.preheader.us.new, %.preheader.us
  %.0112137.us.unr = phi i64 [ 0, %.preheader.us ], [ %83, %.preheader.us.new ]
  br i1 %lcmp.mod191.not, label %._crit_edge139.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge139.us.unr-lcssa, %.epil.preheader
  %.0112137.us.epil = phi i64 [ %88, %.epil.preheader ], [ %.0112137.us.unr, %._crit_edge139.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge139.us.unr-lcssa ]
  %84 = load ptr, ptr %61, align 8, !tbaa !13
  %85 = getelementptr inbounds ptr, ptr %84, i64 %.1140.us
  %86 = load ptr, ptr %85, align 8, !tbaa !19
  %87 = getelementptr inbounds double, ptr %86, i64 %.0112137.us.epil
  store double 0.000000e+00, ptr %87, align 8, !tbaa !14
  %88 = add nuw nsw i64 %.0112137.us.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter190
  br i1 %epil.iter.cmp.not, label %._crit_edge139.us, label %.epil.preheader, !llvm.loop !21

._crit_edge139.us:                                ; preds = %.epil.preheader, %._crit_edge139.us.unr-lcssa
  %89 = add nuw nsw i64 %.1140.us, 1
  %exitcond178.not = icmp eq i64 %89, %59
  br i1 %exitcond178.not, label %.split142.us, label %.preheader.us, !llvm.loop !23

.split142.us:                                     ; preds = %._crit_edge139.us
  %90 = add nsw i64 %59, -1
  %91 = load ptr, ptr %18, align 8, !tbaa !13
  %92 = load double, ptr %91, align 8, !tbaa !14
  %93 = fneg double %92
  %94 = load ptr, ptr %61, align 8, !tbaa !13
  %95 = load ptr, ptr %94, align 8, !tbaa !19
  %96 = getelementptr inbounds double, ptr %95, i64 %90
  store double %93, ptr %96, align 8, !tbaa !14
  %.not121.not143.not = icmp eq i64 %59, 1
  br i1 %.not121.not143.not, label %.lr.ph151, label %.lr.ph146.preheader

.lr.ph146.preheader:                              ; preds = %.split142.us
  %xtraiter192 = and i64 %62, 1
  %97 = icmp eq i64 %59, 2
  br i1 %97, label %.lr.ph151.loopexit.unr-lcssa, label %.lr.ph146.preheader.new

.lr.ph146.preheader.new:                          ; preds = %.lr.ph146.preheader
  %unroll_iter195 = and i64 %62, -2
  br label %.lr.ph146

.lr.ph146:                                        ; preds = %.lr.ph146, %.lr.ph146.preheader.new
  %.2144 = phi i64 [ 1, %.lr.ph146.preheader.new ], [ %125, %.lr.ph146 ]
  %niter196 = phi i64 [ 0, %.lr.ph146.preheader.new ], [ %niter196.next.1, %.lr.ph146 ]
  %98 = load ptr, ptr %61, align 8, !tbaa !13
  %99 = getelementptr inbounds ptr, ptr %98, i64 %.2144
  %100 = load ptr, ptr %99, align 8, !tbaa !19
  %101 = getelementptr double, ptr %100, i64 %.2144
  %102 = getelementptr i8, ptr %101, i64 -8
  store double 1.000000e+00, ptr %102, align 8, !tbaa !14
  %103 = load ptr, ptr %18, align 8, !tbaa !13
  %104 = getelementptr inbounds double, ptr %103, i64 %.2144
  %105 = load double, ptr %104, align 8, !tbaa !14
  %106 = fneg double %105
  %107 = load ptr, ptr %61, align 8, !tbaa !13
  %108 = getelementptr inbounds ptr, ptr %107, i64 %.2144
  %109 = load ptr, ptr %108, align 8, !tbaa !19
  %110 = getelementptr inbounds double, ptr %109, i64 %90
  store double %106, ptr %110, align 8, !tbaa !14
  %111 = add nuw nsw i64 %.2144, 1
  %112 = load ptr, ptr %61, align 8, !tbaa !13
  %113 = getelementptr inbounds ptr, ptr %112, i64 %111
  %114 = load ptr, ptr %113, align 8, !tbaa !19
  %115 = getelementptr double, ptr %114, i64 %111
  %116 = getelementptr i8, ptr %115, i64 -8
  store double 1.000000e+00, ptr %116, align 8, !tbaa !14
  %117 = load ptr, ptr %18, align 8, !tbaa !13
  %118 = getelementptr inbounds double, ptr %117, i64 %111
  %119 = load double, ptr %118, align 8, !tbaa !14
  %120 = fneg double %119
  %121 = load ptr, ptr %61, align 8, !tbaa !13
  %122 = getelementptr inbounds ptr, ptr %121, i64 %111
  %123 = load ptr, ptr %122, align 8, !tbaa !19
  %124 = getelementptr inbounds double, ptr %123, i64 %90
  store double %120, ptr %124, align 8, !tbaa !14
  %125 = add nuw nsw i64 %.2144, 2
  %niter196.next.1 = add i64 %niter196, 2
  %niter196.ncmp.1 = icmp eq i64 %niter196.next.1, %unroll_iter195
  br i1 %niter196.ncmp.1, label %.lr.ph151.loopexit.unr-lcssa, label %.lr.ph146, !llvm.loop !24

.lr.ph151.loopexit.unr-lcssa:                     ; preds = %.lr.ph146, %.lr.ph146.preheader
  %.2144.unr = phi i64 [ 1, %.lr.ph146.preheader ], [ %125, %.lr.ph146 ]
  %lcmp.mod194.not = icmp eq i64 %xtraiter192, 0
  br i1 %lcmp.mod194.not, label %.lr.ph151, label %.lr.ph146.epil

.lr.ph146.epil:                                   ; preds = %.lr.ph151.loopexit.unr-lcssa
  %126 = load ptr, ptr %61, align 8, !tbaa !13
  %127 = getelementptr inbounds ptr, ptr %126, i64 %.2144.unr
  %128 = load ptr, ptr %127, align 8, !tbaa !19
  %129 = getelementptr double, ptr %128, i64 %.2144.unr
  %130 = getelementptr i8, ptr %129, i64 -8
  store double 1.000000e+00, ptr %130, align 8, !tbaa !14
  %131 = load ptr, ptr %18, align 8, !tbaa !13
  %132 = getelementptr inbounds double, ptr %131, i64 %.2144.unr
  %133 = load double, ptr %132, align 8, !tbaa !14
  %134 = fneg double %133
  %135 = load ptr, ptr %61, align 8, !tbaa !13
  %136 = getelementptr inbounds ptr, ptr %135, i64 %.2144.unr
  %137 = load ptr, ptr %136, align 8, !tbaa !19
  %138 = getelementptr inbounds double, ptr %137, i64 %90
  store double %134, ptr %138, align 8, !tbaa !14
  br label %.lr.ph151

.lr.ph151:                                        ; preds = %.lr.ph146.epil, %.lr.ph151.loopexit.unr-lcssa, %.split142.us
  %139 = call noundef zeroext i1 @_ZN11alglib_impl10rmatrixevdEPKNS_9ae_matrixEllPNS_9ae_vectorES4_PS0_S5_PNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %59, i64 noundef 0, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef %4)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %139, ptr noundef nonnull @.str.88, ptr noundef %4)
  %140 = getelementptr inbounds i8, ptr %11, i64 56
  %141 = getelementptr inbounds i8, ptr %2, i64 56
  %142 = getelementptr inbounds i8, ptr %12, i64 56
  %smax = call i64 @llvm.smax.i64(i64 %59, i64 1)
  %xtraiter198 = and i64 %smax, 1
  %143 = icmp eq i64 %59, 1
  br i1 %143, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph151.new

.lr.ph151.new:                                    ; preds = %.lr.ph151
  %unroll_iter201 = and i64 %smax, 9223372036854775806
  br label %144

144:                                              ; preds = %144, %.lr.ph151.new
  %.3149 = phi i64 [ 0, %.lr.ph151.new ], [ %166, %144 ]
  %niter202 = phi i64 [ 0, %.lr.ph151.new ], [ %niter202.next.1, %144 ]
  %145 = load ptr, ptr %140, align 8, !tbaa !13
  %146 = getelementptr inbounds double, ptr %145, i64 %.3149
  %147 = load double, ptr %146, align 8, !tbaa !14
  %148 = load ptr, ptr %141, align 8, !tbaa !13
  %149 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %148, i64 %.3149
  store double %147, ptr %149, align 8, !tbaa !25
  %150 = load ptr, ptr %142, align 8, !tbaa !13
  %151 = getelementptr inbounds double, ptr %150, i64 %.3149
  %152 = load double, ptr %151, align 8, !tbaa !14
  %153 = load ptr, ptr %141, align 8, !tbaa !13
  %154 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %153, i64 %.3149, i32 1
  store double %152, ptr %154, align 8, !tbaa !27
  %155 = or disjoint i64 %.3149, 1
  %156 = load ptr, ptr %140, align 8, !tbaa !13
  %157 = getelementptr inbounds double, ptr %156, i64 %155
  %158 = load double, ptr %157, align 8, !tbaa !14
  %159 = load ptr, ptr %141, align 8, !tbaa !13
  %160 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %159, i64 %155
  store double %158, ptr %160, align 8, !tbaa !25
  %161 = load ptr, ptr %142, align 8, !tbaa !13
  %162 = getelementptr inbounds double, ptr %161, i64 %155
  %163 = load double, ptr %162, align 8, !tbaa !14
  %164 = load ptr, ptr %141, align 8, !tbaa !13
  %165 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %164, i64 %155, i32 1
  store double %163, ptr %165, align 8, !tbaa !27
  %166 = add nuw nsw i64 %.3149, 2
  %niter202.next.1 = add i64 %niter202, 2
  %niter202.ncmp.1 = icmp eq i64 %niter202.next.1, %unroll_iter201
  br i1 %niter202.ncmp.1, label %.loopexit.loopexit.unr-lcssa, label %144, !llvm.loop !28

.loopexit.loopexit.unr-lcssa:                     ; preds = %144, %.lr.ph151
  %.3149.unr = phi i64 [ 0, %.lr.ph151 ], [ %166, %144 ]
  %lcmp.mod200.not = icmp eq i64 %xtraiter198, 0
  br i1 %lcmp.mod200.not, label %.loopexit, label %.loopexit.loopexit.epilog-lcssa

.loopexit.loopexit.epilog-lcssa:                  ; preds = %.loopexit.loopexit.unr-lcssa
  %167 = load ptr, ptr %140, align 8, !tbaa !13
  %168 = getelementptr inbounds double, ptr %167, i64 %.3149.unr
  %169 = load double, ptr %168, align 8, !tbaa !14
  %170 = load ptr, ptr %141, align 8, !tbaa !13
  %171 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %170, i64 %.3149.unr
  store double %169, ptr %171, align 8, !tbaa !25
  %172 = load ptr, ptr %142, align 8, !tbaa !13
  %173 = getelementptr inbounds double, ptr %172, i64 %.3149.unr
  %174 = load double, ptr %173, align 8, !tbaa !14
  %175 = load ptr, ptr %141, align 8, !tbaa !13
  %176 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %175, i64 %.3149.unr, i32 1
  store double %174, ptr %176, align 8, !tbaa !27
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit.epilog-lcssa, %.loopexit.loopexit.unr-lcssa, %._crit_edge
  %.not123.not152 = icmp sgt i64 %.0114.lcssa186, 0
  br i1 %.not123.not152, label %.lr.ph155, label %._crit_edge156

.lr.ph155:                                        ; preds = %.loopexit
  %177 = getelementptr inbounds i8, ptr %2, i64 56
  br label %178

178:                                              ; preds = %.lr.ph155, %178
  %.4153 = phi i64 [ %59, %.lr.ph155 ], [ %184, %178 ]
  %179 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 0)
  %180 = extractvalue { double, double } %179, 0
  %181 = extractvalue { double, double } %179, 1
  %182 = load ptr, ptr %177, align 8, !tbaa !13
  %183 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %182, i64 %.4153
  store double %180, ptr %183, align 8, !tbaa !14
  %.sroa.419.0..sroa_idx = getelementptr inbounds i8, ptr %183, i64 8
  store double %181, ptr %.sroa.419.0..sroa_idx, align 8, !tbaa !14
  %184 = add nsw i64 %.4153, 1
  %.not123.not = icmp slt i64 %184, %1
  br i1 %.not123.not, label %178, label %._crit_edge156, !llvm.loop !29

._crit_edge156:                                   ; preds = %178, %.loopexit
  store double 0.000000e+00, ptr %3, align 8, !tbaa !30
  br i1 %60, label %.lr.ph172, label %._crit_edge173

.lr.ph172:                                        ; preds = %._crit_edge156
  %185 = getelementptr inbounds i8, ptr %2, i64 56
  %186 = sub i64 %15, %.0114.lcssa186
  br label %.lr.ph165.preheader

.lr.ph165.preheader:                              ; preds = %._crit_edge166, %.lr.ph172
  %.5170 = phi i64 [ 0, %.lr.ph172 ], [ %203, %._crit_edge166 ]
  %187 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 0)
  %188 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 1)
  %.sroa.021.0158 = extractvalue { double, double } %187, 0
  %.sroa.622.0157 = extractvalue { double, double } %187, 1
  br label %.lr.ph165

.lr.ph165:                                        ; preds = %.lr.ph165.preheader, %.lr.ph165
  %.sroa.021.0163 = phi double [ %.sroa.021.0, %.lr.ph165 ], [ %.sroa.021.0158, %.lr.ph165.preheader ]
  %.sroa.622.0162 = phi double [ %.sroa.622.0, %.lr.ph165 ], [ %.sroa.622.0157, %.lr.ph165.preheader ]
  %.1113161 = phi i64 [ %199, %.lr.ph165 ], [ 0, %.lr.ph165.preheader ]
  %.pn160 = phi { double, double } [ %198, %.lr.ph165 ], [ %188, %.lr.ph165.preheader ]
  %.sroa.6.0 = extractvalue { double, double } %.pn160, 1
  %.sroa.020.0 = extractvalue { double, double } %.pn160, 0
  %189 = load ptr, ptr %18, align 8, !tbaa !13
  %190 = getelementptr inbounds double, ptr %189, i64 %.1113161
  %191 = load double, ptr %190, align 8, !tbaa !14
  %192 = call { double, double } @_ZN11alglib_impl10ae_c_mul_dENS_10ae_complexEd(double %.sroa.020.0, double %.sroa.6.0, double noundef %191)
  %193 = extractvalue { double, double } %192, 0
  %194 = extractvalue { double, double } %192, 1
  %195 = call { double, double } @_ZN11alglib_impl8ae_c_addENS_10ae_complexES0_(double %.sroa.021.0163, double %.sroa.622.0162, double %193, double %194)
  %196 = load ptr, ptr %185, align 8, !tbaa !13
  %197 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %196, i64 %.5170
  %.sroa.01.0.copyload = load double, ptr %197, align 8, !tbaa !14
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %197, i64 8
  %.sroa.22.0.copyload = load double, ptr %.sroa.22.0..sroa_idx, align 8, !tbaa !14
  %198 = call { double, double } @_ZN11alglib_impl8ae_c_mulENS_10ae_complexES0_(double %.sroa.020.0, double %.sroa.6.0, double %.sroa.01.0.copyload, double %.sroa.22.0.copyload)
  %199 = add nuw i64 %.1113161, 1
  %.sroa.622.0 = extractvalue { double, double } %195, 1
  %.sroa.021.0 = extractvalue { double, double } %195, 0
  %exitcond181.not = icmp eq i64 %199, %186
  br i1 %exitcond181.not, label %._crit_edge166, label %.lr.ph165, !llvm.loop !32

._crit_edge166:                                   ; preds = %.lr.ph165
  %200 = load double, ptr %3, align 8, !tbaa !30
  %201 = call noundef double @_ZN11alglib_impl8ae_c_absENS_10ae_complexEPNS_8ae_stateE(double %.sroa.021.0, double %.sroa.622.0, ptr noundef %4)
  %202 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %200, double noundef %201, ptr noundef %4)
  store double %202, ptr %3, align 8, !tbaa !30
  %203 = add nuw nsw i64 %.5170, 1
  %exitcond182.not = icmp eq i64 %203, %59
  br i1 %exitcond182.not, label %._crit_edge173, label %.lr.ph165.preheader, !llvm.loop !33

._crit_edge173:                                   ; preds = %._crit_edge166, %._crit_edge156
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %4)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  ret void
}

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

declare void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl29_polynomialsolverreport_clearEPv(ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #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 #2

declare noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl9ae_fp_neqEdd(double noundef, double noundef) local_unnamed_addr #2

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

declare noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) local_unnamed_addr #2

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

declare noundef zeroext i1 @_ZN11alglib_impl10rmatrixevdEPKNS_9ae_matrixEllPNS_9ae_vectorES4_PS0_S5_PNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef) local_unnamed_addr #2

declare { double, double } @_ZN11alglib_impl8ae_c_addENS_10ae_complexES0_(double, double, double, double) local_unnamed_addr #2

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

declare { double, double } @_ZN11alglib_impl8ae_c_mulENS_10ae_complexES0_(double, double, double, double) local_unnamed_addr #2

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #2

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !7, i64 0}
!6 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !8, i64 56}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!8, !8, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!12, !12, i64 0}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !17}
!25 = !{!26, !15, i64 0}
!26 = !{!"_ZTSN11alglib_impl10ae_complexE", !15, i64 0, !15, i64 8}
!27 = !{!26, !15, i64 8}
!28 = distinct !{!28, !17}
!29 = distinct !{!29, !17}
!30 = !{!31, !15, i64 0}
!31 = !{!"_ZTSN11alglib_impl22polynomialsolverreportE", !15, i64 0}
!32 = distinct !{!32, !17}
!33 = distinct !{!33, !17}


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