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

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

@.str.494 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.495 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.496 = external hidden unnamed_addr constant [37 x i8], align 1

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

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

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

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) #1

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

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl19scaleshiftbcinplaceEPKNS_9ae_vectorES2_PS0_S3_lPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5) #2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i64 %4, ptr %11, align 8, !tbaa !9
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #3
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %16

16:                                               ; preds = %214, %6
  %17 = load i64, ptr %13, align 8, !tbaa !9
  %18 = load i64, ptr %11, align 8, !tbaa !9
  %19 = sub nsw i64 %18, 1
  %20 = icmp sle i64 %17, %19
  br i1 %20, label %21, label %217

21:                                               ; preds = %16
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %22, i32 0, i32 4
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = load i64, ptr %13, align 8, !tbaa !9
  %26 = getelementptr inbounds double, ptr %24, i64 %25
  %27 = load double, ptr %26, align 8, !tbaa !12
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  %29 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %27, ptr noundef %28)
  br i1 %29, label %30, label %38

30:                                               ; preds = %21
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %31, i32 0, i32 4
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = load i64, ptr %13, align 8, !tbaa !9
  %35 = getelementptr inbounds double, ptr %33, i64 %34
  %36 = load double, ptr %35, align 8, !tbaa !12
  %37 = fcmp ogt double %36, 0.000000e+00
  br label %38

38:                                               ; preds = %30, %21
  %39 = phi i1 [ false, %21 ], [ %37, %30 ]
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %39, ptr noundef @.str.494, ptr noundef %40)
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %41, i32 0, i32 4
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = load i64, ptr %13, align 8, !tbaa !9
  %45 = getelementptr inbounds double, ptr %43, i64 %44
  %46 = load double, ptr %45, align 8, !tbaa !12
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %46, ptr noundef %47)
  br i1 %48, label %58, label %49

49:                                               ; preds = %38
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %50, i32 0, i32 4
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  %53 = load i64, ptr %13, align 8, !tbaa !9
  %54 = getelementptr inbounds double, ptr %52, i64 %53
  %55 = load double, ptr %54, align 8, !tbaa !12
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef %55, ptr noundef %56)
  br label %58

58:                                               ; preds = %49, %38
  %59 = phi i1 [ true, %38 ], [ %57, %49 ]
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %59, ptr noundef @.str.495, ptr noundef %60)
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %61, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !11
  %64 = load i64, ptr %13, align 8, !tbaa !9
  %65 = getelementptr inbounds double, ptr %63, i64 %64
  %66 = load double, ptr %65, align 8, !tbaa !12
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  %68 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %66, ptr noundef %67)
  br i1 %68, label %78, label %69

69:                                               ; preds = %58
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %70, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !11
  %73 = load i64, ptr %13, align 8, !tbaa !9
  %74 = getelementptr inbounds double, ptr %72, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !12
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef %75, ptr noundef %76)
  br label %78

78:                                               ; preds = %69, %58
  %79 = phi i1 [ true, %58 ], [ %77, %69 ]
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %79, ptr noundef @.str.496, ptr noundef %80)
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %81, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !11
  %84 = load i64, ptr %13, align 8, !tbaa !9
  %85 = getelementptr inbounds double, ptr %83, i64 %84
  %86 = load double, ptr %85, align 8, !tbaa !12
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  %88 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %86, ptr noundef %87)
  %89 = zext i1 %88 to i8
  store i8 %89, ptr %14, align 1, !tbaa !14
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %90, i32 0, i32 4
  %92 = load ptr, ptr %91, align 8, !tbaa !11
  %93 = load i64, ptr %13, align 8, !tbaa !9
  %94 = getelementptr inbounds double, ptr %92, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !12
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %95, ptr noundef %96)
  %98 = zext i1 %97 to i8
  store i8 %98, ptr %15, align 1, !tbaa !14
  %99 = load i8, ptr %14, align 1, !tbaa !14, !range !16, !noundef !17
  %100 = trunc i8 %99 to i1
  br i1 %100, label %101, label %155

101:                                              ; preds = %78
  %102 = load i8, ptr %15, align 1, !tbaa !14, !range !16, !noundef !17
  %103 = trunc i8 %102 to i1
  br i1 %103, label %104, label %155

104:                                              ; preds = %101
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %105, i32 0, i32 4
  %107 = load ptr, ptr %106, align 8, !tbaa !11
  %108 = load i64, ptr %13, align 8, !tbaa !9
  %109 = getelementptr inbounds double, ptr %107, i64 %108
  %110 = load double, ptr %109, align 8, !tbaa !12
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %111, i32 0, i32 4
  %113 = load ptr, ptr %112, align 8, !tbaa !11
  %114 = load i64, ptr %13, align 8, !tbaa !9
  %115 = getelementptr inbounds double, ptr %113, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !12
  %117 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %110, double noundef %116)
  br i1 %117, label %118, label %155

118:                                              ; preds = %104
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %119, i32 0, i32 4
  %121 = load ptr, ptr %120, align 8, !tbaa !11
  %122 = load i64, ptr %13, align 8, !tbaa !9
  %123 = getelementptr inbounds double, ptr %121, i64 %122
  %124 = load double, ptr %123, align 8, !tbaa !12
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %125, i32 0, i32 4
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  %128 = load i64, ptr %13, align 8, !tbaa !9
  %129 = getelementptr inbounds double, ptr %127, i64 %128
  %130 = load double, ptr %129, align 8, !tbaa !12
  %131 = fsub double %124, %130
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %132, i32 0, i32 4
  %134 = load ptr, ptr %133, align 8, !tbaa !11
  %135 = load i64, ptr %13, align 8, !tbaa !9
  %136 = getelementptr inbounds double, ptr %134, i64 %135
  %137 = load double, ptr %136, align 8, !tbaa !12
  %138 = fdiv double %131, %137
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %139, i32 0, i32 4
  %141 = load ptr, ptr %140, align 8, !tbaa !11
  %142 = load i64, ptr %13, align 8, !tbaa !9
  %143 = getelementptr inbounds double, ptr %141, i64 %142
  store double %138, ptr %143, align 8, !tbaa !12
  %144 = load ptr, ptr %10, align 8, !tbaa !5
  %145 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %144, i32 0, i32 4
  %146 = load ptr, ptr %145, align 8, !tbaa !11
  %147 = load i64, ptr %13, align 8, !tbaa !9
  %148 = getelementptr inbounds double, ptr %146, i64 %147
  %149 = load double, ptr %148, align 8, !tbaa !12
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %150, i32 0, i32 4
  %152 = load ptr, ptr %151, align 8, !tbaa !11
  %153 = load i64, ptr %13, align 8, !tbaa !9
  %154 = getelementptr inbounds double, ptr %152, i64 %153
  store double %149, ptr %154, align 8, !tbaa !12
  br label %214

155:                                              ; preds = %104, %101, %78
  %156 = load i8, ptr %14, align 1, !tbaa !14, !range !16, !noundef !17
  %157 = trunc i8 %156 to i1
  br i1 %157, label %158, label %184

158:                                              ; preds = %155
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %159, i32 0, i32 4
  %161 = load ptr, ptr %160, align 8, !tbaa !11
  %162 = load i64, ptr %13, align 8, !tbaa !9
  %163 = getelementptr inbounds double, ptr %161, i64 %162
  %164 = load double, ptr %163, align 8, !tbaa !12
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %165, i32 0, i32 4
  %167 = load ptr, ptr %166, align 8, !tbaa !11
  %168 = load i64, ptr %13, align 8, !tbaa !9
  %169 = getelementptr inbounds double, ptr %167, i64 %168
  %170 = load double, ptr %169, align 8, !tbaa !12
  %171 = fsub double %164, %170
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  %173 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %172, i32 0, i32 4
  %174 = load ptr, ptr %173, align 8, !tbaa !11
  %175 = load i64, ptr %13, align 8, !tbaa !9
  %176 = getelementptr inbounds double, ptr %174, i64 %175
  %177 = load double, ptr %176, align 8, !tbaa !12
  %178 = fdiv double %171, %177
  %179 = load ptr, ptr %9, align 8, !tbaa !5
  %180 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %179, i32 0, i32 4
  %181 = load ptr, ptr %180, align 8, !tbaa !11
  %182 = load i64, ptr %13, align 8, !tbaa !9
  %183 = getelementptr inbounds double, ptr %181, i64 %182
  store double %178, ptr %183, align 8, !tbaa !12
  br label %184

184:                                              ; preds = %158, %155
  %185 = load i8, ptr %15, align 1, !tbaa !14, !range !16, !noundef !17
  %186 = trunc i8 %185 to i1
  br i1 %186, label %187, label %213

187:                                              ; preds = %184
  %188 = load ptr, ptr %10, align 8, !tbaa !5
  %189 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %188, i32 0, i32 4
  %190 = load ptr, ptr %189, align 8, !tbaa !11
  %191 = load i64, ptr %13, align 8, !tbaa !9
  %192 = getelementptr inbounds double, ptr %190, i64 %191
  %193 = load double, ptr %192, align 8, !tbaa !12
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  %195 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %194, i32 0, i32 4
  %196 = load ptr, ptr %195, align 8, !tbaa !11
  %197 = load i64, ptr %13, align 8, !tbaa !9
  %198 = getelementptr inbounds double, ptr %196, i64 %197
  %199 = load double, ptr %198, align 8, !tbaa !12
  %200 = fsub double %193, %199
  %201 = load ptr, ptr %7, align 8, !tbaa !5
  %202 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %201, i32 0, i32 4
  %203 = load ptr, ptr %202, align 8, !tbaa !11
  %204 = load i64, ptr %13, align 8, !tbaa !9
  %205 = getelementptr inbounds double, ptr %203, i64 %204
  %206 = load double, ptr %205, align 8, !tbaa !12
  %207 = fdiv double %200, %206
  %208 = load ptr, ptr %10, align 8, !tbaa !5
  %209 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %208, i32 0, i32 4
  %210 = load ptr, ptr %209, align 8, !tbaa !11
  %211 = load i64, ptr %13, align 8, !tbaa !9
  %212 = getelementptr inbounds double, ptr %210, i64 %211
  store double %207, ptr %212, align 8, !tbaa !12
  br label %213

213:                                              ; preds = %187, %184
  br label %214

214:                                              ; preds = %213, %118
  %215 = load i64, ptr %13, align 8, !tbaa !9
  %216 = add nsw i64 %215, 1
  store i64 %216, ptr %13, align 8, !tbaa !9
  br label %16, !llvm.loop !18

217:                                              ; preds = %16
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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

@.str.494 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.495 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.496 = external hidden unnamed_addr constant [37 x i8], align 1

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

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

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

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl19scaleshiftbcinplaceEPKNS_9ae_vectorES2_PS0_S3_lPNS_8ae_stateE(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3, i64 noundef %4, ptr noundef %5) local_unnamed_addr #1 {
  %.not.not65 = icmp sgt i64 %4, 0
  br i1 %.not.not65, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %6
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  %8 = getelementptr inbounds i8, ptr %2, i64 56
  %9 = getelementptr inbounds i8, ptr %3, i64 56
  %10 = getelementptr inbounds i8, ptr %1, i64 56
  br label %11

11:                                               ; preds = %.lr.ph, %104
  %.066 = phi i64 [ 0, %.lr.ph ], [ %105, %104 ]
  %12 = load ptr, ptr %7, align 8, !tbaa !5
  %13 = getelementptr inbounds double, ptr %12, i64 %.066
  %14 = load double, ptr %13, align 8, !tbaa !8
  %15 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %14, ptr noundef %5)
  br i1 %15, label %16, label %21

16:                                               ; preds = %11
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = getelementptr inbounds double, ptr %17, i64 %.066
  %19 = load double, ptr %18, align 8, !tbaa !8
  %20 = fcmp ogt double %19, 0.000000e+00
  br label %21

21:                                               ; preds = %16, %11
  %22 = phi i1 [ false, %11 ], [ %20, %16 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef nonnull @.str.494, ptr noundef %5)
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = getelementptr inbounds double, ptr %23, i64 %.066
  %25 = load double, ptr %24, align 8, !tbaa !8
  %26 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %25, ptr noundef %5)
  br i1 %26, label %32, label %27

27:                                               ; preds = %21
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = getelementptr inbounds double, ptr %28, i64 %.066
  %30 = load double, ptr %29, align 8, !tbaa !8
  %31 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isneginfEdPNS_8ae_stateE(double noundef %30, ptr noundef %5)
  br label %32

32:                                               ; preds = %27, %21
  %33 = phi i1 [ true, %21 ], [ %31, %27 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef nonnull @.str.495, ptr noundef %5)
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = getelementptr inbounds double, ptr %34, i64 %.066
  %36 = load double, ptr %35, align 8, !tbaa !8
  %37 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %36, ptr noundef %5)
  br i1 %37, label %43, label %38

38:                                               ; preds = %32
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = getelementptr inbounds double, ptr %39, i64 %.066
  %41 = load double, ptr %40, align 8, !tbaa !8
  %42 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isposinfEdPNS_8ae_stateE(double noundef %41, ptr noundef %5)
  br label %43

43:                                               ; preds = %38, %32
  %44 = phi i1 [ true, %32 ], [ %42, %38 ]
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %44, ptr noundef nonnull @.str.496, ptr noundef %5)
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = getelementptr inbounds double, ptr %45, i64 %.066
  %47 = load double, ptr %46, align 8, !tbaa !8
  %48 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %47, ptr noundef %5)
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = getelementptr inbounds double, ptr %49, i64 %.066
  %51 = load double, ptr %50, align 8, !tbaa !8
  %52 = tail call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %51, ptr noundef %5)
  %brmerge.demorgan = and i1 %48, %52
  br i1 %brmerge.demorgan, label %53, label %78

53:                                               ; preds = %43
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds double, ptr %54, i64 %.066
  %56 = load double, ptr %55, align 8, !tbaa !8
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds double, ptr %57, i64 %.066
  %59 = load double, ptr %58, align 8, !tbaa !8
  %60 = tail call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %56, double noundef %59)
  br i1 %60, label %61, label %78

61:                                               ; preds = %53
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds double, ptr %62, i64 %.066
  %64 = load double, ptr %63, align 8, !tbaa !8
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = getelementptr inbounds double, ptr %65, i64 %.066
  %67 = load double, ptr %66, align 8, !tbaa !8
  %68 = fsub double %64, %67
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = getelementptr inbounds double, ptr %69, i64 %.066
  %71 = load double, ptr %70, align 8, !tbaa !8
  %72 = fdiv double %68, %71
  store double %72, ptr %63, align 8, !tbaa !8
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds double, ptr %73, i64 %.066
  %75 = load double, ptr %74, align 8, !tbaa !8
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = getelementptr inbounds double, ptr %76, i64 %.066
  store double %75, ptr %77, align 8, !tbaa !8
  br label %104

78:                                               ; preds = %43, %53
  br i1 %48, label %79, label %91

79:                                               ; preds = %78
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = getelementptr inbounds double, ptr %80, i64 %.066
  %82 = load double, ptr %81, align 8, !tbaa !8
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = getelementptr inbounds double, ptr %83, i64 %.066
  %85 = load double, ptr %84, align 8, !tbaa !8
  %86 = fsub double %82, %85
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds double, ptr %87, i64 %.066
  %89 = load double, ptr %88, align 8, !tbaa !8
  %90 = fdiv double %86, %89
  store double %90, ptr %81, align 8, !tbaa !8
  br label %91

91:                                               ; preds = %79, %78
  br i1 %52, label %92, label %104

92:                                               ; preds = %91
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds double, ptr %93, i64 %.066
  %95 = load double, ptr %94, align 8, !tbaa !8
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  %97 = getelementptr inbounds double, ptr %96, i64 %.066
  %98 = load double, ptr %97, align 8, !tbaa !8
  %99 = fsub double %95, %98
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = getelementptr inbounds double, ptr %100, i64 %.066
  %102 = load double, ptr %101, align 8, !tbaa !8
  %103 = fdiv double %99, %102
  store double %103, ptr %94, align 8, !tbaa !8
  br label %104

104:                                              ; preds = %91, %92, %61
  %105 = add nuw nsw i64 %.066, 1
  %exitcond.not = icmp eq i64 %105, %4
  br i1 %exitcond.not, label %._crit_edge, label %11, !llvm.loop !10

._crit_edge:                                      ; preds = %104, %6
  ret void
}

attributes #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 #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" }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"double", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass