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

%struct.QVector = type { float, float }
%"struct.QCollision::Project" = type { float, float, 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

; 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

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

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

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

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

; 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>) #6 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: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8)) #7 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10QCollision17PolygonAndPolygonERSt6vectorIP9QParticleSaIS2_EES5_RS0_IPNS_7ContactESaIS7_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #4 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca float, align 4
  %14 = alloca %struct.QVector, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %struct.QVector, align 4
  %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.QCollision::Project", align 4
  %26 = alloca %"struct.QCollision::Project", align 4
  %27 = alloca float, align 4
  %28 = alloca %"struct.QCollision::Project", align 4
  %29 = alloca %"struct.QCollision::Project", align 4
  %30 = alloca %"struct.QCollision::Project", align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, 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 float, align 4
  %45 = alloca %struct.QVector, align 4
  %46 = alloca [2 x ptr], align 16
  %47 = alloca float, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca i32, 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 %struct.QVector, align 4
  %57 = alloca float, align 4
  %58 = alloca %struct.QVector, align 4
  %59 = alloca float, align 4
  %60 = alloca %struct.QVector, align 4
  %61 = alloca [2 x ptr], align 16
  %62 = alloca float, align 4
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %63) #8
  %65 = trunc i64 %64 to i32
  store i32 %65, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %66) #8
  %68 = trunc i64 %67 to i32
  store i32 %68, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = load i32, ptr %8, align 4, !tbaa !9
  %71 = add nsw i32 %69, %70
  store i32 %71, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %72, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %73, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %74 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %74, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %75 = load float, ptr @_ZN6QWorld14MAX_WORLD_SIZEE, align 4, !tbaa !11
  store float %75, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %76 = call <2 x float> @_ZN7QVector4ZeroEv()
  store <2 x float> %76, ptr %14, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %151, %3
  %78 = load i32, ptr %16, align 4, !tbaa !9
  %79 = load i32, ptr %9, align 4, !tbaa !9
  %80 = icmp ult i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 2, ptr %17, align 4
  br label %154

82:                                               ; preds = %77
  %83 = load i32, ptr %16, align 4, !tbaa !9
  %84 = load i32, ptr %7, align 4, !tbaa !9
  %85 = icmp uge i32 %83, %84
  br i1 %85, label %86, label %94

86:                                               ; preds = %82
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = icmp eq ptr %87, %88
  br i1 %89, label %90, label %94

90:                                               ; preds = %86
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %91, ptr %10, align 8, !tbaa !5
  %92 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %92, ptr %12, align 4, !tbaa !9
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %93, ptr %11, align 8, !tbaa !5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %90, %86, %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = load i32, ptr %15, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef %97) #8
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  store ptr %99, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = load i32, ptr %15, align 4, !tbaa !9
  %102 = add nsw i32 %101, 1
  %103 = load i32, ptr %12, align 4, !tbaa !9
  %104 = srem i32 %102, %103
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %105) #8
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  store ptr %107, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %108 = load ptr, ptr %19, align 8, !tbaa !5
  %109 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %108)
  store <2 x float> %109, ptr %23, align 4
  %110 = load ptr, ptr %18, align 8, !tbaa !5
  %111 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %110)
  store <2 x float> %111, ptr %24, align 4
  %112 = load <2 x float>, ptr %23, align 4
  %113 = load <2 x float>, ptr %24, align 4
  %114 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %112, <2 x float> %113)
  store <2 x float> %114, ptr %22, align 4
  %115 = call <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8) %22)
  store <2 x float> %115, ptr %21, align 4
  %116 = call <2 x float> @_ZNK7QVector13PerpendicularEv(ptr noundef nonnull align 4 dereferenceable(8) %21)
  store <2 x float> %116, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #8
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = call { <2 x float>, i64 } @_ZN10QCollision13ProjectToAxisER7QVectorRSt6vectorIP9QParticleSaIS4_EE(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(24) %117)
  %119 = getelementptr inbounds { <2 x float>, i64 }, ptr %25, i32 0, i32 0
  %120 = extractvalue { <2 x float>, i64 } %118, 0
  store <2 x float> %120, ptr %119, align 4
  %121 = getelementptr inbounds { <2 x float>, i64 }, ptr %25, i32 0, i32 1
  %122 = extractvalue { <2 x float>, i64 } %118, 1
  store i64 %122, ptr %121, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #8
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = call { <2 x float>, i64 } @_ZN10QCollision13ProjectToAxisER7QVectorRSt6vectorIP9QParticleSaIS4_EE(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(24) %123)
  %125 = getelementptr inbounds { <2 x float>, i64 }, ptr %26, i32 0, i32 0
  %126 = extractvalue { <2 x float>, i64 } %124, 0
  store <2 x float> %126, ptr %125, align 4
  %127 = getelementptr inbounds { <2 x float>, i64 }, ptr %26, i32 0, i32 1
  %128 = extractvalue { <2 x float>, i64 } %124, 1
  store i64 %128, ptr %127, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %26, i64 16, i1 false), !tbaa.struct !13
  %129 = getelementptr inbounds { <2 x float>, i64 }, ptr %28, i32 0, i32 0
  %130 = load <2 x float>, ptr %129, align 4
  %131 = getelementptr inbounds { <2 x float>, i64 }, ptr %28, i32 0, i32 1
  %132 = load i64, ptr %131, align 4
  %133 = call noundef float @_ZNK10QCollision7Project7OverlapES0_(ptr noundef nonnull align 4 dereferenceable(16) %25, <2 x float> %130, i64 %132)
  store float %133, ptr %27, align 4, !tbaa !11
  %134 = load float, ptr %27, align 4, !tbaa !11
  %135 = fcmp oge float %134, 0.000000e+00
  br i1 %135, label %136, label %137

136:                                              ; preds = %94
  store i32 1, ptr %17, align 4
  br label %148

137:                                              ; preds = %94
  %138 = load float, ptr %27, align 4, !tbaa !11
  %139 = call noundef float @_ZSt3absf(float noundef %138)
  store float %139, ptr %27, align 4, !tbaa !11
  %140 = load float, ptr %27, align 4, !tbaa !11
  %141 = load float, ptr %13, align 4, !tbaa !11
  %142 = fcmp olt float %140, %141
  br i1 %142, label %143, label %145

143:                                              ; preds = %137
  %144 = load float, ptr %27, align 4, !tbaa !11
  store float %144, ptr %13, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %20, i64 8, i1 false), !tbaa.struct !14
  br label %145

145:                                              ; preds = %143, %137
  %146 = load i32, ptr %15, align 4, !tbaa !9
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %15, align 4, !tbaa !9
  store i32 0, ptr %17, align 4
  br label %148

148:                                              ; preds = %145, %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  %149 = load i32, ptr %17, align 4
  switch i32 %149, label %154 [
    i32 0, label %150
  ]

150:                                              ; preds = %148
  br label %151

151:                                              ; preds = %150
  %152 = load i32, ptr %16, align 4, !tbaa !9
  %153 = add i32 %152, 1
  store i32 %153, ptr %16, align 4, !tbaa !9
  br label %77, !llvm.loop !15

154:                                              ; preds = %148, %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  %155 = load i32, ptr %17, align 4
  switch i32 %155, label %366 [
    i32 2, label %156
  ]

156:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #8
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = call { <2 x float>, i64 } @_ZN10QCollision13ProjectToAxisER7QVectorRSt6vectorIP9QParticleSaIS4_EE(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(24) %157)
  %159 = getelementptr inbounds { <2 x float>, i64 }, ptr %29, i32 0, i32 0
  %160 = extractvalue { <2 x float>, i64 } %158, 0
  store <2 x float> %160, ptr %159, align 4
  %161 = getelementptr inbounds { <2 x float>, i64 }, ptr %29, i32 0, i32 1
  %162 = extractvalue { <2 x float>, i64 } %158, 1
  store i64 %162, ptr %161, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #8
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = call { <2 x float>, i64 } @_ZN10QCollision13ProjectToAxisER7QVectorRSt6vectorIP9QParticleSaIS4_EE(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(24) %163)
  %165 = getelementptr inbounds { <2 x float>, i64 }, ptr %30, i32 0, i32 0
  %166 = extractvalue { <2 x float>, i64 } %164, 0
  store <2 x float> %166, ptr %165, align 4
  %167 = getelementptr inbounds { <2 x float>, i64 }, ptr %30, i32 0, i32 1
  %168 = extractvalue { <2 x float>, i64 } %164, 1
  store i64 %168, ptr %167, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %169 = getelementptr inbounds %"struct.QCollision::Project", ptr %29, i32 0, i32 3
  %170 = load i32, ptr %169, align 4, !tbaa !17
  store i32 %170, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %171 = getelementptr inbounds %"struct.QCollision::Project", ptr %30, i32 0, i32 2
  %172 = load i32, ptr %171, align 4, !tbaa !19
  store i32 %172, ptr %32, align 4, !tbaa !9
  %173 = getelementptr inbounds %"struct.QCollision::Project", ptr %30, i32 0, i32 0
  %174 = load float, ptr %173, align 4, !tbaa !20
  %175 = getelementptr inbounds %"struct.QCollision::Project", ptr %29, i32 0, i32 0
  %176 = load float, ptr %175, align 4, !tbaa !20
  %177 = fcmp olt float %174, %176
  br i1 %177, label %178, label %183

178:                                              ; preds = %156
  %179 = getelementptr inbounds %"struct.QCollision::Project", ptr %29, i32 0, i32 2
  %180 = load i32, ptr %179, align 4, !tbaa !19
  store i32 %180, ptr %31, align 4, !tbaa !9
  %181 = getelementptr inbounds %"struct.QCollision::Project", ptr %30, i32 0, i32 3
  %182 = load i32, ptr %181, align 4, !tbaa !17
  store i32 %182, ptr %32, align 4, !tbaa !9
  br label %183

183:                                              ; preds = %178, %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %184 = load i32, ptr %31, align 4, !tbaa !9
  %185 = sub nsw i32 %184, 1
  %186 = load i32, ptr %7, align 4, !tbaa !9
  %187 = add nsw i32 %185, %186
  %188 = load i32, ptr %7, align 4, !tbaa !9
  %189 = srem i32 %187, %188
  store i32 %189, ptr %33, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %190 = load i32, ptr %31, align 4, !tbaa !9
  store i32 %190, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %191 = load i32, ptr %31, align 4, !tbaa !9
  %192 = add nsw i32 %191, 1
  %193 = load i32, ptr %7, align 4, !tbaa !9
  %194 = srem i32 %192, %193
  store i32 %194, ptr %35, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = load i32, ptr %35, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %195, i64 noundef %197) #8
  %199 = load ptr, ptr %198, align 8, !tbaa !5
  %200 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %199)
  store <2 x float> %200, ptr %37, align 4
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  %202 = load i32, ptr %34, align 4, !tbaa !9
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %201, i64 noundef %203) #8
  %205 = load ptr, ptr %204, align 8, !tbaa !5
  %206 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %205)
  store <2 x float> %206, ptr %38, align 4
  %207 = load <2 x float>, ptr %37, align 4
  %208 = load <2 x float>, ptr %38, align 4
  %209 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %207, <2 x float> %208)
  store <2 x float> %209, ptr %36, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  %211 = load i32, ptr %34, align 4, !tbaa !9
  %212 = sext i32 %211 to i64
  %213 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %210, i64 noundef %212) #8
  %214 = load ptr, ptr %213, align 8, !tbaa !5
  %215 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %214)
  store <2 x float> %215, ptr %40, align 4
  %216 = load ptr, ptr %4, align 8, !tbaa !5
  %217 = load i32, ptr %33, align 4, !tbaa !9
  %218 = sext i32 %217 to i64
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %216, i64 noundef %218) #8
  %220 = load ptr, ptr %219, align 8, !tbaa !5
  %221 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %220)
  store <2 x float> %221, ptr %41, align 4
  %222 = load <2 x float>, ptr %40, align 4
  %223 = load <2 x float>, ptr %41, align 4
  %224 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %222, <2 x float> %223)
  store <2 x float> %224, ptr %39, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 4 %14, i64 8, i1 false), !tbaa.struct !14
  %225 = load <2 x float>, ptr %43, align 4
  %226 = call noundef float @_ZNK7QVector3DotES_(ptr noundef nonnull align 4 dereferenceable(8) %36, <2 x float> %225)
  %227 = call noundef float @_ZSt3absf(float noundef %226)
  store float %227, ptr %42, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 4 %14, i64 8, i1 false), !tbaa.struct !14
  %228 = load <2 x float>, ptr %45, align 4
  %229 = call noundef float @_ZNK7QVector3DotES_(ptr noundef nonnull align 4 dereferenceable(8) %39, <2 x float> %228)
  %230 = call noundef float @_ZSt3absf(float noundef %229)
  store float %230, ptr %44, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %46) #8
  %231 = load ptr, ptr %4, align 8, !tbaa !5
  %232 = load i32, ptr %34, align 4, !tbaa !9
  %233 = sext i32 %232 to i64
  %234 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %231, i64 noundef %233) #8
  %235 = load ptr, ptr %234, align 8, !tbaa !5
  store ptr %235, ptr %46, align 8, !tbaa !5
  %236 = getelementptr inbounds ptr, ptr %46, i64 1
  %237 = load ptr, ptr %4, align 8, !tbaa !5
  %238 = load i32, ptr %35, align 4, !tbaa !9
  %239 = sext i32 %238 to i64
  %240 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %237, i64 noundef %239) #8
  %241 = load ptr, ptr %240, align 8, !tbaa !5
  store ptr %241, ptr %236, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #8
  %242 = load float, ptr %42, align 4, !tbaa !11
  store float %242, ptr %47, align 4, !tbaa !11
  %243 = load float, ptr %44, align 4, !tbaa !11
  %244 = load float, ptr %42, align 4, !tbaa !11
  %245 = fcmp olt float %243, %244
  br i1 %245, label %246, label %260

246:                                              ; preds = %183
  %247 = load ptr, ptr %4, align 8, !tbaa !5
  %248 = load i32, ptr %33, align 4, !tbaa !9
  %249 = sext i32 %248 to i64
  %250 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %247, i64 noundef %249) #8
  %251 = load ptr, ptr %250, align 8, !tbaa !5
  %252 = getelementptr inbounds [2 x ptr], ptr %46, i64 0, i64 0
  store ptr %251, ptr %252, align 16, !tbaa !5
  %253 = load ptr, ptr %4, align 8, !tbaa !5
  %254 = load i32, ptr %34, align 4, !tbaa !9
  %255 = sext i32 %254 to i64
  %256 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %253, i64 noundef %255) #8
  %257 = load ptr, ptr %256, align 8, !tbaa !5
  %258 = getelementptr inbounds [2 x ptr], ptr %46, i64 0, i64 1
  store ptr %257, ptr %258, align 8, !tbaa !5
  %259 = load float, ptr %44, align 4, !tbaa !11
  store float %259, ptr %47, align 4, !tbaa !11
  br label %260

260:                                              ; preds = %246, %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #8
  %261 = load i32, ptr %32, align 4, !tbaa !9
  %262 = sub nsw i32 %261, 1
  %263 = load i32, ptr %8, align 4, !tbaa !9
  %264 = add nsw i32 %262, %263
  %265 = load i32, ptr %8, align 4, !tbaa !9
  %266 = srem i32 %264, %265
  store i32 %266, ptr %48, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #8
  %267 = load i32, ptr %32, align 4, !tbaa !9
  store i32 %267, ptr %49, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #8
  %268 = load i32, ptr %32, align 4, !tbaa !9
  %269 = add nsw i32 %268, 1
  %270 = load i32, ptr %8, align 4, !tbaa !9
  %271 = srem i32 %269, %270
  store i32 %271, ptr %50, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #8
  %272 = load ptr, ptr %5, align 8, !tbaa !5
  %273 = load i32, ptr %50, align 4, !tbaa !9
  %274 = sext i32 %273 to i64
  %275 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %272, i64 noundef %274) #8
  %276 = load ptr, ptr %275, align 8, !tbaa !5
  %277 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %276)
  store <2 x float> %277, ptr %52, align 4
  %278 = load ptr, ptr %5, align 8, !tbaa !5
  %279 = load i32, ptr %49, align 4, !tbaa !9
  %280 = sext i32 %279 to i64
  %281 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %278, i64 noundef %280) #8
  %282 = load ptr, ptr %281, align 8, !tbaa !5
  %283 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %282)
  store <2 x float> %283, ptr %53, align 4
  %284 = load <2 x float>, ptr %52, align 4
  %285 = load <2 x float>, ptr %53, align 4
  %286 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %284, <2 x float> %285)
  store <2 x float> %286, ptr %51, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #8
  %287 = load ptr, ptr %5, align 8, !tbaa !5
  %288 = load i32, ptr %49, align 4, !tbaa !9
  %289 = sext i32 %288 to i64
  %290 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %287, i64 noundef %289) #8
  %291 = load ptr, ptr %290, align 8, !tbaa !5
  %292 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %291)
  store <2 x float> %292, ptr %55, align 4
  %293 = load ptr, ptr %5, align 8, !tbaa !5
  %294 = load i32, ptr %48, align 4, !tbaa !9
  %295 = sext i32 %294 to i64
  %296 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %293, i64 noundef %295) #8
  %297 = load ptr, ptr %296, align 8, !tbaa !5
  %298 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %297)
  store <2 x float> %298, ptr %56, align 4
  %299 = load <2 x float>, ptr %55, align 4
  %300 = load <2 x float>, ptr %56, align 4
  %301 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %299, <2 x float> %300)
  store <2 x float> %301, ptr %54, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %58, ptr align 4 %14, i64 8, i1 false), !tbaa.struct !14
  %302 = load <2 x float>, ptr %58, align 4
  %303 = call noundef float @_ZNK7QVector3DotES_(ptr noundef nonnull align 4 dereferenceable(8) %51, <2 x float> %302)
  %304 = call noundef float @_ZSt3absf(float noundef %303)
  store float %304, ptr %57, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %60, ptr align 4 %14, i64 8, i1 false), !tbaa.struct !14
  %305 = load <2 x float>, ptr %60, align 4
  %306 = call noundef float @_ZNK7QVector3DotES_(ptr noundef nonnull align 4 dereferenceable(8) %54, <2 x float> %305)
  %307 = call noundef float @_ZSt3absf(float noundef %306)
  store float %307, ptr %59, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %61) #8
  %308 = load ptr, ptr %5, align 8, !tbaa !5
  %309 = load i32, ptr %49, align 4, !tbaa !9
  %310 = sext i32 %309 to i64
  %311 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %308, i64 noundef %310) #8
  %312 = load ptr, ptr %311, align 8, !tbaa !5
  store ptr %312, ptr %61, align 8, !tbaa !5
  %313 = getelementptr inbounds ptr, ptr %61, i64 1
  %314 = load ptr, ptr %5, align 8, !tbaa !5
  %315 = load i32, ptr %50, align 4, !tbaa !9
  %316 = sext i32 %315 to i64
  %317 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %314, i64 noundef %316) #8
  %318 = load ptr, ptr %317, align 8, !tbaa !5
  store ptr %318, ptr %313, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %62) #8
  %319 = load float, ptr %57, align 4, !tbaa !11
  store float %319, ptr %62, align 4, !tbaa !11
  %320 = load float, ptr %59, align 4, !tbaa !11
  %321 = load float, ptr %57, align 4, !tbaa !11
  %322 = fcmp olt float %320, %321
  br i1 %322, label %323, label %337

323:                                              ; preds = %260
  %324 = load ptr, ptr %5, align 8, !tbaa !5
  %325 = load i32, ptr %48, align 4, !tbaa !9
  %326 = sext i32 %325 to i64
  %327 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %324, i64 noundef %326) #8
  %328 = load ptr, ptr %327, align 8, !tbaa !5
  %329 = getelementptr inbounds [2 x ptr], ptr %61, i64 0, i64 0
  store ptr %328, ptr %329, align 16, !tbaa !5
  %330 = load ptr, ptr %5, align 8, !tbaa !5
  %331 = load i32, ptr %49, align 4, !tbaa !9
  %332 = sext i32 %331 to i64
  %333 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %330, i64 noundef %332) #8
  %334 = load ptr, ptr %333, align 8, !tbaa !5
  %335 = getelementptr inbounds [2 x ptr], ptr %61, i64 0, i64 1
  store ptr %334, ptr %335, align 8, !tbaa !5
  %336 = load float, ptr %59, align 4, !tbaa !11
  store float %336, ptr %62, align 4, !tbaa !11
  br label %337

337:                                              ; preds = %323, %260
  %338 = load float, ptr %62, align 4, !tbaa !11
  %339 = load float, ptr %47, align 4, !tbaa !11
  %340 = fcmp olt float %338, %339
  br i1 %340, label %341, label %353

341:                                              ; preds = %337
  %342 = getelementptr inbounds [2 x ptr], ptr %61, i64 0, i64 0
  %343 = getelementptr inbounds [2 x ptr], ptr %46, i64 0, i64 0
  %344 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN10QCollision20ClipContactParticlesEPP9QParticleS2_RSt6vectorIPNS_7ContactESaIS5_EE(ptr noundef %342, ptr noundef %343, ptr noundef nonnull align 8 dereferenceable(24) %344)
  %345 = load ptr, ptr %6, align 8, !tbaa !5
  %346 = call noundef i64 @_ZNKSt6vectorIPN10QCollision7ContactESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %345) #8
  %347 = icmp eq i64 %346, 0
  br i1 %347, label %348, label %352

348:                                              ; preds = %341
  %349 = getelementptr inbounds [2 x ptr], ptr %46, i64 0, i64 0
  %350 = getelementptr inbounds [2 x ptr], ptr %61, i64 0, i64 0
  %351 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN10QCollision20ClipContactParticlesEPP9QParticleS2_RSt6vectorIPNS_7ContactESaIS5_EE(ptr noundef %349, ptr noundef %350, ptr noundef nonnull align 8 dereferenceable(24) %351)
  br label %352

352:                                              ; preds = %348, %341
  br label %365

353:                                              ; preds = %337
  %354 = getelementptr inbounds [2 x ptr], ptr %46, i64 0, i64 0
  %355 = getelementptr inbounds [2 x ptr], ptr %61, i64 0, i64 0
  %356 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN10QCollision20ClipContactParticlesEPP9QParticleS2_RSt6vectorIPNS_7ContactESaIS5_EE(ptr noundef %354, ptr noundef %355, ptr noundef nonnull align 8 dereferenceable(24) %356)
  %357 = load ptr, ptr %6, align 8, !tbaa !5
  %358 = call noundef i64 @_ZNKSt6vectorIPN10QCollision7ContactESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %357) #8
  %359 = icmp eq i64 %358, 0
  br i1 %359, label %360, label %364

360:                                              ; preds = %353
  %361 = getelementptr inbounds [2 x ptr], ptr %61, i64 0, i64 0
  %362 = getelementptr inbounds [2 x ptr], ptr %46, i64 0, i64 0
  %363 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN10QCollision20ClipContactParticlesEPP9QParticleS2_RSt6vectorIPNS_7ContactESaIS5_EE(ptr noundef %361, ptr noundef %362, ptr noundef nonnull align 8 dereferenceable(24) %363)
  br label %364

364:                                              ; preds = %360, %353
  br label %365

365:                                              ; preds = %364, %352
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %61) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  store i32 0, ptr %17, align 4
  br label %366

366:                                              ; preds = %365, %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  %367 = load i32, ptr %17, align 4
  switch i32 %367, label %369 [
    i32 0, label %368
    i32 1, label %368
  ]

368:                                              ; preds = %366, %366
  ret void

369:                                              ; preds = %366
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, i64 } @_ZN10QCollision13ProjectToAxisER7QVectorRSt6vectorIP9QParticleSaIS4_EE(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIPN10QCollision7ContactESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #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 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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"="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 = { 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 = !{!"float", !7, i64 0}
!13 = !{i64 0, i64 4, !11, i64 4, i64 4, !11, i64 8, i64 4, !9, i64 12, i64 4, !9}
!14 = !{i64 0, i64 4, !11, i64 4, i64 4, !11}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !10, i64 12}
!18 = !{!"_ZTSN10QCollision7ProjectE", !12, i64 0, !12, i64 4, !10, i64 8, !10, i64 12}
!19 = !{!18, !10, i64 8}
!20 = !{!18, !12, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.QVector = type { float, float }
%"struct.QCollision::Project" = type { float, float, i32, i32 }

@_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

; 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

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

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

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

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

; 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 #5 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: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #6 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10QCollision17PolygonAndPolygonERSt6vectorIP9QParticleSaIS2_EES5_RS0_IPNS_7ContactESaIS7_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #3 align 2 {
  %4 = alloca %struct.QVector, align 8
  %5 = alloca %struct.QVector, align 8
  %6 = alloca %struct.QVector, align 8
  %7 = alloca %struct.QVector, align 8
  %8 = alloca %"struct.QCollision::Project", align 8
  %9 = alloca %struct.QVector, align 8
  %10 = alloca %struct.QVector, align 8
  %11 = alloca [2 x ptr], align 16
  %12 = alloca %struct.QVector, align 8
  %13 = alloca %struct.QVector, align 8
  %14 = alloca [2 x ptr], align 16
  %15 = tail call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %16 = trunc i64 %15 to i32
  %17 = tail call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %18 = trunc i64 %17 to i32
  %19 = add i32 %18, %16
  %20 = load float, ptr @_ZN6QWorld14MAX_WORLD_SIZEE, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %21 = tail call <2 x float> @_ZN7QVector4ZeroEv()
  store <2 x float> %21, ptr %4, align 8
  %.not138144.not = icmp eq i32 %19, 0
  br i1 %.not138144.not, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %22 = getelementptr inbounds i8, ptr %8, i64 8
  br label %23

23:                                               ; preds = %.lr.ph, %53
  %.0115150 = phi ptr [ %0, %.lr.ph ], [ %.1, %53 ]
  %.0116149 = phi ptr [ %1, %.lr.ph ], [ %.1117, %53 ]
  %.0118148 = phi i32 [ %16, %.lr.ph ], [ %.1119, %53 ]
  %.0120147 = phi float [ %20, %.lr.ph ], [ %.2.ph, %53 ]
  %.0122146 = phi i32 [ 0, %.lr.ph ], [ %30, %53 ]
  %.0125145 = phi i32 [ 0, %.lr.ph ], [ %54, %53 ]
  %.not = icmp uge i32 %.0125145, %16
  %24 = icmp eq ptr %.0115150, %0
  %or.cond = and i1 %.not, %24
  br i1 %or.cond, label %25, label %26

25:                                               ; preds = %23
  br label %26

26:                                               ; preds = %25, %23
  %.1123 = phi i32 [ 0, %25 ], [ %.0122146, %23 ]
  %.1119 = phi i32 [ %18, %25 ], [ %.0118148, %23 ]
  %.1117 = phi ptr [ %0, %25 ], [ %.0116149, %23 ]
  %.1 = phi ptr [ %1, %25 ], [ %.0115150, %23 ]
  %27 = sext i32 %.1123 to i64
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %.1, i64 noundef %27) #7
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = add nsw i32 %.1123, 1
  %31 = srem i32 %30, %.1119
  %32 = sext i32 %31 to i64
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %.1, i64 noundef %32) #7
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %35 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %34)
  %36 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %29)
  %37 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %35, <2 x float> %36)
  store <2 x float> %37, ptr %7, align 8
  %38 = call <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8) %7)
  store <2 x float> %38, ptr %6, align 8
  %39 = call <2 x float> @_ZNK7QVector13PerpendicularEv(ptr noundef nonnull align 4 dereferenceable(8) %6)
  store <2 x float> %39, ptr %5, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  %40 = call { <2 x float>, i64 } @_ZN10QCollision13ProjectToAxisER7QVectorRSt6vectorIP9QParticleSaIS4_EE(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(24) %.1)
  %41 = extractvalue { <2 x float>, i64 } %40, 0
  store <2 x float> %41, ptr %8, align 8
  %42 = extractvalue { <2 x float>, i64 } %40, 1
  store i64 %42, ptr %22, align 8
  %43 = call { <2 x float>, i64 } @_ZN10QCollision13ProjectToAxisER7QVectorRSt6vectorIP9QParticleSaIS4_EE(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(24) %.1117)
  %44 = extractvalue { <2 x float>, i64 } %43, 0
  %45 = extractvalue { <2 x float>, i64 } %43, 1
  %46 = call noundef float @_ZNK10QCollision7Project7OverlapES0_(ptr noundef nonnull align 4 dereferenceable(16) %8, <2 x float> %44, i64 %45)
  %47 = fcmp ult float %46, 0.000000e+00
  br i1 %47, label %48, label %55

48:                                               ; preds = %26
  %49 = call noundef float @_ZSt3absf(float noundef %46)
  %50 = fcmp olt float %49, %.0120147
  br i1 %50, label %51, label %53

51:                                               ; preds = %48
  %52 = load i64, ptr %5, align 8
  store i64 %52, ptr %4, align 8
  br label %53

53:                                               ; preds = %48, %51
  %.2.ph = phi float [ %.0120147, %48 ], [ %49, %51 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %54 = add nuw i32 %.0125145, 1
  %exitcond.not = icmp eq i32 %54, %19
  br i1 %exitcond.not, label %.critedge, label %23, !llvm.loop !11

55:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %149

.critedge:                                        ; preds = %53, %3
  %56 = call { <2 x float>, i64 } @_ZN10QCollision13ProjectToAxisER7QVectorRSt6vectorIP9QParticleSaIS4_EE(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(24) %0)
  %57 = extractvalue { <2 x float>, i64 } %56, 0
  %58 = extractvalue { <2 x float>, i64 } %56, 1
  %59 = call { <2 x float>, i64 } @_ZN10QCollision13ProjectToAxisER7QVectorRSt6vectorIP9QParticleSaIS4_EE(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %60 = extractvalue { <2 x float>, i64 } %59, 0
  %61 = extractvalue { <2 x float>, i64 } %59, 1
  %.sroa.445.12.extract.shift = lshr i64 %58, 32
  %.sroa.043.0.vec.extract = extractelement <2 x float> %60, i64 0
  %.sroa.044.0.vec.extract = extractelement <2 x float> %57, i64 0
  %62 = fcmp olt float %.sroa.043.0.vec.extract, %.sroa.044.0.vec.extract
  %.sroa.4.12.extract.shift = lshr i64 %61, 32
  %.0129.in = select i1 %62, i64 %.sroa.4.12.extract.shift, i64 %61
  %.0128.in = select i1 %62, i64 %58, i64 %.sroa.445.12.extract.shift
  %.0128 = trunc i64 %.0128.in to i32
  %.0129 = trunc i64 %.0129.in to i32
  %63 = add i32 %16, -1
  %64 = add i32 %63, %.0128
  %65 = srem i32 %64, %16
  %66 = add nsw i32 %.0128, 1
  %67 = srem i32 %66, %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %68 = sext i32 %67 to i64
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %68) #7
  %70 = load ptr, ptr %69, align 8, !tbaa !9
  %71 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %70)
  %sext = shl i64 %.0128.in, 32
  %72 = ashr exact i64 %sext, 32
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %72) #7
  %74 = load ptr, ptr %73, align 8, !tbaa !9
  %75 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %74)
  %76 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %71, <2 x float> %75)
  store <2 x float> %76, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %72) #7
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %78)
  %80 = sext i32 %65 to i64
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %80) #7
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %83 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %82)
  %84 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %79, <2 x float> %83)
  store <2 x float> %84, ptr %10, align 8
  %.sroa.022.0.copyload = load <2 x float>, ptr %4, align 8
  %85 = call noundef float @_ZNK7QVector3DotES_(ptr noundef nonnull align 4 dereferenceable(8) %9, <2 x float> %.sroa.022.0.copyload)
  %86 = call noundef float @_ZSt3absf(float noundef %85)
  %.sroa.019.0.copyload = load <2 x float>, ptr %4, align 8
  %87 = call noundef float @_ZNK7QVector3DotES_(ptr noundef nonnull align 4 dereferenceable(8) %10, <2 x float> %.sroa.019.0.copyload)
  %88 = call noundef float @_ZSt3absf(float noundef %87)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %72) #7
  %90 = load ptr, ptr %89, align 8, !tbaa !9
  store ptr %90, ptr %11, align 16, !tbaa !9
  %91 = getelementptr inbounds i8, ptr %11, i64 8
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %68) #7
  %93 = load ptr, ptr %92, align 8, !tbaa !9
  store ptr %93, ptr %91, align 8, !tbaa !9
  %94 = fcmp olt float %88, %86
  br i1 %94, label %95, label %100

95:                                               ; preds = %.critedge
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %80) #7
  %97 = load ptr, ptr %96, align 8, !tbaa !9
  store ptr %97, ptr %11, align 16, !tbaa !9
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %72) #7
  %99 = load ptr, ptr %98, align 8, !tbaa !9
  store ptr %99, ptr %91, align 8, !tbaa !9
  br label %100

100:                                              ; preds = %95, %.critedge
  %.0130 = phi float [ %88, %95 ], [ %86, %.critedge ]
  %101 = add i32 %18, -1
  %102 = add i32 %101, %.0129
  %103 = srem i32 %102, %18
  %104 = add nsw i32 %.0129, 1
  %105 = srem i32 %104, %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %106) #7
  %108 = load ptr, ptr %107, align 8, !tbaa !9
  %109 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %108)
  %sext139 = shl i64 %.0129.in, 32
  %110 = ashr exact i64 %sext139, 32
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %110) #7
  %112 = load ptr, ptr %111, align 8, !tbaa !9
  %113 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %112)
  %114 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %109, <2 x float> %113)
  store <2 x float> %114, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %110) #7
  %116 = load ptr, ptr %115, align 8, !tbaa !9
  %117 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %116)
  %118 = sext i32 %103 to i64
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %118) #7
  %120 = load ptr, ptr %119, align 8, !tbaa !9
  %121 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %120)
  %122 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %117, <2 x float> %121)
  store <2 x float> %122, ptr %13, align 8
  %.sroa.04.0.copyload = load <2 x float>, ptr %4, align 8
  %123 = call noundef float @_ZNK7QVector3DotES_(ptr noundef nonnull align 4 dereferenceable(8) %12, <2 x float> %.sroa.04.0.copyload)
  %124 = call noundef float @_ZSt3absf(float noundef %123)
  %.sroa.0.0.copyload = load <2 x float>, ptr %4, align 8
  %125 = call noundef float @_ZNK7QVector3DotES_(ptr noundef nonnull align 4 dereferenceable(8) %13, <2 x float> %.sroa.0.0.copyload)
  %126 = call noundef float @_ZSt3absf(float noundef %125)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #7
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %110) #7
  %128 = load ptr, ptr %127, align 8, !tbaa !9
  store ptr %128, ptr %14, align 16, !tbaa !9
  %129 = getelementptr inbounds i8, ptr %14, i64 8
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %106) #7
  %131 = load ptr, ptr %130, align 8, !tbaa !9
  store ptr %131, ptr %129, align 8, !tbaa !9
  %132 = fcmp olt float %126, %124
  br i1 %132, label %133, label %138

133:                                              ; preds = %100
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %118) #7
  %135 = load ptr, ptr %134, align 8, !tbaa !9
  store ptr %135, ptr %14, align 16, !tbaa !9
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %110) #7
  %137 = load ptr, ptr %136, align 8, !tbaa !9
  store ptr %137, ptr %129, align 8, !tbaa !9
  br label %138

138:                                              ; preds = %133, %100
  %.0 = phi float [ %126, %133 ], [ %124, %100 ]
  %139 = fcmp olt float %.0, %.0130
  br i1 %139, label %140, label %144

140:                                              ; preds = %138
  call void @_ZN10QCollision20ClipContactParticlesEPP9QParticleS2_RSt6vectorIPNS_7ContactESaIS5_EE(ptr noundef nonnull %14, ptr noundef nonnull %11, ptr noundef nonnull align 8 dereferenceable(24) %2)
  %141 = call noundef i64 @_ZNKSt6vectorIPN10QCollision7ContactESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %142 = icmp eq i64 %141, 0
  br i1 %142, label %143, label %148

143:                                              ; preds = %140
  call void @_ZN10QCollision20ClipContactParticlesEPP9QParticleS2_RSt6vectorIPNS_7ContactESaIS5_EE(ptr noundef nonnull %11, ptr noundef nonnull %14, ptr noundef nonnull align 8 dereferenceable(24) %2)
  br label %148

144:                                              ; preds = %138
  call void @_ZN10QCollision20ClipContactParticlesEPP9QParticleS2_RSt6vectorIPNS_7ContactESaIS5_EE(ptr noundef nonnull %11, ptr noundef nonnull %14, ptr noundef nonnull align 8 dereferenceable(24) %2)
  %145 = call noundef i64 @_ZNKSt6vectorIPN10QCollision7ContactESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %146 = icmp eq i64 %145, 0
  br i1 %146, label %147, label %148

147:                                              ; preds = %144
  call void @_ZN10QCollision20ClipContactParticlesEPP9QParticleS2_RSt6vectorIPNS_7ContactESaIS5_EE(ptr noundef nonnull %14, ptr noundef nonnull %11, ptr noundef nonnull align 8 dereferenceable(24) %2)
  br label %148

148:                                              ; preds = %144, %147, %140, %143
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %149

149:                                              ; preds = %55, %148
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, i64 } @_ZN10QCollision13ProjectToAxisER7QVectorRSt6vectorIP9QParticleSaIS4_EE(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIPN10QCollision7ContactESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_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 = { 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 #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 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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