; 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::Ref" = type { ptr }
%"class.JPH::TaperedCylinderShape" = type { %"class.JPH::ConvexShape.base", float, float, float, float, float }
%"class.JPH::ConvexShape.base" = type <{ %"class.JPH::Shape.base", [6 x i8], %"class.JPH::RefConst", float }>
%"class.JPH::Shape.base" = type <{ ptr, %"class.JPH::RefTarget.4", [4 x i8], i64, i8, i8 }>
%"class.JPH::RefTarget.4" = 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.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" }
%"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] }

@_ZTVN3JPH20TaperedCylinderShapeE = external dso_local unnamed_addr constant { [38 x ptr] }, align 8
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [49 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH20TaperedCylinderShapeC2ERKNS_28TaperedCylinderShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(33) %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca %"class.JPH::Ref", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3JPH11ConvexShapeC2ENS_13EShapeSubTypeERKNS_19ConvexShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr noundef nonnull align 8 dereferenceable(44) %16, i8 noundef zeroext 32, ptr noundef nonnull align 8 dereferenceable(76) %17, ptr noundef nonnull align 8 dereferenceable(33) %18)
  store ptr getelementptr inbounds inrange(-16, 288) ({ [38 x ptr] }, ptr @_ZTVN3JPH20TaperedCylinderShapeE, i32 0, i32 0, i32 2), ptr %16, align 8, !tbaa !9
  %19 = getelementptr inbounds %"class.JPH::TaperedCylinderShape", ptr %16, i32 0, i32 1
  store float 0.000000e+00, ptr %19, align 4, !tbaa !11
  %20 = getelementptr inbounds %"class.JPH::TaperedCylinderShape", ptr %16, i32 0, i32 2
  store float 0.000000e+00, ptr %20, align 8, !tbaa !24
  %21 = getelementptr inbounds %"class.JPH::TaperedCylinderShape", ptr %16, i32 0, i32 3
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %22, i32 0, i32 2
  %24 = load float, ptr %23, align 8, !tbaa !25
  store float %24, ptr %21, align 4, !tbaa !33
  %25 = getelementptr inbounds %"class.JPH::TaperedCylinderShape", ptr %16, i32 0, i32 4
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %26, i32 0, i32 3
  %28 = load float, ptr %27, align 4, !tbaa !34
  store float %28, ptr %25, align 8, !tbaa !35
  %29 = getelementptr inbounds %"class.JPH::TaperedCylinderShape", ptr %16, i32 0, i32 5
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %30, i32 0, i32 4
  %32 = load float, ptr %31, align 8, !tbaa !36
  store float %32, ptr %29, align 4, !tbaa !37
  %33 = getelementptr inbounds %"class.JPH::TaperedCylinderShape", ptr %16, i32 0, i32 3
  %34 = load float, ptr %33, align 4, !tbaa !33
  %35 = fcmp olt float %34, 0.000000e+00
  br i1 %35, label %36, label %43

36:                                               ; preds = %3
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %37, ptr noundef @.str.2)
          to label %38 unwind label %39

38:                                               ; preds = %36
  br label %131

39:                                               ; preds = %85, %74, %63, %55, %47, %36
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %7, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %8, align 4
  br label %151

43:                                               ; preds = %3
  %44 = getelementptr inbounds %"class.JPH::TaperedCylinderShape", ptr %16, i32 0, i32 4
  %45 = load float, ptr %44, align 8, !tbaa !35
  %46 = fcmp olt float %45, 0.000000e+00
  br i1 %46, label %47, label %50

47:                                               ; preds = %43
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %48, ptr noundef @.str.3)
          to label %49 unwind label %39

49:                                               ; preds = %47
  br label %131

50:                                               ; preds = %43
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %51, i32 0, i32 1
  %53 = load float, ptr %52, align 4, !tbaa !38
  %54 = fcmp ole float %53, 0.000000e+00
  br i1 %54, label %55, label %58

55:                                               ; preds = %50
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %56, ptr noundef @.str.4)
          to label %57 unwind label %39

57:                                               ; preds = %55
  br label %131

58:                                               ; preds = %50
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %59, i32 0, i32 4
  %61 = load float, ptr %60, align 8, !tbaa !36
  %62 = fcmp olt float %61, 0.000000e+00
  br i1 %62, label %63, label %66

63:                                               ; preds = %58
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %64, ptr noundef @.str.5)
          to label %65 unwind label %39

65:                                               ; preds = %63
  br label %131

66:                                               ; preds = %58
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %67, i32 0, i32 2
  %69 = load float, ptr %68, align 8, !tbaa !25
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %70, i32 0, i32 4
  %72 = load float, ptr %71, align 8, !tbaa !36
  %73 = fcmp olt float %69, %72
  br i1 %73, label %74, label %77

