; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Collision/Shape/TriangleShape.ll (ZN3JPH13TriangleShape9sRegisterEv)

; 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::Color" = type { %union.anon.17 }
%union.anon.17 = type { i32 }
%class.anon.18 = type { i8 }
%"class.JPH::ShapeFunctions" = type <{ ptr, %"class.JPH::Color", [4 x i8] }>

@_ZN3JPH5Color6sGreenE = external global %"class.JPH::Color", align 4
@_ZN3JPHL20sConvexSubShapeTypesE = external hidden constant [16 x i8], align 16

; 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: mustprogress uwtable
declare dso_local void @_ZN3JPH13TriangleShape24sCollideConvexVsTriangleEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE(ptr noundef, ptr noundef, double, double, double, double, ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(37), ptr noundef nonnull align 1, ptr noundef nonnull align 8 dereferenceable(12)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13TriangleShape24sCollideSphereVsTriangleEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE(ptr noundef, ptr noundef, double, double, double, double, ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(37), ptr noundef nonnull align 1, ptr noundef nonnull align 8 dereferenceable(12)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13TriangleShape21sCastConvexVsTriangleERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE(ptr noundef nonnull align 16 dereferenceable(144), ptr noundef nonnull align 16 dereferenceable(36), ptr noundef, double, double, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 1) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13TriangleShape21sCastSphereVsTriangleERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE(ptr noundef nonnull align 16 dereferenceable(144), ptr noundef nonnull align 16 dereferenceable(36), ptr noundef, double, double, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 1) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH13TriangleShape9sRegisterEv() #2 align 2 {
  %1 = alloca ptr, align 8
  %2 = alloca %class.anon.18, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #6
  %7 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN3JPH14ShapeFunctions4sGetENS_13EShapeSubTypeE(i8 noundef zeroext 2)
  store ptr %7, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #6
  %8 = call noundef ptr @"_ZZN3JPH13TriangleShape9sRegisterEvENK3$_0cvPFPNS_5ShapeEvEEv"(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %9 = load ptr, ptr %1, align 8, !tbaa !5
  %10 = getelementptr inbounds %"class.JPH::ShapeFunctions", ptr %9, i32 0, i32 0
  store ptr %8, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #6
  %11 = load ptr, ptr %1, align 8, !tbaa !5
  %12 = getelementptr inbounds %"class.JPH::ShapeFunctions", ptr %11, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 4 @_ZN3JPH5Color6sGreenE, i64 4, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store ptr @_ZN3JPHL20sConvexSubShapeTypesE, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store ptr @_ZN3JPHL20sConvexSubShapeTypesE, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store ptr getelementptr inbounds (i8, ptr @_ZN3JPHL20sConvexSubShapeTypesE, i64 16), ptr %5, align 8, !tbaa !5
  br label %13

13:                                               ; preds = %29, %0
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = icmp ne ptr %14, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %32

18:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #6
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = load i8, ptr %19, align 1, !tbaa !14
  store i8 %20, ptr %6, align 1, !tbaa !14
  %21 = load i8, ptr %6, align 1, !tbaa !14
  call void @_ZN3JPH17CollisionDispatch21sRegisterCollideShapeENS_13EShapeSubTypeES1_PFvPKNS_5ShapeES4_NS_4Vec3ES5_RKNS_5Mat44ES8_RKNS_17SubShapeIDCreatorESB_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterEE(i8 noundef zeroext %21, i8 noundef zeroext 2, ptr noundef @_ZN3JPH13TriangleShape24sCollideConvexVsTriangleEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE)
  %22 = load i8, ptr %6, align 1, !tbaa !14
  call void @_ZN3JPH17CollisionDispatch18sRegisterCastShapeENS_13EShapeSubTypeES1_PFvRKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESK_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEE(i8 noundef zeroext %22, i8 noundef zeroext 2, ptr noundef @_ZN3JPH13TriangleShape21sCastConvexVsTriangleERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE)
  %23 = load i8, ptr %6, align 1, !tbaa !14
  %24 = icmp ne i8 %23, 2
  br i1 %24, label %25, label %28

25:                                               ; preds = %18
  %26 = load i8, ptr %6, align 1, !tbaa !14
  call void @_ZN3JPH17CollisionDispatch21sRegisterCollideShapeENS_13EShapeSubTypeES1_PFvPKNS_5ShapeES4_NS_4Vec3ES5_RKNS_5Mat44ES8_RKNS_17SubShapeIDCreatorESB_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterEE(i8 noundef zeroext 2, i8 noundef zeroext %26, ptr noundef @_ZN3JPH17CollisionDispatch21sReversedCollideShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE)
  %27 = load i8, ptr %6, align 1, !tbaa !14
  call void @_ZN3JPH17CollisionDispatch18sRegisterCastShapeENS_13EShapeSubTypeES1_PFvRKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESK_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEE(i8 noundef zeroext 2, i8 noundef zeroext %27, ptr noundef @_ZN3JPH17CollisionDispatch18sReversedCastShapeERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE)
  br label %28

28:                                               ; preds = %25, %18
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  br label %29

29:                                               ; preds = %28
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %30, i32 1
  store ptr %31, ptr %4, align 8, !tbaa !5
  br label %13

32:                                               ; preds = %17
  call void @_ZN3JPH17CollisionDispatch21sRegisterCollideShapeENS_13EShapeSubTypeES1_PFvPKNS_5ShapeES4_NS_4Vec3ES5_RKNS_5Mat44ES8_RKNS_17SubShapeIDCreatorESB_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterEE(i8 noundef zeroext 0, i8 noundef zeroext 2, ptr noundef @_ZN3JPH13TriangleShape24sCollideSphereVsTriangleEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE)
  call void @_ZN3JPH17CollisionDispatch18sRegisterCastShapeENS_13EShapeSubTypeES1_PFvRKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESK_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEE(i8 noundef zeroext 0, i8 noundef zeroext 2, ptr noundef @_ZN3JPH13TriangleShape21sCastSphereVsTriangleERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE)
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZN3JPH14ShapeFunctions4sGetENS_13EShapeSubTypeE(i8 noundef zeroext) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @"_ZZN3JPH13TriangleShape9sRegisterEvENK3$_0cvPFPNS_5ShapeEvEEv"(ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH17CollisionDispatch21sRegisterCollideShapeENS_13EShapeSubTypeES1_PFvPKNS_5ShapeES4_NS_4Vec3ES5_RKNS_5Mat44ES8_RKNS_17SubShapeIDCreatorESB_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterEE(i8 noundef zeroext, i8 noundef zeroext, ptr noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH17CollisionDispatch18sRegisterCastShapeENS_13EShapeSubTypeES1_PFvRKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESK_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEE(i8 noundef zeroext, i8 noundef zeroext, ptr noundef) #4 align 2

declare void @_ZN3JPH17CollisionDispatch21sReversedCollideShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE(ptr noundef, ptr noundef, double, double, double, double, ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(37), ptr noundef nonnull align 1, ptr noundef nonnull align 8 dereferenceable(12)) #5

declare void @_ZN3JPH17CollisionDispatch18sReversedCastShapeERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE(ptr noundef nonnull align 16 dereferenceable(144), ptr noundef nonnull align 16 dereferenceable(36), ptr noundef, double, double, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 1) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN3JPH14ShapeFunctionsE", !6, i64 0, !11, i64 8}
!11 = !{!"_ZTSN3JPH5ColorE", !7, i64 0}
!12 = !{i64 0, i64 4, !13}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTSN3JPH13EShapeSubTypeE", !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::Color" = type { %union.anon.17 }
%union.anon.17 = type { i32 }
%class.anon.18 = type { i8 }

@_ZN3JPH5Color6sGreenE = external local_unnamed_addr global %"class.JPH::Color", align 4
@_ZN3JPHL20sConvexSubShapeTypesE = external hidden local_unnamed_addr constant [16 x i8], align 16

; 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 uwtable
declare dso_local void @_ZN3JPH13TriangleShape24sCollideConvexVsTriangleEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE(ptr noundef, ptr noundef, double, double, double, double, ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(37), ptr noundef nonnull align 1, ptr noundef nonnull align 8 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13TriangleShape24sCollideSphereVsTriangleEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE(ptr noundef, ptr noundef, double, double, double, double, ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(37), ptr noundef nonnull align 1, ptr noundef nonnull align 8 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13TriangleShape21sCastConvexVsTriangleERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE(ptr noundef nonnull align 16 dereferenceable(144), ptr noundef nonnull align 16 dereferenceable(36), ptr noundef, double, double, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 1) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13TriangleShape21sCastSphereVsTriangleERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE(ptr noundef nonnull align 16 dereferenceable(144), ptr noundef nonnull align 16 dereferenceable(36), ptr noundef, double, double, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 1) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3JPH13TriangleShape9sRegisterEv() local_unnamed_addr #2 align 2 {
  %1 = alloca %class.anon.18, align 1
  %2 = tail call noundef nonnull align 8 dereferenceable(12) ptr @_ZN3JPH14ShapeFunctions4sGetENS_13EShapeSubTypeE(i8 noundef zeroext 2)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %1) #5
  %3 = call noundef ptr @"_ZZN3JPH13TriangleShape9sRegisterEvENK3$_0cvPFPNS_5ShapeEvEEv"(ptr noundef nonnull align 1 dereferenceable(1) %1) #5
  store ptr %3, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %1) #5
  %4 = getelementptr inbounds i8, ptr %2, i64 8
  %5 = load i32, ptr @_ZN3JPH5Color6sGreenE, align 4, !tbaa !11
  store i32 %5, ptr %4, align 8, !tbaa !11
  br label %7

6:                                                ; preds = %10
  call void @_ZN3JPH17CollisionDispatch21sRegisterCollideShapeENS_13EShapeSubTypeES1_PFvPKNS_5ShapeES4_NS_4Vec3ES5_RKNS_5Mat44ES8_RKNS_17SubShapeIDCreatorESB_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterEE(i8 noundef zeroext 0, i8 noundef zeroext 2, ptr noundef nonnull @_ZN3JPH13TriangleShape24sCollideSphereVsTriangleEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE)
  call void @_ZN3JPH17CollisionDispatch18sRegisterCastShapeENS_13EShapeSubTypeES1_PFvRKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESK_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEE(i8 noundef zeroext 0, i8 noundef zeroext 2, ptr noundef nonnull @_ZN3JPH13TriangleShape21sCastSphereVsTriangleERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE)
  ret void

7:                                                ; preds = %0, %10
  %.0.idx12 = phi i64 [ 0, %0 ], [ %.0.add, %10 ]
  %.0.ptr = getelementptr inbounds i8, ptr @_ZN3JPHL20sConvexSubShapeTypesE, i64 %.0.idx12
  %8 = load i8, ptr %.0.ptr, align 1, !tbaa !12
  call void @_ZN3JPH17CollisionDispatch21sRegisterCollideShapeENS_13EShapeSubTypeES1_PFvPKNS_5ShapeES4_NS_4Vec3ES5_RKNS_5Mat44ES8_RKNS_17SubShapeIDCreatorESB_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterEE(i8 noundef zeroext %8, i8 noundef zeroext 2, ptr noundef nonnull @_ZN3JPH13TriangleShape24sCollideConvexVsTriangleEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE)
  call void @_ZN3JPH17CollisionDispatch18sRegisterCastShapeENS_13EShapeSubTypeES1_PFvRKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESK_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEE(i8 noundef zeroext %8, i8 noundef zeroext 2, ptr noundef nonnull @_ZN3JPH13TriangleShape21sCastConvexVsTriangleERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE)
  %.not11 = icmp eq i8 %8, 2
  br i1 %.not11, label %10, label %9

9:                                                ; preds = %7
  call void @_ZN3JPH17CollisionDispatch21sRegisterCollideShapeENS_13EShapeSubTypeES1_PFvPKNS_5ShapeES4_NS_4Vec3ES5_RKNS_5Mat44ES8_RKNS_17SubShapeIDCreatorESB_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterEE(i8 noundef zeroext 2, i8 noundef zeroext %8, ptr noundef nonnull @_ZN3JPH17CollisionDispatch21sReversedCollideShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE)
  call void @_ZN3JPH17CollisionDispatch18sRegisterCastShapeENS_13EShapeSubTypeES1_PFvRKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESK_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEE(i8 noundef zeroext 2, i8 noundef zeroext %8, ptr noundef nonnull @_ZN3JPH17CollisionDispatch18sReversedCastShapeERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE)
  br label %10

10:                                               ; preds = %9, %7
  %.0.add = add nuw nsw i64 %.0.idx12, 1
  %.not = icmp eq i64 %.0.add, 16
  br i1 %.not, label %6, label %7
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZN3JPH14ShapeFunctions4sGetENS_13EShapeSubTypeE(i8 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @"_ZZN3JPH13TriangleShape9sRegisterEvENK3$_0cvPFPNS_5ShapeEvEEv"(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH17CollisionDispatch21sRegisterCollideShapeENS_13EShapeSubTypeES1_PFvPKNS_5ShapeES4_NS_4Vec3ES5_RKNS_5Mat44ES8_RKNS_17SubShapeIDCreatorESB_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterEE(i8 noundef zeroext, i8 noundef zeroext, ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH17CollisionDispatch18sRegisterCastShapeENS_13EShapeSubTypeES1_PFvRKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESK_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEEE(i8 noundef zeroext, i8 noundef zeroext, ptr noundef) local_unnamed_addr #2 align 2

declare void @_ZN3JPH17CollisionDispatch21sReversedCollideShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE(ptr noundef, ptr noundef, double, double, double, double, ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(37), ptr noundef nonnull align 1, ptr noundef nonnull align 8 dereferenceable(12)) #4

declare void @_ZN3JPH17CollisionDispatch18sReversedCastShapeERKNS_9ShapeCastERKNS_17ShapeCastSettingsEPKNS_5ShapeENS_4Vec3ERKNS_11ShapeFilterERKNS_5Mat44ERKNS_17SubShapeIDCreatorESJ_RNS_18CollisionCollectorINS_15ShapeCastResultENS_33CollisionCollectorTraitsCastShapeEEE(ptr noundef nonnull align 16 dereferenceable(144), ptr noundef nonnull align 16 dereferenceable(36), ptr noundef, double, double, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 1) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 = { "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 = { 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, !7, i64 0}
!6 = !{!"_ZTSN3JPH14ShapeFunctionsE", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3JPH5ColorE", !8, i64 0}
!11 = !{!8, !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTSN3JPH13EShapeSubTypeE", !8, i64 0}


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