; LLVM IR from vectozavr/3dzavr :: engine/components/physics (RigidObject)

; 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.Vec3D = type { %"struct.std::array.3" }
%"struct.std::array.3" = type { [3 x double] }
%"class.__gnu_cxx::__normal_iterator.65" = type { ptr }
%class.RigidObject = type { %class.Component, %class.Vec3D, %class.Vec3D, double, double, double, %class.Vec3D, %class.Matrix3x3, %class.Matrix3x3, double, double, i8, %class.HitBox, i8, i8, %class.Vec3D, %"class.std::function" }
%class.Component = type { ptr, ptr }
%class.Matrix3x3 = type { %"struct.std::array.9" }
%"struct.std::array.9" = type { [3 x %"struct.std::array.3"] }
%class.HitBox = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Vec3D, std::allocator<Vec3D>>::_Vector_impl" }
%"struct.std::_Vector_base<Vec3D, std::allocator<Vec3D>>::_Vector_impl" = type { %"struct.std::_Vector_base<Vec3D, std::allocator<Vec3D>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Vec3D, std::allocator<Vec3D>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Vec3DC2Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK5Vec3D3dotERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; 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) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Vec3DC2ERK5Vec4D(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DmiERKS_(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3D5crossERKS_(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK5Vec3D3absEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DmlEd(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DplERKS_(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11RigidObject19computeCenterOfMassERKSt10shared_ptrI12TriangleMeshE(ptr noundef nonnull align 8 dereferenceable(368) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.Vec3D, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.65", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.65", align 8
  %9 = alloca ptr, align 8
  %10 = alloca %class.Vec3D, align 8
  %11 = alloca %class.Vec3D, align 8
  %12 = alloca %class.Vec3D, align 8
  %13 = alloca %class.Vec3D, align 8
  %14 = alloca %class.Vec3D, align 8
  %15 = alloca %class.Vec3D, align 8
  %16 = alloca double, align 8
  %17 = alloca %class.Vec3D, align 8
  %18 = alloca %class.Vec3D, align 8
  %19 = alloca %class.Vec3D, align 8
  %20 = alloca %class.Vec3D, align 8
  %21 = alloca %class.Vec3D, align 8
  %22 = alloca %class.Vec3D, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %23 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #6
  call void @_ZN5Vec3DC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %5, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
  %24 = getelementptr inbounds %class.RigidObject, ptr %23, i32 0, i32 4
  store double 0.000000e+00, ptr %24, align 8, !tbaa !9
  %25 = getelementptr inbounds %class.RigidObject, ptr %23, i32 0, i32 5
  store double 0.000000e+00, ptr %25, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = call noundef ptr @_ZNKSt19__shared_ptr_accessI12TriangleMeshLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %26) #6
  %28 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK12TriangleMesh9trianglesEv(ptr noundef nonnull align 8 dereferenceable(121) %27)
  store ptr %28, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = call ptr @_ZNKSt6vectorI8TriangleSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #6
  %31 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.65", ptr %7, i32 0, i32 0
  store ptr %30, ptr %31, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = call ptr @_ZNKSt6vectorI8TriangleSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #6
  %34 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.65", ptr %8, i32 0, i32 0
  store ptr %33, ptr %34, align 8
  br label %35

35:                                               ; preds = %59, %2
  %36 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPK8TriangleSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br i1 %36, label %38, label %37

37:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %61

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %39 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK8TriangleSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  store ptr %39, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #6
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK8TriangleixEi(ptr noundef nonnull align 8 dereferenceable(192) %40, i32 noundef 0)
  call void @_ZN5Vec3DC2ERK5Vec4D(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(32) %41)
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #6
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK8TriangleixEi(ptr noundef nonnull align 8 dereferenceable(192) %42, i32 noundef 1)
  call void @_ZN5Vec3DC2ERK5Vec4D(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(32) %43)
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK8TriangleixEi(ptr noundef nonnull align 8 dereferenceable(192) %44, i32 noundef 2)
  call void @_ZN5Vec3DC2ERK5Vec4D(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(32) %45)
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  call void @_ZNK5Vec3DplERKS_(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %11)
  call void @_ZNK5Vec3DplERKS_(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @_ZNK5Vec3DdvEd(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %14, double noundef 3.000000e+00)
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #6
  call void @_ZNK5Vec3D5crossERKS_(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12)
  %46 = call noundef double @_ZNK5Vec3D3dotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %17)
  %47 = fdiv double %46, 6.000000e+00
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  store double %47, ptr %16, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  %48 = load double, ptr %16, align 8, !tbaa !26
  call void @_ZNK5Vec3DmlEd(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %18, ptr noundef nonnull align 8 dereferenceable(24) %13, double noundef %48)
  %49 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN5Vec3DpLERKS_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %18)
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  %50 = load double, ptr %16, align 8, !tbaa !26
  %51 = getelementptr inbounds %class.RigidObject, ptr %23, i32 0, i32 4
  %52 = load double, ptr %51, align 8, !tbaa !9
  %53 = fadd double %52, %50
  store double %53, ptr %51, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #6
  call void @_ZNK5Vec3DmiERKS_(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %20, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %10)
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #6
  call void @_ZNK5Vec3DmiERKS_(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %21, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %10)
  call void @_ZNK5Vec3D5crossERKS_(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %19, ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(24) %21)
  %54 = call noundef double @_ZNK5Vec3D3absEv(ptr noundef nonnull align 8 dereferenceable(24) %19)
  %55 = fdiv double %54, 2.000000e+00
  %56 = getelementptr inbounds %class.RigidObject, ptr %23, i32 0, i32 5
  %57 = load double, ptr %56, align 8, !tbaa !25
  %58 = fadd double %57, %55
  store double %58, ptr %56, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %59

59:                                               ; preds = %38
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPK8TriangleSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br label %35

61:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #6
  %62 = getelementptr inbounds %class.RigidObject, ptr %23, i32 0, i32 4
  %63 = load double, ptr %62, align 8, !tbaa !9
  call void @_ZNK5Vec3DdvEd(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %22, ptr noundef nonnull align 8 dereferenceable(24) %5, double noundef %63)
  %64 = getelementptr inbounds %class.RigidObject, ptr %23, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %64, ptr align 8 %22, i64 24, i1 false), !tbaa.struct !27
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessI12TriangleMeshLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #5 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPK8TriangleSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(192) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK8TriangleSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK8TriangleixEi(ptr noundef nonnull align 8 dereferenceable(192), i32 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DdvEd(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5Vec3DpLERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { 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, !14, i64 72}
!10 = !{!"_ZTS11RigidObject", !11, i64 0, !12, i64 16, !12, i64 40, !14, i64 64, !14, i64 72, !14, i64 80, !12, i64 88, !15, i64 112, !15, i64 184, !14, i64 256, !14, i64 264, !17, i64 272, !18, i64 280, !17, i64 304, !17, i64 305, !12, i64 312, !23, i64 336}
!11 = !{!"_ZTS9Component", !6, i64 8}
!12 = !{!"_ZTS5Vec3D", !13, i64 0}
!13 = !{!"_ZTSSt5arrayIdLm3EE", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!"_ZTS9Matrix3x3", !16, i64 0}
!16 = !{!"_ZTSSt5arrayIS_IdLm3EELm3EE", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTS6HitBox", !19, i64 0}
!19 = !{!"_ZTSSt6vectorI5Vec3DSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseI5Vec3DSaIS0_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI5Vec3DSaIS0_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseI5Vec3DSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt8functionIFvRK14CollisionPointSt10shared_ptrI11RigidObjectES5_EE", !24, i64 0, !6, i64 24}
!24 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!25 = !{!10, !14, i64 80}
!26 = !{!14, !14, i64 0}
!27 = !{i64 0, i64 24, !28}
!28 = !{!7, !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.Vec3D = type { %"struct.std::array.3" }
%"struct.std::array.3" = type { [3 x double] }
%"class.__gnu_cxx::__normal_iterator.65" = type { ptr }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Vec3DC2Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK5Vec3D3dotERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress 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) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Vec3DC2ERK5Vec4D(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DmiERKS_(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3D5crossERKS_(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DmlEd(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DplERKS_(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11RigidObject19computeCenterOfMassERKSt10shared_ptrI12TriangleMeshE(ptr nocapture noundef nonnull align 8 dereferenceable(368) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) local_unnamed_addr #4 align 2 {
  %3 = alloca %class.Vec3D, align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.65", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.65", align 8
  %6 = alloca %class.Vec3D, align 8
  %7 = alloca %class.Vec3D, align 8
  %8 = alloca %class.Vec3D, align 8
  %9 = alloca %class.Vec3D, align 8
  %10 = alloca %class.Vec3D, align 8
  %11 = alloca %class.Vec3D, align 8
  %12 = alloca %class.Vec3D, align 8
  %13 = alloca %class.Vec3D, align 8
  %14 = alloca %class.Vec3D, align 8
  %15 = alloca %class.Vec3D, align 8
  %16 = alloca %class.Vec3D, align 8
  %17 = alloca %class.Vec3D, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @_ZN5Vec3DC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %3, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
  %18 = getelementptr inbounds i8, ptr %0, i64 72
  %19 = getelementptr inbounds i8, ptr %0, i64 80
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %18, i8 0, i64 16, i1 false)
  %20 = call noundef ptr @_ZNKSt19__shared_ptr_accessI12TriangleMeshLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK12TriangleMesh9trianglesEv(ptr noundef nonnull align 8 dereferenceable(121) %20)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %22 = call ptr @_ZNKSt6vectorI8TriangleSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  store ptr %22, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %23 = call ptr @_ZNKSt6vectorI8TriangleSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  store ptr %23, ptr %5, align 8
  %24 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPK8TriangleSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br i1 %24, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #7
  %25 = load double, ptr %18, align 8, !tbaa !5
  call void @_ZNK5Vec3DdvEd(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %3, double noundef %25)
  %26 = getelementptr inbounds i8, ptr %0, i64 88
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(24) %17, i64 24, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  ret void

.lr.ph:                                           ; preds = %2, %.lr.ph
  %27 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK8TriangleSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  %28 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK8TriangleixEi(ptr noundef nonnull align 8 dereferenceable(192) %27, i32 noundef 0)
  call void @_ZN5Vec3DC2ERK5Vec4D(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(32) %28)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  %29 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK8TriangleixEi(ptr noundef nonnull align 8 dereferenceable(192) %27, i32 noundef 1)
  call void @_ZN5Vec3DC2ERK5Vec4D(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(32) %29)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  %30 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK8TriangleixEi(ptr noundef nonnull align 8 dereferenceable(192) %27, i32 noundef 2)
  call void @_ZN5Vec3DC2ERK5Vec4D(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(32) %30)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #7
  call void @_ZNK5Vec3DplERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7)
  call void @_ZNK5Vec3DplERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %8)
  call void @_ZNK5Vec3DdvEd(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %10, double noundef 3.000000e+00)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #7
  call void @_ZNK5Vec3D5crossERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %8)
  %31 = call noundef double @_ZNK5Vec3D3dotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %12)
  %32 = fdiv double %31, 6.000000e+00
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #7
  call void @_ZNK5Vec3DmlEd(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %9, double noundef %32)
  %33 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN5Vec3DpLERKS_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %13)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  %34 = load double, ptr %18, align 8, !tbaa !5
  %35 = fadd double %32, %34
  store double %35, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #7
  call void @_ZNK5Vec3DmiERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %6)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #7
  call void @_ZNK5Vec3DmiERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %6)
  call void @_ZNK5Vec3D5crossERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %16)
  %36 = call noundef double @_ZNK5Vec3D3absEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %37 = fmul double %36, 5.000000e-01
  %38 = load double, ptr %19, align 8, !tbaa !26
  %39 = fadd double %38, %37
  store double %39, ptr %19, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPK8TriangleSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %41 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPK8TriangleSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br i1 %41, label %.lr.ph, label %._crit_edge
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessI12TriangleMeshLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPK8TriangleSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK8TriangleixEi(ptr noundef nonnull align 8 dereferenceable(192), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DdvEd(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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, !13, i64 72}
!6 = !{!"_ZTS11RigidObject", !7, i64 0, !11, i64 16, !11, i64 40, !13, i64 64, !13, i64 72, !13, i64 80, !11, i64 88, !14, i64 112, !14, i64 184, !13, i64 256, !13, i64 264, !16, i64 272, !17, i64 280, !16, i64 304, !16, i64 305, !11, i64 312, !22, i64 336}
!7 = !{!"_ZTS9Component", !8, i64 8}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTS5Vec3D", !12, i64 0}
!12 = !{!"_ZTSSt5arrayIdLm3EE", !9, i64 0}
!13 = !{!"double", !9, i64 0}
!14 = !{!"_ZTS9Matrix3x3", !15, i64 0}
!15 = !{!"_ZTSSt5arrayIS_IdLm3EELm3EE", !9, i64 0}
!16 = !{!"bool", !9, i64 0}
!17 = !{!"_ZTS6HitBox", !18, i64 0}
!18 = !{!"_ZTSSt6vectorI5Vec3DSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseI5Vec3DSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI5Vec3DSaIS0_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI5Vec3DSaIS0_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!22 = !{!"_ZTSSt8functionIFvRK14CollisionPointSt10shared_ptrI11RigidObjectES5_EE", !23, i64 0, !8, i64 24}
!23 = !{!"_ZTSSt14_Function_base", !9, i64 0, !8, i64 16}
!24 = !{i64 0, i64 24, !25}
!25 = !{!9, !9, i64 0}
!26 = !{!6, !13, i64 80}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass