; LLVM IR from erayzesen/QuarkPhysics :: QuarkPhysics (qworld)

; 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.QAABB = type { %struct.QVector, %struct.QVector, %struct.QVector, float }
%struct.QVector = type { float, float }
%"class.__gnu_cxx::__normal_iterator.35" = type { ptr }
%"struct.std::pair" = type { ptr, ptr }
%class.QWorld = type { %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5", %"class.std::vector.10", %"class.std::vector.15", %"class.std::unordered_set", %"class.std::vector.25", ptr, i8, %struct.QVector, i8, i8, i32, float, float, float, i32, i32, %"class.std::vector.30" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<QJoint *, std::allocator<QJoint *>>::_Vector_impl" }
%"struct.std::_Vector_base<QJoint *, std::allocator<QJoint *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QJoint *, std::allocator<QJoint *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QJoint *, std::allocator<QJoint *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<QSpring *, std::allocator<QSpring *>>::_Vector_impl" }
%"struct.std::_Vector_base<QSpring *, std::allocator<QSpring *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QSpring *, std::allocator<QSpring *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QSpring *, std::allocator<QSpring *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<QRaycast *, std::allocator<QRaycast *>>::_Vector_impl" }
%"struct.std::_Vector_base<QRaycast *, std::allocator<QRaycast *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QRaycast *, std::allocator<QRaycast *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QRaycast *, std::allocator<QRaycast *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<QGizmo *, std::allocator<QGizmo *>>::_Vector_impl" }
%"struct.std::_Vector_base<QGizmo *, std::allocator<QGizmo *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QGizmo *, std::allocator<QGizmo *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QGizmo *, std::allocator<QGizmo *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<std::vector<QBody *>, std::allocator<std::vector<QBody *>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<QBody *>, std::allocator<std::vector<QBody *>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<QBody *>, std::allocator<std::vector<QBody *>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<QBody *>, std::allocator<std::vector<QBody *>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<QManifold, std::allocator<QManifold>>::_Vector_impl" }
%"struct.std::_Vector_base<QManifold, std::allocator<QManifold>>::_Vector_impl" = type { %"struct.std::_Vector_base<QManifold, std::allocator<QManifold>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QManifold, std::allocator<QManifold>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<QBody *, std::allocator<QBody *>>::_Vector_impl" }
%"struct.std::_Vector_base<QBody *, std::allocator<QBody *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QBody *, std::allocator<QBody *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QBody *, std::allocator<QBody *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPP5QBodySt6vectorIS3_SaIS3_EEEEPFbPKS2_SA_EEvT_SD_T0_(ptr, ptr, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6QWorld20SortBodiesHorizontalEPK5QBodyS2_(ptr noundef, ptr noundef) #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind noalias writable sret(%class.QAABB) align 4, ptr noundef nonnull align 8 dereferenceable(293)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local <2 x float> @_ZN5QAABB6GetMaxEv(ptr noundef nonnull align 4 dereferenceable(28)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local <2 x float> @_ZN5QAABB6GetMinEv(ptr noundef nonnull align 4 dereferenceable(28)) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6QWorld17GetCollisionPairsERSt6vectorIP5QBodySaIS2_EEPS0_ISt4pairIS2_S2_ESaIS7_EE(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.35", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.35", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %struct.QVector, align 4
  %17 = alloca %class.QAABB, align 4
  %18 = alloca %struct.QVector, align 4
  %19 = alloca %class.QAABB, align 4
  %20 = alloca %struct.QVector, align 4
  %21 = alloca %class.QAABB, align 4
  %22 = alloca %struct.QVector, align 4
  %23 = alloca %class.QAABB, align 4
  %24 = alloca %struct.QVector, align 4
  %25 = alloca %class.QAABB, align 4
  %26 = alloca %struct.QVector, align 4
  %27 = alloca %class.QAABB, align 4
  %28 = alloca %struct.QVector, align 4
  %29 = alloca %class.QAABB, align 4
  %30 = alloca %struct.QVector, align 4
  %31 = alloca %class.QAABB, align 4
  %32 = alloca %"struct.std::pair", 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
  %33 = load ptr, ptr %4, align 8
  %34 = getelementptr inbounds %class.QWorld, ptr %33, i32 0, i32 18
  %35 = call ptr @_ZNSt6vectorIP5QBodySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #6
  %36 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.35", ptr %7, i32 0, i32 0
  store ptr %35, ptr %36, align 8
  %37 = getelementptr inbounds %class.QWorld, ptr %33, i32 0, i32 18
  %38 = call ptr @_ZNSt6vectorIP5QBodySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #6
  %39 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.35", ptr %8, i32 0, i32 0
  store ptr %38, ptr %39, align 8
  %40 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.35", ptr %7, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8
  %42 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.35", ptr %8, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPP5QBodySt6vectorIS3_SaIS3_EEEEPFbPKS2_SA_EEvT_SD_T0_(ptr %41, ptr %43, ptr noundef @_ZN6QWorld20SortBodiesHorizontalEPK5QBodyS2_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %44 = getelementptr inbounds %class.QWorld, ptr %33, i32 0, i32 18
  %45 = call noundef i64 @_ZNKSt6vectorIP5QBodySaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #6
  %46 = trunc i64 %45 to i32
  store i32 %46, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %140, %3
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = load i32, ptr %9, align 4, !tbaa !9
  %50 = icmp ult i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %143

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %53 = getelementptr inbounds %class.QWorld, ptr %33, i32 0, i32 18
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = zext i32 %54 to i64
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP5QBodySaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %55) #6
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  store ptr %57, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #6
  store i8 0, ptr %13, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %58 = load i32, ptr %10, align 4, !tbaa !9
  %59 = add i32 %58, 1
  store i32 %59, ptr %14, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %128, %52
  %61 = load i32, ptr %14, align 4, !tbaa !9
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = icmp ult i32 %61, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  store i32 5, ptr %11, align 4
  br label %131

65:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %66 = getelementptr inbounds %class.QWorld, ptr %33, i32 0, i32 18
  %67 = load i32, ptr %14, align 4, !tbaa !9
  %68 = zext i32 %67 to i64
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP5QBodySaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %68) #6
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  store ptr %70, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 28, ptr %17) #6
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind writable sret(%class.QAABB) align 4 %17, ptr noundef nonnull align 8 dereferenceable(293) %71)
  %72 = call <2 x float> @_ZN5QAABB6GetMinEv(ptr noundef nonnull align 4 dereferenceable(28) %17)
  store <2 x float> %72, ptr %16, align 4
  %73 = getelementptr inbounds %struct.QVector, ptr %16, i32 0, i32 0
  %74 = load float, ptr %73, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 28, ptr %19) #6
  %75 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind writable sret(%class.QAABB) align 4 %19, ptr noundef nonnull align 8 dereferenceable(293) %75)
  %76 = call <2 x float> @_ZN5QAABB6GetMaxEv(ptr noundef nonnull align 4 dereferenceable(28) %19)
  store <2 x float> %76, ptr %18, align 4
  %77 = getelementptr inbounds %struct.QVector, ptr %18, i32 0, i32 0
  %78 = load float, ptr %77, align 4, !tbaa !13
  %79 = fcmp ole float %74, %78
  call void @llvm.lifetime.end.p0(i64 28, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br i1 %79, label %80, label %123

80:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 28, ptr %21) #6
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind writable sret(%class.QAABB) align 4 %21, ptr noundef nonnull align 8 dereferenceable(293) %81)
  %82 = call <2 x float> @_ZN5QAABB6GetMaxEv(ptr noundef nonnull align 4 dereferenceable(28) %21)
  store <2 x float> %82, ptr %20, align 4
  %83 = getelementptr inbounds %struct.QVector, ptr %20, i32 0, i32 0
  %84 = load float, ptr %83, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 28, ptr %23) #6
  %85 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind writable sret(%class.QAABB) align 4 %23, ptr noundef nonnull align 8 dereferenceable(293) %85)
  %86 = call <2 x float> @_ZN5QAABB6GetMinEv(ptr noundef nonnull align 4 dereferenceable(28) %23)
  store <2 x float> %86, ptr %22, align 4
  %87 = getelementptr inbounds %struct.QVector, ptr %22, i32 0, i32 0
  %88 = load float, ptr %87, align 4, !tbaa !13
  %89 = fcmp oge float %84, %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 28, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 28, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 28, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 28, ptr %31) #6
  br i1 %89, label %90, label %110

