; LLVM IR from vectozavr/3dzavr :: engine/components/physics (RigidObject)

; 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"

%struct.SupportPoint = type { %class.Vec3D, %class.Vec3D, %class.Vec3D }
%class.Vec3D = type { %"struct.std::array.3" }
%"struct.std::array.3" = type { [3 x double] }
%struct.NextSimplex = type <{ %struct.Simplex, %class.Vec3D, i8, [7 x i8] }>
%struct.Simplex = type { %"class.std::__cxx11::list" }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<SupportPoint, std::allocator<SupportPoint>>::_List_impl" }
%"struct.std::__cxx11::_List_base<SupportPoint, std::allocator<SupportPoint>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"struct.std::pair" = type { i8, %struct.Simplex }
%class.RigidObject = type { %class.Component, %class.Vec3D, %class.Vec3D, double, double, double, %class.Vec3D, %class.Matrix3x3, %class.Matrix3x3, double, double, i8, %class.HitBox, i8, i8, %class.Vec3D, %"class.std::function" }
%class.Component = type { ptr, ptr }
%class.Matrix3x3 = type { %"struct.std::array.9" }
%"struct.std::array.9" = type { [3 x %"struct.std::array.3"] }
%class.HitBox = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Vec3D, std::allocator<Vec3D>>::_Vector_impl" }
%"struct.std::_Vector_base<Vec3D, std::allocator<Vec3D>>::_Vector_impl" = type { %"struct.std::_Vector_base<Vec3D, std::allocator<Vec3D>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Vec3D, std::allocator<Vec3D>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

; 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 @_ZN5Vec3DC2Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #1 align 2

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

; 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) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11RigidObject7supportERKSt10shared_ptrIS_ERK5Vec3D(ptr dead_on_unwind noalias writable sret(%struct.SupportPoint) align 8, ptr noundef nonnull align 8 dereferenceable(368), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessI11RigidObjectLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DngEv(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11RigidObject11nextSimplexERK7Simplex(ptr dead_on_unwind noalias writable sret(%struct.NextSimplex) align 8, ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11RigidObject17checkGJKCollisionERKSt10shared_ptrIS_E(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 8 dereferenceable(368) %1, ptr noundef nonnull align 8 dereferenceable(16) %2) #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.SupportPoint, align 8
  %8 = alloca %class.Vec3D, align 8
  %9 = alloca %struct.Simplex, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %class.Vec3D, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %struct.SupportPoint, align 8
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca %struct.NextSimplex, align 8
  %20 = alloca i8, align 1
  %21 = alloca i8, align 1
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %22 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 72, ptr %7) #7
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #7
  call void @_ZN5Vec3DC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %8, double noundef 1.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
  call void @_ZN11RigidObject7supportERKSt10shared_ptrIS_ERK5Vec3D(ptr dead_on_unwind writable sret(%struct.SupportPoint) align 8 %7, ptr noundef nonnull align 8 dereferenceable(368) %22, ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(24) %8)
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  call void @llvm.memset.p0.i64(ptr align 8 %9, i8 0, i64 24, i1 false)
  call void @_ZN7SimplexC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  invoke void @_ZN7Simplex10push_frontERK12SupportPoint(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(72) %7)
          to label %24 unwind label %51

24:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #7
  %25 = getelementptr inbounds %struct.SupportPoint, ptr %7, i32 0, i32 2
  invoke void @_ZNK5Vec3DngEv(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %26 unwind label %55

26:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %117, %26
  %28 = load i32, ptr %13, align 4, !tbaa !9
  %29 = add i32 %28, 1
  store i32 %29, ptr %13, align 4, !tbaa !9
  %30 = zext i32 %28 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %31 = invoke noundef i64 @_ZNK11RigidObject10hitBoxSizeEv(ptr noundef nonnull align 8 dereferenceable(368) %22)
          to label %32 unwind label %59

32:                                               ; preds = %27
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = call noundef ptr @_ZNKSt19__shared_ptr_accessI11RigidObjectLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %33) #7
  %35 = invoke noundef i64 @_ZNK11RigidObject10hitBoxSizeEv(ptr noundef nonnull align 8 dereferenceable(368) %34)
          to label %36 unwind label %59

36:                                               ; preds = %32
  %37 = add i64 %31, %35
  store i64 %37, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 30, ptr %15, align 8, !tbaa !11
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %39 unwind label %63

39:                                               ; preds = %36
  %40 = load i64, ptr %38, align 8, !tbaa !11
  %41 = icmp ult i64 %30, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br i1 %41, label %42, label %120

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 72, ptr %16) #7
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN11RigidObject7supportERKSt10shared_ptrIS_ERK5Vec3D(ptr dead_on_unwind writable sret(%struct.SupportPoint) align 8 %16, ptr noundef nonnull align 8 dereferenceable(368) %22, ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %44 unwind label %68

44:                                               ; preds = %42
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %16, i64 72, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 72, ptr %16) #7
  %45 = getelementptr inbounds %struct.SupportPoint, ptr %7, i32 0, i32 2
  %46 = invoke noundef double @_ZNK5Vec3D3dotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %47 unwind label %72

47:                                               ; preds = %44
  %48 = fcmp ole double %46, 0.000000e+00
  br i1 %48, label %49, label %80

49:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #7
  store i8 0, ptr %17, align 1, !tbaa !15
  invoke void @_ZSt9make_pairIbR7SimplexESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 1 dereferenceable(1) %17, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %50 unwind label %76

50:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #7
  store i32 1, ptr %18, align 4
  br label %126

51:                                               ; preds = %3
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %10, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %11, align 4
  br label %129

55:                                               ; preds = %24
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %10, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %11, align 4
  br label %128

59:                                               ; preds = %32, %27
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %10, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %11, align 4
  br label %67

63:                                               ; preds = %36
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %10, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %67

67:                                               ; preds = %63, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %127

68:                                               ; preds = %42
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %10, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 72, ptr %16) #7
  br label %127

72:                                               ; preds = %80, %44
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %10, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %11, align 4
  br label %127

76:                                               ; preds = %49
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %10, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #7
  br label %127

80:                                               ; preds = %47
  invoke void @_ZN7Simplex10push_frontERK12SupportPoint(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(72) %7)
          to label %81 unwind label %72

81:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 56, ptr %19) #7
  invoke void @_ZN11RigidObject11nextSimplexERK7Simplex(ptr dead_on_unwind writable sret(%struct.NextSimplex) align 8 %19, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %82 unwind label %99

82:                                               ; preds = %81
  %83 = getelementptr inbounds %struct.NextSimplex, ptr %19, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %83, i64 24, i1 false), !tbaa.struct !17
  %84 = getelementptr inbounds %struct.NextSimplex, ptr %19, i32 0, i32 0
  %85 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN7SimplexaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %84)
          to label %86 unwind label %103

86:                                               ; preds = %82
  %87 = getelementptr inbounds %struct.NextSimplex, ptr %19, i32 0, i32 2
  %88 = load i8, ptr %87, align 8, !tbaa !18, !range !28, !noundef !29
  %89 = trunc i8 %88 to i1
  br i1 %89, label %90, label %114

90:                                               ; preds = %86
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = call noundef ptr @_ZNKSt19__shared_ptr_accessI11RigidObjectLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %91) #7
  %93 = invoke noundef zeroext i1 @_ZNK11RigidObject12hasCollisionEv(ptr noundef nonnull align 8 dereferenceable(368) %92)
          to label %94 unwind label %103

94:                                               ; preds = %90
  br i1 %93, label %95, label %107

95:                                               ; preds = %94
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = call noundef ptr @_ZNKSt19__shared_ptr_accessI11RigidObjectLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %96) #7
  %98 = getelementptr inbounds %class.RigidObject, ptr %97, i32 0, i32 14
  store i8 1, ptr %98, align 1, !tbaa !30
  br label %107

99:                                               ; preds = %81
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %10, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %11, align 4
  br label %119

103:                                              ; preds = %90, %82
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %10, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %11, align 4
  br label %118

107:                                              ; preds = %95, %94
  %108 = getelementptr inbounds %class.RigidObject, ptr %22, i32 0, i32 14
  store i8 1, ptr %108, align 1, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #7
  store i8 1, ptr %20, align 1, !tbaa !15
  invoke void @_ZSt9make_pairIbR7SimplexESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 1 dereferenceable(1) %20, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %109 unwind label %110

109:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  store i32 1, ptr %18, align 4
  br label %115

110:                                              ; preds = %107
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %10, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  br label %118

114:                                              ; preds = %86
  store i32 0, ptr %18, align 4
  br label %115

115:                                              ; preds = %114, %109
  call void @_ZN11NextSimplexD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %19) #7
  %116 = load i32, ptr %18, align 4
  switch i32 %116, label %126 [
    i32 0, label %117
  ]

117:                                              ; preds = %115
  br label %27, !llvm.loop !43

118:                                              ; preds = %110, %103
  call void @_ZN11NextSimplexD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #7
  br label %119

119:                                              ; preds = %118, %99
  call void @llvm.lifetime.end.p0(i64 56, ptr %19) #7
  br label %127

120:                                              ; preds = %39
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #7
  store i8 0, ptr %21, align 1, !tbaa !15
  invoke void @_ZSt9make_pairIbR7SimplexESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 1 dereferenceable(1) %21, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %121 unwind label %122

121:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  store i32 1, ptr %18, align 4
  br label %126

122:                                              ; preds = %120
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %10, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  br label %127

126:                                              ; preds = %121, %115, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  call void @_ZN7SimplexD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %7) #7
  ret void

127:                                              ; preds = %122, %119, %76, %72, %68, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %128

128:                                              ; preds = %127, %55
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  br label %129

129:                                              ; preds = %128, %51
  call void @_ZN7SimplexD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %7) #7
  br label %130

130:                                              ; preds = %129
  %131 = load ptr, ptr %10, align 8
  %132 = load i32, ptr %11, align 4
  %133 = insertvalue { ptr, i32 } poison, ptr %131, 0
  %134 = insertvalue { ptr, i32 } %133, i32 %132, 1
  resume { ptr, i32 } %134
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7SimplexC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Simplex10push_frontERK12SupportPoint(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(72)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK11RigidObject10hitBoxSizeEv(ptr noundef nonnull align 8 dereferenceable(368)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIbR7SimplexESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(24)) #4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11NextSimplexD2Ev(ptr noundef nonnull align 8 dereferenceable(56)) 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 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{i64 0, i64 24, !14, i64 24, i64 24, !14, i64 48, i64 24, !14}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i64 0, i64 24, !14}
!18 = !{!19, !16, i64 48}
!19 = !{!"_ZTS11NextSimplex", !20, i64 0, !26, i64 24, !16, i64 48}
!20 = !{!"_ZTS7Simplex", !21, i64 0}
!21 = !{!"_ZTSNSt7__cxx114listI12SupportPointSaIS1_EEE", !22, i64 0}
!22 = !{!"_ZTSNSt7__cxx1110_List_baseI12SupportPointSaIS1_EEE", !23, i64 0}
!23 = !{!"_ZTSNSt7__cxx1110_List_baseI12SupportPointSaIS1_EE10_List_implE", !24, i64 0}
!24 = !{!"_ZTSNSt8__detail17_List_node_headerE", !25, i64 0, !12, i64 16}
!25 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!26 = !{!"_ZTS5Vec3D", !27, i64 0}
!27 = !{!"_ZTSSt5arrayIdLm3EE", !7, i64 0}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!31, !16, i64 305}
!31 = !{!"_ZTS11RigidObject", !32, i64 0, !26, i64 16, !26, i64 40, !33, i64 64, !33, i64 72, !33, i64 80, !26, i64 88, !34, i64 112, !34, i64 184, !33, i64 256, !33, i64 264, !16, i64 272, !36, i64 280, !16, i64 304, !16, i64 305, !26, i64 312, !41, i64 336}
!32 = !{!"_ZTS9Component", !6, i64 8}
!33 = !{!"double", !7, i64 0}
!34 = !{!"_ZTS9Matrix3x3", !35, i64 0}
!35 = !{!"_ZTSSt5arrayIS_IdLm3EELm3EE", !7, i64 0}
!36 = !{!"_ZTS6HitBox", !37, i64 0}
!37 = !{!"_ZTSSt6vectorI5Vec3DSaIS0_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseI5Vec3DSaIS0_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseI5Vec3DSaIS0_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseI5Vec3DSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!"_ZTSSt8functionIFvRK14CollisionPointSt10shared_ptrI11RigidObjectES5_EE", !42, i64 0, !6, i64 24}
!42 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}


; 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"

%struct.SupportPoint = type { %class.Vec3D, %class.Vec3D, %class.Vec3D }
%class.Vec3D = type { %"struct.std::array.3" }
%"struct.std::array.3" = type { [3 x double] }
%struct.NextSimplex = type <{ %struct.Simplex, %class.Vec3D, i8, [7 x i8] }>
%struct.Simplex = type { %"class.std::__cxx11::list" }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<SupportPoint, std::allocator<SupportPoint>>::_List_impl" }
%"struct.std::__cxx11::_List_base<SupportPoint, std::allocator<SupportPoint>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"struct.std::pair" = type { i8, %struct.Simplex }

; 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 @_ZN5Vec3DC2Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11RigidObject7supportERKSt10shared_ptrIS_ERK5Vec3D(ptr dead_on_unwind noalias writable sret(%struct.SupportPoint) align 8, ptr noundef nonnull align 8 dereferenceable(368), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessI11RigidObjectLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DngEv(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11RigidObject11nextSimplexERK7Simplex(ptr dead_on_unwind noalias writable sret(%struct.NextSimplex) align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11RigidObject17checkGJKCollisionERKSt10shared_ptrIS_E(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 8 dereferenceable(368) %1, ptr noundef nonnull align 8 dereferenceable(16) %2) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.SupportPoint, align 8
  %5 = alloca %class.Vec3D, align 8
  %6 = alloca %struct.Simplex, align 8
  %7 = alloca %class.Vec3D, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca %struct.SupportPoint, align 8
  %11 = alloca i8, align 1
  %12 = alloca %struct.NextSimplex, align 8
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  call void @_ZN5Vec3DC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %5, double noundef 1.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
  call void @_ZN11RigidObject7supportERKSt10shared_ptrIS_ERK5Vec3D(ptr dead_on_unwind nonnull writable sret(%struct.SupportPoint) align 8 %4, ptr noundef nonnull align 8 dereferenceable(368) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(24) %5)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, i8 0, i64 24, i1 false)
  call void @_ZN7SimplexC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  invoke void @_ZN7Simplex10push_frontERK12SupportPoint(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(72) %4)
          to label %15 unwind label %38

15:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  %16 = getelementptr inbounds i8, ptr %4, i64 48
  invoke void @_ZNK5Vec3DngEv(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %.preheader unwind label %40

.preheader:                                       ; preds = %15
  %17 = getelementptr inbounds i8, ptr %12, i64 24
  %18 = getelementptr inbounds i8, ptr %12, i64 48
  br label %19

.critedge:                                        ; preds = %54
  call void @_ZN11NextSimplexD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #7
  br label %19

19:                                               ; preds = %.preheader, %.critedge
  %.09 = phi i32 [ %20, %.critedge ], [ 0, %.preheader ]
  %20 = add i32 %.09, 1
  %21 = zext i32 %.09 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %22 = invoke noundef i64 @_ZNK11RigidObject10hitBoxSizeEv(ptr noundef nonnull align 8 dereferenceable(368) %1)
          to label %23 unwind label %42

23:                                               ; preds = %19
  %24 = call noundef ptr @_ZNKSt19__shared_ptr_accessI11RigidObjectLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  %25 = invoke noundef i64 @_ZNK11RigidObject10hitBoxSizeEv(ptr noundef nonnull align 8 dereferenceable(368) %24)
          to label %26 unwind label %42

26:                                               ; preds = %23
  %27 = add i64 %25, %22
  store i64 %27, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  store i64 30, ptr %9, align 8, !tbaa !5
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %29 = load i64, ptr %28, align 8, !tbaa !5
  %30 = icmp ugt i64 %29, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br i1 %30, label %31, label %74

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %10) #7
  invoke void @_ZN11RigidObject7supportERKSt10shared_ptrIS_ERK5Vec3D(ptr dead_on_unwind nonnull writable sret(%struct.SupportPoint) align 8 %10, ptr noundef nonnull align 8 dereferenceable(368) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %32 unwind label %44

32:                                               ; preds = %31
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(72) %4, ptr noundef nonnull align 8 dereferenceable(72) %10, i64 72, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %10) #7
  %33 = invoke noundef double @_ZNK5Vec3D3dotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %34 unwind label %46

34:                                               ; preds = %32
  %35 = fcmp ugt double %33, 0.000000e+00
  br i1 %35, label %50, label %36

36:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #7
  store i8 0, ptr %11, align 1, !tbaa !11
  invoke void @_ZSt9make_pairIbR7SimplexESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %37 unwind label %48

37:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  br label %78

38:                                               ; preds = %3
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %80

40:                                               ; preds = %15
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %79

42:                                               ; preds = %23, %19
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %79

44:                                               ; preds = %31
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %10) #7
  br label %79

46:                                               ; preds = %50, %32
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %79

48:                                               ; preds = %36
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  br label %79

50:                                               ; preds = %34
  invoke void @_ZN7Simplex10push_frontERK12SupportPoint(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(72) %4)
          to label %51 unwind label %46

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %12) #7
  invoke void @_ZN11RigidObject11nextSimplexERK7Simplex(ptr dead_on_unwind nonnull writable sret(%struct.NextSimplex) align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %52 unwind label %63

52:                                               ; preds = %51
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %17, i64 24, i1 false), !tbaa.struct !13
  %53 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN7SimplexaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %54 unwind label %65

54:                                               ; preds = %52
  %55 = load i8, ptr %18, align 8, !tbaa !14, !range !25, !noundef !26
  %56 = trunc nuw i8 %55 to i1
  br i1 %56, label %57, label %.critedge

57:                                               ; preds = %54
  %58 = call noundef ptr @_ZNKSt19__shared_ptr_accessI11RigidObjectLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  %59 = call noundef zeroext i1 @_ZNK11RigidObject12hasCollisionEv(ptr noundef nonnull align 8 dereferenceable(368) %58)
  br i1 %59, label %60, label %67

60:                                               ; preds = %57
  %61 = call noundef ptr @_ZNKSt19__shared_ptr_accessI11RigidObjectLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  %62 = getelementptr inbounds i8, ptr %61, i64 305
  store i8 1, ptr %62, align 1, !tbaa !27
  br label %67

63:                                               ; preds = %51
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %73

65:                                               ; preds = %52
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %72

67:                                               ; preds = %60, %57
  %68 = getelementptr inbounds i8, ptr %1, i64 305
  store i8 1, ptr %68, align 1, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #7
  store i8 1, ptr %13, align 1, !tbaa !11
  invoke void @_ZSt9make_pairIbR7SimplexESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 1 dereferenceable(1) %13, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %69 unwind label %70

69:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  call void @_ZN11NextSimplexD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #7
  br label %78, !llvm.loop !40

70:                                               ; preds = %67
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  br label %72

72:                                               ; preds = %70, %65
  %.pn = phi { ptr, i32 } [ %71, %70 ], [ %66, %65 ]
  call void @_ZN11NextSimplexD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #7
  br label %73

73:                                               ; preds = %72, %63
  %.pn.pn = phi { ptr, i32 } [ %.pn, %72 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #7
  br label %79

74:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #7
  store i8 0, ptr %14, align 1, !tbaa !11
  invoke void @_ZSt9make_pairIbR7SimplexESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %0, ptr noundef nonnull align 1 dereferenceable(1) %14, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %75 unwind label %76

75:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #7
  br label %78

76:                                               ; preds = %74
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #7
  br label %79

78:                                               ; preds = %69, %75, %37
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @_ZN7SimplexD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #7
  ret void

79:                                               ; preds = %42, %44, %46, %48, %73, %76, %40
  %.pn18.pn = phi { ptr, i32 } [ %41, %40 ], [ %49, %48 ], [ %.pn.pn, %73 ], [ %47, %46 ], [ %45, %44 ], [ %77, %76 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  br label %80

80:                                               ; preds = %79, %38
  %.pn18.pn.pn = phi { ptr, i32 } [ %.pn18.pn, %79 ], [ %39, %38 ]
  call void @_ZN7SimplexD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn18.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7SimplexC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Simplex10push_frontERK12SupportPoint(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIbR7SimplexESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11NextSimplexD2Ev(ptr noundef nonnull align 8 dereferenceable(56)) 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 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 24, !10, i64 24, i64 24, !10, i64 48, i64 24, !10}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i64 0, i64 24, !10}
!14 = !{!15, !12, i64 48}
!15 = !{!"_ZTS11NextSimplex", !16, i64 0, !23, i64 24, !12, i64 48}
!16 = !{!"_ZTS7Simplex", !17, i64 0}
!17 = !{!"_ZTSNSt7__cxx114listI12SupportPointSaIS1_EEE", !18, i64 0}
!18 = !{!"_ZTSNSt7__cxx1110_List_baseI12SupportPointSaIS1_EEE", !19, i64 0}
!19 = !{!"_ZTSNSt7__cxx1110_List_baseI12SupportPointSaIS1_EE10_List_implE", !20, i64 0}
!20 = !{!"_ZTSNSt8__detail17_List_node_headerE", !21, i64 0, !6, i64 16}
!21 = !{!"_ZTSNSt8__detail15_List_node_baseE", !22, i64 0, !22, i64 8}
!22 = !{!"any pointer", !7, i64 0}
!23 = !{!"_ZTS5Vec3D", !24, i64 0}
!24 = !{!"_ZTSSt5arrayIdLm3EE", !7, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!28, !12, i64 305}
!28 = !{!"_ZTS11RigidObject", !29, i64 0, !23, i64 16, !23, i64 40, !30, i64 64, !30, i64 72, !30, i64 80, !23, i64 88, !31, i64 112, !31, i64 184, !30, i64 256, !30, i64 264, !12, i64 272, !33, i64 280, !12, i64 304, !12, i64 305, !23, i64 312, !38, i64 336}
!29 = !{!"_ZTS9Component", !22, i64 8}
!30 = !{!"double", !7, i64 0}
!31 = !{!"_ZTS9Matrix3x3", !32, i64 0}
!32 = !{!"_ZTSSt5arrayIS_IdLm3EELm3EE", !7, i64 0}
!33 = !{!"_ZTS6HitBox", !34, i64 0}
!34 = !{!"_ZTSSt6vectorI5Vec3DSaIS0_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseI5Vec3DSaIS0_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseI5Vec3DSaIS0_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseI5Vec3DSaIS0_EE17_Vector_impl_dataE", !22, i64 0, !22, i64 8, !22, i64 16}
!38 = !{!"_ZTSSt8functionIFvRK14CollisionPointSt10shared_ptrI11RigidObjectES5_EE", !39, i64 0, !22, i64 24}
!39 = !{!"_ZTSSt14_Function_base", !7, i64 0, !22, i64 16}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopSimplifyPass,ReassociatePass,SROAPass,SimplifyCFGPass