; 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::RefConst.1" = type { ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::CharacterContactSettings" = type { i8, i8 }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::BodyLockRead" = type { %"class.JPH::BodyLockBase" }
%"class.JPH::BodyLockBase" = type { ptr, ptr, ptr }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::Array.28" = type { %"class.JPH::STLTempAllocator", i64, i64, ptr }
%"class.JPH::STLTempAllocator" = type { ptr }
%"class.JPH::Array.34" = type { %"class.JPH::STLTempAllocator.35", i64, i64, ptr }
%"class.JPH::STLTempAllocator.35" = type { ptr }
%"class.JPH::Array.29" = type { %"class.JPH::STLTempAllocator.30", i64, i64, ptr }
%"class.JPH::STLTempAllocator.30" = 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::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::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::CharacterID" = type { i32 }
%"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 }>
%"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" }

@_ZN3JPH15PhysicsMaterial8sDefaultE = external global %"class.JPH::RefConst.1", align 8

; 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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16)) #1 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH16CharacterVirtual32CalculateCharacterGroundVelocityENS_4Vec3ES1_S1_f(ptr noundef nonnull align 16 dereferenceable(372), double, double, double, double, double, double, float noundef) #5 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #7 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #6 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)) #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_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 #8 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #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: mustprogress uwtable
declare dso_local void @_ZNK3JPH16CharacterVirtual20DetermineConstraintsERNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS2_EEEEfRNS1_INS0_10ConstraintENS3_IS7_EEEE(ptr noundef nonnull align 16 dereferenceable(372), ptr noundef nonnull align 8 dereferenceable(32), float noundef, ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16CharacterVirtual16SolveConstraintsENS_4Vec3EffRNS_5ArrayINS0_10ConstraintENS_16STLTempAllocatorIS3_EEEERNS2_INS0_10ContactKeyENS4_IS8_EEEERfRS1_RNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372), double, double, float noundef, float noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH5Plane14SignedDistanceENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16), double, double) #5 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16CharacterVirtual23UpdateSupportingContactEbRNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372) %0, i1 noundef zeroext %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::CharacterContactSettings", align 1
  %14 = alloca %"class.JPH::Mat44", align 16
  %15 = alloca %"class.JPH::Quat", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca %"class.JPH::Vec3", align 16
  %22 = alloca ptr, align 8
  %23 = alloca float, align 4
  %24 = alloca ptr, align 8
  %25 = alloca float, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca float, align 4
  %32 = alloca %"class.JPH::Vec3", align 16
  %33 = alloca %"class.JPH::Vec3", align 16
  %34 = alloca %"class.JPH::Vec3", align 16
  %35 = alloca i8, align 1
  %36 = alloca %"class.JPH::Vec3", align 16
  %37 = alloca %"class.JPH::Vec3", align 16
  %38 = alloca %"class.JPH::BodyLockRead", align 8
  %39 = alloca ptr, align 8
  %40 = alloca i32, align 4
  %41 = alloca ptr, align 8
  %42 = alloca %"class.JPH::Vec3", align 16
  %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 = alloca %"class.JPH::Vec3", align 16
  %49 = alloca ptr, align 8
  %50 = alloca %"class.JPH::Vec3", align 16
  %51 = alloca %"class.JPH::Vec3", align 16
  %52 = alloca %"class.JPH::Vec3", align 16
  %53 = alloca %"class.JPH::Vec3", align 16
  %54 = alloca %"class.JPH::BodyID", align 4
  %55 = alloca %"class.JPH::SubShapeID", align 4
  %56 = alloca %"class.JPH::Vec3", align 16
  %57 = alloca %"class.JPH::Vec3", align 16
  %58 = alloca %"class.JPH::Vec3", align 16
  %59 = alloca %"class.JPH::Vec3", align 16
  %60 = alloca %"class.JPH::Array.28", align 8
  %61 = alloca %"class.JPH::STLTempAllocator", align 8
  %62 = alloca %"class.JPH::Array.34", align 8
  %63 = alloca %"class.JPH::STLTempAllocator.35", align 8
  %64 = alloca %"class.JPH::Vec3", align 16
  %65 = alloca float, align 4
  %66 = alloca %"class.JPH::Array.29", align 8
  %67 = alloca %"class.JPH::STLTempAllocator.30", align 8
  %68 = alloca %"class.JPH::Vec3", align 16
  %69 = alloca float, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  %70 = zext i1 %1 to i8
  store i8 %70, ptr %5, align 1, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %71 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #11
  %72 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %71, i32 0, i32 25
  store ptr %72, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #11
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %73)
  store ptr %74, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #11
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %75)
  store ptr %76, ptr %9, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %138, %3
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = icmp ne ptr %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #11
  br label %141

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #11
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %83, ptr %10, align 8, !tbaa !5
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %84, i32 0, i32 15
  %86 = load i8, ptr %85, align 1, !tbaa !11, !range !22, !noundef !23
  %87 = trunc i8 %86 to i1
  br i1 %87, label %137, label %88

88:                                               ; preds = %82
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %89, i32 0, i32 14
  %91 = load i8, ptr %90, align 8, !tbaa !24, !range !22, !noundef !23
  %92 = trunc i8 %91 to i1
  br i1 %92, label %137, label %93

93:                                               ; preds = %88
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %94, i32 0, i32 6
  %96 = load float, ptr %95, align 16, !tbaa !25
  %97 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %71, i32 0, i32 11
  %98 = load float, ptr %97, align 4, !tbaa !26
  %99 = fcmp olt float %96, %98
  br i1 %99, label %100, label %137

100:                                              ; preds = %93
  %101 = load i8, ptr %5, align 1, !tbaa !9, !range !22, !noundef !23
  %102 = trunc i8 %101 to i1
  br i1 %102, label %126, label %103

103:                                              ; preds = %100
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %104, i32 0, i32 5
  %106 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %71, i32 0, i32 24
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %107, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %12, ptr align 16 %108, i64 16, i1 false), !tbaa.struct !42
  %109 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %110 = load double, ptr %109, align 16
  %111 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %112 = load double, ptr %111, align 8
  %113 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %106, double %110, double %112)
  %114 = getelementptr inbounds %"class.JPH::Vec3", ptr %11, i32 0, i32 0
  %115 = getelementptr inbounds %union.anon, ptr %114, i32 0, i32 0
  %116 = getelementptr inbounds { double, double }, ptr %115, i32 0, i32 0
  %117 = extractvalue { double, double } %113, 0
  store double %117, ptr %116, align 16
  %118 = getelementptr inbounds { double, double }, ptr %115, i32 0, i32 1
  %119 = extractvalue { double, double } %113, 1
  store double %119, ptr %118, align 8
  %120 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %121 = load double, ptr %120, align 16
  %122 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %123 = load double, ptr %122, align 8
  %124 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %105, double %121, double %123)
  %125 = fcmp ole float %124, 0x3F1A36E2E0000000
  br i1 %125, label %126, label %137

126:                                              ; preds = %103, %100
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = call noundef zeroext i1 @_ZNK3JPH16CharacterVirtual15ValidateContactERKNS0_7ContactE(ptr noundef nonnull align 16 dereferenceable(372) %71, ptr noundef nonnull align 16 dereferenceable(123) %127)
  br i1 %128, label %129, label %133

129:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #11
  call void @_ZN3JPH24CharacterContactSettingsC2Ev(ptr noundef nonnull align 1 dereferenceable(2) %13) #11
  %130 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN3JPH16CharacterVirtual12ContactAddedERKNS0_7ContactERNS_24CharacterContactSettingsE(ptr noundef nonnull align 16 dereferenceable(372) %71, ptr noundef nonnull align 16 dereferenceable(123) %130, ptr noundef nonnull align 1 dereferenceable(2) %13)
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %131, i32 0, i32 14
  store i8 1, ptr %132, align 8, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #11
  br label %136

133:                                              ; preds = %126
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %134, i32 0, i32 15
  store i8 1, ptr %135, align 1, !tbaa !11
  br label %136

136:                                              ; preds = %133, %129
  br label %137

137:                                              ; preds = %136, %103, %93, %88, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #11
  br label %138

138:                                              ; preds = %137
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  %140 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %139, i32 1
  store ptr %140, ptr %8, align 8, !tbaa !5
  br label %77

141:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #11
  %142 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %71, i32 0, i32 23
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %15, ptr align 16 %142, i64 16, i1 false), !tbaa.struct !42
  %143 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %71, i32 0, i32 22
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %16, ptr align 16 %143, i64 16, i1 false), !tbaa.struct !42
  %144 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %145 = load double, ptr %144, align 16
  %146 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %147 = load double, ptr %146, align 8
  %148 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %149 = load double, ptr %148, align 16
  %150 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %151 = load double, ptr %150, align 8
  call void @_ZN3JPH5Mat4427sInverseRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %14, double %145, double %147, double %149, double %151)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #11
  store i32 0, ptr %17, align 4, !tbaa !44
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #11
  store i32 0, ptr %18, align 4, !tbaa !44
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #11
  store i32 0, ptr %19, align 4, !tbaa !44
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #11
  %152 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %153 = getelementptr inbounds %"class.JPH::Vec3", ptr %20, i32 0, i32 0
  %154 = getelementptr inbounds %union.anon, ptr %153, i32 0, i32 0
  %155 = getelementptr inbounds { double, double }, ptr %154, i32 0, i32 0
  %156 = extractvalue { double, double } %152, 0
  store double %156, ptr %155, align 16
  %157 = getelementptr inbounds { double, double }, ptr %154, i32 0, i32 1
  %158 = extractvalue { double, double } %152, 1
  store double %158, ptr %157, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #11
  %159 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %160 = getelementptr inbounds %"class.JPH::Vec3", ptr %21, i32 0, i32 0
  %161 = getelementptr inbounds %union.anon, ptr %160, i32 0, i32 0
  %162 = getelementptr inbounds { double, double }, ptr %161, i32 0, i32 0
  %163 = extractvalue { double, double } %159, 0
  store double %163, ptr %162, align 16
  %164 = getelementptr inbounds { double, double }, ptr %161, i32 0, i32 1
  %165 = extractvalue { double, double } %159, 1
  store double %165, ptr %164, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #11
  store ptr null, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #11
  store float 0xC7EFFFFFE0000000, ptr %23, align 4, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #11
  store ptr null, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #11
  store float 0x47EFFFFFE0000000, ptr %25, align 4, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #11
  %166 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %71, i32 0, i32 25
  store ptr %166, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #11
  %167 = load ptr, ptr %26, align 8, !tbaa !5
  %168 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %167)
  store ptr %168, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #11
  %169 = load ptr, ptr %26, align 8, !tbaa !5
  %170 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %169)
  store ptr %170, ptr %28, align 8, !tbaa !5
  br label %171

171:                                              ; preds = %366, %141
  %172 = load ptr, ptr %27, align 8, !tbaa !5
  %173 = load ptr, ptr %28, align 8, !tbaa !5
  %174 = icmp ne ptr %172, %173
  br i1 %174, label %176, label %175

175:                                              ; preds = %171
  store i32 4, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #11
  br label %369

176:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #11
  %177 = load ptr, ptr %27, align 8, !tbaa !5
  store ptr %177, ptr %30, align 8, !tbaa !5
  %178 = load ptr, ptr %30, align 8, !tbaa !5
  %179 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %178, i32 0, i32 14
  %180 = load i8, ptr %179, align 8, !tbaa !24, !range !22, !noundef !23
  %181 = trunc i8 %180 to i1
  br i1 %181, label %182, label %362

182:                                              ; preds = %176
  %183 = load ptr, ptr %30, align 8, !tbaa !5
  %184 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %183, i32 0, i32 15
  %185 = load i8, ptr %184, align 1, !tbaa !11, !range !22, !noundef !23
  %186 = trunc i8 %185 to i1
  br i1 %186, label %362, label %187

187:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #11
  %188 = load ptr, ptr %30, align 8, !tbaa !5
  %189 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %188, i32 0, i32 5
  %190 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %32, ptr align 16 %190, i64 16, i1 false), !tbaa.struct !42
  %191 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %192 = load double, ptr %191, align 16
  %193 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %194 = load double, ptr %193, align 8
  %195 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %189, double %192, double %194)
  store float %195, ptr %31, align 4, !tbaa !45
  %196 = load ptr, ptr %30, align 8, !tbaa !5
  %197 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %196, i32 0, i32 6
  %198 = load float, ptr %197, align 16, !tbaa !25
  %199 = load float, ptr %25, align 4, !tbaa !45
  %200 = fcmp olt float %198, %199
  br i1 %200, label %201, label %206

201:                                              ; preds = %187
  %202 = load ptr, ptr %30, align 8, !tbaa !5
  store ptr %202, ptr %24, align 8, !tbaa !5
  %203 = load ptr, ptr %30, align 8, !tbaa !5
  %204 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %203, i32 0, i32 6
  %205 = load float, ptr %204, align 16, !tbaa !25
  store float %205, ptr %25, align 4, !tbaa !45
  br label %206

206:                                              ; preds = %201, %187
  %207 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 5
  %208 = load ptr, ptr %30, align 8, !tbaa !5
  %209 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %208, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %34, ptr align 16 %209, i64 16, i1 false), !tbaa.struct !42
  %210 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 0
  %211 = load double, ptr %210, align 16
  %212 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 1
  %213 = load double, ptr %212, align 8
  %214 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %14, double %211, double %213)
  %215 = getelementptr inbounds %"class.JPH::Vec3", ptr %33, i32 0, i32 0
  %216 = getelementptr inbounds %union.anon, ptr %215, i32 0, i32 0
  %217 = getelementptr inbounds { double, double }, ptr %216, i32 0, i32 0
  %218 = extractvalue { double, double } %214, 0
  store double %218, ptr %217, align 16
  %219 = getelementptr inbounds { double, double }, ptr %216, i32 0, i32 1
  %220 = extractvalue { double, double } %214, 1
  store double %220, ptr %219, align 8
  %221 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %222 = load double, ptr %221, align 16
  %223 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %224 = load double, ptr %223, align 8
  %225 = call noundef float @_ZNK3JPH5Plane14SignedDistanceENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %207, double %222, double %224)
  %226 = fcmp ogt float %225, 0.000000e+00
  br i1 %226, label %227, label %228

227:                                              ; preds = %206
  store i32 5, ptr %29, align 4
  br label %359

228:                                              ; preds = %206
  %229 = load float, ptr %23, align 4, !tbaa !45
  %230 = load float, ptr %31, align 4, !tbaa !45
  %231 = fcmp olt float %229, %230
  br i1 %231, label %232, label %235

232:                                              ; preds = %228
  %233 = load ptr, ptr %30, align 8, !tbaa !5
  store ptr %233, ptr %22, align 8, !tbaa !5
  %234 = load float, ptr %31, align 4, !tbaa !45
  store float %234, ptr %23, align 4, !tbaa !45
  br label %235

235:                                              ; preds = %232, %228
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #11
  %236 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 6
  %237 = load float, ptr %236, align 16, !tbaa !46
  %238 = fcmp ogt float %237, 0x3FEFFF2E40000000
  br i1 %238, label %244, label %239

239:                                              ; preds = %235
  %240 = load float, ptr %31, align 4, !tbaa !45
  %241 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 6
  %242 = load float, ptr %241, align 16, !tbaa !46
  %243 = fcmp oge float %240, %242
  br label %244

244:                                              ; preds = %239, %235
  %245 = phi i1 [ true, %235 ], [ %243, %239 ]
  %246 = zext i1 %245 to i8
  store i8 %246, ptr %35, align 1, !tbaa !9
  %247 = load i8, ptr %35, align 1, !tbaa !9, !range !22, !noundef !23
  %248 = trunc i8 %247 to i1
  br i1 %248, label %249, label %252

249:                                              ; preds = %244
  %250 = load i32, ptr %17, align 4, !tbaa !44
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %17, align 4, !tbaa !44
  br label %255

252:                                              ; preds = %244
  %253 = load i32, ptr %18, align 4, !tbaa !44
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %18, align 4, !tbaa !44
  br label %255

255:                                              ; preds = %252, %249
  %256 = load float, ptr %31, align 4, !tbaa !45
  %257 = fcmp oge float %256, 0x3FB47AE140000000
  br i1 %257, label %258, label %358

258:                                              ; preds = %255
  %259 = load ptr, ptr %30, align 8, !tbaa !5
  %260 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %259, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %36, ptr align 16 %260, i64 16, i1 false), !tbaa.struct !42
  %261 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 0
  %262 = load double, ptr %261, align 16
  %263 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 1
  %264 = load double, ptr %263, align 8
  %265 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %20, double %262, double %264)
  %266 = load i32, ptr %19, align 4, !tbaa !44
  %267 = add nsw i32 %266, 1
  store i32 %267, ptr %19, align 4, !tbaa !44
  %268 = load ptr, ptr %30, align 8, !tbaa !5
  %269 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %268, i32 0, i32 8
  %270 = load i8, ptr %269, align 8, !tbaa !47
  %271 = icmp ne i8 %270, 1
  br i1 %271, label %275, label %272

272:                                              ; preds = %258
  %273 = load i8, ptr %35, align 1, !tbaa !9, !range !22, !noundef !23
  %274 = trunc i8 %273 to i1
  br i1 %274, label %283, label %275

275:                                              ; preds = %272, %258
  %276 = load ptr, ptr %30, align 8, !tbaa !5
  %277 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %276, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %37, ptr align 16 %277, i64 16, i1 false), !tbaa.struct !42
  %278 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %279 = load double, ptr %278, align 16
  %280 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %281 = load double, ptr %280, align 8
  %282 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %21, double %279, double %281)
  br label %357

283:                                              ; preds = %272
  call void @llvm.lifetime.start.p0(i64 24, ptr %38) #11
  %284 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 2
  %285 = load ptr, ptr %284, align 16, !tbaa !48
  %286 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %285)
  %287 = load ptr, ptr %30, align 8, !tbaa !5
  %288 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactKey", ptr %287, i32 0, i32 0
  call void @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %38, ptr noundef nonnull align 8 dereferenceable(16) %286, ptr noundef nonnull align 4 dereferenceable(4) %288)
  %289 = invoke noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE26SucceededAndIsInBroadPhaseEv(ptr noundef nonnull align 8 dereferenceable(24) %38)
          to label %290 unwind label %333

290:                                              ; preds = %283
  br i1 %289, label %291, label %346

291:                                              ; preds = %290
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #11
  %292 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %38)
          to label %293 unwind label %337

293:                                              ; preds = %291
  store ptr %292, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %42) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %43) #11
  %294 = load ptr, ptr %41, align 8, !tbaa !5
  invoke void @_ZNK3JPH16CharacterVirtual23GetAdjustedBodyVelocityERKNS_4BodyERNS_4Vec3ES5_(ptr noundef nonnull align 16 dereferenceable(372) %71, ptr noundef nonnull align 16 dereferenceable(122) %294, ptr noundef nonnull align 16 dereferenceable(16) %42, ptr noundef nonnull align 16 dereferenceable(16) %43)
          to label %295 unwind label %341

295:                                              ; preds = %293
  %296 = load ptr, ptr %41, align 8, !tbaa !5
  %297 = invoke { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %296)
          to label %298 unwind label %341

298:                                              ; preds = %295
  %299 = getelementptr inbounds %"class.JPH::Vec3", ptr %45, i32 0, i32 0
  %300 = getelementptr inbounds %union.anon, ptr %299, i32 0, i32 0
  %301 = getelementptr inbounds { double, double }, ptr %300, i32 0, i32 0
  %302 = extractvalue { double, double } %297, 0
  store double %302, ptr %301, align 16
  %303 = getelementptr inbounds { double, double }, ptr %300, i32 0, i32 1
  %304 = extractvalue { double, double } %297, 1
  store double %304, ptr %303, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %46, ptr align 16 %42, i64 16, i1 false), !tbaa.struct !42
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %47, ptr align 16 %43, i64 16, i1 false), !tbaa.struct !42
  %305 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %71, i32 0, i32 29
  %306 = load float, ptr %305, align 16, !tbaa !49
  %307 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 0
  %308 = load double, ptr %307, align 16
  %309 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 1
  %310 = load double, ptr %309, align 8
  %311 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %312 = load double, ptr %311, align 16
  %313 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %314 = load double, ptr %313, align 8
  %315 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %316 = load double, ptr %315, align 16
  %317 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %318 = load double, ptr %317, align 8
  %319 = invoke { double, double } @_ZNK3JPH16CharacterVirtual32CalculateCharacterGroundVelocityENS_4Vec3ES1_S1_f(ptr noundef nonnull align 16 dereferenceable(372) %71, double %308, double %310, double %312, double %314, double %316, double %318, float noundef %306)
          to label %320 unwind label %341

320:                                              ; preds = %298
  %321 = getelementptr inbounds %"class.JPH::Vec3", ptr %44, i32 0, i32 0
  %322 = getelementptr inbounds %union.anon, ptr %321, i32 0, i32 0
  %323 = getelementptr inbounds { double, double }, ptr %322, i32 0, i32 0
  %324 = extractvalue { double, double } %319, 0
  store double %324, ptr %323, align 16
  %325 = getelementptr inbounds { double, double }, ptr %322, i32 0, i32 1
  %326 = extractvalue { double, double } %319, 1
  store double %326, ptr %325, align 8
  %327 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 0
  %328 = load double, ptr %327, align 16
  %329 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 1
  %330 = load double, ptr %329, align 8
  %331 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %21, double %328, double %330)
          to label %332 unwind label %341

332:                                              ; preds = %320
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #11
  br label %355

333:                                              ; preds = %346, %283
  %334 = landingpad { ptr, i32 }
          cleanup
  %335 = extractvalue { ptr, i32 } %334, 0
  store ptr %335, ptr %39, align 8
  %336 = extractvalue { ptr, i32 } %334, 1
  store i32 %336, ptr %40, align 4
  br label %356

337:                                              ; preds = %291
  %338 = landingpad { ptr, i32 }
          cleanup
  %339 = extractvalue { ptr, i32 } %338, 0
  store ptr %339, ptr %39, align 8
  %340 = extractvalue { ptr, i32 } %338, 1
  store i32 %340, ptr %40, align 4
  br label %345

341:                                              ; preds = %320, %298, %295, %293
  %342 = landingpad { ptr, i32 }
          cleanup
  %343 = extractvalue { ptr, i32 } %342, 0
  store ptr %343, ptr %39, align 8
  %344 = extractvalue { ptr, i32 } %342, 1
  store i32 %344, ptr %40, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #11
  br label %345

345:                                              ; preds = %341, %337
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #11
  br label %356

346:                                              ; preds = %290
  %347 = load ptr, ptr %30, align 8, !tbaa !5
  %348 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %347, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %48, ptr align 16 %348, i64 16, i1 false), !tbaa.struct !42
  %349 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 0
  %350 = load double, ptr %349, align 16
  %351 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 1
  %352 = load double, ptr %351, align 8
  %353 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %21, double %350, double %352)
          to label %354 unwind label %333

354:                                              ; preds = %346
  br label %355

355:                                              ; preds = %354, %332
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %38) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %38) #11
  br label %357

356:                                              ; preds = %345, %333
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %38) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %38) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #11
  br label %582

357:                                              ; preds = %355, %275
  br label %358

358:                                              ; preds = %357, %255
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #11
  store i32 0, ptr %29, align 4
  br label %359

359:                                              ; preds = %358, %227
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #11
  %360 = load i32, ptr %29, align 4
  switch i32 %360, label %363 [
    i32 0, label %361
  ]

361:                                              ; preds = %359
  br label %362

362:                                              ; preds = %361, %182, %176
  store i32 0, ptr %29, align 4
  br label %363

363:                                              ; preds = %362, %359
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #11
  %364 = load i32, ptr %29, align 4
  switch i32 %364, label %588 [
    i32 0, label %365
    i32 5, label %366
  ]

365:                                              ; preds = %363
  br label %366

366:                                              ; preds = %365, %363
  %367 = load ptr, ptr %27, align 8, !tbaa !5
  %368 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %367, i32 1
  store ptr %368, ptr %27, align 8, !tbaa !5
  br label %171

369:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #11
  %370 = load ptr, ptr %22, align 8, !tbaa !5
  %371 = icmp ne ptr %370, null
  br i1 %371, label %372, label %374

372:                                              ; preds = %369
  %373 = load ptr, ptr %22, align 8, !tbaa !5
  br label %376

374:                                              ; preds = %369
  %375 = load ptr, ptr %24, align 8, !tbaa !5
  br label %376

376:                                              ; preds = %374, %372
  %377 = phi ptr [ %373, %372 ], [ %375, %374 ]
  store ptr %377, ptr %49, align 8, !tbaa !5
  %378 = load i32, ptr %19, align 4, !tbaa !44
  %379 = icmp sge i32 %378, 1
  br i1 %379, label %380, label %399

380:                                              ; preds = %376
  call void @llvm.lifetime.start.p0(i64 16, ptr %50) #11
  %381 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %20)
  %382 = getelementptr inbounds %"class.JPH::Vec3", ptr %50, i32 0, i32 0
  %383 = getelementptr inbounds %union.anon, ptr %382, i32 0, i32 0
  %384 = getelementptr inbounds { double, double }, ptr %383, i32 0, i32 0
  %385 = extractvalue { double, double } %381, 0
  store double %385, ptr %384, align 16
  %386 = getelementptr inbounds { double, double }, ptr %383, i32 0, i32 1
  %387 = extractvalue { double, double } %381, 1
  store double %387, ptr %386, align 8
  %388 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %388, ptr align 16 %50, i64 16, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #11
  %389 = load i32, ptr %19, align 4, !tbaa !44
  %390 = sitofp i32 %389 to float
  %391 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %21, float noundef %390)
  %392 = getelementptr inbounds %"class.JPH::Vec3", ptr %51, i32 0, i32 0
  %393 = getelementptr inbounds %union.anon, ptr %392, i32 0, i32 0
  %394 = getelementptr inbounds { double, double }, ptr %393, i32 0, i32 0
  %395 = extractvalue { double, double } %391, 0
  store double %395, ptr %394, align 16
  %396 = getelementptr inbounds { double, double }, ptr %393, i32 0, i32 1
  %397 = extractvalue { double, double } %391, 1
  store double %397, ptr %396, align 8
  %398 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %398, ptr align 16 %51, i64 16, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #11
  br label %427

399:                                              ; preds = %376
  %400 = load ptr, ptr %49, align 8, !tbaa !5
  %401 = icmp ne ptr %400, null
  br i1 %401, label %402, label %409

402:                                              ; preds = %399
  %403 = load ptr, ptr %49, align 8, !tbaa !5
  %404 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %403, i32 0, i32 5
  %405 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %405, ptr align 16 %404, i64 16, i1 false), !tbaa.struct !42
  %406 = load ptr, ptr %49, align 8, !tbaa !5
  %407 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %406, i32 0, i32 3
  %408 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %408, ptr align 16 %407, i64 16, i1 false), !tbaa.struct !42
  br label %426

409:                                              ; preds = %399
  call void @llvm.lifetime.start.p0(i64 16, ptr %52) #11
  %410 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %411 = getelementptr inbounds %"class.JPH::Vec3", ptr %52, i32 0, i32 0
  %412 = getelementptr inbounds %union.anon, ptr %411, i32 0, i32 0
  %413 = getelementptr inbounds { double, double }, ptr %412, i32 0, i32 0
  %414 = extractvalue { double, double } %410, 0
  store double %414, ptr %413, align 16
  %415 = getelementptr inbounds { double, double }, ptr %412, i32 0, i32 1
  %416 = extractvalue { double, double } %410, 1
  store double %416, ptr %415, align 8
  %417 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %417, ptr align 16 %52, i64 16, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 16, ptr %52) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %53) #11
  %418 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %419 = getelementptr inbounds %"class.JPH::Vec3", ptr %53, i32 0, i32 0
  %420 = getelementptr inbounds %union.anon, ptr %419, i32 0, i32 0
  %421 = getelementptr inbounds { double, double }, ptr %420, i32 0, i32 0
  %422 = extractvalue { double, double } %418, 0
  store double %422, ptr %421, align 16
  %423 = getelementptr inbounds { double, double }, ptr %420, i32 0, i32 1
  %424 = extractvalue { double, double } %418, 1
  store double %424, ptr %423, align 8
  %425 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %425, ptr align 16 %53, i64 16, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 16, ptr %53) #11
  br label %426

426:                                              ; preds = %409, %402
  br label %427

427:                                              ; preds = %426, %380
  %428 = load ptr, ptr %49, align 8, !tbaa !5
  %429 = icmp ne ptr %428, null
  br i1 %429, label %430, label %449

430:                                              ; preds = %427
  %431 = load ptr, ptr %49, align 8, !tbaa !5
  %432 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactKey", ptr %431, i32 0, i32 0
  %433 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %433, ptr align 16 %432, i64 4, i1 false), !tbaa.struct !50
  %434 = load ptr, ptr %49, align 8, !tbaa !5
  %435 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactKey", ptr %434, i32 0, i32 2
  %436 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %436, ptr align 8 %435, i64 4, i1 false), !tbaa.struct !50
  %437 = load ptr, ptr %49, align 8, !tbaa !5
  %438 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %437, i32 0, i32 2
  %439 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %439, ptr align 16 %438, i64 16, i1 false), !tbaa.struct !42
  %440 = load ptr, ptr %49, align 8, !tbaa !5
  %441 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %440, i32 0, i32 13
  %442 = load ptr, ptr %441, align 16, !tbaa !51
  %443 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 13
  %444 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH8RefConstINS_15PhysicsMaterialEEaSEPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %443, ptr noundef %442)
  %445 = load ptr, ptr %49, align 8, !tbaa !5
  %446 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %445, i32 0, i32 12
  %447 = load i64, ptr %446, align 8, !tbaa !52
  %448 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 14
  store i64 %447, ptr %448, align 8, !tbaa !53
  br label %463

449:                                              ; preds = %427
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #11
  call void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %54)
  %450 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %450, ptr align 4 %54, i64 4, i1 false), !tbaa.struct !50
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #11
  call void @llvm.memset.p0.i64(ptr align 4 %55, i8 0, i64 4, i1 false)
  call void @_ZN3JPH10SubShapeIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %55) #11
  %451 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %451, ptr align 4 %55, i64 4, i1 false), !tbaa.struct !50
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %56) #11
  %452 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %453 = getelementptr inbounds %"class.JPH::Vec3", ptr %56, i32 0, i32 0
  %454 = getelementptr inbounds %union.anon, ptr %453, i32 0, i32 0
  %455 = getelementptr inbounds { double, double }, ptr %454, i32 0, i32 0
  %456 = extractvalue { double, double } %452, 0
  store double %456, ptr %455, align 16
  %457 = getelementptr inbounds { double, double }, ptr %454, i32 0, i32 1
  %458 = extractvalue { double, double } %452, 1
  store double %458, ptr %457, align 8
  %459 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %459, ptr align 16 %56, i64 16, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 16, ptr %56) #11
  %460 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 13
  %461 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH8RefConstINS_15PhysicsMaterialEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %460, ptr noundef nonnull align 8 dereferenceable(8) @_ZN3JPH15PhysicsMaterial8sDefaultE)
  %462 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 14
  store i64 0, ptr %462, align 8, !tbaa !53
  br label %463

463:                                              ; preds = %449, %430
  %464 = load i32, ptr %17, align 4, !tbaa !44
  %465 = icmp sgt i32 %464, 0
  br i1 %465, label %466, label %468

466:                                              ; preds = %463
  %467 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 7
  store i32 0, ptr %467, align 4, !tbaa !54
  br label %581

468:                                              ; preds = %463
  %469 = load i32, ptr %18, align 4, !tbaa !44
  %470 = icmp sgt i32 %469, 0
  br i1 %470, label %471, label %574

471:                                              ; preds = %468
  call void @llvm.lifetime.start.p0(i64 16, ptr %57) #11
  %472 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %71, i32 0, i32 24
  %473 = load ptr, ptr %24, align 8, !tbaa !5
  %474 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %473, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %58, ptr align 16 %474, i64 16, i1 false), !tbaa.struct !42
  %475 = getelementptr inbounds { double, double }, ptr %58, i32 0, i32 0
  %476 = load double, ptr %475, align 16
  %477 = getelementptr inbounds { double, double }, ptr %58, i32 0, i32 1
  %478 = load double, ptr %477, align 8
  %479 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %472, double %476, double %478)
  %480 = getelementptr inbounds %"class.JPH::Vec3", ptr %57, i32 0, i32 0
  %481 = getelementptr inbounds %union.anon, ptr %480, i32 0, i32 0
  %482 = getelementptr inbounds { double, double }, ptr %481, i32 0, i32 0
  %483 = extractvalue { double, double } %479, 0
  store double %483, ptr %482, align 16
  %484 = getelementptr inbounds { double, double }, ptr %481, i32 0, i32 1
  %485 = extractvalue { double, double } %479, 1
  store double %485, ptr %484, align 8
  %486 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %59, ptr align 16 %486, i64 16, i1 false), !tbaa.struct !42
  %487 = getelementptr inbounds { double, double }, ptr %59, i32 0, i32 0
  %488 = load double, ptr %487, align 16
  %489 = getelementptr inbounds { double, double }, ptr %59, i32 0, i32 1
  %490 = load double, ptr %489, align 8
  %491 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %57, double %488, double %490)
  %492 = fcmp ogt float %491, 0x3F1A36E2E0000000
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #11
  br i1 %492, label %493, label %495

493:                                              ; preds = %471
  %494 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 7
  store i32 1, ptr %494, align 4, !tbaa !54
  br label %573

495:                                              ; preds = %471
  call void @llvm.lifetime.start.p0(i64 32, ptr %60) #11
  %496 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %71, i32 0, i32 25
  %497 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %496)
  %498 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %71, i32 0, i32 25
  %499 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %498)
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #11
  %500 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3JPH16STLTempAllocatorINS_16CharacterVirtual7ContactEEC2ERNS_13TempAllocatorE(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull align 8 dereferenceable(8) %500)
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEEC2EPKS2_S7_RKS4_(ptr noundef nonnull align 8 dereferenceable(32) %60, ptr noundef %497, ptr noundef %499, ptr noundef nonnull align 8 dereferenceable(8) %61)
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #11
  call void @llvm.lifetime.start.p0(i64 32, ptr %62) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #11
  %501 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH16STLTempAllocatorINS_16CharacterVirtual10ConstraintEEC2ERNS_13TempAllocatorE(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull align 8 dereferenceable(8) %501)
          to label %502 unwind label %546

502:                                              ; preds = %495
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %62, ptr noundef nonnull align 8 dereferenceable(8) %63)
          to label %503 unwind label %546

503:                                              ; preds = %502
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #11
  %504 = invoke noundef i64 @_ZNK3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %60)
          to label %505 unwind label %550

505:                                              ; preds = %503
  %506 = mul i64 %504, 2
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32) %62, i64 noundef %506)
          to label %507 unwind label %550

507:                                              ; preds = %505
  %508 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %71, i32 0, i32 29
  %509 = load float, ptr %508, align 16, !tbaa !49
  invoke void @_ZNK3JPH16CharacterVirtual20DetermineConstraintsERNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS2_EEEEfRNS1_INS0_10ConstraintENS3_IS7_EEEE(ptr noundef nonnull align 16 dereferenceable(372) %71, ptr noundef nonnull align 8 dereferenceable(32) %60, float noundef %509, ptr noundef nonnull align 8 dereferenceable(32) %62)
          to label %510 unwind label %550

510:                                              ; preds = %507
  call void @llvm.lifetime.start.p0(i64 16, ptr %64) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %65) #11
  call void @llvm.lifetime.start.p0(i64 32, ptr %66) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #11
  %511 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH16STLTempAllocatorINS_16CharacterVirtual10ContactKeyEEC2ERNS_13TempAllocatorE(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull align 8 dereferenceable(8) %511)
          to label %512 unwind label %554

512:                                              ; preds = %510
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %66, ptr noundef nonnull align 8 dereferenceable(8) %67)
          to label %513 unwind label %554

513:                                              ; preds = %512
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #11
  %514 = invoke noundef i64 @_ZNK3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %60)
          to label %515 unwind label %558

515:                                              ; preds = %513
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32) %66, i64 noundef %514)
          to label %516 unwind label %558

516:                                              ; preds = %515
  %517 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 4
  %518 = invoke { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %517)
          to label %519 unwind label %558

