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

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

@.str.26 = external hidden unnamed_addr constant [35 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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl18corrr1dcircularbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5) #1 {
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, 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 i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i64 %1, ptr %8, align 8, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i64 %3, ptr %10, align 8, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  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
  %21 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %21, 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)
  %22 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %14, i64 noundef 0, i64 noundef 3, ptr noundef %22, i1 noundef zeroext true)
  %23 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %15, i64 noundef 0, i64 noundef 3, ptr noundef %23, i1 noundef zeroext true)
  %24 = load i64, ptr %10, align 8, !tbaa !9
  %25 = icmp sgt i64 %24, 0
  br i1 %25, label %26, label %29

26:                                               ; preds = %6
  %27 = load i64, ptr %8, align 8, !tbaa !9
  %28 = icmp sgt i64 %27, 0
  br label %29

29:                                               ; preds = %26, %6
  %30 = phi i1 [ false, %6 ], [ %28, %26 ]
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %30, ptr noundef @.str.26, ptr noundef %31)
  %32 = load i64, ptr %8, align 8, !tbaa !9
  %33 = load i64, ptr %10, align 8, !tbaa !9
  %34 = icmp slt i64 %32, %33
  br i1 %34, label %35, label %88

35:                                               ; preds = %29
  %36 = load i64, ptr %8, align 8, !tbaa !9
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %15, i64 noundef %36, ptr noundef %37)
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %38

38:                                               ; preds = %48, %35
  %39 = load i64, ptr %16, align 8, !tbaa !9
  %40 = load i64, ptr %8, align 8, !tbaa !9
  %41 = sub nsw i64 %40, 1
  %42 = icmp sle i64 %39, %41
  br i1 %42, label %43, label %51

43:                                               ; preds = %38
  %44 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = load i64, ptr %16, align 8, !tbaa !9
  %47 = getelementptr inbounds double, ptr %45, i64 %46
  store double 0.000000e+00, ptr %47, align 8, !tbaa !12
  br label %48

48:                                               ; preds = %43
  %49 = load i64, ptr %16, align 8, !tbaa !9
  %50 = add nsw i64 %49, 1
  store i64 %50, ptr %16, align 8, !tbaa !9
  br label %38, !llvm.loop !14

51:                                               ; preds = %38
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %52

52:                                               ; preds = %56, %51
  %53 = load i64, ptr %16, align 8, !tbaa !9
  %54 = load i64, ptr %10, align 8, !tbaa !9
  %55 = icmp slt i64 %53, %54
  br i1 %55, label %56, label %81

56:                                               ; preds = %52
  %57 = load i64, ptr %16, align 8, !tbaa !9
  %58 = load i64, ptr %8, align 8, !tbaa !9
  %59 = add nsw i64 %57, %58
  %60 = sub nsw i64 %59, 1
  %61 = load i64, ptr %10, align 8, !tbaa !9
  %62 = sub nsw i64 %61, 1
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %60, i64 noundef %62, ptr noundef %63)
  store i64 %64, ptr %17, align 8, !tbaa !9
  %65 = load i64, ptr %17, align 8, !tbaa !9
  %66 = load i64, ptr %16, align 8, !tbaa !9
  %67 = sub nsw i64 %65, %66
  store i64 %67, ptr %19, align 8, !tbaa !9
  %68 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %69 = load ptr, ptr %68, align 8, !tbaa !11
  %70 = getelementptr inbounds double, ptr %69, i64 0
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %71, i32 0, i32 4
  %73 = load ptr, ptr %72, align 8, !tbaa !11
  %74 = load i64, ptr %16, align 8, !tbaa !9
  %75 = getelementptr inbounds double, ptr %73, i64 %74
  %76 = load i64, ptr %19, align 8, !tbaa !9
  %77 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %76)
  call void @_ZN11alglib_impl8ae_v_addEPdlPKdll(ptr noundef %70, i64 noundef 1, ptr noundef %75, i64 noundef 1, i64 noundef %77)
  %78 = load i64, ptr %16, align 8, !tbaa !9
  %79 = load i64, ptr %8, align 8, !tbaa !9
  %80 = add nsw i64 %78, %79
  store i64 %80, ptr %16, align 8, !tbaa !9
  br label %52, !llvm.loop !16

81:                                               ; preds = %52
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load i64, ptr %8, align 8, !tbaa !9
  %84 = load i64, ptr %8, align 8, !tbaa !9
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl18corrr1dcircularbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %82, i64 noundef %83, ptr noundef %15, i64 noundef %84, ptr noundef %85, ptr noundef %86)
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %87)
  store i32 1, ptr %20, align 4
  br label %162

88:                                               ; preds = %29
  %89 = load i64, ptr %10, align 8, !tbaa !9
  %90 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %14, i64 noundef %89, ptr noundef %90)
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %91

91:                                               ; preds = %110, %88
  %92 = load i64, ptr %18, align 8, !tbaa !9
  %93 = load i64, ptr %10, align 8, !tbaa !9
  %94 = sub nsw i64 %93, 1
  %95 = icmp sle i64 %92, %94
  br i1 %95, label %96, label %113

96:                                               ; preds = %91
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %97, i32 0, i32 4
  %99 = load ptr, ptr %98, align 8, !tbaa !11
  %100 = load i64, ptr %18, align 8, !tbaa !9
  %101 = getelementptr inbounds double, ptr %99, i64 %100
  %102 = load double, ptr %101, align 8, !tbaa !12
  %103 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %14, i32 0, i32 4
  %104 = load ptr, ptr %103, align 8, !tbaa !11
  %105 = load i64, ptr %10, align 8, !tbaa !9
  %106 = sub nsw i64 %105, 1
  %107 = load i64, ptr %18, align 8, !tbaa !9
  %108 = sub nsw i64 %106, %107
  %109 = getelementptr inbounds double, ptr %104, i64 %108
  store double %102, ptr %109, align 8, !tbaa !12
  br label %110

110:                                              ; preds = %96
  %111 = load i64, ptr %18, align 8, !tbaa !9
  %112 = add nsw i64 %111, 1
  store i64 %112, ptr %18, align 8, !tbaa !9
  br label %91, !llvm.loop !17

113:                                              ; preds = %91
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = load i64, ptr %8, align 8, !tbaa !9
  %116 = load i64, ptr %10, align 8, !tbaa !9
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl18convr1dcircularbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %114, i64 noundef %115, ptr noundef %14, i64 noundef %116, ptr noundef %15, ptr noundef %117)
  %118 = load i64, ptr %8, align 8, !tbaa !9
  %119 = load ptr, ptr %11, align 8, !tbaa !5
  %120 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %118, ptr noundef %119, ptr noundef %120)
  %121 = load ptr, ptr %11, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %121, i32 0, i32 4
  %123 = load ptr, ptr %122, align 8, !tbaa !11
  %124 = getelementptr inbounds double, ptr %123, i64 0
  %125 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %126 = load ptr, ptr %125, align 8, !tbaa !11
  %127 = load i64, ptr %10, align 8, !tbaa !9
  %128 = sub nsw i64 %127, 1
  %129 = getelementptr inbounds double, ptr %126, i64 %128
  %130 = load i64, ptr %8, align 8, !tbaa !9
  %131 = load i64, ptr %10, align 8, !tbaa !9
  %132 = sub nsw i64 %130, %131
  %133 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %132)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %124, i64 noundef 1, ptr noundef %129, i64 noundef 1, i64 noundef %133)
  %134 = load i64, ptr %8, align 8, !tbaa !9
  %135 = load i64, ptr %10, align 8, !tbaa !9
  %136 = sub nsw i64 %134, %135
  %137 = add nsw i64 %136, 1
  %138 = load i64, ptr %8, align 8, !tbaa !9
  %139 = sub nsw i64 %138, 1
  %140 = icmp sle i64 %137, %139
  br i1 %140, label %141, label %160

141:                                              ; preds = %113
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %142, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !11
  %145 = load i64, ptr %8, align 8, !tbaa !9
  %146 = load i64, ptr %10, align 8, !tbaa !9
  %147 = sub nsw i64 %145, %146
  %148 = add nsw i64 %147, 1
  %149 = getelementptr inbounds double, ptr %144, i64 %148
  %150 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %15, i32 0, i32 4
  %151 = load ptr, ptr %150, align 8, !tbaa !11
  %152 = getelementptr inbounds double, ptr %151, i64 0
  %153 = load i64, ptr %8, align 8, !tbaa !9
  %154 = load i64, ptr %10, align 8, !tbaa !9
  %155 = sub nsw i64 %153, %154
  %156 = add nsw i64 %155, 1
  %157 = load i64, ptr %8, align 8, !tbaa !9
  %158 = sub nsw i64 %157, 1
  %159 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %156, i64 noundef %158)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %149, i64 noundef 1, ptr noundef %152, i64 noundef 1, i64 noundef %159)
  br label %160

160:                                              ; preds = %141, %113
  %161 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %161)
  store i32 0, ptr %20, align 4
  br label %162

162:                                              ; preds = %160, %81
  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
  %163 = load i32, ptr %20, align 4
  switch i32 %163, label %165 [
    i32 0, label %164
    i32 1, label %164
  ]

164:                                              ; preds = %162, %162
  ret void

165:                                              ; preds = %162
  unreachable
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

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

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) #2

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

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #2

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

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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"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 = 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 }

@.str.26 = external hidden unnamed_addr constant [35 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl18corrr1dcircularbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr nocapture noundef readonly %2, i64 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)
  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 = icmp sgt i64 %3, 0
  %11 = icmp sgt i64 %1, 0
  %12 = and i1 %11, %10
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.26, ptr noundef %5)
  %13 = icmp slt i64 %1, %3
  br i1 %13, label %14, label %46

14:                                               ; preds = %6
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %9, i64 noundef %1, ptr noundef %5)
  br i1 %11, label %.lr.ph77, label %.preheader

.lr.ph77:                                         ; preds = %14
  %15 = getelementptr inbounds i8, ptr %9, i64 56
  %xtraiter83 = and i64 %1, 3
  %16 = icmp ult i64 %1, 4
  br i1 %16, label %.preheader.loopexit.unr-lcssa, label %.lr.ph77.new

.lr.ph77.new:                                     ; preds = %.lr.ph77
  %unroll_iter85 = and i64 %1, 9223372036854775804
  br label %23

.preheader.loopexit.unr-lcssa:                    ; preds = %23, %.lr.ph77
  %.075.unr = phi i64 [ 0, %.lr.ph77 ], [ %35, %23 ]
  %lcmp.mod84.not = icmp eq i64 %xtraiter83, 0
  br i1 %lcmp.mod84.not, label %.preheader, label %.epil.preheader82

.epil.preheader82:                                ; preds = %.preheader.loopexit.unr-lcssa, %.epil.preheader82
  %.075.epil = phi i64 [ %19, %.epil.preheader82 ], [ %.075.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader82 ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %17 = load ptr, ptr %15, align 8, !tbaa !5
  %18 = getelementptr inbounds double, ptr %17, i64 %.075.epil
  store double 0.000000e+00, ptr %18, align 8, !tbaa !8
  %19 = add nuw nsw i64 %.075.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter83
  br i1 %epil.iter.cmp.not, label %.preheader, label %.epil.preheader82, !llvm.loop !10

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.epil.preheader82, %14
  br i1 %10, label %.lr.ph79, label %._crit_edge80

.lr.ph79:                                         ; preds = %.preheader
  %20 = add nsw i64 %3, -1
  %21 = getelementptr inbounds i8, ptr %9, i64 56
  %22 = getelementptr inbounds i8, ptr %2, i64 56
  br label %36

23:                                               ; preds = %23, %.lr.ph77.new
  %.075 = phi i64 [ 0, %.lr.ph77.new ], [ %35, %23 ]
  %niter86 = phi i64 [ 0, %.lr.ph77.new ], [ %niter86.next.3, %23 ]
  %24 = load ptr, ptr %15, align 8, !tbaa !5
  %25 = getelementptr inbounds double, ptr %24, i64 %.075
  store double 0.000000e+00, ptr %25, align 8, !tbaa !8
  %26 = or disjoint i64 %.075, 1
  %27 = load ptr, ptr %15, align 8, !tbaa !5
  %28 = getelementptr inbounds double, ptr %27, i64 %26
  store double 0.000000e+00, ptr %28, align 8, !tbaa !8
  %29 = or disjoint i64 %.075, 2
  %30 = load ptr, ptr %15, align 8, !tbaa !5
  %31 = getelementptr inbounds double, ptr %30, i64 %29
  store double 0.000000e+00, ptr %31, align 8, !tbaa !8
  %32 = or disjoint i64 %.075, 3
  %33 = load ptr, ptr %15, align 8, !tbaa !5
  %34 = getelementptr inbounds double, ptr %33, i64 %32
  store double 0.000000e+00, ptr %34, align 8, !tbaa !8
  %35 = add nuw nsw i64 %.075, 4
  %niter86.next.3 = add i64 %niter86, 4
  %niter86.ncmp.3 = icmp eq i64 %niter86.next.3, %unroll_iter85
  br i1 %niter86.ncmp.3, label %.preheader.loopexit.unr-lcssa, label %23, !llvm.loop !12

36:                                               ; preds = %.lr.ph79, %36
  %.178 = phi i64 [ 0, %.lr.ph79 ], [ %37, %36 ]
  %37 = add nsw i64 %.178, %1
  %38 = add nsw i64 %37, -1
  %39 = call noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef %38, i64 noundef %20, ptr noundef %5)
  %40 = sub nsw i64 %39, %.178
  %41 = load ptr, ptr %21, align 8, !tbaa !5
  %42 = load ptr, ptr %22, align 8, !tbaa !5
  %43 = getelementptr inbounds double, ptr %42, i64 %.178
  %44 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %40)
  call void @_ZN11alglib_impl8ae_v_addEPdlPKdll(ptr noundef %41, i64 noundef 1, ptr noundef %43, i64 noundef 1, i64 noundef %44)
  %45 = icmp slt i64 %37, %3
  br i1 %45, label %36, label %._crit_edge80, !llvm.loop !14

._crit_edge80:                                    ; preds = %36, %.preheader
  call void @_ZN11alglib_impl18corrr1dcircularbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef nonnull %9, i64 noundef %1, ptr noundef %4, ptr noundef %5)
  br label %86

46:                                               ; preds = %6
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %3, ptr noundef %5)
  %47 = add nsw i64 %3, -1
  br i1 %10, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %46
  %48 = getelementptr inbounds i8, ptr %2, i64 56
  %49 = getelementptr inbounds i8, ptr %8, i64 56
  %xtraiter = and i64 %3, 1
  %50 = icmp eq i64 %3, 1
  br i1 %50, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %3, 9223372036854775806
  br label %51

51:                                               ; preds = %51, %.lr.ph.new
  %.06273 = phi i64 [ 0, %.lr.ph.new ], [ %65, %51 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %51 ]
  %52 = load ptr, ptr %48, align 8, !tbaa !5
  %53 = getelementptr inbounds double, ptr %52, i64 %.06273
  %54 = load double, ptr %53, align 8, !tbaa !8
  %55 = load ptr, ptr %49, align 8, !tbaa !5
  %56 = sub nsw i64 %47, %.06273
  %57 = getelementptr inbounds double, ptr %55, i64 %56
  store double %54, ptr %57, align 8, !tbaa !8
  %58 = or disjoint i64 %.06273, 1
  %59 = load ptr, ptr %48, align 8, !tbaa !5
  %60 = getelementptr inbounds double, ptr %59, i64 %58
  %61 = load double, ptr %60, align 8, !tbaa !8
  %62 = load ptr, ptr %49, align 8, !tbaa !5
  %63 = sub nsw i64 %47, %58
  %64 = getelementptr inbounds double, ptr %62, i64 %63
  store double %61, ptr %64, align 8, !tbaa !8
  %65 = add nuw nsw i64 %.06273, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %51, !llvm.loop !15

._crit_edge.loopexit.unr-lcssa:                   ; preds = %51, %.lr.ph
  %.06273.unr = phi i64 [ 0, %.lr.ph ], [ %65, %51 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %66 = load ptr, ptr %48, align 8, !tbaa !5
  %67 = getelementptr inbounds double, ptr %66, i64 %.06273.unr
  %68 = load double, ptr %67, align 8, !tbaa !8
  %69 = load ptr, ptr %49, align 8, !tbaa !5
  %70 = sub nsw i64 %47, %.06273.unr
  %71 = getelementptr inbounds double, ptr %69, i64 %70
  store double %68, ptr %71, align 8, !tbaa !8
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %46
  call void @_ZN11alglib_impl18convr1dcircularbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef nonnull %8, i64 noundef %3, ptr noundef nonnull %9, ptr noundef %5)
  call void @_ZN11alglib_impl7rallocvElPNS_9ae_vectorEPNS_8ae_stateE(i64 noundef %1, ptr noundef %4, ptr noundef %5)
  %72 = getelementptr inbounds i8, ptr %4, i64 56
  %73 = load ptr, ptr %72, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %9, i64 56
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %76 = getelementptr inbounds double, ptr %75, i64 %47
  %77 = sub nsw i64 %1, %3
  %78 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %77)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %73, i64 noundef 1, ptr noundef %76, i64 noundef 1, i64 noundef %78)
  %79 = add nsw i64 %1, -1
  %.not.not70 = icmp slt i64 %77, %79
  br i1 %.not.not70, label %80, label %86

80:                                               ; preds = %._crit_edge
  %81 = add nsw i64 %77, 1
  %82 = load ptr, ptr %72, align 8, !tbaa !5
  %83 = getelementptr inbounds double, ptr %82, i64 %81
  %84 = load ptr, ptr %74, align 8, !tbaa !5
  %85 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %81, i64 noundef %79)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %83, i64 noundef 1, ptr noundef %84, i64 noundef 1, i64 noundef %85)
  br label %86

86:                                               ; preds = %._crit_edge, %80, %._crit_edge80
  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
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 #2

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

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

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

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

declare noundef i64 @_ZN11alglib_impl9ae_minintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }

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

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


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