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

; 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.anon.6 = type { i8 }
%class.anon.8 = type { i8 }
%"struct.JPH::SoftBodySharedSettings::VertexAttributes" = type { float, float, float, i32, float }
%"class.JPH::Ref" = type { 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 } }
%"class.std::function.11" = type { %"class.std::_Function_base", ptr }
%"class.JPH::SoftBodyCreationSettings" = type <{ %"class.JPH::RefConst.14", [8 x i8], %"class.JPH::Vec3", %"class.JPH::Quat", i64, i16, [6 x i8], %"class.JPH::CollisionGroup", i32, float, float, float, float, float, float, i8, i8, i8, i8 }>
%"class.JPH::RefConst.14" = type { ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst.5", i32, i32 }
%"class.JPH::RefConst.5" = type { ptr }
%"class.JPH::BodyID" = type { i32 }
%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 }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN25SoftBodyLRAConstraintTest10InitializeEv(ptr noundef nonnull align 8 dereferenceable(112) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %class.anon.6, align 1
  %5 = alloca %class.anon.8, align 1
  %6 = alloca %"struct.JPH::SoftBodySharedSettings::VertexAttributes", align 4
  %7 = alloca %"class.JPH::Ref", align 8
  %8 = alloca %"class.std::function", align 8
  %9 = alloca %"class.std::function.11", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.JPH::SoftBodyCreationSettings", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Quat", align 16
  %15 = alloca %"class.JPH::BodyID", align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %16 = load ptr, ptr %2, align 8
  %17 = call noundef nonnull align 16 dereferenceable(122) ptr @_ZN4Test11CreateFloorEf(ptr noundef nonnull align 8 dereferenceable(112) %16, float noundef 2.000000e+02)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %60, %1
  %19 = load i32, ptr %3, align 4, !tbaa !9
  %20 = icmp slt i32 %19, 2
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %77

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 20, ptr %6) #8
  call void @_ZN3JPH22SoftBodySharedSettings16VertexAttributesC2Ev(ptr noundef nonnull align 4 dereferenceable(20) %6) #8
  %23 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::VertexAttributes", ptr %6, i32 0, i32 0
  store float 0x3F50624DE0000000, ptr %23, align 4, !tbaa !11
  %24 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::VertexAttributes", ptr %6, i32 0, i32 1
  store float 0x3F50624DE0000000, ptr %24, align 4, !tbaa !15
  %25 = load i32, ptr %3, align 4, !tbaa !9
  %26 = icmp eq i32 %25, 0
  %27 = zext i1 %26 to i64
  %28 = select i1 %26, i32 0, i32 1
  %29 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::VertexAttributes", ptr %6, i32 0, i32 3
  store i32 %28, ptr %29, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #8
  call void @"_ZNSt8functionIFfjjEEC2IRZN25SoftBodyLRAConstraintTest10InitializeEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #8
  call void @"_ZNSt8functionIFN3JPH4Vec3EjjEEC2IRZN25SoftBodyLRAConstraintTest10InitializeEvE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  invoke void @_ZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesE(ptr dead_on_unwind writable sret(%"class.JPH::Ref") align 8 %7, i32 noundef 10, i32 noundef 50, float noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(20) %6)
          to label %30 unwind label %63

30:                                               ; preds = %22
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 112, ptr %12) #8
  %31 = invoke noundef ptr @_ZNK3JPH3RefINS_22SoftBodySharedSettingsEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %32 unwind label %67

32:                                               ; preds = %30
  %33 = load i32, ptr %3, align 4, !tbaa !9
  %34 = sitofp i32 %33 to float
  %35 = call float @llvm.fmuladd.f32(float %34, float 2.000000e+01, float -1.000000e+01)
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %13, float noundef %35, float noundef 2.500000e+01, float noundef 0.000000e+00)
          to label %36 unwind label %67

36:                                               ; preds = %32
  %37 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %38 unwind label %67

38:                                               ; preds = %36
  %39 = getelementptr inbounds %"class.JPH::Quat", ptr %14, i32 0, i32 0
  %40 = getelementptr inbounds %"class.JPH::Vec4", ptr %39, i32 0, i32 0
  %41 = getelementptr inbounds %union.anon.4, ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %43 = extractvalue { double, double } %37, 0
  store double %43, ptr %42, align 16
  %44 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %45 = extractvalue { double, double } %37, 1
  store double %45, ptr %44, align 8
  %46 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %47 = load double, ptr %46, align 16
  %48 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %49 = load double, ptr %48, align 8
  %50 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %51 = load double, ptr %50, align 16
  %52 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %53 = load double, ptr %52, align 8
  invoke void @_ZN3JPH24SoftBodyCreationSettingsC2EPKNS_22SoftBodySharedSettingsENS_4Vec3ENS_4QuatEt(ptr noundef nonnull align 16 dereferenceable(111) %12, ptr noundef %31, double %47, double %49, double %51, double %53, i16 noundef zeroext 1)
          to label %54 unwind label %67

54:                                               ; preds = %38
  %55 = getelementptr inbounds %class.Test, ptr %16, i32 0, i32 3
  %56 = load ptr, ptr %55, align 8, !tbaa !17
  %57 = invoke i32 @_ZN3JPH13BodyInterface20CreateAndAddSoftBodyERKNS_24SoftBodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 16 dereferenceable(111) %12, i32 noundef 0)
          to label %58 unwind label %71

58:                                               ; preds = %54
  %59 = getelementptr inbounds %"class.JPH::BodyID", ptr %15, i32 0, i32 0
  store i32 %57, ptr %59, align 4
  call void @_ZN3JPH24SoftBodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(111) %12) #8
  call void @llvm.lifetime.end.p0(i64 112, ptr %12) #8
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 20, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #8
  br label %60

60:                                               ; preds = %58
  %61 = load i32, ptr %3, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %3, align 4, !tbaa !9
  br label %18, !llvm.loop !25

63:                                               ; preds = %22
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %10, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %11, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #8
  br label %76

67:                                               ; preds = %38, %36, %32, %30
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %10, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %11, align 4
  br label %75

71:                                               ; preds = %54
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %10, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %11, align 4
  call void @_ZN3JPH24SoftBodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(111) %12) #8
  br label %75

75:                                               ; preds = %71, %67
  call void @llvm.lifetime.end.p0(i64 112, ptr %12) #8
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br label %76

76:                                               ; preds = %75, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 20, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %78

77:                                               ; preds = %21
  ret void

78:                                               ; preds = %76
  %79 = load ptr, ptr %10, align 8
  %80 = load i32, ptr %11, align 4
  %81 = insertvalue { ptr, i32 } poison, ptr %79, 0
  %82 = insertvalue { ptr, i32 } %81, i32 %80, 1
  resume { ptr, i32 } %82
}

declare noundef nonnull align 16 dereferenceable(122) ptr @_ZN4Test11CreateFloorEf(ptr noundef nonnull align 8 dereferenceable(112), float noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH22SoftBodySharedSettings16VertexAttributesC2Ev(ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #3 align 2

declare void @_ZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesE(ptr dead_on_unwind writable sret(%"class.JPH::Ref") align 8, i32 noundef, i32 noundef, float noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 4 dereferenceable(20)) #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFfjjEEC2IRZN25SoftBodyLRAConstraintTest10InitializeEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFN3JPH4Vec3EjjEEC2IRZN25SoftBodyLRAConstraintTest10InitializeEvE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sIdentityEv() #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH24SoftBodyCreationSettingsC2EPKNS_22SoftBodySharedSettingsENS_4Vec3ENS_4QuatEt(ptr noundef nonnull align 16 dereferenceable(111), ptr noundef, double, double, double, double, i16 noundef zeroext) unnamed_addr #1 align 2

declare i32 @_ZN3JPH13BodyInterface20CreateAndAddSoftBodyERKNS_24SoftBodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(111), i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH24SoftBodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(111)) unnamed_addr #4 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN3JPH22SoftBodySharedSettings16VertexAttributesE", !13, i64 0, !13, i64 4, !13, i64 8, !14, i64 12, !13, i64 16}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTSN3JPH22SoftBodySharedSettings8ELRATypeE", !7, i64 0}
!15 = !{!12, !13, i64 4}
!16 = !{!12, !14, i64 12}
!17 = !{!18, !6, i64 24}
!18 = !{!"_ZTS4Test", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !19, i64 48, !20, i64 56}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !21, i64 0}
!21 = !{!"_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, !22, i64 8, !23, i64 16, !22, i64 24, !24, i64 32, !6, i64 48}
!22 = !{!"long", !7, i64 0}
!23 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!24 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !13, i64 0, !22, i64 8}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.anon.6 = type { i8 }
%class.anon.8 = type { i8 }
%"struct.JPH::SoftBodySharedSettings::VertexAttributes" = type { float, float, float, i32, float }
%"class.JPH::Ref" = type { 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 } }
%"class.std::function.11" = type { %"class.std::_Function_base", ptr }
%"class.JPH::SoftBodyCreationSettings" = type <{ %"class.JPH::RefConst.14", [8 x i8], %"class.JPH::Vec3", %"class.JPH::Quat", i64, i16, [6 x i8], %"class.JPH::CollisionGroup", i32, float, float, float, float, float, float, i8, i8, i8, i8 }>
%"class.JPH::RefConst.14" = type { ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst.5", i32, i32 }
%"class.JPH::RefConst.5" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN25SoftBodyLRAConstraintTest10InitializeEv(ptr noundef nonnull align 8 dereferenceable(112) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.anon.6, align 1
  %3 = alloca %class.anon.8, align 1
  %4 = alloca %"struct.JPH::SoftBodySharedSettings::VertexAttributes", align 8
  %5 = alloca %"class.JPH::Ref", align 8
  %6 = alloca %"class.std::function", align 8
  %7 = alloca %"class.std::function.11", align 8
  %8 = alloca %"class.JPH::SoftBodyCreationSettings", align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = tail call noundef nonnull align 16 dereferenceable(122) ptr @_ZN4Test11CreateFloorEf(ptr noundef nonnull align 8 dereferenceable(112) %0, float noundef 2.000000e+02)
  %11 = getelementptr inbounds i8, ptr %4, i64 12
  %12 = getelementptr inbounds i8, ptr %9, i64 8
  %13 = getelementptr inbounds i8, ptr %0, i64 24
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %4) #7
  call void @_ZN3JPH22SoftBodySharedSettings16VertexAttributesC2Ev(ptr noundef nonnull align 4 dereferenceable(20) %4) #7
  store <2 x float> <float 0x3F50624DE0000000, float 0x3F50624DE0000000>, ptr %4, align 8, !tbaa !5
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @"_ZNSt8functionIFfjjEEC2IRZN25SoftBodyLRAConstraintTest10InitializeEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @"_ZNSt8functionIFN3JPH4Vec3EjjEEC2IRZN25SoftBodyLRAConstraintTest10InitializeEvE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  invoke void @_ZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Ref") align 8 %5, i32 noundef 10, i32 noundef 50, float noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(20) %4)
          to label %14 unwind label %40

14:                                               ; preds = %1
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %8) #7
  %15 = call noundef ptr @_ZNK3JPH3RefINS_22SoftBodySharedSettingsEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %9, float noundef -1.000000e+01, float noundef 2.500000e+01, float noundef 0.000000e+00)
          to label %16 unwind label %42

16:                                               ; preds = %14
  %17 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %18 unwind label %42

18:                                               ; preds = %16
  %19 = extractvalue { double, double } %17, 0
  %20 = extractvalue { double, double } %17, 1
  %21 = load double, ptr %9, align 16
  %22 = load double, ptr %12, align 8
  invoke void @_ZN3JPH24SoftBodyCreationSettingsC2EPKNS_22SoftBodySharedSettingsENS_4Vec3ENS_4QuatEt(ptr noundef nonnull align 16 dereferenceable(111) %8, ptr noundef %15, double %21, double %22, double %19, double %20, i16 noundef zeroext 1)
          to label %23 unwind label %42

23:                                               ; preds = %18
  %24 = load ptr, ptr %13, align 8, !tbaa !12
  %25 = invoke i32 @_ZN3JPH13BodyInterface20CreateAndAddSoftBodyERKNS_24SoftBodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 16 dereferenceable(111) %8, i32 noundef 0)
          to label %26 unwind label %44

26:                                               ; preds = %23
  call void @_ZN3JPH24SoftBodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(111) %8) #7
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %8) #7
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %4) #7
  call void @_ZN3JPH22SoftBodySharedSettings16VertexAttributesC2Ev(ptr noundef nonnull align 4 dereferenceable(20) %4) #7
  store <2 x float> <float 0x3F50624DE0000000, float 0x3F50624DE0000000>, ptr %4, align 8, !tbaa !5
  store i32 1, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @"_ZNSt8functionIFfjjEEC2IRZN25SoftBodyLRAConstraintTest10InitializeEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @"_ZNSt8functionIFN3JPH4Vec3EjjEEC2IRZN25SoftBodyLRAConstraintTest10InitializeEvE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  invoke void @_ZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Ref") align 8 %5, i32 noundef 10, i32 noundef 50, float noundef 5.000000e-01, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(20) %4)
          to label %27 unwind label %40

27:                                               ; preds = %26
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %8) #7
  %28 = call noundef ptr @_ZNK3JPH3RefINS_22SoftBodySharedSettingsEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %9, float noundef 1.000000e+01, float noundef 2.500000e+01, float noundef 0.000000e+00)
          to label %29 unwind label %42

29:                                               ; preds = %27
  %30 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %31 unwind label %42

31:                                               ; preds = %29
  %32 = extractvalue { double, double } %30, 0
  %33 = extractvalue { double, double } %30, 1
  %34 = load double, ptr %9, align 16
  %35 = load double, ptr %12, align 8
  invoke void @_ZN3JPH24SoftBodyCreationSettingsC2EPKNS_22SoftBodySharedSettingsENS_4Vec3ENS_4QuatEt(ptr noundef nonnull align 16 dereferenceable(111) %8, ptr noundef %28, double %34, double %35, double %32, double %33, i16 noundef zeroext 1)
          to label %36 unwind label %42

36:                                               ; preds = %31
  %37 = load ptr, ptr %13, align 8, !tbaa !12
  %38 = invoke i32 @_ZN3JPH13BodyInterface20CreateAndAddSoftBodyERKNS_24SoftBodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 16 dereferenceable(111) %8, i32 noundef 0)
          to label %39 unwind label %44

39:                                               ; preds = %36
  call void @_ZN3JPH24SoftBodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(111) %8) #7
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %8) #7
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  ret void

40:                                               ; preds = %26, %1
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br label %47

42:                                               ; preds = %31, %29, %27, %18, %16, %14
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %46

44:                                               ; preds = %36, %23
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH24SoftBodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(111) %8) #7
  br label %46

46:                                               ; preds = %44, %42
  %.pn = phi { ptr, i32 } [ %45, %44 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %8) #7
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br label %47

47:                                               ; preds = %46, %40
  %.pn.pn = phi { ptr, i32 } [ %.pn, %46 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn.pn
}

declare noundef nonnull align 16 dereferenceable(122) ptr @_ZN4Test11CreateFloorEf(ptr noundef nonnull align 8 dereferenceable(112), float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH22SoftBodySharedSettings16VertexAttributesC2Ev(ptr noundef nonnull align 4 dereferenceable(20)) unnamed_addr #3 align 2

declare void @_ZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesE(ptr dead_on_unwind writable sret(%"class.JPH::Ref") align 8, i32 noundef, i32 noundef, float noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFfjjEEC2IRZN25SoftBodyLRAConstraintTest10InitializeEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFN3JPH4Vec3EjjEEC2IRZN25SoftBodyLRAConstraintTest10InitializeEvE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sIdentityEv() local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH24SoftBodyCreationSettingsC2EPKNS_22SoftBodySharedSettingsENS_4Vec3ENS_4QuatEt(ptr noundef nonnull align 16 dereferenceable(111), ptr noundef, double, double, double, double, i16 noundef zeroext) unnamed_addr #1 align 2

declare i32 @_ZN3JPH13BodyInterface20CreateAndAddSoftBodyERKNS_24SoftBodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(111), i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH24SoftBodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(111)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) 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 = { "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 uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 12}
!10 = !{!"_ZTSN3JPH22SoftBodySharedSettings16VertexAttributesE", !6, i64 0, !6, i64 4, !6, i64 8, !11, i64 12, !6, i64 16}
!11 = !{!"_ZTSN3JPH22SoftBodySharedSettings8ELRATypeE", !7, i64 0}
!12 = !{!13, !14, i64 24}
!13 = !{!"_ZTS4Test", !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !15, i64 48, !16, i64 56}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !17, i64 0}
!17 = !{!"_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", !14, i64 0, !18, i64 8, !19, i64 16, !18, i64 24, !20, i64 32, !14, i64 48}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !14, i64 0}
!20 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !6, i64 0, !18, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass