; LLVM IR from erayzesen/QuarkPhysics :: QuarkPhysics/qspring.ll (ZN7QSpring6UpdateEfbb)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.QVector = type { float, float }
%class.QSpring = type <{ ptr, float, [4 x i8], ptr, ptr, float, i8, i8, i8, 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 uwtable
declare dso_local <2 x float> @_Zmi7QVectorS_(<2 x float>, <2 x float>) #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7QSpring6UpdateEfbb(ptr noundef nonnull align 8 dereferenceable(39) %0, float noundef %1, i1 noundef zeroext %2, i1 noundef zeroext %3) unnamed_addr #1 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca float, align 4
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %struct.QVector, align 4
  %15 = alloca %struct.QVector, align 4
  %16 = alloca %struct.QVector, align 4
  %17 = alloca float, align 4
  %18 = alloca %struct.QVector, align 4
  %19 = alloca %struct.QVector, align 4
  %20 = alloca %struct.QVector, align 4
  %21 = alloca %struct.QVector, align 4
  %22 = alloca %struct.QVector, align 4
  %23 = alloca %struct.QVector, align 4
  %24 = alloca %struct.QVector, align 4
  %25 = alloca %struct.QVector, align 4
  %26 = alloca %struct.QVector, align 4
  %27 = alloca %struct.QVector, align 4
  %28 = alloca float, align 4
  %29 = alloca float, align 4
  %30 = alloca float, align 4
  %31 = alloca float, align 4
  %32 = alloca float, align 4
  %33 = alloca float, align 4
  %34 = alloca %struct.QVector, align 4
  %35 = alloca %struct.QVector, align 4
  %36 = alloca float, align 4
  %37 = alloca float, align 4
  %38 = alloca float, align 4
  %39 = alloca float, align 4
  %40 = alloca %struct.QVector, align 4
  %41 = alloca %struct.QVector, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store float %1, ptr %6, align 4, !tbaa !9
  %42 = zext i1 %2 to i8
  store i8 %42, ptr %7, align 1, !tbaa !11
  %43 = zext i1 %3 to i8
  store i8 %43, ptr %8, align 1, !tbaa !11
  %44 = load ptr, ptr %5, align 8
  %45 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 7
  %46 = load i8, ptr %45, align 1, !tbaa !13, !range !15, !noundef !16
  %47 = trunc i8 %46 to i1
  %48 = zext i1 %47 to i32
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %51

50:                                               ; preds = %4
  br label %343

51:                                               ; preds = %4
  %52 = load float, ptr %6, align 4, !tbaa !9
  %53 = fcmp oeq float %52, 0.000000e+00
  br i1 %53, label %54, label %55

54:                                               ; preds = %51
  br label %343

55:                                               ; preds = %51
  %56 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %57 = load ptr, ptr %56, align 8, !tbaa !17
  %58 = icmp eq ptr %57, null
  br i1 %58, label %63, label %59

59:                                               ; preds = %55
  %60 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  %62 = icmp eq ptr %61, null
  br i1 %62, label %63, label %64

63:                                               ; preds = %59, %55
  br label %343

64:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #8
  store i8 1, ptr %9, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #8
  store i8 1, ptr %10, align 1, !tbaa !11
  %65 = load i8, ptr %8, align 1, !tbaa !11, !range !15, !noundef !16
  %66 = trunc i8 %65 to i1
  %67 = zext i1 %66 to i32
  %68 = icmp eq i32 %67, 1
  br i1 %68, label %69, label %123

69:                                               ; preds = %64
  %70 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %71 = load ptr, ptr %70, align 8, !tbaa !17
  %72 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %71)
  %73 = icmp ne ptr %72, null
  br i1 %73, label %74, label %92

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %75 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %76 = load ptr, ptr %75, align 8, !tbaa !17
  %77 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %76)
  %78 = call noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256) %77)
  store ptr %78, ptr %11, align 8, !tbaa !5
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %91

81:                                               ; preds = %74
  %82 = load ptr, ptr %11, align 8, !tbaa !5
  %83 = call noundef i32 @_ZN5QBody18GetSimulationModelEv(ptr noundef nonnull align 8 dereferenceable(293) %82)
  %84 = icmp eq i32 %83, 1
  br i1 %84, label %89, label %85

85:                                               ; preds = %81
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = call noundef i32 @_ZN5QBody7GetModeEv(ptr noundef nonnull align 8 dereferenceable(293) %86)
  %88 = icmp eq i32 %87, 1
  br i1 %88, label %89, label %90

89:                                               ; preds = %85, %81
  store i8 0, ptr %9, align 1, !tbaa !11
  br label %90

90:                                               ; preds = %89, %85
  br label %91

91:                                               ; preds = %90, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %92

92:                                               ; preds = %91, %69
  %93 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %94 = load ptr, ptr %93, align 8, !tbaa !18
  %95 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %94)
  %96 = icmp ne ptr %95, null
  br i1 %96, label %97, label %115

97:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %98 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %99 = load ptr, ptr %98, align 8, !tbaa !18
  %100 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %99)
  %101 = call noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256) %100)
  store ptr %101, ptr %12, align 8, !tbaa !5
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %114

104:                                              ; preds = %97
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = call noundef i32 @_ZN5QBody18GetSimulationModelEv(ptr noundef nonnull align 8 dereferenceable(293) %105)
  %107 = icmp eq i32 %106, 1
  br i1 %107, label %112, label %108

108:                                              ; preds = %104
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = call noundef i32 @_ZN5QBody7GetModeEv(ptr noundef nonnull align 8 dereferenceable(293) %109)
  %111 = icmp eq i32 %110, 1
  br i1 %111, label %112, label %113

112:                                              ; preds = %108, %104
  store i8 0, ptr %10, align 1, !tbaa !11
  br label %113

113:                                              ; preds = %112, %108
  br label %114

114:                                              ; preds = %113, %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %115

115:                                              ; preds = %114, %92
  %116 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !18
  %118 = call noundef zeroext i1 @_ZN9QParticle10GetEnabledEv(ptr noundef nonnull align 8 dereferenceable(290) %117)
  %119 = zext i1 %118 to i32
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %121, label %122

121:                                              ; preds = %115
  store i8 0, ptr %10, align 1, !tbaa !11
  br label %122

122:                                              ; preds = %121, %115
  br label %123

123:                                              ; preds = %122, %64
  %124 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %125 = load ptr, ptr %124, align 8, !tbaa !17
  %126 = call noundef zeroext i1 @_ZN9QParticle10GetEnabledEv(ptr noundef nonnull align 8 dereferenceable(290) %125)
  %127 = zext i1 %126 to i32
  %128 = icmp eq i32 %127, 0
  br i1 %128, label %129, label %130

129:                                              ; preds = %123
  store i8 0, ptr %9, align 1, !tbaa !11
  br label %130

130:                                              ; preds = %129, %123
  %131 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %132 = load ptr, ptr %131, align 8, !tbaa !18
  %133 = call noundef zeroext i1 @_ZN9QParticle10GetEnabledEv(ptr noundef nonnull align 8 dereferenceable(290) %132)
  %134 = zext i1 %133 to i32
  %135 = icmp eq i32 %134, 0
  br i1 %135, label %136, label %137

136:                                              ; preds = %130
  store i8 0, ptr %10, align 1, !tbaa !11
  br label %137

137:                                              ; preds = %136, %130
  %138 = load i8, ptr %9, align 1, !tbaa !11, !range !15, !noundef !16
  %139 = trunc i8 %138 to i1
  %140 = zext i1 %139 to i32
  %141 = icmp eq i32 %140, 0
  br i1 %141, label %142, label %148

142:                                              ; preds = %137
  %143 = load i8, ptr %10, align 1, !tbaa !11, !range !15, !noundef !16
  %144 = trunc i8 %143 to i1
  %145 = zext i1 %144 to i32
  %146 = icmp eq i32 %145, 0
  br i1 %146, label %147, label %148

147:                                              ; preds = %142
  store i32 1, ptr %13, align 4
  br label %341

148:                                              ; preds = %142, %137
  %149 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %150 = load ptr, ptr %149, align 8, !tbaa !17
  %151 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %150)
  %152 = icmp ne ptr %151, null
  br i1 %152, label %153, label %185

153:                                              ; preds = %148
  %154 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %155 = load ptr, ptr %154, align 8, !tbaa !18
  %156 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %155)
  %157 = icmp ne ptr %156, null
  br i1 %157, label %158, label %185

158:                                              ; preds = %153
  %159 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %160 = load ptr, ptr %159, align 8, !tbaa !17
  %161 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %160)
  %162 = call noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256) %161)
  %163 = icmp ne ptr %162, null
  br i1 %163, label %164, label %184

164:                                              ; preds = %158
  %165 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %166 = load ptr, ptr %165, align 8, !tbaa !18
  %167 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %166)
  %168 = call noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256) %167)
  %169 = icmp ne ptr %168, null
  br i1 %169, label %170, label %184

170:                                              ; preds = %164
  %171 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %172 = load ptr, ptr %171, align 8, !tbaa !17
  %173 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %172)
  %174 = call noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256) %173)
  %175 = call noundef zeroext i1 @_ZN5QBody13GetIsSleepingEv(ptr noundef nonnull align 8 dereferenceable(293) %174)
  br i1 %175, label %176, label %183

176:                                              ; preds = %170
  %177 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %178 = load ptr, ptr %177, align 8, !tbaa !18
  %179 = call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %178)
  %180 = call noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256) %179)
  %181 = call noundef zeroext i1 @_ZN5QBody13GetIsSleepingEv(ptr noundef nonnull align 8 dereferenceable(293) %180)
  br i1 %181, label %182, label %183

182:                                              ; preds = %176
  store i32 1, ptr %13, align 4
  br label %341

183:                                              ; preds = %176, %170
  br label %184

184:                                              ; preds = %183, %164, %158
  br label %185

185:                                              ; preds = %184, %153, %148
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %186 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %187 = load ptr, ptr %186, align 8, !tbaa !18
  %188 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %187)
  store <2 x float> %188, ptr %15, align 4
  %189 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %190 = load ptr, ptr %189, align 8, !tbaa !17
  %191 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %190)
  store <2 x float> %191, ptr %16, align 4
  %192 = load <2 x float>, ptr %15, align 4
  %193 = load <2 x float>, ptr %16, align 4
  %194 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %192, <2 x float> %193)
  store <2 x float> %194, ptr %14, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %195 = call noundef float @_ZNK7QVector6LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %14)
  store float %195, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %196 = call <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8) %14)
  store <2 x float> %196, ptr %18, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %197 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 5
  %198 = load float, ptr %197, align 8, !tbaa !19
  %199 = load float, ptr %17, align 4, !tbaa !9
  %200 = fsub float %198, %199
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !20
  %201 = load <2 x float>, ptr %20, align 4
  %202 = call <2 x float> @_Zmlf7QVector(float noundef %200, <2 x float> %201)
  store <2 x float> %202, ptr %19, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %203 = call <2 x float> @_ZNK7QVectorngEv(ptr noundef nonnull align 4 dereferenceable(8) %19)
  store <2 x float> %203, ptr %21, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %19, i64 8, i1 false), !tbaa.struct !20
  %204 = load i8, ptr %7, align 1, !tbaa !11, !range !15, !noundef !16
  %205 = trunc i8 %204 to i1
  br i1 %205, label %206, label %292

206:                                              ; preds = %185
  %207 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 6
  %208 = load i8, ptr %207, align 4, !tbaa !21, !range !15, !noundef !16
  %209 = trunc i8 %208 to i1
  br i1 %209, label %210, label %292

210:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %211 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %212 = load ptr, ptr %211, align 8, !tbaa !18
  %213 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %212)
  store <2 x float> %213, ptr %25, align 4
  %214 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %215 = load ptr, ptr %214, align 8, !tbaa !17
  %216 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %215)
  store <2 x float> %216, ptr %26, align 4
  %217 = load <2 x float>, ptr %25, align 4
  %218 = load <2 x float>, ptr %26, align 4
  %219 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %217, <2 x float> %218)
  store <2 x float> %219, ptr %24, align 4
  %220 = load <2 x float>, ptr %24, align 4
  %221 = call <2 x float> @_Zml7QVectorf(<2 x float> %220, float noundef 5.000000e-01)
  store <2 x float> %221, ptr %23, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %19, i64 8, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %222 = call <2 x float> @_ZNK7QVectorngEv(ptr noundef nonnull align 4 dereferenceable(8) %19)
  store <2 x float> %222, ptr %27, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %27, i64 8, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  %223 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %224 = load ptr, ptr %223, align 8, !tbaa !17
  %225 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %224)
  %226 = zext i1 %225 to i32
  %227 = icmp eq i32 %226, 1
  br i1 %227, label %228, label %237

228:                                              ; preds = %210
  %229 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %230 = load ptr, ptr %229, align 8, !tbaa !18
  %231 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %230)
  %232 = zext i1 %231 to i32
  %233 = icmp eq i32 %232, 0
  br i1 %233, label %234, label %237

234:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  store float 1.000000e+00, ptr %28, align 4, !tbaa !9
  %235 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(4) %28)
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  store float 0.000000e+00, ptr %29, align 4, !tbaa !9
  %236 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(4) %29)
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %283

237:                                              ; preds = %228, %210
  %238 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %239 = load ptr, ptr %238, align 8, !tbaa !17
  %240 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %239)
  %241 = zext i1 %240 to i32
  %242 = icmp eq i32 %241, 0
  br i1 %242, label %243, label %252

243:                                              ; preds = %237
  %244 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %245 = load ptr, ptr %244, align 8, !tbaa !18
  %246 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %245)
  %247 = zext i1 %246 to i32
  %248 = icmp eq i32 %247, 1
  br i1 %248, label %249, label %252

249:                                              ; preds = %243
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  store float 0.000000e+00, ptr %30, align 4, !tbaa !9
  %250 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(4) %30)
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store float 1.000000e+00, ptr %31, align 4, !tbaa !9
  %251 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(4) %31)
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %282

252:                                              ; preds = %243, %237
  %253 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %254 = load ptr, ptr %253, align 8, !tbaa !17
  %255 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %254)
  %256 = zext i1 %255 to i32
  %257 = icmp eq i32 %256, 1
  br i1 %257, label %258, label %267

258:                                              ; preds = %252
  %259 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %260 = load ptr, ptr %259, align 8, !tbaa !18
  %261 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %260)
  %262 = zext i1 %261 to i32
  %263 = icmp eq i32 %262, 1
  br i1 %263, label %264, label %267

264:                                              ; preds = %258
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  store float 5.000000e-01, ptr %32, align 4, !tbaa !9
  %265 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(4) %32)
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  store float 5.000000e-01, ptr %33, align 4, !tbaa !9
  %266 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(4) %33)
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %281

267:                                              ; preds = %258, %252
  %268 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %269 = load ptr, ptr %268, align 8, !tbaa !17
  %270 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %269)
  %271 = zext i1 %270 to i32
  %272 = icmp eq i32 %271, 0
  br i1 %272, label %273, label %280

273:                                              ; preds = %267
  %274 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %275 = load ptr, ptr %274, align 8, !tbaa !17
  %276 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %275)
  %277 = zext i1 %276 to i32
  %278 = icmp eq i32 %277, 0
  br i1 %278, label %279, label %280

279:                                              ; preds = %273
  store i32 1, ptr %13, align 4
  br label %340

280:                                              ; preds = %273, %267
  br label %281

281:                                              ; preds = %280, %264
  br label %282

282:                                              ; preds = %281, %249
  br label %283

283:                                              ; preds = %282, %234
  %284 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %285 = load ptr, ptr %284, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %21, i64 8, i1 false), !tbaa.struct !20
  %286 = load <2 x float>, ptr %34, align 4
  %287 = call noundef ptr @_ZN9QParticle19AddAccumulatedForceE7QVector(ptr noundef nonnull align 8 dereferenceable(290) %285, <2 x float> %286)
  %288 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %289 = load ptr, ptr %288, align 8, !tbaa !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %22, i64 8, i1 false), !tbaa.struct !20
  %290 = load <2 x float>, ptr %35, align 4
  %291 = call noundef ptr @_ZN9QParticle19AddAccumulatedForceE7QVector(ptr noundef nonnull align 8 dereferenceable(290) %289, <2 x float> %290)
  store i32 1, ptr %13, align 4
  br label %340

292:                                              ; preds = %206, %185
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  store float 5.000000e-01, ptr %36, align 4, !tbaa !9
  %293 = load i8, ptr %9, align 1, !tbaa !11, !range !15, !noundef !16
  %294 = trunc i8 %293 to i1
  %295 = zext i1 %294 to i32
  %296 = icmp eq i32 %295, 0
  br i1 %296, label %302, label %297

297:                                              ; preds = %292
  %298 = load i8, ptr %10, align 1, !tbaa !11, !range !15, !noundef !16
  %299 = trunc i8 %298 to i1
  %300 = zext i1 %299 to i32
  %301 = icmp eq i32 %300, 0
  br i1 %301, label %302, label %303

302:                                              ; preds = %297, %292
  store float 1.000000e+00, ptr %36, align 4, !tbaa !9
  br label %303

303:                                              ; preds = %302, %297
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  %304 = load float, ptr %17, align 4, !tbaa !9
  %305 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 5
  %306 = load float, ptr %305, align 8, !tbaa !19
  %307 = fdiv float %304, %306
  store float %307, ptr %37, align 4, !tbaa !9
  %308 = load float, ptr %37, align 4, !tbaa !9
  %309 = fcmp ogt float %308, 4.000000e+00
  br i1 %309, label %313, label %310

310:                                              ; preds = %303
  %311 = load float, ptr %37, align 4, !tbaa !9
  %312 = fcmp olt float %311, 2.500000e-01
  br i1 %312, label %313, label %314

313:                                              ; preds = %310, %303
  store float 1.000000e+00, ptr %6, align 4, !tbaa !9
  br label %314

314:                                              ; preds = %313, %310
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #8
  %315 = load float, ptr %36, align 4, !tbaa !9
  %316 = load float, ptr %6, align 4, !tbaa !9
  %317 = fmul float %315, %316
  store float %317, ptr %38, align 4, !tbaa !9
  %318 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(4) %38)
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  %319 = load float, ptr %36, align 4, !tbaa !9
  %320 = load float, ptr %6, align 4, !tbaa !9
  %321 = fmul float %319, %320
  store float %321, ptr %39, align 4, !tbaa !9
  %322 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(4) %39)
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  br label %323

323:                                              ; preds = %314
  %324 = load i8, ptr %9, align 1, !tbaa !11, !range !15, !noundef !16
  %325 = trunc i8 %324 to i1
  br i1 %325, label %326, label %331

326:                                              ; preds = %323
  %327 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 3
  %328 = load ptr, ptr %327, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %21, i64 8, i1 false), !tbaa.struct !20
  %329 = load <2 x float>, ptr %40, align 4
  %330 = call noundef ptr @_ZN9QParticle10ApplyForceE7QVector(ptr noundef nonnull align 8 dereferenceable(290) %328, <2 x float> %329)
  br label %331

331:                                              ; preds = %326, %323
  %332 = load i8, ptr %10, align 1, !tbaa !11, !range !15, !noundef !16
  %333 = trunc i8 %332 to i1
  br i1 %333, label %334, label %339

334:                                              ; preds = %331
  %335 = getelementptr inbounds %class.QSpring, ptr %44, i32 0, i32 4
  %336 = load ptr, ptr %335, align 8, !tbaa !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 4 %22, i64 8, i1 false), !tbaa.struct !20
  %337 = load <2 x float>, ptr %41, align 4
  %338 = call noundef ptr @_ZN9QParticle10ApplyForceE7QVector(ptr noundef nonnull align 8 dereferenceable(290) %336, <2 x float> %337)
  br label %339

339:                                              ; preds = %334, %331
  store i32 0, ptr %13, align 4
  br label %340

340:                                              ; preds = %339, %283, %279
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %341

341:                                              ; preds = %340, %182, %147
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  %342 = load i32, ptr %13, align 4
  switch i32 %342, label %344 [
    i32 0, label %343
    i32 1, label %343
  ]

343:                                              ; preds = %341, %341, %63, %54, %50
  ret void

344:                                              ; preds = %341
  unreachable
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5QBody18GetSimulationModelEv(ptr noundef nonnull align 8 dereferenceable(293)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5QBody7GetModeEv(ptr noundef nonnull align 8 dereferenceable(293)) #4 align 2

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

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

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

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

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

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

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

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

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

declare noundef ptr @_ZN9QParticle19AddAccumulatedForceE7QVector(ptr noundef nonnull align 8 dereferenceable(290), <2 x float>) #7

declare noundef ptr @_ZN9QParticle10ApplyForceE7QVector(ptr noundef nonnull align 8 dereferenceable(290), <2 x float>) #7

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !12, i64 37}
!14 = !{!"_ZTS7QSpring", !10, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !12, i64 36, !12, i64 37, !12, i64 38}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!14, !6, i64 16}
!18 = !{!14, !6, i64 24}
!19 = !{!14, !10, i64 32}
!20 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!21 = !{!14, !12, i64 36}


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

%struct.QVector = type { float, float }

; 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 uwtable
declare dso_local <2 x float> @_Zmi7QVectorS_(<2 x float>, <2 x float>) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7QSpring6UpdateEfbb(ptr nocapture noundef nonnull readonly align 8 dereferenceable(39) %0, float noundef %1, i1 noundef zeroext %2, i1 noundef zeroext %3) unnamed_addr #1 align 2 {
  %5 = alloca %struct.QVector, align 8
  %6 = alloca %struct.QVector, align 8
  %7 = alloca %struct.QVector, align 8
  %8 = alloca %struct.QVector, 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 float, align 4
  %16 = alloca float, align 4
  %17 = getelementptr inbounds i8, ptr %0, i64 37
  %18 = load i8, ptr %17, align 1, !tbaa !5, !range !12, !noundef !13
  %19 = icmp eq i8 %18, 0
  %20 = fcmp oeq float %1, 0.000000e+00
  %or.cond3 = or i1 %20, %19
  br i1 %or.cond3, label %173, label %21

21:                                               ; preds = %4
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  %23 = load ptr, ptr %22, align 8, !tbaa !14
  %24 = icmp eq ptr %23, null
  br i1 %24, label %173, label %25

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %0, i64 24
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = icmp eq ptr %27, null
  br i1 %28, label %173, label %29

29:                                               ; preds = %25
  br i1 %3, label %30, label %60

30:                                               ; preds = %29
  %31 = tail call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %23)
  %.not = icmp eq ptr %31, null
  br i1 %.not, label %43, label %32

32:                                               ; preds = %30
  %33 = load ptr, ptr %22, align 8, !tbaa !14
  %34 = tail call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %33)
  %35 = tail call noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256) %34)
  %.not48 = icmp eq ptr %35, null
  br i1 %.not48, label %43, label %36

36:                                               ; preds = %32
  %37 = tail call noundef i32 @_ZN5QBody18GetSimulationModelEv(ptr noundef nonnull align 8 dereferenceable(293) %35)
  %38 = icmp eq i32 %37, 1
  br i1 %38, label %42, label %39

39:                                               ; preds = %36
  %40 = tail call noundef i32 @_ZN5QBody7GetModeEv(ptr noundef nonnull align 8 dereferenceable(293) %35)
  %41 = icmp eq i32 %40, 1
  br i1 %41, label %42, label %43

42:                                               ; preds = %39, %36
  br label %43

43:                                               ; preds = %32, %42, %39, %30
  %.1 = phi i8 [ 1, %30 ], [ 0, %42 ], [ 1, %39 ], [ 1, %32 ]
  %44 = load ptr, ptr %26, align 8, !tbaa !15
  %45 = tail call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %44)
  %.not49 = icmp eq ptr %45, null
  br i1 %.not49, label %57, label %46

46:                                               ; preds = %43
  %47 = load ptr, ptr %26, align 8, !tbaa !15
  %48 = tail call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %47)
  %49 = tail call noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256) %48)
  %.not50 = icmp eq ptr %49, null
  br i1 %.not50, label %57, label %50

50:                                               ; preds = %46
  %51 = tail call noundef i32 @_ZN5QBody18GetSimulationModelEv(ptr noundef nonnull align 8 dereferenceable(293) %49)
  %52 = icmp eq i32 %51, 1
  br i1 %52, label %56, label %53

53:                                               ; preds = %50
  %54 = tail call noundef i32 @_ZN5QBody7GetModeEv(ptr noundef nonnull align 8 dereferenceable(293) %49)
  %55 = icmp eq i32 %54, 1
  br i1 %55, label %56, label %57

56:                                               ; preds = %53, %50
  br label %57

57:                                               ; preds = %46, %56, %53, %43
  %.140 = phi i8 [ 1, %43 ], [ 0, %56 ], [ 1, %53 ], [ 1, %46 ]
  %58 = load ptr, ptr %26, align 8, !tbaa !15
  %59 = tail call noundef zeroext i1 @_ZN9QParticle10GetEnabledEv(ptr noundef nonnull align 8 dereferenceable(290) %58)
  %spec.select = select i1 %59, i8 %.140, i8 0
  %.pre = load ptr, ptr %22, align 8, !tbaa !14
  br label %60

60:                                               ; preds = %57, %29
  %61 = phi ptr [ %23, %29 ], [ %.pre, %57 ]
  %.241 = phi i8 [ 1, %29 ], [ %spec.select, %57 ]
  %.2 = phi i8 [ 1, %29 ], [ %.1, %57 ]
  %62 = tail call noundef zeroext i1 @_ZN9QParticle10GetEnabledEv(ptr noundef nonnull align 8 dereferenceable(290) %61)
  %spec.select55 = select i1 %62, i8 %.2, i8 0
  %63 = load ptr, ptr %26, align 8, !tbaa !15
  %64 = tail call noundef zeroext i1 @_ZN9QParticle10GetEnabledEv(ptr noundef nonnull align 8 dereferenceable(290) %63)
  %.342 = select i1 %64, i8 %.241, i8 0
  %65 = trunc nuw i8 %spec.select55 to i1
  %66 = icmp eq i8 %spec.select55, 0
  %67 = icmp eq i8 %.342, 0
  %68 = or i8 %.342, %spec.select55
  %or.cond57 = icmp eq i8 %68, 0
  br i1 %or.cond57, label %173, label %69

69:                                               ; preds = %60
  %70 = load ptr, ptr %22, align 8, !tbaa !14
  %71 = tail call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %70)
  %.not51 = icmp eq ptr %71, null
  br i1 %.not51, label %93, label %72

72:                                               ; preds = %69
  %73 = load ptr, ptr %26, align 8, !tbaa !15
  %74 = tail call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %73)
  %.not52 = icmp eq ptr %74, null
  br i1 %.not52, label %93, label %75

75:                                               ; preds = %72
  %76 = load ptr, ptr %22, align 8, !tbaa !14
  %77 = tail call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %76)
  %78 = tail call noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256) %77)
  %.not53 = icmp eq ptr %78, null
  br i1 %.not53, label %93, label %79

79:                                               ; preds = %75
  %80 = load ptr, ptr %26, align 8, !tbaa !15
  %81 = tail call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %80)
  %82 = tail call noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256) %81)
  %.not54 = icmp eq ptr %82, null
  br i1 %.not54, label %93, label %83

83:                                               ; preds = %79
  %84 = load ptr, ptr %22, align 8, !tbaa !14
  %85 = tail call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %84)
  %86 = tail call noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256) %85)
  %87 = tail call noundef zeroext i1 @_ZN5QBody13GetIsSleepingEv(ptr noundef nonnull align 8 dereferenceable(293) %86)
  br i1 %87, label %88, label %93

88:                                               ; preds = %83
  %89 = load ptr, ptr %26, align 8, !tbaa !15
  %90 = tail call noundef ptr @_ZN9QParticle12GetOwnerMeshEv(ptr noundef nonnull align 8 dereferenceable(290) %89)
  %91 = tail call noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256) %90)
  %92 = tail call noundef zeroext i1 @_ZN5QBody13GetIsSleepingEv(ptr noundef nonnull align 8 dereferenceable(293) %91)
  br i1 %92, label %173, label %93

93:                                               ; preds = %75, %79, %88, %83, %72, %69
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %94 = load ptr, ptr %26, align 8, !tbaa !15
  %95 = tail call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %94)
  %96 = load ptr, ptr %22, align 8, !tbaa !14
  %97 = tail call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %96)
  %98 = tail call <2 x float> @_Zmi7QVectorS_(<2 x float> %95, <2 x float> %97)
  store <2 x float> %98, ptr %5, align 8
  %99 = call noundef float @_ZNK7QVector6LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %5)
  %100 = call <2 x float> @_ZNK7QVector10NormalizedEv(ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %101 = getelementptr inbounds i8, ptr %0, i64 32
  %102 = load float, ptr %101, align 8, !tbaa !16
  %103 = fsub float %102, %99
  %104 = call <2 x float> @_Zmlf7QVector(float noundef %103, <2 x float> %100)
  store <2 x float> %104, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %105 = call <2 x float> @_ZNK7QVectorngEv(ptr noundef nonnull align 4 dereferenceable(8) %6)
  store <2 x float> %105, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %106 = load i64, ptr %6, align 8
  store i64 %106, ptr %8, align 8
  br i1 %2, label %107, label %156

107:                                              ; preds = %93
  %108 = getelementptr inbounds i8, ptr %0, i64 36
  %109 = load i8, ptr %108, align 4, !tbaa !17, !range !12, !noundef !13
  %110 = trunc nuw i8 %109 to i1
  br i1 %110, label %111, label %156

111:                                              ; preds = %107
  %112 = load ptr, ptr %26, align 8, !tbaa !15
  %113 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %112)
  %114 = load ptr, ptr %22, align 8, !tbaa !14
  %115 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %114)
  %116 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %113, <2 x float> %115)
  %117 = call <2 x float> @_Zml7QVectorf(<2 x float> %116, float noundef 5.000000e-01)
  store <2 x float> %117, ptr %6, align 8
  store <2 x float> %117, ptr %7, align 8
  %118 = call <2 x float> @_ZNK7QVectorngEv(ptr noundef nonnull align 4 dereferenceable(8) %6)
  store <2 x float> %118, ptr %8, align 8
  %119 = load ptr, ptr %22, align 8, !tbaa !14
  %120 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %119)
  br i1 %120, label %121, label %127

121:                                              ; preds = %111
  %122 = load ptr, ptr %26, align 8, !tbaa !15
  %123 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %122)
  br i1 %123, label %127, label %124

124:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  store float 1.000000e+00, ptr %9, align 4, !tbaa !18
  %125 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  store float 0.000000e+00, ptr %10, align 4, !tbaa !18
  %126 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  br label %151

127:                                              ; preds = %121, %111
  %128 = load ptr, ptr %22, align 8, !tbaa !14
  %129 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %128)
  br i1 %129, label %136, label %130

130:                                              ; preds = %127
  %131 = load ptr, ptr %26, align 8, !tbaa !15
  %132 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %131)
  br i1 %132, label %133, label %136

133:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  store float 0.000000e+00, ptr %11, align 4, !tbaa !18
  %134 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  store float 1.000000e+00, ptr %12, align 4, !tbaa !18
  %135 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  br label %151

136:                                              ; preds = %130, %127
  %137 = load ptr, ptr %22, align 8, !tbaa !14
  %138 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %137)
  br i1 %138, label %139, label %145

139:                                              ; preds = %136
  %140 = load ptr, ptr %26, align 8, !tbaa !15
  %141 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %140)
  br i1 %141, label %142, label %145

142:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  store float 5.000000e-01, ptr %13, align 4, !tbaa !18
  %143 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  store float 5.000000e-01, ptr %14, align 4, !tbaa !18
  %144 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  br label %151

145:                                              ; preds = %139, %136
  %146 = load ptr, ptr %22, align 8, !tbaa !14
  %147 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %146)
  br i1 %147, label %151, label %148

148:                                              ; preds = %145
  %149 = load ptr, ptr %22, align 8, !tbaa !14
  %150 = call noundef zeroext i1 @_ZN9QParticle13GetIsInternalEv(ptr noundef nonnull align 8 dereferenceable(290) %149)
  br i1 %150, label %151, label %172

151:                                              ; preds = %133, %145, %148, %142, %124
  %152 = load ptr, ptr %22, align 8, !tbaa !14
  %.sroa.09.0.copyload = load <2 x float>, ptr %7, align 8
  %153 = call noundef ptr @_ZN9QParticle19AddAccumulatedForceE7QVector(ptr noundef nonnull align 8 dereferenceable(290) %152, <2 x float> %.sroa.09.0.copyload)
  %154 = load ptr, ptr %26, align 8, !tbaa !15
  %.sroa.08.0.copyload = load <2 x float>, ptr %8, align 8
  %155 = call noundef ptr @_ZN9QParticle19AddAccumulatedForceE7QVector(ptr noundef nonnull align 8 dereferenceable(290) %154, <2 x float> %.sroa.08.0.copyload)
  br label %172

156:                                              ; preds = %107, %93
  %or.cond59 = or i1 %66, %67
  %.043 = select i1 %or.cond59, float 1.000000e+00, float 5.000000e-01
  %157 = load float, ptr %101, align 8, !tbaa !16
  %158 = fdiv float %99, %157
  %159 = fcmp ogt float %158, 4.000000e+00
  %160 = fcmp olt float %158, 2.500000e-01
  %or.cond = or i1 %159, %160
  %.0 = select i1 %or.cond, float 1.000000e+00, float %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  %161 = fmul float %.043, %.0
  store float %161, ptr %15, align 4, !tbaa !18
  %162 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  store float %161, ptr %16, align 4, !tbaa !18
  %163 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7QVectormLERKf(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %16)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  br i1 %65, label %164, label %167

164:                                              ; preds = %156
  %165 = load ptr, ptr %22, align 8, !tbaa !14
  %.sroa.04.0.copyload = load <2 x float>, ptr %7, align 8
  %166 = call noundef ptr @_ZN9QParticle10ApplyForceE7QVector(ptr noundef nonnull align 8 dereferenceable(290) %165, <2 x float> %.sroa.04.0.copyload)
  br label %167

167:                                              ; preds = %164, %156
  %168 = trunc nuw i8 %.342 to i1
  br i1 %168, label %169, label %172

169:                                              ; preds = %167
  %170 = load ptr, ptr %26, align 8, !tbaa !15
  %.sroa.0.0.copyload = load <2 x float>, ptr %8, align 8
  %171 = call noundef ptr @_ZN9QParticle10ApplyForceE7QVector(ptr noundef nonnull align 8 dereferenceable(290) %170, <2 x float> %.sroa.0.0.copyload)
  br label %172

172:                                              ; preds = %167, %169, %148, %151
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %173

173:                                              ; preds = %172, %60, %88, %21, %25, %4
  ret void
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5QBody18GetSimulationModelEv(ptr noundef nonnull align 8 dereferenceable(293)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5QBody7GetModeEv(ptr noundef nonnull align 8 dereferenceable(293)) local_unnamed_addr #4 align 2

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

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

; 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> @_Zmlf7QVector(float noundef, <2 x float>) local_unnamed_addr #1

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

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

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

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

declare noundef ptr @_ZN9QParticle19AddAccumulatedForceE7QVector(ptr noundef nonnull align 8 dereferenceable(290), <2 x float>) local_unnamed_addr #6

declare noundef ptr @_ZN9QParticle10ApplyForceE7QVector(ptr noundef nonnull align 8 dereferenceable(290), <2 x float>) local_unnamed_addr #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 37}
!6 = !{!"_ZTS7QSpring", !7, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !11, i64 36, !11, i64 37, !11, i64 38}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!6, !10, i64 16}
!15 = !{!6, !10, i64 24}
!16 = !{!6, !7, i64 32}
!17 = !{!6, !11, i64 36}
!18 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass