; LLVM IR from erayzesen/QuarkPhysics :: QuarkPhysics/qworld.ll (ZN6QWorld21RemoveMatchingSpringsEP5QBody)

; 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.__gnu_cxx::__normal_iterator.130" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.129" = type { ptr }
%class.QWorld = type { %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5", %"class.std::vector.10", %"class.std::vector.15", %"class.std::unordered_set", %"class.std::vector.25", ptr, i8, %struct.QVector, i8, i8, i32, float, float, float, i32, i32, %"class.std::vector.30" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<QJoint *, std::allocator<QJoint *>>::_Vector_impl" }
%"struct.std::_Vector_base<QJoint *, std::allocator<QJoint *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QJoint *, std::allocator<QJoint *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QJoint *, std::allocator<QJoint *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<QSpring *, std::allocator<QSpring *>>::_Vector_impl" }
%"struct.std::_Vector_base<QSpring *, std::allocator<QSpring *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QSpring *, std::allocator<QSpring *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QSpring *, std::allocator<QSpring *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<QRaycast *, std::allocator<QRaycast *>>::_Vector_impl" }
%"struct.std::_Vector_base<QRaycast *, std::allocator<QRaycast *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QRaycast *, std::allocator<QRaycast *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QRaycast *, std::allocator<QRaycast *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<QGizmo *, std::allocator<QGizmo *>>::_Vector_impl" }
%"struct.std::_Vector_base<QGizmo *, std::allocator<QGizmo *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QGizmo *, std::allocator<QGizmo *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QGizmo *, std::allocator<QGizmo *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<std::vector<QBody *>, std::allocator<std::vector<QBody *>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<QBody *>, std::allocator<std::vector<QBody *>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<QBody *>, std::allocator<std::vector<QBody *>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<QBody *>, std::allocator<std::vector<QBody *>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<QManifold, std::allocator<QManifold>>::_Vector_impl" }
%"struct.std::_Vector_base<QManifold, std::allocator<QManifold>>::_Vector_impl" = type { %"struct.std::_Vector_base<QManifold, std::allocator<QManifold>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QManifold, std::allocator<QManifold>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.QVector = type { float, float }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<QBody *, std::allocator<QBody *>>::_Vector_impl" }
%"struct.std::_Vector_base<QBody *, std::allocator<QBody *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QBody *, std::allocator<QBody *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QBody *, std::allocator<QBody *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.QMesh = type { %"class.std::vector.44", %struct.QVector, %struct.QVector, float, float, %"class.std::vector.0", %"class.std::vector.49", %"class.std::vector.44", %"class.std::vector.54", %"class.std::vector.59", float, ptr, i32, %"class.std::vector.64", i8, i8, %"class.std::vector.69", float, i8, i8, i8, i8 }
%"class.std::vector.49" = type { %"struct.std::_Vector_base.50" }
%"struct.std::_Vector_base.50" = type { %"struct.std::_Vector_base<QAngleConstraint *, std::allocator<QAngleConstraint *>>::_Vector_impl" }
%"struct.std::_Vector_base<QAngleConstraint *, std::allocator<QAngleConstraint *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QAngleConstraint *, std::allocator<QAngleConstraint *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QAngleConstraint *, std::allocator<QAngleConstraint *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.44" = type { %"struct.std::_Vector_base.45" }
%"struct.std::_Vector_base.45" = 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::vector.54" = type { %"struct.std::_Vector_base.55" }
%"struct.std::_Vector_base.55" = type { %"struct.std::_Vector_base<std::vector<QParticle *>, std::allocator<std::vector<QParticle *>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<QParticle *>, std::allocator<std::vector<QParticle *>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<QParticle *>, std::allocator<std::vector<QParticle *>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<QParticle *>, std::allocator<std::vector<QParticle *>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.59" = type { %"struct.std::_Vector_base.60" }
%"struct.std::_Vector_base.60" = type { %"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl" }
%"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl" = type { %"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.64" = type { %"struct.std::_Vector_base.65" }
%"struct.std::_Vector_base.65" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.69" = type { %"struct.std::_Vector_base.70" }
%"struct.std::_Vector_base.70" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN6QWorld21RemoveMatchingSpringsEP5QBody(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.130", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.129", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.129", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.129", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %13

13:                                               ; preds = %85, %2
  %14 = load i32, ptr %5, align 4, !tbaa !9
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds %class.QWorld, ptr %12, i32 0, i32 1
  %17 = call noundef i64 @_ZNKSt6vectorIP7QSpringSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #3
  %18 = icmp ult i64 %15, %17
  br i1 %18, label %19, label %86

19:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %20 = getelementptr inbounds %class.QWorld, ptr %12, i32 0, i32 1
  %21 = load i32, ptr %5, align 4, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7QSpringSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %22) #3
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %24, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #3
  store i8 0, ptr %7, align 1, !tbaa !11
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = call noundef ptr @_ZN7QSpring12GetParticleAEv(ptr noundef nonnull align 8 dereferenceable(39) %25)
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %44

28:                                               ; preds = %19
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = call noundef ptr @_ZN7QSpring12GetParticleAEv(ptr noundef nonnull align 8 dereferenceable(39) %29)
  %31 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %30)
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %43

33:                                               ; preds = %28
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = call noundef ptr @_ZN7QSpring12GetParticleAEv(ptr noundef nonnull align 8 dereferenceable(39) %34)
  %36 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %35)
  %37 = getelementptr inbounds %struct.QMesh, ptr %36, i32 0, i32 11
  %38 = load ptr, ptr %37, align 8, !tbaa !13
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = icmp eq ptr %38, %39
  br i1 %40, label %41, label %42

41:                                               ; preds = %33
  store i8 1, ptr %7, align 1, !tbaa !11
  br label %42

42:                                               ; preds = %41, %33
  br label %43

43:                                               ; preds = %42, %28
  br label %44

44:                                               ; preds = %43, %19
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = call noundef ptr @_ZN7QSpring12GetParticleBEv(ptr noundef nonnull align 8 dereferenceable(39) %45)
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %64

48:                                               ; preds = %44
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = call noundef ptr @_ZN7QSpring12GetParticleBEv(ptr noundef nonnull align 8 dereferenceable(39) %49)
  %51 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %50)
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %63

53:                                               ; preds = %48
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = call noundef ptr @_ZN7QSpring12GetParticleBEv(ptr noundef nonnull align 8 dereferenceable(39) %54)
  %56 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %55)
  %57 = getelementptr inbounds %struct.QMesh, ptr %56, i32 0, i32 11
  %58 = load ptr, ptr %57, align 8, !tbaa !13
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = icmp eq ptr %58, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %53
  store i8 1, ptr %7, align 1, !tbaa !11
  br label %62

62:                                               ; preds = %61, %53
  br label %63

63:                                               ; preds = %62, %48
  br label %64

64:                                               ; preds = %63, %44
  %65 = load i8, ptr %7, align 1, !tbaa !11, !range !46, !noundef !47
  %66 = trunc i8 %65 to i1
  %67 = zext i1 %66 to i32
  %68 = icmp eq i32 %67, 1
  br i1 %68, label %69, label %82

69:                                               ; preds = %64
  %70 = getelementptr inbounds %class.QWorld, ptr %12, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %71 = getelementptr inbounds %class.QWorld, ptr %12, i32 0, i32 1
  %72 = call ptr @_ZNSt6vectorIP7QSpringSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #3
  %73 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.129", ptr %10, i32 0, i32 0
  store ptr %72, ptr %73, align 8
  %74 = load i32, ptr %5, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP7QSpringSt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %10, i64 noundef %75) #3
  %77 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.129", ptr %9, i32 0, i32 0
  store ptr %76, ptr %77, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP7QSpringSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #3
  %78 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.130", ptr %8, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8
  %80 = call ptr @_ZNSt6vectorIP7QSpringSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %70, ptr %79)
  %81 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.129", ptr %11, i32 0, i32 0
  store ptr %80, ptr %81, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %85

82:                                               ; preds = %64
  %83 = load i32, ptr %5, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %5, align 4, !tbaa !9
  br label %85

85:                                               ; preds = %82, %69
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %13, !llvm.loop !48

86:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  ret ptr %12
}

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !6, i64 176}
!14 = !{!"_ZTS5QMesh", !15, i64 0, !19, i64 24, !19, i64 32, !20, i64 40, !20, i64 44, !21, i64 48, !25, i64 72, !15, i64 96, !29, i64 120, !33, i64 144, !20, i64 168, !6, i64 176, !37, i64 184, !38, i64 192, !12, i64 216, !12, i64 217, !42, i64 224, !20, i64 248, !12, i64 252, !12, i64 253, !12, i64 254, !12, i64 255}
!15 = !{!"_ZTSSt6vectorIP9QParticleSaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIP9QParticleSaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIP9QParticleSaIS1_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIP9QParticleSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTS7QVector", !20, i64 0, !20, i64 4}
!20 = !{!"float", !7, i64 0}
!21 = !{!"_ZTSSt6vectorIP7QSpringSaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIP7QSpringSaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt6vectorIP16QAngleConstraintSaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIP16QAngleConstraintSaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIP16QAngleConstraintSaIS1_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIP16QAngleConstraintSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSSt6vectorIS_IP9QParticleSaIS1_EESaIS3_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!"_ZTSSt6vectorI7QVectorSaIS0_EE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseI7QVectorSaIS0_EE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseI7QVectorSaIS0_EE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseI7QVectorSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!37 = !{!"_ZTSN5QMesh18CollisionBehaviorsE", !7, i64 0}
!38 = !{!"_ZTSSt6vectorIS_IiSaIiEESaIS1_EE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE12_Vector_implE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!42 = !{!"_ZTSSt6vectorIfSaIfEE", !43, i64 0}
!43 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!46 = !{i8 0, i8 2}
!47 = !{}
!48 = distinct !{!48, !49}
!49 = !{!"llvm.loop.mustprogress"}


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

%"class.__gnu_cxx::__normal_iterator.130" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.129" = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull ptr @_ZN6QWorld21RemoveMatchingSpringsEP5QBody(ptr noundef nonnull returned align 8 dereferenceable(272) %0, ptr noundef readnone %1) local_unnamed_addr #1 align 2 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.130", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.129", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.129", align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 24
  %7 = tail call noundef i64 @_ZNKSt6vectorIP7QSpringSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  %.not21 = icmp eq i64 %7, 0
  br i1 %.not21, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2, %40
  %8 = phi i64 [ %41, %40 ], [ 0, %2 ]
  %.020 = phi i32 [ %.1, %40 ], [ 0, %2 ]
  %9 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP7QSpringSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %8) #3
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = call noundef ptr @_ZN7QSpring12GetParticleAEv(ptr noundef nonnull align 8 dereferenceable(39) %10)
  %.not = icmp eq ptr %11, null
  br i1 %.not, label %21, label %12

12:                                               ; preds = %.lr.ph
  %13 = call noundef ptr @_ZN7QSpring12GetParticleAEv(ptr noundef nonnull align 8 dereferenceable(39) %10)
  %14 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %13)
  %.not16 = icmp eq ptr %14, null
  br i1 %.not16, label %21, label %15

15:                                               ; preds = %12
  %16 = call noundef ptr @_ZN7QSpring12GetParticleAEv(ptr noundef nonnull align 8 dereferenceable(39) %10)
  %17 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %16)
  %18 = getelementptr inbounds i8, ptr %17, i64 176
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = icmp eq ptr %19, %1
  br label %21

21:                                               ; preds = %15, %12, %.lr.ph
  %.013 = phi i1 [ false, %12 ], [ false, %.lr.ph ], [ %20, %15 ]
  %22 = call noundef ptr @_ZN7QSpring12GetParticleBEv(ptr noundef nonnull align 8 dereferenceable(39) %10)
  %.not17 = icmp eq ptr %22, null
  br i1 %.not17, label %32, label %23

23:                                               ; preds = %21
  %24 = call noundef ptr @_ZN7QSpring12GetParticleBEv(ptr noundef nonnull align 8 dereferenceable(39) %10)
  %25 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %24)
  %.not18 = icmp eq ptr %25, null
  br i1 %.not18, label %32, label %26

26:                                               ; preds = %23
  %27 = call noundef ptr @_ZN7QSpring12GetParticleBEv(ptr noundef nonnull align 8 dereferenceable(39) %10)
  %28 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %27)
  %29 = getelementptr inbounds i8, ptr %28, i64 176
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = icmp eq ptr %30, %1
  %spec.select19 = select i1 %31, i1 true, i1 %.013
  br i1 %spec.select19, label %33, label %38

32:                                               ; preds = %23, %21
  br i1 %.013, label %33, label %38

33:                                               ; preds = %26, %32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %34 = call ptr @_ZNSt6vectorIP7QSpringSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  store ptr %34, ptr %5, align 8
  %35 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP7QSpringSt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %8) #3
  store ptr %35, ptr %4, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP7QSpringSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  %36 = load ptr, ptr %3, align 8
  %37 = call ptr @_ZNSt6vectorIP7QSpringSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr %36)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  br label %40

38:                                               ; preds = %26, %32
  %39 = add nsw i32 %.020, 1
  br label %40

40:                                               ; preds = %38, %33
  %.1 = phi i32 [ %.020, %33 ], [ %39, %38 ]
  %41 = sext i32 %.1 to i64
  %42 = call noundef i64 @_ZNKSt6vectorIP7QSpringSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  %43 = icmp ugt i64 %42, %41
  br i1 %43, label %.lr.ph, label %._crit_edge, !llvm.loop !43

._crit_edge:                                      ; preds = %40, %2
  ret ptr %0
}

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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, !6, i64 176}
!10 = !{!"_ZTS5QMesh", !11, i64 0, !15, i64 24, !15, i64 32, !16, i64 40, !16, i64 44, !17, i64 48, !21, i64 72, !11, i64 96, !25, i64 120, !29, i64 144, !16, i64 168, !6, i64 176, !33, i64 184, !34, i64 192, !38, i64 216, !38, i64 217, !39, i64 224, !16, i64 248, !38, i64 252, !38, i64 253, !38, i64 254, !38, i64 255}
!11 = !{!"_ZTSSt6vectorIP9QParticleSaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIP9QParticleSaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIP9QParticleSaIS1_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIP9QParticleSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"_ZTS7QVector", !16, i64 0, !16, i64 4}
!16 = !{!"float", !7, i64 0}
!17 = !{!"_ZTSSt6vectorIP7QSpringSaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIP7QSpringSaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorIP16QAngleConstraintSaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIP16QAngleConstraintSaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIP16QAngleConstraintSaIS1_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIP16QAngleConstraintSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt6vectorIS_IP9QParticleSaIS1_EESaIS3_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSSt6vectorI7QVectorSaIS0_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseI7QVectorSaIS0_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseI7QVectorSaIS0_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseI7QVectorSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!"_ZTSN5QMesh18CollisionBehaviorsE", !7, i64 0}
!34 = !{!"_ZTSSt6vectorIS_IiSaIiEESaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{!"bool", !7, i64 0}
!39 = !{!"_ZTSSt6vectorIfSaIfEE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}


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