90:                                               ; preds = %80
  %91 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind writable sret(%class.QAABB) align 4 %25, ptr noundef nonnull align 8 dereferenceable(293) %91)
  %92 = call <2 x float> @_ZN5QAABB6GetMinEv(ptr noundef nonnull align 4 dereferenceable(28) %25)
  store <2 x float> %92, ptr %24, align 4
  %93 = getelementptr inbounds %struct.QVector, ptr %24, i32 0, i32 1
  %94 = load float, ptr %93, align 4, !tbaa !16
  %95 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind writable sret(%class.QAABB) align 4 %27, ptr noundef nonnull align 8 dereferenceable(293) %95)
  %96 = call <2 x float> @_ZN5QAABB6GetMaxEv(ptr noundef nonnull align 4 dereferenceable(28) %27)
  store <2 x float> %96, ptr %26, align 4
  %97 = getelementptr inbounds %struct.QVector, ptr %26, i32 0, i32 1
  %98 = load float, ptr %97, align 4, !tbaa !16
  %99 = fcmp ole float %94, %98
  br i1 %99, label %100, label %110

100:                                              ; preds = %90
  %101 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind writable sret(%class.QAABB) align 4 %29, ptr noundef nonnull align 8 dereferenceable(293) %101)
  %102 = call <2 x float> @_ZN5QAABB6GetMaxEv(ptr noundef nonnull align 4 dereferenceable(28) %29)
  store <2 x float> %102, ptr %28, align 4
  %103 = getelementptr inbounds %struct.QVector, ptr %28, i32 0, i32 1
  %104 = load float, ptr %103, align 4, !tbaa !16
  %105 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind writable sret(%class.QAABB) align 4 %31, ptr noundef nonnull align 8 dereferenceable(293) %105)
  %106 = call <2 x float> @_ZN5QAABB6GetMinEv(ptr noundef nonnull align 4 dereferenceable(28) %31)
  store <2 x float> %106, ptr %30, align 4
  %107 = getelementptr inbounds %struct.QVector, ptr %30, i32 0, i32 1
  %108 = load float, ptr %107, align 4, !tbaa !16
  %109 = fcmp oge float %104, %108
  br label %110

110:                                              ; preds = %100, %90, %80
  %111 = phi i1 [ false, %90 ], [ false, %80 ], [ %109, %100 ]
  call void @llvm.lifetime.end.p0(i64 28, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br i1 %111, label %112, label %122

112:                                              ; preds = %110
  %113 = getelementptr inbounds %class.QWorld, ptr %33, i32 0, i32 16
  %114 = load i32, ptr %113, align 8, !tbaa !17
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %113, align 8, !tbaa !17
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #6
  %117 = call { ptr, ptr } @_ZSt9make_pairIRP5QBodyS2_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %118 = getelementptr inbounds { ptr, ptr }, ptr %32, i32 0, i32 0
  %119 = extractvalue { ptr, ptr } %117, 0
  store ptr %119, ptr %118, align 8
  %120 = getelementptr inbounds { ptr, ptr }, ptr %32, i32 0, i32 1
  %121 = extractvalue { ptr, ptr } %117, 1
  store ptr %121, ptr %120, align 8
  call void @_ZNSt6vectorISt4pairIP5QBodyS2_ESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %116, ptr noundef nonnull align 8 dereferenceable(16) %32)
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #6
  br label %122

122:                                              ; preds = %112, %110
  br label %124

123:                                              ; preds = %65
  store i8 1, ptr %13, align 1, !tbaa !11
  store i32 5, ptr %11, align 4
  br label %125

124:                                              ; preds = %122
  store i32 0, ptr %11, align 4
  br label %125

125:                                              ; preds = %124, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %126 = load i32, ptr %11, align 4
  switch i32 %126, label %131 [
    i32 0, label %127
  ]

127:                                              ; preds = %125
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %14, align 4, !tbaa !9
  %130 = add i32 %129, 1
  store i32 %130, ptr %14, align 4, !tbaa !9
  br label %60, !llvm.loop !52

131:                                              ; preds = %125, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %132

132:                                              ; preds = %131
  %133 = load i8, ptr %13, align 1, !tbaa !11, !range !54, !noundef !55
  %134 = trunc i8 %133 to i1
  br i1 %134, label %135, label %136

135:                                              ; preds = %132
  store i32 4, ptr %11, align 4
  br label %137

136:                                              ; preds = %132
  store i32 0, ptr %11, align 4
  br label %137

137:                                              ; preds = %136, %135
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %138 = load i32, ptr %11, align 4
  switch i32 %138, label %144 [
    i32 0, label %139
    i32 4, label %140
  ]

139:                                              ; preds = %137
  br label %140

140:                                              ; preds = %139, %137
  %141 = load i32, ptr %10, align 4, !tbaa !9
  %142 = add i32 %141, 1
  store i32 %142, ptr %10, align 4, !tbaa !9
  br label %47, !llvm.loop !56

143:                                              ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  ret void

144:                                              ; preds = %137
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIP5QBodyS2_ESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, ptr } @_ZSt9make_pairIRP5QBodyS2_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 uwtable "min-legal-vector-width"="64" "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"="64" "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 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 = { 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 = !{!"bool", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTS7QVector", !15, i64 0, !15, i64 4}
!15 = !{!"float", !7, i64 0}
!16 = !{!14, !15, i64 4}
!17 = !{!18, !10, i64 240}
!18 = !{!"_ZTS6QWorld", !19, i64 0, !23, i64 24, !27, i64 48, !31, i64 72, !35, i64 96, !39, i64 120, !44, i64 176, !6, i64 200, !12, i64 208, !14, i64 212, !12, i64 220, !12, i64 221, !10, i64 224, !15, i64 228, !15, i64 232, !15, i64 236, !10, i64 240, !10, i64 244, !48, i64 248}
!19 = !{!"_ZTSSt6vectorIP6QJointSaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIP6QJointSaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIP6QJointSaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIP6QJointSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt6vectorIP7QSpringSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIP7QSpringSaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTSSt6vectorIP8QRaycastSaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIP8QRaycastSaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIP8QRaycastSaIS1_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIP8QRaycastSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!"_ZTSSt6vectorIP6QGizmoSaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIP6QGizmoSaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIP6QGizmoSaIS1_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIP6QGizmoSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!"_ZTSSt6vectorIS_IP5QBodySaIS1_EESaIS3_EE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseISt6vectorIP5QBodySaIS2_EESaIS4_EE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP5QBodySaIS2_EESaIS4_EE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP5QBodySaIS2_EESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!39 = !{!"_ZTSSt13unordered_setISt4pairIP5QBodyS2_ENS1_12BodyPairHashENS1_13BodyPairEqualESaIS3_EE", !40, i64 0}
!40 = !{!"_ZTSSt10_HashtableISt4pairIP5QBodyS2_ES3_SaIS3_ENSt8__detail9_IdentityENS1_13BodyPairEqualENS1_12BodyPairHashENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb1ELb1ELb1EEEE", !6, i64 0, !41, i64 8, !42, i64 16, !41, i64 24, !43, i64 32, !6, i64 48}
!41 = !{!"long", !7, i64 0}
!42 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!43 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !15, i64 0, !41, i64 8}
!44 = !{!"_ZTSSt6vectorI9QManifoldSaIS0_EE", !45, i64 0}
!45 = !{!"_ZTSSt12_Vector_baseI9QManifoldSaIS0_EE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseI9QManifoldSaIS0_EE12_Vector_implE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseI9QManifoldSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!48 = !{!"_ZTSSt6vectorIP5QBodySaIS1_EE", !49, i64 0}
!49 = !{!"_ZTSSt12_Vector_baseIP5QBodySaIS1_EE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIP5QBodySaIS1_EE12_Vector_implE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseIP5QBodySaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!52 = distinct !{!52, !53}
!53 = !{!"llvm.loop.mustprogress"}
!54 = !{i8 0, i8 2}
!55 = !{}
!56 = distinct !{!56, !53}


; 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.QAABB = type { %struct.QVector, %struct.QVector, %struct.QVector, float }
%struct.QVector = type { float, float }
%"struct.std::pair" = type { ptr, ptr }

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPP5QBodySt6vectorIS3_SaIS3_EEEEPFbPKS2_SA_EEvT_SD_T0_(ptr, ptr, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6QWorld20SortBodiesHorizontalEPK5QBodyS2_(ptr noundef, ptr noundef) #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind noalias writable sret(%class.QAABB) align 4, ptr noundef nonnull align 8 dereferenceable(293)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local <2 x float> @_ZN5QAABB6GetMaxEv(ptr noundef nonnull align 4 dereferenceable(28)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local <2 x float> @_ZN5QAABB6GetMinEv(ptr noundef nonnull align 4 dereferenceable(28)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6QWorld17GetCollisionPairsERSt6vectorIP5QBodySaIS2_EEPS0_ISt4pairIS2_S2_ESaIS7_EE(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr nocapture noundef nonnull readnone align 8 dereferenceable(24) %1, ptr noundef %2) local_unnamed_addr #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %class.QAABB, align 4
  %7 = alloca %class.QAABB, align 4
  %8 = alloca %class.QAABB, align 4
  %9 = alloca %class.QAABB, align 4
  %10 = alloca %class.QAABB, align 4
  %11 = alloca %class.QAABB, align 4
  %12 = alloca %class.QAABB, align 4
  %13 = alloca %class.QAABB, align 4
  %14 = alloca %"struct.std::pair", align 8
  %15 = getelementptr inbounds i8, ptr %0, i64 248
  %16 = tail call ptr @_ZNSt6vectorIP5QBodySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %17 = tail call ptr @_ZNSt6vectorIP5QBodySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  tail call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPP5QBodySt6vectorIS3_SaIS3_EEEEPFbPKS2_SA_EEvT_SD_T0_(ptr %16, ptr %17, ptr noundef nonnull @_ZN6QWorld20SortBodiesHorizontalEPK5QBodyS2_)
  %18 = tail call noundef i64 @_ZNKSt6vectorIP5QBodySaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %19 = trunc i64 %18 to i32
  %.not = icmp eq i32 %19, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph29

.lr.ph29:                                         ; preds = %3
  %20 = getelementptr inbounds i8, ptr %0, i64 240
  %21 = getelementptr inbounds i8, ptr %14, i64 8
  %22 = and i64 %18, 4294967295
  br label %23

._crit_edge:                                      ; preds = %.loopexit, %3
  ret void

23:                                               ; preds = %.lr.ph29, %.loopexit
  %indvars.iv33 = phi i64 [ 0, %.lr.ph29 ], [ %indvars.iv.next34, %.loopexit ]
  %indvars.iv = phi i64 [ 1, %.lr.ph29 ], [ %indvars.iv.next, %.loopexit ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP5QBodySaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv33) #6
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %25, ptr %4, align 8, !tbaa !5
  %indvars.iv.next34 = add nuw nsw i64 %indvars.iv33, 1
  %26 = icmp ult i64 %indvars.iv.next34, %22
  br i1 %26, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %23, %61
  %indvars.iv30 = phi i64 [ %indvars.iv.next31, %61 ], [ %indvars.iv, %23 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP5QBodySaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv30) #6
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  store ptr %28, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %6) #6
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind nonnull writable sret(%class.QAABB) align 4 %6, ptr noundef nonnull align 8 dereferenceable(293) %29)
  %30 = call <2 x float> @_ZN5QAABB6GetMinEv(ptr noundef nonnull align 4 dereferenceable(28) %6)
  %.sroa.07.0.vec.extract = extractelement <2 x float> %30, i64 0
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %7) #6
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind nonnull writable sret(%class.QAABB) align 4 %7, ptr noundef nonnull align 8 dereferenceable(293) %31)
  %32 = call <2 x float> @_ZN5QAABB6GetMaxEv(ptr noundef nonnull align 4 dereferenceable(28) %7)
  %.sroa.06.0.vec.extract = extractelement <2 x float> %32, i64 0
  %33 = fcmp ugt float %.sroa.07.0.vec.extract, %.sroa.06.0.vec.extract
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %6) #6
  br i1 %33, label %60, label %34

34:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %8) #6
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind nonnull writable sret(%class.QAABB) align 4 %8, ptr noundef nonnull align 8 dereferenceable(293) %35)
  %36 = call <2 x float> @_ZN5QAABB6GetMaxEv(ptr noundef nonnull align 4 dereferenceable(28) %8)
  %.sroa.05.0.vec.extract = extractelement <2 x float> %36, i64 0
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %9) #6
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind nonnull writable sret(%class.QAABB) align 4 %9, ptr noundef nonnull align 8 dereferenceable(293) %37)
  %38 = call <2 x float> @_ZN5QAABB6GetMinEv(ptr noundef nonnull align 4 dereferenceable(28) %9)
  %.sroa.04.0.vec.extract = extractelement <2 x float> %38, i64 0
  %39 = fcmp ult float %.sroa.05.0.vec.extract, %.sroa.04.0.vec.extract
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %13) #6
  br i1 %39, label %.critedge, label %40

40:                                               ; preds = %34
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind nonnull writable sret(%class.QAABB) align 4 %10, ptr noundef nonnull align 8 dereferenceable(293) %41)
  %42 = call <2 x float> @_ZN5QAABB6GetMinEv(ptr noundef nonnull align 4 dereferenceable(28) %10)
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind nonnull writable sret(%class.QAABB) align 4 %11, ptr noundef nonnull align 8 dereferenceable(293) %43)
  %44 = call <2 x float> @_ZN5QAABB6GetMaxEv(ptr noundef nonnull align 4 dereferenceable(28) %11)
  %45 = fcmp ugt <2 x float> %42, %44
  %46 = extractelement <2 x i1> %45, i64 1
  br i1 %46, label %.critedge, label %47

47:                                               ; preds = %40
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind nonnull writable sret(%class.QAABB) align 4 %12, ptr noundef nonnull align 8 dereferenceable(293) %48)
  %49 = call <2 x float> @_ZN5QAABB6GetMaxEv(ptr noundef nonnull align 4 dereferenceable(28) %12)
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK5QBody7GetAABBEv(ptr dead_on_unwind nonnull writable sret(%class.QAABB) align 4 %13, ptr noundef nonnull align 8 dereferenceable(293) %50)
  %51 = call <2 x float> @_ZN5QAABB6GetMinEv(ptr noundef nonnull align 4 dereferenceable(28) %13)
  %52 = fcmp ult <2 x float> %49, %51
  %53 = extractelement <2 x i1> %52, i64 1
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %8) #6
  br i1 %53, label %61, label %54

54:                                               ; preds = %47
  %55 = load i32, ptr %20, align 8, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #6
  %57 = call { ptr, ptr } @_ZSt9make_pairIRP5QBodyS2_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %58 = extractvalue { ptr, ptr } %57, 0
  store ptr %58, ptr %14, align 8
  %59 = extractvalue { ptr, ptr } %57, 1
  store ptr %59, ptr %21, align 8
  call void @_ZNSt6vectorISt4pairIP5QBodyS2_ESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(16) %14)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  br label %61

.critedge:                                        ; preds = %34, %40
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %8) #6
  br label %61

60:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %.loopexit

61:                                               ; preds = %54, %47, %.critedge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %indvars.iv.next31 = add nuw nsw i64 %indvars.iv30, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next31 to i32
  %exitcond.not = icmp eq i32 %lftr.wideiv, %19
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !48

.loopexit:                                        ; preds = %61, %23, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond36.not = icmp eq i64 %indvars.iv.next34, %22
  br i1 %exitcond36.not, label %._crit_edge, label %23, !llvm.loop !50
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIP5QBodyS2_ESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, ptr } @_ZSt9make_pairIRP5QBodyS2_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 uwtable "min-legal-vector-width"="64" "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"="64" "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 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 = { 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, !43, i64 240}
!10 = !{!"_ZTS6QWorld", !11, i64 0, !15, i64 24, !19, i64 48, !23, i64 72, !27, i64 96, !31, i64 120, !37, i64 176, !6, i64 200, !41, i64 208, !42, i64 212, !41, i64 220, !41, i64 221, !43, i64 224, !36, i64 228, !36, i64 232, !36, i64 236, !43, i64 240, !43, i64 244, !44, i64 248}
!11 = !{!"_ZTSSt6vectorIP6QJointSaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIP6QJointSaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIP6QJointSaIS1_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIP6QJointSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"_ZTSSt6vectorIP7QSpringSaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIP7QSpringSaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIP8QRaycastSaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIP8QRaycastSaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIP8QRaycastSaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIP8QRaycastSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt6vectorIP6QGizmoSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIP6QGizmoSaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP6QGizmoSaIS1_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIP6QGizmoSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTSSt6vectorIS_IP5QBodySaIS1_EESaIS3_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseISt6vectorIP5QBodySaIS2_EESaIS4_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP5QBodySaIS2_EESaIS4_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP5QBodySaIS2_EESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!"_ZTSSt13unordered_setISt4pairIP5QBodyS2_ENS1_12BodyPairHashENS1_13BodyPairEqualESaIS3_EE", !32, i64 0}
!32 = !{!"_ZTSSt10_HashtableISt4pairIP5QBodyS2_ES3_SaIS3_ENSt8__detail9_IdentityENS1_13BodyPairEqualENS1_12BodyPairHashENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb1ELb1ELb1EEEE", !6, i64 0, !33, i64 8, !34, i64 16, !33, i64 24, !35, i64 32, !6, i64 48}
!33 = !{!"long", !7, i64 0}
!34 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!35 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !36, i64 0, !33, i64 8}
!36 = !{!"float", !7, i64 0}
!37 = !{!"_ZTSSt6vectorI9QManifoldSaIS0_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseI9QManifoldSaIS0_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseI9QManifoldSaIS0_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseI9QManifoldSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!"bool", !7, i64 0}
!42 = !{!"_ZTS7QVector", !36, i64 0, !36, i64 4}
!43 = !{!"int", !7, i64 0}
!44 = !{!"_ZTSSt6vectorIP5QBodySaIS1_EE", !45, i64 0}
!45 = !{!"_ZTSSt12_Vector_baseIP5QBodySaIS1_EE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseIP5QBodySaIS1_EE12_Vector_implE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIP5QBodySaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!48 = distinct !{!48, !49}
!49 = !{!"llvm.loop.mustprogress"}
!50 = distinct !{!50, !49}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass