; LLVM IR from Overload-Technologies/Overload :: Dependencies/assimp/code/Common/SpatialSort.ll (ZN6Assimp11SpatialSort8FinalizeEv)

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

%class.aiVector3t = type { float, float, float }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.Assimp::SpatialSort" = type <{ %class.aiVector3t, %class.aiVector3t, %"class.std::vector", i8, [7 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Assimp::SpatialSort::Entry, std::allocator<Assimp::SpatialSort::Entry>>::_Vector_impl" }
%"struct.std::_Vector_base<Assimp::SpatialSort::Entry, std::allocator<Assimp::SpatialSort::Entry>>::_Vector_impl" = type { %"struct.std::_Vector_base<Assimp::SpatialSort::Entry, std::allocator<Assimp::SpatialSort::Entry>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Assimp::SpatialSort::Entry, std::allocator<Assimp::SpatialSort::Entry>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.Assimp::SpatialSort::Entry" = type { i32, %class.aiVector3t, float }

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK6Assimp11SpatialSort17CalculateDistanceERK10aiVector3tIfE(ptr noundef nonnull align 8 dereferenceable(49), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Assimp11SpatialSort8FinalizeEv(ptr noundef nonnull align 8 dereferenceable(49) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca float, align 4
  %4 = alloca i32, align 4
  %5 = alloca %class.aiVector3t, align 4
  %6 = alloca { <2 x float>, float }, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %11 = getelementptr inbounds %"class.Assimp::SpatialSort", ptr %10, i32 0, i32 2
  %12 = call noundef i64 @_ZNKSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  %13 = uitofp i64 %12 to float
  %14 = fdiv float 1.000000e+00, %13
  store float %14, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !11
  br label %15

15:                                               ; preds = %32, %1
  %16 = load i32, ptr %4, align 4, !tbaa !11
  %17 = zext i32 %16 to i64
  %18 = getelementptr inbounds %"class.Assimp::SpatialSort", ptr %10, i32 0, i32 2
  %19 = call noundef i64 @_ZNKSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  %20 = icmp ult i64 %17, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %35

22:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 12, ptr %5) #6
  %23 = load float, ptr %3, align 4, !tbaa !9
  %24 = getelementptr inbounds %"class.Assimp::SpatialSort", ptr %10, i32 0, i32 2
  %25 = load i32, ptr %4, align 4, !tbaa !11
  %26 = zext i32 %25 to i64
  %27 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %26) #6
  %28 = getelementptr inbounds %"struct.Assimp::SpatialSort::Entry", ptr %27, i32 0, i32 1
  %29 = call { <2 x float>, float } @_ZmlIfE10aiVector3tIT_ES1_RKS2_(float noundef %23, ptr noundef nonnull align 4 dereferenceable(12) %28)
  store { <2 x float>, float } %29, ptr %6, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 8 %6, i64 12, i1 false)
  %30 = getelementptr inbounds %"class.Assimp::SpatialSort", ptr %10, i32 0, i32 1
  %31 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN10aiVector3tIfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.end.p0(i64 12, ptr %5) #6
  br label %32

32:                                               ; preds = %22
  %33 = load i32, ptr %4, align 4, !tbaa !11
  %34 = add i32 %33, 1
  store i32 %34, ptr %4, align 4, !tbaa !11
  br label %15, !llvm.loop !13

35:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !11
  br label %36

36:                                               ; preds = %55, %35
  %37 = load i32, ptr %7, align 4, !tbaa !11
  %38 = zext i32 %37 to i64
  %39 = getelementptr inbounds %"class.Assimp::SpatialSort", ptr %10, i32 0, i32 2
  %40 = call noundef i64 @_ZNKSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #6
  %41 = icmp ult i64 %38, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %58

