; 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::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"struct.JPH::CharacterVirtual::Contact" = type <{ %"class.JPH::CharacterVirtual::ContactKey", [4 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, i8, i8, [6 x i8], ptr, i64, ptr, i8, i8, i8, [5 x i8] }>
%"class.JPH::CharacterVirtual::ContactKey" = type { %"class.JPH::BodyID", %"class.JPH::CharacterID", %"class.JPH::SubShapeID" }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::CharacterID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"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::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 }>
%"struct.JPH::CharacterVirtual::Constraint" = type <{ ptr, float, float, %"class.JPH::Vec3", %"class.JPH::Plane", i8, [15 x i8] }>

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

; 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 } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16), float noundef) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef 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
define dso_local 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) %1, float noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3) #5 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca float, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca ptr, align 8
  %18 = alloca %"class.JPH::Plane", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca float, align 4
  %22 = alloca %"class.JPH::Vec3", align 16
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca %"class.JPH::Vec3", align 16
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca ptr, align 8
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = alloca %"class.JPH::Vec3", align 16
  %30 = alloca %"class.JPH::Vec3", align 16
  %31 = alloca %"class.JPH::Plane", align 16
  %32 = alloca %"class.JPH::Vec3", align 16
  %33 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store float %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  %34 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %35, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %36)
  store ptr %37, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #10
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %38)
  store ptr %39, ptr %11, align 8, !tbaa !5
  br label %40

40:                                               ; preds = %207, %4
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = icmp ne ptr %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  br label %210

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %46, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #10
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %47, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 %48, i64 16, i1 false), !tbaa.struct !11
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %49, i32 0, i32 6
  %51 = load float, ptr %50, align 16, !tbaa !13
  %52 = fcmp olt float %51, 0.000000e+00
  br i1 %52, label %53, label %88

53:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #10
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %54, i32 0, i32 4
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %56, i32 0, i32 6
  %58 = load float, ptr %57, align 16, !tbaa !13
  %59 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %55, float noundef %58)
  %60 = getelementptr inbounds %"class.JPH::Vec3", ptr %16, i32 0, i32 0
  %61 = getelementptr inbounds %union.anon, ptr %60, i32 0, i32 0
  %62 = getelementptr inbounds { double, double }, ptr %61, i32 0, i32 0
  %63 = extractvalue { double, double } %59, 0
  store double %63, ptr %62, align 16
  %64 = getelementptr inbounds { double, double }, ptr %61, i32 0, i32 1
  %65 = extractvalue { double, double } %59, 1
  store double %65, ptr %64, align 8
  %66 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %34, i32 0, i32 15
  %67 = load float, ptr %66, align 4, !tbaa !24
  %68 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %16, float noundef %67)
  %69 = getelementptr inbounds %"class.JPH::Vec3", ptr %15, i32 0, i32 0
  %70 = getelementptr inbounds %union.anon, ptr %69, i32 0, i32 0
  %71 = getelementptr inbounds { double, double }, ptr %70, i32 0, i32 0
  %72 = extractvalue { double, double } %68, 0
  store double %72, ptr %71, align 16
  %73 = getelementptr inbounds { double, double }, ptr %70, i32 0, i32 1
  %74 = extractvalue { double, double } %68, 1
  store double %74, ptr %73, align 8
  %75 = load float, ptr %7, align 4, !tbaa !9
  %76 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %15, float noundef %75)
  %77 = getelementptr inbounds %"class.JPH::Vec3", ptr %14, i32 0, i32 0
  %78 = getelementptr inbounds %union.anon, ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds { double, double }, ptr %78, i32 0, i32 0
  %80 = extractvalue { double, double } %76, 0
  store double %80, ptr %79, align 16
  %81 = getelementptr inbounds { double, double }, ptr %78, i32 0, i32 1
  %82 = extractvalue { double, double } %76, 1
  store double %82, ptr %81, align 8
  %83 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %84 = load double, ptr %83, align 16
  %85 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %86 = load double, ptr %85, align 8
  %87 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %84, double %86)
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #10
  br label %88

