; LLVM IR from QiaoLiuHit/LSOTB-TIR :: vlfeat-0.9.19/vl (kmeans)

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

%union.anon = type { i64 }
%struct._VlKMeans = type { i32, i64, i64, i64, i64, i32, i32, i32, i64, double, i64, i32, ptr, ptr, double, ptr, ptr }

@vl_infinity_d = external hidden constant %union.anon, align 8
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [53 x i8], align 1

declare void @vl_free(ptr noundef) #0

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

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

declare ptr @vl_malloc(i64 noundef) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @vl_get_type_size(i32 noundef) #2

; Function Attrs: noreturn nounwind
declare void @abort() #3

; Function Attrs: nounwind uwtable
declare dso_local void @vl_kmeans_init_centers_with_rand_data(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @vl_kmeans_init_centers_plus_plus(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local double @vl_kmeans_refine_centers(ptr noundef, ptr noundef, i64 noundef) #4

; Function Attrs: nounwind uwtable
define dso_local double @vl_kmeans_cluster(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4) #4 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca double, align 8
  %13 = alloca ptr, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store i64 %3, ptr %9, align 8, !tbaa !9
  store i64 %4, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %17 = load double, ptr @vl_infinity_d, align 8, !tbaa !11
  store double %17, ptr %12, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store ptr null, ptr %13, align 8, !tbaa !5
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %18

18:                                               ; preds = %117, %5
  %19 = load i64, ptr %11, align 8, !tbaa !9
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct._VlKMeans, ptr %20, i32 0, i32 10
  %22 = load i64, ptr %21, align 8, !tbaa !14
  %23 = icmp ult i64 %19, %22
  br i1 %23, label %24, label %120

24:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._VlKMeans, ptr %25, i32 0, i32 11
  %27 = load i32, ptr %26, align 8, !tbaa !17
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %37

29:                                               ; preds = %24
  %30 = call ptr @vl_get_printf_func()
  %31 = load i64, ptr %11, align 8, !tbaa !9
  %32 = add i64 %31, 1
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct._VlKMeans, ptr %33, i32 0, i32 10
  %35 = load i64, ptr %34, align 8, !tbaa !14
  %36 = call i32 (ptr, ...) %30(ptr noundef @.str.2, i64 noundef %32, i64 noundef %35)
  br label %37

37:                                               ; preds = %29, %24
  %38 = call double @vl_get_cpu_time()
  store double %38, ptr %15, align 8, !tbaa !12
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._VlKMeans, ptr %39, i32 0, i32 5
  %41 = load i32, ptr %40, align 8, !tbaa !18
  switch i32 %41, label %54 [
    i32 0, label %42
    i32 1, label %48
  ]

42:                                               ; preds = %37
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = load i64, ptr %8, align 8, !tbaa !9
  %46 = load i64, ptr %9, align 8, !tbaa !9
  %47 = load i64, ptr %10, align 8, !tbaa !9
  call void @vl_kmeans_init_centers_with_rand_data(ptr noundef %43, ptr noundef %44, i64 noundef %45, i64 noundef %46, i64 noundef %47)
  br label %55

48:                                               ; preds = %37
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = load i64, ptr %8, align 8, !tbaa !9
  %52 = load i64, ptr %9, align 8, !tbaa !9
  %53 = load i64, ptr %10, align 8, !tbaa !9
  call void @vl_kmeans_init_centers_plus_plus(ptr noundef %49, ptr noundef %50, i64 noundef %51, i64 noundef %52, i64 noundef %53)
  br label %55

54:                                               ; preds = %37
  call void @abort() #6
  unreachable

55:                                               ; preds = %48, %42
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct._VlKMeans, ptr %56, i32 0, i32 11
  %58 = load i32, ptr %57, align 8, !tbaa !17
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %66

60:                                               ; preds = %55
  %61 = call ptr @vl_get_printf_func()
  %62 = call double @vl_get_cpu_time()
  %63 = load double, ptr %15, align 8, !tbaa !12
  %64 = fsub double %62, %63
  %65 = call i32 (ptr, ...) %61(ptr noundef @.str.3, double noundef %64)
  br label %66

66:                                               ; preds = %60, %55
  %67 = call double @vl_get_cpu_time()
  store double %67, ptr %15, align 8, !tbaa !12
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = load i64, ptr %9, align 8, !tbaa !9
  %71 = call double @vl_kmeans_refine_centers(ptr noundef %68, ptr noundef %69, i64 noundef %70)
  store double %71, ptr %14, align 8, !tbaa !12
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._VlKMeans, ptr %72, i32 0, i32 11
  %74 = load i32, ptr %73, align 8, !tbaa !17
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %83

76:                                               ; preds = %66
  %77 = call ptr @vl_get_printf_func()
  %78 = call double @vl_get_cpu_time()
  %79 = load double, ptr %15, align 8, !tbaa !12
  %80 = fsub double %78, %79
  %81 = load double, ptr %14, align 8, !tbaa !12
  %82 = call i32 (ptr, ...) %77(ptr noundef @.str.4, double noundef %80, double noundef %81)
  br label %83

83:                                               ; preds = %76, %66
  %84 = load double, ptr %14, align 8, !tbaa !12
  %85 = load double, ptr %12, align 8, !tbaa !12
  %86 = fcmp olt double %84, %85
  br i1 %86, label %90, label %87

87:                                               ; preds = %83
  %88 = load i64, ptr %11, align 8, !tbaa !9
  %89 = icmp eq i64 %88, 0
  br i1 %89, label %90, label %116

90:                                               ; preds = %87, %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %91 = load double, ptr %14, align 8, !tbaa !12
  store double %91, ptr %12, align 8, !tbaa !12
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  %93 = icmp eq ptr %92, null
  br i1 %93, label %94, label %108

94:                                               ; preds = %90
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._VlKMeans, ptr %95, i32 0, i32 0
  %97 = load i32, ptr %96, align 8, !tbaa !19
  %98 = call i64 @vl_get_type_size(i32 noundef %97)
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct._VlKMeans, ptr %99, i32 0, i32 1
  %101 = load i64, ptr %100, align 8, !tbaa !20
  %102 = mul i64 %98, %101
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct._VlKMeans, ptr %103, i32 0, i32 2
  %105 = load i64, ptr %104, align 8, !tbaa !21
  %106 = mul i64 %102, %105
  %107 = call ptr @vl_malloc(i64 noundef %106)
  store ptr %107, ptr %13, align 8, !tbaa !5
  br label %108

108:                                              ; preds = %94, %90
  %109 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %109, ptr %16, align 8, !tbaa !5
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._VlKMeans, ptr %110, i32 0, i32 12
  %112 = load ptr, ptr %111, align 8, !tbaa !22
  store ptr %112, ptr %13, align 8, !tbaa !5
  %113 = load ptr, ptr %16, align 8, !tbaa !5
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct._VlKMeans, ptr %114, i32 0, i32 12
  store ptr %113, ptr %115, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %116

116:                                              ; preds = %108, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %117

117:                                              ; preds = %116
  %118 = load i64, ptr %11, align 8, !tbaa !9
  %119 = add i64 %118, 1
  store i64 %119, ptr %11, align 8, !tbaa !9
  br label %18, !llvm.loop !23

120:                                              ; preds = %18
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._VlKMeans, ptr %121, i32 0, i32 12
  %123 = load ptr, ptr %122, align 8, !tbaa !22
  call void @vl_free(ptr noundef %123)
  %124 = load ptr, ptr %13, align 8, !tbaa !5
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct._VlKMeans, ptr %125, i32 0, i32 12
  store ptr %124, ptr %126, align 8, !tbaa !22
  %127 = load double, ptr %12, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  ret double %127
}

declare ptr @vl_get_printf_func() #0

declare double @vl_get_cpu_time() #0

attributes #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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint nounwind 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 = { noreturn nounwind "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 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 #5 = { nounwind }
attributes #6 = { noreturn 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!15, !10, i64 72}
!15 = !{!"_VlKMeans", !16, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !16, i64 40, !16, i64 44, !16, i64 48, !10, i64 56, !13, i64 64, !10, i64 72, !16, i64 80, !6, i64 88, !6, i64 96, !13, i64 104, !6, i64 112, !6, i64 120}
!16 = !{!"int", !7, i64 0}
!17 = !{!15, !16, i64 80}
!18 = !{!15, !16, i64 40}
!19 = !{!15, !16, i64 0}
!20 = !{!15, !10, i64 8}
!21 = !{!15, !10, i64 16}
!22 = !{!15, !6, i64 88}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


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

%union.anon = type { i64 }

@vl_infinity_d = external hidden local_unnamed_addr constant %union.anon, align 8
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [53 x i8], align 1

declare void @vl_free(ptr noundef) local_unnamed_addr #0

declare ptr @vl_malloc(i64 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @vl_get_type_size(i32 noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @vl_kmeans_init_centers_with_rand_data(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @vl_kmeans_init_centers_plus_plus(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local double @vl_kmeans_refine_centers(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local double @vl_kmeans_cluster(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4) local_unnamed_addr #3 {
  %6 = load double, ptr @vl_infinity_d, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 72
  %8 = load i64, ptr %7, align 8, !tbaa !8
  %.not52 = icmp eq i64 %8, 0
  br i1 %.not52, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %5
  %9 = getelementptr inbounds i8, ptr %0, i64 80
  %10 = getelementptr inbounds i8, ptr %0, i64 40
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = getelementptr inbounds i8, ptr %0, i64 88
  %14 = load i32, ptr %9, align 8, !tbaa !14
  %.not.peel = icmp eq i32 %14, 0
  br i1 %.not.peel, label %19, label %15

15:                                               ; preds = %.lr.ph
  %16 = tail call ptr @vl_get_printf_func() #4
  %17 = load i64, ptr %7, align 8, !tbaa !8
  %18 = tail call i32 (ptr, ...) %16(ptr noundef nonnull @.str.2, i64 noundef 1, i64 noundef %17) #4
  br label %19

19:                                               ; preds = %15, %.lr.ph
  %20 = tail call double @vl_get_cpu_time() #4
  %21 = load i32, ptr %10, align 8, !tbaa !15
  switch i32 %21, label %.loopexit [
    i32 0, label %23
    i32 1, label %22
  ]

22:                                               ; preds = %19
  tail call void @vl_kmeans_init_centers_plus_plus(ptr noundef nonnull %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4)
  br label %24

23:                                               ; preds = %19
  tail call void @vl_kmeans_init_centers_with_rand_data(ptr noundef nonnull %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4)
  br label %24

24:                                               ; preds = %23, %22
  %25 = load i32, ptr %9, align 8, !tbaa !14
  %.not44.peel = icmp eq i32 %25, 0
  br i1 %.not44.peel, label %31, label %26

26:                                               ; preds = %24
  %27 = tail call ptr @vl_get_printf_func() #4
  %28 = tail call double @vl_get_cpu_time() #4
  %29 = fsub double %28, %20
  %30 = tail call i32 (ptr, ...) %27(ptr noundef nonnull @.str.3, double noundef %29) #4
  br label %31

31:                                               ; preds = %26, %24
  %32 = tail call double @vl_get_cpu_time() #4
  %33 = tail call double @vl_kmeans_refine_centers(ptr noundef nonnull %0, ptr noundef %1, i64 noundef %3)
  %34 = load i32, ptr %9, align 8, !tbaa !14
  %.not45.peel = icmp eq i32 %34, 0
  br i1 %.not45.peel, label %40, label %35

35:                                               ; preds = %31
  %36 = tail call ptr @vl_get_printf_func() #4
  %37 = tail call double @vl_get_cpu_time() #4
  %38 = fsub double %37, %32
  %39 = tail call i32 (ptr, ...) %36(ptr noundef nonnull @.str.4, double noundef %38, double noundef %33) #4
  br label %40

40:                                               ; preds = %35, %31
  %41 = load i32, ptr %0, align 8, !tbaa !16
  %42 = tail call i64 @vl_get_type_size(i32 noundef %41)
  %43 = load i64, ptr %11, align 8, !tbaa !17
  %44 = mul i64 %43, %42
  %45 = load i64, ptr %12, align 8, !tbaa !18
  %46 = mul i64 %44, %45
  %47 = tail call ptr @vl_malloc(i64 noundef %46) #4
  %48 = load ptr, ptr %13, align 8, !tbaa !19
  store ptr %47, ptr %13, align 8, !tbaa !19
  %49 = load i64, ptr %7, align 8, !tbaa !8
  %50 = icmp ugt i64 %49, 1
  br i1 %50, label %.peel.next, label %._crit_edge

.peel.next:                                       ; preds = %40, %92
  %.050 = phi i64 [ %93, %92 ], [ 1, %40 ]
  %.04149 = phi double [ %.1, %92 ], [ %33, %40 ]
  %.04248 = phi ptr [ %.2, %92 ], [ %48, %40 ]
  %51 = load i32, ptr %9, align 8, !tbaa !14
  %.not = icmp eq i32 %51, 0
  br i1 %.not, label %57, label %52

52:                                               ; preds = %.peel.next
  %53 = tail call ptr @vl_get_printf_func() #4
  %54 = add nuw i64 %.050, 1
  %55 = load i64, ptr %7, align 8, !tbaa !8
  %56 = tail call i32 (ptr, ...) %53(ptr noundef nonnull @.str.2, i64 noundef %54, i64 noundef %55) #4
  br label %57

57:                                               ; preds = %52, %.peel.next
  %58 = tail call double @vl_get_cpu_time() #4
  %59 = load i32, ptr %10, align 8, !tbaa !15
  switch i32 %59, label %.loopexit [
    i32 0, label %60
    i32 1, label %61
  ]

60:                                               ; preds = %57
  tail call void @vl_kmeans_init_centers_with_rand_data(ptr noundef nonnull %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4)
  br label %62

61:                                               ; preds = %57
  tail call void @vl_kmeans_init_centers_plus_plus(ptr noundef nonnull %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4)
  br label %62

.loopexit:                                        ; preds = %57, %19
  tail call void @abort() #5
  unreachable

62:                                               ; preds = %61, %60
  %63 = load i32, ptr %9, align 8, !tbaa !14
  %.not44 = icmp eq i32 %63, 0
  br i1 %.not44, label %69, label %64

64:                                               ; preds = %62
  %65 = tail call ptr @vl_get_printf_func() #4
  %66 = tail call double @vl_get_cpu_time() #4
  %67 = fsub double %66, %58
  %68 = tail call i32 (ptr, ...) %65(ptr noundef nonnull @.str.3, double noundef %67) #4
  br label %69

69:                                               ; preds = %64, %62
  %70 = tail call double @vl_get_cpu_time() #4
  %71 = tail call double @vl_kmeans_refine_centers(ptr noundef nonnull %0, ptr noundef %1, i64 noundef %3)
  %72 = load i32, ptr %9, align 8, !tbaa !14
  %.not45 = icmp eq i32 %72, 0
  br i1 %.not45, label %78, label %73

73:                                               ; preds = %69
  %74 = tail call ptr @vl_get_printf_func() #4
  %75 = tail call double @vl_get_cpu_time() #4
  %76 = fsub double %75, %70
  %77 = tail call i32 (ptr, ...) %74(ptr noundef nonnull @.str.4, double noundef %76, double noundef %71) #4
  br label %78

78:                                               ; preds = %73, %69
  %79 = fcmp olt double %71, %.04149
  br i1 %79, label %80, label %92

80:                                               ; preds = %78
  %81 = icmp eq ptr %.04248, null
  br i1 %81, label %82, label %90

82:                                               ; preds = %80
  %83 = load i32, ptr %0, align 8, !tbaa !16
  %84 = tail call i64 @vl_get_type_size(i32 noundef %83)
  %85 = load i64, ptr %11, align 8, !tbaa !17
  %86 = mul i64 %85, %84
  %87 = load i64, ptr %12, align 8, !tbaa !18
  %88 = mul i64 %86, %87
  %89 = tail call ptr @vl_malloc(i64 noundef %88) #4
  br label %90

90:                                               ; preds = %82, %80
  %.143 = phi ptr [ %89, %82 ], [ %.04248, %80 ]
  %91 = load ptr, ptr %13, align 8, !tbaa !19
  store ptr %.143, ptr %13, align 8, !tbaa !19
  br label %92

92:                                               ; preds = %78, %90
  %.2 = phi ptr [ %91, %90 ], [ %.04248, %78 ]
  %.1 = phi double [ %71, %90 ], [ %.04149, %78 ]
  %93 = add nuw i64 %.050, 1
  %94 = load i64, ptr %7, align 8, !tbaa !8
  %95 = icmp ult i64 %93, %94
  br i1 %95, label %.peel.next, label %._crit_edge, !llvm.loop !20

._crit_edge:                                      ; preds = %92, %40, %5
  %.042.lcssa = phi ptr [ null, %5 ], [ %48, %40 ], [ %.2, %92 ]
  %.041.lcssa = phi double [ %6, %5 ], [ %33, %40 ], [ %.1, %92 ]
  %96 = getelementptr inbounds i8, ptr %0, i64 88
  %97 = load ptr, ptr %96, align 8, !tbaa !19
  tail call void @vl_free(ptr noundef %97) #4
  store ptr %.042.lcssa, ptr %96, align 8, !tbaa !19
  ret double %.041.lcssa
}

declare ptr @vl_get_printf_func() local_unnamed_addr #0

declare double @vl_get_cpu_time() local_unnamed_addr #0

attributes #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 #1 = { inlinehint nounwind 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 = { noreturn nounwind "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 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 }
attributes #5 = { noreturn 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/C++ TBAA"}
!8 = !{!9, !11, i64 72}
!9 = !{!"_VlKMeans", !10, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !11, i64 56, !12, i64 64, !11, i64 72, !10, i64 80, !13, i64 88, !13, i64 96, !12, i64 104, !13, i64 112, !13, i64 120}
!10 = !{!"int", !6, i64 0}
!11 = !{!"long long", !6, i64 0}
!12 = !{!"double", !6, i64 0}
!13 = !{!"any pointer", !6, i64 0}
!14 = !{!9, !10, i64 80}
!15 = !{!9, !10, i64 40}
!16 = !{!9, !10, i64 0}
!17 = !{!9, !11, i64 8}
!18 = !{!9, !11, i64 16}
!19 = !{!9, !13, i64 88}
!20 = distinct !{!20, !21, !22}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass