; LLVM IR from jrouwe/JoltPhysics :: Samples/Tests/Vehicle/VehicleTest.ll (ZN11VehicleTest12CreateBridgeEv)

; 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::Ref.27" = type { ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::RefConst.6" = type { ptr }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::BodyCreationSettings" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Vec3", i64, i16, %"class.JPH::CollisionGroup", i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, float, i32, i32, i8, float, %"class.JPH::MassProperties", %"class.JPH::RefConst.5", %"class.JPH::RefConst.6" }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst", i32, i32 }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.5" = type { ptr }
%"class.JPH::DistanceConstraintSettings" = type <{ %"class.JPH::TwoBodyConstraintSettings", i32, [4 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, %"class.JPH::SpringSettings", [12 x i8] }>
%"class.JPH::TwoBodyConstraintSettings" = type { %"class.JPH::ConstraintSettings" }
%"class.JPH::ConstraintSettings" = type { %"class.JPH::SerializableObject", %"class.JPH::RefTarget.32", i8, i32, i32, i32, float, i64 }
%"class.JPH::SerializableObject" = type { ptr }
%"class.JPH::RefTarget.32" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::SpringSettings" = type { i8, %union.anon.33, float }
%union.anon.33 = type { float }
%class.Test = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

; 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

declare noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(256)) #1

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef) #2 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 #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80), double, double, float noundef, ptr noundef) unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH8BoxShapedlEPv(ptr noundef) #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256), ptr noundef, double, double, double, double, i8 noundef zeroext, i16 noundef zeroext) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH4Body11SetFrictionEf(ptr noundef nonnull align 16 dereferenceable(122), float noundef) #7 align 2

declare void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122)) #6 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3JPH16DegreesToRadiansEf(float noundef) #5

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double, double, float noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11VehicleTest12CreateBridgeEv(ptr noundef nonnull align 8 dereferenceable(136) %0) #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.JPH::Ref.27", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"class.JPH::RefConst.6", align 8
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::RefConst.6", align 8
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Quat", align 16
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca ptr, align 8
  %22 = alloca %"class.JPH::BodyCreationSettings", align 16
  %23 = alloca i1, align 1
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca %"class.JPH::Vec3", align 16
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca %"class.JPH::Quat", align 16
  %28 = alloca i1, align 1
  %29 = alloca %"class.JPH::BodyCreationSettings", align 16
  %30 = alloca i1, align 1
  %31 = alloca %"class.JPH::Vec3", align 16
  %32 = alloca %"class.JPH::Quat", align 16
  %33 = alloca i1, align 1
  %34 = alloca %"class.JPH::CollisionGroup", align 8
  %35 = alloca %"class.JPH::DistanceConstraintSettings", align 16
  %36 = alloca %"class.JPH::Vec3", align 16
  %37 = alloca %"class.JPH::Vec3", align 16
  %38 = alloca %"class.JPH::Vec3", align 16
  %39 = alloca %"class.JPH::Vec3", align 16
  %40 = alloca %"class.JPH::Vec3", align 16
  %41 = alloca %"class.JPH::Vec3", align 16
  %42 = alloca %"class.JPH::Vec3", align 16
  %43 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %2, align 8, !tbaa !5
  %44 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #11
  store i32 20, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #11
  %45 = call noundef ptr @_ZN3JPH16GroupFilterTablenwEm(i64 noundef 40)
  invoke void @_ZN3JPH16GroupFilterTableC2Ej(ptr noundef nonnull align 8 dereferenceable(40) %45, i32 noundef 20)
          to label %46 unwind label %51

46:                                               ; preds = %1
  call void @_ZN3JPH3RefINS_16GroupFilterTableEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %45)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #11
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %62, %46
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = icmp ult i32 %48, 19
  br i1 %49, label %55, label %50

50:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #11
  br label %69

51:                                               ; preds = %1
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %5, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %6, align 4
  call void @_ZN3JPH16GroupFilterTabledlEPv(ptr noundef %45) #11
  br label %462

55:                                               ; preds = %47
  %56 = invoke noundef ptr @_ZNK3JPH3RefINS_16GroupFilterTableEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %57 unwind label %65

57:                                               ; preds = %55
  %58 = load i32, ptr %7, align 4, !tbaa !9
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = add i32 %59, 1
  invoke void @_ZN3JPH16GroupFilterTable16DisableCollisionEjj(ptr noundef nonnull align 8 dereferenceable(40) %56, i32 noundef %58, i32 noundef %60)
          to label %61 unwind label %65

61:                                               ; preds = %57
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %7, align 4, !tbaa !9
  %64 = add i32 %63, 1
  store i32 %64, ptr %7, align 4, !tbaa !9
  br label %47, !llvm.loop !11

65:                                               ; preds = %57, %55
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %5, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #11
  br label %461

69:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #11
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %8, float noundef 2.500000e+00, float noundef 2.500000e-01, float noundef 1.000000e+00)
          to label %70 unwind label %116

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #11
  %71 = invoke noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef 80)
          to label %72 unwind label %120

72:                                               ; preds = %70
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 %8, i64 16, i1 false), !tbaa.struct !13
  %73 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %74 = load double, ptr %73, align 16
  %75 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %76 = load double, ptr %75, align 8
  invoke void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80) %71, double %74, double %76, float noundef 0x3FA99999A0000000, ptr noundef null)
          to label %77 unwind label %124

77:                                               ; preds = %72
  invoke void @_ZN3JPH8RefConstINS_5ShapeEEC2EPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %71)
          to label %78 unwind label %120

78:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #11
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %11, float noundef 2.500000e+00, float noundef 2.500000e-01, float noundef 2.250000e+01)
          to label %79 unwind label %128

79:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #11
  %80 = invoke noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef 80)
          to label %81 unwind label %132

81:                                               ; preds = %79
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !13
  %82 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %83 = load double, ptr %82, align 16
  %84 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %85 = load double, ptr %84, align 8
  invoke void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80) %80, double %83, double %85, float noundef 0x3FA99999A0000000, ptr noundef null)
          to label %86 unwind label %136

86:                                               ; preds = %81
  invoke void @_ZN3JPH8RefConstINS_5ShapeEEC2EPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef %80)
          to label %87 unwind label %132

87:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #11
  %88 = invoke { double, double } @_ZN3JPH4Vec36sAxisXEv()
          to label %89 unwind label %140

89:                                               ; preds = %87
  %90 = getelementptr inbounds %"class.JPH::Vec3", ptr %15, i32 0, i32 0
  %91 = getelementptr inbounds %union.anon, ptr %90, i32 0, i32 0
  %92 = getelementptr inbounds { double, double }, ptr %91, i32 0, i32 0
  %93 = extractvalue { double, double } %88, 0
  store double %93, ptr %92, align 16
  %94 = getelementptr inbounds { double, double }, ptr %91, i32 0, i32 1
  %95 = extractvalue { double, double } %88, 1
  store double %95, ptr %94, align 8
  %96 = invoke noundef float @_ZN3JPH16DegreesToRadiansEf(float noundef -1.000000e+01)
          to label %97 unwind label %140

97:                                               ; preds = %89
  %98 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %99 = load double, ptr %98, align 16
  %100 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %101 = load double, ptr %100, align 8
  %102 = invoke { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double %99, double %101, float noundef %96)
          to label %103 unwind label %140

103:                                              ; preds = %97
  %104 = getelementptr inbounds %"class.JPH::Quat", ptr %14, i32 0, i32 0
  %105 = getelementptr inbounds %"class.JPH::Vec4", ptr %104, i32 0, i32 0
  %106 = getelementptr inbounds %union.anon.4, ptr %105, i32 0, i32 0
  %107 = getelementptr inbounds { double, double }, ptr %106, i32 0, i32 0
  %108 = extractvalue { double, double } %102, 0
  store double %108, ptr %107, align 16
  %109 = getelementptr inbounds { double, double }, ptr %106, i32 0, i32 1
  %110 = extractvalue { double, double } %102, 1
  store double %110, ptr %109, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #11
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %16, float noundef -2.500000e+01, float noundef 7.000000e+00, float noundef 0.000000e+00)
          to label %111 unwind label %144

111:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #11
  store ptr null, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #11
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %112

112:                                              ; preds = %449, %111
  %113 = load i32, ptr %18, align 4, !tbaa !9
  %114 = icmp slt i32 %113, 20
  br i1 %114, label %148, label %115

115:                                              ; preds = %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #11
  br label %454

116:                                              ; preds = %69
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %5, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %6, align 4
  br label %460

120:                                              ; preds = %77, %70
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %5, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %6, align 4
  br label %459

124:                                              ; preds = %72
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %5, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %6, align 4
  call void @_ZN3JPH8BoxShapedlEPv(ptr noundef %71) #11
  br label %459

128:                                              ; preds = %78
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %5, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %6, align 4
  br label %458

132:                                              ; preds = %86, %79
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %5, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %6, align 4
  br label %457

136:                                              ; preds = %81
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %5, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %6, align 4
  call void @_ZN3JPH8BoxShapedlEPv(ptr noundef %80) #11
  br label %457

140:                                              ; preds = %97, %89, %87
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %5, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %6, align 4
  br label %456

144:                                              ; preds = %103
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %5, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %6, align 4
  br label %455

148:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #11
  %149 = invoke noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
          to label %150 unwind label %373

150:                                              ; preds = %148
  %151 = fmul float 2.000000e+00, %149
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %20, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef %151)
          to label %152 unwind label %373

152:                                              ; preds = %150
  %153 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %154 = load double, ptr %153, align 16
  %155 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %156 = load double, ptr %155, align 8
  %157 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %154, double %156)
          to label %158 unwind label %373

158:                                              ; preds = %152
  %159 = getelementptr inbounds %"class.JPH::Vec3", ptr %19, i32 0, i32 0
  %160 = getelementptr inbounds %union.anon, ptr %159, i32 0, i32 0
  %161 = getelementptr inbounds { double, double }, ptr %160, i32 0, i32 0
  %162 = extractvalue { double, double } %157, 0
  store double %162, ptr %161, align 16
  %163 = getelementptr inbounds { double, double }, ptr %160, i32 0, i32 1
  %164 = extractvalue { double, double } %157, 1
  store double %164, ptr %163, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #11
  %165 = load i32, ptr %18, align 4, !tbaa !9
  %166 = icmp eq i32 %165, 0
  store i1 false, ptr %23, align 1
  store i1 false, ptr %28, align 1
  store i1 false, ptr %30, align 1
  store i1 false, ptr %33, align 1
  br i1 %166, label %167, label %218

167:                                              ; preds = %158
  %168 = getelementptr inbounds %class.Test, ptr %44, i32 0, i32 3
  %169 = load ptr, ptr %168, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 256, ptr %22) #11
  store i1 true, ptr %23, align 1
  %170 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %171 unwind label %377

171:                                              ; preds = %167
  %172 = invoke noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %11)
          to label %173 unwind label %377

173:                                              ; preds = %171
  %174 = invoke noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
          to label %175 unwind label %377

175:                                              ; preds = %173
  %176 = fsub float %172, %174
  %177 = invoke noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %11)
          to label %178 unwind label %377

178:                                              ; preds = %175
  %179 = invoke noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
          to label %180 unwind label %377

180:                                              ; preds = %178
  %181 = fsub float %177, %179
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %26, float noundef 0.000000e+00, float noundef %176, float noundef %181)
          to label %182 unwind label %377

182:                                              ; preds = %180
  %183 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %184 = load double, ptr %183, align 16
  %185 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %186 = load double, ptr %185, align 8
  %187 = invoke { double, double } @_ZNK3JPH4QuatmlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %14, double %184, double %186)
          to label %188 unwind label %377

188:                                              ; preds = %182
  %189 = getelementptr inbounds %"class.JPH::Vec3", ptr %25, i32 0, i32 0
  %190 = getelementptr inbounds %union.anon, ptr %189, i32 0, i32 0
  %191 = getelementptr inbounds { double, double }, ptr %190, i32 0, i32 0
  %192 = extractvalue { double, double } %187, 0
  store double %192, ptr %191, align 16
  %193 = getelementptr inbounds { double, double }, ptr %190, i32 0, i32 1
  %194 = extractvalue { double, double } %187, 1
  store double %194, ptr %193, align 8
  %195 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %196 = load double, ptr %195, align 16
  %197 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %198 = load double, ptr %197, align 8
  %199 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %19, double %196, double %198)
          to label %200 unwind label %377

200:                                              ; preds = %188
  %201 = getelementptr inbounds %"class.JPH::Vec3", ptr %24, i32 0, i32 0
  %202 = getelementptr inbounds %union.anon, ptr %201, i32 0, i32 0
  %203 = getelementptr inbounds { double, double }, ptr %202, i32 0, i32 0
  %204 = extractvalue { double, double } %199, 0
  store double %204, ptr %203, align 16
  %205 = getelementptr inbounds { double, double }, ptr %202, i32 0, i32 1
  %206 = extractvalue { double, double } %199, 1
  store double %206, ptr %205, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !13
  %207 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %208 = load double, ptr %207, align 16
  %209 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %210 = load double, ptr %209, align 8
  %211 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %212 = load double, ptr %211, align 16
  %213 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %214 = load double, ptr %213, align 8
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %22, ptr noundef %170, double %208, double %210, double %212, double %214, i8 noundef zeroext 0, i16 noundef zeroext 0)
          to label %215 unwind label %377

215:                                              ; preds = %200
  store i1 true, ptr %28, align 1
  %216 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %169, ptr noundef nonnull align 16 dereferenceable(256) %22)
          to label %217 unwind label %381

217:                                              ; preds = %215
  br label %251

218:                                              ; preds = %158
  %219 = getelementptr inbounds %class.Test, ptr %44, i32 0, i32 3
  %220 = load ptr, ptr %219, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 256, ptr %29) #11
  store i1 true, ptr %30, align 1
  %221 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %222 unwind label %385

222:                                              ; preds = %218
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %31, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !13
  %223 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %224 unwind label %385

224:                                              ; preds = %222
  %225 = getelementptr inbounds %"class.JPH::Quat", ptr %32, i32 0, i32 0
  %226 = getelementptr inbounds %"class.JPH::Vec4", ptr %225, i32 0, i32 0
  %227 = getelementptr inbounds %union.anon.4, ptr %226, i32 0, i32 0
  %228 = getelementptr inbounds { double, double }, ptr %227, i32 0, i32 0
  %229 = extractvalue { double, double } %223, 0
  store double %229, ptr %228, align 16
  %230 = getelementptr inbounds { double, double }, ptr %227, i32 0, i32 1
  %231 = extractvalue { double, double } %223, 1
  store double %231, ptr %230, align 8
  %232 = load i32, ptr %18, align 4, !tbaa !9
  %233 = icmp eq i32 %232, 19
  %234 = zext i1 %233 to i64
  %235 = select i1 %233, i8 0, i8 2
  %236 = load i32, ptr %18, align 4, !tbaa !9
  %237 = icmp eq i32 %236, 19
  %238 = zext i1 %237 to i64
  %239 = select i1 %237, i16 0, i16 1
  %240 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %241 = load double, ptr %240, align 16
  %242 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %243 = load double, ptr %242, align 8
  %244 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %245 = load double, ptr %244, align 16
  %246 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %247 = load double, ptr %246, align 8
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %29, ptr noundef %221, double %241, double %243, double %245, double %247, i8 noundef zeroext %235, i16 noundef zeroext %239)
          to label %248 unwind label %385

248:                                              ; preds = %224
  store i1 true, ptr %33, align 1
  %249 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %220, ptr noundef nonnull align 16 dereferenceable(256) %29)
          to label %250 unwind label %389

250:                                              ; preds = %248
  br label %251

251:                                              ; preds = %250, %217
  %252 = phi ptr [ %216, %217 ], [ %249, %250 ]
  %253 = load i1, ptr %33, align 1
  br i1 %253, label %254, label %255

254:                                              ; preds = %251
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %29) #11
  br label %255

255:                                              ; preds = %254, %251
  %256 = load i1, ptr %30, align 1
  br i1 %256, label %257, label %258

257:                                              ; preds = %255
  call void @llvm.lifetime.end.p0(i64 256, ptr %29) #11
  br label %258

258:                                              ; preds = %257, %255
  %259 = load i1, ptr %28, align 1
  br i1 %259, label %260, label %261

260:                                              ; preds = %258
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %22) #11
  br label %261

261:                                              ; preds = %260, %258
  %262 = load i1, ptr %23, align 1
  br i1 %262, label %263, label %264

263:                                              ; preds = %261
  call void @llvm.lifetime.end.p0(i64 256, ptr %22) #11
  br label %264

264:                                              ; preds = %263, %261
  store ptr %252, ptr %21, align 8, !tbaa !5
  %265 = load ptr, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #11
  %266 = invoke noundef ptr @_ZNK3JPH3RefINS_16GroupFilterTableEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %267 unwind label %408

267:                                              ; preds = %264
  %268 = load i32, ptr %18, align 4, !tbaa !9
  invoke void @_ZN3JPH14CollisionGroupC2EPKNS_11GroupFilterEjj(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef %266, i32 noundef 1, i32 noundef %268)
          to label %269 unwind label %408

269:                                              ; preds = %267
  invoke void @_ZN3JPH4Body17SetCollisionGroupERKNS_14CollisionGroupE(ptr noundef nonnull align 16 dereferenceable(122) %265, ptr noundef nonnull align 8 dereferenceable(16) %34)
          to label %270 unwind label %412

270:                                              ; preds = %269
  call void @_ZN3JPH14CollisionGroupD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %34) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #11
  %271 = load ptr, ptr %21, align 8, !tbaa !5
  invoke void @_ZN3JPH4Body11SetFrictionEf(ptr noundef nonnull align 16 dereferenceable(122) %271, float noundef 1.000000e+00)
          to label %272 unwind label %417

272:                                              ; preds = %270
  %273 = getelementptr inbounds %class.Test, ptr %44, i32 0, i32 3
  %274 = load ptr, ptr %273, align 8, !tbaa !15
  %275 = load ptr, ptr %21, align 8, !tbaa !5
  %276 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %275)
          to label %277 unwind label %417

277:                                              ; preds = %272
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %274, ptr noundef nonnull align 4 dereferenceable(4) %276, i32 noundef 0)
          to label %278 unwind label %417

278:                                              ; preds = %277
  %279 = load ptr, ptr %17, align 8, !tbaa !5
  %280 = icmp ne ptr %279, null
  br i1 %280, label %281, label %447

281:                                              ; preds = %278
  call void @llvm.lifetime.start.p0(i64 112, ptr %35) #11
  invoke void @_ZN3JPH26DistanceConstraintSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(112) %35)
          to label %282 unwind label %421

282:                                              ; preds = %281
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #11
  %283 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
          to label %284 unwind label %425

284:                                              ; preds = %282
  %285 = fneg float %283
  %286 = invoke noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
          to label %287 unwind label %425

287:                                              ; preds = %284
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %37, float noundef %285, float noundef 0.000000e+00, float noundef %286)
          to label %288 unwind label %425

288:                                              ; preds = %287
  %289 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %290 = load double, ptr %289, align 16
  %291 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %292 = load double, ptr %291, align 8
  %293 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %290, double %292)
          to label %294 unwind label %425

294:                                              ; preds = %288
  %295 = getelementptr inbounds %"class.JPH::Vec3", ptr %36, i32 0, i32 0
  %296 = getelementptr inbounds %union.anon, ptr %295, i32 0, i32 0
  %297 = getelementptr inbounds { double, double }, ptr %296, i32 0, i32 0
  %298 = extractvalue { double, double } %293, 0
  store double %298, ptr %297, align 16
  %299 = getelementptr inbounds { double, double }, ptr %296, i32 0, i32 1
  %300 = extractvalue { double, double } %293, 1
  store double %300, ptr %299, align 8
  %301 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %35, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %301, ptr align 16 %36, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %38) #11
  %302 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
          to label %303 unwind label %429

303:                                              ; preds = %294
  %304 = fneg float %302
  %305 = invoke noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
          to label %306 unwind label %429

306:                                              ; preds = %303
  %307 = fneg float %305
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %39, float noundef %304, float noundef 0.000000e+00, float noundef %307)
          to label %308 unwind label %429

308:                                              ; preds = %306
  %309 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 0
  %310 = load double, ptr %309, align 16
  %311 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 1
  %312 = load double, ptr %311, align 8
  %313 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %19, double %310, double %312)
          to label %314 unwind label %429

314:                                              ; preds = %308
  %315 = getelementptr inbounds %"class.JPH::Vec3", ptr %38, i32 0, i32 0
  %316 = getelementptr inbounds %union.anon, ptr %315, i32 0, i32 0
  %317 = getelementptr inbounds { double, double }, ptr %316, i32 0, i32 0
  %318 = extractvalue { double, double } %313, 0
  store double %318, ptr %317, align 16
  %319 = getelementptr inbounds { double, double }, ptr %316, i32 0, i32 1
  %320 = extractvalue { double, double } %313, 1
  store double %320, ptr %319, align 8
  %321 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %35, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %321, ptr align 16 %38, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #11
  %322 = getelementptr inbounds %class.Test, ptr %44, i32 0, i32 2
  %323 = load ptr, ptr %322, align 8, !tbaa !24
  %324 = load ptr, ptr %17, align 8, !tbaa !5
  %325 = load ptr, ptr %21, align 8, !tbaa !5
  %326 = invoke noundef ptr @_ZNK3JPH26DistanceConstraintSettings6CreateERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(112) %35, ptr noundef nonnull align 16 dereferenceable(122) %324, ptr noundef nonnull align 16 dereferenceable(122) %325)
          to label %327 unwind label %433

327:                                              ; preds = %314
  invoke void @_ZN3JPH13PhysicsSystem13AddConstraintEPNS_10ConstraintE(ptr noundef nonnull align 16 dereferenceable(1172) %323, ptr noundef %326)
          to label %328 unwind label %433

328:                                              ; preds = %327
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #11
  %329 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
          to label %330 unwind label %437

330:                                              ; preds = %328
  %331 = invoke noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
          to label %332 unwind label %437

332:                                              ; preds = %330
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %41, float noundef %329, float noundef 0.000000e+00, float noundef %331)
          to label %333 unwind label %437

333:                                              ; preds = %332
  %334 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %335 = load double, ptr %334, align 16
  %336 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %337 = load double, ptr %336, align 8
  %338 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %335, double %337)
          to label %339 unwind label %437

339:                                              ; preds = %333
  %340 = getelementptr inbounds %"class.JPH::Vec3", ptr %40, i32 0, i32 0
  %341 = getelementptr inbounds %union.anon, ptr %340, i32 0, i32 0
  %342 = getelementptr inbounds { double, double }, ptr %341, i32 0, i32 0
  %343 = extractvalue { double, double } %338, 0
  store double %343, ptr %342, align 16
  %344 = getelementptr inbounds { double, double }, ptr %341, i32 0, i32 1
  %345 = extractvalue { double, double } %338, 1
  store double %345, ptr %344, align 8
  %346 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %35, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %346, ptr align 16 %40, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %42) #11
  %347 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
          to label %348 unwind label %441

348:                                              ; preds = %339
  %349 = invoke noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %8)
          to label %350 unwind label %441

350:                                              ; preds = %348
  %351 = fneg float %349
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %43, float noundef %347, float noundef 0.000000e+00, float noundef %351)
          to label %352 unwind label %441

352:                                              ; preds = %350
  %353 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 0
  %354 = load double, ptr %353, align 16
  %355 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 1
  %356 = load double, ptr %355, align 8
  %357 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %19, double %354, double %356)
          to label %358 unwind label %441

358:                                              ; preds = %352
  %359 = getelementptr inbounds %"class.JPH::Vec3", ptr %42, i32 0, i32 0
  %360 = getelementptr inbounds %union.anon, ptr %359, i32 0, i32 0
  %361 = getelementptr inbounds { double, double }, ptr %360, i32 0, i32 0
  %362 = extractvalue { double, double } %357, 0
  store double %362, ptr %361, align 16
  %363 = getelementptr inbounds { double, double }, ptr %360, i32 0, i32 1
  %364 = extractvalue { double, double } %357, 1
  store double %364, ptr %363, align 8
  %365 = getelementptr inbounds %"class.JPH::DistanceConstraintSettings", ptr %35, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %365, ptr align 16 %42, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #11
  %366 = getelementptr inbounds %class.Test, ptr %44, i32 0, i32 2
  %367 = load ptr, ptr %366, align 8, !tbaa !24
  %368 = load ptr, ptr %17, align 8, !tbaa !5
  %369 = load ptr, ptr %21, align 8, !tbaa !5
  %370 = invoke noundef ptr @_ZNK3JPH26DistanceConstraintSettings6CreateERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(112) %35, ptr noundef nonnull align 16 dereferenceable(122) %368, ptr noundef nonnull align 16 dereferenceable(122) %369)
          to label %371 unwind label %433

371:                                              ; preds = %358
  invoke void @_ZN3JPH13PhysicsSystem13AddConstraintEPNS_10ConstraintE(ptr noundef nonnull align 16 dereferenceable(1172) %367, ptr noundef %370)
          to label %372 unwind label %433

372:                                              ; preds = %371
  call void @_ZN3JPH18ConstraintSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(112) %35) #11
  call void @llvm.lifetime.end.p0(i64 112, ptr %35) #11
  br label %447

373:                                              ; preds = %152, %150, %148
  %374 = landingpad { ptr, i32 }
          cleanup
  %375 = extractvalue { ptr, i32 } %374, 0
  store ptr %375, ptr %5, align 8
  %376 = extractvalue { ptr, i32 } %374, 1
  store i32 %376, ptr %6, align 4
  br label %453

377:                                              ; preds = %200, %188, %182, %180, %178, %175, %173, %171, %167
  %378 = landingpad { ptr, i32 }
          cleanup
  %379 = extractvalue { ptr, i32 } %378, 0
  store ptr %379, ptr %5, align 8
  %380 = extractvalue { ptr, i32 } %378, 1
  store i32 %380, ptr %6, align 4
  br label %404

381:                                              ; preds = %215
  %382 = landingpad { ptr, i32 }
          cleanup
  %383 = extractvalue { ptr, i32 } %382, 0
  store ptr %383, ptr %5, align 8
  %384 = extractvalue { ptr, i32 } %382, 1
  store i32 %384, ptr %6, align 4
  br label %400

385:                                              ; preds = %224, %222, %218
  %386 = landingpad { ptr, i32 }
          cleanup
  %387 = extractvalue { ptr, i32 } %386, 0
  store ptr %387, ptr %5, align 8
  %388 = extractvalue { ptr, i32 } %386, 1
  store i32 %388, ptr %6, align 4
  br label %396

389:                                              ; preds = %248
  %390 = landingpad { ptr, i32 }
          cleanup
  %391 = extractvalue { ptr, i32 } %390, 0
  store ptr %391, ptr %5, align 8
  %392 = extractvalue { ptr, i32 } %390, 1
  store i32 %392, ptr %6, align 4
  %393 = load i1, ptr %33, align 1
  br i1 %393, label %394, label %395

394:                                              ; preds = %389
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %29) #11
  br label %395

395:                                              ; preds = %394, %389
  br label %396

396:                                              ; preds = %395, %385
  %397 = load i1, ptr %30, align 1
  br i1 %397, label %398, label %399

398:                                              ; preds = %396
  call void @llvm.lifetime.end.p0(i64 256, ptr %29) #11
  br label %399

399:                                              ; preds = %398, %396
  br label %400

400:                                              ; preds = %399, %381
  %401 = load i1, ptr %28, align 1
  br i1 %401, label %402, label %403

402:                                              ; preds = %400
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %22) #11
  br label %403

403:                                              ; preds = %402, %400
  br label %404

404:                                              ; preds = %403, %377
  %405 = load i1, ptr %23, align 1
  br i1 %405, label %406, label %407

406:                                              ; preds = %404
  call void @llvm.lifetime.end.p0(i64 256, ptr %22) #11
  br label %407

407:                                              ; preds = %406, %404
  br label %452

408:                                              ; preds = %267, %264
  %409 = landingpad { ptr, i32 }
          cleanup
  %410 = extractvalue { ptr, i32 } %409, 0
  store ptr %410, ptr %5, align 8
  %411 = extractvalue { ptr, i32 } %409, 1
  store i32 %411, ptr %6, align 4
  br label %416

412:                                              ; preds = %269
  %413 = landingpad { ptr, i32 }
          cleanup
  %414 = extractvalue { ptr, i32 } %413, 0
  store ptr %414, ptr %5, align 8
  %415 = extractvalue { ptr, i32 } %413, 1
  store i32 %415, ptr %6, align 4
  call void @_ZN3JPH14CollisionGroupD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %34) #11
  br label %416

416:                                              ; preds = %412, %408
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #11
  br label %452

417:                                              ; preds = %277, %272, %270
  %418 = landingpad { ptr, i32 }
          cleanup
  %419 = extractvalue { ptr, i32 } %418, 0
  store ptr %419, ptr %5, align 8
  %420 = extractvalue { ptr, i32 } %418, 1
  store i32 %420, ptr %6, align 4
  br label %452

421:                                              ; preds = %281
  %422 = landingpad { ptr, i32 }
          cleanup
  %423 = extractvalue { ptr, i32 } %422, 0
  store ptr %423, ptr %5, align 8
  %424 = extractvalue { ptr, i32 } %422, 1
  store i32 %424, ptr %6, align 4
  br label %446

425:                                              ; preds = %288, %287, %284, %282
  %426 = landingpad { ptr, i32 }
          cleanup
  %427 = extractvalue { ptr, i32 } %426, 0
  store ptr %427, ptr %5, align 8
  %428 = extractvalue { ptr, i32 } %426, 1
  store i32 %428, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #11
  br label %445

429:                                              ; preds = %308, %306, %303, %294
  %430 = landingpad { ptr, i32 }
          cleanup
  %431 = extractvalue { ptr, i32 } %430, 0
  store ptr %431, ptr %5, align 8
  %432 = extractvalue { ptr, i32 } %430, 1
  store i32 %432, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #11
  br label %445

433:                                              ; preds = %371, %358, %327, %314
  %434 = landingpad { ptr, i32 }
          cleanup
  %435 = extractvalue { ptr, i32 } %434, 0
  store ptr %435, ptr %5, align 8
  %436 = extractvalue { ptr, i32 } %434, 1
  store i32 %436, ptr %6, align 4
  br label %445

437:                                              ; preds = %333, %332, %330, %328
  %438 = landingpad { ptr, i32 }
          cleanup
  %439 = extractvalue { ptr, i32 } %438, 0
  store ptr %439, ptr %5, align 8
  %440 = extractvalue { ptr, i32 } %438, 1
  store i32 %440, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #11
  br label %445

441:                                              ; preds = %352, %350, %348, %339
  %442 = landingpad { ptr, i32 }
          cleanup
  %443 = extractvalue { ptr, i32 } %442, 0
  store ptr %443, ptr %5, align 8
  %444 = extractvalue { ptr, i32 } %442, 1
  store i32 %444, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #11
  br label %445

445:                                              ; preds = %441, %437, %433, %429, %425
  call void @_ZN3JPH18ConstraintSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(112) %35) #11
  br label %446

446:                                              ; preds = %445, %421
  call void @llvm.lifetime.end.p0(i64 112, ptr %35) #11
  br label %452

447:                                              ; preds = %372, %278
  %448 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %448, ptr %17, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %16, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #11
  br label %449

449:                                              ; preds = %447
  %450 = load i32, ptr %18, align 4, !tbaa !9
  %451 = add nsw i32 %450, 1
  store i32 %451, ptr %18, align 4, !tbaa !9
  br label %112, !llvm.loop !25

452:                                              ; preds = %446, %417, %416, %407
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #11
  br label %453

453:                                              ; preds = %452, %373
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #11
  br label %455

454:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #11
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #11
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #11
  call void @_ZN3JPH3RefINS_16GroupFilterTableEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #11
  ret void

455:                                              ; preds = %453, %144
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #11
  br label %456

456:                                              ; preds = %455, %140
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #11
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #11
  br label %457

457:                                              ; preds = %456, %136, %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #11
  br label %458

458:                                              ; preds = %457, %128
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #11
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #11
  br label %459

459:                                              ; preds = %458, %124, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #11
  br label %460

460:                                              ; preds = %459, %116
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #11
  br label %461

461:                                              ; preds = %460, %65
  call void @_ZN3JPH3RefINS_16GroupFilterTableEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #11
  br label %462

462:                                              ; preds = %461, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #11
  br label %463

463:                                              ; preds = %462
  %464 = load ptr, ptr %5, align 8
  %465 = load i32, ptr %6, align 4
  %466 = insertvalue { ptr, i32 } poison, ptr %464, 0
  %467 = insertvalue { ptr, i32 } %466, i32 %465, 1
  resume { ptr, i32 } %467
}

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH16GroupFilterTablenwEm(i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16GroupFilterTableC2Ej(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16GroupFilterTabledlEPv(ptr noundef) #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16GroupFilterTable16DisableCollisionEjj(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) #4 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16)) #5 align 2

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH4Body17SetCollisionGroupERKNS_14CollisionGroupE(ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH14CollisionGroupC2EPKNS_11GroupFilterEjj(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH26DistanceConstraintSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(112)) unnamed_addr #9 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16)) #10 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13PhysicsSystem13AddConstraintEPNS_10ConstraintE(ptr noundef nonnull align 16 dereferenceable(1172), ptr noundef) #4 align 2

declare noundef ptr @_ZNK3JPH26DistanceConstraintSettings6CreateERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(112), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122)) unnamed_addr #1

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

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

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

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


; 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::Ref.27" = type { ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::RefConst.6" = type { ptr }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::BodyCreationSettings" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Vec3", i64, i16, %"class.JPH::CollisionGroup", i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, float, i32, i32, i8, float, %"class.JPH::MassProperties", %"class.JPH::RefConst.5", %"class.JPH::RefConst.6" }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst", i32, i32 }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.5" = type { ptr }
%"class.JPH::DistanceConstraintSettings" = type <{ %"class.JPH::TwoBodyConstraintSettings", i32, [4 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, %"class.JPH::SpringSettings", [12 x i8] }>
%"class.JPH::TwoBodyConstraintSettings" = type { %"class.JPH::ConstraintSettings" }
%"class.JPH::ConstraintSettings" = type { %"class.JPH::SerializableObject", %"class.JPH::RefTarget.32", i8, i32, i32, i32, float, i64 }
%"class.JPH::SerializableObject" = type { ptr }
%"class.JPH::RefTarget.32" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::SpringSettings" = type { i8, %union.anon.33, float }
%union.anon.33 = type { float }

; 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

declare noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(256)) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef) local_unnamed_addr #2 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 #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80), double, double, float noundef, ptr noundef) unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH8BoxShapedlEPv(ptr noundef) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256), ptr noundef, double, double, double, double, i8 noundef zeroext, i16 noundef zeroext) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #6 align 2

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

declare void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #6 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3JPH16DegreesToRadiansEf(float noundef) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11VehicleTest12CreateBridgeEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(136) %0) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.JPH::Ref.27", align 8
  %3 = alloca %"class.JPH::Vec3", align 16
  %4 = alloca %"class.JPH::RefConst.6", align 8
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca %"class.JPH::RefConst.6", align 8
  %7 = alloca %"class.JPH::Quat", align 16
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::BodyCreationSettings", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::BodyCreationSettings", align 16
  %14 = alloca %"class.JPH::CollisionGroup", align 8
  %15 = alloca %"class.JPH::DistanceConstraintSettings", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #11
  %20 = tail call noundef ptr @_ZN3JPH16GroupFilterTablenwEm(i64 noundef 40)
  invoke void @_ZN3JPH16GroupFilterTableC2Ej(ptr noundef nonnull align 8 dereferenceable(40) %20, i32 noundef 20)
          to label %21 unwind label %24

21:                                               ; preds = %1
  call void @_ZN3JPH3RefINS_16GroupFilterTableEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %20)
  br label %22

22:                                               ; preds = %26, %21
  %.066 = phi i32 [ 0, %21 ], [ %28, %26 ]
  %exitcond.not = icmp eq i32 %.066, 19
  br i1 %exitcond.not, label %23, label %26

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #11
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %3, float noundef 2.500000e+00, float noundef 2.500000e-01, float noundef 1.000000e+00)
          to label %31 unwind label %63

24:                                               ; preds = %1
  %25 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3JPH16GroupFilterTabledlEPv(ptr noundef %20) #11
  br label %223

26:                                               ; preds = %22
  %27 = call noundef ptr @_ZNK3JPH3RefINS_16GroupFilterTableEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %28 = add nuw nsw i32 %.066, 1
  invoke void @_ZN3JPH16GroupFilterTable16DisableCollisionEjj(ptr noundef nonnull align 8 dereferenceable(40) %27, i32 noundef %.066, i32 noundef %28)
          to label %22 unwind label %29, !llvm.loop !5

29:                                               ; preds = %26
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %222

31:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #11
  %32 = invoke noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef 80)
          to label %33 unwind label %65

33:                                               ; preds = %31
  %.sroa.041.0.copyload = load double, ptr %3, align 16
  %.sroa.242.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  %.sroa.242.0.copyload = load double, ptr %.sroa.242.0..sroa_idx, align 8, !tbaa !7
  invoke void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80) %32, double %.sroa.041.0.copyload, double %.sroa.242.0.copyload, float noundef 0x3FA99999A0000000, ptr noundef null)
          to label %34 unwind label %67

34:                                               ; preds = %33
  invoke void @_ZN3JPH8RefConstINS_5ShapeEEC2EPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %32)
          to label %35 unwind label %65

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #11
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %5, float noundef 2.500000e+00, float noundef 2.500000e-01, float noundef 2.250000e+01)
          to label %36 unwind label %69

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #11
  %37 = invoke noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef 80)
          to label %38 unwind label %71

38:                                               ; preds = %36
  %.sroa.039.0.copyload = load double, ptr %5, align 16
  %.sroa.240.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  %.sroa.240.0.copyload = load double, ptr %.sroa.240.0..sroa_idx, align 8, !tbaa !7
  invoke void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80) %37, double %.sroa.039.0.copyload, double %.sroa.240.0.copyload, float noundef 0x3FA99999A0000000, ptr noundef null)
          to label %39 unwind label %73

39:                                               ; preds = %38
  invoke void @_ZN3JPH8RefConstINS_5ShapeEEC2EPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %37)
          to label %40 unwind label %71

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #11
  %41 = invoke { double, double } @_ZN3JPH4Vec36sAxisXEv()
          to label %42 unwind label %75

42:                                               ; preds = %40
  %43 = extractvalue { double, double } %41, 0
  %44 = extractvalue { double, double } %41, 1
  %45 = call noundef float @_ZN3JPH16DegreesToRadiansEf(float noundef -1.000000e+01)
  %46 = invoke { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double %43, double %44, float noundef %45)
          to label %47 unwind label %75

47:                                               ; preds = %42
  %48 = extractvalue { double, double } %46, 0
  store double %48, ptr %7, align 16
  %49 = getelementptr inbounds i8, ptr %7, i64 8
  %50 = extractvalue { double, double } %46, 1
  store double %50, ptr %49, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #11
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %8, float noundef -2.500000e+01, float noundef 7.000000e+00, float noundef 0.000000e+00)
          to label %.preheader unwind label %77

.preheader:                                       ; preds = %47
  %51 = getelementptr inbounds i8, ptr %10, i64 8
  %52 = getelementptr inbounds i8, ptr %9, i64 8
  %53 = getelementptr inbounds i8, ptr %0, i64 24
  %54 = getelementptr inbounds i8, ptr %12, i64 8
  %55 = getelementptr inbounds i8, ptr %16, i64 8
  %56 = getelementptr inbounds i8, ptr %15, i64 48
  %.sroa.56.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 56
  %57 = getelementptr inbounds i8, ptr %17, i64 8
  %58 = getelementptr inbounds i8, ptr %15, i64 64
  %.sroa.54.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 72
  %59 = getelementptr inbounds i8, ptr %0, i64 16
  %60 = getelementptr inbounds i8, ptr %18, i64 8
  %61 = getelementptr inbounds i8, ptr %19, i64 8
  br label %79

62:                                               ; preds = %213
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #11
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #11
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #11
  call void @_ZN3JPH3RefINS_16GroupFilterTableEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #11
  ret void

63:                                               ; preds = %23
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %221

65:                                               ; preds = %34, %31
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %220

67:                                               ; preds = %33
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH8BoxShapedlEPv(ptr noundef %32) #11
  br label %220

69:                                               ; preds = %35
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %219

71:                                               ; preds = %39, %36
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %218

73:                                               ; preds = %38
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH8BoxShapedlEPv(ptr noundef %37) #11
  br label %218

75:                                               ; preds = %42, %40
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %217

77:                                               ; preds = %47
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %216

79:                                               ; preds = %.preheader, %213
  %.067108 = phi ptr [ null, %.preheader ], [ %123, %213 ]
  %.068107 = phi i32 [ 0, %.preheader ], [ %214, %213 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #11
  %80 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %3)
  %81 = fmul float %80, 2.000000e+00
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %10, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef %81)
          to label %82 unwind label %180

82:                                               ; preds = %79
  %83 = load double, ptr %10, align 16
  %84 = load double, ptr %51, align 8
  %85 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %8, double %83, double %84)
          to label %86 unwind label %180

86:                                               ; preds = %82
  %87 = extractvalue { double, double } %85, 0
  store double %87, ptr %9, align 16
  %88 = extractvalue { double, double } %85, 1
  store double %88, ptr %52, align 8
  %89 = icmp eq i32 %.068107, 0
  %90 = load ptr, ptr %53, align 8, !tbaa !10
  br i1 %89, label %91, label %112

91:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %11) #11
  %92 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %93 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %5)
  %94 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %3)
  %95 = fsub float %93, %94
  %96 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %5)
  %97 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %3)
  %98 = fsub float %96, %97
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %12, float noundef 0.000000e+00, float noundef %95, float noundef %98)
          to label %99 unwind label %182

99:                                               ; preds = %91
  %100 = load double, ptr %12, align 16
  %101 = load double, ptr %54, align 8
  %102 = invoke { double, double } @_ZNK3JPH4QuatmlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %7, double %100, double %101)
          to label %103 unwind label %182

103:                                              ; preds = %99
  %104 = extractvalue { double, double } %102, 0
  %105 = extractvalue { double, double } %102, 1
  %106 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %9, double %104, double %105)
          to label %107 unwind label %182

107:                                              ; preds = %103
  %108 = extractvalue { double, double } %106, 0
  %109 = extractvalue { double, double } %106, 1
  %.sroa.015.0.copyload = load double, ptr %7, align 16
  %.sroa.216.0.copyload = load double, ptr %49, align 8, !tbaa !7
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %11, ptr noundef %92, double %108, double %109, double %.sroa.015.0.copyload, double %.sroa.216.0.copyload, i8 noundef zeroext 0, i16 noundef zeroext 0)
          to label %110 unwind label %182

110:                                              ; preds = %107
  %111 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %90, ptr noundef nonnull align 16 dereferenceable(256) %11)
          to label %.critedge99 unwind label %188

112:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %13) #11
  %113 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %.sroa.09.0.copyload = load double, ptr %9, align 16
  %.sroa.210.0.copyload = load double, ptr %52, align 8, !tbaa !7
  %114 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %115 unwind label %184

115:                                              ; preds = %112
  %116 = extractvalue { double, double } %114, 0
  %117 = extractvalue { double, double } %114, 1
  %118 = icmp ne i32 %.068107, 19
  %119 = select i1 %118, i8 2, i8 0
  %120 = zext i1 %118 to i16
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %13, ptr noundef %113, double %.sroa.09.0.copyload, double %.sroa.210.0.copyload, double %116, double %117, i8 noundef zeroext %119, i16 noundef zeroext %120)
          to label %121 unwind label %184

121:                                              ; preds = %115
  %122 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %90, ptr noundef nonnull align 16 dereferenceable(256) %13)
          to label %.critedge unwind label %186

.critedge:                                        ; preds = %121
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %13) #11
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %13) #11
  br label %.critedge98

.critedge99:                                      ; preds = %110
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %11) #11
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %11) #11
  br label %.critedge98

.critedge98:                                      ; preds = %.critedge, %.critedge99
  %123 = phi ptr [ %122, %.critedge ], [ %111, %.critedge99 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #11
  %124 = call noundef ptr @_ZNK3JPH3RefINS_16GroupFilterTableEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  invoke void @_ZN3JPH14CollisionGroupC2EPKNS_11GroupFilterEjj(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef %124, i32 noundef 1, i32 noundef %.068107)
          to label %125 unwind label %192

125:                                              ; preds = %.critedge98
  invoke void @_ZN3JPH4Body17SetCollisionGroupERKNS_14CollisionGroupE(ptr noundef nonnull align 16 dereferenceable(122) %123, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %126 unwind label %194

126:                                              ; preds = %125
  call void @_ZN3JPH14CollisionGroupD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #11
  call void @_ZN3JPH4Body11SetFrictionEf(ptr noundef nonnull align 16 dereferenceable(122) %123, float noundef 1.000000e+00)
  %127 = load ptr, ptr %53, align 8, !tbaa !10
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %123)
  invoke void @_ZN3JPH13BodyInterface7AddBodyERKNS_6BodyIDENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %127, ptr noundef nonnull align 4 dereferenceable(4) %128, i32 noundef 0)
          to label %129 unwind label %197

129:                                              ; preds = %126
  %.not = icmp eq ptr %.067108, null
  br i1 %.not, label %213, label %130

130:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %15) #11
  invoke void @_ZN3JPH26DistanceConstraintSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(112) %15)
          to label %131 unwind label %199

131:                                              ; preds = %130
  %132 = call noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %3)
  %133 = fneg float %132
  %134 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %3)
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %16, float noundef %133, float noundef 0.000000e+00, float noundef %134)
          to label %135 unwind label %201

135:                                              ; preds = %131
  %136 = load double, ptr %16, align 16
  %137 = load double, ptr %55, align 8
  %138 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %8, double %136, double %137)
          to label %139 unwind label %201

139:                                              ; preds = %135
  %140 = extractvalue { double, double } %138, 0
  %141 = extractvalue { double, double } %138, 1
  store double %140, ptr %56, align 16
  store double %141, ptr %.sroa.56.0..sroa_idx, align 8, !tbaa !7
  %142 = call noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %3)
  %143 = fneg float %142
  %144 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %3)
  %145 = fneg float %144
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %17, float noundef %143, float noundef 0.000000e+00, float noundef %145)
          to label %146 unwind label %203

146:                                              ; preds = %139
  %147 = load double, ptr %17, align 16
  %148 = load double, ptr %57, align 8
  %149 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %9, double %147, double %148)
          to label %150 unwind label %203

150:                                              ; preds = %146
  %151 = extractvalue { double, double } %149, 0
  %152 = extractvalue { double, double } %149, 1
  store double %151, ptr %58, align 16
  store double %152, ptr %.sroa.54.0..sroa_idx, align 8, !tbaa !7
  %153 = load ptr, ptr %59, align 8, !tbaa !20
  %154 = invoke noundef ptr @_ZNK3JPH26DistanceConstraintSettings6CreateERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(112) %15, ptr noundef nonnull align 16 dereferenceable(122) %.067108, ptr noundef nonnull align 16 dereferenceable(122) %123)
          to label %155 unwind label %205

155:                                              ; preds = %150
  invoke void @_ZN3JPH13PhysicsSystem13AddConstraintEPNS_10ConstraintE(ptr noundef nonnull align 16 dereferenceable(1172) %153, ptr noundef %154)
          to label %156 unwind label %205

156:                                              ; preds = %155
  %157 = call noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %3)
  %158 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %3)
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %18, float noundef %157, float noundef 0.000000e+00, float noundef %158)
          to label %159 unwind label %207

159:                                              ; preds = %156
  %160 = load double, ptr %18, align 16
  %161 = load double, ptr %60, align 8
  %162 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %8, double %160, double %161)
          to label %163 unwind label %207

163:                                              ; preds = %159
  %164 = extractvalue { double, double } %162, 0
  %165 = extractvalue { double, double } %162, 1
  store double %164, ptr %56, align 16
  store double %165, ptr %.sroa.56.0..sroa_idx, align 8, !tbaa !7
  %166 = call noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %3)
  %167 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %3)
  %168 = fneg float %167
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %19, float noundef %166, float noundef 0.000000e+00, float noundef %168)
          to label %169 unwind label %209

169:                                              ; preds = %163
  %170 = load double, ptr %19, align 16
  %171 = load double, ptr %61, align 8
  %172 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %9, double %170, double %171)
          to label %173 unwind label %209

173:                                              ; preds = %169
  %174 = extractvalue { double, double } %172, 0
  %175 = extractvalue { double, double } %172, 1
  store double %174, ptr %58, align 16
  store double %175, ptr %.sroa.54.0..sroa_idx, align 8, !tbaa !7
  %176 = load ptr, ptr %59, align 8, !tbaa !20
  %177 = invoke noundef ptr @_ZNK3JPH26DistanceConstraintSettings6CreateERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(112) %15, ptr noundef nonnull align 16 dereferenceable(122) %.067108, ptr noundef nonnull align 16 dereferenceable(122) %123)
          to label %178 unwind label %205

178:                                              ; preds = %173
  invoke void @_ZN3JPH13PhysicsSystem13AddConstraintEPNS_10ConstraintE(ptr noundef nonnull align 16 dereferenceable(1172) %176, ptr noundef %177)
          to label %179 unwind label %205

179:                                              ; preds = %178
  call void @_ZN3JPH18ConstraintSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(112) %15) #11
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %15) #11
  br label %213

180:                                              ; preds = %82, %79
  %181 = landingpad { ptr, i32 }
          cleanup
  br label %215

182:                                              ; preds = %107, %103, %99, %91
  %183 = landingpad { ptr, i32 }
          cleanup
  br label %191

184:                                              ; preds = %115, %112
  %185 = landingpad { ptr, i32 }
          cleanup
  br label %190

186:                                              ; preds = %121
  %187 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %13) #11
  br label %190

188:                                              ; preds = %110
  %189 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %11) #11
  br label %191

190:                                              ; preds = %184, %186
  %.pn = phi { ptr, i32 } [ %187, %186 ], [ %185, %184 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %13) #11
  br label %215

191:                                              ; preds = %188, %182
  %.pn77.pn.ph = phi { ptr, i32 } [ %183, %182 ], [ %189, %188 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %11) #11
  br label %215

192:                                              ; preds = %.critedge98
  %193 = landingpad { ptr, i32 }
          cleanup
  br label %196

194:                                              ; preds = %125
  %195 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH14CollisionGroupD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #11
  br label %196

196:                                              ; preds = %194, %192
  %.pn80 = phi { ptr, i32 } [ %195, %194 ], [ %193, %192 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #11
  br label %215

197:                                              ; preds = %126
  %198 = landingpad { ptr, i32 }
          cleanup
  br label %215

199:                                              ; preds = %130
  %200 = landingpad { ptr, i32 }
          cleanup
  br label %212

201:                                              ; preds = %135, %131
  %202 = landingpad { ptr, i32 }
          cleanup
  br label %211

203:                                              ; preds = %146, %139
  %204 = landingpad { ptr, i32 }
          cleanup
  br label %211

205:                                              ; preds = %178, %173, %155, %150
  %206 = landingpad { ptr, i32 }
          cleanup
  br label %211

207:                                              ; preds = %159, %156
  %208 = landingpad { ptr, i32 }
          cleanup
  br label %211

209:                                              ; preds = %169, %163
  %210 = landingpad { ptr, i32 }
          cleanup
  br label %211

211:                                              ; preds = %209, %207, %205, %203, %201
  %.pn82 = phi { ptr, i32 } [ %206, %205 ], [ %210, %209 ], [ %208, %207 ], [ %204, %203 ], [ %202, %201 ]
  call void @_ZN3JPH18ConstraintSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(112) %15) #11
  br label %212

212:                                              ; preds = %211, %199
  %.pn82.pn = phi { ptr, i32 } [ %.pn82, %211 ], [ %200, %199 ]
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %15) #11
  br label %215

213:                                              ; preds = %179, %129
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %8, ptr noundef nonnull align 16 dereferenceable(16) %9, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #11
  %214 = add nuw nsw i32 %.068107, 1
  %exitcond109.not = icmp eq i32 %214, 20
  br i1 %exitcond109.not, label %62, label %79, !llvm.loop !22

215:                                              ; preds = %190, %196, %197, %212, %191, %180
  %.pn82.pn.pn.pn = phi { ptr, i32 } [ %181, %180 ], [ %.pn82.pn, %212 ], [ %198, %197 ], [ %.pn80, %196 ], [ %.pn77.pn.ph, %191 ], [ %.pn, %190 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #11
  br label %216

216:                                              ; preds = %215, %77
  %.pn82.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn82.pn.pn.pn, %215 ], [ %78, %77 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #11
  br label %217

217:                                              ; preds = %216, %75
  %.pn82.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn82.pn.pn.pn.pn, %216 ], [ %76, %75 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #11
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #11
  br label %218

218:                                              ; preds = %217, %73, %71
  %.pn82.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn82.pn.pn.pn.pn.pn, %217 ], [ %72, %71 ], [ %74, %73 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #11
  br label %219

219:                                              ; preds = %218, %69
  %.pn82.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn82.pn.pn.pn.pn.pn.pn, %218 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #11
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #11
  br label %220

220:                                              ; preds = %219, %67, %65
  %.pn82.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn82.pn.pn.pn.pn.pn.pn.pn, %219 ], [ %66, %65 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #11
  br label %221

221:                                              ; preds = %220, %63
  %.pn82.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn82.pn.pn.pn.pn.pn.pn.pn.pn, %220 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #11
  br label %222

222:                                              ; preds = %221, %29
  %.pn93 = phi { ptr, i32 } [ %30, %29 ], [ %.pn82.pn.pn.pn.pn.pn.pn.pn.pn.pn, %221 ]
  call void @_ZN3JPH3RefINS_16GroupFilterTableEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #11
  br label %223

223:                                              ; preds = %222, %24
  %.pn93.pn = phi { ptr, i32 } [ %.pn93, %222 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #11
  resume { ptr, i32 } %.pn93.pn
}

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH16GroupFilterTablenwEm(i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16GroupFilterTableC2Ej(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16GroupFilterTabledlEPv(ptr noundef) local_unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16GroupFilterTable16DisableCollisionEjj(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #5 align 2

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH4Body17SetCollisionGroupERKNS_14CollisionGroupE(ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH14CollisionGroupC2EPKNS_11GroupFilterEjj(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH26DistanceConstraintSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(112)) unnamed_addr #9 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #10 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13PhysicsSystem13AddConstraintEPNS_10ConstraintE(ptr noundef nonnull align 16 dereferenceable(1172), ptr noundef) local_unnamed_addr #4 align 2

declare noundef ptr @_ZNK3JPH26DistanceConstraintSettings6CreateERNS_4BodyES2_(ptr noundef nonnull align 16 dereferenceable(112), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122)) unnamed_addr #1

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { 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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #9 = { 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 #10 = { 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 #11 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !12, i64 24}
!11 = !{!"_ZTS4Test", !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !13, i64 48, !14, i64 56}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"bool", !8, 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", !12, i64 0, !16, i64 8, !17, i64 16, !16, i64 24, !18, i64 32, !12, i64 48}
!16 = !{!"long", !8, i64 0}
!17 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !12, i64 0}
!18 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !19, i64 0, !16, i64 8}
!19 = !{!"float", !8, i64 0}
!20 = !{!11, !12, i64 16}
!21 = !{i64 0, i64 16, !7}
!22 = distinct !{!22, !6}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass