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

; 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_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::clusterizerstate" = type { i64, i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", i64, i64, i64, i64, i8, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::apbuffers", %"struct.alglib_impl::kmeansbuffers" }
%"struct.alglib_impl::apbuffers" = type { %"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_vector", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix" }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::kmeansbuffers" = type { %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::apbuffers", %"struct.alglib_impl::ae_shared_pool" }
%"struct.alglib_impl::ae_shared_pool" = type { %"struct.alglib_impl::ae_lock", ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_lock" = type { ptr, %"struct.alglib_impl::ae_dyn_block", i8 }
%"struct.alglib_impl::kmeansreport" = type { i64, i64, i64, i64, double, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector" }

@.str.410 = external hidden unnamed_addr constant [26 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl20clusterizerrunkmeansEPNS_16clusterizerstateElPNS_12kmeansreportEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %10) #4
  %12 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %12, ptr noundef %9)
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 80, i1 false)
  %13 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN11alglib_impl19_kmeansreport_clearEPv(ptr noundef %13)
  %14 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %10, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %14, i1 noundef zeroext true)
  %15 = load i64, ptr %6, align 8, !tbaa !9
  %16 = icmp sge i64 %15, 0
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef @.str.410, ptr noundef %17)
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %18, i32 0, i32 2
  %20 = load i64, ptr %19, align 8, !tbaa !11
  %21 = icmp ne i64 %20, 2
  br i1 %21, label %22, label %38

22:                                               ; preds = %4
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %23, i32 0, i32 0
  %25 = load i64, ptr %24, align 8, !tbaa !21
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %26, i32 0, i32 0
  store i64 %25, ptr %27, align 8, !tbaa !22
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %28, i32 0, i32 2
  store i64 -5, ptr %29, align 8, !tbaa !25
  %30 = load i64, ptr %6, align 8, !tbaa !9
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %31, i32 0, i32 5
  store i64 %30, ptr %32, align 8, !tbaa !26
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %33, i32 0, i32 3
  store i64 0, ptr %34, align 8, !tbaa !27
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %35, i32 0, i32 4
  store double 0.000000e+00, ptr %36, align 8, !tbaa !28
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %37)
  store i32 1, ptr %11, align 4
  br label %149

38:                                               ; preds = %4
  %39 = load i64, ptr %6, align 8, !tbaa !9
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %40, i32 0, i32 0
  %42 = load i64, ptr %41, align 8, !tbaa !21
  %43 = icmp sgt i64 %39, %42
  br i1 %43, label %52, label %44

44:                                               ; preds = %38
  %45 = load i64, ptr %6, align 8, !tbaa !9
  %46 = icmp eq i64 %45, 0
  br i1 %46, label %47, label %68

47:                                               ; preds = %44
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %48, i32 0, i32 0
  %50 = load i64, ptr %49, align 8, !tbaa !21
  %51 = icmp sgt i64 %50, 0
  br i1 %51, label %52, label %68

52:                                               ; preds = %47, %38
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %53, i32 0, i32 0
  %55 = load i64, ptr %54, align 8, !tbaa !21
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %56, i32 0, i32 0
  store i64 %55, ptr %57, align 8, !tbaa !22
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %58, i32 0, i32 2
  store i64 -3, ptr %59, align 8, !tbaa !25
  %60 = load i64, ptr %6, align 8, !tbaa !9
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %61, i32 0, i32 5
  store i64 %60, ptr %62, align 8, !tbaa !26
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %63, i32 0, i32 3
  store i64 0, ptr %64, align 8, !tbaa !27
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %65, i32 0, i32 4
  store double 0.000000e+00, ptr %66, align 8, !tbaa !28
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %67)
  store i32 1, ptr %11, align 4
  br label %149

68:                                               ; preds = %47, %44
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %69, i32 0, i32 0
  %71 = load i64, ptr %70, align 8, !tbaa !21
  %72 = icmp eq i64 %71, 0
  br i1 %72, label %73, label %86

73:                                               ; preds = %68
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %74, i32 0, i32 0
  store i64 0, ptr %75, align 8, !tbaa !22
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %76, i32 0, i32 2
  store i64 1, ptr %77, align 8, !tbaa !25
  %78 = load i64, ptr %6, align 8, !tbaa !9
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %79, i32 0, i32 5
  store i64 %78, ptr %80, align 8, !tbaa !26
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %81, i32 0, i32 3
  store i64 0, ptr %82, align 8, !tbaa !27
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %83, i32 0, i32 4
  store double 0.000000e+00, ptr %84, align 8, !tbaa !28
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %85)
  store i32 1, ptr %11, align 4
  br label %149

86:                                               ; preds = %68
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %87, i32 0, i32 0
  %89 = load i64, ptr %88, align 8, !tbaa !21
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %90, i32 0, i32 0
  store i64 %89, ptr %91, align 8, !tbaa !22
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %92, i32 0, i32 1
  %94 = load i64, ptr %93, align 8, !tbaa !29
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %95, i32 0, i32 1
  store i64 %94, ptr %96, align 8, !tbaa !30
  %97 = load i64, ptr %6, align 8, !tbaa !9
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %98, i32 0, i32 5
  store i64 %97, ptr %99, align 8, !tbaa !26
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %100, i32 0, i32 0
  %102 = load i64, ptr %101, align 8, !tbaa !21
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %103, i32 0, i32 0
  store i64 %102, ptr %104, align 8, !tbaa !22
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %105, i32 0, i32 1
  %107 = load i64, ptr %106, align 8, !tbaa !29
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %108, i32 0, i32 1
  store i64 %107, ptr %109, align 8, !tbaa !30
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %110, i32 0, i32 3
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %112, i32 0, i32 0
  %114 = load i64, ptr %113, align 8, !tbaa !21
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %115, i32 0, i32 1
  %117 = load i64, ptr %116, align 8, !tbaa !29
  %118 = load i64, ptr %6, align 8, !tbaa !9
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %119, i32 0, i32 8
  %121 = load i64, ptr %120, align 8, !tbaa !31
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %122, i32 0, i32 10
  %124 = load i64, ptr %123, align 8, !tbaa !32
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %125, i32 0, i32 7
  %127 = load i64, ptr %126, align 8, !tbaa !33
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %128, i32 0, i32 6
  %130 = load i64, ptr %129, align 8, !tbaa !34
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %131, i32 0, i32 9
  %133 = load i8, ptr %132, align 8, !tbaa !35, !range !36, !noundef !37
  %134 = trunc i8 %133 to i1
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %135, i32 0, i32 2
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %137, i32 0, i32 3
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %139, i32 0, i32 6
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %141, i32 0, i32 7
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.alglib_impl::kmeansreport", ptr %143, i32 0, i32 4
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.alglib_impl::clusterizerstate", ptr %145, i32 0, i32 13
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl22kmeansgenerateinternalEPNS_9ae_matrixElllllllbPlS2_S1_bS1_bPNS_9ae_vectorEPdPNS_13kmeansbuffersEPNS_8ae_stateE(ptr noundef %111, i64 noundef %114, i64 noundef %117, i64 noundef %118, i64 noundef %121, i64 noundef %124, i64 noundef %127, i64 noundef %130, i1 noundef zeroext %134, ptr noundef %136, ptr noundef %138, ptr noundef %10, i1 noundef zeroext false, ptr noundef %140, i1 noundef zeroext true, ptr noundef %142, ptr noundef %144, ptr noundef %146, ptr noundef %147)
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %148)
  store i32 0, ptr %11, align 4
  br label %149

149:                                              ; preds = %86, %73, %52, %22
  call void @llvm.lifetime.end.p0(i64 80, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  %150 = load i32, ptr %11, align 4
  switch i32 %150, label %152 [
    i32 0, label %151
    i32 1, label %151
  ]

151:                                              ; preds = %149, %149
  ret void

152:                                              ; preds = %149
  unreachable
}

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl19_kmeansreport_clearEPv(ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl22kmeansgenerateinternalEPNS_9ae_matrixElllllllbPlS2_S1_bS1_bPNS_9ae_vectorEPdPNS_13kmeansbuffersEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 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 #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 = !{!12, !10, i64 16}
!12 = !{!"_ZTSN11alglib_impl16clusterizerstateE", !10, i64 0, !10, i64 8, !10, i64 16, !13, i64 24, !13, i64 104, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !14, i64 216, !10, i64 224, !13, i64 232, !16, i64 312, !18, i64 1048}
!13 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !14, i64 32, !15, i64 40, !7, i64 72}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!"_ZTSN11alglib_impl9apbuffersE", !17, i64 0, !17, i64 64, !17, i64 128, !17, i64 192, !17, i64 256, !17, i64 320, !17, i64 384, !17, i64 448, !17, i64 512, !13, i64 576, !13, i64 656}
!17 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !14, i64 16, !15, i64 24, !7, i64 56}
!18 = !{!"_ZTSN11alglib_impl13kmeansbuffersE", !13, i64 0, !13, i64 80, !17, i64 160, !17, i64 224, !17, i64 288, !17, i64 352, !16, i64 416, !19, i64 1152}
!19 = !{!"_ZTSN11alglib_impl14ae_shared_poolE", !20, i64 0, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !10, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !15, i64 112}
!20 = !{!"_ZTSN11alglib_impl7ae_lockE", !6, i64 0, !15, i64 8, !14, i64 40}
!21 = !{!12, !10, i64 0}
!22 = !{!23, !10, i64 0}
!23 = !{!"_ZTSN11alglib_impl12kmeansreportE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !24, i64 32, !10, i64 40, !13, i64 48, !17, i64 128}
!24 = !{!"double", !7, i64 0}
!25 = !{!23, !10, i64 16}
!26 = !{!23, !10, i64 40}
!27 = !{!23, !10, i64 24}
!28 = !{!23, !24, i64 32}
!29 = !{!12, !10, i64 8}
!30 = !{!23, !10, i64 8}
!31 = !{!12, !10, i64 208}
!32 = !{!12, !10, i64 224}
!33 = !{!12, !10, i64 200}
!34 = !{!12, !10, i64 192}
!35 = !{!12, !14, i64 216}
!36 = !{i8 0, i8 2}
!37 = !{}


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

@.str.410 = external hidden unnamed_addr constant [26 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl20clusterizerrunkmeansEPNS_16clusterizerstateElPNS_12kmeansreportEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #3 {
  %5 = alloca %"struct.alglib_impl::ae_frame", align 8
  %6 = alloca %"struct.alglib_impl::ae_matrix", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %3, ptr noundef nonnull %5)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %6, i8 0, i64 80, i1 false)
  call void @_ZN11alglib_impl19_kmeansreport_clearEPv(ptr noundef %2)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %6, i64 noundef 0, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  %7 = icmp sgt i64 %1, -1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %7, ptr noundef nonnull @.str.410, ptr noundef %3)
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %.not = icmp eq i64 %9, 2
  %10 = load i64, ptr %0, align 8, !tbaa !19
  br i1 %.not, label %15, label %11

11:                                               ; preds = %4
  store i64 %10, ptr %2, align 8, !tbaa !20
  %12 = getelementptr inbounds i8, ptr %2, i64 16
  store i64 -5, ptr %12, align 8, !tbaa !23
  %13 = getelementptr inbounds i8, ptr %2, i64 40
  store i64 %1, ptr %13, align 8, !tbaa !24
  %14 = getelementptr inbounds i8, ptr %2, i64 24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %14, i8 0, i64 16, i1 false)
  br label %52

15:                                               ; preds = %4
  %16 = icmp slt i64 %10, %1
  br i1 %16, label %20, label %17

17:                                               ; preds = %15
  %18 = icmp eq i64 %1, 0
  %19 = icmp sgt i64 %10, 0
  %or.cond = and i1 %18, %19
  br i1 %or.cond, label %20, label %24

20:                                               ; preds = %17, %15
  store i64 %10, ptr %2, align 8, !tbaa !20
  %21 = getelementptr inbounds i8, ptr %2, i64 16
  store i64 -3, ptr %21, align 8, !tbaa !23
  %22 = getelementptr inbounds i8, ptr %2, i64 40
  store i64 %1, ptr %22, align 8, !tbaa !24
  %23 = getelementptr inbounds i8, ptr %2, i64 24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %23, i8 0, i64 16, i1 false)
  br label %52

24:                                               ; preds = %17
  %25 = icmp eq i64 %10, 0
  %26 = getelementptr inbounds i8, ptr %2, i64 40
  br i1 %25, label %27, label %30

27:                                               ; preds = %24
  store i64 0, ptr %2, align 8, !tbaa !20
  %28 = getelementptr inbounds i8, ptr %2, i64 16
  store i64 1, ptr %28, align 8, !tbaa !23
  store i64 %1, ptr %26, align 8, !tbaa !24
  %29 = getelementptr inbounds i8, ptr %2, i64 24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %29, i8 0, i64 16, i1 false)
  br label %52

30:                                               ; preds = %24
  %31 = getelementptr inbounds i8, ptr %0, i64 8
  %32 = load i64, ptr %31, align 8, !tbaa !25
  %33 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 %1, ptr %26, align 8, !tbaa !24
  store i64 %10, ptr %2, align 8, !tbaa !20
  store i64 %32, ptr %33, align 8, !tbaa !26
  %34 = getelementptr inbounds i8, ptr %0, i64 24
  %35 = getelementptr inbounds i8, ptr %0, i64 208
  %36 = load i64, ptr %35, align 8, !tbaa !27
  %37 = getelementptr inbounds i8, ptr %0, i64 224
  %38 = load i64, ptr %37, align 8, !tbaa !28
  %39 = getelementptr inbounds i8, ptr %0, i64 200
  %40 = load i64, ptr %39, align 8, !tbaa !29
  %41 = getelementptr inbounds i8, ptr %0, i64 192
  %42 = load i64, ptr %41, align 8, !tbaa !30
  %43 = getelementptr inbounds i8, ptr %0, i64 216
  %44 = load i8, ptr %43, align 8, !tbaa !31, !range !32, !noundef !33
  %45 = trunc nuw i8 %44 to i1
  %46 = getelementptr inbounds i8, ptr %2, i64 16
  %47 = getelementptr inbounds i8, ptr %2, i64 24
  %48 = getelementptr inbounds i8, ptr %2, i64 48
  %49 = getelementptr inbounds i8, ptr %2, i64 128
  %50 = getelementptr inbounds i8, ptr %2, i64 32
  %51 = getelementptr inbounds i8, ptr %0, i64 1048
  call void @_ZN11alglib_impl22kmeansgenerateinternalEPNS_9ae_matrixElllllllbPlS2_S1_bS1_bPNS_9ae_vectorEPdPNS_13kmeansbuffersEPNS_8ae_stateE(ptr noundef nonnull %34, i64 noundef %10, i64 noundef %32, i64 noundef %1, i64 noundef %36, i64 noundef %38, i64 noundef %40, i64 noundef %42, i1 noundef zeroext %45, ptr noundef nonnull %46, ptr noundef nonnull %47, ptr noundef nonnull %6, i1 noundef zeroext false, ptr noundef nonnull %48, i1 noundef zeroext true, ptr noundef nonnull %49, ptr noundef nonnull %50, ptr noundef nonnull %51, ptr noundef %3)
  br label %52

52:                                               ; preds = %30, %27, %20, %11
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  ret void
}

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl19_kmeansreport_clearEPv(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl22kmeansgenerateinternalEPNS_9ae_matrixElllllllbPlS2_S1_bS1_bPNS_9ae_vectorEPdPNS_13kmeansbuffersEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 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 #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, !7, i64 16}
!6 = !{!"_ZTSN11alglib_impl16clusterizerstateE", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 104, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !11, i64 216, !7, i64 224, !10, i64 232, !14, i64 312, !16, i64 1048}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !12, i64 40, !8, i64 72}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"_ZTSN11alglib_impl9apbuffersE", !15, i64 0, !15, i64 64, !15, i64 128, !15, i64 192, !15, i64 256, !15, i64 320, !15, i64 384, !15, i64 448, !15, i64 512, !10, i64 576, !10, i64 656}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !8, i64 56}
!16 = !{!"_ZTSN11alglib_impl13kmeansbuffersE", !10, i64 0, !10, i64 80, !15, i64 160, !15, i64 224, !15, i64 288, !15, i64 352, !14, i64 416, !17, i64 1152}
!17 = !{!"_ZTSN11alglib_impl14ae_shared_poolE", !18, i64 0, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !7, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !12, i64 112}
!18 = !{!"_ZTSN11alglib_impl7ae_lockE", !13, i64 0, !12, i64 8, !11, i64 40}
!19 = !{!6, !7, i64 0}
!20 = !{!21, !7, i64 0}
!21 = !{!"_ZTSN11alglib_impl12kmeansreportE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !22, i64 32, !7, i64 40, !10, i64 48, !15, i64 128}
!22 = !{!"double", !8, i64 0}
!23 = !{!21, !7, i64 16}
!24 = !{!21, !7, i64 40}
!25 = !{!6, !7, i64 8}
!26 = !{!21, !7, i64 8}
!27 = !{!6, !7, i64 208}
!28 = !{!6, !7, i64 224}
!29 = !{!6, !7, i64 200}
!30 = !{!6, !7, i64 192}
!31 = !{!6, !11, i64 216}
!32 = !{i8 0, i8 2}
!33 = !{}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass