; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Collision/Shape (ConvexShape)

; 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::RayCastResult" = type { %"class.JPH::BroadPhaseCastResult", %"class.JPH::SubShapeID" }
%"class.JPH::BroadPhaseCastResult" = type { %"class.JPH::BodyID", float }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"struct.JPH::RayCast" = type { %"struct.JPH::RayCastT" }
%"struct.JPH::RayCastT" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::RayCastSettings" = type { i8, i8, 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN3JPH16TransformedShape10sGetBodyIDEPKS0_(ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH11ConvexShape7CastRayERKNS_7RayCastERKNS_15RayCastSettingsERKNS_17SubShapeIDCreatorERNS_18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEEERKNS_11ShapeFilterE(ptr noundef nonnull align 8 dereferenceable(44) %0, ptr noundef nonnull align 16 dereferenceable(32) %1, ptr noundef nonnull align 1 dereferenceable(3) %2, ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(12) %5) unnamed_addr #5 align 2 {
  %7 = alloca ptr, align 8
  %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::RayCastResult", align 4
  %14 = alloca %"class.JPH::BodyID", align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca %"struct.JPH::RayCast", align 16
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca %"class.JPH::Vec3", align 16
  %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::RayCastResult", align 4
  %26 = alloca %"class.JPH::BodyID", align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  %27 = load ptr, ptr %7, align 8
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH17SubShapeIDCreator5GetIDEv(ptr noundef nonnull align 4 dereferenceable(8) %29)
  %31 = load ptr, ptr %28, align 8, !tbaa !9
  %32 = getelementptr inbounds ptr, ptr %31, i64 2
  %33 = load ptr, ptr %32, align 8
  %34 = call noundef zeroext i1 %33(ptr noundef nonnull align 8 dereferenceable(12) %28, ptr noundef %27, ptr noundef nonnull align 4 dereferenceable(4) %30)
  br i1 %34, label %36, label %35

35:                                               ; preds = %6
  br label %166

36:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #8
  call void @_ZN3JPH13RayCastResultC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %13)
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = call noundef float @_ZNK3JPH18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEE19GetEarlyOutFractionEv(ptr noundef nonnull align 8 dereferenceable(24) %37)
  %39 = getelementptr inbounds %"class.JPH::BroadPhaseCastResult", ptr %13, i32 0, i32 1
  store float %38, ptr %39, align 4, !tbaa !11
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = load ptr, ptr %27, align 8, !tbaa !9
  %43 = getelementptr inbounds ptr, ptr %42, i64 16
  %44 = load ptr, ptr %43, align 8
  %45 = call noundef zeroext i1 %44(ptr noundef nonnull align 8 dereferenceable(44) %27, ptr noundef nonnull align 16 dereferenceable(32) %40, ptr noundef nonnull align 4 dereferenceable(8) %41, ptr noundef nonnull align 4 dereferenceable(12) %13)
  br i1 %45, label %46, label %165

46:                                               ; preds = %36
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds %"class.JPH::RayCastSettings", ptr %47, i32 0, i32 2
  %49 = load i8, ptr %48, align 1, !tbaa !16, !range !20, !noundef !21
  %50 = trunc i8 %49 to i1
  br i1 %50, label %55, label %51

51:                                               ; preds = %46
  %52 = getelementptr inbounds %"class.JPH::BroadPhaseCastResult", ptr %13, i32 0, i32 1
  %53 = load float, ptr %52, align 4, !tbaa !11
  %54 = fcmp ogt float %53, 0.000000e+00
  br i1 %54, label %55, label %65

55:                                               ; preds = %51, %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = call noundef ptr @_ZNK3JPH18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEE10GetContextEv(ptr noundef nonnull align 8 dereferenceable(24) %56)
  %58 = call i32 @_ZN3JPH16TransformedShape10sGetBodyIDEPKS0_(ptr noundef %57)
  %59 = getelementptr inbounds %"class.JPH::BodyID", ptr %14, i32 0, i32 0
  store i32 %58, ptr %59, align 4
  %60 = getelementptr inbounds %"class.JPH::BroadPhaseCastResult", ptr %13, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %60, ptr align 4 %14, i64 4, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = getelementptr inbounds ptr, ptr %62, i64 6
  %64 = load ptr, ptr %63, align 8
  call void %64(ptr noundef nonnull align 8 dereferenceable(24) %61, ptr noundef nonnull align 4 dereferenceable(12) %13)
  br label %65

65:                                               ; preds = %55, %51
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.JPH::RayCastSettings", ptr %66, i32 0, i32 1
  %68 = load i8, ptr %67, align 1, !tbaa !24
  %69 = icmp eq i8 %68, 1
  br i1 %69, label %70, label %164

70:                                               ; preds = %65
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  %72 = call noundef zeroext i1 @_ZNK3JPH18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEE14ShouldEarlyOutEv(ptr noundef nonnull align 8 dereferenceable(24) %71)
  br i1 %72, label %164, label %73

73:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store float 1.000000e+00, ptr %16, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %74 = load ptr, ptr %11, align 8, !tbaa !5
  %75 = call noundef float @_ZNK3JPH18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEE19GetEarlyOutFractionEv(ptr noundef nonnull align 8 dereferenceable(24) %74)
  store float %75, ptr %17, align 4, !tbaa !25
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %77 = load float, ptr %76, align 4, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  store float %77, ptr %15, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %78 = getelementptr inbounds %"class.JPH::BroadPhaseCastResult", ptr %13, i32 0, i32 1
  %79 = load float, ptr %78, align 4, !tbaa !11
  %80 = load float, ptr %15, align 4, !tbaa !25
  %81 = fsub float %79, %80
  store float %81, ptr %18, align 4, !tbaa !25
  %82 = load float, ptr %18, align 4, !tbaa !25
  %83 = fcmp olt float %82, 0.000000e+00
  br i1 %83, label %84, label %163

84:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #8
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.JPH::RayCastT", ptr %85, i32 0, i32 0
  %87 = load float, ptr %15, align 4, !tbaa !25
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = getelementptr inbounds %"struct.JPH::RayCastT", ptr %88, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 %89, i64 16, i1 false), !tbaa.struct !26
  %90 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %91 = load double, ptr %90, align 16
  %92 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %93 = load double, ptr %92, align 8
  %94 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %87, double %91, double %93)
  %95 = getelementptr inbounds %"class.JPH::Vec3", ptr %21, i32 0, i32 0
  %96 = getelementptr inbounds %union.anon.4, ptr %95, i32 0, i32 0
  %97 = getelementptr inbounds { double, double }, ptr %96, i32 0, i32 0
  %98 = extractvalue { double, double } %94, 0
  store double %98, ptr %97, align 16
  %99 = getelementptr inbounds { double, double }, ptr %96, i32 0, i32 1
  %100 = extractvalue { double, double } %94, 1
  store double %100, ptr %99, align 8
  %101 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %102 = load double, ptr %101, align 16
  %103 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %104 = load double, ptr %103, align 8
  %105 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %86, double %102, double %104)
  %106 = getelementptr inbounds %"class.JPH::Vec3", ptr %20, i32 0, i32 0
  %107 = getelementptr inbounds %union.anon.4, ptr %106, i32 0, i32 0
  %108 = getelementptr inbounds { double, double }, ptr %107, i32 0, i32 0
  %109 = extractvalue { double, double } %105, 0
  store double %109, ptr %108, align 16
  %110 = getelementptr inbounds { double, double }, ptr %107, i32 0, i32 1
  %111 = extractvalue { double, double } %105, 1
  store double %111, ptr %110, align 8
  %112 = load float, ptr %18, align 4, !tbaa !25
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.JPH::RayCastT", ptr %113, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %114, i64 16, i1 false), !tbaa.struct !26
  %115 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %116 = load double, ptr %115, align 16
  %117 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %118 = load double, ptr %117, align 8
  %119 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %112, double %116, double %118)
  %120 = getelementptr inbounds %"class.JPH::Vec3", ptr %23, i32 0, i32 0
  %121 = getelementptr inbounds %union.anon.4, ptr %120, i32 0, i32 0
  %122 = getelementptr inbounds { double, double }, ptr %121, i32 0, i32 0
  %123 = extractvalue { double, double } %119, 0
  store double %123, ptr %122, align 16
  %124 = getelementptr inbounds { double, double }, ptr %121, i32 0, i32 1
  %125 = extractvalue { double, double } %119, 1
  store double %125, ptr %124, align 8
  %126 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %127 = load double, ptr %126, align 16
  %128 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %129 = load double, ptr %128, align 8
  %130 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %131 = load double, ptr %130, align 16
  %132 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %133 = load double, ptr %132, align 8
  call void @_ZN3JPH7RayCastCI2NS_8RayCastTINS_4Vec3ENS_5Mat44ES0_EEES2_S2_(ptr noundef nonnull align 16 dereferenceable(32) %19, double %127, double %129, double %131, double %133)
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #8
  call void @_ZN3JPH13RayCastResultC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %25)
  %134 = getelementptr inbounds %"class.JPH::BroadPhaseCastResult", ptr %25, i32 0, i32 1
  store float 1.000000e+00, ptr %134, align 4, !tbaa !11
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = load ptr, ptr %27, align 8, !tbaa !9
  %137 = getelementptr inbounds ptr, ptr %136, i64 16
  %138 = load ptr, ptr %137, align 8
  %139 = call noundef zeroext i1 %138(ptr noundef nonnull align 8 dereferenceable(44) %27, ptr noundef nonnull align 16 dereferenceable(32) %19, ptr noundef nonnull align 4 dereferenceable(8) %135, ptr noundef nonnull align 4 dereferenceable(12) %25)
  br i1 %139, label %140, label %162

140:                                              ; preds = %84
  %141 = getelementptr inbounds %"class.JPH::BroadPhaseCastResult", ptr %25, i32 0, i32 1
  %142 = load float, ptr %141, align 4, !tbaa !11
  %143 = fcmp ogt float %142, 0.000000e+00
  br i1 %143, label %144, label %162

144:                                              ; preds = %140
  %145 = getelementptr inbounds %"class.JPH::BroadPhaseCastResult", ptr %13, i32 0, i32 1
  %146 = load float, ptr %145, align 4, !tbaa !11
  %147 = getelementptr inbounds %"class.JPH::BroadPhaseCastResult", ptr %25, i32 0, i32 1
  %148 = load float, ptr %147, align 4, !tbaa !11
  %149 = fsub float %148, 1.000000e+00
  %150 = load float, ptr %18, align 4, !tbaa !25
  %151 = call float @llvm.fmuladd.f32(float %149, float %150, float %146)
  %152 = getelementptr inbounds %"class.JPH::BroadPhaseCastResult", ptr %25, i32 0, i32 1
  store float %151, ptr %152, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %153 = load ptr, ptr %11, align 8, !tbaa !5
  %154 = call noundef ptr @_ZNK3JPH18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEE10GetContextEv(ptr noundef nonnull align 8 dereferenceable(24) %153)
  %155 = call i32 @_ZN3JPH16TransformedShape10sGetBodyIDEPKS0_(ptr noundef %154)
  %156 = getelementptr inbounds %"class.JPH::BodyID", ptr %26, i32 0, i32 0
  store i32 %155, ptr %156, align 4
  %157 = getelementptr inbounds %"class.JPH::BroadPhaseCastResult", ptr %25, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %157, ptr align 4 %26, i64 4, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  %158 = load ptr, ptr %11, align 8, !tbaa !5
  %159 = load ptr, ptr %158, align 8, !tbaa !9
  %160 = getelementptr inbounds ptr, ptr %159, i64 6
  %161 = load ptr, ptr %160, align 8
  call void %161(ptr noundef nonnull align 8 dereferenceable(24) %158, ptr noundef nonnull align 4 dereferenceable(12) %25)
  br label %162

162:                                              ; preds = %144, %140, %84
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #8
  br label %163

163:                                              ; preds = %162, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %164

164:                                              ; preds = %163, %70, %65
  br label %165

165:                                              ; preds = %164, %36
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #8
  br label %166

166:                                              ; preds = %165, %35
  ret void
}

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #7

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !15, i64 4}
!12 = !{!"_ZTSN3JPH20BroadPhaseCastResultE", !13, i64 0, !15, i64 4}
!13 = !{!"_ZTSN3JPH6BodyIDE", !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!17, !19, i64 2}
!17 = !{!"_ZTSN3JPH15RayCastSettingsE", !18, i64 0, !18, i64 1, !19, i64 2}
!18 = !{!"_ZTSN3JPH13EBackFaceModeE", !7, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{i64 0, i64 4, !23}
!23 = !{!14, !14, i64 0}
!24 = !{!17, !18, i64 1}
!25 = !{!15, !15, i64 0}
!26 = !{i64 0, i64 16, !27}
!27 = !{!7, !7, i64 0}


; 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::RayCastResult" = type { %"class.JPH::BroadPhaseCastResult", %"class.JPH::SubShapeID" }
%"class.JPH::BroadPhaseCastResult" = type { %"class.JPH::BodyID", float }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"struct.JPH::RayCast" = type { %"struct.JPH::RayCastT" }
%"struct.JPH::RayCastT" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon.4 }
%union.anon.4 = 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN3JPH16TransformedShape10sGetBodyIDEPKS0_(ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH11ConvexShape7CastRayERKNS_7RayCastERKNS_15RayCastSettingsERKNS_17SubShapeIDCreatorERNS_18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEEERKNS_11ShapeFilterE(ptr noundef nonnull align 8 dereferenceable(44) %0, ptr noundef nonnull align 16 dereferenceable(32) %1, ptr nocapture noundef nonnull readonly align 1 dereferenceable(3) %2, ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(12) %5) unnamed_addr #4 align 2 {
  %7 = alloca %"class.JPH::RayCastResult", align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca %"struct.JPH::RayCast", align 16
  %11 = alloca %"class.JPH::RayCastResult", align 4
  %12 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH17SubShapeIDCreator5GetIDEv(ptr noundef nonnull align 4 dereferenceable(8) %3)
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %13, i64 16
  %15 = load ptr, ptr %14, align 8
  %16 = tail call noundef zeroext i1 %15(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull %0, ptr noundef nonnull align 4 dereferenceable(4) %12)
  br i1 %16, label %17, label %78

17:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #7
  call void @_ZN3JPH13RayCastResultC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %7)
  %18 = call noundef float @_ZNK3JPH18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEE19GetEarlyOutFractionEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %19 = getelementptr inbounds i8, ptr %7, i64 4
  store float %18, ptr %19, align 4, !tbaa !8
  %20 = load ptr, ptr %0, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 128
  %22 = load ptr, ptr %21, align 8
  %23 = call noundef zeroext i1 %22(ptr noundef nonnull align 8 dereferenceable(44) %0, ptr noundef nonnull align 16 dereferenceable(32) %1, ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(12) %7)
  br i1 %23, label %24, label %77

24:                                               ; preds = %17
  %25 = getelementptr inbounds i8, ptr %2, i64 2
  %26 = load i8, ptr %25, align 1, !tbaa !14, !range !18, !noundef !19
  %27 = trunc nuw i8 %26 to i1
  %28 = load float, ptr %19, align 4
  %29 = fcmp ogt float %28, 0.000000e+00
  %or.cond = select i1 %27, i1 true, i1 %29
  br i1 %or.cond, label %30, label %36

30:                                               ; preds = %24
  %31 = call noundef ptr @_ZNK3JPH18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEE10GetContextEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %32 = call i32 @_ZN3JPH16TransformedShape10sGetBodyIDEPKS0_(ptr noundef %31)
  store i32 %32, ptr %7, align 4, !tbaa !20
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 48
  %35 = load ptr, ptr %34, align 8
  call void %35(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(12) %7)
  br label %36

36:                                               ; preds = %24, %30
  %37 = getelementptr inbounds i8, ptr %2, i64 1
  %38 = load i8, ptr %37, align 1, !tbaa !21
  %39 = icmp eq i8 %38, 1
  br i1 %39, label %40, label %77

40:                                               ; preds = %36
  %41 = call noundef zeroext i1 @_ZNK3JPH18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEE14ShouldEarlyOutEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  br i1 %41, label %77, label %42

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store float 1.000000e+00, ptr %8, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %43 = call noundef float @_ZNK3JPH18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEE19GetEarlyOutFractionEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  store float %43, ptr %9, align 4, !tbaa !22
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %45 = load float, ptr %44, align 4, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  %46 = load float, ptr %19, align 4, !tbaa !8
  %47 = fsub float %46, %45
  %48 = fcmp olt float %47, 0.000000e+00
  br i1 %48, label %49, label %77

49:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #7
  %50 = getelementptr inbounds i8, ptr %1, i64 16
  %.sroa.09.0.copyload = load double, ptr %50, align 16
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 24
  %.sroa.210.0.copyload = load double, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !23
  %51 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %45, double %.sroa.09.0.copyload, double %.sroa.210.0.copyload)
  %52 = extractvalue { double, double } %51, 0
  %53 = extractvalue { double, double } %51, 1
  %54 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %1, double %52, double %53)
  %55 = extractvalue { double, double } %54, 0
  %56 = extractvalue { double, double } %54, 1
  %.sroa.06.0.copyload = load double, ptr %50, align 16
  %.sroa.2.0.copyload = load double, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !23
  %57 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %47, double %.sroa.06.0.copyload, double %.sroa.2.0.copyload)
  %58 = extractvalue { double, double } %57, 0
  %59 = extractvalue { double, double } %57, 1
  call void @_ZN3JPH7RayCastCI2NS_8RayCastTINS_4Vec3ENS_5Mat44ES0_EEES2_S2_(ptr noundef nonnull align 16 dereferenceable(32) %10, double %55, double %56, double %58, double %59)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  call void @_ZN3JPH13RayCastResultC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %11)
  %60 = getelementptr inbounds i8, ptr %11, i64 4
  store float 1.000000e+00, ptr %60, align 4, !tbaa !8
  %61 = load ptr, ptr %0, align 8, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %61, i64 128
  %63 = load ptr, ptr %62, align 8
  %64 = call noundef zeroext i1 %63(ptr noundef nonnull align 8 dereferenceable(44) %0, ptr noundef nonnull align 16 dereferenceable(32) %10, ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(12) %11)
  %65 = load float, ptr %60, align 4
  %66 = fcmp ogt float %65, 0.000000e+00
  %or.cond5 = select i1 %64, i1 %66, i1 false
  br i1 %or.cond5, label %67, label %76

67:                                               ; preds = %49
  %68 = load float, ptr %19, align 4, !tbaa !8
  %69 = fadd float %65, -1.000000e+00
  %70 = call float @llvm.fmuladd.f32(float %69, float %47, float %68)
  store float %70, ptr %60, align 4, !tbaa !8
  %71 = call noundef ptr @_ZNK3JPH18CollisionCollectorINS_13RayCastResultENS_31CollisionCollectorTraitsCastRayEE10GetContextEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %72 = call i32 @_ZN3JPH16TransformedShape10sGetBodyIDEPKS0_(ptr noundef %71)
  store i32 %72, ptr %11, align 4, !tbaa !20
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %73, i64 48
  %75 = load ptr, ptr %74, align 8
  call void %75(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(12) %11)
  br label %76

76:                                               ; preds = %67, %49
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  br label %77

77:                                               ; preds = %42, %76, %36, %40, %17
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #7
  br label %78

78:                                               ; preds = %6, %77
  ret void
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !13, i64 4}
!9 = !{!"_ZTSN3JPH20BroadPhaseCastResultE", !10, i64 0, !13, i64 4}
!10 = !{!"_ZTSN3JPH6BodyIDE", !11, i64 0}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"float", !12, i64 0}
!14 = !{!15, !17, i64 2}
!15 = !{!"_ZTSN3JPH15RayCastSettingsE", !16, i64 0, !16, i64 1, !17, i64 2}
!16 = !{!"_ZTSN3JPH13EBackFaceModeE", !12, i64 0}
!17 = !{!"bool", !12, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!11, !11, i64 0}
!21 = !{!15, !16, i64 1}
!22 = !{!13, !13, i64 0}
!23 = !{!12, !12, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass