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

; 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.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl" }
%"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator.2" = type { i8 }
%"struct.QObjectPool<QCollision::Contact>::Node" = type { ptr, i32, i32 }

@_ZN6QWorld14MAX_WORLD_SIZEE = external dso_local global float, align 4

; 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: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_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 @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

declare <2 x float> @_ZN7QVector22GeteBisectorUnitVectorES_S_S_b(<2 x float>, <2 x float>, <2 x float>, i1 noundef zeroext) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_Zml7QVectorf(<2 x float>, float noundef) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3absf(float noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_Zmi7QVectorS_(<2 x float>, <2 x float>) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK7QVector3DotES_(ptr noundef nonnull align 4 dereferenceable(8), <2 x float>) #7 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZN10QCollision20LineIntersectionLineE7QVectorS0_S0_S0_(<2 x float>, <2 x float>, <2 x float>, <2 x float>) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_Zpl7QVectorS_(<2 x float>, <2 x float>) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8)) #9 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZNK7QVector13PerpendicularEv(ptr noundef nonnull align 4 dereferenceable(8)) #9 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN11QObjectPoolIN10QCollision7ContactEE6CreateEv(ptr noundef nonnull align 8 dereferenceable(40)) #10 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10QCollision7Contact9ConfigureEP9QParticle7QVectorS3_fSt6vectorIS2_SaIS2_EE(ptr noundef nonnull align 8 dereferenceable(57), ptr noundef, <2 x float>, <2 x float>, float noundef, ptr noundef) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP9QParticleSaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #10 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10QCollision16PointInPolygonWNE7QVectorSt6vectorIP9QParticleSaIS3_EE(<2 x float>, ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP9QParticleSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #10 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10QCollision18CircleAndPolyline2ERSt6vectorIP9QParticleSaIS2_EES5_5QAABBRS0_IPNS_7ContactESaIS8_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef byval(%class.QAABB) align 8 %2, ptr noundef nonnull align 8 dereferenceable(24) %3) #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %struct.QVector, align 4
  %15 = alloca %"class.std::vector.0", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %struct.QVector, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %struct.QVector, align 4
  %22 = alloca %struct.QVector, align 4
  %23 = alloca %struct.QVector, align 4
  %24 = alloca %struct.QVector, align 4
  %25 = alloca %struct.QVector, align 4
  %26 = alloca %struct.QVector, align 4
  %27 = alloca float, align 4
  %28 = alloca i32, align 4
  %29 = alloca %struct.QVector, align 4
  %30 = alloca float, align 4
  %31 = alloca i64, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca %struct.QVector, align 4
  %35 = alloca %struct.QVector, align 4
  %36 = alloca %struct.QVector, align 4
  %37 = alloca %struct.QVector, align 4
  %38 = alloca %struct.QVector, align 4
  %39 = alloca %struct.QVector, align 4
  %40 = alloca %struct.QVector, align 4
  %41 = alloca %struct.QVector, align 4
  %42 = alloca float, align 4
  %43 = alloca %struct.QVector, align 4
  %44 = alloca %struct.QVector, align 4
  %45 = alloca %struct.QVector, align 4
  %46 = alloca ptr, align 8
  %47 = alloca ptr, align 8
  %48 = alloca %struct.QVector, align 4
  %49 = alloca %struct.QVector, align 4
  %50 = alloca %struct.QVector, align 4
  %51 = alloca %struct.QVector, align 4
  %52 = alloca %struct.QVector, align 4
  %53 = alloca %struct.QVector, align 4
  %54 = alloca %struct.QVector, align 4
  %55 = alloca %struct.QVector, align 4
  %56 = alloca float, align 4
  %57 = alloca %struct.QVector, align 4
  %58 = alloca %struct.QVector, align 4
  %59 = alloca float, align 4
  %60 = alloca %struct.QVector, align 4
  %61 = alloca float, align 4
  %62 = alloca %struct.QVector, align 4
  %63 = alloca %struct.QVector, align 4
  %64 = alloca %struct.QVector, align 4
  %65 = alloca %struct.QVector, align 4
  %66 = alloca %struct.QVector, align 4
  %67 = alloca %struct.QVector, align 4
  %68 = alloca %struct.QVector, align 4
  %69 = alloca float, align 4
  %70 = alloca %struct.QVector, align 4
  %71 = alloca %struct.QVector, align 4
  %72 = alloca %struct.QVector, align 4
  %73 = alloca %struct.QVector, align 4
  %74 = alloca %struct.QVector, align 4
  %75 = alloca %struct.QVector, align 4
  %76 = alloca %struct.QVector, align 4
  %77 = alloca ptr, align 8
  %78 = alloca %struct.QVector, align 4
  %79 = alloca %struct.QVector, align 4
  %80 = alloca %"class.std::vector.0", align 8
  %81 = alloca %"class.std::initializer_list", align 8
  %82 = alloca [2 x ptr], align 8
  %83 = alloca %"class.std::allocator.2", align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %3, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #11
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %84) #11
  store i64 %85, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #11
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %86) #11
  store i64 %87, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #11
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %88