88:                                               ; preds = %53, %45
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = call noundef nonnull align 16 dereferenceable(49) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE12emplace_backIJEEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(32) %89)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = call noundef nonnull align 16 dereferenceable(49) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %91)
  store ptr %92, ptr %17, align 8, !tbaa !5
  %93 = load ptr, ptr %12, align 8, !tbaa !5
  %94 = load ptr, ptr %17, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Constraint", ptr %94, i32 0, i32 0
  store ptr %93, ptr %95, align 16, !tbaa !40
  %96 = load ptr, ptr %17, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Constraint", ptr %96, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %97, ptr align 16 %13, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #10
  %98 = load ptr, ptr %12, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %98, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 %99, i64 16, i1 false), !tbaa.struct !11
  %100 = load ptr, ptr %12, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %100, i32 0, i32 6
  %102 = load float, ptr %101, align 16, !tbaa !13
  %103 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %104 = load double, ptr %103, align 16
  %105 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %106 = load double, ptr %105, align 8
  call void @_ZN3JPH5PlaneC2ENS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(16) %18, double %104, double %106, float noundef %102)
  %107 = load ptr, ptr %17, align 8, !tbaa !5
  %108 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Constraint", ptr %107, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %108, ptr align 16 %18, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #10
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %109, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 %110, i64 16, i1 false), !tbaa.struct !11
  %111 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %112 = load double, ptr %111, align 16
  %113 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %114 = load double, ptr %113, align 8
  %115 = call noundef zeroext i1 @_ZNK3JPH13CharacterBase15IsSlopeTooSteepENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(144) %34, double %112, double %114)
  br i1 %115, label %116, label %206

116:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #10
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %117, i32 0, i32 4
  %119 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %34, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 %119, i64 16, i1 false), !tbaa.struct !11
  %120 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %121 = load double, ptr %120, align 16
  %122 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %123 = load double, ptr %122, align 8
  %124 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %118, double %121, double %123)
  store float %124, ptr %21, align 4, !tbaa !9
  %125 = load float, ptr %21, align 4, !tbaa !9
  %126 = fcmp ogt float %125, 0x3F50624DE0000000
  br i1 %126, label %127, label %205

127:                                              ; preds = %116
  %128 = load ptr, ptr %17, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Constraint", ptr %128, i32 0, i32 5
  store i8 1, ptr %129, align 16, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #10
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %130, i32 0, i32 4
  %132 = load float, ptr %21, align 4, !tbaa !9
  %133 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %34, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 %133, i64 16, i1 false), !tbaa.struct !11
  %134 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %135 = load double, ptr %134, align 16
  %136 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %137 = load double, ptr %136, align 8
  %138 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %132, double %135, double %137)
  %139 = getelementptr inbounds %"class.JPH::Vec3", ptr %25, i32 0, i32 0
  %140 = getelementptr inbounds %union.anon, ptr %139, i32 0, i32 0
  %141 = getelementptr inbounds { double, double }, ptr %140, i32 0, i32 0
  %142 = extractvalue { double, double } %138, 0
  store double %142, ptr %141, align 16
  %143 = getelementptr inbounds { double, double }, ptr %140, i32 0, i32 1
  %144 = extractvalue { double, double } %138, 1
  store double %144, ptr %143, align 8
  %145 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %146 = load double, ptr %145, align 16
  %147 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %148 = load double, ptr %147, align 8
  %149 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %131, double %146, double %148)
  %150 = getelementptr inbounds %"class.JPH::Vec3", ptr %24, i32 0, i32 0
  %151 = getelementptr inbounds %union.anon, ptr %150, i32 0, i32 0
  %152 = getelementptr inbounds { double, double }, ptr %151, i32 0, i32 0
  %153 = extractvalue { double, double } %149, 0
  store double %153, ptr %152, align 16
  %154 = getelementptr inbounds { double, double }, ptr %151, i32 0, i32 1
  %155 = extractvalue { double, double } %149, 1
  store double %155, ptr %154, align 8
  %156 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %24)
  %157 = getelementptr inbounds %"class.JPH::Vec3", ptr %23, i32 0, i32 0
  %158 = getelementptr inbounds %union.anon, ptr %157, i32 0, i32 0
  %159 = getelementptr inbounds { double, double }, ptr %158, i32 0, i32 0
  %160 = extractvalue { double, double } %156, 0
  store double %160, ptr %159, align 16
  %161 = getelementptr inbounds { double, double }, ptr %158, i32 0, i32 1
  %162 = extractvalue { double, double } %156, 1
  store double %162, ptr %161, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #10
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = call noundef nonnull align 16 dereferenceable(49) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE12emplace_backIJEEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(32) %163)
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #10
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = call noundef nonnull align 16 dereferenceable(49) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %165)
  store ptr %166, ptr %27, align 8, !tbaa !5
  %167 = load ptr, ptr %12, align 8, !tbaa !5
  %168 = load ptr, ptr %27, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Constraint", ptr %168, i32 0, i32 0
  store ptr %167, ptr %169, align 16, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %29, ptr align 16 %23, i64 16, i1 false), !tbaa.struct !11
  %170 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %171 = load double, ptr %170, align 16
  %172 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %173 = load double, ptr %172, align 8
  %174 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %171, double %173)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %23, i64 16, i1 false), !tbaa.struct !11
  %175 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %176 = load double, ptr %175, align 16
  %177 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %178 = load double, ptr %177, align 8
  %179 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %174, double %176, double %178)
  %180 = getelementptr inbounds %"class.JPH::Vec3", ptr %28, i32 0, i32 0
  %181 = getelementptr inbounds %union.anon, ptr %180, i32 0, i32 0
  %182 = getelementptr inbounds { double, double }, ptr %181, i32 0, i32 0
  %183 = extractvalue { double, double } %179, 0
  store double %183, ptr %182, align 16
  %184 = getelementptr inbounds { double, double }, ptr %181, i32 0, i32 1
  %185 = extractvalue { double, double } %179, 1
  store double %185, ptr %184, align 8
  %186 = load ptr, ptr %27, align 8, !tbaa !5
  %187 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Constraint", ptr %186, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %187, ptr align 16 %28, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %32, ptr align 16 %23, i64 16, i1 false), !tbaa.struct !11
  %188 = load ptr, ptr %12, align 8, !tbaa !5
  %189 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %188, i32 0, i32 6
  %190 = load float, ptr %189, align 16, !tbaa !13
  %191 = load ptr, ptr %12, align 8, !tbaa !5
  %192 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %191, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %192, i64 16, i1 false), !tbaa.struct !11
  %193 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %194 = load double, ptr %193, align 16
  %195 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %196 = load double, ptr %195, align 8
  %197 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %23, double %194, double %196)
  %198 = fdiv float %190, %197
  %199 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %200 = load double, ptr %199, align 16
  %201 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %202 = load double, ptr %201, align 8
  call void @_ZN3JPH5PlaneC2ENS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(16) %31, double %200, double %202, float noundef %198)
  %203 = load ptr, ptr %27, align 8, !tbaa !5
  %204 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Constraint", ptr %203, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %204, ptr align 16 %31, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #10
  br label %205

205:                                              ; preds = %127, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  br label %206

206:                                              ; preds = %205, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  br label %207

207:                                              ; preds = %206
  %208 = load ptr, ptr %10, align 8, !tbaa !5
  %209 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %208, i32 1
  store ptr %209, ptr %10, align 8, !tbaa !5
  br label %40

210:                                              ; preds = %44
  ret void
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(49) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE12emplace_backIJEEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(32)) #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(49) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32)) #7 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH13CharacterBase15IsSlopeTooSteepENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(144), double, double) #8 align 2

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

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

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


; 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::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local 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) %1, float noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3) local_unnamed_addr #5 align 2 {
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca %"class.JPH::Plane", align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Plane", align 16
  %12 = tail call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %13 = tail call noundef ptr @_ZN3JPH5ArrayINS_16CharacterVirtual7ContactENS_16STLTempAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %.not55 = icmp eq ptr %12, %13
  br i1 %.not55, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %14 = getelementptr inbounds i8, ptr %7, i64 8
  %15 = getelementptr inbounds i8, ptr %0, i64 204
  %16 = getelementptr inbounds i8, ptr %6, i64 8
  %17 = getelementptr inbounds i8, ptr %0, i64 32
  %.sroa.215.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 40
  %18 = getelementptr inbounds i8, ptr %10, i64 8
  %19 = getelementptr inbounds i8, ptr %9, i64 8
  br label %20

._crit_edge:                                      ; preds = %72, %4
  ret void

20:                                               ; preds = %.lr.ph, %72
  %.056 = phi ptr [ %12, %.lr.ph ], [ %73, %72 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #10
  %21 = getelementptr inbounds i8, ptr %.056, i64 32
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %5, ptr noundef nonnull align 16 dereferenceable(16) %21, i64 16, i1 false), !tbaa.struct !5
  %22 = getelementptr inbounds i8, ptr %.056, i64 80
  %23 = load float, ptr %22, align 16, !tbaa !9
  %24 = fcmp olt float %23, 0.000000e+00
  br i1 %24, label %25, label %38

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #10
  %26 = getelementptr inbounds i8, ptr %.056, i64 48
  %27 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %26, float noundef %23)
  %28 = extractvalue { double, double } %27, 0
  store double %28, ptr %7, align 16
  %29 = extractvalue { double, double } %27, 1
  store double %29, ptr %14, align 8
  %30 = load float, ptr %15, align 4, !tbaa !22
  %31 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %7, float noundef %30)
  %32 = extractvalue { double, double } %31, 0
  store double %32, ptr %6, align 16
  %33 = extractvalue { double, double } %31, 1
  store double %33, ptr %16, align 8
  %34 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %6, float noundef %2)
  %35 = extractvalue { double, double } %34, 0
  %36 = extractvalue { double, double } %34, 1
  %37 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mIES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %35, double %36)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #10
  br label %38

38:                                               ; preds = %25, %20
  %39 = call noundef nonnull align 16 dereferenceable(49) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE12emplace_backIJEEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(32) %3)
  %40 = call noundef nonnull align 16 dereferenceable(49) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  store ptr %.056, ptr %40, align 16, !tbaa !38
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %41, ptr noundef nonnull align 16 dereferenceable(16) %5, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #10
  %42 = getelementptr inbounds i8, ptr %.056, i64 48
  %.sroa.020.0.copyload = load double, ptr %42, align 16
  %.sroa.221.0..sroa_idx = getelementptr inbounds i8, ptr %.056, i64 56
  %.sroa.221.0.copyload = load double, ptr %.sroa.221.0..sroa_idx, align 8, !tbaa !6
  %43 = load float, ptr %22, align 16, !tbaa !9
  call void @_ZN3JPH5PlaneC2ENS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(16) %8, double %.sroa.020.0.copyload, double %.sroa.221.0.copyload, float noundef %43)
  %44 = getelementptr inbounds i8, ptr %40, i64 32
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %44, ptr noundef nonnull align 16 dereferenceable(16) %8, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  %45 = getelementptr inbounds i8, ptr %.056, i64 64
  %.sroa.018.0.copyload = load double, ptr %45, align 16
  %.sroa.219.0..sroa_idx = getelementptr inbounds i8, ptr %.056, i64 72
  %.sroa.219.0.copyload = load double, ptr %.sroa.219.0..sroa_idx, align 8, !tbaa !6
  %46 = call noundef zeroext i1 @_ZNK3JPH13CharacterBase15IsSlopeTooSteepENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(144) %0, double %.sroa.018.0.copyload, double %.sroa.219.0.copyload)
  br i1 %46, label %47, label %72

47:                                               ; preds = %38
  %.sroa.014.0.copyload = load double, ptr %17, align 16
  %.sroa.215.0.copyload = load double, ptr %.sroa.215.0..sroa_idx, align 8, !tbaa !6
  %48 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %42, double %.sroa.014.0.copyload, double %.sroa.215.0.copyload)
  %49 = fcmp ogt float %48, 0x3F50624DE0000000
  br i1 %49, label %50, label %72

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %40, i64 48
  store i8 1, ptr %51, align 16, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #10
  %.sroa.010.0.copyload = load double, ptr %17, align 16
  %.sroa.211.0.copyload = load double, ptr %.sroa.215.0..sroa_idx, align 8, !tbaa !6
  %52 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %48, double %.sroa.010.0.copyload, double %.sroa.211.0.copyload)
  %53 = extractvalue { double, double } %52, 0
  %54 = extractvalue { double, double } %52, 1
  %55 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %42, double %53, double %54)
  %56 = extractvalue { double, double } %55, 0
  store double %56, ptr %10, align 16
  %57 = extractvalue { double, double } %55, 1
  store double %57, ptr %18, align 8
  %58 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %10)
  %59 = extractvalue { double, double } %58, 0
  store double %59, ptr %9, align 16
  %60 = extractvalue { double, double } %58, 1
  store double %60, ptr %19, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #10
  %61 = call noundef nonnull align 16 dereferenceable(49) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE12emplace_backIJEEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(32) %3)
  %62 = call noundef nonnull align 16 dereferenceable(49) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  store ptr %.056, ptr %62, align 16, !tbaa !38
  %.sroa.05.0.copyload = load double, ptr %9, align 16
  %.sroa.26.0.copyload = load double, ptr %19, align 8, !tbaa !6
  %63 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %.sroa.05.0.copyload, double %.sroa.26.0.copyload)
  %.sroa.03.0.copyload = load double, ptr %9, align 16
  %.sroa.24.0.copyload = load double, ptr %19, align 8, !tbaa !6
  %64 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %63, double %.sroa.03.0.copyload, double %.sroa.24.0.copyload)
  %65 = extractvalue { double, double } %64, 0
  %66 = extractvalue { double, double } %64, 1
  %67 = getelementptr inbounds i8, ptr %62, i64 16
  store double %65, ptr %67, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %62, i64 24
  store double %66, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #10
  %.sroa.01.0.copyload = load double, ptr %9, align 16
  %.sroa.22.0.copyload = load double, ptr %19, align 8, !tbaa !6
  %68 = load float, ptr %22, align 16, !tbaa !9
  %.sroa.0.0.copyload = load double, ptr %42, align 16
  %.sroa.2.0.copyload = load double, ptr %.sroa.221.0..sroa_idx, align 8, !tbaa !6
  %69 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %9, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %70 = fdiv float %68, %69
  call void @_ZN3JPH5PlaneC2ENS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(16) %11, double %.sroa.01.0.copyload, double %.sroa.22.0.copyload, float noundef %70)
  %71 = getelementptr inbounds i8, ptr %62, i64 32
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %71, ptr noundef nonnull align 16 dereferenceable(16) %11, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #10
  br label %72

72:                                               ; preds = %47, %50, %38
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #10
  %73 = getelementptr inbounds i8, ptr %.056, i64 128
  %.not = icmp eq ptr %73, %13
  br i1 %.not, label %._crit_edge, label %20
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(49) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE12emplace_backIJEEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(49) ptr @_ZN3JPH5ArrayINS_16CharacterVirtual10ConstraintENS_16STLTempAllocatorIS2_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #7 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH13CharacterBase15IsSlopeTooSteepENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(144), double, double) local_unnamed_addr #8 align 2

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

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

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


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