74:                                               ; preds = %66
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %75, ptr noundef @.str.6)
          to label %76 unwind label %39

76:                                               ; preds = %74
  br label %131

77:                                               ; preds = %66
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %78, i32 0, i32 3
  %80 = load float, ptr %79, align 4, !tbaa !34
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %81, i32 0, i32 4
  %83 = load float, ptr %82, align 8, !tbaa !36
  %84 = fcmp olt float %80, %83
  br i1 %84, label %85, label %88

85:                                               ; preds = %77
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %86, ptr noundef @.str.7)
          to label %87 unwind label %39

87:                                               ; preds = %85
  br label %131

88:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %"class.JPH::TaperedCylinderShapeSettings", ptr %89, i32 0, i32 1
  %91 = load float, ptr %90, align 4, !tbaa !38
  %92 = fmul float 2.000000e+00, %91
  store float %92, ptr %9, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %93 = getelementptr inbounds %"class.JPH::TaperedCylinderShape", ptr %16, i32 0, i32 3
  %94 = load float, ptr %93, align 4, !tbaa !33
  store float %94, ptr %10, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %95 = load float, ptr %10, align 4, !tbaa !39
  %96 = invoke noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef %95)
          to label %97 unwind label %132

97:                                               ; preds = %88
  store float %96, ptr %11, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %98 = getelementptr inbounds %"class.JPH::TaperedCylinderShape", ptr %16, i32 0, i32 4
  %99 = load float, ptr %98, align 8, !tbaa !35
  store float %99, ptr %12, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %100 = load float, ptr %12, align 4, !tbaa !39
  %101 = invoke noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef %100)
          to label %102 unwind label %136

102:                                              ; preds = %97
  store float %101, ptr %13, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %103 = load float, ptr %9, align 4, !tbaa !39
  %104 = load float, ptr %11, align 4, !tbaa !39
  %105 = load float, ptr %12, align 4, !tbaa !39
  %106 = fmul float 2.000000e+00, %105
  %107 = load float, ptr %10, align 4, !tbaa !39
  %108 = fmul float %106, %107
  %109 = call float @llvm.fmuladd.f32(float 3.000000e+00, float %104, float %108)
  %110 = load float, ptr %13, align 4, !tbaa !39
  %111 = fadd float %109, %110
  %112 = fmul float %103, %111
  %113 = load float, ptr %11, align 4, !tbaa !39
  %114 = load float, ptr %12, align 4, !tbaa !39
  %115 = load float, ptr %10, align 4, !tbaa !39
  %116 = call float @llvm.fmuladd.f32(float %114, float %115, float %113)
  %117 = load float, ptr %13, align 4, !tbaa !39
  %118 = fadd float %116, %117
  %119 = fmul float 4.000000e+00, %118
  %120 = fdiv float %112, %119
  store float %120, ptr %14, align 4, !tbaa !39
  %121 = load float, ptr %9, align 4, !tbaa !39
  %122 = load float, ptr %14, align 4, !tbaa !39
  %123 = fsub float %121, %122
  %124 = getelementptr inbounds %"class.JPH::TaperedCylinderShape", ptr %16, i32 0, i32 1
  store float %123, ptr %124, align 4, !tbaa !11
  %125 = load float, ptr %14, align 4, !tbaa !39
  %126 = fneg float %125
  %127 = getelementptr inbounds %"class.JPH::TaperedCylinderShape", ptr %16, i32 0, i32 2
  store float %126, ptr %127, align 8, !tbaa !24
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  invoke void @_ZN3JPH3RefINS_5ShapeEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef %16)
          to label %129 unwind label %140

129:                                              ; preds = %102
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE3SetEOS3_(ptr noundef nonnull align 8 dereferenceable(33) %128, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %130 unwind label %144

130:                                              ; preds = %129
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %131

131:                                              ; preds = %130, %87, %76, %65, %57, %49, %38
  ret void

132:                                              ; preds = %88
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %7, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %8, align 4
  br label %150

136:                                              ; preds = %97
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %7, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %8, align 4
  br label %149

140:                                              ; preds = %102
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %7, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %8, align 4
  br label %148

144:                                              ; preds = %129
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %7, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %8, align 4
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br label %148

148:                                              ; preds = %144, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %149

149:                                              ; preds = %148, %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %150

150:                                              ; preds = %149, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %151

151:                                              ; preds = %150, %39
  call void @_ZN3JPH11ConvexShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(44) %16) #7
  br label %152

152:                                              ; preds = %151
  %153 = load ptr, ptr %7, align 8
  %154 = load i32, ptr %8, align 4
  %155 = insertvalue { ptr, i32 } poison, ptr %153, 0
  %156 = insertvalue { ptr, i32 } %155, i32 %154, 1
  resume { ptr, i32 } %156
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH11ConvexShapeC2ENS_13EShapeSubTypeERKNS_19ConvexShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr noundef nonnull align 8 dereferenceable(44), i8 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(76), ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #2 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE3SetEOS3_(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

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

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

attributes #0 = { 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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 #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 = !{!"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, !23, i64 44}
!12 = !{!"_ZTSN3JPH20TaperedCylinderShapeE", !13, i64 0, !23, i64 44, !23, i64 48, !23, i64 52, !23, i64 56, !23, i64 60}
!13 = !{!"_ZTSN3JPH11ConvexShapeE", !14, i64 0, !22, i64 32, !23, i64 40}
!14 = !{!"_ZTSN3JPH5ShapeE", !15, i64 8, !19, i64 16, !20, i64 24, !21, i64 25}
!15 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !16, i64 0}
!16 = !{!"_ZTSSt6atomicIjE", !17, i64 0}
!17 = !{!"_ZTSSt13__atomic_baseIjE", !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTSN3JPH10EShapeTypeE", !7, i64 0}
!21 = !{!"_ZTSN3JPH13EShapeSubTypeE", !7, i64 0}
!22 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !6, i64 0}
!23 = !{!"float", !7, i64 0}
!24 = !{!12, !23, i64 48}
!25 = !{!26, !23, i64 80}
!26 = !{!"_ZTSN3JPH28TaperedCylinderShapeSettingsE", !27, i64 0, !23, i64 76, !23, i64 80, !23, i64 84, !23, i64 88}
!27 = !{!"_ZTSN3JPH19ConvexShapeSettingsE", !28, i64 0, !22, i64 64, !23, i64 72}
!28 = !{!"_ZTSN3JPH13ShapeSettingsE", !29, i64 0, !30, i64 8, !19, i64 16, !31, i64 24}
!29 = !{!"_ZTSN3JPH18SerializableObjectE"}
!30 = !{!"_ZTSN3JPH9RefTargetINS_13ShapeSettingsEEE", !16, i64 0}
!31 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEEE", !7, i64 0, !32, i64 32}
!32 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEE6EStateE", !7, i64 0}
!33 = !{!12, !23, i64 52}
!34 = !{!26, !23, i64 84}
!35 = !{!12, !23, i64 56}
!36 = !{!26, !23, i64 88}
!37 = !{!12, !23, i64 60}
!38 = !{!26, !23, i64 76}
!39 = !{!23, !23, 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::Ref" = type { ptr }

@_ZTVN3JPH20TaperedCylinderShapeE = external dso_local unnamed_addr constant { [38 x ptr] }, align 8
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [49 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH20TaperedCylinderShapeC2ERKNS_28TaperedCylinderShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(33) %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.JPH::Ref", align 8
  tail call void @_ZN3JPH11ConvexShapeC2ENS_13EShapeSubTypeERKNS_19ConvexShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr noundef nonnull align 8 dereferenceable(44) %0, i8 noundef zeroext 32, ptr noundef nonnull align 8 dereferenceable(76) %1, ptr noundef nonnull align 8 dereferenceable(33) %2)
  store ptr getelementptr inbounds inrange(-16, 288) (i8, ptr @_ZTVN3JPH20TaperedCylinderShapeE, i64 16), ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 44
  %6 = getelementptr inbounds i8, ptr %0, i64 48
  store <2 x float> zeroinitializer, ptr %5, align 4, !tbaa !8
  %7 = getelementptr inbounds i8, ptr %0, i64 52
  %8 = getelementptr inbounds i8, ptr %1, i64 80
  %9 = getelementptr inbounds i8, ptr %0, i64 56
  %10 = load <2 x float>, ptr %8, align 8, !tbaa !8
  store <2 x float> %10, ptr %7, align 4, !tbaa !8
  %11 = getelementptr inbounds i8, ptr %0, i64 60
  %12 = getelementptr inbounds i8, ptr %1, i64 88
  %13 = load float, ptr %12, align 8, !tbaa !11
  store float %13, ptr %11, align 4, !tbaa !25
  %14 = extractelement <2 x float> %10, i64 0
  %15 = fcmp olt float %14, 0.000000e+00
  br i1 %15, label %.invoke, label %18

16:                                               ; preds = %.invoke
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %52

18:                                               ; preds = %3
  %19 = extractelement <2 x float> %10, i64 1
  %20 = fcmp olt float %19, 0.000000e+00
  br i1 %20, label %.invoke, label %21

21:                                               ; preds = %18
  %22 = getelementptr inbounds i8, ptr %1, i64 76
  %23 = load float, ptr %22, align 4, !tbaa !32
  %24 = fcmp ugt float %23, 0.000000e+00
  br i1 %24, label %25, label %.invoke

25:                                               ; preds = %21
  %26 = fcmp olt float %13, 0.000000e+00
  br i1 %26, label %.invoke, label %27

27:                                               ; preds = %25
  %28 = fcmp olt float %14, %13
  br i1 %28, label %.invoke, label %29

29:                                               ; preds = %27
  %30 = fcmp olt float %19, %13
  br i1 %30, label %.invoke, label %32

.invoke:                                          ; preds = %3, %29, %27, %25, %21, %18
  %31 = phi ptr [ @.str.3, %18 ], [ @.str.4, %21 ], [ @.str.5, %25 ], [ @.str.6, %27 ], [ @.str.7, %29 ], [ @.str.2, %3 ]
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %2, ptr noundef nonnull %31)
          to label %49 unwind label %16

32:                                               ; preds = %29
  %33 = fmul float %23, 2.000000e+00
  %34 = tail call noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef %14)
  %35 = load float, ptr %9, align 8, !tbaa !33
  %36 = tail call noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef %35)
  %37 = fmul float %35, 2.000000e+00
  %38 = fmul float %14, %37
  %39 = tail call float @llvm.fmuladd.f32(float %34, float 3.000000e+00, float %38)
  %40 = fadd float %36, %39
  %41 = fmul float %33, %40
  %42 = tail call float @llvm.fmuladd.f32(float %35, float %14, float %34)
  %43 = fadd float %42, %36
  %44 = fmul float %43, 4.000000e+00
  %45 = fdiv float %41, %44
  %46 = fsub float %33, %45
  store float %46, ptr %5, align 4, !tbaa !34
  %47 = fneg float %45
  store float %47, ptr %6, align 8, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  invoke void @_ZN3JPH3RefINS_5ShapeEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %0)
          to label %48 unwind label %50

48:                                               ; preds = %32
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE3SetEOS3_(ptr noundef nonnull align 8 dereferenceable(33) %2, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %49

49:                                               ; preds = %.invoke, %48
  ret void

50:                                               ; preds = %32
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %52

52:                                               ; preds = %50, %16
  %.pn = phi { ptr, i32 } [ %17, %16 ], [ %51, %50 ]
  call void @_ZN3JPH11ConvexShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(44) %0) #7
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH11ConvexShapeC2ENS_13EShapeSubTypeERKNS_19ConvexShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr noundef nonnull align 8 dereferenceable(44), i8 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(76), ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #2 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3JPH6SquareIfEET_S1_(float noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE3SetEOS3_(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

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

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

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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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 #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, !9, i64 0}
!9 = !{!"float", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !9, i64 88}
!12 = !{!"_ZTSN3JPH28TaperedCylinderShapeSettingsE", !13, i64 0, !9, i64 76, !9, i64 80, !9, i64 84, !9, i64 88}
!13 = !{!"_ZTSN3JPH19ConvexShapeSettingsE", !14, i64 0, !23, i64 64, !9, i64 72}
!14 = !{!"_ZTSN3JPH13ShapeSettingsE", !15, i64 0, !16, i64 8, !20, i64 16, !21, i64 24}
!15 = !{!"_ZTSN3JPH18SerializableObjectE"}
!16 = !{!"_ZTSN3JPH9RefTargetINS_13ShapeSettingsEEE", !17, i64 0}
!17 = !{!"_ZTSSt6atomicIjE", !18, i64 0}
!18 = !{!"_ZTSSt13__atomic_baseIjE", !19, i64 0}
!19 = !{!"int", !10, i64 0}
!20 = !{!"long", !10, i64 0}
!21 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEEE", !10, i64 0, !22, i64 32}
!22 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEE6EStateE", !10, i64 0}
!23 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !24, i64 0}
!24 = !{!"any pointer", !10, i64 0}
!25 = !{!26, !9, i64 60}
!26 = !{!"_ZTSN3JPH20TaperedCylinderShapeE", !27, i64 0, !9, i64 44, !9, i64 48, !9, i64 52, !9, i64 56, !9, i64 60}
!27 = !{!"_ZTSN3JPH11ConvexShapeE", !28, i64 0, !23, i64 32, !9, i64 40}
!28 = !{!"_ZTSN3JPH5ShapeE", !29, i64 8, !20, i64 16, !30, i64 24, !31, i64 25}
!29 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !17, i64 0}
!30 = !{!"_ZTSN3JPH10EShapeTypeE", !10, i64 0}
!31 = !{!"_ZTSN3JPH13EShapeSubTypeE", !10, i64 0}
!32 = !{!12, !9, i64 76}
!33 = !{!26, !9, i64 56}
!34 = !{!26, !9, i64 44}
!35 = !{!26, !9, i64 48}


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