; LLVM IR from zig-gamedev/zphysics :: libs/Jolt/TriangleSplitter (TriangleSplitter)

; 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.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::TriangleSplitter" = type { ptr, ptr, ptr, %"class.JPH::Array", %"class.JPH::Array.0" }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Array.0" = type { i64, i64, ptr }

@_ZTVN3JPH16TriangleSplitterE = external dso_local unnamed_addr constant { [6 x ptr] }, align 8

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16TriangleSplitterC2ERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEERKNS1_INS_15IndexedTriangleENS3_IS8_EEEE(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8
  store ptr getelementptr inbounds inrange(-16, 32) ({ [6 x ptr] }, ptr @_ZTVN3JPH16TriangleSplitterE, i32 0, i32 0, i32 2), ptr %11, align 8, !tbaa !9
  %12 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %11, i32 0, i32 1
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %13, ptr %12, align 8, !tbaa !5
  %14 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %11, i32 0, i32 2
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %15, ptr %14, align 8, !tbaa !5
  %16 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %11, i32 0, i32 3
  call void @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  %17 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %11, i32 0, i32 4
  call void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %18 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %11, i32 0, i32 4
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = invoke noundef i64 @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19)
          to label %21 unwind label %36

21:                                               ; preds = %3
  invoke void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %20)
          to label %22 unwind label %36

22:                                               ; preds = %21
  %23 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %11, i32 0, i32 3
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = invoke noundef i64 @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %26 unwind label %36

26:                                               ; preds = %22
  invoke void @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %25)
          to label %27 unwind label %36

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !11
  br label %28

28:                                               ; preds = %71, %27
  %29 = load i32, ptr %9, align 4, !tbaa !11
  %30 = zext i32 %29 to i64
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = invoke noundef i64 @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31)
          to label %33 unwind label %40

33:                                               ; preds = %28
  %34 = icmp ult i64 %30, %32
  br i1 %34, label %44, label %35

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

36:                                               ; preds = %26, %22, %21, %3
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %7, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %8, align 4
  br label %80

40:                                               ; preds = %44, %28
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %7, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %8, align 4
  br label %78

44:                                               ; preds = %33
  %45 = load i32, ptr %9, align 4, !tbaa !11
  %46 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %11, i32 0, i32 4
  %47 = load i32, ptr %9, align 4, !tbaa !11
  %48 = zext i32 %47 to i64
  %49 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %48)
          to label %50 unwind label %40

50:                                               ; preds = %44
  store i32 %45, ptr %49, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = load i32, ptr %9, align 4, !tbaa !11
  %53 = zext i32 %52 to i64
  %54 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %53)
          to label %55 unwind label %74

55:                                               ; preds = %50
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = invoke { double, double } @_ZNK3JPH25IndexedTriangleNoMaterial11GetCentroidERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(12) %54, ptr noundef nonnull align 8 dereferenceable(24) %56)
          to label %58 unwind label %74

58:                                               ; preds = %55
  %59 = getelementptr inbounds %"class.JPH::Vec3", ptr %10, i32 0, i32 0
  %60 = getelementptr inbounds %union.anon, ptr %59, i32 0, i32 0
  %61 = getelementptr inbounds { double, double }, ptr %60, i32 0, i32 0
  %62 = extractvalue { double, double } %57, 0
  store double %62, ptr %61, align 16
  %63 = getelementptr inbounds { double, double }, ptr %60, i32 0, i32 1
  %64 = extractvalue { double, double } %57, 1
  store double %64, ptr %63, align 8
  %65 = getelementptr inbounds %"class.JPH::TriangleSplitter", ptr %11, i32 0, i32 3
  %66 = load i32, ptr %9, align 4, !tbaa !11
  %67 = zext i32 %66 to i64
  %68 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %67)
          to label %69 unwind label %74

69:                                               ; preds = %58
  invoke void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %10, ptr noundef %68)
          to label %70 unwind label %74

70:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %9, align 4, !tbaa !11
  %73 = add i32 %72, 1
  store i32 %73, ptr %9, align 4, !tbaa !11
  br label %28, !llvm.loop !13

74:                                               ; preds = %69, %58, %55, %50
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %7, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  br label %78

78:                                               ; preds = %74, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %80

79:                                               ; preds = %35
  ret void

80:                                               ; preds = %78, %36
  call void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  br label %81

81:                                               ; preds = %80
  %82 = load ptr, ptr %7, align 8
  %83 = load i32, ptr %8, align 4
  %84 = insertvalue { ptr, i32 } poison, ptr %82, 0
  %85 = insertvalue { ptr, i32 } %84, i32 %83, 1
  resume { ptr, i32 } %85
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH25IndexedTriangleNoMaterial11GetCentroidERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef) #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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"

%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }

@_ZTVN3JPH16TriangleSplitterE = external dso_local unnamed_addr constant { [6 x ptr] }, align 8

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16TriangleSplitterC2ERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEERKNS1_INS_15IndexedTriangleENS3_IS8_EEEE(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.JPH::Vec3", align 16
  store ptr getelementptr inbounds inrange(-16, 32) (i8, ptr @_ZTVN3JPH16TriangleSplitterE, i64 16), ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %5, align 8, !tbaa !8
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %2, ptr %6, align 8, !tbaa !8
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %8 = getelementptr inbounds i8, ptr %0, i64 48
  tail call void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %9 = tail call noundef i64 @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  invoke void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %9)
          to label %10 unwind label %14

10:                                               ; preds = %3
  %11 = tail call noundef i64 @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  invoke void @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %11)
          to label %.preheader unwind label %14

.preheader:                                       ; preds = %10
  %12 = tail call noundef i64 @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not = icmp eq i64 %12, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %13 = getelementptr inbounds i8, ptr %4, i64 8
  br label %18

._crit_edge:                                      ; preds = %30, %.preheader
  ret void

14:                                               ; preds = %10, %3
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %37

16:                                               ; preds = %18
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %37

18:                                               ; preds = %.lr.ph, %30
  %19 = phi i64 [ 0, %.lr.ph ], [ %32, %30 ]
  %.021 = phi i32 [ 0, %.lr.ph ], [ %31, %30 ]
  %20 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %19)
          to label %21 unwind label %16

21:                                               ; preds = %18
  store i32 %.021, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  %22 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %19)
          to label %23 unwind label %35

23:                                               ; preds = %21
  %24 = invoke { double, double } @_ZNK3JPH25IndexedTriangleNoMaterial11GetCentroidERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(12) %22, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %25 unwind label %35

25:                                               ; preds = %23
  %26 = extractvalue { double, double } %24, 0
  store double %26, ptr %4, align 16
  %27 = extractvalue { double, double } %24, 1
  store double %27, ptr %13, align 8
  %28 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %19)
          to label %29 unwind label %35

29:                                               ; preds = %25
  invoke void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %4, ptr noundef nonnull %28)
          to label %30 unwind label %35

30:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  %31 = add i32 %.021, 1
  %32 = zext i32 %31 to i64
  %33 = call noundef i64 @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %34 = icmp ugt i64 %33, %32
  br i1 %34, label %18, label %._crit_edge, !llvm.loop !13

35:                                               ; preds = %29, %25, %23, %21
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  br label %37

37:                                               ; preds = %16, %35, %14
  %.pn.pn = phi { ptr, i32 } [ %15, %14 ], [ %36, %35 ], [ %17, %16 ]
  call void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  resume { ptr, i32 } %.pn.pn
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3JPH5ArrayINS_15IndexedTriangleENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH25IndexedTriangleNoMaterial11GetCentroidERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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