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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"struct.JPH::CharacterVirtual::Contact" = type <{ %"class.JPH::CharacterVirtual::ContactKey", [4 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, i8, i8, [6 x i8], ptr, i64, ptr, i8, i8, i8, [5 x i8] }>
%"class.JPH::CharacterVirtual::ContactKey" = type { %"class.JPH::BodyID", %"class.JPH::CharacterID", %"class.JPH::SubShapeID" }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::CharacterID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::BodyLockRead" = type { %"class.JPH::BodyLockBase" }
%"class.JPH::BodyLockBase" = type { ptr, ptr, ptr }
%"class.JPH::ShapeCastResult" = type <{ %"class.JPH::CollideShapeResult", float, i8, [11 x i8] }>
%"class.JPH::CollideShapeResult" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, %"class.JPH::SubShapeID", %"class.JPH::SubShapeID", %"class.JPH::BodyID", %"class.JPH::StaticArray", %"class.JPH::StaticArray" }
%"class.JPH::StaticArray" = type { i32, [12 x i8], [32 x %"struct.JPH::StaticArray<JPH::Vec3, 32>::Storage"] }
%"struct.JPH::StaticArray<JPH::Vec3, 32>::Storage" = type { [16 x i8] }
%"class.JPH::CharacterVirtual::ContactCastCollector" = type <{ %"class.JPH::CollisionCollector.6", [8 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", ptr, ptr, ptr, ptr, ptr, [8 x i8] }>
%"class.JPH::CollisionCollector.6" = type { ptr, float, 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::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::RefConst.1" = type { ptr }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Array.2" = type { i64, i64, ptr }
%"class.JPH::UnorderedMap" = type { %"class.JPH::HashTable.base", [4 x i8] }
%"class.JPH::HashTable.base" = type <{ ptr, ptr, i32, i32, i32 }>

@.str.1 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH16CharacterVirtual31sFillCharacterContactPropertiesERNS0_7ContactEPKS0_NS_4Vec3ERKNS_18CollideShapeResultE(ptr noundef nonnull align 16 dereferenceable(123), ptr noundef, double, double, ptr noundef nonnull align 16 dereferenceable(1120)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172)) #3 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 #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16CharacterVirtual20ContactCastCollector6AddHitERKNS_15ShapeCastResultE(ptr noundef nonnull align 16 dereferenceable(120) %0, ptr noundef nonnull align 16 dereferenceable(1125) %1) unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.JPH::CharacterVirtual::Contact", align 16
  %12 = alloca %"struct.JPH::AssertLastParam", align 1
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::BodyLockRead", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %21 = load ptr, ptr %3, align 8
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %"class.JPH::ShapeCastResult", ptr %22, i32 0, i32 1
  %24 = load float, ptr %23, align 16, !tbaa !9
  %25 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactCastCollector", ptr %21, i32 0, i32 9
  %26 = load ptr, ptr %25, align 16, !tbaa !19
  %27 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %26, i32 0, i32 7
  %28 = load float, ptr %27, align 4, !tbaa !22
  %29 = fcmp olt float %24, %28
  br i1 %29, label %30, label %182

30:                                               ; preds = %2
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %"class.JPH::ShapeCastResult", ptr %31, i32 0, i32 1
  %33 = load float, ptr %32, align 16, !tbaa !9
  %34 = fcmp ogt float %33, 0.000000e+00
  br i1 %34, label %35, label %182

35:                                               ; preds = %30
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.JPH::CollideShapeResult", ptr %36, i32 0, i32 2
  %38 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactCastCollector", ptr %21, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %5, ptr align 16 %38, i64 16, i1 false), !tbaa.struct !28
  %39 = getelementptr inbounds { double, double }, ptr %5, i32 0, i32 0
  %40 = load double, ptr %39, align 16
  %41 = getelementptr inbounds { double, double }, ptr %5, i32 0, i32 1
  %42 = load double, ptr %41, align 8
  %43 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %37, double %40, double %42)
  %44 = fcmp ogt float %43, 0.000000e+00
  br i1 %44, label %45, label %182

45:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %46 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactCastCollector", ptr %21, i32 0, i32 8
  %47 = load ptr, ptr %46, align 8, !tbaa !30
  store ptr %47, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = call noundef ptr @_ZNK3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %48)
  store ptr %49, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = call noundef ptr @_ZNK3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %50)
  store ptr %51, ptr %8, align 8, !tbaa !5
  br label %52

52:                                               ; preds = %75, %45
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = icmp ne ptr %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  store i32 2, ptr %9, align 4
  br label %78

57:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %58, ptr %10, align 8, !tbaa !5
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactKey", ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %"class.JPH::CollideShapeResult", ptr %61, i32 0, i32 6
  %63 = call noundef zeroext i1 @_ZNK3JPH6BodyIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %60, ptr noundef nonnull align 4 dereferenceable(4) %62)
  br i1 %63, label %64, label %71

64:                                               ; preds = %57
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactKey", ptr %65, i32 0, i32 2
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.JPH::CollideShapeResult", ptr %67, i32 0, i32 5
  %69 = call noundef zeroext i1 @_ZNK3JPH10SubShapeIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %66, ptr noundef nonnull align 4 dereferenceable(4) %68)
  br i1 %69, label %70, label %71

70:                                               ; preds = %64
  store i32 1, ptr %9, align 4
  br label %72

71:                                               ; preds = %64, %57
  store i32 0, ptr %9, align 4
  br label %72

72:                                               ; preds = %71, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %73 = load i32, ptr %9, align 4
  switch i32 %73, label %78 [
    i32 0, label %74
  ]

74:                                               ; preds = %72
  br label %75

75:                                               ; preds = %74
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactKey", ptr %76, i32 1
  store ptr %77, ptr %7, align 8, !tbaa !5
  br label %52

78:                                               ; preds = %72, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %79 = load i32, ptr %9, align 4
  switch i32 %79, label %188 [
    i32 2, label %80
    i32 1, label %182
  ]

80:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 128, ptr %11) #7
  call void @_ZN3JPH16CharacterVirtual7ContactC2Ev(ptr noundef nonnull align 16 dereferenceable(123) %11)
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %"class.JPH::CollideShapeResult", ptr %81, i32 0, i32 6
  %83 = call noundef zeroext i1 @_ZNK3JPH6BodyID9IsInvalidEv(ptr noundef nonnull align 4 dereferenceable(4) %82)
  br i1 %83, label %84, label %103

84:                                               ; preds = %80
  br label %85

85:                                               ; preds = %84
  %86 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactCastCollector", ptr %21, i32 0, i32 7
  %87 = load ptr, ptr %86, align 16, !tbaa !31
  %88 = icmp ne ptr %87, null
  br i1 %88, label %92, label %89

89:                                               ; preds = %85
  %90 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 344)
  br i1 %90, label %91, label %92

91:                                               ; preds = %89
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !32
  br label %92

92:                                               ; preds = %91, %89, %85
  br label %93

93:                                               ; preds = %92
  br label %94

94:                                               ; preds = %93
  %95 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactCastCollector", ptr %21, i32 0, i32 7
  %96 = load ptr, ptr %95, align 16, !tbaa !31
  %97 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactCastCollector", ptr %21, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 %97, i64 16, i1 false), !tbaa.struct !28
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %100 = load double, ptr %99, align 16
  %101 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %102 = load double, ptr %101, align 8
  call void @_ZN3JPH16CharacterVirtual31sFillCharacterContactPropertiesERNS0_7ContactEPKS0_NS_4Vec3ERKNS_18CollideShapeResultE(ptr noundef nonnull align 16 dereferenceable(123) %11, ptr noundef %96, double %100, double %102, ptr noundef nonnull align 16 dereferenceable(1120) %98)
  br label %148

103:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  %104 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactCastCollector", ptr %21, i32 0, i32 5
  %105 = load ptr, ptr %104, align 16, !tbaa !33
  %106 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %105)
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %"class.JPH::CollideShapeResult", ptr %107, i32 0, i32 6
  call void @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(16) %106, ptr noundef nonnull align 4 dereferenceable(4) %108)
  %109 = invoke noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE26SucceededAndIsInBroadPhaseEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %110 unwind label %112

110:                                              ; preds = %103
  br i1 %109, label %116, label %111

111:                                              ; preds = %110
  store i32 1, ptr %9, align 4
  br label %144

112:                                              ; preds = %103
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %15, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %16, align 4
  br label %147

116:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %117 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %118 unwind label %123

118:                                              ; preds = %116
  store ptr %117, ptr %17, align 8, !tbaa !5
  %119 = load ptr, ptr %17, align 8, !tbaa !5
  %120 = invoke noundef zeroext i1 @_ZNK3JPH4Body8IsSensorEv(ptr noundef nonnull align 16 dereferenceable(122) %119)
          to label %121 unwind label %123

121:                                              ; preds = %118
  br i1 %120, label %122, label %127

122:                                              ; preds = %121
  store i32 1, ptr %9, align 4
  br label %143

123:                                              ; preds = %127, %118, %116
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %15, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %147

127:                                              ; preds = %121
  %128 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactCastCollector", ptr %21, i32 0, i32 6
  %129 = load ptr, ptr %128, align 8, !tbaa !34
  %130 = load ptr, ptr %17, align 8, !tbaa !5
  %131 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactCastCollector", ptr %21, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 %131, i64 16, i1 false), !tbaa.struct !28
  %132 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactCastCollector", ptr %21, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 %132, i64 16, i1 false), !tbaa.struct !28
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %135 = load double, ptr %134, align 16
  %136 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %137 = load double, ptr %136, align 8
  %138 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %139 = load double, ptr %138, align 16
  %140 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %141 = load double, ptr %140, align 8
  invoke void @_ZN3JPH16CharacterVirtual22sFillContactPropertiesINS0_20ContactCastCollectorEEEvPKS0_RNS0_7ContactERKNS_4BodyENS_4Vec3ESA_RKT_RKNS_18CollideShapeResultE(ptr noundef %129, ptr noundef nonnull align 16 dereferenceable(123) %11, ptr noundef nonnull align 16 dereferenceable(122) %130, double %135, double %137, double %139, double %141, ptr noundef nonnull align 16 dereferenceable(120) %21, ptr noundef nonnull align 16 dereferenceable(1120) %133)
          to label %142 unwind label %123

142:                                              ; preds = %127
  store i32 0, ptr %9, align 4
  br label %143

143:                                              ; preds = %142, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %144

144:                                              ; preds = %143, %111
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  %145 = load i32, ptr %9, align 4
  switch i32 %145, label %179 [
    i32 0, label %146
  ]

146:                                              ; preds = %144
  br label %148

147:                                              ; preds = %123, %112
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr %11) #7
  br label %183

148:                                              ; preds = %146, %94
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %"class.JPH::ShapeCastResult", ptr %149, i32 0, i32 1
  %151 = load float, ptr %150, align 16, !tbaa !9
  %152 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %11, i32 0, i32 7
  store float %151, ptr %152, align 4, !tbaa !22
  %153 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %11, i32 0, i32 6
  %154 = load float, ptr %153, align 16, !tbaa !35
  %155 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %11, i32 0, i32 4
  %156 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactCastCollector", ptr %21, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 %156, i64 16, i1 false), !tbaa.struct !28
  %157 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %158 = load double, ptr %157, align 16
  %159 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %160 = load double, ptr %159, align 8
  %161 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %155, double %158, double %160)
  %162 = fadd float %154, %161
  %163 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactCastCollector", ptr %21, i32 0, i32 6
  %164 = load ptr, ptr %163, align 8, !tbaa !34
  %165 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %164, i32 0, i32 11
  %166 = load float, ptr %165, align 4, !tbaa !36
  %167 = fneg float %166
  %168 = fcmp olt float %162, %167
  br i1 %168, label %169, label %178

169:                                              ; preds = %148
  %170 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactCastCollector", ptr %21, i32 0, i32 6
  %171 = load ptr, ptr %170, align 8, !tbaa !34
  %172 = call noundef zeroext i1 @_ZNK3JPH16CharacterVirtual15ValidateContactERKNS0_7ContactE(ptr noundef nonnull align 16 dereferenceable(372) %171, ptr noundef nonnull align 16 dereferenceable(123) %11)
  br i1 %172, label %173, label %178

173:                                              ; preds = %169
  %174 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactCastCollector", ptr %21, i32 0, i32 9
  %175 = load ptr, ptr %174, align 16, !tbaa !19
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %175, ptr align 16 %11, i64 123, i1 false)
  %176 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %11, i32 0, i32 7
  %177 = load float, ptr %176, align 4, !tbaa !22
  call void @_ZN3JPH18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEE22UpdateEarlyOutFractionEf(ptr noundef nonnull align 8 dereferenceable(24) %21, float noundef %177)
  br label %178

178:                                              ; preds = %173, %169, %148
  store i32 0, ptr %9, align 4
  br label %179

179:                                              ; preds = %178, %144
  call void @llvm.lifetime.end.p0(i64 128, ptr %11) #7
  %180 = load i32, ptr %9, align 4
  switch i32 %180, label %188 [
    i32 0, label %181
    i32 1, label %182
  ]

181:                                              ; preds = %179
  br label %182

182:                                              ; preds = %181, %179, %78, %35, %30, %2
  ret void

183:                                              ; preds = %147
  %184 = load ptr, ptr %15, align 8
  %185 = load i32, ptr %16, align 4
  %186 = insertvalue { ptr, i32 } poison, ptr %184, 0
  %187 = insertvalue { ptr, i32 } %186, i32 %185, 1
  resume { ptr, i32 } %187

188:                                              ; preds = %179, %78
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH6BodyIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH10SubShapeIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH4Body8IsSensorEv(ptr noundef nonnull align 16 dereferenceable(122)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH16CharacterVirtual22sFillContactPropertiesINS0_20ContactCastCollectorEEEvPKS0_RNS0_7ContactERKNS_4BodyENS_4Vec3ESA_RKT_RKNS_18CollideShapeResultE(ptr noundef, ptr noundef nonnull align 16 dereferenceable(123), ptr noundef nonnull align 16 dereferenceable(122), double, double, double, double, ptr noundef nonnull align 16 dereferenceable(120), ptr noundef nonnull align 16 dereferenceable(1120)) #2 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)) #6 align 2

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

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

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

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


; 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"

%"struct.JPH::CharacterVirtual::Contact" = type <{ %"class.JPH::CharacterVirtual::ContactKey", [4 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, i8, i8, [6 x i8], ptr, i64, ptr, i8, i8, i8, [5 x i8] }>
%"class.JPH::CharacterVirtual::ContactKey" = type { %"class.JPH::BodyID", %"class.JPH::CharacterID", %"class.JPH::SubShapeID" }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::CharacterID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::BodyLockRead" = type { %"class.JPH::BodyLockBase" }
%"class.JPH::BodyLockBase" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH6BodyID9IsInvalidEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 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 #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH16CharacterVirtual31sFillCharacterContactPropertiesERNS0_7ContactEPKS0_NS_4Vec3ERKNS_18CollideShapeResultE(ptr noundef nonnull align 16 dereferenceable(123), ptr noundef, double, double, ptr noundef nonnull align 16 dereferenceable(1120)) local_unnamed_addr #2 align 2

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

; Function Attrs: 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 #2 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 #2 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 #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16CharacterVirtual20ContactCastCollector6AddHitERKNS_15ShapeCastResultE(ptr noundef nonnull align 16 dereferenceable(120) %0, ptr noundef nonnull align 16 dereferenceable(1125) %1) unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.JPH::CharacterVirtual::Contact", align 16
  %4 = alloca %"class.JPH::BodyLockRead", align 8
  %5 = getelementptr inbounds i8, ptr %1, i64 1120
  %6 = load float, ptr %5, align 16, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 112
  %8 = load ptr, ptr %7, align 16, !tbaa !17
  %9 = getelementptr inbounds i8, ptr %8, i64 84
  %10 = load float, ptr %9, align 4, !tbaa !21
  %11 = fcmp olt float %6, %10
  %12 = fcmp ogt float %6, 0.000000e+00
  %or.cond = and i1 %12, %11
  br i1 %or.cond, label %13, label %.loopexit

13:                                               ; preds = %2
  %14 = getelementptr inbounds i8, ptr %1, i64 32
  %15 = getelementptr inbounds i8, ptr %0, i64 48
  %.sroa.021.0.copyload = load double, ptr %15, align 16
  %.sroa.222.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 56
  %.sroa.222.0.copyload = load double, ptr %.sroa.222.0..sroa_idx, align 8, !tbaa !27
  %16 = tail call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %14, double %.sroa.021.0.copyload, double %.sroa.222.0.copyload)
  %17 = fcmp ogt float %16, 0.000000e+00
  br i1 %17, label %18, label %.loopexit

18:                                               ; preds = %13
  %19 = getelementptr inbounds i8, ptr %0, i64 104
  %20 = load ptr, ptr %19, align 8, !tbaa !28
  %21 = tail call noundef ptr @_ZNK3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %20)
  %22 = tail call noundef ptr @_ZNK3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %20)
  %.not46 = icmp eq ptr %21, %22
  br i1 %.not46, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %18
  %23 = getelementptr inbounds i8, ptr %1, i64 60
  %24 = getelementptr inbounds i8, ptr %1, i64 56
  br label %25

25:                                               ; preds = %.lr.ph, %.critedge
  %.047 = phi ptr [ %21, %.lr.ph ], [ %30, %.critedge ]
  %26 = tail call noundef zeroext i1 @_ZNK3JPH6BodyIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %.047, ptr noundef nonnull align 4 dereferenceable(4) %23)
  br i1 %26, label %27, label %.critedge

27:                                               ; preds = %25
  %28 = getelementptr inbounds i8, ptr %.047, i64 8
  %29 = tail call noundef zeroext i1 @_ZNK3JPH10SubShapeIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %28, ptr noundef nonnull align 4 dereferenceable(4) %24)
  br i1 %29, label %.loopexit, label %.critedge

.critedge:                                        ; preds = %27, %25
  %30 = getelementptr inbounds i8, ptr %.047, i64 12
  %.not = icmp eq ptr %30, %22
  br i1 %.not, label %._crit_edge, label %25

._crit_edge:                                      ; preds = %.critedge, %18
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %3) #7
  call void @_ZN3JPH16CharacterVirtual7ContactC2Ev(ptr noundef nonnull align 16 dereferenceable(123) %3)
  %31 = getelementptr inbounds i8, ptr %1, i64 60
  %32 = call noundef zeroext i1 @_ZNK3JPH6BodyID9IsInvalidEv(ptr noundef nonnull align 4 dereferenceable(4) %31)
  br i1 %32, label %33, label %42

33:                                               ; preds = %._crit_edge
  %34 = getelementptr inbounds i8, ptr %0, i64 96
  %35 = load ptr, ptr %34, align 16, !tbaa !29
  %.not39 = icmp eq ptr %35, null
  br i1 %.not39, label %36, label %39

36:                                               ; preds = %33
  %37 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 344)
  br i1 %37, label %38, label %39

38:                                               ; preds = %36
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !30
  br label %39

39:                                               ; preds = %38, %36, %33
  %40 = load ptr, ptr %34, align 16, !tbaa !29
  %41 = getelementptr inbounds i8, ptr %0, i64 32
  %.sroa.08.0.copyload = load double, ptr %41, align 16
  %.sroa.29.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 40
  %.sroa.29.0.copyload = load double, ptr %.sroa.29.0..sroa_idx, align 8, !tbaa !27
  call void @_ZN3JPH16CharacterVirtual31sFillCharacterContactPropertiesERNS0_7ContactEPKS0_NS_4Vec3ERKNS_18CollideShapeResultE(ptr noundef nonnull align 16 dereferenceable(123) %3, ptr noundef %40, double %.sroa.08.0.copyload, double %.sroa.29.0.copyload, ptr noundef nonnull align 16 dereferenceable(1120) %1)
  br label %63

42:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  %43 = getelementptr inbounds i8, ptr %0, i64 80
  %44 = load ptr, ptr %43, align 16, !tbaa !31
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %44)
  call void @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %46 = invoke noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE26SucceededAndIsInBroadPhaseEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %47 unwind label %48

47:                                               ; preds = %42
  br i1 %46, label %50, label %.critedge41

48:                                               ; preds = %42
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %62

50:                                               ; preds = %47
  %51 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %52 unwind label %54

52:                                               ; preds = %50
  %53 = call noundef zeroext i1 @_ZNK3JPH4Body8IsSensorEv(ptr noundef nonnull align 16 dereferenceable(122) %51)
  br i1 %53, label %61, label %56

54:                                               ; preds = %56, %50
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %62

56:                                               ; preds = %52
  %57 = getelementptr inbounds i8, ptr %0, i64 88
  %58 = load ptr, ptr %57, align 8, !tbaa !32
  %59 = getelementptr inbounds i8, ptr %0, i64 64
  %.sroa.04.0.copyload = load double, ptr %59, align 16
  %.sroa.25.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 72
  %.sroa.25.0.copyload = load double, ptr %.sroa.25.0..sroa_idx, align 8, !tbaa !27
  %60 = getelementptr inbounds i8, ptr %0, i64 32
  %.sroa.02.0.copyload = load double, ptr %60, align 16
  %.sroa.23.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 40
  %.sroa.23.0.copyload = load double, ptr %.sroa.23.0..sroa_idx, align 8, !tbaa !27
  invoke void @_ZN3JPH16CharacterVirtual22sFillContactPropertiesINS0_20ContactCastCollectorEEEvPKS0_RNS0_7ContactERKNS_4BodyENS_4Vec3ESA_RKT_RKNS_18CollideShapeResultE(ptr noundef %58, ptr noundef nonnull align 16 dereferenceable(123) %3, ptr noundef nonnull align 16 dereferenceable(122) %51, double %.sroa.04.0.copyload, double %.sroa.25.0.copyload, double %.sroa.02.0.copyload, double %.sroa.23.0.copyload, ptr noundef nonnull align 16 dereferenceable(120) %0, ptr noundef nonnull align 16 dereferenceable(1120) %1)
          to label %.thread45 unwind label %54

.thread45:                                        ; preds = %56
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %63

61:                                               ; preds = %52
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %82

62:                                               ; preds = %54, %48
  %.pn = phi { ptr, i32 } [ %55, %54 ], [ %49, %48 ]
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn

63:                                               ; preds = %.thread45, %39
  %64 = load float, ptr %5, align 16, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %3, i64 84
  store float %64, ptr %65, align 4, !tbaa !21
  %66 = getelementptr inbounds i8, ptr %3, i64 80
  %67 = load float, ptr %66, align 16, !tbaa !33
  %68 = getelementptr inbounds i8, ptr %3, i64 48
  %.sroa.0.0.copyload = load double, ptr %15, align 16
  %.sroa.2.0.copyload = load double, ptr %.sroa.222.0..sroa_idx, align 8, !tbaa !27
  %69 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %68, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %70 = fadd float %67, %69
  %71 = getelementptr inbounds i8, ptr %0, i64 88
  %72 = load ptr, ptr %71, align 8, !tbaa !32
  %73 = getelementptr inbounds i8, ptr %72, i64 188
  %74 = load float, ptr %73, align 4, !tbaa !34
  %75 = fneg float %74
  %76 = fcmp olt float %70, %75
  br i1 %76, label %77, label %82

77:                                               ; preds = %63
  %78 = call noundef zeroext i1 @_ZNK3JPH16CharacterVirtual15ValidateContactERKNS0_7ContactE(ptr noundef nonnull align 16 dereferenceable(372) %72, ptr noundef nonnull align 16 dereferenceable(123) %3)
  br i1 %78, label %79, label %82

79:                                               ; preds = %77
  %80 = load ptr, ptr %7, align 16, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(123) %80, ptr noundef nonnull align 16 dereferenceable(123) %3, i64 123, i1 false)
  %81 = load float, ptr %65, align 4, !tbaa !21
  call void @_ZN3JPH18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEE22UpdateEarlyOutFractionEf(ptr noundef nonnull align 8 dereferenceable(24) %0, float noundef %81)
  br label %82

.critedge41:                                      ; preds = %47
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %82

82:                                               ; preds = %61, %63, %77, %79, %.critedge41
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %3) #7
  br label %.loopexit

.loopexit:                                        ; preds = %27, %82, %13, %2
  ret void
}

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH16CharacterVirtual22sFillContactPropertiesINS0_20ContactCastCollectorEEEvPKS0_RNS0_7ContactERKNS_4BodyENS_4Vec3ESA_RKT_RKNS_18CollideShapeResultE(ptr noundef, ptr noundef nonnull align 16 dereferenceable(123), ptr noundef nonnull align 16 dereferenceable(122), double, double, double, double, ptr noundef nonnull align 16 dereferenceable(120), ptr noundef nonnull align 16 dereferenceable(1120)) local_unnamed_addr #2 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 #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEE22UpdateEarlyOutFractionEf(ptr noundef nonnull align 8 dereferenceable(24), float noundef) local_unnamed_addr #2 align 2

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

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

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


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