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

32:                                               ; preds = %6
  %33 = load i64, ptr %7, align 8, !tbaa !5
  %34 = icmp slt i64 %33, 3
  br i1 %34, label %35, label %38

35:                                               ; preds = %32, %6
  %36 = load ptr, ptr %8, align 8, !tbaa !9
  store i64 -1, ptr %36, align 8, !tbaa !5
  %37 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %37)
  store i32 1, ptr %21, align 4
  br label %155

38:                                               ; preds = %32
  store double 2.000000e+00, ptr %18, align 8, !tbaa !11
  %39 = load i64, ptr %7, align 8, !tbaa !5
  %40 = sdiv i64 %39, 2
  %41 = mul nsw i64 3, %40
  %42 = sitofp i64 %41 to double
  %43 = fdiv double %42, 2.000000e+00
  %44 = load ptr, ptr %12, align 8, !tbaa !9
  %45 = call noundef i64 @_ZN11alglib_impl9ae_ifloorEdPNS_8ae_stateE(double noundef %43, ptr noundef %44)
  %46 = add nsw i64 %45, 1
  store i64 %46, ptr %16, align 8, !tbaa !5
  %47 = load i64, ptr %7, align 8, !tbaa !5
  %48 = sdiv i64 %47, 2
  %49 = mul nsw i64 3, %48
  %50 = sitofp i64 %49 to double
  %51 = fdiv double %50, 2.000000e+00
  %52 = load ptr, ptr %12, align 8, !tbaa !9
  %53 = call noundef i64 @_ZN11alglib_impl8ae_iceilEdPNS_8ae_stateE(double noundef %51, ptr noundef %52)
  %54 = add nsw i64 %53, 1
  store i64 %54, ptr %17, align 8, !tbaa !5
  %55 = load i64, ptr %16, align 8, !tbaa !5
  %56 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %14, i64 noundef %55, ptr noundef %56)
  %57 = load i64, ptr %17, align 8, !tbaa !5
  %58 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %15, i64 noundef %57, ptr noundef %58)
  store i64 0, ptr %19, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %69, %38
  %60 = load i64, ptr %19, align 8, !tbaa !5
  %61 = load i64, ptr %16, align 8, !tbaa !5
  %62 = sub nsw i64 %61, 1
  %63 = icmp sle i64 %60, %62
  br i1 %63, label %64, label %72

64:                                               ; preds = %59
  %65 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %66 = load ptr, ptr %65, align 8, !tbaa !13
  %67 = load i64, ptr %19, align 8, !tbaa !5
  %68 = getelementptr inbounds double, ptr %66, i64 %67
  store double 0.000000e+00, ptr %68, align 8, !tbaa !11
  br label %69

69:                                               ; preds = %64
  %70 = load i64, ptr %19, align 8, !tbaa !5
  %71 = add nsw i64 %70, 1
  store i64 %71, ptr %19, align 8, !tbaa !5
  br label %59, !llvm.loop !14

72:                                               ; preds = %59
  %73 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %74 = load ptr, ptr %73, align 8, !tbaa !13
  %75 = getelementptr inbounds double, ptr %74, i64 0
  store double 2.000000e+00, ptr %75, align 8, !tbaa !11
  store i64 1, ptr %19, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %93, %72
  %77 = load i64, ptr %19, align 8, !tbaa !5
  %78 = load i64, ptr %17, align 8, !tbaa !5
  %79 = sub nsw i64 %78, 1
  %80 = icmp sle i64 %77, %79
  br i1 %80, label %81, label %96

81:                                               ; preds = %76
  %82 = load i64, ptr %19, align 8, !tbaa !5
  %83 = sitofp i64 %82 to double
  %84 = load ptr, ptr %12, align 8, !tbaa !9
  %85 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %83, ptr noundef %84)
  %86 = fdiv double 1.000000e+00, %85
  %87 = fsub double 4.000000e+00, %86
  %88 = fdiv double 1.000000e+00, %87
  %89 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !13
  %91 = load i64, ptr %19, align 8, !tbaa !5
  %92 = getelementptr inbounds double, ptr %90, i64 %91
  store double %88, ptr %92, align 8, !tbaa !11
  br label %93

93:                                               ; preds = %81
  %94 = load i64, ptr %19, align 8, !tbaa !5
  %95 = add nsw i64 %94, 1
  store i64 %95, ptr %19, align 8, !tbaa !5
  br label %76, !llvm.loop !16

96:                                               ; preds = %76
  %97 = load double, ptr %18, align 8, !tbaa !11
  %98 = load i64, ptr %7, align 8, !tbaa !5
  %99 = load ptr, ptr %8, align 8, !tbaa !9
  %100 = load ptr, ptr %9, align 8, !tbaa !9
  %101 = load ptr, ptr %10, align 8, !tbaa !9
  %102 = load ptr, ptr %11, align 8, !tbaa !9
  %103 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl14gkqgeneraterecEPNS_9ae_vectorES1_dlPlS1_S1_S1_PNS_8ae_stateE(ptr noundef %14, ptr noundef %15, double noundef %97, i64 noundef %98, ptr noundef %99, ptr noundef %100, ptr noundef %101, ptr noundef %102, ptr noundef %103)
  %104 = load ptr, ptr %8, align 8, !tbaa !9
  %105 = load i64, ptr %104, align 8, !tbaa !5
  %106 = icmp sgt i64 %105, 0
  br i1 %106, label %107, label %153

107:                                              ; preds = %96
  %108 = load ptr, ptr %9, align 8, !tbaa !9
  %109 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %108, i32 0, i32 4
  %110 = load ptr, ptr %109, align 8, !tbaa !13
  %111 = getelementptr inbounds double, ptr %110, i64 0
  %112 = load double, ptr %111, align 8, !tbaa !11
  %113 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %112, double noundef -1.000000e+00)
  br i1 %113, label %123, label %114

114:                                              ; preds = %107
  %115 = load ptr, ptr %9, align 8, !tbaa !9
  %116 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %115, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !13
  %118 = load i64, ptr %7, align 8, !tbaa !5
  %119 = sub nsw i64 %118, 1
  %120 = getelementptr inbounds double, ptr %117, i64 %119
  %121 = load double, ptr %120, align 8, !tbaa !11
  %122 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %121, double noundef 1.000000e+00)
  br i1 %122, label %123, label %125

123:                                              ; preds = %114, %107
  %124 = load ptr, ptr %8, align 8, !tbaa !9
  store i64 -4, ptr %124, align 8, !tbaa !5
  br label %125

125:                                              ; preds = %123, %114
  store i64 0, ptr %20, align 8, !tbaa !5
  br label %126

126:                                              ; preds = %149, %125
  %127 = load i64, ptr %20, align 8, !tbaa !5
  %128 = load i64, ptr %7, align 8, !tbaa !5
  %129 = sub nsw i64 %128, 2
  %130 = icmp sle i64 %127, %129
  br i1 %130, label %131, label %152

131:                                              ; preds = %126
  %132 = load ptr, ptr %9, align 8, !tbaa !9
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %132, i32 0, i32 4
  %134 = load ptr, ptr %133, align 8, !tbaa !13
  %135 = load i64, ptr %20, align 8, !tbaa !5
  %136 = getelementptr inbounds double, ptr %134, i64 %135
  %137 = load double, ptr %136, align 8, !tbaa !11
  %138 = load ptr, ptr %9, align 8, !tbaa !9
  %139 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %138, i32 0, i32 4
  %140 = load ptr, ptr %139, align 8, !tbaa !13
  %141 = load i64, ptr %20, align 8, !tbaa !5
  %142 = add nsw i64 %141, 1
  %143 = getelementptr inbounds double, ptr %140, i64 %142
  %144 = load double, ptr %143, align 8, !tbaa !11
  %145 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %137, double noundef %144)
  br i1 %145, label %146, label %148

146:                                              ; preds = %131
  %147 = load ptr, ptr %8, align 8, !tbaa !9
  store i64 -4, ptr %147, align 8, !tbaa !5
  br label %148

148:                                              ; preds = %146, %131
  br label %149

149:                                              ; preds = %148
  %150 = load i64, ptr %20, align 8, !tbaa !5
  %151 = add nsw i64 %150, 1
  store i64 %151, ptr %20, align 8, !tbaa !5
  br label %126, !llvm.loop !17

152:                                              ; preds = %126
  br label %153

153:                                              ; preds = %152, %96
  %154 = load ptr, ptr %12, align 8, !tbaa !9
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %154)
  store i32 0, ptr %21, align 4
  br label %155

155:                                              ; preds = %153, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  %156 = load i32, ptr %21, align 4
  switch i32 %156, label %158 [
    i32 0, label %157
    i32 1, label %157
  ]

157:                                              ; preds = %155, %155
  ret void

158:                                              ; preds = %155
  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 double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) #3

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 i64 @_ZN11alglib_impl8ae_iceilEdPNS_8ae_stateE(double noundef, ptr noundef) #3

declare noundef i64 @_ZN11alglib_impl9ae_ifloorEdPNS_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 = { 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 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !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_impl15gkqlegendrecalcElPlPNS_9ae_vectorES2_S2_PNS_8ae_stateE(i64 noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #1 {
  %7 = alloca %"struct.alglib_impl::ae_frame", align 8
  %8 = alloca %"struct.alglib_impl::ae_vector", align 8
  %9 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %5, ptr noundef nonnull %7)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %8, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %9, i8 0, i64 64, i1 false)
  store i64 0, ptr %1, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %2)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %3)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %4)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 3, ptr noundef %5, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %9, i64 noundef 0, i64 noundef 3, ptr noundef %5, i1 noundef zeroext true)
  %10 = and i64 %0, -9223372036854775807
  %11 = icmp ne i64 %10, 1
  %12 = icmp slt i64 %0, 3
  %or.cond = or i1 %12, %11
  br i1 %or.cond, label %13, label %14

13:                                               ; preds = %6
  store i64 -1, ptr %1, align 8, !tbaa !5
  br label %.loopexit

14:                                               ; preds = %6
  %15 = lshr i64 %0, 1
  %16 = mul nuw nsw i64 %15, 3
  %17 = uitofp nneg i64 %16 to double
  %18 = fmul double %17, 5.000000e-01
  %19 = call noundef i64 @_ZN11alglib_impl9ae_ifloorEdPNS_8ae_stateE(double noundef %18, ptr noundef %5)
  %20 = add i64 %19, 1
  %21 = call noundef i64 @_ZN11alglib_impl8ae_iceilEdPNS_8ae_stateE(double noundef %18, ptr noundef %5)
  %22 = add i64 %21, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %20, ptr noundef %5)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %22, ptr noundef %5)
  %.not54 = icmp slt i64 %19, 0
  br i1 %.not54, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %14
  %23 = getelementptr inbounds i8, ptr %8, i64 56
  %24 = add nuw i64 %19, 1
  %xtraiter = and i64 %24, 3
  %25 = icmp ult i64 %19, 3
  br i1 %25, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

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

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

._crit_edge.loopexit.unr-lcssa:                   ; preds = %26, %.lr.ph
  %.05055.unr = phi i64 [ 0, %.lr.ph ], [ %38, %26 ]
  %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
  %.05055.epil = phi i64 [ %41, %.epil.preheader ], [ %.05055.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %39 = load ptr, ptr %23, align 8, !tbaa !9
  %40 = getelementptr inbounds double, ptr %39, i64 %.05055.epil
  store double 0.000000e+00, ptr %40, align 8, !tbaa !10
  %41 = add nuw i64 %.05055.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, %14
  %42 = getelementptr inbounds i8, ptr %9, i64 56
  %43 = load ptr, ptr %42, align 8, !tbaa !9
  store double 2.000000e+00, ptr %43, align 8, !tbaa !10
  %.not5256 = icmp slt i64 %21, 1
  br i1 %.not5256, label %._crit_edge60, label %.lr.ph59

.lr.ph59:                                         ; preds = %._crit_edge, %.lr.ph59
  %.157 = phi i64 [ %51, %.lr.ph59 ], [ 1, %._crit_edge ]
  %44 = uitofp nneg i64 %.157 to double
  %45 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %44, ptr noundef %5)
  %46 = fdiv double 1.000000e+00, %45
  %47 = fsub double 4.000000e+00, %46
  %48 = fdiv double 1.000000e+00, %47
  %49 = load ptr, ptr %42, align 8, !tbaa !9
  %50 = getelementptr inbounds double, ptr %49, i64 %.157
  store double %48, ptr %50, align 8, !tbaa !10
  %51 = add nuw i64 %.157, 1
  %exitcond65.not = icmp eq i64 %.157, %21
  br i1 %exitcond65.not, label %._crit_edge60, label %.lr.ph59, !llvm.loop !16

._crit_edge60:                                    ; preds = %.lr.ph59, %._crit_edge
  call void @_ZN11alglib_impl14gkqgeneraterecEPNS_9ae_vectorES1_dlPlS1_S1_S1_PNS_8ae_stateE(ptr noundef nonnull %8, ptr noundef nonnull %9, double noundef 2.000000e+00, i64 noundef %0, ptr noundef nonnull %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5)
  %52 = load i64, ptr %1, align 8, !tbaa !5
  %53 = icmp sgt i64 %52, 0
  br i1 %53, label %54, label %.loopexit

54:                                               ; preds = %._crit_edge60
  %55 = getelementptr inbounds i8, ptr %2, i64 56
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = load double, ptr %56, align 8, !tbaa !10
  %58 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %57, double noundef -1.000000e+00)
  br i1 %58, label %65, label %59

59:                                               ; preds = %54
  %60 = load ptr, ptr %55, align 8, !tbaa !9
  %61 = getelementptr double, ptr %60, i64 %0
  %62 = getelementptr i8, ptr %61, i64 -8
  %63 = load double, ptr %62, align 8, !tbaa !10
  %64 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_greaterEdd(double noundef %63, double noundef 1.000000e+00)
  br i1 %64, label %65, label %66

65:                                               ; preds = %59, %54
  store i64 -4, ptr %1, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %65, %59
  %.not5361 = icmp slt i64 %0, 2
  br i1 %.not5361, label %.loopexit, label %.lr.ph64.preheader

.lr.ph64.preheader:                               ; preds = %66
  %67 = add nsw i64 %0, -2
  br label %.lr.ph64

.lr.ph64:                                         ; preds = %.lr.ph64.preheader, %76
  %.062 = phi i64 [ %71, %76 ], [ 0, %.lr.ph64.preheader ]
  %68 = load ptr, ptr %55, align 8, !tbaa !9
  %69 = getelementptr inbounds double, ptr %68, i64 %.062
  %70 = load double, ptr %69, align 8, !tbaa !10
  %71 = add nuw nsw i64 %.062, 1
  %72 = getelementptr inbounds double, ptr %68, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !10
  %74 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %70, double noundef %73)
  br i1 %74, label %75, label %76

75:                                               ; preds = %.lr.ph64
  store i64 -4, ptr %1, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %.lr.ph64, %75
  %exitcond66.not = icmp eq i64 %.062, %67
  br i1 %exitcond66.not, label %.loopexit, label %.lr.ph64, !llvm.loop !17

.loopexit:                                        ; preds = %76, %._crit_edge60, %66, %13
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %5)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  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 double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #3

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 i64 @_ZN11alglib_impl8ae_iceilEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #3

declare noundef i64 @_ZN11alglib_impl9ae_ifloorEdPNS_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 = { 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,SROAPass,SimplifyCFGPass