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

; 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::rbfv2model" = type { i64, i64, i64, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix", double, i64, double, i64, %"struct.alglib_impl::rbfv2calcbuffer" }
%"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 }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::rbfv2calcbuffer" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }

@.str.690 = external hidden unnamed_addr constant [29 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 void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) #1

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

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

declare void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl11rbfv2unpackEPNS_10rbfv2modelEPlS2_PNS_9ae_matrixES2_S4_PNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #2 {
  %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 ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %17 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 0, ptr %17, align 8, !tbaa !9
  %18 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 0, ptr %18, align 8, !tbaa !9
  %19 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %19)
  %20 = load ptr, ptr %12, align 8, !tbaa !5
  store i64 0, ptr %20, align 8, !tbaa !9
  %21 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %21)
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %22, i32 0, i32 1
  %24 = load i64, ptr %23, align 8, !tbaa !11
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 %24, ptr %25, align 8, !tbaa !9
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %26, i32 0, i32 0
  %28 = load i64, ptr %27, align 8, !tbaa !19
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 %28, ptr %29, align 8, !tbaa !9
  %30 = load ptr, ptr %12, align 8, !tbaa !5
  store i64 0, ptr %30, align 8, !tbaa !9
  %31 = load ptr, ptr %13, align 8, !tbaa !5
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %32, i32 0, i32 0
  %34 = load i64, ptr %33, align 8, !tbaa !19
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %35, i32 0, i32 1
  %37 = load i64, ptr %36, align 8, !tbaa !11
  %38 = add nsw i64 %37, 1
  %39 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %31, i64 noundef %34, i64 noundef %38, ptr noundef %39)
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %40

40:                                               ; preds = %67, %7
  %41 = load i64, ptr %15, align 8, !tbaa !9
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %42, i32 0, i32 0
  %44 = load i64, ptr %43, align 8, !tbaa !19
  %45 = sub nsw i64 %44, 1
  %46 = icmp sle i64 %41, %45
  br i1 %46, label %47, label %70

47:                                               ; preds = %40
  %48 = load ptr, ptr %13, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %48, i32 0, i32 6
  %50 = load ptr, ptr %49, align 8, !tbaa !20
  %51 = load i64, ptr %15, align 8, !tbaa !9
  %52 = getelementptr inbounds ptr, ptr %50, i64 %51
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = getelementptr inbounds double, ptr %53, i64 0
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %55, i32 0, i32 12
  %57 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %56, i32 0, i32 6
  %58 = load ptr, ptr %57, align 8, !tbaa !20
  %59 = load i64, ptr %15, align 8, !tbaa !9
  %60 = getelementptr inbounds ptr, ptr %58, i64 %59
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  %62 = getelementptr inbounds double, ptr %61, i64 0
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %63, i32 0, i32 1
  %65 = load i64, ptr %64, align 8, !tbaa !11
  %66 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %65)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %54, i64 noundef 1, ptr noundef %62, i64 noundef 1, i64 noundef %66)
  br label %67

67:                                               ; preds = %47
  %68 = load i64, ptr %15, align 8, !tbaa !9
  %69 = add nsw i64 %68, 1
  store i64 %69, ptr %15, align 8, !tbaa !9
  br label %40, !llvm.loop !21

70:                                               ; preds = %40
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %71, i32 0, i32 11
  %73 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %72, i32 0, i32 0
  %74 = load i64, ptr %73, align 8, !tbaa !23
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %75, i32 0, i32 1
  %77 = load i64, ptr %76, align 8, !tbaa !11
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %78, i32 0, i32 0
  %80 = load i64, ptr %79, align 8, !tbaa !19
  %81 = add nsw i64 %77, %80
  %82 = srem i64 %74, %81
  %83 = icmp eq i64 %82, 0
  %84 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %83, ptr noundef @.str.690, ptr noundef %84)
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %85, i32 0, i32 11
  %87 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %86, i32 0, i32 0
  %88 = load i64, ptr %87, align 8, !tbaa !23
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %89, i32 0, i32 1
  %91 = load i64, ptr %90, align 8, !tbaa !11
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %92, i32 0, i32 0
  %94 = load i64, ptr %93, align 8, !tbaa !19
  %95 = add nsw i64 %91, %94
  %96 = sdiv i64 %88, %95
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  store i64 %96, ptr %97, align 8, !tbaa !9
  store i64 0, ptr %16, align 8, !tbaa !9
  %98 = load ptr, ptr %12, align 8, !tbaa !5
  %99 = load i64, ptr %98, align 8, !tbaa !9
  %100 = icmp sgt i64 %99, 0
  br i1 %100, label %101, label %159

101:                                              ; preds = %70
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  %103 = load ptr, ptr %12, align 8, !tbaa !5
  %104 = load i64, ptr %103, align 8, !tbaa !9
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %105, i32 0, i32 1
  %107 = load i64, ptr %106, align 8, !tbaa !11
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %108, i32 0, i32 0
  %110 = load i64, ptr %109, align 8, !tbaa !19
  %111 = add nsw i64 %107, %110
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %112, i32 0, i32 1
  %114 = load i64, ptr %113, align 8, !tbaa !11
  %115 = add nsw i64 %111, %114
  %116 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %102, i64 noundef %104, i64 noundef %115, ptr noundef %116)
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %117

117:                                              ; preds = %155, %101
  %118 = load i64, ptr %15, align 8, !tbaa !9
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %119, i32 0, i32 3
  %121 = load i64, ptr %120, align 8, !tbaa !24
  %122 = sub nsw i64 %121, 1
  %123 = icmp sle i64 %118, %122
  br i1 %123, label %124, label %158

124:                                              ; preds = %117
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %125, i32 0, i32 7
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %127, i32 0, i32 8
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %129, i32 0, i32 11
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %131, i32 0, i32 5
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %133, i32 0, i32 1
  %135 = load i64, ptr %134, align 8, !tbaa !11
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %136, i32 0, i32 0
  %138 = load i64, ptr %137, align 8, !tbaa !19
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %139, i32 0, i32 6
  %141 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %140, i32 0, i32 4
  %142 = load ptr, ptr %141, align 8, !tbaa !20
  %143 = load i64, ptr %15, align 8, !tbaa !9
  %144 = getelementptr inbounds i64, ptr %142, i64 %143
  %145 = load i64, ptr %144, align 8, !tbaa !9
  %146 = load ptr, ptr %8, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.alglib_impl::rbfv2model", ptr %146, i32 0, i32 4
  %148 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %147, i32 0, i32 4
  %149 = load ptr, ptr %148, align 8, !tbaa !20
  %150 = load i64, ptr %15, align 8, !tbaa !9
  %151 = getelementptr inbounds double, ptr %149, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !25
  %153 = load ptr, ptr %11, align 8, !tbaa !5
  %154 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_implL22rbfv2_partialunpackrecEPNS_9ae_vectorES1_S1_S1_llldPNS_9ae_matrixEPlPNS_8ae_stateE(ptr noundef %126, ptr noundef %128, ptr noundef %130, ptr noundef %132, i64 noundef %135, i64 noundef %138, i64 noundef %145, double noundef %152, ptr noundef %153, ptr noundef %16, ptr noundef %154)
  br label %155

155:                                              ; preds = %124
  %156 = load i64, ptr %15, align 8, !tbaa !9
  %157 = add nsw i64 %156, 1
  store i64 %157, ptr %15, align 8, !tbaa !9
  br label %117, !llvm.loop !26

158:                                              ; preds = %117
  br label %159

159:                                              ; preds = %158, %70
  %160 = load ptr, ptr %12, align 8, !tbaa !5
  %161 = load i64, ptr %160, align 8, !tbaa !9
  %162 = load i64, ptr %16, align 8, !tbaa !9
  %163 = icmp eq i64 %161, %162
  %164 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %163, ptr noundef @.str.690, ptr noundef %164)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL22rbfv2_partialunpackrecEPNS_9ae_vectorES1_S1_S1_llldPNS_9ae_matrixEPlPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef) #2

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 = !{!12, !10, i64 8}
!12 = !{!"_ZTSN11alglib_impl10rbfv2modelE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !13, i64 96, !13, i64 160, !13, i64 224, !13, i64 288, !13, i64 352, !13, i64 416, !13, i64 480, !16, i64 544, !17, i64 624, !10, i64 632, !17, i64 640, !10, i64 648, !18, i64 656}
!13 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !14, i64 16, !15, i64 24, !7, i64 56}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !14, i64 32, !15, i64 40, !7, i64 72}
!17 = !{!"double", !7, i64 0}
!18 = !{!"_ZTSN11alglib_impl15rbfv2calcbufferE", !13, i64 0, !13, i64 64, !13, i64 128, !17, i64 192, !13, i64 200, !13, i64 264}
!19 = !{!12, !10, i64 0}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!12, !10, i64 480}
!24 = !{!12, !10, i64 24}
!25 = !{!17, !17, i64 0}
!26 = distinct !{!26, !22}


; 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.690 = external hidden unnamed_addr constant [29 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

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

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) local_unnamed_addr #1

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

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

declare void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl11rbfv2unpackEPNS_10rbfv2modelEPlS2_PNS_9ae_matrixES2_S4_PNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef writeonly %2, ptr noundef %3, ptr nocapture noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #2 {
  %8 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  store i64 0, ptr %1, align 8, !tbaa !5
  store i64 0, ptr %2, align 8, !tbaa !5
  tail call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %3)
  store i64 0, ptr %4, align 8, !tbaa !5
  tail call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %5)
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = load i64, ptr %9, align 8, !tbaa !9
  store i64 %10, ptr %1, align 8, !tbaa !5
  %11 = load i64, ptr %0, align 8, !tbaa !18
  store i64 %11, ptr %2, align 8, !tbaa !5
  store i64 0, ptr %4, align 8, !tbaa !5
  %12 = load i64, ptr %0, align 8, !tbaa !18
  %13 = load i64, ptr %9, align 8, !tbaa !9
  %14 = add nsw i64 %13, 1
  tail call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %5, i64 noundef %12, i64 noundef %14, ptr noundef %6)
  %15 = load i64, ptr %0, align 8, !tbaa !18
  %.not.not55 = icmp sgt i64 %15, 0
  br i1 %.not.not55, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %7
  %16 = getelementptr inbounds i8, ptr %5, i64 72
  %17 = getelementptr inbounds i8, ptr %0, i64 616
  br label %18

18:                                               ; preds = %.lr.ph, %18
  %.056 = phi i64 [ 0, %.lr.ph ], [ %27, %18 ]
  %19 = load ptr, ptr %16, align 8, !tbaa !19
  %20 = getelementptr inbounds ptr, ptr %19, i64 %.056
  %21 = load ptr, ptr %20, align 8, !tbaa !20
  %22 = load ptr, ptr %17, align 8, !tbaa !19
  %23 = getelementptr inbounds ptr, ptr %22, i64 %.056
  %24 = load ptr, ptr %23, align 8, !tbaa !20
  %25 = load i64, ptr %9, align 8, !tbaa !9
  %26 = tail call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %25)
  tail call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %21, i64 noundef 1, ptr noundef %24, i64 noundef 1, i64 noundef %26)
  %27 = add nuw nsw i64 %.056, 1
  %28 = load i64, ptr %0, align 8, !tbaa !18
  %.not.not = icmp slt i64 %27, %28
  br i1 %.not.not, label %18, label %._crit_edge, !llvm.loop !21

._crit_edge:                                      ; preds = %18, %7
  %.lcssa = phi i64 [ %15, %7 ], [ %28, %18 ]
  %29 = getelementptr inbounds i8, ptr %0, i64 480
  %30 = load i64, ptr %29, align 8, !tbaa !23
  %31 = load i64, ptr %9, align 8, !tbaa !9
  %32 = add nsw i64 %31, %.lcssa
  %33 = srem i64 %30, %32
  %34 = icmp eq i64 %33, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %34, ptr noundef nonnull @.str.690, ptr noundef %6)
  %35 = load i64, ptr %29, align 8, !tbaa !23
  %36 = load i64, ptr %9, align 8, !tbaa !9
  %37 = load i64, ptr %0, align 8, !tbaa !18
  %38 = add nsw i64 %37, %36
  %39 = sdiv i64 %35, %38
  store i64 %39, ptr %4, align 8, !tbaa !5
  store i64 0, ptr %8, align 8, !tbaa !5
  %40 = icmp sgt i64 %39, 0
  br i1 %40, label %41, label %.loopexit

41:                                               ; preds = %._crit_edge
  %42 = load i64, ptr %9, align 8, !tbaa !9
  %43 = load i64, ptr %0, align 8, !tbaa !18
  %reass.add = shl i64 %42, 1
  %44 = add i64 %43, %reass.add
  tail call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %3, i64 noundef %39, i64 noundef %44, ptr noundef %6)
  %45 = getelementptr inbounds i8, ptr %0, i64 24
  %46 = load i64, ptr %45, align 8, !tbaa !24
  %.not.not5457 = icmp sgt i64 %46, 0
  br i1 %.not.not5457, label %.lr.ph60, label %.loopexit

.lr.ph60:                                         ; preds = %41
  %47 = getelementptr inbounds i8, ptr %0, i64 224
  %48 = getelementptr inbounds i8, ptr %0, i64 288
  %49 = getelementptr inbounds i8, ptr %0, i64 96
  %50 = getelementptr inbounds i8, ptr %0, i64 216
  %51 = getelementptr inbounds i8, ptr %0, i64 88
  br label %52

52:                                               ; preds = %.lr.ph60, %52
  %.158 = phi i64 [ 0, %.lr.ph60 ], [ %61, %52 ]
  %53 = load i64, ptr %9, align 8, !tbaa !9
  %54 = load i64, ptr %0, align 8, !tbaa !18
  %55 = load ptr, ptr %50, align 8, !tbaa !19
  %56 = getelementptr inbounds i64, ptr %55, i64 %.158
  %57 = load i64, ptr %56, align 8, !tbaa !5
  %58 = load ptr, ptr %51, align 8, !tbaa !19
  %59 = getelementptr inbounds double, ptr %58, i64 %.158
  %60 = load double, ptr %59, align 8, !tbaa !25
  call void @_ZN11alglib_implL22rbfv2_partialunpackrecEPNS_9ae_vectorES1_S1_S1_llldPNS_9ae_matrixEPlPNS_8ae_stateE(ptr noundef nonnull %47, ptr noundef nonnull %48, ptr noundef nonnull %29, ptr noundef nonnull %49, i64 noundef %53, i64 noundef %54, i64 noundef %57, double noundef %60, ptr noundef %3, ptr noundef nonnull %8, ptr noundef %6)
  %61 = add nuw nsw i64 %.158, 1
  %62 = load i64, ptr %45, align 8, !tbaa !24
  %.not.not54 = icmp slt i64 %61, %62
  br i1 %.not.not54, label %52, label %.loopexit.loopexit, !llvm.loop !26

.loopexit.loopexit:                               ; preds = %52
  %.pre = load i64, ptr %8, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %41, %._crit_edge
  %63 = phi i64 [ %.pre, %.loopexit.loopexit ], [ 0, %41 ], [ 0, %._crit_edge ]
  %64 = load i64, ptr %4, align 8, !tbaa !5
  %65 = icmp eq i64 %64, %63
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %65, ptr noundef nonnull @.str.690, ptr noundef %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL22rbfv2_partialunpackrecEPNS_9ae_vectorES1_S1_S1_llldPNS_9ae_matrixEPlPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTSN11alglib_impl10rbfv2modelE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !11, i64 96, !11, i64 160, !11, i64 224, !11, i64 288, !11, i64 352, !11, i64 416, !11, i64 480, !15, i64 544, !16, i64 624, !6, i64 632, !16, i64 640, !6, i64 648, !17, i64 656}
!11 = !{!"_ZTSN11alglib_impl9ae_vectorE", !6, i64 0, !6, i64 8, !12, i64 16, !13, i64 24, !7, i64 56}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl9ae_matrixE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !13, i64 40, !7, i64 72}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl15rbfv2calcbufferE", !11, i64 0, !11, i64 64, !11, i64 128, !16, i64 192, !11, i64 200, !11, i64 264}
!18 = !{!10, !6, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!14, !14, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!10, !6, i64 480}
!24 = !{!10, !6, i64 24}
!25 = !{!16, !16, i64 0}
!26 = distinct !{!26, !22}


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