; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (integration)

; 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 }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl14gkqgeneraterecEPNS_9ae_vectorES1_dlPlS1_S1_S1_PNS_8ae_stateE(ptr noundef, ptr noundef, double noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl22gkqgenerategaussjacobiElddPlPNS_9ae_vectorES2_S2_PNS_8ae_stateE(i64 noundef %0, double noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #1 {
  %9 = alloca i64, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.alglib_impl::ae_frame", align 8
  %18 = alloca i64, align 8
  %19 = alloca %"struct.alglib_impl::ae_vector", align 8
  %20 = alloca %"struct.alglib_impl::ae_vector", align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca i64, align 8
  %26 = alloca double, align 8
  %27 = alloca i32, align 4
  store i64 %0, ptr %9, align 8, !tbaa !5
  store double %1, ptr %10, align 8, !tbaa !9
  store double %2, ptr %11, align 8, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !11
  store ptr %4, ptr %13, align 8, !tbaa !11
  store ptr %5, ptr %14, align 8, !tbaa !11
  store ptr %6, ptr %15, align 8, !tbaa !11
  store ptr %7, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 64, 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 8, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %28 = load ptr, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %28, ptr noundef %17)
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 64, i1 false)
  %29 = load ptr, ptr %12, align 8, !tbaa !11
  store i64 0, ptr %29, align 8, !tbaa !5
  %30 = load ptr, ptr %13, align 8, !tbaa !11
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %30)
  %31 = load ptr, ptr %14, align 8, !tbaa !11
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %31)
  %32 = load ptr, ptr %15, align 8, !tbaa !11
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %32)
  %33 = load ptr, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %19, i64 noundef 0, i64 noundef 3, ptr noundef %33, i1 noundef zeroext true)
  %34 = load ptr, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %20, i64 noundef 0, i64 noundef 3, ptr noundef %34, i1 noundef zeroext true)
  %35 = load i64, ptr %9, align 8, !tbaa !5
  %36 = srem i64 %35, 2
  %37 = icmp ne i64 %36, 1
  br i1 %37, label %41, label %38

38:                                               ; preds = %8
  %39 = load i64, ptr %9, align 8, !tbaa !5
  %40 = icmp slt i64 %39, 3
  br i1 %40, label %41, label %44

41:                                               ; preds = %38, %8
  %42 = load ptr, ptr %12, align 8, !tbaa !11
  store i64 -1, ptr %42, align 8, !tbaa !5
  %43 = load ptr, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %43)
  store i32 1, ptr %27, align 4
  br label %310

44:                                               ; preds = %38
  %45 = load double, ptr %10, align 8, !tbaa !9
  %46 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %45, double noundef -1.000000e+00)
  br i1 %46, label %50, label %47

47:                                               ; preds = %44
  %48 = load double, ptr %11, align 8, !tbaa !9
  %49 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %48, double noundef -1.000000e+00)
  br i1 %49, label %50, label %53

50:                                               ; preds = %47, %44
  %51 = load ptr, ptr %12, align 8, !tbaa !11
  store i64 -1, ptr %51, align 8, !tbaa !5
  %52 = load ptr, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %52)
  store i32 1, ptr %27, align 4
  br label %310

53:                                               ; preds = %47
  %54 = load i64, ptr %9, align 8, !tbaa !5
  %55 = sdiv i64 %54, 2
  %56 = mul nsw i64 3, %55
  %57 = sitofp i64 %56 to double
  %58 = fdiv double %57, 2.000000e+00
  %59 = load ptr, ptr %16, align 8, !tbaa !11
  %60 = call noundef i64 @_ZN11alglib_impl8ae_iceilEdPNS_8ae_stateE(double noundef %58, ptr noundef %59)
  %61 = add nsw i64 %60, 1
  store i64 %61, ptr %18, align 8, !tbaa !5
  %62 = load i64, ptr %18, align 8, !tbaa !5
  %63 = load ptr, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %19, i64 noundef %62, ptr noundef %63)
  %64 = load i64, ptr %18, align 8, !tbaa !5
  %65 = load ptr, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %20, i64 noundef %64, ptr noundef %65)
  store i64 0, ptr %25, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %76, %53
  %67 = load i64, ptr %25, align 8, !tbaa !5
  %68 = load i64, ptr %18, align 8, !tbaa !5
  %69 = sub nsw i64 %68, 1
  %70 = icmp sle i64 %67, %69
  br i1 %70, label %71, label %79

71:                                               ; preds = %66
  %72 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %73 = load ptr, ptr %72, align 8, !tbaa !13
  %74 = load i64, ptr %25, align 8, !tbaa !5
  %75 = getelementptr inbounds double, ptr %73, i64 %74
  store double 0.000000e+00, ptr %75, align 8, !tbaa !9
  br label %76

76:                                               ; preds = %71
  %77 = load i64, ptr %25, align 8, !tbaa !5
  %78 = add nsw i64 %77, 1
  store i64 %78, ptr %25, align 8, !tbaa !5
  br label %66, !llvm.loop !14

79:                                               ; preds = %66
  %80 = load double, ptr %10, align 8, !tbaa !9
  %81 = load double, ptr %11, align 8, !tbaa !9
  %82 = fadd double %80, %81
  store double %82, ptr %23, align 8, !tbaa !9
  %83 = load double, ptr %11, align 8, !tbaa !9
  %84 = load double, ptr %10, align 8, !tbaa !9
  %85 = fsub double %83, %84
  %86 = load double, ptr %23, align 8, !tbaa !9
  %87 = fadd double %86, 2.000000e+00
  %88 = fdiv double %85, %87
  %89 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !13
  %91 = getelementptr inbounds double, ptr %90, i64 0
  store double %88, ptr %91, align 8, !tbaa !9
  %92 = load double, ptr %23, align 8, !tbaa !9
  %93 = fadd double %92, 1.000000e+00
  %94 = load ptr, ptr %16, align 8, !tbaa !11
  %95 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 2.000000e+00, ptr noundef %94)
  %96 = load double, ptr %10, align 8, !tbaa !9
  %97 = fadd double %96, 1.000000e+00
  %98 = load ptr, ptr %16, align 8, !tbaa !11
  %99 = call noundef double @_ZN11alglib_impl7lngammaEdPdPNS_8ae_stateE(double noundef %97, ptr noundef %26, ptr noundef %98)
  %100 = call double @llvm.fmuladd.f64(double %93, double %95, double %99)
  %101 = load double, ptr %11, align 8, !tbaa !9
  %102 = fadd double %101, 1.000000e+00
  %103 = load ptr, ptr %16, align 8, !tbaa !11
  %104 = call noundef double @_ZN11alglib_impl7lngammaEdPdPNS_8ae_stateE(double noundef %102, ptr noundef %26, ptr noundef %103)
  %105 = fadd double %100, %104
  %106 = load double, ptr %23, align 8, !tbaa !9
  %107 = fadd double %106, 2.000000e+00
  %108 = load ptr, ptr %16, align 8, !tbaa !11
  %109 = call noundef double @_ZN11alglib_impl7lngammaEdPdPNS_8ae_stateE(double noundef %107, ptr noundef %26, ptr noundef %108)
  %110 = fsub double %105, %109
  store double %110, ptr %24, align 8, !tbaa !9
  %111 = load double, ptr %24, align 8, !tbaa !9
  %112 = load ptr, ptr %16, align 8, !tbaa !11
  %113 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 1.000000e+300, ptr noundef %112)
  %114 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %111, double noundef %113)
  br i1 %114, label %115, label %118

115:                                              ; preds = %79
  %116 = load ptr, ptr %12, align 8, !tbaa !11
  store i64 -4, ptr %116, align 8, !tbaa !5
  %117 = load ptr, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %117)
  store i32 1, ptr %27, align 4
  br label %310

118:                                              ; preds = %79
  %119 = load double, ptr %24, align 8, !tbaa !9
  %120 = load ptr, ptr %16, align 8, !tbaa !11
  %121 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %119, ptr noundef %120)
  %122 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %20, i32 0, i32 4
  %123 = load ptr, ptr %122, align 8, !tbaa !13
  %124 = getelementptr inbounds double, ptr %123, i64 0
  store double %121, ptr %124, align 8, !tbaa !9
  %125 = load i64, ptr %18, align 8, !tbaa !5
  %126 = icmp sgt i64 %125, 1
  br i1 %126, label %127, label %248

127:                                              ; preds = %118
  %128 = load double, ptr %10, align 8, !tbaa !9
  %129 = load ptr, ptr %16, align 8, !tbaa !11
  %130 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %128, ptr noundef %129)
  store double %130, ptr %21, align 8, !tbaa !9
  %131 = load double, ptr %11, align 8, !tbaa !9
  %132 = load ptr, ptr %16, align 8, !tbaa !11
  %133 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %131, ptr noundef %132)
  store double %133, ptr %22, align 8, !tbaa !9
  %134 = load double, ptr %22, align 8, !tbaa !9
  %135 = load double, ptr %21, align 8, !tbaa !9
  %136 = fsub double %134, %135
  %137 = load double, ptr %23, align 8, !tbaa !9
  %138 = fadd double %137, 2.000000e+00
  %139 = load double, ptr %23, align 8, !tbaa !9
  %140 = fadd double %139, 4.000000e+00
  %141 = fmul double %138, %140
  %142 = fdiv double %136, %141
  %143 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !13
  %145 = getelementptr inbounds double, ptr %144, i64 1
  store double %142, ptr %145, align 8, !tbaa !9
  %146 = load double, ptr %10, align 8, !tbaa !9
  %147 = fadd double %146, 1.000000e+00
  %148 = fmul double 4.000000e+00, %147
  %149 = load double, ptr %11, align 8, !tbaa !9
  %150 = fadd double %149, 1.000000e+00
  %151 = fmul double %148, %150
  %152 = load double, ptr %23, align 8, !tbaa !9
  %153 = fadd double %152, 3.000000e+00
  %154 = load double, ptr %23, align 8, !tbaa !9
  %155 = fadd double %154, 2.000000e+00
  %156 = load ptr, ptr %16, align 8, !tbaa !11
  %157 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %155, ptr noundef %156)
  %158 = fmul double %153, %157
  %159 = fdiv double %151, %158
  %160 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %20, i32 0, i32 4
  %161 = load ptr, ptr %160, align 8, !tbaa !13
  %162 = getelementptr inbounds double, ptr %161, i64 1
  store double %159, ptr %162, align 8, !tbaa !9
  store i64 2, ptr %25, align 8, !tbaa !5
  br label %163

163:                                              ; preds = %244, %127
  %164 = load i64, ptr %25, align 8, !tbaa !5
  %165 = load i64, ptr %18, align 8, !tbaa !5
  %166 = sub nsw i64 %165, 1
  %167 = icmp sle i64 %164, %166
  br i1 %167, label %168, label %247

168:                                              ; preds = %163
  %169 = load double, ptr %22, align 8, !tbaa !9
  %170 = load double, ptr %21, align 8, !tbaa !9
  %171 = fsub double %169, %170
  %172 = fmul double 2.500000e-01, %171
  %173 = load i64, ptr %25, align 8, !tbaa !5
  %174 = load i64, ptr %25, align 8, !tbaa !5
  %175 = mul nsw i64 %173, %174
  %176 = sitofp i64 %175 to double
  %177 = load double, ptr %23, align 8, !tbaa !9
  %178 = fmul double 5.000000e-01, %177
  %179 = load i64, ptr %25, align 8, !tbaa !5
  %180 = sitofp i64 %179 to double
  %181 = fdiv double %178, %180
  %182 = fadd double 1.000000e+00, %181
  %183 = fmul double %176, %182
  %184 = load double, ptr %23, align 8, !tbaa !9
  %185 = fadd double %184, 2.000000e+00
  %186 = fmul double 5.000000e-01, %185
  %187 = load i64, ptr %25, align 8, !tbaa !5
  %188 = sitofp i64 %187 to double
  %189 = fdiv double %186, %188
  %190 = fadd double 1.000000e+00, %189
  %191 = fmul double %183, %190
  %192 = fdiv double %172, %191
  %193 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %19, i32 0, i32 4
  %194 = load ptr, ptr %193, align 8, !tbaa !13
  %195 = load i64, ptr %25, align 8, !tbaa !5
  %196 = getelementptr inbounds double, ptr %194, i64 %195
  store double %192, ptr %196, align 8, !tbaa !9
  %197 = load double, ptr %10, align 8, !tbaa !9
  %198 = load i64, ptr %25, align 8, !tbaa !5
  %199 = sitofp i64 %198 to double
  %200 = fdiv double %197, %199
  %201 = fadd double 1.000000e+00, %200
  %202 = fmul double 2.500000e-01, %201
  %203 = load double, ptr %11, align 8, !tbaa !9
  %204 = load i64, ptr %25, align 8, !tbaa !5
  %205 = sitofp i64 %204 to double
  %206 = fdiv double %203, %205
  %207 = fadd double 1.000000e+00, %206
  %208 = fmul double %202, %207
  %209 = load double, ptr %23, align 8, !tbaa !9
  %210 = load i64, ptr %25, align 8, !tbaa !5
  %211 = sitofp i64 %210 to double
  %212 = fdiv double %209, %211
  %213 = fadd double 1.000000e+00, %212
  %214 = fmul double %208, %213
  %215 = load double, ptr %23, align 8, !tbaa !9
  %216 = fadd double %215, 1.000000e+00
  %217 = fmul double 5.000000e-01, %216
  %218 = load i64, ptr %25, align 8, !tbaa !5
  %219 = sitofp i64 %218 to double
  %220 = fdiv double %217, %219
  %221 = fadd double 1.000000e+00, %220
  %222 = load double, ptr %23, align 8, !tbaa !9
  %223 = fsub double %222, 1.000000e+00
  %224 = fmul double 5.000000e-01, %223
  %225 = load i64, ptr %25, align 8, !tbaa !5
  %226 = sitofp i64 %225 to double
  %227 = fdiv double %224, %226
  %228 = fadd double 1.000000e+00, %227
  %229 = fmul double %221, %228
  %230 = load double, ptr %23, align 8, !tbaa !9
  %231 = fmul double 5.000000e-01, %230
  %232 = load i64, ptr %25, align 8, !tbaa !5
  %233 = sitofp i64 %232 to double
  %234 = fdiv double %231, %233
  %235 = fadd double 1.000000e+00, %234
  %236 = load ptr, ptr %16, align 8, !tbaa !11
  %237 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %235, ptr noundef %236)
  %238 = fmul double %229, %237
  %239 = fdiv double %214, %238
  %240 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %20, i32 0, i32 4
  %241 = load ptr, ptr %240, align 8, !tbaa !13
  %242 = load i64, ptr %25, align 8, !tbaa !5
  %243 = getelementptr inbounds double, ptr %241, i64 %242
  store double %239, ptr %243, align 8, !tbaa !9
  br label %244

244:                                              ; preds = %168
  %245 = load i64, ptr %25, align 8, !tbaa !5
  %246 = add nsw i64 %245, 1
  store i64 %246, ptr %25, align 8, !tbaa !5
  br label %163, !llvm.loop !16

247:                                              ; preds = %163
  br label %248

248:                                              ; preds = %247, %118
  %249 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %20, i32 0, i32 4
  %250 = load ptr, ptr %249, align 8, !tbaa !13
  %251 = getelementptr inbounds double, ptr %250, i64 0
  %252 = load double, ptr %251, align 8, !tbaa !9
  %253 = load i64, ptr %9, align 8, !tbaa !5
  %254 = load ptr, ptr %12, align 8, !tbaa !11
  %255 = load ptr, ptr %13, align 8, !tbaa !11
  %256 = load ptr, ptr %14, align 8, !tbaa !11
  %257 = load ptr, ptr %15, align 8, !tbaa !11
  %258 = load ptr, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl14gkqgeneraterecEPNS_9ae_vectorES1_dlPlS1_S1_S1_PNS_8ae_stateE(ptr noundef %19, ptr noundef %20, double noundef %252, i64 noundef %253, ptr noundef %254, ptr noundef %255, ptr noundef %256, ptr noundef %257, ptr noundef %258)
  %259 = load ptr, ptr %12, align 8, !tbaa !11
  %260 = load i64, ptr %259, align 8, !tbaa !5
  %261 = icmp sgt i64 %260, 0
  br i1 %261, label %262, label %308

262:                                              ; preds = %248
  %263 = load ptr, ptr %13, align 8, !tbaa !11
  %264 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %263, i32 0, i32 4
  %265 = load ptr, ptr %264, align 8, !tbaa !13
  %266 = getelementptr inbounds double, ptr %265, i64 0
  %267 = load double, ptr %266, align 8, !tbaa !9
  %268 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %267, double noundef -1.000000e+00)
  br i1 %268, label %278, label %269

269:                                              ; preds = %262
  %270 = load ptr, ptr %13, align 8, !tbaa !11
  %271 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %270, i32 0, i32 4
  %272 = load ptr, ptr %271, align 8, !tbaa !13
  %273 = load i64, ptr %9, align 8, !tbaa !5
  %274 = sub nsw i64 %273, 1
  %275 = getelementptr inbounds double, ptr %272, i64 %274
  %276 = load double, ptr %275, align 8, !tbaa !9
  %277 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %276, double noundef 1.000000e+00)
  br i1 %277, label %278, label %280

278:                                              ; preds = %269, %262
  %279 = load ptr, ptr %12, align 8, !tbaa !11
  store i64 2, ptr %279, align 8, !tbaa !5
  br label %280

280:                                              ; preds = %278, %269
  store i64 0, ptr %25, align 8, !tbaa !5
  br label %281

281:                                              ; preds = %304, %280
  %282 = load i64, ptr %25, align 8, !tbaa !5
  %283 = load i64, ptr %9, align 8, !tbaa !5
  %284 = sub nsw i64 %283, 2
  %285 = icmp sle i64 %282, %284
  br i1 %285, label %286, label %307

286:                                              ; preds = %281
  %287 = load ptr, ptr %13, align 8, !tbaa !11
  %288 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %287, i32 0, i32 4
  %289 = load ptr, ptr %288, align 8, !tbaa !13
  %290 = load i64, ptr %25, align 8, !tbaa !5
  %291 = getelementptr inbounds double, ptr %289, i64 %290
  %292 = load double, ptr %291, align 8, !tbaa !9
  %293 = load ptr, ptr %13, align 8, !tbaa !11
  %294 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %293, i32 0, i32 4
  %295 = load ptr, ptr %294, align 8, !tbaa !13
  %296 = load i64, ptr %25, align 8, !tbaa !5
  %297 = add nsw i64 %296, 1
  %298 = getelementptr inbounds double, ptr %295, i64 %297
  %299 = load double, ptr %298, align 8, !tbaa !9
  %300 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %292, double noundef %299)
  br i1 %300, label %301, label %303

301:                                              ; preds = %286
  %302 = load ptr, ptr %12, align 8, !tbaa !11
  store i64 -4, ptr %302, align 8, !tbaa !5
  br label %303

303:                                              ; preds = %301, %286
  br label %304

304:                                              ; preds = %303
  %305 = load i64, ptr %25, align 8, !tbaa !5
  %306 = add nsw i64 %305, 1
  store i64 %306, ptr %25, align 8, !tbaa !5
  br label %281, !llvm.loop !17

307:                                              ; preds = %281
  br label %308

308:                                              ; preds = %307, %248
  %309 = load ptr, ptr %16, align 8, !tbaa !11
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %309)
  store i32 0, ptr %27, align 4
  br label %310

310:                                              ; preds = %308, %115, %50, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 64, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  %311 = load i32, ptr %27, align 4
  switch i32 %311, label %313 [
    i32 0, label %312
    i32 1, label %312
  ]

312:                                              ; preds = %310, %310
  ret void

313:                                              ; preds = %310
  unreachable
}

; 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_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) #3

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #3

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

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

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef, double noundef) #3

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) #3

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

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) #3

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double noundef) #3

declare noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef, double noundef) #3

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

declare noundef double @_ZN11alglib_impl7lngammaEdPdPNS_8ae_stateE(double noundef, ptr noundef, ptr noundef) #3

declare noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef, ptr noundef) #3

declare noundef i64 @_ZN11alglib_impl8ae_iceilEdPNS_8ae_stateE(double noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !6, i64 0}
!6 = !{!"long", !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 = !{!"any pointer", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}


; 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 }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl14gkqgeneraterecEPNS_9ae_vectorES1_dlPlS1_S1_S1_PNS_8ae_stateE(ptr noundef, ptr noundef, double noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl22gkqgenerategaussjacobiElddPlPNS_9ae_vectorES2_S2_PNS_8ae_stateE(i64 noundef %0, double noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #1 {
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca %"struct.alglib_impl::ae_vector", align 8
  %11 = alloca %"struct.alglib_impl::ae_vector", align 8
  %12 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %7, ptr noundef nonnull %9)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %10, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %11, i8 0, i64 64, i1 false)
  store i64 0, ptr %3, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %4)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %5)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %6)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %10, i64 noundef 0, i64 noundef 3, ptr noundef %7, 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 %7, i1 noundef zeroext true)
  %13 = and i64 %0, -9223372036854775807
  %14 = icmp ne i64 %13, 1
  %15 = icmp slt i64 %0, 3
  %or.cond = or i1 %15, %14
  br i1 %or.cond, label %.loopexit.sink.split, label %16

16:                                               ; preds = %8
  %17 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %1, double noundef -1.000000e+00)
  br i1 %17, label %.loopexit.sink.split, label %18

18:                                               ; preds = %16
  %19 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %2, double noundef -1.000000e+00)
  br i1 %19, label %.loopexit.sink.split, label %20

20:                                               ; preds = %18
  %21 = lshr i64 %0, 1
  %22 = mul nuw nsw i64 %21, 3
  %23 = uitofp nneg i64 %22 to double
  %24 = fmul double %23, 5.000000e-01
  %25 = call noundef i64 @_ZN11alglib_impl8ae_iceilEdPNS_8ae_stateE(double noundef %24, ptr noundef %7)
  %26 = add i64 %25, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %10, i64 noundef %26, ptr noundef %7)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %26, ptr noundef %7)
  %.not109 = icmp slt i64 %25, 0
  br i1 %.not109, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %20
  %27 = getelementptr inbounds i8, ptr %10, i64 56
  %28 = add nuw i64 %25, 1
  %xtraiter = and i64 %28, 3
  %29 = icmp ult i64 %25, 3
  br i1 %29, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %28, -4
  br label %30

30:                                               ; preds = %30, %.lr.ph.new
  %.0110 = phi i64 [ 0, %.lr.ph.new ], [ %42, %30 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %30 ]
  %31 = load ptr, ptr %27, align 8, !tbaa !9
  %32 = getelementptr inbounds double, ptr %31, i64 %.0110
  store double 0.000000e+00, ptr %32, align 8, !tbaa !10
  %33 = or disjoint i64 %.0110, 1
  %34 = load ptr, ptr %27, align 8, !tbaa !9
  %35 = getelementptr inbounds double, ptr %34, i64 %33
  store double 0.000000e+00, ptr %35, align 8, !tbaa !10
  %36 = or disjoint i64 %.0110, 2
  %37 = load ptr, ptr %27, align 8, !tbaa !9
  %38 = getelementptr inbounds double, ptr %37, i64 %36
  store double 0.000000e+00, ptr %38, align 8, !tbaa !10
  %39 = or disjoint i64 %.0110, 3
  %40 = load ptr, ptr %27, align 8, !tbaa !9
  %41 = getelementptr inbounds double, ptr %40, i64 %39
  store double 0.000000e+00, ptr %41, align 8, !tbaa !10
  %42 = add nuw i64 %.0110, 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_edge.loopexit.unr-lcssa, label %30, !llvm.loop !12

._crit_edge.loopexit.unr-lcssa:                   ; preds = %30, %.lr.ph
  %.0110.unr = phi i64 [ 0, %.lr.ph ], [ %42, %30 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %.0110.epil = phi i64 [ %45, %.epil.preheader ], [ %.0110.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %43 = load ptr, ptr %27, align 8, !tbaa !9
  %44 = getelementptr inbounds double, ptr %43, i64 %.0110.epil
  store double 0.000000e+00, ptr %44, align 8, !tbaa !10
  %45 = add nuw i64 %.0110.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !14

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %20
  %46 = fsub double %2, %1
  %47 = fadd double %1, %2
  %48 = fadd double %47, 2.000000e+00
  %49 = fdiv double %46, %48
  %50 = getelementptr inbounds i8, ptr %10, i64 56
  %51 = load ptr, ptr %50, align 8, !tbaa !9
  store double %49, ptr %51, align 8, !tbaa !10
  %52 = fadd double %47, 1.000000e+00
  %53 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 2.000000e+00, ptr noundef %7)
  %54 = fadd double %1, 1.000000e+00
  %55 = call noundef double @_ZN11alglib_impl7lngammaEdPdPNS_8ae_stateE(double noundef %54, ptr noundef nonnull %12, ptr noundef %7)
  %56 = call double @llvm.fmuladd.f64(double %52, double %53, double %55)
  %57 = fadd double %2, 1.000000e+00
  %58 = call noundef double @_ZN11alglib_impl7lngammaEdPdPNS_8ae_stateE(double noundef %57, ptr noundef nonnull %12, ptr noundef %7)
  %59 = fadd double %56, %58
  %60 = call noundef double @_ZN11alglib_impl7lngammaEdPdPNS_8ae_stateE(double noundef %48, ptr noundef nonnull %12, ptr noundef %7)
  %61 = fsub double %59, %60
  %62 = call noundef double @_ZN11alglib_impl6ae_logEdPNS_8ae_stateE(double noundef 1.000000e+300, ptr noundef %7)
  %63 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %61, double noundef %62)
  br i1 %63, label %.loopexit.sink.split, label %64

64:                                               ; preds = %._crit_edge
  %65 = call noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef %61, ptr noundef %7)
  %66 = getelementptr inbounds i8, ptr %11, i64 56
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  store double %65, ptr %67, align 8, !tbaa !10
  %68 = icmp sgt i64 %25, 0
  br i1 %68, label %69, label %.loopexit108

69:                                               ; preds = %64
  %70 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %1, ptr noundef %7)
  %71 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %2, ptr noundef %7)
  %72 = fsub double %71, %70
  %73 = fadd double %47, 4.000000e+00
  %74 = fmul double %48, %73
  %75 = fdiv double %72, %74
  %76 = load ptr, ptr %50, align 8, !tbaa !9
  %77 = getelementptr inbounds i8, ptr %76, i64 8
  store double %75, ptr %77, align 8, !tbaa !10
  %78 = fmul double %54, 4.000000e+00
  %79 = fmul double %78, %57
  %80 = fadd double %47, 3.000000e+00
  %81 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %48, ptr noundef %7)
  %82 = fmul double %80, %81
  %83 = fdiv double %79, %82
  %84 = load ptr, ptr %66, align 8, !tbaa !9
  %85 = getelementptr inbounds i8, ptr %84, i64 8
  store double %83, ptr %85, align 8, !tbaa !10
  %.not106111 = icmp eq i64 %25, 1
  br i1 %.not106111, label %.loopexit108, label %.lr.ph114

.lr.ph114:                                        ; preds = %69
  %86 = fmul double %72, 2.500000e-01
  %87 = insertelement <2 x double> poison, double %48, i64 0
  %88 = insertelement <2 x double> %87, double %47, i64 1
  %89 = fmul <2 x double> %88, <double 5.000000e-01, double 5.000000e-01>
  %90 = fmul double %52, 5.000000e-01
  %91 = fadd double %47, -1.000000e+00
  %92 = fmul double %91, 5.000000e-01
  %93 = insertelement <2 x double> poison, double %47, i64 0
  %94 = insertelement <2 x double> %93, double %90, i64 1
  %95 = insertelement <2 x double> poison, double %2, i64 0
  %96 = insertelement <2 x double> %95, double %1, i64 1
  br label %97

97:                                               ; preds = %.lr.ph114, %97
  %.1112 = phi i64 [ 2, %.lr.ph114 ], [ %132, %97 ]
  %98 = mul nuw nsw i64 %.1112, %.1112
  %99 = uitofp nneg i64 %98 to double
  %100 = uitofp nneg i64 %.1112 to double
  %101 = insertelement <2 x double> poison, double %100, i64 0
  %102 = shufflevector <2 x double> %101, <2 x double> poison, <2 x i32> zeroinitializer
  %103 = fdiv <2 x double> %89, %102
  %104 = fadd <2 x double> %103, <double 1.000000e+00, double 1.000000e+00>
  %105 = extractelement <2 x double> %104, i64 1
  %106 = fmul double %105, %99
  %107 = extractelement <2 x double> %104, i64 0
  %108 = fmul double %107, %106
  %109 = fdiv double %86, %108
  %110 = load ptr, ptr %50, align 8, !tbaa !9
  %111 = getelementptr inbounds double, ptr %110, i64 %.1112
  store double %109, ptr %111, align 8, !tbaa !10
  %112 = fdiv <2 x double> %96, %102
  %113 = fadd <2 x double> %112, <double 1.000000e+00, double 1.000000e+00>
  %114 = extractelement <2 x double> %113, i64 1
  %115 = fmul double %114, 2.500000e-01
  %116 = extractelement <2 x double> %113, i64 0
  %117 = fmul double %116, %115
  %118 = fdiv double %92, %100
  %119 = fadd double %118, 1.000000e+00
  %120 = fdiv <2 x double> %94, %102
  %121 = fadd <2 x double> %120, <double 1.000000e+00, double 1.000000e+00>
  %122 = insertelement <2 x double> poison, double %117, i64 0
  %123 = insertelement <2 x double> %122, double %119, i64 1
  %124 = fmul <2 x double> %121, %123
  %125 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %105, ptr noundef %7)
  %126 = extractelement <2 x double> %124, i64 1
  %127 = fmul double %126, %125
  %128 = extractelement <2 x double> %124, i64 0
  %129 = fdiv double %128, %127
  %130 = load ptr, ptr %66, align 8, !tbaa !9
  %131 = getelementptr inbounds double, ptr %130, i64 %.1112
  store double %129, ptr %131, align 8, !tbaa !10
  %132 = add nuw i64 %.1112, 1
  %exitcond119.not = icmp eq i64 %.1112, %25
  br i1 %exitcond119.not, label %.loopexit108, label %97, !llvm.loop !16

.loopexit108:                                     ; preds = %97, %69, %64
  %133 = load ptr, ptr %66, align 8, !tbaa !9
  %134 = load double, ptr %133, align 8, !tbaa !10
  call void @_ZN11alglib_impl14gkqgeneraterecEPNS_9ae_vectorES1_dlPlS1_S1_S1_PNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %11, double noundef %134, i64 noundef %0, ptr noundef nonnull %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7)
  %135 = load i64, ptr %3, align 8, !tbaa !5
  %136 = icmp sgt i64 %135, 0
  br i1 %136, label %137, label %.loopexit

137:                                              ; preds = %.loopexit108
  %138 = getelementptr inbounds i8, ptr %4, i64 56
  %139 = load ptr, ptr %138, align 8, !tbaa !9
  %140 = load double, ptr %139, align 8, !tbaa !10
  %141 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %140, double noundef -1.000000e+00)
  br i1 %141, label %148, label %142

142:                                              ; preds = %137
  %143 = load ptr, ptr %138, align 8, !tbaa !9
  %144 = getelementptr double, ptr %143, i64 %0
  %145 = getelementptr i8, ptr %144, i64 -8
  %146 = load double, ptr %145, align 8, !tbaa !10
  %147 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %146, double noundef 1.000000e+00)
  br i1 %147, label %148, label %149

148:                                              ; preds = %142, %137
  store i64 2, ptr %3, align 8, !tbaa !5
  br label %149

149:                                              ; preds = %148, %142
  %.not107115 = icmp slt i64 %0, 2
  br i1 %.not107115, label %.loopexit, label %.lr.ph118.preheader

.lr.ph118.preheader:                              ; preds = %149
  %150 = add nsw i64 %0, -2
  br label %.lr.ph118

.lr.ph118:                                        ; preds = %.lr.ph118.preheader, %159
  %.2116 = phi i64 [ %154, %159 ], [ 0, %.lr.ph118.preheader ]
  %151 = load ptr, ptr %138, align 8, !tbaa !9
  %152 = getelementptr inbounds double, ptr %151, i64 %.2116
  %153 = load double, ptr %152, align 8, !tbaa !10
  %154 = add nuw nsw i64 %.2116, 1
  %155 = getelementptr inbounds double, ptr %151, i64 %154
  %156 = load double, ptr %155, align 8, !tbaa !10
  %157 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %153, double noundef %156)
  br i1 %157, label %158, label %159

158:                                              ; preds = %.lr.ph118
  store i64 -4, ptr %3, align 8, !tbaa !5
  br label %159

159:                                              ; preds = %.lr.ph118, %158
  %exitcond120.not = icmp eq i64 %.2116, %150
  br i1 %exitcond120.not, label %.loopexit, label %.lr.ph118, !llvm.loop !17

.loopexit.sink.split:                             ; preds = %._crit_edge, %16, %18, %8
  %.sink = phi i64 [ -1, %8 ], [ -1, %18 ], [ -1, %16 ], [ -4, %._crit_edge ]
  store i64 %.sink, ptr %3, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %159, %.loopexit.sink.split, %.loopexit108, %149
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  ret void
}

; 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_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #3

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

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

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef, double noundef) local_unnamed_addr #3

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef, double noundef) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double noundef) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef, double noundef) local_unnamed_addr #3

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

declare noundef double @_ZN11alglib_impl7lngammaEdPdPNS_8ae_stateE(double noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare noundef double @_ZN11alglib_impl6ae_expEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #3

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


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