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

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

%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::CharacterContactSettings" = type { i8, i8 }
%"class.JPH::Array.28" = type { %"class.JPH::STLTempAllocator", i64, i64, ptr }
%"class.JPH::STLTempAllocator" = type { ptr }
%"struct.JPH::AssertLastParam" = type { i8 }
%"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::SubShapeID" = type { i32 }
%"class.JPH::RefConst.1" = type { ptr }
%"class.JPH::CharacterID" = type { i32 }
%"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 }>
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::CharacterVirtual::ContactKey" = type { %"class.JPH::BodyID", %"class.JPH::CharacterID", %"class.JPH::SubShapeID" }
%"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] }>

@.str.1 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [36 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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec35sZeroEv() #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(123) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE4backEv(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)) #4 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)) #4 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16CharacterVirtual13MoveToContactENS_4Vec3ERKNS0_7ContactERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterERNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372) %0, double %1, double %2, ptr noundef nonnull align 16 dereferenceable(123) %3, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5 align 2 personality ptr @__gxx_personality_v0 {
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::CharacterContactSettings", align 1
  %20 = alloca %"class.JPH::Array.28", align 8
  %21 = alloca %"class.JPH::STLTempAllocator", align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca %"class.JPH::Vec3", align 16
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca i8, align 1
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca %"struct.JPH::AssertLastParam", align 1
  %34 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  store double %1, ptr %34, align 16
  %35 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  store double %2, ptr %35, align 8
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  store ptr %8, ptr %17, align 8, !tbaa !5
  %36 = load ptr, ptr %11, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 %10, i64 16, i1 false), !tbaa.struct !9
  %37 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %38 = load double, ptr %37, align 16
  %39 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %40 = load double, ptr %39, align 8
  call void @_ZN3JPH16CharacterVirtual11SetPositionENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(372) %36, double %38, double %40)
  call void @llvm.lifetime.start.p0(i64 2, ptr %19) #7
  call void @_ZN3JPH24CharacterContactSettingsC2Ev(ptr noundef nonnull align 1 dereferenceable(2) %19) #7
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN3JPH16CharacterVirtual12ContactAddedERKNS0_7ContactERNS_24CharacterContactSettingsE(ptr noundef nonnull align 16 dereferenceable(372) %36, ptr noundef nonnull align 16 dereferenceable(123) %41, ptr noundef nonnull align 1 dereferenceable(2) %19)
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %42 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN3JPH16STLTempAllocatorINS_16CharacterVirtual7ContactEEC2ERNS_13TempAllocatorE(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %42)
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_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 %21) #7
  %43 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %36, i32 0, i32 13
  %44 = load i32, ptr %43, align 4, !tbaa !11
  %45 = add i32 %44, 1
  %46 = zext i32 %45 to i64
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32) %20, i64 noundef %46)
          to label %47 unwind label %97

47:                                               ; preds = %9
  %48 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %36, i32 0, i32 22
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %48, i64 16, i1 false), !tbaa.struct !9
  %49 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %36, i32 0, i32 24
  %50 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %51 unwind label %97

51:                                               ; preds = %47
  %52 = getelementptr inbounds %"class.JPH::Vec3", ptr %26, i32 0, i32 0
  %53 = getelementptr inbounds %union.anon, ptr %52, i32 0, i32 0
  %54 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 0
  %55 = extractvalue { double, double } %50, 0
  store double %55, ptr %54, align 16
  %56 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 1
  %57 = extractvalue { double, double } %50, 1
  store double %57, ptr %56, align 8
  %58 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %59 = load double, ptr %58, align 16
  %60 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %61 = load double, ptr %60, align 8
  %62 = invoke { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(ptr noundef nonnull align 16 dereferenceable(16) %49, double %59, double %61)
          to label %63 unwind label %97

63:                                               ; preds = %51
  %64 = getelementptr inbounds %"class.JPH::Vec3", ptr %25, i32 0, i32 0
  %65 = getelementptr inbounds %union.anon, ptr %64, i32 0, i32 0
  %66 = getelementptr inbounds { double, double }, ptr %65, i32 0, i32 0
  %67 = extractvalue { double, double } %62, 0
  store double %67, ptr %66, align 16
  %68 = getelementptr inbounds { double, double }, ptr %65, i32 0, i32 1
  %69 = extractvalue { double, double } %62, 1
  store double %69, ptr %68, align 8
  %70 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %36, i32 0, i32 3
  %71 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %70)
          to label %72 unwind label %97

72:                                               ; preds = %63
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  %75 = load ptr, ptr %15, align 8, !tbaa !5
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  %77 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %78 = load double, ptr %77, align 16
  %79 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %80 = load double, ptr %79, align 8
  %81 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %82 = load double, ptr %81, align 16
  %83 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %84 = load double, ptr %83, align 8
  invoke void @_ZNK3JPH16CharacterVirtual21GetContactsAtPositionENS_4Vec3ES1_PKNS_5ShapeERNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS6_EEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 16 dereferenceable(372) %36, double %78, double %80, double %82, double %84, ptr noundef %71, ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull align 8 dereferenceable(12) %76)
          to label %85 unwind label %97

85:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #7
  store i8 0, ptr %27, align 1, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  store ptr %20, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %86 = load ptr, ptr %28, align 8, !tbaa !5
  %87 = invoke noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %86)
          to label %88 unwind label %101

88:                                               ; preds = %85
  store ptr %87, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %89 = load ptr, ptr %28, align 8, !tbaa !5
  %90 = invoke noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %89)
          to label %91 unwind label %105

91:                                               ; preds = %88
  store ptr %90, ptr %30, align 8, !tbaa !5
  br label %92

92:                                               ; preds = %132, %91
  %93 = load ptr, ptr %29, align 8, !tbaa !5
  %94 = load ptr, ptr %30, align 8, !tbaa !5
  %95 = icmp ne ptr %93, %94
  br i1 %95, label %109, label %96

96:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %137

97:                                               ; preds = %72, %63, %51, %47, %9
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %22, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %23, align 4
  br label %171

101:                                              ; preds = %85
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %22, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %23, align 4
  br label %136

105:                                              ; preds = %88
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %22, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %23, align 4
  br label %135

109:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %110 = load ptr, ptr %29, align 8, !tbaa !5
  store ptr %110, ptr %31, align 8, !tbaa !5
  %111 = load ptr, ptr %31, align 8, !tbaa !5
  %112 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactKey", ptr %111, i32 0, i32 0
  %113 = load ptr, ptr %12, align 8, !tbaa !5
  %114 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactKey", ptr %113, i32 0, i32 0
  %115 = invoke noundef zeroext i1 @_ZNK3JPH6BodyIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %112, ptr noundef nonnull align 4 dereferenceable(4) %114)
          to label %116 unwind label %127

116:                                              ; preds = %109
  br i1 %115, label %117, label %131

117:                                              ; preds = %116
  %118 = load ptr, ptr %31, align 8, !tbaa !5
  %119 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactKey", ptr %118, i32 0, i32 2
  %120 = load ptr, ptr %12, align 8, !tbaa !5
  %121 = getelementptr inbounds %"class.JPH::CharacterVirtual::ContactKey", ptr %120, i32 0, i32 2
  %122 = invoke noundef zeroext i1 @_ZNK3JPH10SubShapeIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %119, ptr noundef nonnull align 4 dereferenceable(4) %121)
          to label %123 unwind label %127

123:                                              ; preds = %117
  br i1 %122, label %124, label %131

124:                                              ; preds = %123
  %125 = load ptr, ptr %31, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %125, i32 0, i32 14
  store i8 1, ptr %126, align 8, !tbaa !36
  store i8 1, ptr %27, align 1, !tbaa !35
  br label %131

127:                                              ; preds = %117, %109
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %22, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %135

131:                                              ; preds = %124, %123, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %132

132:                                              ; preds = %131
  %133 = load ptr, ptr %29, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %133, i32 1
  store ptr %134, ptr %29, align 8, !tbaa !5
  br label %92

135:                                              ; preds = %127, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br label %136

136:                                              ; preds = %135, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %170

137:                                              ; preds = %96
  %138 = load i8, ptr %27, align 1, !tbaa !35, !range !40, !noundef !41
  %139 = trunc i8 %138 to i1
  br i1 %139, label %155, label %140

140:                                              ; preds = %137
  %141 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 16 dereferenceable(123) %141)
          to label %142 unwind label %147

142:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  %143 = invoke noundef nonnull align 16 dereferenceable(123) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %144 unwind label %151

144:                                              ; preds = %142
  store ptr %143, ptr %32, align 8, !tbaa !5
  %145 = load ptr, ptr %32, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %145, i32 0, i32 14
  store i8 1, ptr %146, align 8, !tbaa !36
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  br label %155

147:                                              ; preds = %168, %162, %155, %140
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %22, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %23, align 4
  br label %170

151:                                              ; preds = %142
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %22, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  br label %170

155:                                              ; preds = %144, %137
  %156 = load ptr, ptr %17, align 8, !tbaa !5
  invoke void @_ZN3JPH16CharacterVirtual19StoreActiveContactsERKNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS2_EEEERNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372) %36, ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(8) %156)
          to label %157 unwind label %147

157:                                              ; preds = %155
  br label %158

158:                                              ; preds = %157
  %159 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %36, i32 0, i32 7
  %160 = load i32, ptr %159, align 4, !tbaa !42
  %161 = icmp ne i32 %160, 3
  br i1 %161, label %166, label %162

162:                                              ; preds = %158
  %163 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 1478)
          to label %164 unwind label %147

164:                                              ; preds = %162
  br i1 %163, label %165, label %166

165:                                              ; preds = %164
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !43
  br label %166

166:                                              ; preds = %165, %164, %158
  br label %167

167:                                              ; preds = %166
  br label %168

168:                                              ; preds = %167
  invoke void @_ZN3JPH16CharacterVirtual24UpdateInnerBodyTransformEv(ptr noundef nonnull align 16 dereferenceable(372) %36)
          to label %169 unwind label %147

169:                                              ; preds = %168
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #7
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %19) #7
  ret void

170:                                              ; preds = %151, %147, %136
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #7
  br label %171

171:                                              ; preds = %170, %97
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %19) #7
  br label %172

172:                                              ; preds = %171
  %173 = load ptr, ptr %22, align 8
  %174 = load i32, ptr %23, align 4
  %175 = insertvalue { ptr, i32 } poison, ptr %173, 0
  %176 = insertvalue { ptr, i32 } %175, i32 %174, 1
  resume { ptr, i32 } %176
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(123)) #3 align 2

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


; 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::CharacterContactSettings" = type { i8, i8 }
%"class.JPH::Array.28" = type { %"class.JPH::STLTempAllocator", i64, i64, ptr }
%"class.JPH::STLTempAllocator" = type { ptr }

@.str.1 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [36 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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec35sZeroEv() local_unnamed_addr #1 align 2

; 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 ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(123) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 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: mustprogress uwtable
declare dso_local void @_ZNK3JPH16CharacterVirtual21GetContactsAtPositionENS_4Vec3ES1_PKNS_5ShapeERNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS6_EEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 16 dereferenceable(372), double, double, double, double, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH24CharacterContactSettingsC2Ev(ptr noundef nonnull align 1 dereferenceable(2)) unnamed_addr #3 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 #3 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 #3 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16CharacterVirtual13MoveToContactENS_4Vec3ERKNS0_7ContactERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterERNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372) %0, double %1, double %2, ptr noundef nonnull align 16 dereferenceable(123) %3, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %10 = alloca %"class.JPH::CharacterContactSettings", align 1
  %11 = alloca %"class.JPH::Array.28", align 8
  %12 = alloca %"class.JPH::STLTempAllocator", align 8
  tail call void @_ZN3JPH16CharacterVirtual11SetPositionENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(372) %0, double %1, double %2)
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %10) #6
  call void @_ZN3JPH24CharacterContactSettingsC2Ev(ptr noundef nonnull align 1 dereferenceable(2) %10) #6
  call void @_ZN3JPH16CharacterVirtual12ContactAddedERKNS0_7ContactERNS_24CharacterContactSettingsE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(123) %3, ptr noundef nonnull align 1 dereferenceable(2) %10)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  call void @_ZN3JPH16STLTempAllocatorINS_16CharacterVirtual7ContactEEC2ERNS_13TempAllocatorE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  %13 = getelementptr inbounds i8, ptr %0, i64 196
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = add i32 %14, 1
  %16 = zext i32 %15 to i64
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32) %11, i64 noundef %16)
          to label %17 unwind label %34

17:                                               ; preds = %9
  %18 = getelementptr inbounds i8, ptr %0, i64 240
  %.sroa.012.0.copyload = load double, ptr %18, align 16
  %.sroa.213.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 248
  %.sroa.213.0.copyload = load double, ptr %.sroa.213.0..sroa_idx, align 8, !tbaa !32
  %19 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %20 unwind label %34

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %0, i64 272
  %22 = extractvalue { double, double } %19, 0
  %23 = extractvalue { double, double } %19, 1
  %24 = invoke { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(ptr noundef nonnull align 16 dereferenceable(16) %21, double %22, double %23)
          to label %25 unwind label %34

25:                                               ; preds = %20
  %26 = extractvalue { double, double } %24, 0
  %27 = extractvalue { double, double } %24, 1
  %28 = getelementptr inbounds i8, ptr %0, i64 24
  %29 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %28)
  invoke void @_ZNK3JPH16CharacterVirtual21GetContactsAtPositionENS_4Vec3ES1_PKNS_5ShapeERNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS6_EEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 16 dereferenceable(372) %0, double %.sroa.012.0.copyload, double %.sroa.213.0.copyload, double %26, double %27, ptr noundef %29, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(12) %7)
          to label %30 unwind label %34

30:                                               ; preds = %25
  %31 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %11)
  %32 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %11)
  %.not39 = icmp eq ptr %31, %32
  br i1 %.not39, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %30
  %33 = getelementptr inbounds i8, ptr %3, i64 8
  br label %.outer

.outer:                                           ; preds = %.thread, %.lr.ph
  %.03341.ph = phi i1 [ true, %.thread ], [ false, %.lr.ph ]
  %.03540.ph = phi ptr [ %44, %.thread ], [ %31, %.lr.ph ]
  br label %36

._crit_edge:                                      ; preds = %41
  br i1 %.03341.ph, label %._crit_edge.thread, label %.critedge

34:                                               ; preds = %25, %20, %17, %9
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %62

36:                                               ; preds = %.outer, %41
  %.03540 = phi ptr [ %42, %41 ], [ %.03540.ph, %.outer ]
  %37 = call noundef zeroext i1 @_ZNK3JPH6BodyIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %.03540, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br i1 %37, label %38, label %41

38:                                               ; preds = %36
  %39 = getelementptr inbounds i8, ptr %.03540, i64 8
  %40 = call noundef zeroext i1 @_ZNK3JPH10SubShapeIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %39, ptr noundef nonnull align 4 dereferenceable(4) %33)
  br i1 %40, label %.thread, label %41

41:                                               ; preds = %38, %36
  %42 = getelementptr inbounds i8, ptr %.03540, i64 128
  %.not = icmp eq ptr %42, %32
  br i1 %.not, label %._crit_edge, label %36

.thread:                                          ; preds = %38
  %43 = getelementptr inbounds i8, ptr %.03540, i64 120
  store i8 1, ptr %43, align 8, !tbaa !33
  %44 = getelementptr inbounds i8, ptr %.03540, i64 128
  %.not43 = icmp eq ptr %44, %32
  br i1 %.not43, label %._crit_edge.thread, label %.outer

.critedge:                                        ; preds = %30, %._crit_edge
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 16 dereferenceable(123) %3)
          to label %45 unwind label %49

45:                                               ; preds = %.critedge
  %46 = invoke noundef nonnull align 16 dereferenceable(123) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %47 unwind label %51

47:                                               ; preds = %45
  %48 = getelementptr inbounds i8, ptr %46, i64 120
  store i8 1, ptr %48, align 8, !tbaa !33
  br label %._crit_edge.thread

49:                                               ; preds = %60, %56, %._crit_edge.thread, %.critedge
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %62

51:                                               ; preds = %45
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %62

._crit_edge.thread:                               ; preds = %.thread, %47, %._crit_edge
  invoke void @_ZN3JPH16CharacterVirtual19StoreActiveContactsERKNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS2_EEEERNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %53 unwind label %49

53:                                               ; preds = %._crit_edge.thread
  %54 = getelementptr inbounds i8, ptr %0, i64 68
  %55 = load i32, ptr %54, align 4, !tbaa !37
  %.not36 = icmp eq i32 %55, 3
  br i1 %.not36, label %56, label %60

56:                                               ; preds = %53
  %57 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 1478)
          to label %58 unwind label %49

58:                                               ; preds = %56
  br i1 %57, label %59, label %60

59:                                               ; preds = %58
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !38
  br label %60

60:                                               ; preds = %59, %58, %53
  invoke void @_ZN3JPH16CharacterVirtual24UpdateInnerBodyTransformEv(ptr noundef nonnull align 16 dereferenceable(372) %0)
          to label %61 unwind label %49

61:                                               ; preds = %60
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %10) #6
  ret void

62:                                               ; preds = %49, %51, %34
  %.pn.pn = phi { ptr, i32 } [ %35, %34 ], [ %50, %49 ], [ %52, %51 ]
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %10) #6
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(123)) local_unnamed_addr #2 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 = { 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 = { 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 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 = { 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 196}
!6 = !{!"_ZTSN3JPH16CharacterVirtualE", !7, i64 0, !25, i64 144, !14, i64 152, !14, i64 160, !26, i64 168, !19, i64 172, !11, i64 176, !11, i64 180, !19, i64 184, !19, i64 188, !19, i64 192, !11, i64 196, !19, i64 200, !19, i64 204, !27, i64 208, !19, i64 212, !19, i64 216, !16, i64 224, !16, i64 240, !28, i64 256, !16, i64 272, !29, i64 288, !11, i64 312, !30, i64 320, !19, i64 352, !27, i64 356, !24, i64 360, !21, i64 368}
!7 = !{!"_ZTSN3JPH13CharacterBaseE", !8, i64 8, !14, i64 16, !15, i64 24, !16, i64 32, !17, i64 48, !19, i64 64, !20, i64 68, !21, i64 72, !22, i64 76, !16, i64 80, !16, i64 96, !16, i64 112, !23, i64 128, !24, i64 136}
!8 = !{!"_ZTSN3JPH9RefTargetINS_13CharacterBaseEEE", !9, i64 0}
!9 = !{!"_ZTSSt6atomicIjE", !10, i64 0}
!10 = !{!"_ZTSSt13__atomic_baseIjE", !11, i64 0}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"any pointer", !12, i64 0}
!15 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !14, i64 0}
!16 = !{!"_ZTSN3JPH4Vec3E", !12, i64 0}
!17 = !{!"_ZTSN3JPH5PlaneE", !18, i64 0}
!18 = !{!"_ZTSN3JPH4Vec4E", !12, i64 0}
!19 = !{!"float", !12, i64 0}
!20 = !{!"_ZTSN3JPH13CharacterBase12EGroundStateE", !12, i64 0}
!21 = !{!"_ZTSN3JPH6BodyIDE", !11, i64 0}
!22 = !{!"_ZTSN3JPH10SubShapeIDE", !11, i64 0}
!23 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !14, i64 0}
!24 = !{!"long", !12, i64 0}
!25 = !{!"_ZTSN3JPH11CharacterIDE", !11, i64 0}
!26 = !{!"_ZTSN3JPH13EBackFaceModeE", !12, i64 0}
!27 = !{!"bool", !12, i64 0}
!28 = !{!"_ZTSN3JPH4QuatE", !18, i64 0}
!29 = !{!"_ZTSN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEEE", !24, i64 0, !24, i64 8, !14, i64 16}
!30 = !{!"_ZTSN3JPH12UnorderedMapINS_16CharacterVirtual10ContactKeyENS1_20ListenerContactValueENS_4HashIS2_EESt8equal_toIS2_EEE", !31, i64 0}
!31 = !{!"_ZTSN3JPH9HashTableINS_16CharacterVirtual10ContactKeyESt4pairIS2_NS1_20ListenerContactValueEENS_18UnorderedMapDetailIS2_S4_EENS_4HashIS2_EESt8equal_toIS2_EEE", !14, i64 0, !14, i64 8, !11, i64 16, !11, i64 20, !11, i64 24}
!32 = !{!12, !12, i64 0}
!33 = !{!34, !27, i64 120}
!34 = !{!"_ZTSN3JPH16CharacterVirtual7ContactE", !35, i64 0, !16, i64 16, !16, i64 32, !16, i64 48, !16, i64 64, !19, i64 80, !19, i64 84, !36, i64 88, !27, i64 89, !14, i64 96, !24, i64 104, !14, i64 112, !27, i64 120, !27, i64 121, !27, i64 122}
!35 = !{!"_ZTSN3JPH16CharacterVirtual10ContactKeyE", !21, i64 0, !25, i64 4, !22, i64 8}
!36 = !{!"_ZTSN3JPH11EMotionTypeE", !12, i64 0}
!37 = !{!7, !20, i64 68}
!38 = !{i64 2159830937}


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