519:                                              ; preds = %516
  %520 = getelementptr inbounds %"class.JPH::Vec3", ptr %68, i32 0, i32 0
  %521 = getelementptr inbounds %union.anon, ptr %520, i32 0, i32 0
  %522 = getelementptr inbounds { double, double }, ptr %521, i32 0, i32 0
  %523 = extractvalue { double, double } %518, 0
  store double %523, ptr %522, align 16
  %524 = getelementptr inbounds { double, double }, ptr %521, i32 0, i32 1
  %525 = extractvalue { double, double } %518, 1
  store double %525, ptr %524, align 8
  %526 = load ptr, ptr %6, align 8, !tbaa !5
  %527 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 0
  %528 = load double, ptr %527, align 16
  %529 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 1
  %530 = load double, ptr %529, align 8
  invoke void @_ZN3JPH16CharacterVirtual16SolveConstraintsENS_4Vec3EffRNS_5ArrayINS0_10ConstraintENS_16STLTempAllocatorIS3_EEEERNS2_INS0_10ContactKeyENS4_IS8_EEEERfRS1_RNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372) %71, double %528, double %530, float noundef 1.000000e+00, float noundef 1.000000e+00, ptr noundef nonnull align 8 dereferenceable(32) %62, ptr noundef nonnull align 8 dereferenceable(32) %66, ptr noundef nonnull align 4 dereferenceable(4) %65, ptr noundef nonnull align 16 dereferenceable(16) %64, ptr noundef nonnull align 8 dereferenceable(8) %526)
          to label %531 unwind label %558

531:                                              ; preds = %519
  call void @llvm.lifetime.start.p0(i64 4, ptr %69) #11
  %532 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %71, i32 0, i32 29
  %533 = load float, ptr %532, align 16, !tbaa !49
  %534 = fmul float 0x3FE3333340000000, %533
  %535 = invoke noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef %534)
          to label %536 unwind label %562

536:                                              ; preds = %531
  store float %535, ptr %69, align 4, !tbaa !45
  %537 = load float, ptr %65, align 4, !tbaa !45
  %538 = fcmp olt float %537, 0x3F50624DE0000000
  br i1 %538, label %544, label %539

539:                                              ; preds = %536
  %540 = invoke noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %64)
          to label %541 unwind label %562

541:                                              ; preds = %539
  %542 = load float, ptr %69, align 4, !tbaa !45
  %543 = fcmp olt float %540, %542
  br i1 %543, label %544, label %566

544:                                              ; preds = %541, %536
  %545 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 7
  store i32 0, ptr %545, align 4, !tbaa !54
  br label %568

546:                                              ; preds = %502, %495
  %547 = landingpad { ptr, i32 }
          cleanup
  %548 = extractvalue { ptr, i32 } %547, 0
  store ptr %548, ptr %39, align 8
  %549 = extractvalue { ptr, i32 } %547, 1
  store i32 %549, ptr %40, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #11
  br label %572

550:                                              ; preds = %507, %505, %503
  %551 = landingpad { ptr, i32 }
          cleanup
  %552 = extractvalue { ptr, i32 } %551, 0
  store ptr %552, ptr %39, align 8
  %553 = extractvalue { ptr, i32 } %551, 1
  store i32 %553, ptr %40, align 4
  br label %571

554:                                              ; preds = %512, %510
  %555 = landingpad { ptr, i32 }
          cleanup
  %556 = extractvalue { ptr, i32 } %555, 0
  store ptr %556, ptr %39, align 8
  %557 = extractvalue { ptr, i32 } %555, 1
  store i32 %557, ptr %40, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #11
  br label %570

558:                                              ; preds = %519, %516, %515, %513
  %559 = landingpad { ptr, i32 }
          cleanup
  %560 = extractvalue { ptr, i32 } %559, 0
  store ptr %560, ptr %39, align 8
  %561 = extractvalue { ptr, i32 } %559, 1
  store i32 %561, ptr %40, align 4
  br label %569

562:                                              ; preds = %539, %531
  %563 = landingpad { ptr, i32 }
          cleanup
  %564 = extractvalue { ptr, i32 } %563, 0
  store ptr %564, ptr %39, align 8
  %565 = extractvalue { ptr, i32 } %563, 1
  store i32 %565, ptr %40, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %69) #11
  br label %569

566:                                              ; preds = %541
  %567 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 7
  store i32 1, ptr %567, align 4, !tbaa !54
  br label %568

568:                                              ; preds = %566, %544
  call void @llvm.lifetime.end.p0(i64 4, ptr %69) #11
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %66) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %66) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %64) #11
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %62) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %62) #11
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %60) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %60) #11
  br label %573

569:                                              ; preds = %562, %558
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %66) #11
  br label %570

570:                                              ; preds = %569, %554
  call void @llvm.lifetime.end.p0(i64 32, ptr %66) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %64) #11
  br label %571

571:                                              ; preds = %570, %550
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %62) #11
  br label %572

572:                                              ; preds = %571, %546
  call void @llvm.lifetime.end.p0(i64 32, ptr %62) #11
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %60) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %60) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #11
  br label %582

573:                                              ; preds = %568, %493
  br label %580

574:                                              ; preds = %468
  %575 = load ptr, ptr %49, align 8, !tbaa !5
  %576 = icmp ne ptr %575, null
  %577 = zext i1 %576 to i64
  %578 = select i1 %576, i32 2, i32 3
  %579 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %71, i32 0, i32 7
  store i32 %578, ptr %579, align 4, !tbaa !54
  br label %580

580:                                              ; preds = %574, %573
  br label %581

581:                                              ; preds = %580, %466
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #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 4, ptr %17) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #11
  ret void

582:                                              ; preds = %572, %356
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #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 4, ptr %17) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #11
  br label %583

583:                                              ; preds = %582
  %584 = load ptr, ptr %39, align 8
  %585 = load i32, ptr %40, align 4
  %586 = insertvalue { ptr, i32 } poison, ptr %584, 0
  %587 = insertvalue { ptr, i32 } %586, i32 %585, 1
  resume { ptr, i32 } %587

588:                                              ; preds = %363
  unreachable
}

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat4427sInverseRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, double, double, double, double) #9 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #8 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #8 align 2

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

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

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

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

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


; 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::RefConst.1" = type { ptr }
%"class.JPH::CharacterContactSettings" = type { i8, i8 }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::BodyLockRead" = type { %"class.JPH::BodyLockBase" }
%"class.JPH::BodyLockBase" = type { ptr, ptr, ptr }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::Array.28" = type { %"class.JPH::STLTempAllocator", i64, i64, ptr }
%"class.JPH::STLTempAllocator" = type { ptr }
%"class.JPH::Array.34" = type { %"class.JPH::STLTempAllocator.35", i64, i64, ptr }
%"class.JPH::STLTempAllocator.35" = type { ptr }
%"class.JPH::Array.29" = type { %"class.JPH::STLTempAllocator.30", i64, i64, ptr }
%"class.JPH::STLTempAllocator.30" = type { ptr }

@_ZN3JPH15PhysicsMaterial8sDefaultE = external global %"class.JPH::RefConst.1", align 8

; 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 } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1 align 2

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

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

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

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

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

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

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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6 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 #5 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 #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_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 uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE26SucceededAndIsInBroadPhaseEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #7 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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: mustprogress uwtable
declare dso_local void @_ZNK3JPH16CharacterVirtual20DetermineConstraintsERNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS2_EEEEfRNS1_INS0_10ConstraintENS3_IS7_EEEE(ptr noundef nonnull align 16 dereferenceable(372), ptr noundef nonnull align 8 dereferenceable(32), float noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16CharacterVirtual23UpdateSupportingContactEbRNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372) %0, i1 noundef zeroext %1, ptr noundef nonnull align 8 dereferenceable(8) %2) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.JPH::CharacterContactSettings", align 1
  %5 = alloca %"class.JPH::Mat44", align 16
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca %"class.JPH::BodyLockRead", align 8
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::BodyID", align 4
  %12 = alloca %"class.JPH::SubShapeID", align 4
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Array.28", align 8
  %15 = alloca %"class.JPH::STLTempAllocator", align 8
  %16 = alloca %"class.JPH::Array.34", align 8
  %17 = alloca %"class.JPH::STLTempAllocator.35", align 8
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca float, align 4
  %20 = alloca %"class.JPH::Array.29", align 8
  %21 = alloca %"class.JPH::STLTempAllocator.30", align 8
  %22 = getelementptr inbounds i8, ptr %0, i64 288
  %23 = tail call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %22)
  %24 = tail call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %22)
  %.not194 = icmp eq ptr %23, %24
  br i1 %.not194, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %25 = getelementptr inbounds i8, ptr %0, i64 188
  %26 = getelementptr inbounds i8, ptr %0, i64 272
  br i1 %1, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %43
  %.0195.us = phi ptr [ %44, %43 ], [ %23, %.lr.ph ]
  %27 = getelementptr inbounds i8, ptr %.0195.us, i64 121
  %28 = load i8, ptr %27, align 1, !tbaa !5, !range !20, !noundef !21
  %29 = trunc nuw i8 %28 to i1
  br i1 %29, label %43, label %30

30:                                               ; preds = %.lr.ph.split.us
  %31 = getelementptr inbounds i8, ptr %.0195.us, i64 120
  %32 = load i8, ptr %31, align 8, !tbaa !22, !range !20, !noundef !21
  %33 = trunc nuw i8 %32 to i1
  br i1 %33, label %43, label %34

34:                                               ; preds = %30
  %35 = getelementptr inbounds i8, ptr %.0195.us, i64 80
  %36 = load float, ptr %35, align 16, !tbaa !23
  %37 = load float, ptr %25, align 4, !tbaa !24
  %38 = fcmp olt float %36, %37
  br i1 %38, label %39, label %43

39:                                               ; preds = %34
  %40 = call noundef zeroext i1 @_ZNK3JPH16CharacterVirtual15ValidateContactERKNS0_7ContactE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(123) %.0195.us)
  br i1 %40, label %42, label %41

41:                                               ; preds = %39
  store i8 1, ptr %27, align 1, !tbaa !5
  br label %43

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %4) #10
  call void @_ZN3JPH24CharacterContactSettingsC2Ev(ptr noundef nonnull align 1 dereferenceable(2) %4) #10
  call void @_ZN3JPH16CharacterVirtual12ContactAddedERKNS0_7ContactERNS_24CharacterContactSettingsE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(123) %.0195.us, ptr noundef nonnull align 1 dereferenceable(2) %4)
  store i8 1, ptr %31, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %4) #10
  br label %43

43:                                               ; preds = %42, %41, %34, %30, %.lr.ph.split.us
  %44 = getelementptr inbounds i8, ptr %.0195.us, i64 128
  %.not.us = icmp eq ptr %44, %24
  br i1 %.not.us, label %._crit_edge, label %.lr.ph.split.us

._crit_edge:                                      ; preds = %86, %43, %3
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #10
  %45 = getelementptr inbounds i8, ptr %0, i64 256
  %.sroa.088.0.copyload = load double, ptr %45, align 16
  %.sroa.289.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 264
  %.sroa.289.0.copyload = load double, ptr %.sroa.289.0..sroa_idx, align 8, !tbaa !40
  %46 = getelementptr inbounds i8, ptr %0, i64 240
  %.sroa.086.0.copyload = load double, ptr %46, align 16
  %.sroa.287.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 248
  %.sroa.287.0.copyload = load double, ptr %.sroa.287.0..sroa_idx, align 8, !tbaa !40
  call void @_ZN3JPH5Mat4427sInverseRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %5, double %.sroa.088.0.copyload, double %.sroa.289.0.copyload, double %.sroa.086.0.copyload, double %.sroa.287.0.copyload)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #10
  %47 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %48 = extractvalue { double, double } %47, 0
  store double %48, ptr %6, align 16
  %49 = getelementptr inbounds i8, ptr %6, i64 8
  %50 = extractvalue { double, double } %47, 1
  store double %50, ptr %49, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #10
  %51 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %52 = extractvalue { double, double } %51, 0
  store double %52, ptr %7, align 16
  %53 = getelementptr inbounds i8, ptr %7, i64 8
  %54 = extractvalue { double, double } %51, 1
  store double %54, ptr %53, align 8
  %55 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %22)
  %56 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %22)
  %.not159196 = icmp eq ptr %55, %56
  br i1 %.not159196, label %.thread, label %.lr.ph206

.lr.ph206:                                        ; preds = %._crit_edge
  %57 = getelementptr inbounds i8, ptr %0, i64 32
  %.sroa.248.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 40
  %58 = getelementptr inbounds i8, ptr %0, i64 48
  %59 = getelementptr inbounds i8, ptr %0, i64 64
  %60 = getelementptr inbounds i8, ptr %0, i64 16
  %.sroa.229.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %.sroa.227.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %61 = getelementptr inbounds i8, ptr %0, i64 352
  br label %92

.lr.ph.split:                                     ; preds = %.lr.ph, %86
  %.0195 = phi ptr [ %87, %86 ], [ %23, %.lr.ph ]
  %62 = getelementptr inbounds i8, ptr %.0195, i64 121
  %63 = load i8, ptr %62, align 1, !tbaa !5, !range !20, !noundef !21
  %64 = trunc nuw i8 %63 to i1
  br i1 %64, label %86, label %65

65:                                               ; preds = %.lr.ph.split
  %66 = getelementptr inbounds i8, ptr %.0195, i64 120
  %67 = load i8, ptr %66, align 8, !tbaa !22, !range !20, !noundef !21
  %68 = trunc nuw i8 %67 to i1
  br i1 %68, label %86, label %69

69:                                               ; preds = %65
  %70 = getelementptr inbounds i8, ptr %.0195, i64 80
  %71 = load float, ptr %70, align 16, !tbaa !23
  %72 = load float, ptr %25, align 4, !tbaa !24
  %73 = fcmp olt float %71, %72
  br i1 %73, label %74, label %86

74:                                               ; preds = %69
  %75 = getelementptr inbounds i8, ptr %.0195, i64 64
  %76 = getelementptr inbounds i8, ptr %.0195, i64 32
  %.sroa.090.0.copyload = load double, ptr %76, align 16
  %.sroa.291.0..sroa_idx = getelementptr inbounds i8, ptr %.0195, i64 40
  %.sroa.291.0.copyload = load double, ptr %.sroa.291.0..sroa_idx, align 8, !tbaa !40
  %77 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %26, double %.sroa.090.0.copyload, double %.sroa.291.0.copyload)
  %78 = extractvalue { double, double } %77, 0
  %79 = extractvalue { double, double } %77, 1
  %80 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %75, double %78, double %79)
  %81 = fcmp ugt float %80, 0x3F1A36E2E0000000
  br i1 %81, label %86, label %82

82:                                               ; preds = %74
  %83 = call noundef zeroext i1 @_ZNK3JPH16CharacterVirtual15ValidateContactERKNS0_7ContactE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(123) %.0195)
  br i1 %83, label %84, label %85

84:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %4) #10
  call void @_ZN3JPH24CharacterContactSettingsC2Ev(ptr noundef nonnull align 1 dereferenceable(2) %4) #10
  call void @_ZN3JPH16CharacterVirtual12ContactAddedERKNS0_7ContactERNS_24CharacterContactSettingsE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(123) %.0195, ptr noundef nonnull align 1 dereferenceable(2) %4)
  store i8 1, ptr %66, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %4) #10
  br label %86

85:                                               ; preds = %82
  store i8 1, ptr %62, align 1, !tbaa !5
  br label %86

86:                                               ; preds = %84, %85, %74, %69, %65, %.lr.ph.split
  %87 = getelementptr inbounds i8, ptr %.0195, i64 128
  %.not = icmp eq ptr %87, %24
  br i1 %.not, label %._crit_edge, label %.lr.ph.split

._crit_edge207:                                   ; preds = %158
  %88 = icmp sgt i32 %.4, 0
  %89 = icmp sgt i32 %.4120, 0
  %.not160 = icmp eq ptr %.4130, null
  %90 = select i1 %.not160, ptr %.3139, ptr %.4130
  %91 = icmp sgt i32 %.4125, 0
  br i1 %91, label %173, label %160

92:                                               ; preds = %.lr.ph206, %158
  %.0115204 = phi i32 [ 0, %.lr.ph206 ], [ %.4, %158 ]
  %.0116203 = phi i32 [ 0, %.lr.ph206 ], [ %.4120, %158 ]
  %.0121202 = phi i32 [ 0, %.lr.ph206 ], [ %.4125, %158 ]
  %.0126201 = phi ptr [ null, %.lr.ph206 ], [ %.4130, %158 ]
  %.0131200 = phi float [ 0xC7EFFFFFE0000000, %.lr.ph206 ], [ %.4135, %158 ]
  %.0136199 = phi ptr [ null, %.lr.ph206 ], [ %.3139, %158 ]
  %.0140198 = phi float [ 0x47EFFFFFE0000000, %.lr.ph206 ], [ %.3143, %158 ]
  %.0144197 = phi ptr [ %55, %.lr.ph206 ], [ %159, %158 ]
  %93 = getelementptr inbounds i8, ptr %.0144197, i64 120
  %94 = load i8, ptr %93, align 8, !tbaa !22, !range !20, !noundef !21
  %95 = trunc nuw i8 %94 to i1
  br i1 %95, label %96, label %158

96:                                               ; preds = %92
  %97 = getelementptr inbounds i8, ptr %.0144197, i64 121
  %98 = load i8, ptr %97, align 1, !tbaa !5, !range !20, !noundef !21
  %99 = trunc nuw i8 %98 to i1
  br i1 %99, label %158, label %100

100:                                              ; preds = %96
  %101 = getelementptr inbounds i8, ptr %.0144197, i64 64
  %.sroa.047.0.copyload = load double, ptr %57, align 16
  %.sroa.248.0.copyload = load double, ptr %.sroa.248.0..sroa_idx, align 8, !tbaa !40
  %102 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %101, double %.sroa.047.0.copyload, double %.sroa.248.0.copyload)
  %103 = getelementptr inbounds i8, ptr %.0144197, i64 80
  %104 = load float, ptr %103, align 16, !tbaa !23
  %105 = fcmp olt float %104, %.0140198
  %.1141 = select i1 %105, float %104, float %.0140198
  %.1137 = select i1 %105, ptr %.0144197, ptr %.0136199
  %106 = getelementptr inbounds i8, ptr %.0144197, i64 16
  %.sroa.043.0.copyload = load double, ptr %106, align 16
  %.sroa.244.0..sroa_idx = getelementptr inbounds i8, ptr %.0144197, i64 24
  %.sroa.244.0.copyload = load double, ptr %.sroa.244.0..sroa_idx, align 8, !tbaa !40
  %107 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %5, double %.sroa.043.0.copyload, double %.sroa.244.0.copyload)
  %108 = extractvalue { double, double } %107, 0
  %109 = extractvalue { double, double } %107, 1
  %110 = call noundef float @_ZNK3JPH5Plane14SignedDistanceENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %58, double %108, double %109)
  %111 = fcmp ule float %110, 0.000000e+00
  br i1 %111, label %112, label %158

112:                                              ; preds = %100
  %113 = fcmp olt float %.0131200, %102
  %.1132 = select i1 %113, float %102, float %.0131200
  %.1127 = select i1 %113, ptr %.0144197, ptr %.0126201
  %114 = load float, ptr %59, align 16, !tbaa !41
  %115 = fcmp ule float %114, 0x3FEFFF2E40000000
  %116 = fcmp ult float %102, %114
  %.not178 = and i1 %115, %116
  %117 = zext i1 %.not178 to i32
  %.1117 = add nsw i32 %.0116203, %117
  %not..not178 = xor i1 %.not178, true
  %118 = zext i1 %not..not178 to i32
  %.1 = add nsw i32 %.0115204, %118
  %119 = fcmp ult float %102, 0x3FB47AE140000000
  br i1 %119, label %158, label %120

120:                                              ; preds = %112
  %.sroa.039.0.copyload = load double, ptr %101, align 16
  %.sroa.240.0..sroa_idx = getelementptr inbounds i8, ptr %.0144197, i64 72
  %.sroa.240.0.copyload = load double, ptr %.sroa.240.0..sroa_idx, align 8, !tbaa !40
  %121 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %.sroa.039.0.copyload, double %.sroa.240.0.copyload)
  %122 = add nsw i32 %.0121202, 1
  %123 = getelementptr inbounds i8, ptr %.0144197, i64 88
  %124 = load i8, ptr %123, align 8, !tbaa !42
  %.not164 = icmp ne i8 %124, 1
  %brmerge = select i1 %.not164, i1 true, i1 %.not178
  br i1 %brmerge, label %125, label %128

125:                                              ; preds = %120
  %126 = getelementptr inbounds i8, ptr %.0144197, i64 32
  %.sroa.037.0.copyload = load double, ptr %126, align 16
  %.sroa.238.0..sroa_idx = getelementptr inbounds i8, ptr %.0144197, i64 40
  %.sroa.238.0.copyload = load double, ptr %.sroa.238.0..sroa_idx, align 8, !tbaa !40
  %127 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %.sroa.037.0.copyload, double %.sroa.238.0.copyload)
  br label %158

128:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #10
  %129 = load ptr, ptr %60, align 16, !tbaa !43
  %130 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %129)
  call void @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(16) %130, ptr noundef nonnull align 4 dereferenceable(4) %.0144197)
  %131 = invoke noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE26SucceededAndIsInBroadPhaseEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %132 unwind label %147

132:                                              ; preds = %128
  br i1 %131, label %133, label %153

133:                                              ; preds = %132
  %134 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %135 unwind label %149

135:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #10
  invoke void @_ZNK3JPH16CharacterVirtual23GetAdjustedBodyVelocityERKNS_4BodyERNS_4Vec3ES5_(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(122) %134, ptr noundef nonnull align 16 dereferenceable(16) %9, ptr noundef nonnull align 16 dereferenceable(16) %10)
          to label %136 unwind label %151

136:                                              ; preds = %135
  %137 = invoke { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %134)
          to label %138 unwind label %151

138:                                              ; preds = %136
  %139 = extractvalue { double, double } %137, 0
  %140 = extractvalue { double, double } %137, 1
  %.sroa.028.0.copyload = load double, ptr %9, align 16
  %.sroa.229.0.copyload = load double, ptr %.sroa.229.0..sroa_idx, align 8, !tbaa !40
  %.sroa.026.0.copyload = load double, ptr %10, align 16
  %.sroa.227.0.copyload = load double, ptr %.sroa.227.0..sroa_idx, align 8, !tbaa !40
  %141 = load float, ptr %61, align 16, !tbaa !44
  %142 = invoke { double, double } @_ZNK3JPH16CharacterVirtual32CalculateCharacterGroundVelocityENS_4Vec3ES1_S1_f(ptr noundef nonnull align 16 dereferenceable(372) %0, double %139, double %140, double %.sroa.028.0.copyload, double %.sroa.229.0.copyload, double %.sroa.026.0.copyload, double %.sroa.227.0.copyload, float noundef %141)
          to label %143 unwind label %151

143:                                              ; preds = %138
  %144 = extractvalue { double, double } %142, 0
  %145 = extractvalue { double, double } %142, 1
  %146 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %144, double %145)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #10
  br label %156

147:                                              ; preds = %128
  %148 = landingpad { ptr, i32 }
          cleanup
  br label %157

149:                                              ; preds = %133
  %150 = landingpad { ptr, i32 }
          cleanup
  br label %157

151:                                              ; preds = %138, %136, %135
  %152 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #10
  br label %157

153:                                              ; preds = %132
  %154 = getelementptr inbounds i8, ptr %.0144197, i64 32
  %.sroa.024.0.copyload = load double, ptr %154, align 16
  %.sroa.225.0..sroa_idx = getelementptr inbounds i8, ptr %.0144197, i64 40
  %.sroa.225.0.copyload = load double, ptr %.sroa.225.0..sroa_idx, align 8, !tbaa !40
  %155 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %.sroa.024.0.copyload, double %.sroa.225.0.copyload)
  br label %156

156:                                              ; preds = %153, %143
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #10
  br label %158

157:                                              ; preds = %149, %151, %147
  %.pn165.pn = phi { ptr, i32 } [ %148, %147 ], [ %152, %151 ], [ %150, %149 ]
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #10
  br label %260

158:                                              ; preds = %100, %125, %156, %112, %92, %96
  %.3143 = phi float [ %.0140198, %96 ], [ %.0140198, %92 ], [ %.1141, %112 ], [ %.1141, %156 ], [ %.1141, %125 ], [ %.1141, %100 ]
  %.3139 = phi ptr [ %.0136199, %96 ], [ %.0136199, %92 ], [ %.1137, %112 ], [ %.1137, %156 ], [ %.1137, %125 ], [ %.1137, %100 ]
  %.4135 = phi float [ %.0131200, %96 ], [ %.0131200, %92 ], [ %.1132, %112 ], [ %.1132, %156 ], [ %.1132, %125 ], [ %.0131200, %100 ]
  %.4130 = phi ptr [ %.0126201, %96 ], [ %.0126201, %92 ], [ %.1127, %112 ], [ %.1127, %156 ], [ %.1127, %125 ], [ %.0126201, %100 ]
  %.4125 = phi i32 [ %.0121202, %96 ], [ %.0121202, %92 ], [ %.0121202, %112 ], [ %122, %156 ], [ %122, %125 ], [ %.0121202, %100 ]
  %.4120 = phi i32 [ %.0116203, %96 ], [ %.0116203, %92 ], [ %.1117, %112 ], [ %.1117, %156 ], [ %.1117, %125 ], [ %.0116203, %100 ]
  %.4 = phi i32 [ %.0115204, %96 ], [ %.0115204, %92 ], [ %.1, %112 ], [ %.1, %156 ], [ %.1, %125 ], [ %.0115204, %100 ]
  %159 = getelementptr inbounds i8, ptr %.0144197, i64 128
  %.not159 = icmp eq ptr %159, %56
  br i1 %.not159, label %._crit_edge207, label %92

160:                                              ; preds = %._crit_edge207
  %.not161 = icmp eq ptr %90, null
  br i1 %.not161, label %.thread, label %.thread173

.thread173:                                       ; preds = %160
  %161 = getelementptr inbounds i8, ptr %90, i64 64
  %162 = getelementptr inbounds i8, ptr %0, i64 96
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %162, ptr noundef nonnull align 16 dereferenceable(16) %161, i64 16, i1 false), !tbaa.struct !45
  %163 = getelementptr inbounds i8, ptr %90, i64 32
  %164 = getelementptr inbounds i8, ptr %0, i64 112
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %164, ptr noundef nonnull align 16 dereferenceable(16) %163, i64 16, i1 false), !tbaa.struct !45
  br label %195

.thread:                                          ; preds = %._crit_edge, %160
  %.0136.lcssa222238 = phi ptr [ %.3139, %160 ], [ null, %._crit_edge ]
  %.0116.lcssa226237 = phi i1 [ %89, %160 ], [ false, %._crit_edge ]
  %.0115.lcssa230236 = phi i1 [ %88, %160 ], [ false, %._crit_edge ]
  %165 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %166 = extractvalue { double, double } %165, 0
  %167 = extractvalue { double, double } %165, 1
  %168 = getelementptr inbounds i8, ptr %0, i64 96
  store double %166, ptr %168, align 16
  %.sroa.49.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 104
  store double %167, ptr %.sroa.49.0..sroa_idx, align 8, !tbaa !40
  %169 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %170 = extractvalue { double, double } %169, 0
  %171 = extractvalue { double, double } %169, 1
  %172 = getelementptr inbounds i8, ptr %0, i64 112
  store double %170, ptr %172, align 16
  %.sroa.47.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 120
  store double %171, ptr %.sroa.47.0..sroa_idx, align 8, !tbaa !40
  br label %183

173:                                              ; preds = %._crit_edge207
  %174 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %6)
  %175 = extractvalue { double, double } %174, 0
  %176 = extractvalue { double, double } %174, 1
  %177 = getelementptr inbounds i8, ptr %0, i64 96
  store double %175, ptr %177, align 16
  %.sroa.413.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 104
  store double %176, ptr %.sroa.413.0..sroa_idx, align 8, !tbaa !40
  %178 = uitofp nneg i32 %.4125 to float
  %179 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %7, float noundef %178)
  %180 = extractvalue { double, double } %179, 0
  %181 = extractvalue { double, double } %179, 1
  %182 = getelementptr inbounds i8, ptr %0, i64 112
  store double %180, ptr %182, align 16
  %.sroa.411.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 120
  store double %181, ptr %.sroa.411.0..sroa_idx, align 8, !tbaa !40
  %.not162 = icmp eq ptr %90, null
  br i1 %.not162, label %183, label %195

183:                                              ; preds = %.thread, %173
  %.0115.lcssa229 = phi i1 [ %.0115.lcssa230236, %.thread ], [ %88, %173 ]
  %.0116.lcssa225 = phi i1 [ %.0116.lcssa226237, %.thread ], [ %89, %173 ]
  %.0136.lcssa221 = phi ptr [ %.0136.lcssa222238, %.thread ], [ %.3139, %173 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #10
  call void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %11)
  %184 = getelementptr inbounds i8, ptr %0, i64 72
  %185 = load i32, ptr %11, align 4, !tbaa !46
  store i32 %185, ptr %184, align 8, !tbaa !46
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #10
  store i32 0, ptr %12, align 4
  call void @_ZN3JPH10SubShapeIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %12) #10
  %186 = getelementptr inbounds i8, ptr %0, i64 76
  %187 = load i32, ptr %12, align 4, !tbaa !46
  store i32 %187, ptr %186, align 4, !tbaa !46
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #10
  %188 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %189 = extractvalue { double, double } %188, 0
  %190 = extractvalue { double, double } %188, 1
  %191 = getelementptr inbounds i8, ptr %0, i64 80
  store double %189, ptr %191, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 88
  store double %190, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !40
  %192 = getelementptr inbounds i8, ptr %0, i64 128
  %193 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH8RefConstINS_15PhysicsMaterialEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %192, ptr noundef nonnull align 8 dereferenceable(8) @_ZN3JPH15PhysicsMaterial8sDefaultE)
  %194 = getelementptr inbounds i8, ptr %0, i64 136
  store i64 0, ptr %194, align 8, !tbaa !47
  br i1 %.0115.lcssa229, label %210, label %212

195:                                              ; preds = %173, %.thread173
  %196 = getelementptr inbounds i8, ptr %0, i64 72
  %197 = load i32, ptr %90, align 16, !tbaa !46
  store i32 %197, ptr %196, align 8, !tbaa !46
  %198 = getelementptr inbounds i8, ptr %90, i64 8
  %199 = getelementptr inbounds i8, ptr %0, i64 76
  %200 = load i32, ptr %198, align 8, !tbaa !46
  store i32 %200, ptr %199, align 4, !tbaa !46
  %201 = getelementptr inbounds i8, ptr %90, i64 16
  %202 = getelementptr inbounds i8, ptr %0, i64 80
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %202, ptr noundef nonnull align 16 dereferenceable(16) %201, i64 16, i1 false), !tbaa.struct !45
  %203 = getelementptr inbounds i8, ptr %90, i64 112
  %204 = load ptr, ptr %203, align 16, !tbaa !48
  %205 = getelementptr inbounds i8, ptr %0, i64 128
  %206 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH8RefConstINS_15PhysicsMaterialEEaSEPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %205, ptr noundef %204)
  %207 = getelementptr inbounds i8, ptr %90, i64 104
  %208 = load i64, ptr %207, align 8, !tbaa !49
  %209 = getelementptr inbounds i8, ptr %0, i64 136
  store i64 %208, ptr %209, align 8, !tbaa !47
  br i1 %88, label %210, label %212

210:                                              ; preds = %183, %195
  %211 = getelementptr inbounds i8, ptr %0, i64 68
  store i32 0, ptr %211, align 4, !tbaa !50
  br label %259

212:                                              ; preds = %183, %195
  %.not162171241 = phi i32 [ 3, %183 ], [ 2, %195 ]
  %.0136.lcssa219240 = phi ptr [ %.0136.lcssa221, %183 ], [ %.3139, %195 ]
  %.0116.lcssa223239 = phi i1 [ %.0116.lcssa225, %183 ], [ %89, %195 ]
  br i1 %.0116.lcssa223239, label %213, label %257

213:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #10
  %214 = getelementptr inbounds i8, ptr %0, i64 272
  %215 = getelementptr inbounds i8, ptr %.0136.lcssa219240, i64 32
  %.sroa.03.0.copyload = load double, ptr %215, align 16
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %.0136.lcssa219240, i64 40
  %.sroa.24.0.copyload = load double, ptr %.sroa.24.0..sroa_idx, align 8, !tbaa !40
  %216 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %214, double %.sroa.03.0.copyload, double %.sroa.24.0.copyload)
  %217 = extractvalue { double, double } %216, 0
  store double %217, ptr %13, align 16
  %218 = getelementptr inbounds i8, ptr %13, i64 8
  %219 = extractvalue { double, double } %216, 1
  store double %219, ptr %218, align 8
  %220 = getelementptr inbounds i8, ptr %0, i64 32
  %.sroa.01.0.copyload = load double, ptr %220, align 16
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 40
  %.sroa.22.0.copyload = load double, ptr %.sroa.22.0..sroa_idx, align 8, !tbaa !40
  %221 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %.sroa.01.0.copyload, double %.sroa.22.0.copyload)
  %222 = fcmp ogt float %221, 0x3F1A36E2E0000000
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #10
  br i1 %222, label %223, label %225

223:                                              ; preds = %213
  %224 = getelementptr inbounds i8, ptr %0, i64 68
  store i32 1, ptr %224, align 4, !tbaa !50
  br label %259

225:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #10
  %226 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %22)
  %227 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %22)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #10
  call void @_ZN3JPH16STLTempAllocatorINS_16CharacterVirtual7ContactEEC2ERNS_13TempAllocatorE(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEEC2EPKS2_S7_RKS4_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef %226, ptr noundef %227, ptr noundef nonnull align 8 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #10
  call void @_ZN3JPH16STLTempAllocatorINS_16CharacterVirtual10ConstraintEEC2ERNS_13TempAllocatorE(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #10
  %228 = call noundef i64 @_ZNK3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %14)
  %229 = shl i64 %228, 1
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32) %16, i64 noundef %229)
          to label %230 unwind label %249

230:                                              ; preds = %225
  %231 = getelementptr inbounds i8, ptr %0, i64 352
  %232 = load float, ptr %231, align 16, !tbaa !44
  invoke void @_ZNK3JPH16CharacterVirtual20DetermineConstraintsERNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS2_EEEEfRNS1_INS0_10ConstraintENS3_IS7_EEEE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 8 dereferenceable(32) %14, float noundef %232, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %233 unwind label %249

233:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %20) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #10
  call void @_ZN3JPH16STLTempAllocatorINS_16CharacterVirtual10ContactKeyEEC2ERNS_13TempAllocatorE(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(8) %21)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #10
  %234 = call noundef i64 @_ZNK3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %14)
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32) %20, i64 noundef %234)
          to label %235 unwind label %251

235:                                              ; preds = %233
  %236 = invoke { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %220)
          to label %237 unwind label %251

237:                                              ; preds = %235
  %238 = extractvalue { double, double } %236, 0
  %239 = extractvalue { double, double } %236, 1
  invoke void @_ZN3JPH16CharacterVirtual16SolveConstraintsENS_4Vec3EffRNS_5ArrayINS0_10ConstraintENS_16STLTempAllocatorIS3_EEEERNS2_INS0_10ContactKeyENS4_IS8_EEEERfRS1_RNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372) %0, double %238, double %239, float noundef 1.000000e+00, float noundef 1.000000e+00, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 16 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %240 unwind label %251

240:                                              ; preds = %237
  %241 = load float, ptr %231, align 16, !tbaa !44
  %242 = fmul float %241, 0x3FE3333340000000
  %243 = call noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef %242)
  %244 = load float, ptr %19, align 4, !tbaa !51
  %245 = fcmp olt float %244, 0x3F50624DE0000000
  br i1 %245, label %254, label %246

246:                                              ; preds = %240
  %247 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %18)
  %248 = fcmp olt float %247, %243
  br i1 %248, label %254, label %253

249:                                              ; preds = %230, %225
  %250 = landingpad { ptr, i32 }
          cleanup
  br label %256

251:                                              ; preds = %237, %235, %233
  %252 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #10
  br label %256

253:                                              ; preds = %246
  br label %254

254:                                              ; preds = %240, %246, %253
  %.sink = phi i32 [ 1, %253 ], [ 0, %246 ], [ 0, %240 ]
  %255 = getelementptr inbounds i8, ptr %0, i64 68
  store i32 %.sink, ptr %255, align 4, !tbaa !50
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #10
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #10
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #10
  br label %259

256:                                              ; preds = %251, %249
  %.pn = phi { ptr, i32 } [ %252, %251 ], [ %250, %249 ]
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #10
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #10
  br label %260

257:                                              ; preds = %212
  %258 = getelementptr inbounds i8, ptr %0, i64 68
  store i32 %.not162171241, ptr %258, align 4, !tbaa !50
  br label %259

259:                                              ; preds = %257, %254, %223, %210
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #10
  ret void

260:                                              ; preds = %256, %157
  %.pn165.pn.pn = phi { ptr, i32 } [ %.pn165.pn, %157 ], [ %.pn, %256 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #10
  resume { ptr, i32 } %.pn165.pn.pn
}

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat4427sInverseRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, double, double, double, double) local_unnamed_addr #8 align 2

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #7 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #7 align 2

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

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass