; LLVM IR from jrouwe/JoltPhysics :: Samples/Tests/Constraints (ConstraintPriorityTest)

; 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.42 }
%union.anon.42 = type { i32 }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.std::basic_string_view" = type { i64, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider", i64, %union.anon.45 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.45 = type { i64, [8 x i8] }
%class.ConstraintPriorityTest = type { %class.Test, %"class.JPH::Array" }
%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::Array" = type { i64, i64, ptr }
%"class.JPH::Ref.28" = type { ptr }

@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1
@_ZN3JPH5Color6sWhiteE = 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

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: 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 @_ZN22ConstraintPriorityTest17PostPhysicsUpdateEf(ptr noundef nonnull align 8 dereferenceable(136) %0, float noundef %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.std::basic_string_view", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.JPH::Color", align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !9
  %18 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %19 = getelementptr inbounds %class.ConstraintPriorityTest, ptr %18, i32 0, i32 1
  store ptr %19, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = call noundef ptr @_ZN3JPH5ArrayINS_3RefINS_15FixedConstraintEEENS_12STLAllocatorIS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  store ptr %21, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call noundef ptr @_ZN3JPH5ArrayINS_3RefINS_15FixedConstraintEEENS_12STLAllocatorIS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %22)
  store ptr %23, ptr %7, align 8, !tbaa !5
  br label %24

24:                                               ; preds = %92, %2
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = icmp ne ptr %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %99

29:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = call noundef ptr @_ZNK3JPH3RefINS_15FixedConstraintEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %30)
  store ptr %31, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %class.Test, ptr %18, i32 0, i32 4
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = call noundef ptr @_ZNK3JPH17TwoBodyConstraint8GetBody1Ev(ptr noundef nonnull align 8 dereferenceable(48) %34)
  %36 = call { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %35)
  %37 = getelementptr inbounds %"class.JPH::Vec3", ptr %11, i32 0, i32 0
  %38 = getelementptr inbounds %union.anon, ptr %37, i32 0, i32 0
  %39 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 0
  %40 = extractvalue { double, double } %36, 0
  store double %40, ptr %39, align 16
  %41 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 1
  %42 = extractvalue { double, double } %36, 1
  store double %42, ptr %41, align 8
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = call noundef ptr @_ZNK3JPH17TwoBodyConstraint8GetBody2Ev(ptr noundef nonnull align 8 dereferenceable(48) %43)
  %45 = call { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %44)
  %46 = getelementptr inbounds %"class.JPH::Vec3", ptr %12, i32 0, i32 0
  %47 = getelementptr inbounds %union.anon, ptr %46, i32 0, i32 0
  %48 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %49 = extractvalue { double, double } %45, 0
  store double %49, ptr %48, align 16
  %50 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %51 = extractvalue { double, double } %45, 1
  store double %51, ptr %50, align 8
  %52 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %53 = load double, ptr %52, align 16
  %54 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %55 = load double, ptr %54, align 8
  %56 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %53, double %55)
  %57 = getelementptr inbounds %"class.JPH::Vec3", ptr %10, i32 0, i32 0
  %58 = getelementptr inbounds %union.anon, ptr %57, i32 0, i32 0
  %59 = getelementptr inbounds { double, double }, ptr %58, i32 0, i32 0
  %60 = extractvalue { double, double } %56, 0
  store double %60, ptr %59, align 16
  %61 = getelementptr inbounds { double, double }, ptr %58, i32 0, i32 1
  %62 = extractvalue { double, double } %56, 1
  store double %62, ptr %61, align 8
  %63 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %64 = load double, ptr %63, align 16
  %65 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %66 = load double, ptr %65, align 8
  %67 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef 5.000000e-01, double %64, double %66)
  %68 = getelementptr inbounds %"class.JPH::Vec3", ptr %9, i32 0, i32 0
  %69 = getelementptr inbounds %union.anon, ptr %68, i32 0, i32 0
  %70 = getelementptr inbounds { double, double }, ptr %69, i32 0, i32 0
  %71 = extractvalue { double, double } %67, 0
  store double %71, ptr %70, align 16
  %72 = getelementptr inbounds { double, double }, ptr %69, i32 0, i32 1
  %73 = extractvalue { double, double } %67, 1
  store double %73, ptr %72, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #8
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = call noundef i32 @_ZNK3JPH10Constraint21GetConstraintPriorityEv(ptr noundef nonnull align 8 dereferenceable(32) %74)
  call void (ptr, ptr, ...) @_ZN3JPH12StringFormatB5cxx11EPKcz(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef @.str.1, i32 noundef %75)
  %76 = call { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  %77 = getelementptr inbounds { i64, ptr }, ptr %13, i32 0, i32 0
  %78 = extractvalue { i64, ptr } %76, 0
  store i64 %78, ptr %77, align 8
  %79 = getelementptr inbounds { i64, ptr }, ptr %13, i32 0, i32 1
  %80 = extractvalue { i64, ptr } %76, 1
  store ptr %80, ptr %79, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 @_ZN3JPH5Color6sWhiteE, i64 4, i1 false), !tbaa.struct !19
  %81 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %82 = load double, ptr %81, align 16
  %83 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %84 = load double, ptr %83, align 8
  %85 = getelementptr inbounds %"class.JPH::Color", ptr %15, i32 0, i32 0
  %86 = getelementptr inbounds %union.anon.42, ptr %85, i32 0, i32 0
  %87 = load i32, ptr %86, align 4
  %88 = load ptr, ptr %33, align 8, !tbaa !21
  %89 = getelementptr inbounds ptr, ptr %88, i64 7
  %90 = load ptr, ptr %89, align 8
  invoke void %90(ptr noundef nonnull align 8 dereferenceable(320) %33, double %82, double %84, ptr noundef nonnull align 8 dereferenceable(16) %13, i32 %87, float noundef 0x3FC99999A0000000)
          to label %91 unwind label %95

91:                                               ; preds = %29
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %92

92:                                               ; preds = %91
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %"class.JPH::Ref.28", ptr %93, i32 1
  store ptr %94, ptr %6, align 8, !tbaa !5
  br label %24

95:                                               ; preds = %29
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %16, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %17, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %100

99:                                               ; preds = %28
  ret void

100:                                              ; preds = %95
  %101 = load ptr, ptr %16, align 8
  %102 = load i32, ptr %17, align 4
  %103 = insertvalue { ptr, i32 } poison, ptr %101, 0
  %104 = insertvalue { ptr, i32 } %103, i32 %102, 1
  resume { ptr, i32 } %104
}

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef, double, double) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122)) #6 align 2

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

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

declare void @_ZN3JPH12StringFormatB5cxx11EPKcz(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ...) #7

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5 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 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 = { 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 #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { "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 = !{!"float", !7, i64 0}
!11 = !{!12, !6, i64 32}
!12 = !{!"_ZTS4Test", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !13, i64 48, !14, i64 56}
!13 = !{!"bool", !7, i64 0}
!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", !10, i64 0, !16, i64 8}
!19 = !{i64 0, i64 4, !20}
!20 = !{!7, !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !8, i64 0}


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

%"class.JPH::Color" = type { %union.anon.42 }
%union.anon.42 = type { i32 }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.std::basic_string_view" = type { i64, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider", i64, %union.anon.45 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.45 = type { i64, [8 x i8] }

@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1
@_ZN3JPH5Color6sWhiteE = 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

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 @_ZN22ConstraintPriorityTest17PostPhysicsUpdateEf(ptr noundef nonnull align 8 dereferenceable(136) %0, float noundef %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.JPH::Vec3", align 16
  %4 = alloca %"class.std::basic_string_view", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 112
  %7 = tail call noundef ptr @_ZN3JPH5ArrayINS_3RefINS_15FixedConstraintEEENS_12STLAllocatorIS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %8 = tail call noundef ptr @_ZN3JPH5ArrayINS_3RefINS_15FixedConstraintEEENS_12STLAllocatorIS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %.not16 = icmp eq ptr %7, %8
  br i1 %.not16, label %._crit_edge, label %.lr.ph

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

._crit_edge:                                      ; preds = %36, %2
  ret void

12:                                               ; preds = %.lr.ph, %36
  %.017 = phi ptr [ %7, %.lr.ph ], [ %37, %36 ]
  %13 = call noundef ptr @_ZNK3JPH3RefINS_15FixedConstraintEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %.017)
  %14 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %15 = call noundef ptr @_ZNK3JPH17TwoBodyConstraint8GetBody1Ev(ptr noundef nonnull align 8 dereferenceable(48) %13)
  %16 = call { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %15)
  %17 = extractvalue { double, double } %16, 0
  store double %17, ptr %3, align 16
  %18 = extractvalue { double, double } %16, 1
  store double %18, ptr %10, align 8
  %19 = call noundef ptr @_ZNK3JPH17TwoBodyConstraint8GetBody2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13)
  %20 = call { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %19)
  %21 = extractvalue { double, double } %20, 0
  %22 = extractvalue { double, double } %20, 1
  %23 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %3, double %21, double %22)
  %24 = extractvalue { double, double } %23, 0
  %25 = extractvalue { double, double } %23, 1
  %26 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef 5.000000e-01, double %24, double %25)
  %27 = extractvalue { double, double } %26, 0
  %28 = extractvalue { double, double } %26, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  %29 = call noundef i32 @_ZNK3JPH10Constraint21GetConstraintPriorityEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
  call void (ptr, ptr, ...) @_ZN3JPH12StringFormatB5cxx11EPKcz(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull @.str.1, i32 noundef %29)
  %30 = call { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  %31 = extractvalue { i64, ptr } %30, 0
  store i64 %31, ptr %4, align 8
  %32 = extractvalue { i64, ptr } %30, 1
  store ptr %32, ptr %11, align 8
  %.sroa.0.0.copyload = load i32, ptr @_ZN3JPH5Color6sWhiteE, align 4, !tbaa !17
  %33 = load ptr, ptr %14, align 8, !tbaa !18
  %34 = getelementptr inbounds i8, ptr %33, i64 56
  %35 = load ptr, ptr %34, align 8
  invoke void %35(ptr noundef nonnull align 8 dereferenceable(320) %14, double %27, double %28, ptr noundef nonnull align 8 dereferenceable(16) %4, i32 %.sroa.0.0.copyload, float noundef 0x3FC99999A0000000)
          to label %36 unwind label %38

36:                                               ; preds = %12
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  %37 = getelementptr inbounds i8, ptr %.017, i64 8
  %.not = icmp eq ptr %37, %8
  br i1 %.not, label %._crit_edge, label %12

38:                                               ; preds = %12
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  resume { ptr, i32 } %39
}

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef, double, double) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #5 align 2

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

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

declare void @_ZN3JPH12StringFormatB5cxx11EPKcz(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ...) local_unnamed_addr #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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 = { 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 #3 = { 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 #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 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 = { "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, !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}
!18 = !{!19, !19, i64 0}
!19 = !{!"vtable pointer", !9, i64 0}


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