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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16CharacterVirtual23GetFirstContactForSweepENS_4Vec3ES1_RNS0_7ContactERKNS_5ArrayINS0_10ContactKeyENS_16STLTempAllocatorIS5_EEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 16 dereferenceable(372), double, double, double, double, ptr noundef nonnull align 16 dereferenceable(123), 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)) #6 align 2

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #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
define dso_local void @_ZN3JPH16CharacterVirtual9MoveShapeERNS_4Vec3ES1_fPNS_5ArrayINS0_7ContactENS_12STLAllocatorIS4_EEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterERNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(16) %1, double %2, double %3, float noundef %4, ptr noundef %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6 align 2 personality ptr @__gxx_personality_v0 {
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca float, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %"class.JPH::Vec3", align 16
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = alloca float, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %"class.JPH::Array.28", align 8
  %28 = alloca %"class.JPH::STLTempAllocator", align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca %"class.JPH::Vec3", align 16
  %32 = alloca %"class.JPH::Vec3", align 16
  %33 = alloca %"class.JPH::Array.29", align 8
  %34 = alloca %"class.JPH::STLTempAllocator.30", align 8
  %35 = alloca %"class.JPH::Array.34", align 8
  %36 = alloca %"class.JPH::STLTempAllocator.35", align 8
  %37 = alloca %"class.JPH::Vec3", align 16
  %38 = alloca float, align 4
  %39 = alloca %"class.JPH::Vec3", align 16
  %40 = alloca %"struct.JPH::CharacterVirtual::Contact", align 16
  %41 = alloca %"class.JPH::Vec3", align 16
  %42 = alloca %"class.JPH::Vec3", align 16
  %43 = alloca %"class.JPH::Vec3", align 16
  %44 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  store double %2, ptr %44, align 16
  %45 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  store double %3, ptr %45, align 8
  store ptr %0, ptr %13, align 8, !tbaa !5
  store ptr %1, ptr %14, align 8, !tbaa !5
  store float %4, ptr %15, align 4, !tbaa !9
  store ptr %5, ptr %16, align 8, !tbaa !5
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  store ptr %9, ptr %20, align 8, !tbaa !5
  store ptr %10, ptr %21, align 8, !tbaa !5
  %46 = load ptr, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #9
  %47 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %48 = getelementptr inbounds %"class.JPH::Vec3", ptr %23, i32 0, i32 0
  %49 = getelementptr inbounds %union.anon, ptr %48, i32 0, i32 0
  %50 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 0
  %51 = extractvalue { double, double } %47, 0
  store double %51, ptr %50, align 16
  %52 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 1
  %53 = extractvalue { double, double } %47, 1
  store double %53, ptr %52, align 8
  %54 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %55 = load double, ptr %54, align 16
  %56 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %57 = load double, ptr %56, align 8
  %58 = call { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %55, double %57)
  %59 = getelementptr inbounds %"class.JPH::Vec3", ptr %22, i32 0, i32 0
  %60 = getelementptr inbounds %union.anon, ptr %59, i32 0, i32 0
  %61 = getelementptr inbounds { double, double }, ptr %60, i32 0, i32 0
  %62 = extractvalue { double, double } %58, 0
  store double %62, ptr %61, align 16
  %63 = getelementptr inbounds { double, double }, ptr %60, i32 0, i32 1
  %64 = extractvalue { double, double } %58, 1
  store double %64, ptr %63, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  %65 = load float, ptr %15, align 4, !tbaa !9
  store float %65, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %66

66:                                               ; preds = %208, %11
  %67 = load i32, ptr %25, align 4, !tbaa !11
  %68 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %46, i32 0, i32 8
  %69 = load i32, ptr %68, align 16, !tbaa !13
  %70 = icmp ult i32 %67, %69
  br i1 %70, label %71, label %76

71:                                               ; preds = %66
  %72 = load float, ptr %24, align 4, !tbaa !9
  %73 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %46, i32 0, i32 10
  %74 = load float, ptr %73, align 8, !tbaa !35
  %75 = fcmp oge float %72, %74
  br label %76

76:                                               ; preds = %71, %66
  %77 = phi i1 [ false, %66 ], [ %75, %71 ]
  br i1 %77, label %79, label %78

78:                                               ; preds = %76
  store i32 2, ptr %26, align 4
  br label %217

79:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %80 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN3JPH16STLTempAllocatorINS_16CharacterVirtual7ContactEEC2ERNS_13TempAllocatorE(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %80)
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 8 dereferenceable(8) %28)
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  %81 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %46, i32 0, i32 13
  %82 = load i32, ptr %81, align 4, !tbaa !36
  %83 = zext i32 %82 to i64
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32) %27, i64 noundef %83)
          to label %84 unwind label %135

84:                                               ; preds = %79
  %85 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %31, ptr align 16 %85, i64 16, i1 false), !tbaa.struct !37
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %32, ptr align 16 %22, i64 16, i1 false), !tbaa.struct !37
  %86 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %46, i32 0, i32 3
  %87 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %86)
          to label %88 unwind label %135

88:                                               ; preds = %84
  %89 = load ptr, ptr %17, align 8, !tbaa !5
  %90 = load ptr, ptr %18, align 8, !tbaa !5
  %91 = load ptr, ptr %19, align 8, !tbaa !5
  %92 = load ptr, ptr %20, align 8, !tbaa !5
  %93 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %94 = load double, ptr %93, align 16
  %95 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %96 = load double, ptr %95, align 8
  %97 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %98 = load double, ptr %97, align 16
  %99 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %100 = load double, ptr %99, align 8
  invoke void @_ZNK3JPH16CharacterVirtual21GetContactsAtPositionENS_4Vec3ES1_PKNS_5ShapeERNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS6_EEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 16 dereferenceable(372) %46, double %94, double %96, double %98, double %100, ptr noundef %87, ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull align 8 dereferenceable(12) %92)
          to label %101 unwind label %135

101:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 32, ptr %33) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #9
  %102 = load ptr, ptr %21, align 8, !tbaa !5
  invoke void @_ZN3JPH16STLTempAllocatorINS_16CharacterVirtual10ContactKeyEEC2ERNS_13TempAllocatorE(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %102)
          to label %103 unwind label %139

103:                                              ; preds = %101
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %104 unwind label %139

104:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  %105 = invoke noundef i64 @_ZNK3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %106 unwind label %143

106:                                              ; preds = %104
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32) %33, i64 noundef %105)
          to label %107 unwind label %143

107:                                              ; preds = %106
  invoke void @_ZNK3JPH16CharacterVirtual25RemoveConflictingContactsERNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS2_EEEERNS1_INS0_10ContactKeyENS3_IS7_EEEE(ptr noundef nonnull align 16 dereferenceable(372) %46, ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 8 dereferenceable(32) %33)
          to label %108 unwind label %143

108:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 32, ptr %35) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #9
  %109 = load ptr, ptr %21, align 8, !tbaa !5
  invoke void @_ZN3JPH16STLTempAllocatorINS_16CharacterVirtual10ConstraintEEC2ERNS_13TempAllocatorE(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %109)
          to label %110 unwind label %147

110:                                              ; preds = %108
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull align 8 dereferenceable(8) %36)
          to label %111 unwind label %147

111:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #9
  %112 = invoke noundef i64 @_ZNK3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %113 unwind label %151

113:                                              ; preds = %111
  %114 = mul i64 %112, 2
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32) %35, i64 noundef %114)
          to label %115 unwind label %151

115:                                              ; preds = %113
  %116 = load float, ptr %15, align 4, !tbaa !9
  invoke void @_ZNK3JPH16CharacterVirtual20DetermineConstraintsERNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS2_EEEEfRNS1_INS0_10ConstraintENS3_IS7_EEEE(ptr noundef nonnull align 16 dereferenceable(372) %46, ptr noundef nonnull align 8 dereferenceable(32) %27, float noundef %116, ptr noundef nonnull align 8 dereferenceable(32) %35)
          to label %117 unwind label %151

117:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %39, ptr align 16 %12, i64 16, i1 false), !tbaa.struct !37
  %118 = load float, ptr %15, align 4, !tbaa !9
  %119 = load float, ptr %24, align 4, !tbaa !9
  %120 = load ptr, ptr %21, align 8, !tbaa !5
  %121 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 0
  %122 = load double, ptr %121, align 16
  %123 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 1
  %124 = load double, ptr %123, align 8
  invoke void @_ZN3JPH16CharacterVirtual16SolveConstraintsENS_4Vec3EffRNS_5ArrayINS0_10ConstraintENS_16STLTempAllocatorIS3_EEEERNS2_INS0_10ContactKeyENS4_IS8_EEEERfRS1_RNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372) %46, double %122, double %124, float noundef %118, float noundef %119, ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef nonnull align 4 dereferenceable(4) %38, ptr noundef nonnull align 16 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(8) %120)
          to label %125 unwind label %155

125:                                              ; preds = %117
  %126 = load ptr, ptr %16, align 8, !tbaa !5
  %127 = icmp ne ptr %126, null
  br i1 %127, label %128, label %159

128:                                              ; preds = %125
  %129 = load ptr, ptr %16, align 8, !tbaa !5
  %130 = invoke noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %131 unwind label %155

131:                                              ; preds = %128
  %132 = invoke noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %133 unwind label %155

133:                                              ; preds = %131
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE6assignIPS2_EEvT_S8_(ptr noundef nonnull align 8 dereferenceable(24) %129, ptr noundef %130, ptr noundef %132)
          to label %134 unwind label %155

134:                                              ; preds = %133
  br label %159

135:                                              ; preds = %88, %84, %79
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %29, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %30, align 4
  br label %216

139:                                              ; preds = %103, %101
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %29, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  br label %215

143:                                              ; preds = %107, %106, %104
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %29, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %30, align 4
  br label %214

147:                                              ; preds = %110, %108
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %29, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #9
  br label %213

151:                                              ; preds = %115, %113, %111
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %29, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %30, align 4
  br label %212

155:                                              ; preds = %133, %131, %128, %117
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %29, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %30, align 4
  br label %211

159:                                              ; preds = %134, %125
  call void @llvm.lifetime.start.p0(i64 128, ptr %40) #9
  invoke void @_ZN3JPH16CharacterVirtual7ContactC2Ev(ptr noundef nonnull align 16 dereferenceable(123) %40)
          to label %160 unwind label %185

160:                                              ; preds = %159
  %161 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %41, ptr align 16 %161, i64 16, i1 false), !tbaa.struct !37
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %42, ptr align 16 %37, i64 16, i1 false), !tbaa.struct !37
  %162 = load ptr, ptr %17, align 8, !tbaa !5
  %163 = load ptr, ptr %18, align 8, !tbaa !5
  %164 = load ptr, ptr %19, align 8, !tbaa !5
  %165 = load ptr, ptr %20, align 8, !tbaa !5
  %166 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %167 = load double, ptr %166, align 16
  %168 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %169 = load double, ptr %168, align 8
  %170 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 0
  %171 = load double, ptr %170, align 16
  %172 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 1
  %173 = load double, ptr %172, align 8
  %174 = invoke noundef zeroext i1 @_ZNK3JPH16CharacterVirtual23GetFirstContactForSweepENS_4Vec3ES1_RNS0_7ContactERKNS_5ArrayINS0_10ContactKeyENS_16STLTempAllocatorIS5_EEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 16 dereferenceable(372) %46, double %167, double %169, double %171, double %173, ptr noundef nonnull align 16 dereferenceable(123) %40, ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef nonnull align 8 dereferenceable(8) %162, ptr noundef nonnull align 8 dereferenceable(8) %163, ptr noundef nonnull align 8 dereferenceable(8) %164, ptr noundef nonnull align 8 dereferenceable(12) %165)
          to label %175 unwind label %185

175:                                              ; preds = %160
  br i1 %174, label %176, label %189

176:                                              ; preds = %175
  %177 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %40, i32 0, i32 7
  %178 = load float, ptr %177, align 4, !tbaa !39
  %179 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mLEf(ptr noundef nonnull align 16 dereferenceable(16) %37, float noundef %178)
          to label %180 unwind label %185

180:                                              ; preds = %176
  %181 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %40, i32 0, i32 7
  %182 = load float, ptr %181, align 4, !tbaa !39
  %183 = load float, ptr %38, align 4, !tbaa !9
  %184 = fmul float %183, %182
  store float %184, ptr %38, align 4, !tbaa !9
  br label %189

185:                                              ; preds = %196, %189, %176, %160, %159
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %29, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 128, ptr %40) #9
  br label %211

189:                                              ; preds = %180, %175
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %43, ptr align 16 %37, i64 16, i1 false), !tbaa.struct !37
  %190 = load ptr, ptr %14, align 8, !tbaa !5
  %191 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 0
  %192 = load double, ptr %191, align 16
  %193 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 1
  %194 = load double, ptr %193, align 8
  %195 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %190, double %192, double %194)
          to label %196 unwind label %185

196:                                              ; preds = %189
  %197 = load float, ptr %38, align 4, !tbaa !9
  %198 = load float, ptr %24, align 4, !tbaa !9
  %199 = fsub float %198, %197
  store float %199, ptr %24, align 4, !tbaa !9
  %200 = invoke noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %37)
          to label %201 unwind label %185

201:                                              ; preds = %196
  %202 = fcmp olt float %200, 0x3E45798EE0000000
  br i1 %202, label %203, label %204

203:                                              ; preds = %201
  store i32 2, ptr %26, align 4
  br label %205

204:                                              ; preds = %201
  store i32 0, ptr %26, align 4
  br label %205

205:                                              ; preds = %204, %203
  call void @llvm.lifetime.end.p0(i64 128, ptr %40) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #9
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #9
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #9
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #9
  %206 = load i32, ptr %26, align 4
  switch i32 %206, label %217 [
    i32 0, label %207
  ]

207:                                              ; preds = %205
  br label %208

208:                                              ; preds = %207
  %209 = load i32, ptr %25, align 4, !tbaa !11
  %210 = add i32 %209, 1
  store i32 %210, ptr %25, align 4, !tbaa !11
  br label %66, !llvm.loop !43

211:                                              ; preds = %185, %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #9
  br label %212

212:                                              ; preds = %211, %151
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #9
  br label %213

213:                                              ; preds = %212, %147
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #9
  br label %214

214:                                              ; preds = %213, %143
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #9
  br label %215

215:                                              ; preds = %214, %139
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #9
  br label %216

216:                                              ; preds = %215, %135
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #9
  br label %219

217:                                              ; preds = %205, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %218

218:                                              ; preds = %217
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #9
  ret void

219:                                              ; preds = %216
  %220 = load ptr, ptr %29, align 8
  %221 = load i32, ptr %30, align 4
  %222 = insertvalue { ptr, i32 } poison, ptr %220, 0
  %223 = insertvalue { ptr, i32 } %222, i32 %221, 1
  resume { ptr, i32 } %223
}

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mLEf(ptr noundef nonnull align 16 dereferenceable(16), float noundef) #7 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 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 = { 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 #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 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Array.28" = type { %"class.JPH::STLTempAllocator", i64, i64, ptr }
%"class.JPH::STLTempAllocator" = type { ptr }
%"class.JPH::Array.29" = type { %"class.JPH::STLTempAllocator.30", i64, i64, ptr }
%"class.JPH::STLTempAllocator.30" = type { ptr }
%"class.JPH::Array.34" = type { %"class.JPH::STLTempAllocator.35", i64, i64, ptr }
%"class.JPH::STLTempAllocator.35" = type { ptr }
%"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 }

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH16CharacterVirtual23GetFirstContactForSweepENS_4Vec3ES1_RNS0_7ContactERKNS_5ArrayINS0_10ContactKeyENS_16STLTempAllocatorIS5_EEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 16 dereferenceable(372), double, double, double, double, ptr noundef nonnull align 16 dereferenceable(123), 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 #5 align 2

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16CharacterVirtual9MoveShapeERNS_4Vec3ES1_fPNS_5ArrayINS0_7ContactENS_12STLAllocatorIS4_EEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterERNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(16) %1, double %2, double %3, float noundef %4, ptr noundef %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Array.28", align 8
  %14 = alloca %"class.JPH::STLTempAllocator", align 8
  %15 = alloca %"class.JPH::Array.29", align 8
  %16 = alloca %"class.JPH::STLTempAllocator.30", align 8
  %17 = alloca %"class.JPH::Array.34", align 8
  %18 = alloca %"class.JPH::STLTempAllocator.35", align 8
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca float, align 4
  %21 = alloca %"struct.JPH::CharacterVirtual::Contact", align 16
  store double %2, ptr %12, align 16
  %22 = getelementptr inbounds i8, ptr %12, i64 8
  store double %3, ptr %22, align 8
  %23 = tail call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %24 = extractvalue { double, double } %23, 0
  %25 = extractvalue { double, double } %23, 1
  %26 = call { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %24, double %25)
  %27 = extractvalue { double, double } %26, 0
  %28 = extractvalue { double, double } %26, 1
  %29 = getelementptr inbounds i8, ptr %0, i64 176
  %30 = getelementptr inbounds i8, ptr %0, i64 184
  %31 = load i32, ptr %29, align 16, !tbaa !5
  %32 = icmp eq i32 %31, 0
  %33 = load float, ptr %30, align 8
  %34 = fcmp ugt float %33, %4
  %or.cond55 = select i1 %32, i1 true, i1 %34
  br i1 %or.cond55, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %11
  %35 = getelementptr inbounds i8, ptr %0, i64 196
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 8
  %36 = getelementptr inbounds i8, ptr %0, i64 24
  %.not = icmp eq ptr %5, null
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %19, i64 8
  %37 = getelementptr inbounds i8, ptr %21, i64 84
  br label %38

38:                                               ; preds = %.lr.ph, %80
  %.057 = phi float [ %4, %.lr.ph ], [ %81, %80 ]
  %.04156 = phi i32 [ 0, %.lr.ph ], [ %82, %80 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  call void @_ZN3JPH16STLTempAllocatorINS_16CharacterVirtual7ContactEEC2ERNS_13TempAllocatorE(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  %39 = load i32, ptr %35, align 4, !tbaa !32
  %40 = zext i32 %39 to i64
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32) %13, i64 noundef %40)
          to label %41 unwind label %55

41:                                               ; preds = %38
  %.sroa.09.0.copyload = load double, ptr %1, align 16
  %.sroa.210.0.copyload = load double, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !33
  %42 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %36)
  invoke void @_ZNK3JPH16CharacterVirtual21GetContactsAtPositionENS_4Vec3ES1_PKNS_5ShapeERNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS6_EEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 16 dereferenceable(372) %0, double %.sroa.09.0.copyload, double %.sroa.210.0.copyload, double %27, double %28, ptr noundef %42, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(12) %9)
          to label %43 unwind label %55

43:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  call void @_ZN3JPH16STLTempAllocatorINS_16CharacterVirtual10ContactKeyEEC2ERNS_13TempAllocatorE(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(8) %16)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  %44 = call noundef i64 @_ZNK3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32) %15, i64 noundef %44)
          to label %45 unwind label %57

45:                                               ; preds = %43
  invoke void @_ZNK3JPH16CharacterVirtual25RemoveConflictingContactsERNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS2_EEEERNS1_INS0_10ContactKeyENS3_IS7_EEEE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %46 unwind label %57

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  call void @_ZN3JPH16STLTempAllocatorINS_16CharacterVirtual10ConstraintEEC2ERNS_13TempAllocatorE(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(8) %18)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  %47 = call noundef i64 @_ZNK3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
  %48 = shl i64 %47, 1
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef %48)
          to label %49 unwind label %59

49:                                               ; preds = %46
  invoke void @_ZNK3JPH16CharacterVirtual20DetermineConstraintsERNS_5ArrayINS0_7ContactENS_16STLTempAllocatorIS2_EEEEfRNS1_INS0_10ConstraintENS3_IS7_EEEE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 8 dereferenceable(32) %13, float noundef %4, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %50 unwind label %59

50:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #8
  %.sroa.05.0.copyload = load double, ptr %12, align 16
  %.sroa.26.0.copyload = load double, ptr %22, align 8, !tbaa !33
  invoke void @_ZN3JPH16CharacterVirtual16SolveConstraintsENS_4Vec3EffRNS_5ArrayINS0_10ConstraintENS_16STLTempAllocatorIS3_EEEERNS2_INS0_10ContactKeyENS4_IS8_EEEERfRS1_RNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(372) %0, double %.sroa.05.0.copyload, double %.sroa.26.0.copyload, float noundef %4, float noundef %.057, ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 16 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %51 unwind label %61

51:                                               ; preds = %50
  br i1 %.not, label %63, label %52

52:                                               ; preds = %51
  %53 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
  %54 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %13)
  invoke void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE6assignIPS2_EEvT_S8_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef %53, ptr noundef %54)
          to label %63 unwind label %61

55:                                               ; preds = %41, %38
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %90

57:                                               ; preds = %45, %43
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %89

59:                                               ; preds = %49, %46
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %88

61:                                               ; preds = %52, %50
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %87

63:                                               ; preds = %52, %51
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %21) #8
  invoke void @_ZN3JPH16CharacterVirtual7ContactC2Ev(ptr noundef nonnull align 16 dereferenceable(123) %21)
          to label %64 unwind label %73

64:                                               ; preds = %63
  %.sroa.03.0.copyload = load double, ptr %1, align 16
  %.sroa.24.0.copyload = load double, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !33
  %.sroa.01.0.copyload = load double, ptr %19, align 16
  %.sroa.22.0.copyload = load double, ptr %.sroa.22.0..sroa_idx, align 8, !tbaa !33
  %65 = invoke noundef zeroext i1 @_ZNK3JPH16CharacterVirtual23GetFirstContactForSweepENS_4Vec3ES1_RNS0_7ContactERKNS_5ArrayINS0_10ContactKeyENS_16STLTempAllocatorIS5_EEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 16 dereferenceable(372) %0, double %.sroa.03.0.copyload, double %.sroa.24.0.copyload, double %.sroa.01.0.copyload, double %.sroa.22.0.copyload, ptr noundef nonnull align 16 dereferenceable(123) %21, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(12) %9)
          to label %66 unwind label %73

66:                                               ; preds = %64
  br i1 %65, label %67, label %75

67:                                               ; preds = %66
  %68 = load float, ptr %37, align 4, !tbaa !34
  %69 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mLEf(ptr noundef nonnull align 16 dereferenceable(16) %19, float noundef %68)
  %70 = load float, ptr %37, align 4, !tbaa !34
  %71 = load float, ptr %20, align 4, !tbaa !38
  %72 = fmul float %70, %71
  store float %72, ptr %20, align 4, !tbaa !38
  br label %75

73:                                               ; preds = %64, %63
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %21) #8
  br label %87

75:                                               ; preds = %67, %66
  %.sroa.0.0.copyload = load double, ptr %19, align 16
  %.sroa.2.0.copyload = load double, ptr %.sroa.22.0..sroa_idx, align 8, !tbaa !33
  %76 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %1, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %77 = load float, ptr %20, align 4, !tbaa !38
  %78 = call noundef float @_ZNK3JPH4Vec38LengthSqEv(ptr noundef nonnull align 16 dereferenceable(16) %19)
  %79 = fcmp uge float %78, 0x3E45798EE0000000
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #8
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #8
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #8
  br i1 %79, label %80, label %.critedge

80:                                               ; preds = %75
  %81 = fsub float %.057, %77
  %82 = add nuw i32 %.04156, 1
  %83 = load i32, ptr %29, align 16, !tbaa !5
  %84 = icmp uge i32 %82, %83
  %85 = load float, ptr %30, align 8
  %86 = fcmp ult float %81, %85
  %or.cond = select i1 %84, i1 true, i1 %86
  br i1 %or.cond, label %.critedge, label %38, !llvm.loop !39

87:                                               ; preds = %73, %61
  %.pn = phi { ptr, i32 } [ %74, %73 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  br label %88

88:                                               ; preds = %87, %59
  %.pn.pn = phi { ptr, i32 } [ %.pn, %87 ], [ %60, %59 ]
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #8
  br label %89

89:                                               ; preds = %88, %57
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %88 ], [ %58, %57 ]
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #8
  br label %90

90:                                               ; preds = %89, %55
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %89 ], [ %56, %55 ]
  call void @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #8
  resume { ptr, i32 } %.pn.pn.pn.pn

.critedge:                                        ; preds = %75, %80, %11
  ret void
}

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { 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 176}
!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 = !{!6, !11, i64 196}
!33 = !{!12, !12, i64 0}
!34 = !{!35, !19, i64 84}
!35 = !{!"_ZTSN3JPH16CharacterVirtual7ContactE", !36, i64 0, !16, i64 16, !16, i64 32, !16, i64 48, !16, i64 64, !19, i64 80, !19, i64 84, !37, i64 88, !27, i64 89, !14, i64 96, !24, i64 104, !14, i64 112, !27, i64 120, !27, i64 121, !27, i64 122}
!36 = !{!"_ZTSN3JPH16CharacterVirtual10ContactKeyE", !21, i64 0, !25, i64 4, !22, i64 8}
!37 = !{!"_ZTSN3JPH11EMotionTypeE", !12, i64 0}
!38 = !{!19, !19, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}


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