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

; 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::Array" = type { i64, i64, ptr }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon }
%union.anon = type { <4 x float> }
%class.SoftBodySkinnedConstraintTest = type <{ %class.Test, ptr, float, [4 x i8] }>
%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 }

@_ZN29SoftBodySkinnedConstraintTest22sEnableSkinConstraintsE = external dso_local global i8, align 1
@_ZN29SoftBodySkinnedConstraintTest22sMaxDistanceMultiplierE = external dso_local global float, align 4
@_ZN29SoftBodySkinnedConstraintTest15sUpdateSkinningE = external dso_local global i8, align 1

; 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
declare dso_local void @_ZNK29SoftBodySkinnedConstraintTest17GetWorldSpacePoseEf(ptr dead_on_unwind noalias writable sret(%"class.JPH::Array") align 8, ptr noundef nonnull align 8 dereferenceable(124), float noundef) #1 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) #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN29SoftBodySkinnedConstraintTest12SkinVerticesEb(ptr noundef nonnull align 8 dereferenceable(124) %0, i1 noundef zeroext %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca %"class.JPH::Mat44", align 16
  %6 = alloca %"class.JPH::Array", align 8
  %7 = alloca %"class.JPH::Mat44", align 16
  %8 = alloca %"class.JPH::Mat44", align 16
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.JPH::Mat44", align 16
  %16 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %17 = zext i1 %1 to i8
  store i8 %17, ptr %4, align 1, !tbaa !9
  %18 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %5) #10
  %19 = getelementptr inbounds %class.SoftBodySkinnedConstraintTest, ptr %18, i32 0, i32 1
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  call void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %5, ptr noundef nonnull align 16 dereferenceable(122) %20)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #10
  %21 = getelementptr inbounds %class.SoftBodySkinnedConstraintTest, ptr %18, i32 0, i32 2
  %22 = load float, ptr %21, align 8, !tbaa !20
  call void @_ZNK29SoftBodySkinnedConstraintTest17GetWorldSpacePoseEf(ptr dead_on_unwind writable sret(%"class.JPH::Array") align 8 %6, ptr noundef nonnull align 8 dereferenceable(124) %18, float noundef %22)
  call void @llvm.lifetime.start.p0(i64 64, ptr %7) #10
  call void @llvm.lifetime.start.p0(i64 64, ptr %8) #10
  invoke void @_ZNK3JPH5Mat4427InversedRotationTranslationEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %8, ptr noundef nonnull align 16 dereferenceable(64) %5)
          to label %23 unwind label %36

23:                                               ; preds = %2
  invoke void @_ZNK3JPH5Mat447ToMat44Ev(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %7, ptr noundef nonnull align 16 dereferenceable(64) %8)
          to label %24 unwind label %36

24:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #10
  store ptr %6, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  %26 = invoke noundef ptr @_ZN3JPH5ArrayINS_5Mat44ENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %27 unwind label %40

27:                                               ; preds = %24
  store ptr %26, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  %28 = load ptr, ptr %11, align 8, !tbaa !5
  %29 = invoke noundef ptr @_ZN3JPH5ArrayINS_5Mat44ENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
          to label %30 unwind label %44

30:                                               ; preds = %27
  store ptr %29, ptr %13, align 8, !tbaa !5
  br label %31

31:                                               ; preds = %53, %30
  %32 = load ptr, ptr %12, align 8, !tbaa !5
  %33 = load ptr, ptr %13, align 8, !tbaa !5
  %34 = icmp ne ptr %32, %33
  br i1 %34, label %48, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  br label %62

36:                                               ; preds = %23, %2
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %9, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #10
  br label %93

40:                                               ; preds = %24
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %9, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %10, align 4
  br label %61

44:                                               ; preds = %27
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %9, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %10, align 4
  br label %60

48:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %49, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #10
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZNK3JPH5Mat44mlERKS0_(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %15, ptr noundef nonnull align 16 dereferenceable(64) %7, ptr noundef nonnull align 16 dereferenceable(64) %50)
          to label %51 unwind label %56

51:                                               ; preds = %48
  %52 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %52, ptr align 16 %15, i64 64, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  br label %53

53:                                               ; preds = %51
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = getelementptr inbounds %"class.JPH::Mat44", ptr %54, i32 1
  store ptr %55, ptr %12, align 8, !tbaa !5
  br label %31

56:                                               ; preds = %48
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %9, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  br label %60

60:                                               ; preds = %56, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  br label %61

61:                                               ; preds = %60, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  br label %93

62:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  %63 = getelementptr inbounds %class.SoftBodySkinnedConstraintTest, ptr %18, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !11
  %65 = invoke noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %64)
          to label %66 unwind label %88

66:                                               ; preds = %62
  store ptr %65, ptr %16, align 8, !tbaa !5
  %67 = load ptr, ptr %16, align 8, !tbaa !5
  %68 = load i8, ptr @_ZN29SoftBodySkinnedConstraintTest22sEnableSkinConstraintsE, align 1, !tbaa !9, !range !23, !noundef !24
  %69 = trunc i8 %68 to i1
  invoke void @_ZN3JPH24SoftBodyMotionProperties24SetEnableSkinConstraintsEb(ptr noundef nonnull align 16 dereferenceable(372) %67, i1 noundef zeroext %69)
          to label %70 unwind label %88

70:                                               ; preds = %66
  %71 = load ptr, ptr %16, align 8, !tbaa !5
  %72 = load float, ptr @_ZN29SoftBodySkinnedConstraintTest22sMaxDistanceMultiplierE, align 4, !tbaa !25
  invoke void @_ZN3JPH24SoftBodyMotionProperties31SetSkinnedMaxDistanceMultiplierEf(ptr noundef nonnull align 16 dereferenceable(372) %71, float noundef %72)
          to label %73 unwind label %88

73:                                               ; preds = %70
  %74 = load i8, ptr @_ZN29SoftBodySkinnedConstraintTest15sUpdateSkinningE, align 1, !tbaa !9, !range !23, !noundef !24
  %75 = trunc i8 %74 to i1
  br i1 %75, label %79, label %76

76:                                               ; preds = %73
  %77 = load i8, ptr %4, align 1, !tbaa !9, !range !23, !noundef !24
  %78 = trunc i8 %77 to i1
  br i1 %78, label %79, label %92

79:                                               ; preds = %76, %73
  %80 = load ptr, ptr %16, align 8, !tbaa !5
  %81 = invoke noundef ptr @_ZN3JPH5ArrayINS_5Mat44ENS_12STLAllocatorIS1_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %82 unwind label %88

82:                                               ; preds = %79
  %83 = load i8, ptr %4, align 1, !tbaa !9, !range !23, !noundef !24
  %84 = trunc i8 %83 to i1
  %85 = getelementptr inbounds %class.Test, ptr %18, i32 0, i32 5
  %86 = load ptr, ptr %85, align 8, !tbaa !26
  invoke void @_ZN3JPH24SoftBodyMotionProperties12SkinVerticesERKNS_5Mat44EPS2_jbRNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372) %80, ptr noundef nonnull align 16 dereferenceable(64) %5, ptr noundef %81, i32 noundef 11, i1 noundef zeroext %84, ptr noundef nonnull align 8 dereferenceable(8) %86)
          to label %87 unwind label %88

87:                                               ; preds = %82
  br label %92

88:                                               ; preds = %82, %79, %70, %66, %62
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %9, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  br label %93

92:                                               ; preds = %87, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #10
  call void @_ZN3JPH5ArrayINS_5Mat44ENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #10
  ret void

93:                                               ; preds = %88, %61, %36
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #10
  call void @_ZN3JPH5ArrayINS_5Mat44ENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #10
  br label %94

94:                                               ; preds = %93
  %95 = load ptr, ptr %9, align 8
  %96 = load i32, ptr %10, align 4
  %97 = insertvalue { ptr, i32 } poison, ptr %95, 0
  %98 = insertvalue { ptr, i32 } %97, i32 %96, 1
  resume { ptr, i32 } %98
}

; 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)) #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK3JPH5Mat4427InversedRotationTranslationEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(64)) #6 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNK3JPH5Mat447ToMat44Ev(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(64)) #7 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH24SoftBodyMotionProperties24SetEnableSkinConstraintsEb(ptr noundef nonnull align 16 dereferenceable(372), i1 noundef zeroext) #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH24SoftBodyMotionProperties31SetSkinnedMaxDistanceMultiplierEf(ptr noundef nonnull align 16 dereferenceable(372), float noundef) #8 align 2

declare void @_ZN3JPH24SoftBodyMotionProperties12SkinVerticesERKNS_5Mat44EPS2_jbRNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef, i32 noundef, i1 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(8)) #9

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayINS_5Mat44ENS_12STLAllocatorIS1_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { alwaysinline mustprogress nounwind 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 #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 = { 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 #6 = { 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 #7 = { 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 #8 = { 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 #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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !6, i64 112}
!12 = !{!"_ZTS29SoftBodySkinnedConstraintTest", !13, i64 0, !6, i64 112, !19, i64 120}
!13 = !{!"_ZTS4Test", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !10, i64 48, !14, i64 56}
!14 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !15, i64 0}
!15 = !{!"_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, !16, i64 8, !17, i64 16, !16, i64 24, !18, i64 32, !6, i64 48}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!18 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !19, i64 0, !16, i64 8}
!19 = !{!"float", !7, i64 0}
!20 = !{!12, !19, i64 120}
!21 = !{i64 0, i64 64, !22}
!22 = !{!7, !7, i64 0}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!19, !19, i64 0}
!26 = !{!13, !6, i64 40}


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

@_ZN29SoftBodySkinnedConstraintTest22sEnableSkinConstraintsE = external dso_local local_unnamed_addr global i8, align 1
@_ZN29SoftBodySkinnedConstraintTest22sMaxDistanceMultiplierE = external dso_local local_unnamed_addr global float, align 4
@_ZN29SoftBodySkinnedConstraintTest15sUpdateSkinningE = external dso_local local_unnamed_addr global i8, align 1

; 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
declare dso_local void @_ZNK29SoftBodySkinnedConstraintTest17GetWorldSpacePoseEf(ptr dead_on_unwind noalias writable sret(%"class.JPH::Array") align 8, ptr noundef nonnull align 8 dereferenceable(124), float noundef) local_unnamed_addr #1 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) #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN29SoftBodySkinnedConstraintTest12SkinVerticesEb(ptr noundef nonnull align 8 dereferenceable(124) %0, i1 noundef zeroext %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.JPH::Mat44", align 16
  %4 = alloca %"class.JPH::Array", align 8
  %5 = alloca %"class.JPH::Mat44", align 16
  %6 = alloca %"class.JPH::Mat44", align 16
  %7 = alloca %"class.JPH::Mat44", align 16
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #10
  %8 = getelementptr inbounds i8, ptr %0, i64 112
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %3, ptr noundef nonnull align 16 dereferenceable(122) %9)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #10
  %10 = getelementptr inbounds i8, ptr %0, i64 120
  %11 = load float, ptr %10, align 8, !tbaa !18
  call void @_ZNK29SoftBodySkinnedConstraintTest17GetWorldSpacePoseEf(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Array") align 8 %4, ptr noundef nonnull align 8 dereferenceable(124) %0, float noundef %11)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #10
  invoke void @_ZNK3JPH5Mat4427InversedRotationTranslationEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %6, ptr noundef nonnull align 16 dereferenceable(64) %3)
          to label %12 unwind label %17

12:                                               ; preds = %2
  call void @_ZNK3JPH5Mat447ToMat44Ev(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %5, ptr noundef nonnull align 16 dereferenceable(64) %6)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #10
  %13 = call noundef ptr @_ZN3JPH5ArrayINS_5Mat44ENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %14 = call noundef ptr @_ZN3JPH5ArrayINS_5Mat44ENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %.not18 = icmp eq ptr %13, %14
  br i1 %.not18, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %12
  %15 = load ptr, ptr %8, align 8, !tbaa !5
  %16 = invoke noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %15)
          to label %20 unwind label %30

17:                                               ; preds = %2
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #10
  br label %33

.lr.ph:                                           ; preds = %12, %.lr.ph
  %.01619 = phi ptr [ %19, %.lr.ph ], [ %13, %12 ]
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #10
  call void @_ZNK3JPH5Mat44mlERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %7, ptr noundef nonnull align 16 dereferenceable(64) %5, ptr noundef nonnull align 16 dereferenceable(64) %.01619)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %.01619, ptr noundef nonnull align 16 dereferenceable(64) %7, i64 64, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #10
  %19 = getelementptr inbounds i8, ptr %.01619, i64 64
  %.not = icmp eq ptr %19, %14
  br i1 %.not, label %._crit_edge, label %.lr.ph

20:                                               ; preds = %._crit_edge
  %21 = load i8, ptr @_ZN29SoftBodySkinnedConstraintTest22sEnableSkinConstraintsE, align 1, !tbaa !21, !range !22, !noundef !23
  %22 = trunc nuw i8 %21 to i1
  call void @_ZN3JPH24SoftBodyMotionProperties24SetEnableSkinConstraintsEb(ptr noundef nonnull align 16 dereferenceable(372) %16, i1 noundef zeroext %22)
  %23 = load float, ptr @_ZN29SoftBodySkinnedConstraintTest22sMaxDistanceMultiplierE, align 4, !tbaa !24
  call void @_ZN3JPH24SoftBodyMotionProperties31SetSkinnedMaxDistanceMultiplierEf(ptr noundef nonnull align 16 dereferenceable(372) %16, float noundef %23)
  %24 = load i8, ptr @_ZN29SoftBodySkinnedConstraintTest15sUpdateSkinningE, align 1, !tbaa !21, !range !22, !noundef !23
  %25 = trunc nuw i8 %24 to i1
  %brmerge = or i1 %25, %1
  br i1 %brmerge, label %26, label %32

26:                                               ; preds = %20
  %27 = call noundef ptr @_ZN3JPH5ArrayINS_5Mat44ENS_12STLAllocatorIS1_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %28 = getelementptr inbounds i8, ptr %0, i64 40
  %29 = load ptr, ptr %28, align 8, !tbaa !25
  invoke void @_ZN3JPH24SoftBodyMotionProperties12SkinVerticesERKNS_5Mat44EPS2_jbRNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372) %16, ptr noundef nonnull align 16 dereferenceable(64) %3, ptr noundef %27, i32 noundef 11, i1 noundef zeroext %1, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %32 unwind label %30

30:                                               ; preds = %26, %._crit_edge
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %33

32:                                               ; preds = %20, %26
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #10
  call void @_ZN3JPH5ArrayINS_5Mat44ENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #10
  ret void

33:                                               ; preds = %30, %17
  %.pn = phi { ptr, i32 } [ %31, %30 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #10
  call void @_ZN3JPH5ArrayINS_5Mat44ENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #10
  resume { ptr, i32 } %.pn
}

; 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 #5 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayINS_5Mat44ENS_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 @_ZN3JPH5ArrayINS_5Mat44ENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH24SoftBodyMotionProperties24SetEnableSkinConstraintsEb(ptr noundef nonnull align 16 dereferenceable(372), i1 noundef zeroext) local_unnamed_addr #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH24SoftBodyMotionProperties31SetSkinnedMaxDistanceMultiplierEf(ptr noundef nonnull align 16 dereferenceable(372), float noundef) local_unnamed_addr #8 align 2

declare void @_ZN3JPH24SoftBodyMotionProperties12SkinVerticesERKNS_5Mat44EPS2_jbRNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef, i32 noundef, i1 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #9

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayINS_5Mat44ENS_12STLAllocatorIS1_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) local_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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { alwaysinline mustprogress nounwind 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 #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 = { 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 #6 = { 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 #7 = { 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 #8 = { 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 #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, !8, i64 112}
!6 = !{!"_ZTS29SoftBodySkinnedConstraintTest", !7, i64 0, !8, i64 112, !17, i64 120}
!7 = !{!"_ZTS4Test", !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32, !8, i64 40, !11, i64 48, !12, i64 56}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"bool", !9, 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", !8, i64 0, !14, i64 8, !15, i64 16, !14, i64 24, !16, i64 32, !8, i64 48}
!14 = !{!"long", !9, i64 0}
!15 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !8, i64 0}
!16 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !17, i64 0, !14, i64 8}
!17 = !{!"float", !9, i64 0}
!18 = !{!6, !17, i64 120}
!19 = !{i64 0, i64 64, !20}
!20 = !{!9, !9, i64 0}
!21 = !{!11, !11, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!17, !17, i64 0}
!25 = !{!7, !8, i64 40}


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