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

; 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::Result" = type <{ %union.anon.2, i8, [7 x i8] }>
%union.anon.2 = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider", i64, %union.anon.3 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.3 = type { i64, [8 x i8] }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::CylinderShapeSettings" = type { %"class.JPH::ConvexShapeSettings.base", float, float, float }
%"class.JPH::ConvexShapeSettings.base" = type <{ %"class.JPH::ShapeSettings", %"class.JPH::RefConst", float }>
%"class.JPH::ShapeSettings" = type { %"class.JPH::SerializableObject", %"class.JPH::RefTarget", i64, %"class.JPH::Result" }
%"class.JPH::SerializableObject" = type { ptr }
%"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::TaperedCylinderShapeSettings" = type { %"class.JPH::ConvexShapeSettings.base", float, float, float, float, [4 x i8] }
%"class.JPH::ConvexShapeSettings" = type <{ %"class.JPH::ShapeSettings", %"class.JPH::RefConst", float, [4 x i8] }>

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH28TaperedCylinderShapeSettings6CreateEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Result") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.JPH::Ref", align 8
  %6 = alloca %"class.JPH::CylinderShapeSettings", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %4, align 8
  %10 = getelementptr inbounds %"class.JPH::ShapeSettings", ptr %9, i32 0, i32 3
  %11 = call noundef zeroext i1 @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(33) %10)
  br i1 %11, label %12, label %66

12:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  call void @_ZN3JPH3RefINS_5ShapeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %13 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %9, i32 0, i32 2
  %14 = load float, ptr %13, align 8, !tbaa !9
  %15 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %9, i32 0, i32 3
  %16 = load float, ptr %15, align 4, !tbaa !23
  %17 = fcmp oeq float %14, %16
  br i1 %17, label %18, label %51

18:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 88, ptr %6) #8
  invoke void @_ZN3JPH21CylinderShapeSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %6)
          to label %19 unwind label %37

19:                                               ; preds = %18
  %20 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %9, i32 0, i32 1
  %21 = load float, ptr %20, align 4, !tbaa !24
  %22 = getelementptr inbounds %"class.JPH::CylinderShapeSettings", ptr %6, i32 0, i32 1
  store float %21, ptr %22, align 4, !tbaa !25
  %23 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %9, i32 0, i32 2
  %24 = load float, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds %"class.JPH::CylinderShapeSettings", ptr %6, i32 0, i32 2
  store float %24, ptr %25, align 8, !tbaa !27
  %26 = getelementptr inbounds %"class.JPH::ConvexShapeSettings", ptr %9, i32 0, i32 1
  %27 = getelementptr inbounds %"class.JPH::ConvexShapeSettings", ptr %6, i32 0, i32 1
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH8RefConstINS_15PhysicsMaterialEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %29 unwind label %41

29:                                               ; preds = %19
  %30 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %9, i32 0, i32 4
  %31 = load float, ptr %30, align 8, !tbaa !28
  %32 = getelementptr inbounds %"class.JPH::CylinderShapeSettings", ptr %6, i32 0, i32 3
  store float %31, ptr %32, align 4, !tbaa !29
  %33 = invoke noundef ptr @_ZN3JPH13CylinderShapenwEm(i64 noundef 56)
          to label %34 unwind label %41

34:                                               ; preds = %29
  %35 = getelementptr inbounds %"class.JPH::ShapeSettings", ptr %9, i32 0, i32 3
  invoke void @_ZN3JPH13CylinderShapeC1ERKNS_21CylinderShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr noundef nonnull align 8 dereferenceable(56) %33, ptr noundef nonnull align 8 dereferenceable(88) %6, ptr noundef nonnull align 8 dereferenceable(33) %35)
          to label %36 unwind label %45

36:                                               ; preds = %34
  call void @_ZN3JPH19ConvexShapeSettingsD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %6) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr %6) #8
  br label %64

37:                                               ; preds = %18
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %7, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %8, align 4
  br label %50

41:                                               ; preds = %29, %19
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %7, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %8, align 4
  br label %49

45:                                               ; preds = %34
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %7, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %8, align 4
  call void @_ZN3JPH13CylinderShapedlEPv(ptr noundef %33) #8
  br label %49

49:                                               ; preds = %45, %41
  call void @_ZN3JPH19ConvexShapeSettingsD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %6) #8
  br label %50

50:                                               ; preds = %49, %37
  call void @llvm.lifetime.end.p0(i64 88, ptr %6) #8
  br label %65

51:                                               ; preds = %12
  %52 = invoke noundef ptr @_ZN3JPH20TaperedCylinderShapenwEm(i64 noundef 64)
          to label %53 unwind label %56

53:                                               ; preds = %51
  %54 = getelementptr inbounds %"class.JPH::ShapeSettings", ptr %9, i32 0, i32 3
  invoke void @_ZN3JPH20TaperedCylinderShapeC1ERKNS_28TaperedCylinderShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr noundef nonnull align 8 dereferenceable(64) %52, ptr noundef nonnull align 8 dereferenceable(96) %9, ptr noundef nonnull align 8 dereferenceable(33) %54)
          to label %55 unwind label %60

55:                                               ; preds = %53
  br label %64

56:                                               ; preds = %51
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %7, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %8, align 4
  br label %65

60:                                               ; preds = %53
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %7, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %8, align 4
  call void @_ZN3JPH20TaperedCylinderShapedlEPv(ptr noundef %52) #8
  br label %65

64:                                               ; preds = %55, %36
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %66

65:                                               ; preds = %60, %56, %50
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %68

66:                                               ; preds = %64, %2
  %67 = getelementptr inbounds %"class.JPH::ShapeSettings", ptr %9, i32 0, i32 3
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %67)
  ret void

68:                                               ; preds = %65
  %69 = load ptr, ptr %7, align 8
  %70 = load i32, ptr %8, align 4
  %71 = insertvalue { ptr, i32 } poison, ptr %69, 0
  %72 = insertvalue { ptr, i32 } %71, i32 %70, 1
  resume { ptr, i32 } %72
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH21CylinderShapeSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #1 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH13CylinderShapenwEm(i64 noundef) #5 align 2

declare void @_ZN3JPH13CylinderShapeC1ERKNS_21CylinderShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #6

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH13CylinderShapedlEPv(ptr noundef) #7 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH20TaperedCylinderShapenwEm(i64 noundef) #5 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20TaperedCylinderShapedlEPv(ptr noundef) #7 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #1 align 2

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

declare void @_ZN3JPH20TaperedCylinderShapeC1ERKNS_28TaperedCylinderShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr, ptr, ptr)

attributes #0 = { 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 = { 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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !22, i64 80}
!10 = !{!"_ZTSN3JPH28TaperedCylinderShapeSettingsE", !11, i64 0, !22, i64 76, !22, i64 80, !22, i64 84, !22, i64 88}
!11 = !{!"_ZTSN3JPH19ConvexShapeSettingsE", !12, i64 0, !21, i64 64, !22, i64 72}
!12 = !{!"_ZTSN3JPH13ShapeSettingsE", !13, i64 0, !14, i64 8, !18, i64 16, !19, i64 24}
!13 = !{!"_ZTSN3JPH18SerializableObjectE"}
!14 = !{!"_ZTSN3JPH9RefTargetINS_13ShapeSettingsEEE", !15, i64 0}
!15 = !{!"_ZTSSt6atomicIjE", !16, i64 0}
!16 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEEE", !7, i64 0, !20, i64 32}
!20 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEE6EStateE", !7, i64 0}
!21 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !6, i64 0}
!22 = !{!"float", !7, i64 0}
!23 = !{!10, !22, i64 84}
!24 = !{!10, !22, i64 76}
!25 = !{!26, !22, i64 76}
!26 = !{!"_ZTSN3JPH21CylinderShapeSettingsE", !11, i64 0, !22, i64 76, !22, i64 80, !22, i64 84}
!27 = !{!26, !22, i64 80}
!28 = !{!10, !22, i64 88}
!29 = !{!26, !22, i64 84}


; 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::Result" = type <{ %union.anon.2, i8, [7 x i8] }>
%union.anon.2 = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider", i64, %union.anon.3 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.3 = type { i64, [8 x i8] }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::CylinderShapeSettings" = type { %"class.JPH::ConvexShapeSettings.base", float, float, float }
%"class.JPH::ConvexShapeSettings.base" = type <{ %"class.JPH::ShapeSettings", %"class.JPH::RefConst", float }>
%"class.JPH::ShapeSettings" = type { %"class.JPH::SerializableObject", %"class.JPH::RefTarget", i64, %"class.JPH::Result" }
%"class.JPH::SerializableObject" = type { ptr }
%"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 }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH28TaperedCylinderShapeSettings6CreateEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Result") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.JPH::Ref", align 8
  %4 = alloca %"class.JPH::CylinderShapeSettings", align 8
  %5 = getelementptr inbounds i8, ptr %1, i64 24
  %6 = tail call noundef zeroext i1 @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
  br i1 %6, label %7, label %45

7:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @_ZN3JPH3RefINS_5ShapeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %8 = getelementptr inbounds i8, ptr %1, i64 80
  %9 = load float, ptr %8, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %1, i64 84
  %11 = load float, ptr %10, align 4, !tbaa !22
  %12 = fcmp oeq float %9, %11
  br i1 %12, label %13, label %36

13:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %4) #8
  invoke void @_ZN3JPH21CylinderShapeSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %4)
          to label %14 unwind label %28

14:                                               ; preds = %13
  %15 = getelementptr inbounds i8, ptr %1, i64 76
  %16 = getelementptr inbounds i8, ptr %4, i64 76
  %17 = load <2 x float>, ptr %15, align 4, !tbaa !23
  store <2 x float> %17, ptr %16, align 4, !tbaa !23
  %18 = getelementptr inbounds i8, ptr %1, i64 64
  %19 = getelementptr inbounds i8, ptr %4, i64 64
  %20 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH8RefConstINS_15PhysicsMaterialEEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %21 unwind label %30

21:                                               ; preds = %14
  %22 = getelementptr inbounds i8, ptr %1, i64 88
  %23 = load float, ptr %22, align 8, !tbaa !24
  %24 = getelementptr inbounds i8, ptr %4, i64 84
  store float %23, ptr %24, align 4, !tbaa !25
  %25 = invoke noundef ptr @_ZN3JPH13CylinderShapenwEm(i64 noundef 56)
          to label %26 unwind label %30

26:                                               ; preds = %21
  invoke void @_ZN3JPH13CylinderShapeC1ERKNS_21CylinderShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 8 dereferenceable(88) %4, ptr noundef nonnull align 8 dereferenceable(33) %5)
          to label %27 unwind label %32

27:                                               ; preds = %26
  call void @_ZN3JPH19ConvexShapeSettingsD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %4) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %4) #8
  br label %43

28:                                               ; preds = %13
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %35

30:                                               ; preds = %21, %14
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %34

32:                                               ; preds = %26
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH13CylinderShapedlEPv(ptr noundef %25) #8
  br label %34

34:                                               ; preds = %32, %30
  %.pn = phi { ptr, i32 } [ %33, %32 ], [ %31, %30 ]
  call void @_ZN3JPH19ConvexShapeSettingsD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %4) #8
  br label %35

35:                                               ; preds = %34, %28
  %.pn.pn = phi { ptr, i32 } [ %.pn, %34 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %4) #8
  br label %44

36:                                               ; preds = %7
  %37 = invoke noundef ptr @_ZN3JPH20TaperedCylinderShapenwEm(i64 noundef 64)
          to label %38 unwind label %39

38:                                               ; preds = %36
  invoke void @_ZN3JPH20TaperedCylinderShapeC1ERKNS_28TaperedCylinderShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr noundef nonnull align 8 dereferenceable(64) %37, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(33) %5)
          to label %43 unwind label %41

39:                                               ; preds = %36
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %44

41:                                               ; preds = %38
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH20TaperedCylinderShapedlEPv(ptr noundef %37) #8
  br label %44

43:                                               ; preds = %38, %27
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %45

44:                                               ; preds = %41, %39, %35
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %35 ], [ %42, %41 ], [ %40, %39 ]
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn.pn.pn

45:                                               ; preds = %43, %2
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %5)
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH21CylinderShapeSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #1 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH13CylinderShapenwEm(i64 noundef) local_unnamed_addr #5 align 2

declare void @_ZN3JPH13CylinderShapeC1ERKNS_21CylinderShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #6

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH13CylinderShapedlEPv(ptr noundef) local_unnamed_addr #7 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH20TaperedCylinderShapenwEm(i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20TaperedCylinderShapedlEPv(ptr noundef) local_unnamed_addr #7 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #1 align 2

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

declare void @_ZN3JPH20TaperedCylinderShapeC1ERKNS_28TaperedCylinderShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr, ptr, ptr) local_unnamed_addr

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 = { 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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !21, i64 80}
!6 = !{!"_ZTSN3JPH28TaperedCylinderShapeSettingsE", !7, i64 0, !21, i64 76, !21, i64 80, !21, i64 84, !21, i64 88}
!7 = !{!"_ZTSN3JPH19ConvexShapeSettingsE", !8, i64 0, !19, i64 64, !21, i64 72}
!8 = !{!"_ZTSN3JPH13ShapeSettingsE", !9, i64 0, !10, i64 8, !16, i64 16, !17, i64 24}
!9 = !{!"_ZTSN3JPH18SerializableObjectE"}
!10 = !{!"_ZTSN3JPH9RefTargetINS_13ShapeSettingsEEE", !11, i64 0}
!11 = !{!"_ZTSSt6atomicIjE", !12, i64 0}
!12 = !{!"_ZTSSt13__atomic_baseIjE", !13, i64 0}
!13 = !{!"int", !14, i64 0}
!14 = !{!"omnipotent char", !15, i64 0}
!15 = !{!"Simple C++ TBAA"}
!16 = !{!"long", !14, i64 0}
!17 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEEE", !14, i64 0, !18, i64 32}
!18 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEE6EStateE", !14, i64 0}
!19 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !20, i64 0}
!20 = !{!"any pointer", !14, i64 0}
!21 = !{!"float", !14, i64 0}
!22 = !{!6, !21, i64 84}
!23 = !{!21, !21, i64 0}
!24 = !{!6, !21, i64 88}
!25 = !{!26, !21, i64 84}
!26 = !{!"_ZTSN3JPH21CylinderShapeSettingsE", !7, i64 0, !21, i64 76, !21, i64 80, !21, i64 84}


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