; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Character (CharacterVirtual)

; 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::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::CharacterContactSettings" = type { i8, i8 }
%"class.JPH::BodyLockWrite" = type { %"class.JPH::BodyLockBase.36" }
%"class.JPH::BodyLockBase.36" = type { ptr, ptr, ptr }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"struct.JPH::CharacterVirtual::Constraint" = type <{ ptr, float, float, %"class.JPH::Vec3", %"class.JPH::Plane", i8, [15 x i8] }>
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }
%"struct.JPH::CharacterVirtual::Contact" = type <{ %"class.JPH::CharacterVirtual::ContactKey", [4 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, i8, i8, [6 x i8], ptr, i64, ptr, i8, i8, i8, [5 x i8] }>
%"class.JPH::CharacterVirtual::ContactKey" = type { %"class.JPH::BodyID", %"class.JPH::CharacterID", %"class.JPH::SubShapeID" }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::CharacterID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::CharacterBase" = type { ptr, %"class.JPH::RefTarget", ptr, %"class.JPH::RefConst", %"class.JPH::Vec3", %"class.JPH::Plane", float, i32, %"class.JPH::BodyID", %"class.JPH::SubShapeID", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::RefConst.1", i64 }
%"class.JPH::RefTarget" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::RefConst.1" = type { ptr }
%"class.JPH::CharacterVirtual" = type <{ %"class.JPH::CharacterBase", %"class.JPH::CharacterID", [4 x i8], ptr, ptr, i8, [3 x i8], float, i32, i32, float, float, float, i32, float, float, i8, [3 x i8], float, float, [4 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Array.2", i32, [4 x i8], %"class.JPH::UnorderedMap", float, i8, [3 x i8], i64, %"class.JPH::BodyID", [12 x i8] }>
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Array.2" = type { i64, i64, ptr }
%"class.JPH::UnorderedMap" = type { %"class.JPH::HashTable.base", [4 x i8] }
%"class.JPH::HashTable.base" = type <{ ptr, ptr, i32, i32, i32 }>

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16CharacterVirtual15ValidateContactERKNS0_7ContactE(ptr noundef nonnull align 16 dereferenceable(372), ptr noundef nonnull align 16 dereferenceable(123)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16CharacterVirtual12ContactAddedERKNS0_7ContactERNS_24CharacterContactSettingsE(ptr noundef nonnull align 16 dereferenceable(372), ptr noundef nonnull align 16 dereferenceable(123), ptr noundef nonnull align 1 dereferenceable(2)) #5 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #6 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH16CharacterVirtual13HandleContactENS_4Vec3ERNS0_10ConstraintEf(ptr noundef nonnull align 16 dereferenceable(372) %0, double %1, double %2, ptr noundef nonnull align 16 dereferenceable(49) %3, float noundef %4) #5 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca i1, align 1
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca float, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.JPH::CharacterContactSettings", align 1
  %14 = alloca %"class.JPH::BodyLockWrite", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca %"class.JPH::Vec3", align 16
  %22 = alloca float, align 4
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca ptr, align 8
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca %"class.JPH::Mat44", align 16
  %29 = alloca float, align 4
  %30 = alloca %"class.JPH::Vec3", align 16
  %31 = alloca %"class.JPH::Vec3", align 16
  %32 = alloca %"class.JPH::Vec3", align 16
  %33 = alloca %"class.JPH::Vec3", align 16
  %34 = alloca float, align 4
  %35 = alloca %"class.JPH::Vec3", align 16
  %36 = alloca %"class.JPH::Vec3", align 16
  %37 = alloca %"class.JPH::Vec3", align 16
  %38 = alloca float, align 4
  %39 = alloca float, align 4
  %40 = alloca %"class.JPH::Vec3", align 16
  %41 = alloca %"class.JPH::Vec3", align 16
  %42 = alloca float, align 4
  %43 = alloca %"class.JPH::Vec3", align 16
  %44 = alloca %"class.JPH::Vec3", align 16
  %45 = alloca %"class.JPH::Vec3", align 16
  %46 = alloca %"class.JPH::Vec3", align 16
  %47 = alloca %"class.JPH::Vec3", align 16
  %48 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 0
  store double %1, ptr %48, align 16
  %49 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 1
  store double %2, ptr %49, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store float %4, ptr %10, align 4, !tbaa !9
  %50 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #11
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Constraint", ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 16, !tbaa !11
  store ptr %53, ptr %11, align 8, !tbaa !5
  %54 = load ptr, ptr %11, align 8, !tbaa !5
  %55 = call noundef zeroext i1 @_ZNK3JPH16CharacterVirtual15ValidateContactERKNS0_7ContactE(ptr noundef nonnull align 16 dereferenceable(372) %50, ptr noundef nonnull align 16 dereferenceable(123) %54)
  br i1 %55, label %57, label %56

56:                                               ; preds = %5
  store i1 false, ptr %6, align 1
  store i32 1, ptr %12, align 4
  br label %343

57:                                               ; preds = %5
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %58, i32 0, i32 14
  store i8 1, ptr %59, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #11
  call void @_ZN3JPH24CharacterContactSettingsC2Ev(ptr noundef nonnull align 1 dereferenceable(2) %13) #11
  %60 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN3JPH16CharacterVirtual12ContactAddedERKNS0_7ContactERNS_24CharacterContactSettingsE(ptr noundef nonnull align 16 dereferenceable(372) %50, ptr noundef nonnull align 16 dereferenceable(123) %60, ptr noundef nonnull align 1 dereferenceable(2) %13)
  %61 = getelementptr inbounds %"class.JPH::CharacterContactSettings", ptr %13, i32 0, i32 0
  %62 = load i8, ptr %61, align 1, !tbaa !26, !range !28, !noundef !29
  %63 = trunc i8 %62 to i1
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %64, i32 0, i32 16
  %66 = zext i1 %63 to i8
  store i8 %66, ptr %65, align 2, !tbaa !30
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %67, i32 0, i32 9
  %69 = load i8, ptr %68, align 1, !tbaa !31, !range !28, !noundef !29
  %70 = trunc i8 %69 to i1
  br i1 %70, label %71, label %72

71:                                               ; preds = %57
  store i1 false, ptr %6, align 1
  store i32 1, ptr %12, align 4
  br label %342

72:                                               ; preds = %57
  %73 = getelementptr inbounds %"class.JPH::CharacterContactSettings", ptr %13, i32 0, i32 1
  %74 = load i8, ptr %73, align 1, !tbaa !32, !range !28, !noundef !29
  %75 = trunc i8 %74 to i1
  br i1 %75, label %76, label %81

76:                                               ; preds = %72
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %77, i32 0, i32 8
  %79 = load i8, ptr %78, align 8, !tbaa !33
  %80 = icmp ne i8 %79, 2
  br i1 %80, label %81, label %82

81:                                               ; preds = %76, %72
  store i1 true, ptr %6, align 1
  store i32 1, ptr %12, align 4
  br label %342

82:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #11
  %83 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %50, i32 0, i32 2
  %84 = load ptr, ptr %83, align 16, !tbaa !34
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %84)
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactKey", ptr %86, i32 0, i32 0
  call void @_ZN3JPH13BodyLockWriteCI2NS_12BodyLockBaseILb1ENS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef nonnull align 4 dereferenceable(4) %87)
  %88 = invoke noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb1ENS_4BodyEE26SucceededAndIsInBroadPhaseEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %89 unwind label %91

89:                                               ; preds = %82
  br i1 %88, label %95, label %90

90:                                               ; preds = %89
  store i1 false, ptr %6, align 1
  store i32 1, ptr %12, align 4
  br label %340

91:                                               ; preds = %82
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %15, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %16, align 4
  br label %341

95:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #11
  %96 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb1ENS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %97 unwind label %135

97:                                               ; preds = %95
  store ptr %96, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #11
  store float 0x3FECCCCCC0000000, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #11
  store float 0x3FD99999A0000000, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #11
  %98 = load ptr, ptr %11, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %98, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 %99, i64 16, i1 false), !tbaa.struct !42
  %100 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %101 = load double, ptr %100, align 16
  %102 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %103 = load double, ptr %102, align 8
  %104 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %101, double %103)
          to label %105 unwind label %139