88:                                               ; preds = %311, %4
  %89 = load i64, ptr %10, align 8, !tbaa !9
  %90 = load i64, ptr %8, align 8, !tbaa !9
  %91 = icmp ult i64 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #11
  br label %315

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #11
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = load i64, ptr %10, align 8, !tbaa !9
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %95) #11
  %97 = load ptr, ptr %96, align 8, !tbaa !5
  store ptr %97, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #11
  store i32 0, ptr %13, align 4, !tbaa !11
  %98 = load ptr, ptr %12, align 8, !tbaa !5
  %99 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %98)
  store <2 x float> %99, ptr %14, align 4
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNSt6vectorIP9QParticleSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %100)
  %101 = load <2 x float>, ptr %14, align 4
  %102 = invoke noundef zeroext i1 @_ZN10QCollision16PointInPolygonWNE7QVectorSt6vectorIP9QParticleSaIS3_EE(<2 x float> %101, ptr noundef %15)
          to label %103 unwind label %105

103:                                              ; preds = %93
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #11
  br i1 %102, label %104, label %109

104:                                              ; preds = %103
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %110

105:                                              ; preds = %93
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %16, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %17, align 4
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #11
  br label %314

109:                                              ; preds = %103
  store i32 1, ptr %13, align 4, !tbaa !11
  br label %110

110:                                              ; preds = %109, %104
  %111 = load i32, ptr %13, align 4, !tbaa !11
  %112 = icmp eq i32 %111, 0
  br i1 %112, label %113, label %310

113:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #11
  call void @_ZN7QVectorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %18)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #11
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = load i64, ptr %10, align 8, !tbaa !9
  %116 = sub i64 %115, 1
  %117 = load i64, ptr %8, align 8, !tbaa !9
  %118 = add i64 %116, %117
  %119 = load i64, ptr %8, align 8, !tbaa !9
  %120 = urem i64 %118, %119
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %120) #11
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  store ptr %122, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #11
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = load i64, ptr %10, align 8, !tbaa !9
  %125 = add i64 %124, 1
  %126 = load i64, ptr %8, align 8, !tbaa !9
  %127 = urem i64 %125, %126
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %123, i64 noundef %127) #11
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  store ptr %129, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #11
  %130 = load ptr, ptr %19, align 8, !tbaa !5
  %131 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %130)
  store <2 x float> %131, ptr %22, align 4
  %132 = load ptr, ptr %12, align 8, !tbaa !5
  %133 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %132)
  store <2 x float> %133, ptr %23, align 4
  %134 = load ptr, ptr %20, align 8, !tbaa !5
  %135 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %134)
  store <2 x float> %135, ptr %24, align 4
  %136 = load <2 x float>, ptr %22, align 4
  %137 = load <2 x float>, ptr %23, align 4
  %138 = load <2 x float>, ptr %24, align 4
  %139 = call <2 x float> @_ZN7QVector22GeteBisectorUnitVectorES_S_S_b(<2 x float> %136, <2 x float> %137, <2 x float> %138, i1 noundef zeroext false)
  store <2 x float> %139, ptr %21, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %21, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !13
  %140 = load <2 x float>, ptr %26, align 4
  %141 = call <2 x float> @_Zml7QVectorf(<2 x float> %140, float noundef 3.200000e+01)
  store <2 x float> %141, ptr %25, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #11
  %142 = load float, ptr @_ZN6QWorld14MAX_WORLD_SIZEE, align 4, !tbaa !14
  store float %142, ptr %27, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #11
  store i32 -1, ptr %28, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #11
  call void @_ZN7QVectorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %29)
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #11
  store float 0.000000e+00, ptr %30, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #11
  store i64 0, ptr %31, align 8, !tbaa !9
  br label %143

143:                                              ; preds = %195, %113
  %144 = load i64, ptr %31, align 8, !tbaa !9
  %145 = load i64, ptr %9, align 8, !tbaa !9
  %146 = icmp ult i64 %144, %145
  br i1 %146, label %148, label %147

147:                                              ; preds = %143
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #11
  br label %198

148:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #11
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = load i64, ptr %31, align 8, !tbaa !9
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %149, i64 noundef %150) #11
  %152 = load ptr, ptr %151, align 8, !tbaa !5
  store ptr %152, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #11
  %153 = load ptr, ptr %6, align 8, !tbaa !5
  %154 = load i64, ptr %31, align 8, !tbaa !9
  %155 = add i64 %154, 1
  %156 = load i64, ptr %9, align 8, !tbaa !9
  %157 = urem i64 %155, %156
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %153, i64 noundef %157) #11
  %159 = load ptr, ptr %158, align 8, !tbaa !5
  store ptr %159, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #11
  %160 = load ptr, ptr %12, align 8, !tbaa !5
  %161 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %160)
  store <2 x float> %161, ptr %35, align 4
  %162 = load ptr, ptr %12, align 8, !tbaa !5
  %163 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %162)
  store <2 x float> %163, ptr %37, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 %25, i64 8, i1 false), !tbaa.struct !13
  %164 = load <2 x float>, ptr %37, align 4
  %165 = load <2 x float>, ptr %38, align 4
  %166 = call <2 x float> @_Zpl7QVectorS_(<2 x float> %164, <2 x float> %165)
  store <2 x float> %166, ptr %36, align 4
  %167 = load ptr, ptr %32, align 8, !tbaa !5
  %168 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %167)
  store <2 x float> %168, ptr %39, align 4
  %169 = load ptr, ptr %33, align 8, !tbaa !5
  %170 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %169)
  store <2 x float> %170, ptr %40, align 4
  %171 = load <2 x float>, ptr %35, align 4
  %172 = load <2 x float>, ptr %36, align 4
  %173 = load <2 x float>, ptr %39, align 4
  %174 = load <2 x float>, ptr %40, align 4
  %175 = call <2 x float> @_ZN10QCollision20LineIntersectionLineE7QVectorS0_S0_S0_(<2 x float> %171, <2 x float> %172, <2 x float> %173, <2 x float> %174)
  store <2 x float> %175, ptr %34, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #11
  %176 = call <2 x float> @_ZN7QVector3NaNEv()
  store <2 x float> %176, ptr %41, align 4
  %177 = call noundef zeroext i1 @_ZNK7QVectorneERKS_(ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(8) %41)
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #11
  br i1 %177, label %178, label %194

178:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %44, ptr align 4 %34, i64 8, i1 false), !tbaa.struct !13
  %179 = load ptr, ptr %12, align 8, !tbaa !5
  %180 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %179)
  store <2 x float> %180, ptr %45, align 4
  %181 = load <2 x float>, ptr %44, align 4
  %182 = load <2 x float>, ptr %45, align 4
  %183 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %181, <2 x float> %182)
  store <2 x float> %183, ptr %43, align 4
  %184 = call noundef float @_ZNK7QVector6LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %43)
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #11
  store float %184, ptr %42, align 4, !tbaa !14
  %185 = load float, ptr %42, align 4, !tbaa !14
  %186 = load float, ptr %27, align 4, !tbaa !14
  %187 = fcmp olt float %185, %186
  br i1 %187, label %188, label %193

188:                                              ; preds = %178
  %189 = load float, ptr %42, align 4, !tbaa !14
  %190 = fptosi float %189 to i32
  store i32 %190, ptr %28, align 4, !tbaa !11
  %191 = load i64, ptr %31, align 8, !tbaa !9
  %192 = trunc i64 %191 to i32
  store i32 %192, ptr %28, align 4, !tbaa !11
  br label %193

193:                                              ; preds = %188, %178
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #11
  br label %194

194:                                              ; preds = %193, %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #11
  br label %195

195:                                              ; preds = %194
  %196 = load i64, ptr %31, align 8, !tbaa !9
  %197 = add i64 %196, 1
  store i64 %197, ptr %31, align 8, !tbaa !9
  br label %143, !llvm.loop !16

198:                                              ; preds = %147
  %199 = load i32, ptr %28, align 4, !tbaa !11
  %200 = icmp ne i32 %199, -1
  br i1 %200, label %201, label %309

201:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #11
  %202 = load ptr, ptr %6, align 8, !tbaa !5
  %203 = load i32, ptr %28, align 4, !tbaa !11
  %204 = sext i32 %203 to i64
  %205 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %202, i64 noundef %204) #11
  %206 = load ptr, ptr %205, align 8, !tbaa !5
  store ptr %206, ptr %46, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #11
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = load i32, ptr %28, align 4, !tbaa !11
  %209 = add nsw i32 %208, 1
  %210 = sext i32 %209 to i64
  %211 = load i64, ptr %9, align 8, !tbaa !9
  %212 = urem i64 %210, %211
  %213 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %207, i64 noundef %212) #11
  %214 = load ptr, ptr %213, align 8, !tbaa !5
  store ptr %214, ptr %47, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #11
  %215 = load ptr, ptr %47, align 8, !tbaa !5
  %216 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %215)
  store <2 x float> %216, ptr %49, align 4
  %217 = load ptr, ptr %46, align 8, !tbaa !5
  %218 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %217)
  store <2 x float> %218, ptr %50, align 4
  %219 = load <2 x float>, ptr %49, align 4
  %220 = load <2 x float>, ptr %50, align 4
  %221 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %219, <2 x float> %220)
  store <2 x float> %221, ptr %48, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #11
  %222 = call <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8) %48)
  store <2 x float> %222, ptr %51, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #11
  %223 = call <2 x float> @_ZNK7QVector13PerpendicularEv(ptr noundef nonnull align 4 dereferenceable(8) %51)
  store <2 x float> %223, ptr %52, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #11
  %224 = load ptr, ptr %12, align 8, !tbaa !5
  %225 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %224)
  store <2 x float> %225, ptr %54, align 4
  %226 = load ptr, ptr %46, align 8, !tbaa !5
  %227 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %226)
  store <2 x float> %227, ptr %55, align 4
  %228 = load <2 x float>, ptr %54, align 4
  %229 = load <2 x float>, ptr %55, align 4
  %230 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %228, <2 x float> %229)
  store <2 x float> %230, ptr %53, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %57, ptr align 4 %52, i64 8, i1 false), !tbaa.struct !13
  %231 = load <2 x float>, ptr %57, align 4
  %232 = call noundef float @_ZNK7QVector3DotES_(ptr noundef nonnull align 4 dereferenceable(8) %53, <2 x float> %231)
  store float %232, ptr %56, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %52, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %60, ptr align 4 %51, i64 8, i1 false), !tbaa.struct !13
  %233 = load <2 x float>, ptr %60, align 4
  %234 = call noundef float @_ZNK7QVector3DotES_(ptr noundef nonnull align 4 dereferenceable(8) %53, <2 x float> %233)
  store float %234, ptr %59, align 4, !tbaa !14
  %235 = load float, ptr %59, align 4, !tbaa !14
  %236 = fcmp olt float %235, 0.000000e+00
  br i1 %236, label %237, label %254

237:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #11
  %238 = load ptr, ptr %46, align 8, !tbaa !5
  %239 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %238)
  store <2 x float> %239, ptr %63, align 4
  %240 = load ptr, ptr %12, align 8, !tbaa !5
  %241 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %240)
  store <2 x float> %241, ptr %64, align 4
  %242 = load <2 x float>, ptr %63, align 4
  %243 = load <2 x float>, ptr %64, align 4
  %244 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %242, <2 x float> %243)
  store <2 x float> %244, ptr %62, align 4
  %245 = call noundef float @_ZNK7QVector6LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %62)
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #11
  store float %245, ptr %61, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #11
  %246 = load ptr, ptr %46, align 8, !tbaa !5
  %247 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %246)
  store <2 x float> %247, ptr %67, align 4
  %248 = load ptr, ptr %12, align 8, !tbaa !5
  %249 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %248)
  store <2 x float> %249, ptr %68, align 4
  %250 = load <2 x float>, ptr %67, align 4
  %251 = load <2 x float>, ptr %68, align 4
  %252 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %250, <2 x float> %251)
  store <2 x float> %252, ptr %66, align 4
  %253 = call <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8) %66)
  store <2 x float> %253, ptr %65, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %65, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #11
  br label %254

254:                                              ; preds = %237, %201
  %255 = load float, ptr %59, align 4, !tbaa !14
  %256 = call noundef float @_ZNK7QVector6LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %48)
  %257 = fcmp ogt float %255, %256
  br i1 %257, label %258, label %275

258:                                              ; preds = %254
  call void @llvm.lifetime.start.p0(i64 4, ptr %69) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #11
  %259 = load ptr, ptr %47, align 8, !tbaa !5
  %260 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %259)
  store <2 x float> %260, ptr %71, align 4
  %261 = load ptr, ptr %12, align 8, !tbaa !5
  %262 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %261)
  store <2 x float> %262, ptr %72, align 4
  %263 = load <2 x float>, ptr %71, align 4
  %264 = load <2 x float>, ptr %72, align 4
  %265 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %263, <2 x float> %264)
  store <2 x float> %265, ptr %70, align 4
  %266 = call noundef float @_ZNK7QVector6LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %70)
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #11
  store float %266, ptr %69, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %73) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %74) #11
  %267 = load ptr, ptr %47, align 8, !tbaa !5
  %268 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %267)
  store <2 x float> %268, ptr %75, align 4
  %269 = load ptr, ptr %12, align 8, !tbaa !5
  %270 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %269)
  store <2 x float> %270, ptr %76, align 4
  %271 = load <2 x float>, ptr %75, align 4
  %272 = load <2 x float>, ptr %76, align 4
  %273 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %271, <2 x float> %272)
  store <2 x float> %273, ptr %74, align 4
  %274 = call <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8) %74)
  store <2 x float> %274, ptr %73, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %73, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %74) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %73) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %69) #11
  br label %275

275:                                              ; preds = %258, %254
  call void @llvm.lifetime.start.p0(i64 8, ptr %77) #11
  %276 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN10QCollision14GetContactPoolEv()
  %277 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN11QObjectPoolIN10QCollision7ContactEE6CreateEv(ptr noundef nonnull align 8 dereferenceable(40) %276)
  %278 = getelementptr inbounds %"struct.QObjectPool<QCollision::Contact>::Node", ptr %277, i32 0, i32 0
  %279 = load ptr, ptr %278, align 8, !tbaa !18
  store ptr %279, ptr %77, align 8, !tbaa !5
  %280 = load ptr, ptr %77, align 8, !tbaa !5
  %281 = load ptr, ptr %12, align 8, !tbaa !5
  %282 = load ptr, ptr %12, align 8, !tbaa !5
  %283 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %282)
  store <2 x float> %283, ptr %78, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %79, ptr align 4 %58, i64 8, i1 false), !tbaa.struct !13
  %284 = load float, ptr %56, align 4, !tbaa !14
  %285 = call noundef float @_ZSt3absf(float noundef %284)
  call void @llvm.lifetime.start.p0(i64 16, ptr %82) #11
  %286 = load ptr, ptr %46, align 8, !tbaa !5
  store ptr %286, ptr %82, align 8, !tbaa !5
  %287 = getelementptr inbounds ptr, ptr %82, i64 1
  %288 = load ptr, ptr %47, align 8, !tbaa !5
  store ptr %288, ptr %287, align 8, !tbaa !5
  %289 = getelementptr inbounds %"class.std::initializer_list", ptr %81, i32 0, i32 0
  store ptr %82, ptr %289, align 8, !tbaa !20
  %290 = getelementptr inbounds %"class.std::initializer_list", ptr %81, i32 0, i32 1
  store i64 2, ptr %290, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 1, ptr %83) #11
  call void @_ZNSaIP9QParticleEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %83) #11
  %291 = getelementptr inbounds { ptr, i64 }, ptr %81, i32 0, i32 0
  %292 = load ptr, ptr %291, align 8
  %293 = getelementptr inbounds { ptr, i64 }, ptr %81, i32 0, i32 1
  %294 = load i64, ptr %293, align 8
  invoke void @_ZNSt6vectorIP9QParticleSaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %80, ptr %292, i64 %294, ptr noundef nonnull align 1 dereferenceable(1) %83)
          to label %295 unwind label %300

295:                                              ; preds = %275
  %296 = load <2 x float>, ptr %78, align 4
  %297 = load <2 x float>, ptr %79, align 4
  invoke void @_ZN10QCollision7Contact9ConfigureEP9QParticle7QVectorS3_fSt6vectorIS2_SaIS2_EE(ptr noundef nonnull align 8 dereferenceable(57) %280, ptr noundef %281, <2 x float> %296, <2 x float> %297, float noundef %285, ptr noundef %80)
          to label %298 unwind label %304

298:                                              ; preds = %295
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %80) #11
  call void @_ZNSt15__new_allocatorIP9QParticleED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %83) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %83) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %82) #11
  %299 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNSt6vectorIPN10QCollision7ContactESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %299, ptr noundef nonnull align 8 dereferenceable(8) %77)
  call void @llvm.lifetime.end.p0(i64 8, ptr %77) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #11
  br label %309

300:                                              ; preds = %275
  %301 = landingpad { ptr, i32 }
          cleanup
  %302 = extractvalue { ptr, i32 } %301, 0
  store ptr %302, ptr %16, align 8
  %303 = extractvalue { ptr, i32 } %301, 1
  store i32 %303, ptr %17, align 4
  br label %308

304:                                              ; preds = %295
  %305 = landingpad { ptr, i32 }
          cleanup
  %306 = extractvalue { ptr, i32 } %305, 0
  store ptr %306, ptr %16, align 8
  %307 = extractvalue { ptr, i32 } %305, 1
  store i32 %307, ptr %17, align 4
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %80) #11
  br label %308

308:                                              ; preds = %304, %300
  call void @_ZNSt15__new_allocatorIP9QParticleED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %83) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %83) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %82) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %77) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #11
  br label %314

309:                                              ; preds = %298, %198
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #11
  br label %310

310:                                              ; preds = %309, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #11
  br label %311

311:                                              ; preds = %310
  %312 = load i64, ptr %10, align 8, !tbaa !9
  %313 = add i64 %312, 1
  store i64 %313, ptr %10, align 8, !tbaa !9
  br label %88, !llvm.loop !23

314:                                              ; preds = %308, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #11
  br label %316

315:                                              ; preds = %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #11
  ret void

316:                                              ; preds = %314
  %317 = load ptr, ptr %16, align 8
  %318 = load i32, ptr %17, align 4
  %319 = insertvalue { ptr, i32 } poison, ptr %317, 0
  %320 = insertvalue { ptr, i32 } %319, i32 %318, 1
  resume { ptr, i32 } %320
}

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

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZN7QVector3NaNEv() #4 align 2

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

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 = { "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 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 #4 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { inlinehint 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 #8 = { 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 #9 = { inlinehint 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 #10 = { 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 #11 = { 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, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 4, !14, i64 4, i64 4, !14}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTSN11QObjectPoolIN10QCollision7ContactEE4NodeE", !6, i64 0, !12, i64 8, !12, i64 12}
!20 = !{!21, !6, i64 0}
!21 = !{!"_ZTSSt16initializer_listIP9QParticleE", !6, i64 0, !10, i64 8}
!22 = !{!21, !10, i64 8}
!23 = distinct !{!23, !17}


; 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 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl" }
%"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }

@_ZN6QWorld14MAX_WORLD_SIZEE = external dso_local local_unnamed_addr global float, align 4

; 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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_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 @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

declare <2 x float> @_ZN7QVector22GeteBisectorUnitVectorES_S_S_b(<2 x float>, <2 x float>, <2 x float>, i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_Zml7QVectorf(<2 x float>, float noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3absf(float noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_Zmi7QVectorS_(<2 x float>, <2 x float>) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK7QVector3DotES_(ptr noundef nonnull align 4 dereferenceable(8), <2 x float>) local_unnamed_addr #6 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZN10QCollision20LineIntersectionLineE7QVectorS0_S0_S0_(<2 x float>, <2 x float>, <2 x float>, <2 x float>) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_Zpl7QVectorS_(<2 x float>, <2 x float>) local_unnamed_addr #4

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN11QObjectPoolIN10QCollision7ContactEE6CreateEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #9 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10QCollision7Contact9ConfigureEP9QParticle7QVectorS3_fSt6vectorIS2_SaIS2_EE(ptr noundef nonnull align 8 dereferenceable(57), ptr noundef, <2 x float>, <2 x float>, float noundef, ptr noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP9QParticleSaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #9 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10QCollision16PointInPolygonWNE7QVectorSt6vectorIP9QParticleSaIS3_EE(<2 x float>, ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP9QParticleSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #9 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10QCollision18CircleAndPolyline2ERSt6vectorIP9QParticleSaIS2_EES5_5QAABBRS0_IPNS_7ContactESaIS8_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr nocapture noundef readnone byval(%class.QAABB) align 8 %2, ptr noundef nonnull align 8 dereferenceable(24) %3) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca %struct.QVector, align 8
  %7 = alloca %struct.QVector, align 4
  %8 = alloca %struct.QVector, align 8
  %9 = alloca %struct.QVector, align 8
  %10 = alloca %struct.QVector, align 8
  %11 = alloca %struct.QVector, align 8
  %12 = alloca %struct.QVector, align 8
  %13 = alloca %struct.QVector, align 8
  %14 = alloca %struct.QVector, align 8
  %15 = alloca %struct.QVector, align 8
  %16 = alloca %struct.QVector, align 8
  %17 = alloca %struct.QVector, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"class.std::vector.0", align 8
  %20 = alloca [2 x ptr], align 8
  %21 = alloca %"class.std::allocator.2", align 1
  %22 = tail call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #10
  %23 = tail call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #10
  %.not118 = icmp eq i64 %22, 0
  br i1 %.not118, label %._crit_edge117, label %.lr.ph116

.lr.ph116:                                        ; preds = %4
  %24 = add i64 %22, -1
  %.not119 = icmp eq i64 %23, 0
  %25 = getelementptr inbounds i8, ptr %20, i64 8
  br label %26

._crit_edge117:                                   ; preds = %125, %4
  ret void

26:                                               ; preds = %.lr.ph116, %125
  %.0114 = phi i64 [ 0, %.lr.ph116 ], [ %.pre-phi, %125 ]
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.0114) #10
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %28)
  call void @_ZNSt6vectorIP9QParticleSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %30 = invoke noundef zeroext i1 @_ZN10QCollision16PointInPolygonWNE7QVectorSt6vectorIP9QParticleSaIS3_EE(<2 x float> %29, ptr noundef nonnull %5)
          to label %31 unwind label %32

31:                                               ; preds = %26
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #10
  br i1 %30, label %34, label %._crit_edge121

._crit_edge121:                                   ; preds = %31
  %.pre = add nuw i64 %.0114, 1
  br label %125

32:                                               ; preds = %26
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #10
  br label %126

34:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  call void @_ZN7QVectorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %6)
  %35 = add i64 %24, %.0114
  %36 = urem i64 %35, %22
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %36) #10
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = add nuw i64 %.0114, 1
  %40 = icmp eq i64 %39, %22
  %iv.rem = select i1 %40, i64 0, i64 %39
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %iv.rem) #10
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %38)
  %44 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %28)
  %45 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %42)
  %46 = call <2 x float> @_ZN7QVector22GeteBisectorUnitVectorES_S_S_b(<2 x float> %43, <2 x float> %44, <2 x float> %45, i1 noundef zeroext false)
  store <2 x float> %46, ptr %6, align 8
  %47 = call <2 x float> @_Zml7QVectorf(<2 x float> %46, float noundef 3.200000e+01)
  %48 = load float, ptr @_ZN6QWorld14MAX_WORLD_SIZEE, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  call void @_ZN7QVectorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %7)
  br i1 %.not119, label %._crit_edge.thread, label %.lr.ph

._crit_edge:                                      ; preds = %70
  %.not = icmp eq i32 %.2, -1
  br i1 %.not, label %._crit_edge.thread, label %71

.lr.ph:                                           ; preds = %34, %70
  %.0104113 = phi i32 [ %.2, %70 ], [ -1, %34 ]
  %.0106112 = phi i64 [ %51, %70 ], [ 0, %34 ]
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.0106112) #10
  %50 = load ptr, ptr %49, align 8, !tbaa !5
  %51 = add nuw i64 %.0106112, 1
  %52 = icmp eq i64 %51, %23
  %53 = select i1 %52, i64 0, i64 %51
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %53) #10
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  %56 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %28)
  %57 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %28)
  %58 = call <2 x float> @_Zpl7QVectorS_(<2 x float> %57, <2 x float> %47)
  %59 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %50)
  %60 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %55)
  %61 = call <2 x float> @_ZN10QCollision20LineIntersectionLineE7QVectorS0_S0_S0_(<2 x float> %56, <2 x float> %58, <2 x float> %59, <2 x float> %60)
  store <2 x float> %61, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #10
  %62 = call <2 x float> @_ZN7QVector3NaNEv()
  store <2 x float> %62, ptr %9, align 8
  %63 = call noundef zeroext i1 @_ZNK7QVectorneERKS_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #10
  br i1 %63, label %64, label %70

64:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #10
  %.sroa.034.0.copyload = load <2 x float>, ptr %8, align 8
  %65 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %28)
  %66 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %.sroa.034.0.copyload, <2 x float> %65)
  store <2 x float> %66, ptr %10, align 8
  %67 = call noundef float @_ZNK7QVector6LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  %68 = fcmp olt float %67, %48
  %69 = trunc i64 %.0106112 to i32
  %.1105 = select i1 %68, i32 %69, i32 %.0104113
  br label %70

70:                                               ; preds = %64, %.lr.ph
  %.2 = phi i32 [ %.1105, %64 ], [ %.0104113, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  %exitcond.not = icmp eq i64 %51, %23
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

71:                                               ; preds = %._crit_edge
  %72 = sext i32 %.2 to i64
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %72) #10
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  %75 = add nuw nsw i32 %.2, 1
  %76 = sext i32 %75 to i64
  %77 = urem i64 %76, %23
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %77) #10
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #10
  %80 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %79)
  %81 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %74)
  %82 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %80, <2 x float> %81)
  store <2 x float> %82, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #10
  %83 = call <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8) %11)
  store <2 x float> %83, ptr %12, align 8
  %84 = call <2 x float> @_ZNK7QVector13PerpendicularEv(ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #10
  %85 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %28)
  %86 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %74)
  %87 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %85, <2 x float> %86)
  store <2 x float> %87, ptr %13, align 8
  %88 = call noundef float @_ZNK7QVector3DotES_(ptr noundef nonnull align 4 dereferenceable(8) %13, <2 x float> %84)
  %.sroa.013.0.copyload = load <2 x float>, ptr %12, align 8
  %89 = call noundef float @_ZNK7QVector3DotES_(ptr noundef nonnull align 4 dereferenceable(8) %13, <2 x float> %.sroa.013.0.copyload)
  %90 = fcmp olt float %89, 0.000000e+00
  br i1 %90, label %91, label %100

91:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #10
  %92 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %74)
  %93 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %28)
  %94 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %92, <2 x float> %93)
  store <2 x float> %94, ptr %14, align 8
  %95 = call noundef float @_ZNK7QVector6LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #10
  %96 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %74)
  %97 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %28)
  %98 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %96, <2 x float> %97)
  store <2 x float> %98, ptr %15, align 8
  %99 = call <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #10
  br label %100

100:                                              ; preds = %91, %71
  %.sroa.015.0 = phi <2 x float> [ %99, %91 ], [ %84, %71 ]
  %101 = call noundef float @_ZNK7QVector6LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %11)
  %102 = fcmp ogt float %89, %101
  br i1 %102, label %103, label %112

103:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #10
  %104 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %79)
  %105 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %28)
  %106 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %104, <2 x float> %105)
  store <2 x float> %106, ptr %16, align 8
  %107 = call noundef float @_ZNK7QVector6LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %16)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #10
  %108 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %79)
  %109 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %28)
  %110 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %108, <2 x float> %109)
  store <2 x float> %110, ptr %17, align 8
  %111 = call <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #10
  br label %112

112:                                              ; preds = %103, %100
  %.sroa.015.1 = phi <2 x float> [ %111, %103 ], [ %.sroa.015.0, %100 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #10
  %113 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN10QCollision14GetContactPoolEv()
  %114 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN11QObjectPoolIN10QCollision7ContactEE6CreateEv(ptr noundef nonnull align 8 dereferenceable(40) %113)
  %115 = load ptr, ptr %114, align 8, !tbaa !13
  store ptr %115, ptr %18, align 8, !tbaa !5
  %116 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %28)
  %117 = call noundef float @_ZSt3absf(float noundef %88)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #10
  store ptr %74, ptr %20, align 8, !tbaa !5
  store ptr %79, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %21) #10
  call void @_ZNSaIP9QParticleEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #10
  invoke void @_ZNSt6vectorIP9QParticleSaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr nonnull %20, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %118 unwind label %120

118:                                              ; preds = %112
  invoke void @_ZN10QCollision7Contact9ConfigureEP9QParticle7QVectorS3_fSt6vectorIS2_SaIS2_EE(ptr noundef nonnull align 8 dereferenceable(57) %115, ptr noundef nonnull %28, <2 x float> %116, <2 x float> %.sroa.015.1, float noundef %117, ptr noundef nonnull %19)
          to label %119 unwind label %122

119:                                              ; preds = %118
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #10
  call void @_ZNSt15__new_allocatorIP9QParticleED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #10
  call void @_ZNSt6vectorIPN10QCollision7ContactESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(8) %18)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  br label %._crit_edge.thread

120:                                              ; preds = %112
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %124

122:                                              ; preds = %118
  %123 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #10
  br label %124

124:                                              ; preds = %122, %120
  %.pn = phi { ptr, i32 } [ %123, %122 ], [ %121, %120 ]
  call void @_ZNSt15__new_allocatorIP9QParticleED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  br label %126

._crit_edge.thread:                               ; preds = %34, %119, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  br label %125

125:                                              ; preds = %._crit_edge121, %._crit_edge.thread
  %.pre-phi = phi i64 [ %.pre, %._crit_edge121 ], [ %39, %._crit_edge.thread ]
  %exitcond120.not = icmp eq i64 %.pre-phi, %22
  br i1 %exitcond120.not, label %._crit_edge117, label %26, !llvm.loop !16

126:                                              ; preds = %124, %32
  %.pn.pn = phi { ptr, i32 } [ %.pn, %124 ], [ %33, %32 ]
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZN7QVector3NaNEv() local_unnamed_addr #4 align 2

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

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 = { "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 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 #4 = { 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 #5 = { 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 #6 = { inlinehint 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 #7 = { 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 #8 = { inlinehint 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 #9 = { 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 #10 = { 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 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSN11QObjectPoolIN10QCollision7ContactEE4NodeE", !6, i64 0, !15, i64 8, !15, i64 12}
!15 = !{!"int", !7, i64 0}
!16 = distinct !{!16, !12}


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