; LLVM IR from erayzesen/QuarkPhysics :: QuarkPhysics/qsoftbody.ll (ZN9QSoftBody13PreserveAreasEv)

; 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.109" = type { ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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 }
%struct.QVector = type { float, float }
%"struct.std::pair" = type { %struct.QVector, float }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.QBody = type <{ ptr, float, float, ptr, %struct.QVector, %struct.QVector, float, float, %class.QAABB, i32, i8, i8, i8, i8, float, i32, i8, [3 x i8], float, i8, i8, [2 x i8], %struct.QVector, float, float, float, float, float, i32, i32, i8, i8, i8, i8, i32, i32, i32, i8, [3 x i8], %"class.std::function", %"class.std::function", %"class.std::function.30", i8, [7 x i8], %"class.std::vector.33", i32, i8, [3 x i8] }>
%class.QAABB = type { %struct.QVector, %struct.QVector, %struct.QVector, float }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::function.30" = type { %"class.std::_Function_base", ptr }
%"class.std::vector.33" = type { %"struct.std::_Vector_base.34" }
%"struct.std::_Vector_base.34" = type { %"struct.std::_Vector_base<QMesh *, std::allocator<QMesh *>>::_Vector_impl" }
%"struct.std::_Vector_base<QMesh *, std::allocator<QMesh *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QMesh *, std::allocator<QMesh *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QMesh *, std::allocator<QMesh *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.QMesh = type { %"class.std::vector", %struct.QVector, %struct.QVector, float, float, %"class.std::vector.38", %"class.std::vector.43", %"class.std::vector", %"class.std::vector.48", %"class.std::vector.0", float, ptr, i32, %"class.std::vector.53", i8, i8, %"class.std::vector.58", float, i8, i8, i8, i8 }
%"class.std::vector.38" = type { %"struct.std::_Vector_base.39" }
%"struct.std::_Vector_base.39" = 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.43" = type { %"struct.std::_Vector_base.44" }
%"struct.std::_Vector_base.44" = 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.48" = type { %"struct.std::_Vector_base.49" }
%"struct.std::_Vector_base.49" = 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.53" = type { %"struct.std::_Vector_base.54" }
%"struct.std::_Vector_base.54" = 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.58" = type { %"struct.std::_Vector_base.59" }
%"struct.std::_Vector_base.59" = 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 }
%class.QSoftBody = type { %class.QBody.base, float, float, float, float, float, float, i8, float, i8, i8, i8, float, i8, float, i8, i8, %struct.QVector, float }
%class.QBody.base = type <{ ptr, float, float, ptr, %struct.QVector, %struct.QVector, float, float, %class.QAABB, i32, i8, i8, i8, i8, float, i32, i8, [3 x i8], float, i8, i8, [2 x i8], %struct.QVector, float, float, float, float, float, i32, i32, i8, i8, i8, i8, i32, i32, i32, i8, [3 x i8], %"class.std::function", %"class.std::function", %"class.std::function.30", i8, [7 x i8], %"class.std::vector.33", i32, i8 }>

; 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 <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290)) #2 align 2

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

; Function Attrs: mustprogress 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 uwtable
declare dso_local <2 x float> @_Zmi7QVectorS_(<2 x float>, <2 x float>) #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPP5QMeshSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #7

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9QSoftBody13PreserveAreasEv(ptr noundef nonnull align 8 dereferenceable(360) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca float, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.109", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.109", align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca %"class.std::vector.0", align 8
  %16 = alloca %struct.QVector, align 4
  %17 = alloca %"struct.std::pair", align 4
  %18 = alloca %"class.std::vector", align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca { <2 x float>, float }, align 8
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca %struct.QVector, align 4
  %26 = alloca %struct.QVector, align 4
  %27 = alloca %struct.QVector, align 4
  %28 = alloca %struct.QVector, align 4
  %29 = alloca %struct.QVector, align 4
  %30 = alloca %struct.QVector, align 4
  %31 = alloca %struct.QVector, align 4
  %32 = alloca %struct.QVector, align 4
  %33 = alloca i32, align 4
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %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
  store ptr %0, ptr %2, align 8, !tbaa !5
  %42 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #10
  store float 1.000000e+00, ptr %3, align 4, !tbaa !9
  %43 = getelementptr inbounds %class.QBody, ptr %42, i32 0, i32 12
  %44 = load i8, ptr %43, align 2, !tbaa !11, !range !27, !noundef !28
  %45 = trunc i8 %44 to i1
  %46 = zext i1 %45 to i32
  %47 = icmp eq i32 %46, 1
  br i1 %47, label %48, label %51

48:                                               ; preds = %1
  %49 = getelementptr inbounds %class.QBody, ptr %42, i32 0, i32 14
  %50 = load float, ptr %49, align 4, !tbaa !29
  store float %50, ptr %3, align 4, !tbaa !9
  br label %60

51:                                               ; preds = %1
  %52 = getelementptr inbounds %class.QBody, ptr %42, i32 0, i32 3
  %53 = load ptr, ptr %52, align 8, !tbaa !30
  %54 = icmp ne ptr %53, null
  br i1 %54, label %55, label %59

55:                                               ; preds = %51
  %56 = getelementptr inbounds %class.QBody, ptr %42, i32 0, i32 3
  %57 = load ptr, ptr %56, align 8, !tbaa !30
  %58 = call noundef float @_ZN6QWorld12GetTimeScaleEv(ptr noundef nonnull align 8 dereferenceable(272) %57)
  store float %58, ptr %3, align 4, !tbaa !9
  br label %59

59:                                               ; preds = %55, %51
  br label %60

60:                                               ; preds = %59, %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #10
  %61 = getelementptr inbounds %class.QBody, ptr %42, i32 0, i32 44
  store ptr %61, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #10
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = call ptr @_ZNSt6vectorIP5QMeshSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %62) #10
  %64 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.109", ptr %5, i32 0, i32 0
  store ptr %63, ptr %64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #10
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = call ptr @_ZNSt6vectorIP5QMeshSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %65) #10
  %67 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.109", ptr %6, i32 0, i32 0
  store ptr %66, ptr %67, align 8
  br label %68

68:                                               ; preds = %320, %60
  %69 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP5QMeshSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  br i1 %69, label %71, label %70

70:                                               ; preds = %68
  store i32 2, ptr %7, align 4
  br label %323

71:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP5QMeshSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #10
  %73 = load ptr, ptr %72, align 8, !tbaa !5
  store ptr %73, ptr %8, align 8, !tbaa !5
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = call noundef i32 @_ZN5QMesh14GetSpringCountEv(ptr noundef nonnull align 8 dereferenceable(256) %74)
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %78

77:                                               ; preds = %71
  store i32 3, ptr %7, align 4
  br label %317

78:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #10
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.QMesh, ptr %80, i32 0, i32 7
  %82 = call noundef float @_ZN5QMesh14GetPolygonAreaERSt6vectorIP9QParticleSaIS2_EEb(ptr noundef nonnull align 8 dereferenceable(24) %81, i1 noundef zeroext false)
  store float %82, ptr %9, align 4, !tbaa !9
  %83 = load float, ptr %9, align 4, !tbaa !9
  %84 = getelementptr inbounds %class.QSoftBody, ptr %42, i32 0, i32 5
  %85 = load float, ptr %84, align 8, !tbaa !31
  %86 = fneg float %85
  %87 = fmul float %86, 5.000000e+00
  %88 = fcmp olt float %83, %87
  br i1 %88, label %89, label %94

89:                                               ; preds = %78
  %90 = getelementptr inbounds %class.QSoftBody, ptr %42, i32 0, i32 5
  %91 = load float, ptr %90, align 8, !tbaa !31
  %92 = fneg float %91
  %93 = fmul float %92, 5.000000e+00
  store float %93, ptr %9, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %89, %78
  %95 = load float, ptr %9, align 4, !tbaa !9
  %96 = getelementptr inbounds %class.QSoftBody, ptr %42, i32 0, i32 5
  %97 = load float, ptr %96, align 8, !tbaa !31
  %98 = fmul float %97, 5.000000e+00
  %99 = fcmp ogt float %95, %98
  br i1 %99, label %100, label %104

100:                                              ; preds = %94
  %101 = getelementptr inbounds %class.QSoftBody, ptr %42, i32 0, i32 5
  %102 = load float, ptr %101, align 8, !tbaa !31
  %103 = fmul float %102, 5.000000e+00
  store float %103, ptr %9, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %100, %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  %105 = call noundef float @_ZN5QBody16GetCircumferenceEv(ptr noundef nonnull align 8 dereferenceable(293) %42)
  store float %105, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  store float 0x3F50624DE0000000, ptr %12, align 4, !tbaa !9
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %107 = load float, ptr %106, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  store float %107, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  %108 = getelementptr inbounds %class.QSoftBody, ptr %42, i32 0, i32 5
  %109 = load float, ptr %108, align 8, !tbaa !31
  %110 = getelementptr inbounds %class.QSoftBody, ptr %42, i32 0, i32 3
  %111 = load float, ptr %110, align 8, !tbaa !33
  %112 = load float, ptr %9, align 4, !tbaa !9
  %113 = fneg float %112
  %114 = call float @llvm.fmuladd.f32(float %109, float %111, float %113)
  store float %114, ptr %13, align 4, !tbaa !9
  %115 = getelementptr inbounds %class.QSoftBody, ptr %42, i32 0, i32 9
  %116 = load i8, ptr %115, align 8, !tbaa !34, !range !27, !noundef !28
  %117 = trunc i8 %116 to i1
  %118 = zext i1 %117 to i32
  %119 = icmp eq i32 %118, 0
  br i1 %119, label %120, label %127

120:                                              ; preds = %104
  %121 = load float, ptr %13, align 4, !tbaa !9
  %122 = fcmp olt float %121, 0.000000e+00
  br i1 %122, label %123, label %124

123:                                              ; preds = %120
  store float 0.000000e+00, ptr %13, align 4, !tbaa !9
  br label %126

124:                                              ; preds = %120
  %125 = getelementptr inbounds %class.QSoftBody, ptr %42, i32 0, i32 9
  store i8 1, ptr %125, align 8, !tbaa !34
  br label %126

126:                                              ; preds = %124, %123
  br label %127

127:                                              ; preds = %126, %104
  %128 = load float, ptr %13, align 4, !tbaa !9
  %129 = fcmp oeq float %128, 0.000000e+00
  br i1 %129, label %130, label %131

130:                                              ; preds = %127
  store i32 1, ptr %7, align 4
  br label %314

131:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #10
  %132 = load float, ptr %13, align 4, !tbaa !9
  %133 = load float, ptr %10, align 4, !tbaa !9
  %134 = fdiv float %132, %133
  %135 = getelementptr inbounds %class.QSoftBody, ptr %42, i32 0, i32 4
  %136 = load float, ptr %135, align 4, !tbaa !35
  %137 = fmul float %134, %136
  store float %137, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #10
  call void @_ZNSt6vectorI7QVectorSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #10
  %138 = load ptr, ptr %8, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.QMesh, ptr %138, i32 0, i32 7
  invoke void @_ZNSt6vectorIP9QParticleSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %139)
          to label %140 unwind label %152

140:                                              ; preds = %131
  %141 = invoke { <2 x float>, float } @_ZN5QMesh29GetAveragePositionAndRotationESt6vectorIP9QParticleSaIS2_EE(ptr noundef %18)
          to label %142 unwind label %156

142:                                              ; preds = %140
  store { <2 x float>, float } %141, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 8 %21, i64 12, i1 false)
  %143 = getelementptr inbounds %"struct.std::pair", ptr %17, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %143, i64 8, i1 false), !tbaa.struct !36
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  store i32 0, ptr %22, align 4, !tbaa !37
  br label %144

144:                                              ; preds = %211, %142
  %145 = load i32, ptr %22, align 4, !tbaa !37
  %146 = sext i32 %145 to i64
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.QMesh, ptr %147, i32 0, i32 7
  %149 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %148) #10
  %150 = icmp ult i64 %146, %149
  br i1 %150, label %161, label %151

151:                                              ; preds = %144
  store i32 4, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  br label %228

152:                                              ; preds = %131
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %19, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %20, align 4
  br label %160

156:                                              ; preds = %140
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %19, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %20, align 4
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #10
  br label %160

160:                                              ; preds = %156, %152
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #10
  br label %322

161:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %162 = load ptr, ptr %8, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.QMesh, ptr %162, i32 0, i32 7
  %164 = load i32, ptr %22, align 4, !tbaa !37
  %165 = sub nsw i32 %164, 1
  %166 = sext i32 %165 to i64
  %167 = load ptr, ptr %8, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.QMesh, ptr %167, i32 0, i32 7
  %169 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %168) #10
  %170 = add i64 %166, %169
  %171 = load ptr, ptr %8, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.QMesh, ptr %171, i32 0, i32 7
  %173 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %172) #10
  %174 = urem i64 %170, %173
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %163, i64 noundef %174) #10
  %176 = load ptr, ptr %175, align 8, !tbaa !5
  store ptr %176, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #10
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.QMesh, ptr %177, i32 0, i32 7
  %179 = load i32, ptr %22, align 4, !tbaa !37
  %180 = add nsw i32 %179, 1
  %181 = sext i32 %180 to i64
  %182 = load ptr, ptr %8, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.QMesh, ptr %182, i32 0, i32 7
  %184 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %183) #10
  %185 = urem i64 %181, %184
  %186 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %178, i64 noundef %185) #10
  %187 = load ptr, ptr %186, align 8, !tbaa !5
  store ptr %187, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #10
  %188 = load ptr, ptr %24, align 8, !tbaa !5
  %189 = invoke <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %188)
          to label %190 unwind label %214

190:                                              ; preds = %161
  store <2 x float> %189, ptr %26, align 4
  %191 = load ptr, ptr %23, align 8, !tbaa !5
  %192 = invoke <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %191)
          to label %193 unwind label %214

193:                                              ; preds = %190
  store <2 x float> %192, ptr %27, align 4
  %194 = load <2 x float>, ptr %26, align 4
  %195 = load <2 x float>, ptr %27, align 4
  %196 = invoke <2 x float> @_Zmi7QVectorS_(<2 x float> %194, <2 x float> %195)
          to label %197 unwind label %214

197:                                              ; preds = %193
  store <2 x float> %196, ptr %25, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #10
  %198 = invoke <2 x float> @_ZNK7QVector13PerpendicularEv(ptr noundef nonnull align 4 dereferenceable(8) %25)
          to label %199 unwind label %218

199:                                              ; preds = %197
  store <2 x float> %198, ptr %29, align 4
  %200 = invoke <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8) %29)
          to label %201 unwind label %218

201:                                              ; preds = %199
  store <2 x float> %200, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %202 = load float, ptr %14, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %28, i64 8, i1 false), !tbaa.struct !36
  %203 = load <2 x float>, ptr %32, align 4
  %204 = invoke <2 x float> @_Zmlf7QVector(float noundef %202, <2 x float> %203)
          to label %205 unwind label %222

205:                                              ; preds = %201
  store <2 x float> %204, ptr %31, align 4
  %206 = load float, ptr %3, align 4, !tbaa !9
  %207 = load <2 x float>, ptr %31, align 4
  %208 = invoke <2 x float> @_Zml7QVectorf(<2 x float> %207, float noundef %206)
          to label %209 unwind label %222

209:                                              ; preds = %205
  store <2 x float> %208, ptr %30, align 4
  invoke void @_ZNSt6vectorI7QVectorSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 4 dereferenceable(8) %30)
          to label %210 unwind label %222

210:                                              ; preds = %209
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  br label %211

211:                                              ; preds = %210
  %212 = load i32, ptr %22, align 4, !tbaa !37
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %22, align 4, !tbaa !37
  br label %144, !llvm.loop !38

214:                                              ; preds = %193, %190, %161
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %19, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %20, align 4
  br label %227

218:                                              ; preds = %199, %197
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %19, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #10
  br label %226

222:                                              ; preds = %209, %205, %201
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %19, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  br label %226

226:                                              ; preds = %222, %218
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #10
  br label %227

227:                                              ; preds = %226, %214
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  br label %322

228:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #10
  store i32 0, ptr %33, align 4, !tbaa !37
  br label %229

229:                                              ; preds = %305, %228
  %230 = load i32, ptr %33, align 4, !tbaa !37
  %231 = sext i32 %230 to i64
  %232 = load ptr, ptr %8, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.QMesh, ptr %232, i32 0, i32 7
  %234 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %233) #10
  %235 = icmp ult i64 %231, %234
  br i1 %235, label %237, label %236

236:                                              ; preds = %229
  store i32 7, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #10
  br label %313

237:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #10
  %238 = load ptr, ptr %8, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.QMesh, ptr %238, i32 0, i32 7
  %240 = load i32, ptr %33, align 4, !tbaa !37
  %241 = sub nsw i32 %240, 1
  %242 = sext i32 %241 to i64
  %243 = load ptr, ptr %8, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.QMesh, ptr %243, i32 0, i32 7
  %245 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %244) #10
  %246 = add i64 %242, %245
  %247 = load ptr, ptr %8, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.QMesh, ptr %247, i32 0, i32 7
  %249 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %248) #10
  %250 = urem i64 %246, %249
  %251 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %239, i64 noundef %250) #10
  %252 = load ptr, ptr %251, align 8, !tbaa !5
  store ptr %252, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #10
  %253 = load ptr, ptr %8, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.QMesh, ptr %253, i32 0, i32 7
  %255 = load i32, ptr %33, align 4, !tbaa !37
  %256 = add nsw i32 %255, 1
  %257 = sext i32 %256 to i64
  %258 = load ptr, ptr %8, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.QMesh, ptr %258, i32 0, i32 7
  %260 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %259) #10
  %261 = urem i64 %257, %260
  %262 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %254, i64 noundef %261) #10
  %263 = load ptr, ptr %262, align 8, !tbaa !5
  store ptr %263, ptr %35, align 8, !tbaa !5
  %264 = load ptr, ptr %34, align 8, !tbaa !5
  %265 = invoke noundef zeroext i1 @_ZN9QParticle10GetEnabledEv(ptr noundef nonnull align 8 dereferenceable(290) %264)
          to label %266 unwind label %276

266:                                              ; preds = %237
  %267 = zext i1 %265 to i32
  %268 = icmp eq i32 %267, 0
  br i1 %268, label %275, label %269

269:                                              ; preds = %266
  %270 = load ptr, ptr %35, align 8, !tbaa !5
  %271 = invoke noundef zeroext i1 @_ZN9QParticle10GetEnabledEv(ptr noundef nonnull align 8 dereferenceable(290) %270)
          to label %272 unwind label %276

272:                                              ; preds = %269
  %273 = zext i1 %271 to i32
  %274 = icmp eq i32 %273, 0
  br i1 %274, label %275, label %280

275:                                              ; preds = %272, %266
  store i32 9, ptr %7, align 4
  br label %302

276:                                              ; preds = %269, %237
  %277 = landingpad { ptr, i32 }
          cleanup
  %278 = extractvalue { ptr, i32 } %277, 0
  store ptr %278, ptr %19, align 8
  %279 = extractvalue { ptr, i32 } %277, 1
  store i32 %279, ptr %20, align 4
  br label %312

280:                                              ; preds = %272
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #10
  %281 = load ptr, ptr %35, align 8, !tbaa !5
  %282 = invoke <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %281)
          to label %283 unwind label %308

283:                                              ; preds = %280
  store <2 x float> %282, ptr %38, align 4
  %284 = load ptr, ptr %34, align 8, !tbaa !5
  %285 = invoke <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %284)
          to label %286 unwind label %308

286:                                              ; preds = %283
  store <2 x float> %285, ptr %39, align 4
  %287 = load <2 x float>, ptr %38, align 4
  %288 = load <2 x float>, ptr %39, align 4
  %289 = invoke <2 x float> @_Zpl7QVectorS_(<2 x float> %287, <2 x float> %288)
          to label %290 unwind label %308

290:                                              ; preds = %286
  store <2 x float> %289, ptr %37, align 4
  %291 = load <2 x float>, ptr %37, align 4
  %292 = invoke <2 x float> @_Zml7QVectorf(<2 x float> %291, float noundef 5.000000e-01)
          to label %293 unwind label %308

293:                                              ; preds = %290
  store <2 x float> %292, ptr %36, align 4
  %294 = load ptr, ptr %34, align 8, !tbaa !5
  %295 = load ptr, ptr %35, align 8, !tbaa !5
  %296 = load i32, ptr %33, align 4, !tbaa !37
  %297 = sext i32 %296 to i64
  %298 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI7QVectorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %297) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %298, i64 8, i1 false), !tbaa.struct !36
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 4 %36, i64 8, i1 false), !tbaa.struct !36
  %299 = load <2 x float>, ptr %40, align 4
  %300 = load <2 x float>, ptr %41, align 4
  invoke void @_ZN9QParticle27ApplyForceToParticleSegmentEPS_S0_7QVectorS1_(ptr noundef %294, ptr noundef %295, <2 x float> %299, <2 x float> %300)
          to label %301 unwind label %308

301:                                              ; preds = %293
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #10
  store i32 0, ptr %7, align 4
  br label %302

302:                                              ; preds = %301, %275
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #10
  %303 = load i32, ptr %7, align 4
  switch i32 %303, label %334 [
    i32 0, label %304
    i32 9, label %305
  ]

304:                                              ; preds = %302
  br label %305

305:                                              ; preds = %304, %302
  %306 = load i32, ptr %33, align 4, !tbaa !37
  %307 = add nsw i32 %306, 1
  store i32 %307, ptr %33, align 4, !tbaa !37
  br label %229, !llvm.loop !40

308:                                              ; preds = %293, %290, %286, %283, %280
  %309 = landingpad { ptr, i32 }
          cleanup
  %310 = extractvalue { ptr, i32 } %309, 0
  store ptr %310, ptr %19, align 8
  %311 = extractvalue { ptr, i32 } %309, 1
  store i32 %311, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #10
  br label %312

312:                                              ; preds = %308, %276
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #10
  br label %322

313:                                              ; preds = %236
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @_ZNSt6vectorI7QVectorSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  store i32 0, ptr %7, align 4
  br label %314

314:                                              ; preds = %313, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  %315 = load i32, ptr %7, align 4
  switch i32 %315, label %317 [
    i32 0, label %316
  ]

316:                                              ; preds = %314
  store i32 0, ptr %7, align 4
  br label %317

317:                                              ; preds = %316, %314, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  %318 = load i32, ptr %7, align 4
  switch i32 %318, label %323 [
    i32 0, label %319
    i32 3, label %320
  ]

319:                                              ; preds = %317
  br label %320

320:                                              ; preds = %319, %317
  %321 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP5QMeshSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #10
  br label %68

322:                                              ; preds = %312, %227, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @_ZNSt6vectorI7QVectorSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #10
  br label %329

323:                                              ; preds = %317, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #10
  %324 = load i32, ptr %7, align 4
  switch i32 %324, label %326 [
    i32 2, label %325
  ]

325:                                              ; preds = %323
  store i32 0, ptr %7, align 4
  br label %326

326:                                              ; preds = %325, %323
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #10
  %327 = load i32, ptr %7, align 4
  switch i32 %327, label %334 [
    i32 0, label %328
    i32 1, label %328
  ]

328:                                              ; preds = %326, %326
  ret void

329:                                              ; preds = %322
  %330 = load ptr, ptr %19, align 8
  %331 = load i32, ptr %20, align 4
  %332 = insertvalue { ptr, i32 } poison, ptr %330, 0
  %333 = insertvalue { ptr, i32 } %332, i32 %331, 1
  resume { ptr, i32 } %333

334:                                              ; preds = %326, %302
  unreachable
}

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

declare noundef float @_ZN5QMesh14GetPolygonAreaERSt6vectorIP9QParticleSaIS2_EEb(ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) #8

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #7

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN5QBody16GetCircumferenceEv(ptr noundef nonnull align 8 dereferenceable(293)) #9 align 2

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

declare { <2 x float>, float } @_ZN5QMesh29GetAveragePositionAndRotationESt6vectorIP9QParticleSaIS2_EE(ptr noundef) #8

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

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

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

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

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

declare void @_ZN9QParticle27ApplyForceToParticleSegmentEPS_S0_7QVectorS1_(ptr noundef, ptr noundef, <2 x float>, <2 x float>) #8

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #8 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !16, i64 82}
!12 = !{!"_ZTS5QBody", !10, i64 8, !10, i64 12, !6, i64 16, !13, i64 24, !13, i64 32, !10, i64 40, !10, i64 44, !14, i64 48, !15, i64 76, !16, i64 80, !16, i64 81, !16, i64 82, !10, i64 84, !17, i64 88, !16, i64 92, !10, i64 96, !16, i64 100, !16, i64 101, !13, i64 104, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !18, i64 132, !18, i64 136, !16, i64 140, !16, i64 141, !16, i64 142, !18, i64 144, !18, i64 148, !18, i64 152, !16, i64 156, !19, i64 160, !19, i64 192, !21, i64 224, !16, i64 256, !22, i64 264, !26, i64 288, !16, i64 292}
!13 = !{!"_ZTS7QVector", !10, i64 0, !10, i64 4}
!14 = !{!"_ZTS5QAABB", !13, i64 0, !13, i64 8, !13, i64 16, !10, i64 24}
!15 = !{!"_ZTSN5QBody5ModesE", !7, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSN5QBody9BodyTypesE", !7, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSSt8functionIFvP5QBodyEE", !20, i64 0, !6, i64 24}
!20 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!21 = !{!"_ZTSSt8functionIFbP5QBodyNS0_13CollisionInfoEEE", !20, i64 0, !6, i64 24}
!22 = !{!"_ZTSSt6vectorIP5QMeshSaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIP5QMeshSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIP5QMeshSaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP5QMeshSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSN5QBody16SimulationModelsE", !7, i64 0}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!12, !10, i64 84}
!30 = !{!12, !6, i64 16}
!31 = !{!32, !10, i64 312}
!32 = !{!"_ZTS9QSoftBody", !12, i64 0, !10, i64 296, !10, i64 300, !10, i64 304, !10, i64 308, !10, i64 312, !10, i64 316, !16, i64 320, !10, i64 324, !16, i64 328, !16, i64 329, !16, i64 330, !10, i64 332, !16, i64 336, !10, i64 340, !16, i64 344, !16, i64 345, !13, i64 348, !10, i64 356}
!33 = !{!32, !10, i64 304}
!34 = !{!32, !16, i64 328}
!35 = !{!32, !10, i64 308}
!36 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!37 = !{!18, !18, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = distinct !{!40, !39}


; 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.109" = type { ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }
%struct.QVector = type { float, float }

; 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 <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress 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 uwtable
declare dso_local <2 x float> @_Zmi7QVectorS_(<2 x float>, <2 x float>) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPP5QMeshSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9QSoftBody13PreserveAreasEv(ptr noundef nonnull align 8 dereferenceable(360) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator.109", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.109", align 8
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca %"class.std::vector.0", align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %struct.QVector, align 8
  %9 = alloca %struct.QVector, align 8
  %10 = alloca %struct.QVector, align 8
  %11 = getelementptr inbounds i8, ptr %0, i64 82
  %12 = load i8, ptr %11, align 2, !tbaa !5, !range !25, !noundef !26
  %13 = trunc nuw i8 %12 to i1
  br i1 %13, label %14, label %17

14:                                               ; preds = %1
  %15 = getelementptr inbounds i8, ptr %0, i64 84
  %16 = load float, ptr %15, align 4, !tbaa !27
  br label %22

17:                                               ; preds = %1
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = load ptr, ptr %18, align 8, !tbaa !28
  %.not = icmp eq ptr %19, null
  br i1 %.not, label %22, label %20

20:                                               ; preds = %17
  %21 = tail call noundef float @_ZN6QWorld12GetTimeScaleEv(ptr noundef nonnull align 8 dereferenceable(272) %19)
  br label %22

22:                                               ; preds = %17, %20, %14
  %.0 = phi float [ %16, %14 ], [ %21, %20 ], [ 1.000000e+00, %17 ]
  %23 = getelementptr inbounds i8, ptr %0, i64 264
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  %24 = tail call ptr @_ZNSt6vectorIP5QMeshSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #9
  store ptr %24, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %25 = tail call ptr @_ZNSt6vectorIP5QMeshSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #9
  store ptr %25, ptr %3, align 8
  %26 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP5QMeshSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  br i1 %26, label %.lr.ph95, label %.thread89

.lr.ph95:                                         ; preds = %22
  %27 = getelementptr inbounds i8, ptr %0, i64 312
  %28 = getelementptr inbounds i8, ptr %0, i64 304
  %29 = getelementptr inbounds i8, ptr %0, i64 328
  %30 = getelementptr inbounds i8, ptr %0, i64 308
  br label %31

31:                                               ; preds = %.lr.ph95, %131
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP5QMeshSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #9
  %33 = load ptr, ptr %32, align 8, !tbaa !29
  %34 = call noundef i32 @_ZN5QMesh14GetSpringCountEv(ptr noundef nonnull align 8 dereferenceable(256) %33)
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %131, label %36

36:                                               ; preds = %31
  %37 = getelementptr inbounds i8, ptr %33, i64 96
  %38 = call noundef float @_ZN5QMesh14GetPolygonAreaERSt6vectorIP9QParticleSaIS2_EEb(ptr noundef nonnull align 8 dereferenceable(24) %37, i1 noundef zeroext false)
  %39 = load float, ptr %27, align 8, !tbaa !30
  %40 = fmul float %39, -5.000000e+00
  %41 = fcmp olt float %38, %40
  %.065 = select i1 %41, float %40, float %38
  %42 = fmul float %39, 5.000000e+00
  %43 = fcmp ogt float %.065, %42
  %.166 = select i1 %43, float %42, float %.065
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  %44 = call noundef float @_ZN5QBody16GetCircumferenceEv(ptr noundef nonnull align 8 dereferenceable(293) %0)
  store float %44, ptr %4, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  store float 0x3F50624DE0000000, ptr %5, align 4, !tbaa !32
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %46 = load float, ptr %45, align 4, !tbaa !32
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  %47 = load float, ptr %27, align 8, !tbaa !30
  %48 = load float, ptr %28, align 8, !tbaa !33
  %49 = fneg float %.166
  %50 = call float @llvm.fmuladd.f32(float %47, float %48, float %49)
  %51 = load i8, ptr %29, align 8, !tbaa !34, !range !25, !noundef !26
  %52 = icmp eq i8 %51, 0
  br i1 %52, label %53, label %56

53:                                               ; preds = %36
  %54 = fcmp olt float %50, 0.000000e+00
  br i1 %54, label %.thread89, label %55

55:                                               ; preds = %53
  store i8 1, ptr %29, align 8, !tbaa !34
  br label %56

56:                                               ; preds = %55, %36
  %57 = fcmp oeq float %50, 0.000000e+00
  br i1 %57, label %.thread89, label %58

58:                                               ; preds = %56
  %59 = fdiv float %50, %46
  %60 = load float, ptr %30, align 4, !tbaa !35
  %61 = fmul float %59, %60
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #9
  call void @_ZNSt6vectorI7QVectorSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  invoke void @_ZNSt6vectorIP9QParticleSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %37)
          to label %62 unwind label %67

62:                                               ; preds = %58
  %63 = invoke { <2 x float>, float } @_ZN5QMesh29GetAveragePositionAndRotationESt6vectorIP9QParticleSaIS2_EE(ptr noundef nonnull %7)
          to label %64 unwind label %69

64:                                               ; preds = %62
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  %65 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #9
  %.not98 = icmp eq i64 %65, 0
  br i1 %.not98, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %94, %64
  %66 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #9
  %.not99 = icmp eq i64 %66, 0
  br i1 %.not99, label %._crit_edge, label %.lr.ph93

67:                                               ; preds = %58
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %134

69:                                               ; preds = %62
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  br label %134

.lr.ph:                                           ; preds = %64, %94
  %indvars.iv = phi i64 [ %indvars.iv.next, %94 ], [ 0, %64 ]
  %71 = add nsw i64 %indvars.iv, -1
  %72 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #9
  %73 = add i64 %72, %71
  %74 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #9
  %75 = urem i64 %73, %74
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %75) #9
  %77 = load ptr, ptr %76, align 8, !tbaa !29
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %78 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #9
  %79 = urem i64 %indvars.iv.next, %78
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %79) #9
  %81 = load ptr, ptr %80, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %82 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %81)
  %83 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %77)
  %84 = invoke <2 x float> @_Zmi7QVectorS_(<2 x float> %82, <2 x float> %83)
          to label %85 unwind label %97

85:                                               ; preds = %.lr.ph
  store <2 x float> %84, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %86 = invoke <2 x float> @_ZNK7QVector13PerpendicularEv(ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %87 unwind label %99

87:                                               ; preds = %85
  store <2 x float> %86, ptr %9, align 8
  %88 = invoke <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8) %9)
          to label %89 unwind label %99

89:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  %90 = invoke <2 x float> @_Zmlf7QVector(float noundef %61, <2 x float> %88)
          to label %91 unwind label %101

91:                                               ; preds = %89
  %92 = invoke <2 x float> @_Zml7QVectorf(<2 x float> %90, float noundef %.0)
          to label %93 unwind label %101

93:                                               ; preds = %91
  store <2 x float> %92, ptr %10, align 8
  invoke void @_ZNSt6vectorI7QVectorSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(8) %10)
          to label %94 unwind label %101

94:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  %95 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #9
  %96 = icmp ugt i64 %95, %indvars.iv.next
  br i1 %96, label %.lr.ph, label %.preheader, !llvm.loop !36

97:                                               ; preds = %.lr.ph
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %103

99:                                               ; preds = %87, %85
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  br label %103

101:                                              ; preds = %93, %91, %89
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  br label %103

103:                                              ; preds = %99, %101, %97
  %.pn84.pn = phi { ptr, i32 } [ %98, %97 ], [ %102, %101 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %134

._crit_edge:                                      ; preds = %126, %.preheader
  call void @_ZNSt6vectorI7QVectorSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  br label %131

.lr.ph93:                                         ; preds = %.preheader, %126
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %126 ], [ 0, %.preheader ]
  %104 = add nsw i64 %indvars.iv101, -1
  %105 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #9
  %106 = add i64 %105, %104
  %107 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #9
  %108 = urem i64 %106, %107
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %108) #9
  %110 = load ptr, ptr %109, align 8, !tbaa !29
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %111 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #9
  %112 = urem i64 %indvars.iv.next102, %111
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %112) #9
  %114 = load ptr, ptr %113, align 8, !tbaa !29
  %115 = call noundef zeroext i1 @_ZN9QParticle10GetEnabledEv(ptr noundef nonnull align 8 dereferenceable(290) %110)
  br i1 %115, label %116, label %126

116:                                              ; preds = %.lr.ph93
  %117 = call noundef zeroext i1 @_ZN9QParticle10GetEnabledEv(ptr noundef nonnull align 8 dereferenceable(290) %114)
  br i1 %117, label %118, label %126

118:                                              ; preds = %116
  %119 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %114)
  %120 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %110)
  %121 = invoke <2 x float> @_Zpl7QVectorS_(<2 x float> %119, <2 x float> %120)
          to label %122 unwind label %129

122:                                              ; preds = %118
  %123 = invoke <2 x float> @_Zml7QVectorf(<2 x float> %121, float noundef 5.000000e-01)
          to label %124 unwind label %129

124:                                              ; preds = %122
  %125 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI7QVectorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv101) #9
  %.sroa.03.0.copyload = load <2 x float>, ptr %125, align 4
  invoke void @_ZN9QParticle27ApplyForceToParticleSegmentEPS_S0_7QVectorS1_(ptr noundef nonnull %110, ptr noundef nonnull %114, <2 x float> %.sroa.03.0.copyload, <2 x float> %123)
          to label %126 unwind label %129

126:                                              ; preds = %124, %.lr.ph93, %116
  %127 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #9
  %128 = icmp ugt i64 %127, %indvars.iv.next102
  br i1 %128, label %.lr.ph93, label %._crit_edge, !llvm.loop !38

129:                                              ; preds = %124, %122, %118
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %134

131:                                              ; preds = %31, %._crit_edge
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP5QMeshSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #9
  %133 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP5QMeshSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  br i1 %133, label %31, label %.thread89

134:                                              ; preds = %67, %69, %129, %103
  %.pn84.pn.pn = phi { ptr, i32 } [ %.pn84.pn, %103 ], [ %130, %129 ], [ %70, %69 ], [ %68, %67 ]
  call void @_ZNSt6vectorI7QVectorSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  resume { ptr, i32 } %.pn84.pn.pn

.thread89:                                        ; preds = %131, %56, %53, %22
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  ret void
}

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

declare noundef float @_ZN5QMesh14GetPolygonAreaERSt6vectorIP9QParticleSaIS2_EEb(ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN5QBody16GetCircumferenceEv(ptr noundef nonnull align 8 dereferenceable(293)) local_unnamed_addr #8 align 2

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

declare { <2 x float>, float } @_ZN5QMesh29GetAveragePositionAndRotationESt6vectorIP9QParticleSaIS2_EE(ptr noundef) local_unnamed_addr #7

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

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

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

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

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

declare void @_ZN9QParticle27ApplyForceToParticleSegmentEPS_S0_7QVectorS1_(ptr noundef, ptr noundef, <2 x float>, <2 x float>) local_unnamed_addr #7

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI7QVectorSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { "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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { 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, !14, i64 82}
!6 = !{!"_ZTS5QBody", !7, i64 8, !7, i64 12, !10, i64 16, !11, i64 24, !11, i64 32, !7, i64 40, !7, i64 44, !12, i64 48, !13, i64 76, !14, i64 80, !14, i64 81, !14, i64 82, !7, i64 84, !15, i64 88, !14, i64 92, !7, i64 96, !14, i64 100, !14, i64 101, !11, i64 104, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !16, i64 132, !16, i64 136, !14, i64 140, !14, i64 141, !14, i64 142, !16, i64 144, !16, i64 148, !16, i64 152, !14, i64 156, !17, i64 160, !17, i64 192, !19, i64 224, !14, i64 256, !20, i64 264, !24, i64 288, !14, i64 292}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS7QVector", !7, i64 0, !7, i64 4}
!12 = !{!"_ZTS5QAABB", !11, i64 0, !11, i64 8, !11, i64 16, !7, i64 24}
!13 = !{!"_ZTSN5QBody5ModesE", !8, i64 0}
!14 = !{!"bool", !8, i64 0}
!15 = !{!"_ZTSN5QBody9BodyTypesE", !8, i64 0}
!16 = !{!"int", !8, i64 0}
!17 = !{!"_ZTSSt8functionIFvP5QBodyEE", !18, i64 0, !10, i64 24}
!18 = !{!"_ZTSSt14_Function_base", !8, i64 0, !10, i64 16}
!19 = !{!"_ZTSSt8functionIFbP5QBodyNS0_13CollisionInfoEEE", !18, i64 0, !10, i64 24}
!20 = !{!"_ZTSSt6vectorIP5QMeshSaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIP5QMeshSaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIP5QMeshSaIS1_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIP5QMeshSaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!24 = !{!"_ZTSN5QBody16SimulationModelsE", !8, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!6, !7, i64 84}
!28 = !{!6, !10, i64 16}
!29 = !{!10, !10, i64 0}
!30 = !{!31, !7, i64 312}
!31 = !{!"_ZTS9QSoftBody", !6, i64 0, !7, i64 296, !7, i64 300, !7, i64 304, !7, i64 308, !7, i64 312, !7, i64 316, !14, i64 320, !7, i64 324, !14, i64 328, !14, i64 329, !14, i64 330, !7, i64 332, !14, i64 336, !7, i64 340, !14, i64 344, !14, i64 345, !11, i64 348, !7, i64 356}
!32 = !{!7, !7, i64 0}
!33 = !{!31, !7, i64 304}
!34 = !{!31, !14, i64 328}
!35 = !{!31, !7, i64 308}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = distinct !{!38, !37}


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