105:                                              ; preds = %97
  %106 = getelementptr inbounds %"class.JPH::Vec3", ptr %20, i32 0, i32 0
  %107 = getelementptr inbounds %union.anon, ptr %106, i32 0, i32 0
  %108 = getelementptr inbounds { double, double }, ptr %107, i32 0, i32 0
  %109 = extractvalue { double, double } %104, 0
  store double %109, ptr %108, align 16
  %110 = getelementptr inbounds { double, double }, ptr %107, i32 0, i32 1
  %111 = extractvalue { double, double } %104, 1
  store double %111, ptr %110, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #11
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %112, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %23, ptr align 16 %113, i64 16, i1 false), !tbaa.struct !42
  %114 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %115 = load double, ptr %114, align 16
  %116 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %117 = load double, ptr %116, align 8
  %118 = invoke noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %20, double %115, double %117)
          to label %119 unwind label %143

119:                                              ; preds = %105
  store float %118, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #11
  %120 = load float, ptr %22, align 4, !tbaa !9
  %121 = fneg float %120
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %122, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #11
  store float 0.000000e+00, ptr %25, align 4, !tbaa !9
  %124 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %123, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %125 unwind label %147

125:                                              ; preds = %119
  %126 = load float, ptr %124, align 4, !tbaa !9
  %127 = fmul float %126, 0x3FD99999A0000000
  %128 = load float, ptr %10, align 4, !tbaa !9
  %129 = fdiv float %127, %128
  %130 = fneg float %129
  %131 = call float @llvm.fmuladd.f32(float %121, float 0x3FECCCCCC0000000, float %130)
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #11
  store float %131, ptr %24, align 4, !tbaa !9
  %132 = load float, ptr %24, align 4, !tbaa !9
  %133 = fcmp olt float %132, 0.000000e+00
  br i1 %133, label %134, label %151

134:                                              ; preds = %125
  store i1 true, ptr %6, align 1
  store i32 1, ptr %12, align 4
  br label %335

135:                                              ; preds = %95
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %15, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %16, align 4
  br label %339

139:                                              ; preds = %97
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %15, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %16, align 4
  br label %338

143:                                              ; preds = %105
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %15, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %16, align 4
  br label %337

147:                                              ; preds = %119
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %15, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #11
  br label %336

151:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #11
  %152 = load ptr, ptr %17, align 8, !tbaa !5
  %153 = invoke noundef ptr @_ZNK3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %152)
          to label %154 unwind label %273

154:                                              ; preds = %151
  store ptr %153, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #11
  %155 = load ptr, ptr %17, align 8, !tbaa !5
  %156 = invoke { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %155)
          to label %157 unwind label %277

157:                                              ; preds = %154
  %158 = getelementptr inbounds %"class.JPH::Vec3", ptr %27, i32 0, i32 0
  %159 = getelementptr inbounds %union.anon, ptr %158, i32 0, i32 0
  %160 = getelementptr inbounds { double, double }, ptr %159, i32 0, i32 0
  %161 = extractvalue { double, double } %156, 0
  store double %161, ptr %160, align 16
  %162 = getelementptr inbounds { double, double }, ptr %159, i32 0, i32 1
  %163 = extractvalue { double, double } %156, 1
  store double %163, ptr %162, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %28) #11
  %164 = load ptr, ptr %17, align 8, !tbaa !5
  invoke void @_ZNK3JPH4Body17GetInverseInertiaEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %28, ptr noundef nonnull align 16 dereferenceable(122) %164)
          to label %165 unwind label %281

165:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #11
  %166 = load ptr, ptr %26, align 8, !tbaa !5
  %167 = invoke noundef float @_ZNK3JPH16MotionProperties14GetInverseMassEv(ptr noundef nonnull align 16 dereferenceable(182) %166)
          to label %168 unwind label %285

168:                                              ; preds = %165
  store float %167, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #11
  %169 = load ptr, ptr %11, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %169, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %32, ptr align 16 %27, i64 16, i1 false), !tbaa.struct !42
  %171 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %172 = load double, ptr %171, align 16
  %173 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %174 = load double, ptr %173, align 8
  %175 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %170, double %172, double %174)
          to label %176 unwind label %289

176:                                              ; preds = %168
  %177 = getelementptr inbounds %"class.JPH::Vec3", ptr %31, i32 0, i32 0
  %178 = getelementptr inbounds %union.anon, ptr %177, i32 0, i32 0
  %179 = getelementptr inbounds { double, double }, ptr %178, i32 0, i32 0
  %180 = extractvalue { double, double } %175, 0
  store double %180, ptr %179, align 16
  %181 = getelementptr inbounds { double, double }, ptr %178, i32 0, i32 1
  %182 = extractvalue { double, double } %175, 1
  store double %182, ptr %181, align 8
  %183 = load ptr, ptr %11, align 8, !tbaa !5
  %184 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %183, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %184, i64 16, i1 false), !tbaa.struct !42
  %185 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %186 = load double, ptr %185, align 16
  %187 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %188 = load double, ptr %187, align 8
  %189 = invoke { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %31, double %186, double %188)
          to label %190 unwind label %289

190:                                              ; preds = %176
  %191 = getelementptr inbounds %"class.JPH::Vec3", ptr %30, i32 0, i32 0
  %192 = getelementptr inbounds %union.anon, ptr %191, i32 0, i32 0
  %193 = getelementptr inbounds { double, double }, ptr %192, i32 0, i32 0
  %194 = extractvalue { double, double } %189, 0
  store double %194, ptr %193, align 16
  %195 = getelementptr inbounds { double, double }, ptr %192, i32 0, i32 1
  %196 = extractvalue { double, double } %189, 1
  store double %196, ptr %195, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %36, ptr align 16 %30, i64 16, i1 false), !tbaa.struct !42
  %197 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 0
  %198 = load double, ptr %197, align 16
  %199 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 1
  %200 = load double, ptr %199, align 8
  %201 = invoke { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %28, double %198, double %200)
          to label %202 unwind label %293

202:                                              ; preds = %190
  %203 = getelementptr inbounds %"class.JPH::Vec3", ptr %35, i32 0, i32 0
  %204 = getelementptr inbounds %union.anon, ptr %203, i32 0, i32 0
  %205 = getelementptr inbounds { double, double }, ptr %204, i32 0, i32 0
  %206 = extractvalue { double, double } %201, 0
  store double %206, ptr %205, align 16
  %207 = getelementptr inbounds { double, double }, ptr %204, i32 0, i32 1
  %208 = extractvalue { double, double } %201, 1
  store double %208, ptr %207, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %37, ptr align 16 %30, i64 16, i1 false), !tbaa.struct !42
  %209 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %210 = load double, ptr %209, align 16
  %211 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %212 = load double, ptr %211, align 8
  %213 = invoke noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %35, double %210, double %212)
          to label %214 unwind label %293

214:                                              ; preds = %202
  %215 = load float, ptr %29, align 4, !tbaa !9
  %216 = fadd float %213, %215
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #11
  store float %216, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #11
  %217 = load float, ptr %24, align 4, !tbaa !9
  %218 = load float, ptr %34, align 4, !tbaa !9
  %219 = fdiv float %217, %218
  store float %219, ptr %38, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #11
  %220 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %50, i32 0, i32 19
  %221 = load float, ptr %220, align 8, !tbaa !44
  %222 = load float, ptr %10, align 4, !tbaa !9
  %223 = fmul float %221, %222
  store float %223, ptr %39, align 4, !tbaa !9
  %224 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %38, ptr noundef nonnull align 4 dereferenceable(4) %39)
          to label %225 unwind label %297

225:                                              ; preds = %214
  %226 = load float, ptr %224, align 4, !tbaa !9
  store float %226, ptr %38, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #11
  %227 = load float, ptr %38, align 4, !tbaa !9
  %228 = fneg float %227
  %229 = load ptr, ptr %11, align 8, !tbaa !5
  %230 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %229, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %41, ptr align 16 %230, i64 16, i1 false), !tbaa.struct !42
  %231 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %232 = load double, ptr %231, align 16
  %233 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %234 = load double, ptr %233, align 8
  %235 = invoke { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %228, double %232, double %234)
          to label %236 unwind label %301

236:                                              ; preds = %225
  %237 = getelementptr inbounds %"class.JPH::Vec3", ptr %40, i32 0, i32 0
  %238 = getelementptr inbounds %union.anon, ptr %237, i32 0, i32 0
  %239 = getelementptr inbounds { double, double }, ptr %238, i32 0, i32 0
  %240 = extractvalue { double, double } %235, 0
  store double %240, ptr %239, align 16
  %241 = getelementptr inbounds { double, double }, ptr %238, i32 0, i32 1
  %242 = extractvalue { double, double } %235, 1
  store double %242, ptr %241, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #11
  %243 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %50, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %43, ptr align 16 %243, i64 16, i1 false), !tbaa.struct !42
  %244 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 0
  %245 = load double, ptr %244, align 16
  %246 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 1
  %247 = load double, ptr %246, align 8
  %248 = invoke noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %40, double %245, double %247)
          to label %249 unwind label %305

249:                                              ; preds = %236
  store float %248, ptr %42, align 4, !tbaa !9
  %250 = load float, ptr %42, align 4, !tbaa !9
  %251 = fcmp olt float %250, 0.000000e+00
  br i1 %251, label %252, label %309

252:                                              ; preds = %249
  %253 = load float, ptr %42, align 4, !tbaa !9
  %254 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %50, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %45, ptr align 16 %254, i64 16, i1 false), !tbaa.struct !42
  %255 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 0
  %256 = load double, ptr %255, align 16
  %257 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 1
  %258 = load double, ptr %257, align 8
  %259 = invoke { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %253, double %256, double %258)
          to label %260 unwind label %305

260:                                              ; preds = %252
  %261 = getelementptr inbounds %"class.JPH::Vec3", ptr %44, i32 0, i32 0
  %262 = getelementptr inbounds %union.anon, ptr %261, i32 0, i32 0
  %263 = getelementptr inbounds { double, double }, ptr %262, i32 0, i32 0
  %264 = extractvalue { double, double } %259, 0
  store double %264, ptr %263, align 16
  %265 = getelementptr inbounds { double, double }, ptr %262, i32 0, i32 1
  %266 = extractvalue { double, double } %259, 1
  store double %266, ptr %265, align 8
  %267 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 0
  %268 = load double, ptr %267, align 16
  %269 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 1
  %270 = load double, ptr %269, align 8
  %271 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %40, double %268, double %270)
          to label %272 unwind label %305

272:                                              ; preds = %260
  br label %309

273:                                              ; preds = %151
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %15, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %16, align 4
  br label %334

277:                                              ; preds = %154
  %278 = landingpad { ptr, i32 }
          cleanup
  %279 = extractvalue { ptr, i32 } %278, 0
  store ptr %279, ptr %15, align 8
  %280 = extractvalue { ptr, i32 } %278, 1
  store i32 %280, ptr %16, align 4
  br label %333

281:                                              ; preds = %157
  %282 = landingpad { ptr, i32 }
          cleanup
  %283 = extractvalue { ptr, i32 } %282, 0
  store ptr %283, ptr %15, align 8
  %284 = extractvalue { ptr, i32 } %282, 1
  store i32 %284, ptr %16, align 4
  br label %332

285:                                              ; preds = %165
  %286 = landingpad { ptr, i32 }
          cleanup
  %287 = extractvalue { ptr, i32 } %286, 0
  store ptr %287, ptr %15, align 8
  %288 = extractvalue { ptr, i32 } %286, 1
  store i32 %288, ptr %16, align 4
  br label %331

289:                                              ; preds = %176, %168
  %290 = landingpad { ptr, i32 }
          cleanup
  %291 = extractvalue { ptr, i32 } %290, 0
  store ptr %291, ptr %15, align 8
  %292 = extractvalue { ptr, i32 } %290, 1
  store i32 %292, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #11
  br label %330

293:                                              ; preds = %202, %190
  %294 = landingpad { ptr, i32 }
          cleanup
  %295 = extractvalue { ptr, i32 } %294, 0
  store ptr %295, ptr %15, align 8
  %296 = extractvalue { ptr, i32 } %294, 1
  store i32 %296, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #11
  br label %329

297:                                              ; preds = %214
  %298 = landingpad { ptr, i32 }
          cleanup
  %299 = extractvalue { ptr, i32 } %298, 0
  store ptr %299, ptr %15, align 8
  %300 = extractvalue { ptr, i32 } %298, 1
  store i32 %300, ptr %16, align 4
  br label %328

301:                                              ; preds = %225
  %302 = landingpad { ptr, i32 }
          cleanup
  %303 = extractvalue { ptr, i32 } %302, 0
  store ptr %303, ptr %15, align 8
  %304 = extractvalue { ptr, i32 } %302, 1
  store i32 %304, ptr %16, align 4
  br label %327

305:                                              ; preds = %313, %309, %260, %252, %236
  %306 = landingpad { ptr, i32 }
          cleanup
  %307 = extractvalue { ptr, i32 } %306, 0
  store ptr %307, ptr %15, align 8
  %308 = extractvalue { ptr, i32 } %306, 1
  store i32 %308, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #11
  br label %327

309:                                              ; preds = %272, %249
  %310 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %50, i32 0, i32 2
  %311 = load ptr, ptr %310, align 16, !tbaa !34
  %312 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem22GetBodyInterfaceNoLockEv(ptr noundef nonnull align 16 dereferenceable(1172) %311)
          to label %313 unwind label %305

313:                                              ; preds = %309
  %314 = load ptr, ptr %11, align 8, !tbaa !5
  %315 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactKey", ptr %314, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %46, ptr align 16 %40, i64 16, i1 false), !tbaa.struct !42
  %316 = load ptr, ptr %11, align 8, !tbaa !5
  %317 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %316, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %47, ptr align 16 %317, i64 16, i1 false), !tbaa.struct !42
  %318 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %319 = load double, ptr %318, align 16
  %320 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %321 = load double, ptr %320, align 8
  %322 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %323 = load double, ptr %322, align 16
  %324 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %325 = load double, ptr %324, align 8
  invoke void @_ZN3JPH13BodyInterface10AddImpulseERKNS_6BodyIDENS_4Vec3ES4_(ptr noundef nonnull align 8 dereferenceable(24) %312, ptr noundef nonnull align 4 dereferenceable(4) %315, double %319, double %321, double %323, double %325)
          to label %326 unwind label %305

326:                                              ; preds = %313
  store i1 true, ptr %6, align 1
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr %28) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #11
  br label %335

327:                                              ; preds = %305, %301
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #11
  br label %328

328:                                              ; preds = %327, %297
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #11
  br label %329

329:                                              ; preds = %328, %293
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #11
  br label %330

330:                                              ; preds = %329, %289
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #11
  br label %331

331:                                              ; preds = %330, %285
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #11
  br label %332

332:                                              ; preds = %331, %281
  call void @llvm.lifetime.end.p0(i64 64, ptr %28) #11
  br label %333

333:                                              ; preds = %332, %277
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #11
  br label %334

334:                                              ; preds = %333, %273
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #11
  br label %336

335:                                              ; preds = %326, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #11
  call void @llvm.lifetime.end.p0(i64 4, 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 %340

336:                                              ; preds = %334, %147
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #11
  br label %337

337:                                              ; preds = %336, %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #11
  br label %338

338:                                              ; preds = %337, %139
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #11
  br label %339

339:                                              ; preds = %338, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #11
  br label %341

340:                                              ; preds = %335, %90
  call void @_ZN3JPH12BodyLockBaseILb1ENS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #11
  br label %342

341:                                              ; preds = %339, %91
  call void @_ZN3JPH12BodyLockBaseILb1ENS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #11
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #11
  br label %345

342:                                              ; preds = %340, %81, %71
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #11
  br label %343

343:                                              ; preds = %342, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #11
  %344 = load i1, ptr %6, align 1
  ret i1 %344

345:                                              ; preds = %341
  %346 = load ptr, ptr %15, align 8
  %347 = load i32, ptr %16, align 4
  %348 = insertvalue { ptr, i32 } poison, ptr %346, 0
  %349 = insertvalue { ptr, i32 } %348, i32 %347, 1
  resume { ptr, i32 } %349
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb1ENS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24)) #7 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH16MotionProperties14GetInverseMassEv(ptr noundef nonnull align 16 dereferenceable(182)) #7 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem22GetBodyInterfaceNoLockEv(ptr noundef nonnull align 16 dereferenceable(1172)) #9 align 2

declare void @_ZN3JPH13BodyInterface10AddImpulseERKNS_6BodyIDENS_4Vec3ES4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), double, double, double, double) #10

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { alwaysinline mustprogress 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 #7 = { 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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { 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 #10 = { "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 = !{!"float", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSN3JPH16CharacterVirtual10ConstraintE", !6, i64 0, !10, i64 8, !10, i64 12, !13, i64 16, !14, i64 32, !16, i64 48}
!13 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!14 = !{!"_ZTSN3JPH5PlaneE", !15, i64 0}
!15 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!18, !16, i64 120}
!18 = !{!"_ZTSN3JPH16CharacterVirtual7ContactE", !19, i64 0, !13, i64 16, !13, i64 32, !13, i64 48, !13, i64 64, !10, i64 80, !10, i64 84, !24, i64 88, !16, i64 89, !6, i64 96, !25, i64 104, !6, i64 112, !16, i64 120, !16, i64 121, !16, i64 122}
!19 = !{!"_ZTSN3JPH16CharacterVirtual10ContactKeyE", !20, i64 0, !22, i64 4, !23, i64 8}
!20 = !{!"_ZTSN3JPH6BodyIDE", !21, i64 0}
!21 = !{!"int", !7, i64 0}
!22 = !{!"_ZTSN3JPH11CharacterIDE", !21, i64 0}
!23 = !{!"_ZTSN3JPH10SubShapeIDE", !21, i64 0}
!24 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!25 = !{!"long", !7, i64 0}
!26 = !{!27, !16, i64 0}
!27 = !{!"_ZTSN3JPH24CharacterContactSettingsE", !16, i64 0, !16, i64 1}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!18, !16, i64 122}
!31 = !{!18, !16, i64 89}
!32 = !{!27, !16, i64 1}
!33 = !{!18, !24, i64 88}
!34 = !{!35, !6, i64 16}
!35 = !{!"_ZTSN3JPH13CharacterBaseE", !36, i64 8, !6, i64 16, !39, i64 24, !13, i64 32, !14, i64 48, !10, i64 64, !40, i64 68, !20, i64 72, !23, i64 76, !13, i64 80, !13, i64 96, !13, i64 112, !41, i64 128, !25, i64 136}
!36 = !{!"_ZTSN3JPH9RefTargetINS_13CharacterBaseEEE", !37, i64 0}
!37 = !{!"_ZTSSt6atomicIjE", !38, i64 0}
!38 = !{!"_ZTSSt13__atomic_baseIjE", !21, i64 0}
!39 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !6, i64 0}
!40 = !{!"_ZTSN3JPH13CharacterBase12EGroundStateE", !7, i64 0}
!41 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !6, i64 0}
!42 = !{i64 0, i64 16, !43}
!43 = !{!7, !7, i64 0}
!44 = !{!45, !10, i64 216}
!45 = !{!"_ZTSN3JPH16CharacterVirtualE", !35, i64 0, !22, i64 144, !6, i64 152, !6, i64 160, !46, i64 168, !10, i64 172, !21, i64 176, !21, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !21, i64 196, !10, i64 200, !10, i64 204, !16, i64 208, !10, i64 212, !10, i64 216, !13, i64 224, !13, i64 240, !47, i64 256, !13, i64 272, !48, i64 288, !21, i64 312, !49, i64 320, !10, i64 352, !16, i64 356, !25, i64 360, !20, i64 368}
!46 = !{!"_ZTSN3JPH13EBackFaceModeE", !7, i64 0}
!47 = !{!"_ZTSN3JPH4QuatE", !15, i64 0}
!48 = !{!"_ZTSN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEEE", !25, i64 0, !25, i64 8, !6, i64 16}
!49 = !{!"_ZTSN3JPH12UnorderedMapINS_16CharacterVirtual10ContactKeyENS1_20ListenerContactValueENS_4HashIS2_EESt8equal_toIS2_EEE", !50, i64 0}
!50 = !{!"_ZTSN3JPH9HashTableINS_16CharacterVirtual10ContactKeyESt4pairIS2_NS1_20ListenerContactValueEENS_18UnorderedMapDetailIS2_S4_EENS_4HashIS2_EESt8equal_toIS2_EEE", !6, i64 0, !6, i64 8, !21, i64 16, !21, i64 20, !21, i64 24}


; 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::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::CharacterContactSettings" = type { i8, i8 }
%"class.JPH::BodyLockWrite" = type { %"class.JPH::BodyLockBase.36" }
%"class.JPH::BodyLockBase.36" = type { ptr, ptr, ptr }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x 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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16CharacterVirtual15ValidateContactERKNS0_7ContactE(ptr noundef nonnull align 16 dereferenceable(372), ptr noundef nonnull align 16 dereferenceable(123)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16CharacterVirtual12ContactAddedERKNS0_7ContactERNS_24CharacterContactSettingsE(ptr noundef nonnull align 16 dereferenceable(372), ptr noundef nonnull align 16 dereferenceable(123), ptr noundef nonnull align 1 dereferenceable(2)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH16CharacterVirtual13HandleContactENS_4Vec3ERNS0_10ConstraintEf(ptr noundef nonnull align 16 dereferenceable(372) %0, double %1, double %2, ptr nocapture noundef nonnull readonly align 16 dereferenceable(49) %3, float noundef %4) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca %"class.JPH::CharacterContactSettings", align 1
  %8 = alloca %"class.JPH::BodyLockWrite", align 8
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca float, align 4
  %11 = alloca %"class.JPH::Mat44", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca %"class.JPH::Vec3", align 16
  store double %1, ptr %6, align 16
  %17 = getelementptr inbounds i8, ptr %6, i64 8
  store double %2, ptr %17, align 8
  %18 = load ptr, ptr %3, align 16, !tbaa !5
  %19 = tail call noundef zeroext i1 @_ZNK3JPH16CharacterVirtual15ValidateContactERKNS0_7ContactE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(123) %18)
  br i1 %19, label %20, label %137

20:                                               ; preds = %5
  %21 = getelementptr inbounds i8, ptr %18, i64 120
  store i8 1, ptr %21, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %7) #10
  call void @_ZN3JPH24CharacterContactSettingsC2Ev(ptr noundef nonnull align 1 dereferenceable(2) %7) #10
  call void @_ZN3JPH16CharacterVirtual12ContactAddedERKNS0_7ContactERNS_24CharacterContactSettingsE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(123) %18, ptr noundef nonnull align 1 dereferenceable(2) %7)
  %22 = load i8, ptr %7, align 1, !tbaa !24, !range !26, !noundef !27
  %23 = getelementptr inbounds i8, ptr %18, i64 122
  store i8 %22, ptr %23, align 2, !tbaa !28
  %24 = getelementptr inbounds i8, ptr %18, i64 89
  %25 = load i8, ptr %24, align 1, !tbaa !29, !range !26, !noundef !27
  %26 = trunc nuw i8 %25 to i1
  br i1 %26, label %136, label %27

27:                                               ; preds = %20
  %28 = getelementptr inbounds i8, ptr %7, i64 1
  %29 = load i8, ptr %28, align 1, !tbaa !30, !range !26, !noundef !27
  %30 = trunc nuw i8 %29 to i1
  br i1 %30, label %31, label %136

31:                                               ; preds = %27
  %32 = getelementptr inbounds i8, ptr %18, i64 88
  %33 = load i8, ptr %32, align 8, !tbaa !31
  %.not = icmp eq i8 %33, 2
  br i1 %.not, label %34, label %136

34:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #10
  %35 = getelementptr inbounds i8, ptr %0, i64 16
  %36 = load ptr, ptr %35, align 16, !tbaa !32
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %36)
  call void @_ZN3JPH13BodyLockWriteCI2NS_12BodyLockBaseILb1ENS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %38 = call noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb1ENS_4BodyEE26SucceededAndIsInBroadPhaseEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  br i1 %38, label %39, label %135

39:                                               ; preds = %34
  %40 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb1ENS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %41 unwind label %58

41:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #10
  %42 = getelementptr inbounds i8, ptr %18, i64 32
  %.sroa.030.0.copyload = load double, ptr %42, align 16
  %.sroa.231.0..sroa_idx = getelementptr inbounds i8, ptr %18, i64 40
  %.sroa.231.0.copyload = load double, ptr %.sroa.231.0..sroa_idx, align 8, !tbaa !40
  %43 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %.sroa.030.0.copyload, double %.sroa.231.0.copyload)
          to label %44 unwind label %60

44:                                               ; preds = %41
  %45 = extractvalue { double, double } %43, 0
  store double %45, ptr %9, align 16
  %46 = getelementptr inbounds i8, ptr %9, i64 8
  %47 = extractvalue { double, double } %43, 1
  store double %47, ptr %46, align 8
  %48 = getelementptr inbounds i8, ptr %18, i64 48
  %.sroa.027.0.copyload = load double, ptr %48, align 16
  %.sroa.228.0..sroa_idx = getelementptr inbounds i8, ptr %18, i64 56
  %.sroa.228.0.copyload = load double, ptr %.sroa.228.0..sroa_idx, align 8, !tbaa !40
  %49 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %9, double %.sroa.027.0.copyload, double %.sroa.228.0.copyload)
  %50 = fneg float %49
  %51 = getelementptr inbounds i8, ptr %18, i64 80
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #10
  store float 0.000000e+00, ptr %10, align 4, !tbaa !41
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %51, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %53 = load float, ptr %52, align 4, !tbaa !41
  %54 = fmul float %53, 0xBFD99999A0000000
  %55 = fdiv float %54, %4
  %56 = call float @llvm.fmuladd.f32(float %50, float 0x3FECCCCCC0000000, float %55)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #10
  %57 = fcmp olt float %56, 0.000000e+00
  br i1 %57, label %132, label %62

58:                                               ; preds = %39
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %134

60:                                               ; preds = %41
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %133

62:                                               ; preds = %44
  %63 = invoke noundef ptr @_ZNK3JPH4Body19GetMotionPropertiesEv(ptr noundef nonnull align 16 dereferenceable(122) %40)
          to label %64 unwind label %110

64:                                               ; preds = %62
  %65 = invoke { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %40)
          to label %66 unwind label %112

66:                                               ; preds = %64
  %67 = extractvalue { double, double } %65, 0
  %68 = extractvalue { double, double } %65, 1
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #10
  invoke void @_ZNK3JPH4Body17GetInverseInertiaEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %11, ptr noundef nonnull align 16 dereferenceable(122) %40)
          to label %69 unwind label %114

69:                                               ; preds = %66
  %70 = invoke noundef float @_ZNK3JPH16MotionProperties14GetInverseMassEv(ptr noundef nonnull align 16 dereferenceable(182) %63)
          to label %71 unwind label %116

71:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #10
  %72 = getelementptr inbounds i8, ptr %18, i64 16
  %73 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %72, double %67, double %68)
          to label %74 unwind label %118

74:                                               ; preds = %71
  %75 = extractvalue { double, double } %73, 0
  store double %75, ptr %12, align 16
  %76 = getelementptr inbounds i8, ptr %12, i64 8
  %77 = extractvalue { double, double } %73, 1
  store double %77, ptr %76, align 8
  %.sroa.017.0.copyload = load double, ptr %48, align 16
  %.sroa.218.0.copyload = load double, ptr %.sroa.228.0..sroa_idx, align 8, !tbaa !40
  %78 = invoke { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %.sroa.017.0.copyload, double %.sroa.218.0.copyload)
          to label %79 unwind label %118

79:                                               ; preds = %74
  %80 = extractvalue { double, double } %78, 0
  %81 = extractvalue { double, double } %78, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #10
  %82 = invoke { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %11, double %80, double %81)
          to label %83 unwind label %120

83:                                               ; preds = %79
  %84 = extractvalue { double, double } %82, 0
  store double %84, ptr %13, align 16
  %85 = getelementptr inbounds i8, ptr %13, i64 8
  %86 = extractvalue { double, double } %82, 1
  store double %86, ptr %85, align 8
  %87 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %80, double %81)
  %88 = fadd float %70, %87
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #10
  %89 = fdiv float %56, %88
  store float %89, ptr %14, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #10
  %90 = getelementptr inbounds i8, ptr %0, i64 216
  %91 = load float, ptr %90, align 8, !tbaa !42
  %92 = fmul float %91, %4
  store float %92, ptr %15, align 4, !tbaa !41
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %94 = load float, ptr %93, align 4, !tbaa !41
  store float %94, ptr %14, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #10
  %95 = fneg float %94
  %.sroa.010.0.copyload = load double, ptr %48, align 16
  %.sroa.211.0.copyload = load double, ptr %.sroa.228.0..sroa_idx, align 8, !tbaa !40
  %96 = invoke { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %95, double %.sroa.010.0.copyload, double %.sroa.211.0.copyload)
          to label %97 unwind label %122

97:                                               ; preds = %83
  %98 = extractvalue { double, double } %96, 0
  store double %98, ptr %16, align 16
  %99 = getelementptr inbounds i8, ptr %16, i64 8
  %100 = extractvalue { double, double } %96, 1
  store double %100, ptr %99, align 8
  %101 = getelementptr inbounds i8, ptr %0, i64 32
  %.sroa.07.0.copyload = load double, ptr %101, align 16
  %.sroa.28.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 40
  %.sroa.28.0.copyload = load double, ptr %.sroa.28.0..sroa_idx, align 8, !tbaa !40
  %102 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %.sroa.07.0.copyload, double %.sroa.28.0.copyload)
  %103 = fcmp olt float %102, 0.000000e+00
  br i1 %103, label %104, label %126

104:                                              ; preds = %97
  %.sroa.03.0.copyload = load double, ptr %101, align 16
  %.sroa.24.0.copyload = load double, ptr %.sroa.28.0..sroa_idx, align 8, !tbaa !40
  %105 = invoke { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %102, double %.sroa.03.0.copyload, double %.sroa.24.0.copyload)
          to label %106 unwind label %124

106:                                              ; preds = %104
  %107 = extractvalue { double, double } %105, 0
  %108 = extractvalue { double, double } %105, 1
  %109 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %107, double %108)
  br label %126

110:                                              ; preds = %62
  %111 = landingpad { ptr, i32 }
          cleanup
  br label %133

112:                                              ; preds = %64
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %133

114:                                              ; preds = %66
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %131

116:                                              ; preds = %69
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %131

118:                                              ; preds = %74, %71
  %119 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #10
  br label %131

120:                                              ; preds = %79
  %121 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #10
  br label %131

122:                                              ; preds = %83
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %130

124:                                              ; preds = %126, %104
  %125 = landingpad { ptr, i32 }
          cleanup
  br label %130

126:                                              ; preds = %106, %97
  %127 = load ptr, ptr %35, align 16, !tbaa !32
  %128 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem22GetBodyInterfaceNoLockEv(ptr noundef nonnull align 16 dereferenceable(1172) %127)
  %.sroa.01.0.copyload = load double, ptr %16, align 16
  %.sroa.22.0.copyload = load double, ptr %99, align 8, !tbaa !40
  %.sroa.0.0.copyload = load double, ptr %72, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %18, i64 24
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !40
  invoke void @_ZN3JPH13BodyInterface10AddImpulseERKNS_6BodyIDENS_4Vec3ES4_(ptr noundef nonnull align 8 dereferenceable(24) %128, ptr noundef nonnull align 4 dereferenceable(4) %18, double %.sroa.01.0.copyload, double %.sroa.22.0.copyload, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
          to label %129 unwind label %124

129:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #10
  br label %132

130:                                              ; preds = %124, %122
  %.pn = phi { ptr, i32 } [ %125, %124 ], [ %123, %122 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #10
  br label %131

131:                                              ; preds = %116, %120, %130, %118, %114
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %115, %114 ], [ %117, %116 ], [ %119, %118 ], [ %.pn, %130 ], [ %121, %120 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #10
  br label %133

132:                                              ; preds = %44, %129
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #10
  br label %135

133:                                              ; preds = %110, %131, %112, %60
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %61, %60 ], [ %111, %110 ], [ %.pn.pn.pn.pn.pn, %131 ], [ %113, %112 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #10
  br label %134

134:                                              ; preds = %133, %58
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn.pn, %133 ], [ %59, %58 ]
  call void @_ZN3JPH12BodyLockBaseILb1ENS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %7) #10
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn.pn.pn

135:                                              ; preds = %34, %132
  call void @_ZN3JPH12BodyLockBaseILb1ENS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #10
  br label %136

136:                                              ; preds = %27, %31, %20, %135
  %.2 = phi i1 [ %38, %135 ], [ false, %20 ], [ true, %31 ], [ true, %27 ]
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %7) #10
  br label %137

137:                                              ; preds = %5, %136
  %.3 = phi i1 [ %.2, %136 ], [ false, %5 ]
  ret i1 %.3
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH24CharacterContactSettingsC2Ev(ptr noundef nonnull align 1 dereferenceable(2)) unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb1ENS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH16MotionProperties14GetInverseMassEv(ptr noundef nonnull align 16 dereferenceable(182)) local_unnamed_addr #6 align 2

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

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

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

declare void @_ZN3JPH13BodyInterface10AddImpulseERKNS_6BodyIDENS_4Vec3ES4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), double, double, double, double) local_unnamed_addr #9

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN3JPH16CharacterVirtual10ConstraintE", !7, i64 0, !10, i64 8, !10, i64 12, !11, i64 16, !12, i64 32, !14, i64 48}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!12 = !{!"_ZTSN3JPH5PlaneE", !13, i64 0}
!13 = !{!"_ZTSN3JPH4Vec4E", !8, i64 0}
!14 = !{!"bool", !8, i64 0}
!15 = !{!16, !14, i64 120}
!16 = !{!"_ZTSN3JPH16CharacterVirtual7ContactE", !17, i64 0, !11, i64 16, !11, i64 32, !11, i64 48, !11, i64 64, !10, i64 80, !10, i64 84, !22, i64 88, !14, i64 89, !7, i64 96, !23, i64 104, !7, i64 112, !14, i64 120, !14, i64 121, !14, i64 122}
!17 = !{!"_ZTSN3JPH16CharacterVirtual10ContactKeyE", !18, i64 0, !20, i64 4, !21, i64 8}
!18 = !{!"_ZTSN3JPH6BodyIDE", !19, i64 0}
!19 = !{!"int", !8, i64 0}
!20 = !{!"_ZTSN3JPH11CharacterIDE", !19, i64 0}
!21 = !{!"_ZTSN3JPH10SubShapeIDE", !19, i64 0}
!22 = !{!"_ZTSN3JPH11EMotionTypeE", !8, i64 0}
!23 = !{!"long", !8, i64 0}
!24 = !{!25, !14, i64 0}
!25 = !{!"_ZTSN3JPH24CharacterContactSettingsE", !14, i64 0, !14, i64 1}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!16, !14, i64 122}
!29 = !{!16, !14, i64 89}
!30 = !{!25, !14, i64 1}
!31 = !{!16, !22, i64 88}
!32 = !{!33, !7, i64 16}
!33 = !{!"_ZTSN3JPH13CharacterBaseE", !34, i64 8, !7, i64 16, !37, i64 24, !11, i64 32, !12, i64 48, !10, i64 64, !38, i64 68, !18, i64 72, !21, i64 76, !11, i64 80, !11, i64 96, !11, i64 112, !39, i64 128, !23, i64 136}
!34 = !{!"_ZTSN3JPH9RefTargetINS_13CharacterBaseEEE", !35, i64 0}
!35 = !{!"_ZTSSt6atomicIjE", !36, i64 0}
!36 = !{!"_ZTSSt13__atomic_baseIjE", !19, i64 0}
!37 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !7, i64 0}
!38 = !{!"_ZTSN3JPH13CharacterBase12EGroundStateE", !8, i64 0}
!39 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !7, i64 0}
!40 = !{!8, !8, i64 0}
!41 = !{!10, !10, i64 0}
!42 = !{!43, !10, i64 216}
!43 = !{!"_ZTSN3JPH16CharacterVirtualE", !33, i64 0, !20, i64 144, !7, i64 152, !7, i64 160, !44, i64 168, !10, i64 172, !19, i64 176, !19, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !19, i64 196, !10, i64 200, !10, i64 204, !14, i64 208, !10, i64 212, !10, i64 216, !11, i64 224, !11, i64 240, !45, i64 256, !11, i64 272, !46, i64 288, !19, i64 312, !47, i64 320, !10, i64 352, !14, i64 356, !23, i64 360, !18, i64 368}
!44 = !{!"_ZTSN3JPH13EBackFaceModeE", !8, i64 0}
!45 = !{!"_ZTSN3JPH4QuatE", !13, i64 0}
!46 = !{!"_ZTSN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEEE", !23, i64 0, !23, i64 8, !7, i64 16}
!47 = !{!"_ZTSN3JPH12UnorderedMapINS_16CharacterVirtual10ContactKeyENS1_20ListenerContactValueENS_4HashIS2_EESt8equal_toIS2_EEE", !48, i64 0}
!48 = !{!"_ZTSN3JPH9HashTableINS_16CharacterVirtual10ContactKeyESt4pairIS2_NS1_20ListenerContactValueEENS_18UnorderedMapDetailIS2_S4_EENS_4HashIS2_EESt8equal_toIS2_EEE", !7, i64 0, !7, i64 8, !19, i64 16, !19, i64 20, !19, i64 24}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass