; LLVM IR from atlantis13579/Riemann :: Src/RigidBodyDynamics (CollidingContact)

; 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.Riemann::GraphNE" = type { %"class.std::vector.1", %"class.std::vector.6" }
%"class.std::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge, std::allocator<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge, std::allocator<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge, std::allocator<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge, std::allocator<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.16" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.Riemann::ContactManifold" = type { i32, i32, [5 x %"struct.Riemann::Contact"], i32, ptr }
%"struct.Riemann::Contact" = type { %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", float, float, float, float }
%"class.Maths::TVector3" = type { float, float, float }
%"class.Riemann::RigidBody" = type <{ ptr, %"class.std::vector.1", i8, [7 x i8], i64, %"class.Maths::TVector3", %"class.Maths::Quaternion", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", float, %"class.Maths::Matrix3", i16, [6 x i8] }>
%"class.Maths::Quaternion" = type { float, float, float, float }
%"class.Maths::Matrix3" = type { [3 x [3 x float]] }
%"class.Riemann::ContactManifoldIslands" = type { %"class.std::vector.20" }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<std::vector<Riemann::ContactManifold *>, std::allocator<std::vector<Riemann::ContactManifold *>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<Riemann::ContactManifold *>, std::allocator<std::vector<Riemann::ContactManifold *>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<Riemann::ContactManifold *>, std::allocator<std::vector<Riemann::ContactManifold *>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<Riemann::ContactManifold *>, std::allocator<std::vector<Riemann::ContactManifold *>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@__PRETTY_FUNCTION__._ZN7Riemann22ContactManifoldIslands12BuildIslandsERKSt6vectorIPNS_8GeometryESaIS3_EERKS1_IPNS_15ContactManifoldESaIS9_EE = external hidden unnamed_addr constant [124 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

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

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) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann22ContactManifoldIslands12BuildIslandsERKSt6vectorIPNS_8GeometryESaIS3_EERKS1_IPNS_15ContactManifoldESaIS9_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #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 %"struct.Riemann::GraphNE", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca %"class.std::vector.16", align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.std::_Bit_reference", align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, 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
  %17 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr %7) #5
  call void @_ZN7Riemann7GraphNEIPNS_8GeometryEPNS_15ContactManifoldEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.Riemann::GraphNE", ptr %7, i32 0, i32 0
  %20 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIPN7Riemann8GeometryESaIS2_EEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %21 unwind label %28

21:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %22

22:                                               ; preds = %49, %21
  %23 = load i64, ptr %10, align 8, !tbaa !9
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = call noundef i64 @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #5
  %26 = icmp ult i64 %23, %25
  br i1 %26, label %32, label %27

27:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %56

28:                                               ; preds = %3
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %8, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %9, align 4
  br label %129

32:                                               ; preds = %22
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = load i64, ptr %10, align 8, !tbaa !9
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %34) #5
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %36, i32 0, i32 0
  %38 = load i32, ptr %37, align 8, !tbaa !11
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = load i64, ptr %10, align 8, !tbaa !9
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %40) #5
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %42, i32 0, i32 1
  %44 = load i32, ptr %43, align 4, !tbaa !14
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = load i64, ptr %10, align 8, !tbaa !9
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %46) #5
  invoke void @_ZN7Riemann7GraphNEIPNS_8GeometryEPNS_15ContactManifoldEE7AddEdgeEiiRKS4_(ptr noundef nonnull align 8 dereferenceable(48) %7, i32 noundef %38, i32 noundef %44, ptr noundef nonnull align 8 dereferenceable(8) %47)
          to label %48 unwind label %52

48:                                               ; preds = %32
  br label %49

49:                                               ; preds = %48
  %50 = load i64, ptr %10, align 8, !tbaa !9
  %51 = add i64 %50, 1
  store i64 %51, ptr %10, align 8, !tbaa !9
  br label %22, !llvm.loop !15

52:                                               ; preds = %32
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %8, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %129

56:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #5
  call void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #5
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = call noundef i64 @_ZNKSt6vectorIPN7Riemann8GeometryESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %57) #5
  invoke void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %58, i1 noundef zeroext false)
          to label %59 unwind label %65

59:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %60

60:                                               ; preds = %88, %59
  %61 = load i64, ptr %12, align 8, !tbaa !9
  %62 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %11) #5
  %63 = icmp ult i64 %61, %62
  br i1 %63, label %69, label %64

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %100

65:                                               ; preds = %100, %56
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %8, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %9, align 4
  br label %128

69:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = load i64, ptr %12, align 8, !tbaa !9
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPN7Riemann8GeometryESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %71) #5
  %73 = load ptr, ptr %72, align 8, !tbaa !5
  %74 = invoke noundef ptr @_ZN7Riemann8Geometry9GetParentINS_9RigidBodyEEEPT_v(ptr noundef nonnull align 8 dereferenceable(204) %73)
          to label %75 unwind label %91

75:                                               ; preds = %69
  store ptr %74, ptr %13, align 8, !tbaa !5
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = getelementptr inbounds %"class.Riemann::RigidBody", ptr %76, i32 0, i32 2
  %78 = load i8, ptr %77, align 8, !tbaa !17
  %79 = icmp eq i8 %78, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  %80 = load i64, ptr %12, align 8, !tbaa !9
  %81 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %80)
          to label %82 unwind label %95

82:                                               ; preds = %75
  %83 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %84 = extractvalue { ptr, i64 } %81, 0
  store ptr %84, ptr %83, align 8
  %85 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %86 = extractvalue { ptr, i64 } %81, 1
  store i64 %86, ptr %85, align 8
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %14, i1 noundef zeroext %79) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %88

88:                                               ; preds = %82
  %89 = load i64, ptr %12, align 8, !tbaa !9
  %90 = add i64 %89, 1
  store i64 %90, ptr %12, align 8, !tbaa !9
  br label %60, !llvm.loop !29

91:                                               ; preds = %69
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %8, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %9, align 4
  br label %99

95:                                               ; preds = %75
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %8, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  br label %99

99:                                               ; preds = %95, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %128

100:                                              ; preds = %64
  %101 = getelementptr inbounds %"class.Riemann::ContactManifoldIslands", ptr %17, i32 0, i32 0
  invoke void @_ZN7Riemann7GraphNEIPNS_8GeometryEPNS_15ContactManifoldEE16BuildEdgeIslandsERKSt6vectorIbSaIbEEPS6_IS6_IS4_SaIS4_EESaISC_EE(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(40) %11, ptr noundef %101)
          to label %102 unwind label %65

102:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 0, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %103

103:                                              ; preds = %116, %102
  %104 = load i64, ptr %16, align 8, !tbaa !9
  %105 = getelementptr inbounds %"class.Riemann::ContactManifoldIslands", ptr %17, i32 0, i32 0
  %106 = call noundef i64 @_ZNKSt6vectorIS_IPN7Riemann15ContactManifoldESaIS2_EESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %105) #5
  %107 = icmp ult i64 %104, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %119

109:                                              ; preds = %103
  %110 = getelementptr inbounds %"class.Riemann::ContactManifoldIslands", ptr %17, i32 0, i32 0
  %111 = load i64, ptr %16, align 8, !tbaa !9
  %112 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IPN7Riemann15ContactManifoldESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %111) #5
  %113 = call noundef i64 @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %112) #5
  %114 = load i64, ptr %15, align 8, !tbaa !9
  %115 = add i64 %114, %113
  store i64 %115, ptr %15, align 8, !tbaa !9
  br label %116

116:                                              ; preds = %109
  %117 = load i64, ptr %16, align 8, !tbaa !9
  %118 = add i64 %117, 1
  store i64 %118, ptr %16, align 8, !tbaa !9
  br label %103, !llvm.loop !30

119:                                              ; preds = %108
  %120 = load i64, ptr %15, align 8, !tbaa !9
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = call noundef i64 @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %121) #5
  %123 = icmp eq i64 %120, %122
  br i1 %123, label %124, label %125

124:                                              ; preds = %119
  br label %127

125:                                              ; preds = %119
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 241, ptr noundef @__PRETTY_FUNCTION__._ZN7Riemann22ContactManifoldIslands12BuildIslandsERKSt6vectorIPNS_8GeometryESaIS3_EERKS1_IPNS_15ContactManifoldESaIS9_EE) #6
  unreachable

126:                                              ; No predecessors!
  br label %127

127:                                              ; preds = %126, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #5
  call void @_ZN7Riemann7GraphNEIPNS_8GeometryEPNS_15ContactManifoldEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #5
  ret void

128:                                              ; preds = %99, %65
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #5
  br label %129

129:                                              ; preds = %128, %52, %28
  call void @_ZN7Riemann7GraphNEIPNS_8GeometryEPNS_15ContactManifoldEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #5
  br label %130

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIPN7Riemann8GeometryESaIS2_EEaSERKS4_(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 i64 @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i1 noundef zeroext) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPN7Riemann8GeometryESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IPN7Riemann15ContactManifoldESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

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

attributes #0 = { noreturn nounwind "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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN7Riemann15ContactManifoldE", !13, i64 0, !13, i64 4, !7, i64 8, !13, i64 508, !6, i64 512}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 4}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !23, i64 32}
!18 = !{!"_ZTSN7Riemann9RigidBodyE", !19, i64 8, !23, i64 32, !10, i64 40, !24, i64 48, !26, i64 60, !24, i64 76, !24, i64 88, !24, i64 100, !25, i64 112, !27, i64 116, !28, i64 152}
!19 = !{!"_ZTSSt6vectorIPN7Riemann8GeometryESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSN7Riemann9RigidTypeE", !7, i64 0}
!24 = !{!"_ZTSN5Maths8TVector3IfEE", !25, i64 0, !25, i64 4, !25, i64 8}
!25 = !{!"float", !7, i64 0}
!26 = !{!"_ZTSN5Maths10QuaternionE", !25, i64 0, !25, i64 4, !25, i64 8, !25, i64 12}
!27 = !{!"_ZTSN5Maths7Matrix3E", !7, i64 0}
!28 = !{!"short", !7, i64 0}
!29 = distinct !{!29, !16}
!30 = distinct !{!30, !16}


; 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.Riemann::GraphNE" = type { %"class.std::vector.1", %"class.std::vector.6" }
%"class.std::vector.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::Geometry *, std::allocator<Riemann::Geometry *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge, std::allocator<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge, std::allocator<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge, std::allocator<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge, std::allocator<Riemann::GraphNE<Riemann::Geometry *, Riemann::ContactManifold *>::Edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.16" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"struct.std::_Bit_reference" = type { ptr, i64 }

@.str.1 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@__PRETTY_FUNCTION__._ZN7Riemann22ContactManifoldIslands12BuildIslandsERKSt6vectorIPNS_8GeometryESaIS3_EERKS1_IPNS_15ContactManifoldESaIS9_EE = external hidden unnamed_addr constant [124 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

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) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann22ContactManifoldIslands12BuildIslandsERKSt6vectorIPNS_8GeometryESaIS3_EERKS1_IPNS_15ContactManifoldESaIS9_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.Riemann::GraphNE", align 8
  %5 = alloca %"class.std::vector.16", align 8
  %6 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #5
  call void @_ZN7Riemann7GraphNEIPNS_8GeometryEPNS_15ContactManifoldEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  %7 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIPN7Riemann8GeometryESaIS2_EEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %.preheader35 unwind label %12

.preheader35:                                     ; preds = %3
  %8 = call noundef i64 @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  %.not = icmp eq i64 %8, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %22, %.preheader35
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #5
  call void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  %9 = call noundef i64 @_ZNKSt6vectorIPN7Riemann8GeometryESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  invoke void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %9, i1 noundef zeroext false)
          to label %.preheader34 unwind label %29

.preheader34:                                     ; preds = %._crit_edge
  %10 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  %.not44 = icmp eq i64 %10, 0
  br i1 %.not44, label %._crit_edge39, label %.lr.ph38

.lr.ph38:                                         ; preds = %.preheader34
  %11 = getelementptr inbounds i8, ptr %6, i64 8
  br label %31

12:                                               ; preds = %3
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %59

.lr.ph:                                           ; preds = %.preheader35, %22
  %.02836 = phi i64 [ %23, %22 ], [ 0, %.preheader35 ]
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.02836) #5
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = load i32, ptr %15, align 8, !tbaa !9
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.02836) #5
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %18, i64 4
  %20 = load i32, ptr %19, align 4, !tbaa !12
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.02836) #5
  invoke void @_ZN7Riemann7GraphNEIPNS_8GeometryEPNS_15ContactManifoldEE7AddEdgeEiiRKS4_(ptr noundef nonnull align 8 dereferenceable(48) %4, i32 noundef %16, i32 noundef %20, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %22 unwind label %26

22:                                               ; preds = %.lr.ph
  %23 = add nuw i64 %.02836, 1
  %24 = call noundef i64 @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  %25 = icmp ult i64 %23, %24
  br i1 %25, label %.lr.ph, label %._crit_edge, !llvm.loop !13

26:                                               ; preds = %.lr.ph
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %59

._crit_edge39:                                    ; preds = %38, %.preheader34
  invoke void @_ZN7Riemann7GraphNEIPNS_8GeometryEPNS_15ContactManifoldEE16BuildEdgeIslandsERKSt6vectorIbSaIbEEPS6_IS6_IS4_SaIS4_EESaISC_EE(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef nonnull %0)
          to label %.preheader unwind label %29

.preheader:                                       ; preds = %._crit_edge39
  %28 = call noundef i64 @_ZNKSt6vectorIS_IPN7Riemann15ContactManifoldESaIS2_EESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %.not45 = icmp eq i64 %28, 0
  br i1 %.not45, label %._crit_edge43, label %.lr.ph42

29:                                               ; preds = %._crit_edge39, %._crit_edge
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %58

31:                                               ; preds = %.lr.ph38, %38
  %.02737 = phi i64 [ 0, %.lr.ph38 ], [ %43, %38 ]
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPN7Riemann8GeometryESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.02737) #5
  %33 = load ptr, ptr %32, align 8, !tbaa !5
  %34 = call noundef ptr @_ZN7Riemann8Geometry9GetParentINS_9RigidBodyEEEPT_v(ptr noundef nonnull align 8 dereferenceable(204) %33)
  %35 = getelementptr inbounds i8, ptr %34, i64 32
  %36 = load i8, ptr %35, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %37 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %.02737)
          to label %38 unwind label %46

38:                                               ; preds = %31
  %39 = icmp eq i8 %36, 0
  %40 = extractvalue { ptr, i64 } %37, 0
  store ptr %40, ptr %6, align 8
  %41 = extractvalue { ptr, i64 } %37, 1
  store i64 %41, ptr %11, align 8
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %6, i1 noundef zeroext %39) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  %43 = add nuw i64 %.02737, 1
  %44 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  %45 = icmp ult i64 %43, %44
  br i1 %45, label %31, label %._crit_edge39, !llvm.loop !28

46:                                               ; preds = %31
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %58

._crit_edge43:                                    ; preds = %.lr.ph42, %.preheader
  %.025.lcssa = phi i64 [ 0, %.preheader ], [ %52, %.lr.ph42 ]
  %48 = call noundef i64 @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  %49 = icmp eq i64 %.025.lcssa, %48
  br i1 %49, label %57, label %56

.lr.ph42:                                         ; preds = %.preheader, %.lr.ph42
  %.041 = phi i64 [ %53, %.lr.ph42 ], [ 0, %.preheader ]
  %.02540 = phi i64 [ %52, %.lr.ph42 ], [ 0, %.preheader ]
  %50 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IPN7Riemann15ContactManifoldESaIS2_EESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.041) #5
  %51 = call noundef i64 @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #5
  %52 = add i64 %51, %.02540
  %53 = add nuw i64 %.041, 1
  %54 = call noundef i64 @_ZNKSt6vectorIS_IPN7Riemann15ContactManifoldESaIS2_EESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %55 = icmp ult i64 %53, %54
  br i1 %55, label %.lr.ph42, label %._crit_edge43, !llvm.loop !29

56:                                               ; preds = %._crit_edge43
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 241, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7Riemann22ContactManifoldIslands12BuildIslandsERKSt6vectorIPNS_8GeometryESaIS3_EERKS1_IPNS_15ContactManifoldESaIS9_EE) #6
  unreachable

57:                                               ; preds = %._crit_edge43
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  call void @_ZN7Riemann7GraphNEIPNS_8GeometryEPNS_15ContactManifoldEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  ret void

58:                                               ; preds = %46, %29
  %.pn = phi { ptr, i32 } [ %47, %46 ], [ %30, %29 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  br label %59

59:                                               ; preds = %58, %26, %12
  %.pn32 = phi { ptr, i32 } [ %27, %26 ], [ %.pn, %58 ], [ %13, %12 ]
  call void @_ZN7Riemann7GraphNEIPNS_8GeometryEPNS_15ContactManifoldEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn32
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIPN7Riemann8GeometryESaIS2_EEaSERKS4_(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 i64 @_ZNKSt6vectorIPN7Riemann15ContactManifoldESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i1 noundef zeroext) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7Riemann8Geometry9GetParentINS_9RigidBodyEEEPT_v(ptr noundef nonnull align 8 dereferenceable(204)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

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

attributes #0 = { noreturn nounwind "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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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, !11, i64 0}
!10 = !{!"_ZTSN7Riemann15ContactManifoldE", !11, i64 0, !11, i64 4, !7, i64 8, !11, i64 508, !6, i64 512}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !21, i64 32}
!16 = !{!"_ZTSN7Riemann9RigidBodyE", !17, i64 8, !21, i64 32, !22, i64 40, !23, i64 48, !25, i64 60, !23, i64 76, !23, i64 88, !23, i64 100, !24, i64 112, !26, i64 116, !27, i64 152}
!17 = !{!"_ZTSSt6vectorIPN7Riemann8GeometryESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPN7Riemann8GeometryESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSN7Riemann9RigidTypeE", !7, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!"_ZTSN5Maths8TVector3IfEE", !24, i64 0, !24, i64 4, !24, i64 8}
!24 = !{!"float", !7, i64 0}
!25 = !{!"_ZTSN5Maths10QuaternionE", !24, i64 0, !24, i64 4, !24, i64 8, !24, i64 12}
!26 = !{!"_ZTSN5Maths7Matrix3E", !7, i64 0}
!27 = !{!"short", !7, i64 0}
!28 = distinct !{!28, !14}
!29 = distinct !{!29, !14}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass