; LLVM IR from jrouwe/JoltPhysics :: Samples/Tests/SoftBody (SoftBodyContactListenerTest)

; 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::Color" = type { %union.anon.43 }
%union.anon.43 = type { i32 }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.17 }
%union.anon.17 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%class.Test = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.JPH::SoftBodyVertex" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Plane", i32, i8, float, float }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }

@_ZN3JPH5Color4sRedE = external global %"class.JPH::Color", align 4
@_ZN3JPH5Color6sGreenE = external global %"class.JPH::Color", align 4

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN27SoftBodyContactListenerTest22OnSoftBodyContactAddedERKN3JPH4BodyERKNS0_16SoftBodyManifoldE(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 16 dereferenceable(122) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) unnamed_addr #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.JPH::Mat44", align 16
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca %"class.JPH::Color", align 4
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Color", align 4
  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
  %21 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %7) #10
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %7, ptr noundef nonnull align 16 dereferenceable(122) %22)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH16SoftBodyManifold11GetVerticesEv(ptr noundef nonnull align 8 dereferenceable(24) %23)
  store ptr %24, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = call noundef ptr @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %25)
  store ptr %26, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = call noundef ptr @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %27)
  store ptr %28, ptr %10, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %103, %3
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = icmp ne ptr %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  br label %106

34:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #10
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %35, ptr %11, align 8, !tbaa !5
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = call noundef zeroext i1 @_ZNK3JPH16SoftBodyManifold10HasContactERKNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 16 dereferenceable(80) %37)
  br i1 %38, label %39, label %102

39:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #10
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = call { double, double } @_ZNK3JPH16SoftBodyManifold20GetLocalContactPointERKNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 16 dereferenceable(80) %41)
  %43 = getelementptr inbounds %"class.JPH::Vec3", ptr %13, i32 0, i32 0
  %44 = getelementptr inbounds %union.anon, ptr %43, i32 0, i32 0
  %45 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 0
  %46 = extractvalue { double, double } %42, 0
  store double %46, ptr %45, align 16
  %47 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 1
  %48 = extractvalue { double, double } %42, 1
  store double %48, ptr %47, align 8
  %49 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %50 = load double, ptr %49, align 16
  %51 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %52 = load double, ptr %51, align 8
  %53 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %7, double %50, double %52)
  %54 = getelementptr inbounds %"class.JPH::Vec3", ptr %12, i32 0, i32 0
  %55 = getelementptr inbounds %union.anon, ptr %54, i32 0, i32 0
  %56 = getelementptr inbounds { double, double }, ptr %55, i32 0, i32 0
  %57 = extractvalue { double, double } %53, 0
  store double %57, ptr %56, align 16
  %58 = getelementptr inbounds { double, double }, ptr %55, i32 0, i32 1
  %59 = extractvalue { double, double } %53, 1
  store double %59, ptr %58, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #10
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = call { double, double } @_ZNK3JPH16SoftBodyManifold16GetContactNormalERKNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(24) %60, ptr noundef nonnull align 16 dereferenceable(80) %61)
  %63 = getelementptr inbounds %"class.JPH::Vec3", ptr %14, i32 0, i32 0
  %64 = getelementptr inbounds %union.anon, ptr %63, i32 0, i32 0
  %65 = getelementptr inbounds { double, double }, ptr %64, i32 0, i32 0
  %66 = extractvalue { double, double } %62, 0
  store double %66, ptr %65, align 16
  %67 = getelementptr inbounds { double, double }, ptr %64, i32 0, i32 1
  %68 = extractvalue { double, double } %62, 1
  store double %68, ptr %67, align 8
  %69 = getelementptr inbounds %class.Test, ptr %21, i32 0, i32 4
  %70 = load ptr, ptr %69, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %15, ptr align 16 %12, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 @_ZN3JPH5Color4sRedE, i64 4, i1 false), !tbaa.struct !20
  %71 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %72 = load double, ptr %71, align 16
  %73 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %74 = load double, ptr %73, align 8
  %75 = getelementptr inbounds %"class.JPH::Color", ptr %16, i32 0, i32 0
  %76 = getelementptr inbounds %union.anon.43, ptr %75, i32 0, i32 0
  %77 = load i32, ptr %76, align 4
  call void @_ZN3JPH13DebugRenderer10DrawMarkerENS_4Vec3ENS_5ColorEf(ptr noundef nonnull align 8 dereferenceable(320) %70, double %72, double %74, i32 %77, float noundef 0x3FB99999A0000000)
  %78 = getelementptr inbounds %class.Test, ptr %21, i32 0, i32 4
  %79 = load ptr, ptr %78, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %17, ptr align 16 %12, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !18
  %80 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %81 = load double, ptr %80, align 16
  %82 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %83 = load double, ptr %82, align 8
  %84 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %81, double %83)
  %85 = getelementptr inbounds %"class.JPH::Vec3", ptr %18, i32 0, i32 0
  %86 = getelementptr inbounds %union.anon, ptr %85, i32 0, i32 0
  %87 = getelementptr inbounds { double, double }, ptr %86, i32 0, i32 0
  %88 = extractvalue { double, double } %84, 0
  store double %88, ptr %87, align 16
  %89 = getelementptr inbounds { double, double }, ptr %86, i32 0, i32 1
  %90 = extractvalue { double, double } %84, 1
  store double %90, ptr %89, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 @_ZN3JPH5Color6sGreenE, i64 4, i1 false), !tbaa.struct !20
  %91 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %92 = load double, ptr %91, align 16
  %93 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %94 = load double, ptr %93, align 8
  %95 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %96 = load double, ptr %95, align 16
  %97 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %98 = load double, ptr %97, align 8
  %99 = getelementptr inbounds %"class.JPH::Color", ptr %20, i32 0, i32 0
  %100 = getelementptr inbounds %union.anon.43, ptr %99, i32 0, i32 0
  %101 = load i32, ptr %100, align 4
  call void @_ZN3JPH13DebugRenderer9DrawArrowENS_4Vec3ES1_NS_5ColorEf(ptr noundef nonnull align 8 dereferenceable(320) %79, double %92, double %94, double %96, double %98, i32 %101, float noundef 0x3FB99999A0000000)
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #10
  br label %102

102:                                              ; preds = %39, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %104, i32 1
  store ptr %105, ptr %9, align 8, !tbaa !5
  br label %29

106:                                              ; preds = %33
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #10
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(122)) #3 align 2

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16SoftBodyManifold10HasContactERKNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(80)) #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), double, double) #7 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH16SoftBodyManifold20GetLocalContactPointERKNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(80)) #8 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH16SoftBodyManifold16GetContactNormalERKNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(80)) #8 align 2

declare void @_ZN3JPH13DebugRenderer10DrawMarkerENS_4Vec3ENS_5ColorEf(ptr noundef nonnull align 8 dereferenceable(320), double, double, i32, float noundef) #9

declare void @_ZN3JPH13DebugRenderer9DrawArrowENS_4Vec3ES1_NS_5ColorEf(ptr noundef nonnull align 8 dereferenceable(320), double, double, double, double, i32, float noundef) #9

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #7 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = { 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 = { 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 = { alwaysinline 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 #7 = { 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 #8 = { alwaysinline 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 #9 = { "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 #10 = { 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, !6, i64 32}
!10 = !{!"_ZTS4Test", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !12, i64 56}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !13, i64 0}
!13 = !{!"_ZTSSt10_HashtableIN3JPH6BodyIDESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !14, i64 8, !15, i64 16, !14, i64 24, !16, i64 32, !6, i64 48}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!16 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !17, i64 0, !14, i64 8}
!17 = !{!"float", !7, i64 0}
!18 = !{i64 0, i64 16, !19}
!19 = !{!7, !7, i64 0}
!20 = !{i64 0, i64 4, !19}


; 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::Color" = type { %union.anon.43 }
%union.anon.43 = type { i32 }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.17 }
%union.anon.17 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }

@_ZN3JPH5Color4sRedE = external local_unnamed_addr global %"class.JPH::Color", align 4
@_ZN3JPH5Color6sGreenE = external local_unnamed_addr global %"class.JPH::Color", align 4

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN27SoftBodyContactListenerTest22OnSoftBodyContactAddedERKN3JPH4BodyERKNS0_16SoftBodyManifoldE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(136) %0, ptr noundef nonnull align 16 dereferenceable(122) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) unnamed_addr #1 align 2 {
  %4 = alloca %"class.JPH::Mat44", align 16
  %5 = alloca %"class.JPH::Vec3", align 16
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #9
  call void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %4, ptr noundef nonnull align 16 dereferenceable(122) %1)
  %6 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH16SoftBodyManifold11GetVerticesEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %7 = call noundef ptr @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %8 = call noundef ptr @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %.not26 = icmp eq ptr %7, %8
  br i1 %.not26, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %9 = getelementptr inbounds i8, ptr %5, i64 8
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  br label %11

._crit_edge:                                      ; preds = %28, %3
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #9
  ret void

11:                                               ; preds = %.lr.ph, %28
  %.027 = phi ptr [ %7, %.lr.ph ], [ %29, %28 ]
  %12 = call noundef zeroext i1 @_ZNK3JPH16SoftBodyManifold10HasContactERKNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 16 dereferenceable(80) %.027)
  br i1 %12, label %13, label %28

13:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #9
  %14 = call { double, double } @_ZNK3JPH16SoftBodyManifold20GetLocalContactPointERKNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 16 dereferenceable(80) %.027)
  %15 = extractvalue { double, double } %14, 0
  %16 = extractvalue { double, double } %14, 1
  %17 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %4, double %15, double %16)
  %18 = extractvalue { double, double } %17, 0
  store double %18, ptr %5, align 16
  %19 = extractvalue { double, double } %17, 1
  store double %19, ptr %9, align 8
  %20 = call { double, double } @_ZNK3JPH16SoftBodyManifold16GetContactNormalERKNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 16 dereferenceable(80) %.027)
  %21 = extractvalue { double, double } %20, 0
  %22 = extractvalue { double, double } %20, 1
  %23 = load ptr, ptr %10, align 8, !tbaa !5
  %.sroa.07.0.copyload = load double, ptr %5, align 16
  %.sroa.28.0.copyload = load double, ptr %9, align 8, !tbaa !17
  %.sroa.06.0.copyload = load i32, ptr @_ZN3JPH5Color4sRedE, align 4, !tbaa !17
  call void @_ZN3JPH13DebugRenderer10DrawMarkerENS_4Vec3ENS_5ColorEf(ptr noundef nonnull align 8 dereferenceable(320) %23, double %.sroa.07.0.copyload, double %.sroa.28.0.copyload, i32 %.sroa.06.0.copyload, float noundef 0x3FB99999A0000000)
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %.sroa.04.0.copyload = load double, ptr %5, align 16
  %.sroa.25.0.copyload = load double, ptr %9, align 8, !tbaa !17
  %25 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %21, double %22)
  %26 = extractvalue { double, double } %25, 0
  %27 = extractvalue { double, double } %25, 1
  %.sroa.0.0.copyload = load i32, ptr @_ZN3JPH5Color6sGreenE, align 4, !tbaa !17
  call void @_ZN3JPH13DebugRenderer9DrawArrowENS_4Vec3ES1_NS_5ColorEf(ptr noundef nonnull align 8 dereferenceable(320) %24, double %.sroa.04.0.copyload, double %.sroa.25.0.copyload, double %26, double %27, i32 %.sroa.0.0.copyload, float noundef 0x3FB99999A0000000)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  br label %28

28:                                               ; preds = %13, %11
  %29 = getelementptr inbounds i8, ptr %.027, i64 80
  %.not = icmp eq ptr %29, %8
  br i1 %.not, label %._crit_edge, label %11
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16SoftBodyManifold10HasContactERKNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(80)) local_unnamed_addr #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), double, double) local_unnamed_addr #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH16SoftBodyManifold20GetLocalContactPointERKNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(80)) local_unnamed_addr #7 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH16SoftBodyManifold16GetContactNormalERKNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(80)) local_unnamed_addr #7 align 2

declare void @_ZN3JPH13DebugRenderer10DrawMarkerENS_4Vec3ENS_5ColorEf(ptr noundef nonnull align 8 dereferenceable(320), double, double, i32, float noundef) local_unnamed_addr #8

declare void @_ZN3JPH13DebugRenderer9DrawArrowENS_4Vec3ES1_NS_5ColorEf(ptr noundef nonnull align 8 dereferenceable(320), double, double, double, double, i32, float noundef) local_unnamed_addr #8

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #6 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 = { 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 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 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 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 = { 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 #7 = { alwaysinline 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 #8 = { "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 #9 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 32}
!6 = !{!"_ZTS4Test", !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !11, i64 56}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !12, i64 0}
!12 = !{!"_ZTSSt10_HashtableIN3JPH6BodyIDESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !7, i64 0, !13, i64 8, !14, i64 16, !13, i64 24, !15, i64 32, !7, i64 48}
!13 = !{!"long", !8, i64 0}
!14 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !7, i64 0}
!15 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !16, i64 0, !13, i64 8}
!16 = !{!"float", !8, i64 0}
!17 = !{!8, !8, i64 0}


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