; LLVM IR from venumb/ZSPACE :: cpp/depends/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.18 = 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_impl15convr1dcircularEPNS_9ae_vectorElS1_lS1_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_impl15corrr1dcircularEPNS_9ae_vectorElS1_lS1_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 %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %22)
  %23 = 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 %23, i1 noundef zeroext true)
  %24 = 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 %24, i1 noundef zeroext true)
  %25 = load i64, ptr %10, align 8, !tbaa !9
  %26 = icmp sgt i64 %25, 0
  br i1 %26, label %27, label %30

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

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

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

39:                                               ; preds = %49, %36
  %40 = load i64, ptr %16, align 8, !tbaa !9
  %41 = load i64, ptr %8, align 8, !tbaa !9
  %42 = sub nsw i64 %41, 1
  %43 = icmp sle i64 %40, %42
  br i1 %43, label %44, label %52

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

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

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

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

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

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

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

92:                                               ; preds = %111, %89
  %93 = load i64, ptr %18, align 8, !tbaa !9
  %94 = load i64, ptr %10, align 8, !tbaa !9
  %95 = sub nsw i64 %94, 1
  %96 = icmp sle i64 %93, %95
  br i1 %96, label %97, label %114

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

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

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

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

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

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

165:                                              ; preds = %163, %163
  ret void

166:                                              ; preds = %163
  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_impl15ae_vector_clearEPNS_9ae_vectorE(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 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.18 = 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_impl15convr1dcircularEPNS_9ae_vectorElS1_lS1_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_impl15corrr1dcircularEPNS_9ae_vectorElS1_lS1_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_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 = 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.18, 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.ph78, label %.preheader

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

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

.preheader.loopexit.unr-lcssa:                    ; preds = %23, %.lr.ph78
  %.076.unr = phi i64 [ 0, %.lr.ph78 ], [ %35, %23 ]
  %lcmp.mod85.not = icmp eq i64 %xtraiter84, 0
  br i1 %lcmp.mod85.not, label %.preheader, label %.epil.preheader83

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

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.epil.preheader83, %14
  br i1 %10, label %.lr.ph80, label %._crit_edge81

.lr.ph80:                                         ; 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.ph78.new
  %.076 = phi i64 [ 0, %.lr.ph78.new ], [ %35, %23 ]
  %niter87 = phi i64 [ 0, %.lr.ph78.new ], [ %niter87.next.3, %23 ]
  %24 = load ptr, ptr %15, align 8, !tbaa !5
  %25 = getelementptr inbounds double, ptr %24, i64 %.076
  store double 0.000000e+00, ptr %25, align 8, !tbaa !8
  %26 = or disjoint i64 %.076, 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 %.076, 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 %.076, 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 %.076, 4
  %niter87.next.3 = add i64 %niter87, 4
  %niter87.ncmp.3 = icmp eq i64 %niter87.next.3, %unroll_iter86
  br i1 %niter87.ncmp.3, label %.preheader.loopexit.unr-lcssa, label %23, !llvm.loop !12

36:                                               ; preds = %.lr.ph80, %36
  %.179 = phi i64 [ 0, %.lr.ph80 ], [ %37, %36 ]
  %37 = add nsw i64 %.179, %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, %.179
  %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 %.179
  %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_edge81, !llvm.loop !14

._crit_edge81:                                    ; preds = %36, %.preheader
  call void @_ZN11alglib_impl15corrr1dcircularEPNS_9ae_vectorElS1_lS1_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
  %.06374 = 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 %.06374
  %54 = load double, ptr %53, align 8, !tbaa !8
  %55 = load ptr, ptr %49, align 8, !tbaa !5
  %56 = sub nsw i64 %47, %.06374
  %57 = getelementptr inbounds double, ptr %55, i64 %56
  store double %54, ptr %57, align 8, !tbaa !8
  %58 = or disjoint i64 %.06374, 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 %.06374, 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
  %.06374.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 %.06374.unr
  %68 = load double, ptr %67, align 8, !tbaa !8
  %69 = load ptr, ptr %49, align 8, !tbaa !5
  %70 = sub nsw i64 %47, %.06374.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_impl15convr1dcircularEPNS_9ae_vectorElS1_lS1_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_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %4, i64 noundef %1, 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.not71 = icmp slt i64 %77, %79
  br i1 %.not.not71, 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_edge81
  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_impl15ae_vector_clearEPNS_9ae_vectorE(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 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