43:                                               ; preds = %36
  %44 = getelementptr inbounds %"class.Assimp::SpatialSort", ptr %10, i32 0, i32 2
  %45 = load i32, ptr %7, align 4, !tbaa !11
  %46 = zext i32 %45 to i64
  %47 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %46) #6
  %48 = getelementptr inbounds %"struct.Assimp::SpatialSort::Entry", ptr %47, i32 0, i32 1
  %49 = call noundef float @_ZNK6Assimp11SpatialSort17CalculateDistanceERK10aiVector3tIfE(ptr noundef nonnull align 8 dereferenceable(49) %10, ptr noundef nonnull align 4 dereferenceable(12) %48)
  %50 = getelementptr inbounds %"class.Assimp::SpatialSort", ptr %10, i32 0, i32 2
  %51 = load i32, ptr %7, align 4, !tbaa !11
  %52 = zext i32 %51 to i64
  %53 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %52) #6
  %54 = getelementptr inbounds %"struct.Assimp::SpatialSort::Entry", ptr %53, i32 0, i32 2
  store float %49, ptr %54, align 4, !tbaa !15
  br label %55

55:                                               ; preds = %43
  %56 = load i32, ptr %7, align 4, !tbaa !11
  %57 = add i32 %56, 1
  store i32 %57, ptr %7, align 4, !tbaa !11
  br label %36, !llvm.loop !18

58:                                               ; preds = %42
  %59 = getelementptr inbounds %"class.Assimp::SpatialSort", ptr %10, i32 0, i32 2
  %60 = call ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %59) #6
  %61 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %60, ptr %61, align 8
  %62 = getelementptr inbounds %"class.Assimp::SpatialSort", ptr %10, i32 0, i32 2
  %63 = call ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %62) #6
  %64 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %63, ptr %64, align 8
  %65 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8
  %67 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN6Assimp11SpatialSort5EntryESt6vectorIS4_SaIS4_EEEEEvT_SA_(ptr %66, ptr %68)
  %69 = getelementptr inbounds %"class.Assimp::SpatialSort", ptr %10, i32 0, i32 3
  store i8 1, ptr %69, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZmlIfE10aiVector3tIT_ES1_RKS2_(float noundef, ptr noundef nonnull align 4 dereferenceable(12)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN10aiVector3tIfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN6Assimp11SpatialSort5EntryESt6vectorIS4_SaIS4_EEEEEvT_SA_(ptr, ptr) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress 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 = { inlinehint 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 #5 = { inlinehint mustprogress 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 #6 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !10, i64 16}
!16 = !{!"_ZTSN6Assimp11SpatialSort5EntryE", !12, i64 0, !17, i64 4, !10, i64 16}
!17 = !{!"_ZTS10aiVector3tIfE", !10, i64 0, !10, i64 4, !10, i64 8}
!18 = distinct !{!18, !14}
!19 = !{!20, !25, i64 48}
!20 = !{!"_ZTSN6Assimp11SpatialSortE", !17, i64 0, !17, i64 12, !21, i64 24, !25, i64 48}
!21 = !{!"_ZTSSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN6Assimp11SpatialSort5EntryESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN6Assimp11SpatialSort5EntryESaIS2_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN6Assimp11SpatialSort5EntryESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"bool", !7, i64 0}


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

%class.aiVector3t = type { float, float, float }

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK6Assimp11SpatialSort17CalculateDistanceERK10aiVector3tIfE(ptr noundef nonnull align 8 dereferenceable(49), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Assimp11SpatialSort8FinalizeEv(ptr noundef nonnull align 8 dereferenceable(49) %0) local_unnamed_addr #0 align 2 {
  %2 = alloca %class.aiVector3t, align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 24
  %4 = tail call noundef i64 @_ZNKSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %5 = uitofp i64 %4 to float
  %6 = fdiv float 1.000000e+00, %5
  %7 = tail call noundef i64 @_ZNKSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %.not = icmp eq i64 %7, 0
  br i1 %.not, label %.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  %8 = getelementptr inbounds i8, ptr %0, i64 12
  br label %10

.preheader:                                       ; preds = %10, %1
  %9 = call noundef i64 @_ZNKSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %.not16 = icmp eq i64 %9, 0
  br i1 %.not16, label %._crit_edge, label %.lr.ph15

10:                                               ; preds = %.lr.ph, %10
  %11 = phi i64 [ 0, %.lr.ph ], [ %17, %10 ]
  %.013 = phi i32 [ 0, %.lr.ph ], [ %16, %10 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #5
  %12 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %11) #5
  %13 = getelementptr inbounds i8, ptr %12, i64 4
  %14 = call { <2 x float>, float } @_ZmlIfE10aiVector3tIT_ES1_RKS2_(float noundef %6, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %.fca.0.extract = extractvalue { <2 x float>, float } %14, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %14, 1
  store <2 x float> %.fca.0.extract, ptr %2, align 8
  store float %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  %15 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN10aiVector3tIfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %2)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #5
  %16 = add i32 %.013, 1
  %17 = zext i32 %16 to i64
  %18 = call noundef i64 @_ZNKSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %19 = icmp ugt i64 %18, %17
  br i1 %19, label %10, label %.preheader, !llvm.loop !5

._crit_edge:                                      ; preds = %.lr.ph15, %.preheader
  %20 = call ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %21 = call ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN6Assimp11SpatialSort5EntryESt6vectorIS4_SaIS4_EEEEEvT_SA_(ptr %20, ptr %21)
  %22 = getelementptr inbounds i8, ptr %0, i64 48
  store i8 1, ptr %22, align 8, !tbaa !7
  ret void

.lr.ph15:                                         ; preds = %.preheader, %.lr.ph15
  %23 = phi i64 [ %30, %.lr.ph15 ], [ 0, %.preheader ]
  %.01014 = phi i32 [ %29, %.lr.ph15 ], [ 0, %.preheader ]
  %24 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %23) #5
  %25 = getelementptr inbounds i8, ptr %24, i64 4
  %26 = call noundef float @_ZNK6Assimp11SpatialSort17CalculateDistanceERK10aiVector3tIfE(ptr noundef nonnull align 8 dereferenceable(49) %0, ptr noundef nonnull align 4 dereferenceable(12) %25)
  %27 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %23) #5
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  store float %26, ptr %28, align 4, !tbaa !19
  %29 = add i32 %.01014, 1
  %30 = zext i32 %29 to i64
  %31 = call noundef i64 @_ZNKSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %32 = icmp ugt i64 %31, %30
  br i1 %32, label %.lr.ph15, label %._crit_edge, !llvm.loop !22
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZmlIfE10aiVector3tIT_ES1_RKS2_(float noundef, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN10aiVector3tIfEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN6Assimp11SpatialSort5EntryESt6vectorIS4_SaIS4_EEEEEvT_SA_(ptr, ptr) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 = { inlinehint 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 = { inlinehint mustprogress 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 }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !18, i64 48}
!8 = !{!"_ZTSN6Assimp11SpatialSortE", !9, i64 0, !9, i64 12, !13, i64 24, !18, i64 48}
!9 = !{!"_ZTS10aiVector3tIfE", !10, i64 0, !10, i64 4, !10, i64 8}
!10 = !{!"float", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"_ZTSSt6vectorIN6Assimp11SpatialSort5EntryESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIN6Assimp11SpatialSort5EntryESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN6Assimp11SpatialSort5EntryESaIS2_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN6Assimp11SpatialSort5EntryESaIS2_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!17 = !{!"any pointer", !11, i64 0}
!18 = !{!"bool", !11, i64 0}
!19 = !{!20, !10, i64 16}
!20 = !{!"_ZTSN6Assimp11SpatialSort5EntryE", !21, i64 0, !9, i64 4, !10, i64 16}
!21 = !{!"int", !11, i64 0}
!22 = distinct !{!22, !6}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass