; LLVM IR from mtsamis/box2d-optimized :: src/particle/b2_particle_system.ll (ZN16b2ParticleSystem17SolveRigidDampingEv)

; 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.b2Vec2 = type { float, float }
%class.b2ParticleSystem = type { i8, i32, i32, i8, i32, i8, i8, i32, float, float, float, float, i32, i32, %class.b2SlabAllocator, %"struct.b2ParticleSystem::UserOverridableBuffer", %"struct.b2ParticleSystem::UserOverridableBuffer.0", %"struct.b2ParticleSystem::UserOverridableBuffer.2", %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr, ptr, ptr, ptr, ptr, ptr, %"struct.b2ParticleSystem::UserOverridableBuffer.4", ptr, %"struct.b2ParticleSystem::UserOverridableBuffer.6", i32, [4 x i8], %"struct.b2ParticleSystem::UserOverridableBuffer.8", %"struct.b2ParticleSystem::UserOverridableBuffer.8", %"struct.b2ParticleSystem::UserOverridableBuffer.8", %class.b2GrowableBuffer, %class.b2GrowableBuffer.10, %class.b2GrowableBuffer.11, %class.b2GrowableBuffer.12, %class.b2GrowableBuffer.13, %class.b2GrowableBuffer.14, %"struct.b2ParticleSystem::UserOverridableBuffer.8", %"struct.b2ParticleSystem::UserOverridableBuffer.8", i64, i8, i32, ptr, %struct.b2ParticleSystemDef, ptr, ptr, ptr }
%class.b2SlabAllocator = type { %class.b2TrackedBlockAllocator, i32, %class.b2TypedFreeList }
%class.b2TrackedBlockAllocator = type { %class.b2TypedIntrusiveListNode }
%class.b2TypedIntrusiveListNode = type { %class.b2IntrusiveListNode }
%class.b2IntrusiveListNode = type { ptr, ptr }
%class.b2TypedFreeList = type { %class.b2FreeList }
%class.b2FreeList = type { %class.b2IntrusiveListNode, %class.b2IntrusiveListNode }
%"struct.b2ParticleSystem::UserOverridableBuffer" = type <{ ptr, i32, [4 x i8] }>
%"struct.b2ParticleSystem::UserOverridableBuffer.0" = type <{ ptr, i32, [4 x i8] }>
%"struct.b2ParticleSystem::UserOverridableBuffer.2" = type <{ ptr, i32, [4 x i8] }>
%"struct.b2ParticleSystem::UserOverridableBuffer.4" = type <{ ptr, i32, [4 x i8] }>
%"struct.b2ParticleSystem::UserOverridableBuffer.6" = type <{ ptr, i32, [4 x i8] }>
%class.b2GrowableBuffer = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.10 = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.11 = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.12 = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.13 = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.14 = type { ptr, i32, i32, ptr }
%"struct.b2ParticleSystem::UserOverridableBuffer.8" = type <{ ptr, i32, [4 x i8] }>
%struct.b2ParticleSystemDef = type { i8, float, float, float, i32, float, float, float, float, float, float, float, float, float, float, float, float, i32, float, i8, float }
%struct.b2ParticleBodyContact = type { i32, ptr, ptr, float, %struct.b2Vec2, float }

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

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

; Function Attrs: 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) #1

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24)) #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZN16b2GrowableBufferI21b2ParticleBodyContactEixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK17b2ParticleContact9GetWeightEv(ptr noundef nonnull align 4 dereferenceable(24)) #3 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem17SolveRigidDampingEv(ptr noundef nonnull align 8 dereferenceable(632) %0) #6 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca float, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %struct.b2Vec2, align 4
  %10 = alloca float, align 4
  %11 = alloca %struct.b2Vec2, align 4
  %12 = alloca %struct.b2Vec2, align 4
  %13 = alloca %struct.b2Vec2, align 4
  %14 = alloca %struct.b2Vec2, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca %struct.b2Vec2, align 4
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %struct.b2Vec2, align 4
  %29 = alloca float, align 4
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i8, align 1
  %33 = alloca i8, align 1
  %34 = alloca %struct.b2Vec2, align 4
  %35 = alloca %struct.b2Vec2, align 4
  %36 = alloca %struct.b2Vec2, align 4
  %37 = alloca %struct.b2Vec2, align 4
  %38 = alloca %struct.b2Vec2, align 4
  %39 = alloca float, align 4
  %40 = alloca float, align 4
  %41 = alloca float, align 4
  %42 = alloca float, align 4
  %43 = alloca float, align 4
  %44 = alloca float, align 4
  %45 = alloca float, align 4
  %46 = alloca float, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %47 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %48 = getelementptr inbounds %class.b2ParticleSystem, ptr %47, i32 0, i32 45
  %49 = getelementptr inbounds %struct.b2ParticleSystemDef, ptr %48, i32 0, i32 6
  %50 = load float, ptr %49, align 8, !tbaa !9
  store float %50, ptr %3, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 0, ptr %4, align 4, !tbaa !35
  br label %51

51:                                               ; preds = %136, %1
  %52 = load i32, ptr %4, align 4, !tbaa !35
  %53 = getelementptr inbounds %class.b2ParticleSystem, ptr %47, i32 0, i32 36
  %54 = call noundef i32 @_ZNK16b2GrowableBufferI21b2ParticleBodyContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %53)
  %55 = icmp slt i32 %52, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %139

57:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %58 = getelementptr inbounds %class.b2ParticleSystem, ptr %47, i32 0, i32 36
  %59 = load i32, ptr %4, align 4, !tbaa !35
  %60 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN16b2GrowableBufferI21b2ParticleBodyContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %58, i32 noundef %59)
  store ptr %60, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.b2ParticleBodyContact, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 8, !tbaa !36
  store i32 %63, ptr %6, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %64 = getelementptr inbounds %class.b2ParticleSystem, ptr %47, i32 0, i32 26
  %65 = load ptr, ptr %64, align 8, !tbaa !39
  %66 = load i32, ptr %6, align 4, !tbaa !35
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds ptr, ptr %65, i64 %67
  %69 = load ptr, ptr %68, align 8, !tbaa !5
  store ptr %69, ptr %7, align 8, !tbaa !5
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = call noundef zeroext i1 @_ZNK16b2ParticleSystem12IsRigidGroupEP15b2ParticleGroup(ptr noundef nonnull align 8 dereferenceable(632) %47, ptr noundef %70)
  br i1 %71, label %72, label %135

72:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.b2ParticleBodyContact, ptr %73, i32 0, i32 1
  %75 = load ptr, ptr %74, align 8, !tbaa !40
  store ptr %75, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.b2ParticleBodyContact, ptr %76, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 %77, i64 8, i1 false), !tbaa.struct !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.b2ParticleBodyContact, ptr %78, i32 0, i32 3
  %80 = load float, ptr %79, align 8, !tbaa !42
  store float %80, ptr %10, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %81 = getelementptr inbounds %class.b2ParticleSystem, ptr %47, i32 0, i32 17
  %82 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !43
  %84 = load i32, ptr %6, align 4, !tbaa !35
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds %struct.b2Vec2, ptr %83, i64 %85
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %86, i64 8, i1 false), !tbaa.struct !41
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = call <2 x float> @_ZNK6b2Body31GetLinearVelocityFromWorldPointERK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(208) %87, ptr noundef nonnull align 4 dereferenceable(8) %11)
  store <2 x float> %88, ptr %13, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = call <2 x float> @_ZNK15b2ParticleGroup31GetLinearVelocityFromWorldPointERK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(96) %89, ptr noundef nonnull align 4 dereferenceable(8) %11)
  store <2 x float> %90, ptr %14, align 4
  %91 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %14)
  store <2 x float> %91, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %92 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store float %92, ptr %15, align 4, !tbaa !34
  %93 = load float, ptr %15, align 4, !tbaa !34
  %94 = fcmp olt float %93, 0.000000e+00
  br i1 %94, label %95, label %134

95:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = load i32, ptr %6, align 4, !tbaa !35
  call void @_ZNK16b2ParticleSystem44InitDampingParameterWithRigidGroupOrParticleEPfS0_S0_bP15b2ParticleGroupiRK6b2Vec2S5_(ptr noundef nonnull align 8 dereferenceable(632) %47, ptr noundef %16, ptr noundef %17, ptr noundef %18, i1 noundef zeroext true, ptr noundef %96, i32 noundef %97, ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %9)
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = call noundef float @_ZNK6b2Body7GetMassEv(ptr noundef nonnull align 8 dereferenceable(208) %98)
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = call noundef float @_ZNK6b2Body10GetInertiaEv(ptr noundef nonnull align 8 dereferenceable(208) %100)
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = call noundef float @_ZNK6b2Body7GetMassEv(ptr noundef nonnull align 8 dereferenceable(208) %102)
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6b2Body14GetLocalCenterEv(ptr noundef nonnull align 8 dereferenceable(208) %104)
  %106 = call noundef float @_ZNK6b2Vec213LengthSquaredEv(ptr noundef nonnull align 4 dereferenceable(8) %105)
  %107 = fneg float %103
  %108 = call float @llvm.fmuladd.f32(float %107, float %106, float %101)
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6b2Body14GetWorldCenterEv(ptr noundef nonnull align 8 dereferenceable(208) %109)
  call void @_ZNK16b2ParticleSystem20InitDampingParameterEPfS0_S0_ffRK6b2Vec2S3_S3_(ptr noundef nonnull align 8 dereferenceable(632) %47, ptr noundef %19, ptr noundef %20, ptr noundef %21, float noundef %99, float noundef %108, ptr noundef nonnull align 4 dereferenceable(8) %110, ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %111 = load float, ptr %3, align 4, !tbaa !34
  %112 = load float, ptr %10, align 4, !tbaa !34
  %113 = call noundef float @_Z5b2MinIfET_S0_S0_(float noundef %112, float noundef 1.000000e+00)
  %114 = fmul float %111, %113
  %115 = load float, ptr %16, align 4, !tbaa !34
  %116 = load float, ptr %17, align 4, !tbaa !34
  %117 = load float, ptr %18, align 4, !tbaa !34
  %118 = load float, ptr %19, align 4, !tbaa !34
  %119 = load float, ptr %20, align 4, !tbaa !34
  %120 = load float, ptr %21, align 4, !tbaa !34
  %121 = load float, ptr %15, align 4, !tbaa !34
  %122 = call noundef float @_ZNK16b2ParticleSystem21ComputeDampingImpulseEfffffff(ptr noundef nonnull align 8 dereferenceable(632) %47, float noundef %115, float noundef %116, float noundef %117, float noundef %118, float noundef %119, float noundef %120, float noundef %121)
  %123 = fmul float %114, %122
  store float %123, ptr %22, align 4, !tbaa !34
  %124 = load float, ptr %16, align 4, !tbaa !34
  %125 = load float, ptr %17, align 4, !tbaa !34
  %126 = load float, ptr %18, align 4, !tbaa !34
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = load i32, ptr %6, align 4, !tbaa !35
  %129 = load float, ptr %22, align 4, !tbaa !34
  call void @_ZN16b2ParticleSystem12ApplyDampingEfffbP15b2ParticleGroupifRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %47, float noundef %124, float noundef %125, float noundef %126, i1 noundef zeroext true, ptr noundef %127, i32 noundef %128, float noundef %129, ptr noundef nonnull align 4 dereferenceable(8) %9)
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %131 = load float, ptr %22, align 4, !tbaa !34
  %132 = fneg float %131
  %133 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %132, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %133, ptr %23, align 4
  call void @_ZN6b2Body18ApplyLinearImpulseERK6b2Vec2S2_(ptr noundef nonnull align 8 dereferenceable(208) %130, ptr noundef nonnull align 4 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %134

134:                                              ; preds = %95, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %135

135:                                              ; preds = %134, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %4, align 4, !tbaa !35
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %4, align 4, !tbaa !35
  br label %51, !llvm.loop !44

139:                                              ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !35
  br label %140

140:                                              ; preds = %250, %139
  %141 = load i32, ptr %24, align 4, !tbaa !35
  %142 = getelementptr inbounds %class.b2ParticleSystem, ptr %47, i32 0, i32 35
  %143 = call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %142)
  %144 = icmp slt i32 %141, %143
  br i1 %144, label %146, label %145

145:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %253

146:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %147 = getelementptr inbounds %class.b2ParticleSystem, ptr %47, i32 0, i32 35
  %148 = load i32, ptr %24, align 4, !tbaa !35
  %149 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %147, i32 noundef %148)
  store ptr %149, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %150 = load ptr, ptr %25, align 8, !tbaa !5
  %151 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %150)
  store i32 %151, ptr %26, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  %152 = load ptr, ptr %25, align 8, !tbaa !5
  %153 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %152)
  store i32 %153, ptr %27, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %154 = load ptr, ptr %25, align 8, !tbaa !5
  %155 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK17b2ParticleContact9GetNormalEv(ptr noundef nonnull align 4 dereferenceable(24) %154)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %155, i64 8, i1 false), !tbaa.struct !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %156 = load ptr, ptr %25, align 8, !tbaa !5
  %157 = call noundef float @_ZNK17b2ParticleContact9GetWeightEv(ptr noundef nonnull align 4 dereferenceable(24) %156)
  store float %157, ptr %29, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %158 = getelementptr inbounds %class.b2ParticleSystem, ptr %47, i32 0, i32 26
  %159 = load ptr, ptr %158, align 8, !tbaa !39
  %160 = load i32, ptr %26, align 4, !tbaa !35
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds ptr, ptr %159, i64 %161
  %163 = load ptr, ptr %162, align 8, !tbaa !5
  store ptr %163, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %164 = getelementptr inbounds %class.b2ParticleSystem, ptr %47, i32 0, i32 26
  %165 = load ptr, ptr %164, align 8, !tbaa !39
  %166 = load i32, ptr %27, align 4, !tbaa !35
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds ptr, ptr %165, i64 %167
  %169 = load ptr, ptr %168, align 8, !tbaa !5
  store ptr %169, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #8
  %170 = load ptr, ptr %30, align 8, !tbaa !5
  %171 = call noundef zeroext i1 @_ZNK16b2ParticleSystem12IsRigidGroupEP15b2ParticleGroup(ptr noundef nonnull align 8 dereferenceable(632) %47, ptr noundef %170)
  %172 = zext i1 %171 to i8
  store i8 %172, ptr %32, align 1, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #8
  %173 = load ptr, ptr %31, align 8, !tbaa !5
  %174 = call noundef zeroext i1 @_ZNK16b2ParticleSystem12IsRigidGroupEP15b2ParticleGroup(ptr noundef nonnull align 8 dereferenceable(632) %47, ptr noundef %173)
  %175 = zext i1 %174 to i8
  store i8 %175, ptr %33, align 1, !tbaa !46
  %176 = load ptr, ptr %30, align 8, !tbaa !5
  %177 = load ptr, ptr %31, align 8, !tbaa !5
  %178 = icmp ne ptr %176, %177
  br i1 %178, label %179, label %249

179:                                              ; preds = %146
  %180 = load i8, ptr %32, align 1, !tbaa !46, !range !47, !noundef !48
  %181 = trunc i8 %180 to i1
  br i1 %181, label %185, label %182

182:                                              ; preds = %179
  %183 = load i8, ptr %33, align 1, !tbaa !46, !range !47, !noundef !48
  %184 = trunc i8 %183 to i1
  br i1 %184, label %185, label %249

185:                                              ; preds = %182, %179
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #8
  %186 = getelementptr inbounds %class.b2ParticleSystem, ptr %47, i32 0, i32 17
  %187 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %186, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !43
  %189 = load i32, ptr %26, align 4, !tbaa !35
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds %struct.b2Vec2, ptr %188, i64 %190
  %192 = getelementptr inbounds %class.b2ParticleSystem, ptr %47, i32 0, i32 17
  %193 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %192, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8, !tbaa !43
  %195 = load i32, ptr %27, align 4, !tbaa !35
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds %struct.b2Vec2, ptr %194, i64 %196
  %198 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %191, ptr noundef nonnull align 4 dereferenceable(8) %197)
  store <2 x float> %198, ptr %35, align 4
  %199 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef 5.000000e-01, ptr noundef nonnull align 4 dereferenceable(8) %35)
  store <2 x float> %199, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %200 = load ptr, ptr %31, align 8, !tbaa !5
  %201 = load i32, ptr %27, align 4, !tbaa !35
  %202 = call <2 x float> @_ZNK16b2ParticleSystem17GetLinearVelocityEP15b2ParticleGroupiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %47, ptr noundef %200, i32 noundef %201, ptr noundef nonnull align 4 dereferenceable(8) %34)
  store <2 x float> %202, ptr %37, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  %203 = load ptr, ptr %30, align 8, !tbaa !5
  %204 = load i32, ptr %26, align 4, !tbaa !35
  %205 = call <2 x float> @_ZNK16b2ParticleSystem17GetLinearVelocityEP15b2ParticleGroupiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %47, ptr noundef %203, i32 noundef %204, ptr noundef nonnull align 4 dereferenceable(8) %34)
  store <2 x float> %205, ptr %38, align 4
  %206 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %37, ptr noundef nonnull align 4 dereferenceable(8) %38)
  store <2 x float> %206, ptr %36, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  %207 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(8) %28)
  store float %207, ptr %39, align 4, !tbaa !34
  %208 = load float, ptr %39, align 4, !tbaa !34
  %209 = fcmp olt float %208, 0.000000e+00
  br i1 %209, label %210, label %248

210:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #8
  %211 = load i8, ptr %32, align 1, !tbaa !46, !range !47, !noundef !48
  %212 = trunc i8 %211 to i1
  %213 = load ptr, ptr %30, align 8, !tbaa !5
  %214 = load i32, ptr %26, align 4, !tbaa !35
  call void @_ZNK16b2ParticleSystem44InitDampingParameterWithRigidGroupOrParticleEPfS0_S0_bP15b2ParticleGroupiRK6b2Vec2S5_(ptr noundef nonnull align 8 dereferenceable(632) %47, ptr noundef %40, ptr noundef %41, ptr noundef %42, i1 noundef zeroext %212, ptr noundef %213, i32 noundef %214, ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(8) %28)
  %215 = load i8, ptr %33, align 1, !tbaa !46, !range !47, !noundef !48
  %216 = trunc i8 %215 to i1
  %217 = load ptr, ptr %31, align 8, !tbaa !5
  %218 = load i32, ptr %27, align 4, !tbaa !35
  call void @_ZNK16b2ParticleSystem44InitDampingParameterWithRigidGroupOrParticleEPfS0_S0_bP15b2ParticleGroupiRK6b2Vec2S5_(ptr noundef nonnull align 8 dereferenceable(632) %47, ptr noundef %43, ptr noundef %44, ptr noundef %45, i1 noundef zeroext %216, ptr noundef %217, i32 noundef %218, ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(8) %28)
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #8
  %219 = load float, ptr %3, align 4, !tbaa !34
  %220 = load float, ptr %29, align 4, !tbaa !34
  %221 = fmul float %219, %220
  %222 = load float, ptr %40, align 4, !tbaa !34
  %223 = load float, ptr %41, align 4, !tbaa !34
  %224 = load float, ptr %42, align 4, !tbaa !34
  %225 = load float, ptr %43, align 4, !tbaa !34
  %226 = load float, ptr %44, align 4, !tbaa !34
  %227 = load float, ptr %45, align 4, !tbaa !34
  %228 = load float, ptr %39, align 4, !tbaa !34
  %229 = call noundef float @_ZNK16b2ParticleSystem21ComputeDampingImpulseEfffffff(ptr noundef nonnull align 8 dereferenceable(632) %47, float noundef %222, float noundef %223, float noundef %224, float noundef %225, float noundef %226, float noundef %227, float noundef %228)
  %230 = fmul float %221, %229
  store float %230, ptr %46, align 4, !tbaa !34
  %231 = load float, ptr %40, align 4, !tbaa !34
  %232 = load float, ptr %41, align 4, !tbaa !34
  %233 = load float, ptr %42, align 4, !tbaa !34
  %234 = load i8, ptr %32, align 1, !tbaa !46, !range !47, !noundef !48
  %235 = trunc i8 %234 to i1
  %236 = load ptr, ptr %30, align 8, !tbaa !5
  %237 = load i32, ptr %26, align 4, !tbaa !35
  %238 = load float, ptr %46, align 4, !tbaa !34
  call void @_ZN16b2ParticleSystem12ApplyDampingEfffbP15b2ParticleGroupifRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %47, float noundef %231, float noundef %232, float noundef %233, i1 noundef zeroext %235, ptr noundef %236, i32 noundef %237, float noundef %238, ptr noundef nonnull align 4 dereferenceable(8) %28)
  %239 = load float, ptr %43, align 4, !tbaa !34
  %240 = load float, ptr %44, align 4, !tbaa !34
  %241 = load float, ptr %45, align 4, !tbaa !34
  %242 = load i8, ptr %33, align 1, !tbaa !46, !range !47, !noundef !48
  %243 = trunc i8 %242 to i1
  %244 = load ptr, ptr %31, align 8, !tbaa !5
  %245 = load i32, ptr %27, align 4, !tbaa !35
  %246 = load float, ptr %46, align 4, !tbaa !34
  %247 = fneg float %246
  call void @_ZN16b2ParticleSystem12ApplyDampingEfffbP15b2ParticleGroupifRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %47, float noundef %239, float noundef %240, float noundef %241, i1 noundef zeroext %243, ptr noundef %244, i32 noundef %245, float noundef %247, ptr noundef nonnull align 4 dereferenceable(8) %28)
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  br label %248

248:                                              ; preds = %210, %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  br label %249

249:                                              ; preds = %248, %182, %146
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %250

250:                                              ; preds = %249
  %251 = load i32, ptr %24, align 4, !tbaa !35
  %252 = add nsw i32 %251, 1
  store i32 %252, ptr %24, align 4, !tbaa !35
  br label %140, !llvm.loop !49

253:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6b2Body18ApplyLinearImpulseERK6b2Vec2S2_(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #7 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK16b2ParticleSystem44InitDampingParameterWithRigidGroupOrParticleEPfS0_S0_bP15b2ParticleGroupiRK6b2Vec2S5_(ptr noundef nonnull align 8 dereferenceable(632), ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext, ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #2 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16b2ParticleSystem12ApplyDampingEfffbP15b2ParticleGroupifRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632), float noundef, float noundef, float noundef, i1 noundef zeroext, ptr noundef, i32 noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(8)) #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 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 = { 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, !13, i64 544}
!10 = !{!"_ZTS16b2ParticleSystem", !11, i64 0, !12, i64 4, !12, i64 8, !11, i64 12, !12, i64 16, !11, i64 20, !11, i64 21, !12, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !12, i64 44, !12, i64 48, !14, i64 56, !20, i64 112, !21, i64 128, !22, i64 144, !22, i64 160, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !23, i64 224, !6, i64 240, !24, i64 248, !12, i64 264, !25, i64 272, !25, i64 288, !25, i64 304, !26, i64 320, !27, i64 344, !28, i64 368, !29, i64 392, !30, i64 416, !31, i64 440, !25, i64 464, !25, i64 480, !32, i64 496, !11, i64 504, !12, i64 508, !6, i64 512, !33, i64 520, !6, i64 608, !6, i64 616, !6, i64 624}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTS15b2SlabAllocatorI16b2ParticleHandleE", !15, i64 0, !12, i64 16, !18, i64 24}
!15 = !{!"_ZTS23b2TrackedBlockAllocator", !16, i64 0}
!16 = !{!"_ZTS24b2TypedIntrusiveListNodeI14b2TrackedBlockE", !17, i64 0}
!17 = !{!"_ZTS19b2IntrusiveListNode", !6, i64 0, !6, i64 8}
!18 = !{!"_ZTS15b2TypedFreeListI16b2ParticleHandleE", !19, i64 0}
!19 = !{!"_ZTS10b2FreeList", !17, i64 0, !17, i64 16}
!20 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIP16b2ParticleHandleEE", !6, i64 0, !12, i64 8}
!21 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIjEE", !6, i64 0, !12, i64 8}
!22 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferI6b2Vec2EE", !6, i64 0, !12, i64 8}
!23 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferI15b2ParticleColorEE", !6, i64 0, !12, i64 8}
!24 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIPvEE", !6, i64 0, !12, i64 8}
!25 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIiEE", !6, i64 0, !12, i64 8}
!26 = !{!"_ZTS16b2GrowableBufferIiE", !6, i64 0, !12, i64 8, !12, i64 12, !6, i64 16}
!27 = !{!"_ZTS16b2GrowableBufferIN16b2ParticleSystem5ProxyEE", !6, i64 0, !12, i64 8, !12, i64 12, !6, i64 16}
!28 = !{!"_ZTS16b2GrowableBufferI17b2ParticleContactE", !6, i64 0, !12, i64 8, !12, i64 12, !6, i64 16}
!29 = !{!"_ZTS16b2GrowableBufferI21b2ParticleBodyContactE", !6, i64 0, !12, i64 8, !12, i64 12, !6, i64 16}
!30 = !{!"_ZTS16b2GrowableBufferI14b2ParticlePairE", !6, i64 0, !12, i64 8, !12, i64 12, !6, i64 16}
!31 = !{!"_ZTS16b2GrowableBufferI15b2ParticleTriadE", !6, i64 0, !12, i64 8, !12, i64 12, !6, i64 16}
!32 = !{!"long long", !7, i64 0}
!33 = !{!"_ZTS19b2ParticleSystemDef", !11, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !12, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !12, i64 68, !13, i64 72, !11, i64 76, !13, i64 80}
!34 = !{!13, !13, i64 0}
!35 = !{!12, !12, i64 0}
!36 = !{!37, !12, i64 0}
!37 = !{!"_ZTS21b2ParticleBodyContact", !12, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !38, i64 28, !13, i64 36}
!38 = !{!"_ZTS6b2Vec2", !13, i64 0, !13, i64 4}
!39 = !{!10, !6, i64 240}
!40 = !{!37, !6, i64 8}
!41 = !{i64 0, i64 4, !34, i64 4, i64 4, !34}
!42 = !{!37, !13, i64 24}
!43 = !{!10, !6, i64 144}
!44 = distinct !{!44, !45}
!45 = !{!"llvm.loop.mustprogress"}
!46 = !{!11, !11, i64 0}
!47 = !{i8 0, i8 2}
!48 = !{}
!49 = distinct !{!49, !45}


; 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.b2Vec2 = 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z5b2MinIfET_S0_S0_(float noundef, float noundef) local_unnamed_addr #3

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem17SolveRigidDampingEv(ptr noundef nonnull align 8 dereferenceable(632) %0) local_unnamed_addr #5 align 2 {
  %2 = alloca %struct.b2Vec2, align 8
  %3 = alloca %struct.b2Vec2, align 8
  %4 = alloca %struct.b2Vec2, align 8
  %5 = alloca %struct.b2Vec2, align 8
  %6 = alloca %struct.b2Vec2, align 8
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca %struct.b2Vec2, align 8
  %14 = alloca %struct.b2Vec2, align 8
  %15 = alloca %struct.b2Vec2, align 8
  %16 = alloca %struct.b2Vec2, align 8
  %17 = alloca %struct.b2Vec2, align 8
  %18 = alloca %struct.b2Vec2, align 8
  %19 = alloca %struct.b2Vec2, align 8
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = getelementptr inbounds i8, ptr %0, i64 544
  %27 = load float, ptr %26, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %0, i64 392
  %29 = tail call noundef i32 @_ZNK16b2GrowableBufferI21b2ParticleBodyContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %1
  %31 = getelementptr inbounds i8, ptr %0, i64 240
  %32 = getelementptr inbounds i8, ptr %0, i64 144
  br label %38

.preheader:                                       ; preds = %86, %1
  %33 = getelementptr inbounds i8, ptr %0, i64 368
  %34 = call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %33)
  %35 = icmp sgt i32 %34, 0
  br i1 %35, label %.lr.ph74, label %._crit_edge

.lr.ph74:                                         ; preds = %.preheader
  %36 = getelementptr inbounds i8, ptr %0, i64 240
  %37 = getelementptr inbounds i8, ptr %0, i64 144
  br label %90

38:                                               ; preds = %.lr.ph, %86
  %.072 = phi i32 [ 0, %.lr.ph ], [ %87, %86 ]
  %39 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN16b2GrowableBufferI21b2ParticleBodyContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %28, i32 noundef %.072)
  %40 = load i32, ptr %39, align 8, !tbaa !33
  %41 = load ptr, ptr %31, align 8, !tbaa !36
  %42 = sext i32 %40 to i64
  %43 = getelementptr inbounds ptr, ptr %41, i64 %42
  %44 = load ptr, ptr %43, align 8, !tbaa !37
  %45 = call noundef zeroext i1 @_ZNK16b2ParticleSystem12IsRigidGroupEP15b2ParticleGroup(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef %44)
  br i1 %45, label %46, label %86

46:                                               ; preds = %38
  %47 = getelementptr inbounds i8, ptr %39, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %49 = getelementptr inbounds i8, ptr %39, i64 28
  %50 = load i64, ptr %49, align 4
  store i64 %50, ptr %2, align 8
  %51 = getelementptr inbounds i8, ptr %39, i64 24
  %52 = load float, ptr %51, align 8, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %53 = load ptr, ptr %32, align 8, !tbaa !40
  %54 = getelementptr inbounds %struct.b2Vec2, ptr %53, i64 %42
  %55 = load i64, ptr %54, align 4
  store i64 %55, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %56 = call <2 x float> @_ZNK6b2Body31GetLinearVelocityFromWorldPointERK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(208) %48, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %56, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %57 = call <2 x float> @_ZNK15b2ParticleGroup31GetLinearVelocityFromWorldPointERK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(96) %44, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %57, ptr %6, align 8
  %58 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %6)
  store <2 x float> %58, ptr %4, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %59 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %2)
  %60 = fcmp olt float %59, 0.000000e+00
  br i1 %60, label %61, label %85

61:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  call void @_ZNK16b2ParticleSystem44InitDampingParameterWithRigidGroupOrParticleEPfS0_S0_bP15b2ParticleGroupiRK6b2Vec2S5_(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, i1 noundef zeroext true, ptr noundef nonnull %44, i32 noundef %40, ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %2)
  %62 = call noundef float @_ZNK6b2Body7GetMassEv(ptr noundef nonnull align 8 dereferenceable(208) %48)
  %63 = call noundef float @_ZNK6b2Body10GetInertiaEv(ptr noundef nonnull align 8 dereferenceable(208) %48)
  %64 = call noundef float @_ZNK6b2Body7GetMassEv(ptr noundef nonnull align 8 dereferenceable(208) %48)
  %65 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6b2Body14GetLocalCenterEv(ptr noundef nonnull align 8 dereferenceable(208) %48)
  %66 = call noundef float @_ZNK6b2Vec213LengthSquaredEv(ptr noundef nonnull align 4 dereferenceable(8) %65)
  %67 = fneg float %64
  %68 = call float @llvm.fmuladd.f32(float %67, float %66, float %63)
  %69 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6b2Body14GetWorldCenterEv(ptr noundef nonnull align 8 dereferenceable(208) %48)
  call void @_ZNK16b2ParticleSystem20InitDampingParameterEPfS0_S0_ffRK6b2Vec2S3_S3_(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, float noundef %62, float noundef %68, ptr noundef nonnull align 4 dereferenceable(8) %69, ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %2)
  %70 = call noundef float @_Z5b2MinIfET_S0_S0_(float noundef %52, float noundef 1.000000e+00)
  %71 = fmul float %27, %70
  %72 = load float, ptr %7, align 4, !tbaa !41
  %73 = load float, ptr %8, align 4, !tbaa !41
  %74 = load float, ptr %9, align 4, !tbaa !41
  %75 = load float, ptr %10, align 4, !tbaa !41
  %76 = load float, ptr %11, align 4, !tbaa !41
  %77 = load float, ptr %12, align 4, !tbaa !41
  %78 = call noundef float @_ZNK16b2ParticleSystem21ComputeDampingImpulseEfffffff(ptr noundef nonnull align 8 dereferenceable(632) %0, float noundef %72, float noundef %73, float noundef %74, float noundef %75, float noundef %76, float noundef %77, float noundef %59)
  %79 = fmul float %71, %78
  %80 = load float, ptr %7, align 4, !tbaa !41
  %81 = load float, ptr %8, align 4, !tbaa !41
  %82 = load float, ptr %9, align 4, !tbaa !41
  call void @_ZN16b2ParticleSystem12ApplyDampingEfffbP15b2ParticleGroupifRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %0, float noundef %80, float noundef %81, float noundef %82, i1 noundef zeroext true, ptr noundef nonnull %44, i32 noundef %40, float noundef %79, ptr noundef nonnull align 4 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %83 = fneg float %79
  %84 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %83, ptr noundef nonnull align 4 dereferenceable(8) %2)
  store <2 x float> %84, ptr %13, align 8
  call void @_ZN6b2Body18ApplyLinearImpulseERK6b2Vec2S2_(ptr noundef nonnull align 8 dereferenceable(208) %48, ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  br label %85

85:                                               ; preds = %61, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  br label %86

86:                                               ; preds = %85, %38
  %87 = add nuw nsw i32 %.072, 1
  %88 = call noundef i32 @_ZNK16b2GrowableBufferI21b2ParticleBodyContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
  %89 = icmp slt i32 %87, %88
  br i1 %89, label %38, label %.preheader, !llvm.loop !42

._crit_edge:                                      ; preds = %135, %.preheader
  ret void

90:                                               ; preds = %.lr.ph74, %135
  %.06773 = phi i32 [ 0, %.lr.ph74 ], [ %136, %135 ]
  %91 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %33, i32 noundef %.06773)
  %92 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %91)
  %93 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %91)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %94 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK17b2ParticleContact9GetNormalEv(ptr noundef nonnull align 4 dereferenceable(24) %91)
  %95 = load i64, ptr %94, align 4
  store i64 %95, ptr %14, align 8
  %96 = call noundef float @_ZNK17b2ParticleContact9GetWeightEv(ptr noundef nonnull align 4 dereferenceable(24) %91)
  %97 = load ptr, ptr %36, align 8, !tbaa !36
  %98 = sext i32 %92 to i64
  %99 = getelementptr inbounds ptr, ptr %97, i64 %98
  %100 = load ptr, ptr %99, align 8, !tbaa !37
  %101 = sext i32 %93 to i64
  %102 = getelementptr inbounds ptr, ptr %97, i64 %101
  %103 = load ptr, ptr %102, align 8, !tbaa !37
  %104 = call noundef zeroext i1 @_ZNK16b2ParticleSystem12IsRigidGroupEP15b2ParticleGroup(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef %100)
  %105 = call noundef zeroext i1 @_ZNK16b2ParticleSystem12IsRigidGroupEP15b2ParticleGroup(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef %103)
  %.not = icmp ne ptr %100, %103
  %brmerge = or i1 %104, %105
  %or.cond = and i1 %.not, %brmerge
  br i1 %or.cond, label %106, label %135

106:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  %107 = load ptr, ptr %37, align 8, !tbaa !40
  %108 = getelementptr inbounds %struct.b2Vec2, ptr %107, i64 %98
  %109 = getelementptr inbounds %struct.b2Vec2, ptr %107, i64 %101
  %110 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %108, ptr noundef nonnull align 4 dereferenceable(8) %109)
  store <2 x float> %110, ptr %16, align 8
  %111 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef 5.000000e-01, ptr noundef nonnull align 4 dereferenceable(8) %16)
  store <2 x float> %111, ptr %15, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #7
  %112 = call <2 x float> @_ZNK16b2ParticleSystem17GetLinearVelocityEP15b2ParticleGroupiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef %103, i32 noundef %93, ptr noundef nonnull align 4 dereferenceable(8) %15)
  store <2 x float> %112, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  %113 = call <2 x float> @_ZNK16b2ParticleSystem17GetLinearVelocityEP15b2ParticleGroupiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef %100, i32 noundef %92, ptr noundef nonnull align 4 dereferenceable(8) %15)
  store <2 x float> %113, ptr %19, align 8
  %114 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(8) %19)
  store <2 x float> %114, ptr %17, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  %115 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(8) %14)
  %116 = fcmp olt float %115, 0.000000e+00
  br i1 %116, label %117, label %134

117:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #7
  call void @_ZNK16b2ParticleSystem44InitDampingParameterWithRigidGroupOrParticleEPfS0_S0_bP15b2ParticleGroupiRK6b2Vec2S5_(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef nonnull %22, i1 noundef zeroext %104, ptr noundef %100, i32 noundef %92, ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %14)
  call void @_ZNK16b2ParticleSystem44InitDampingParameterWithRigidGroupOrParticleEPfS0_S0_bP15b2ParticleGroupiRK6b2Vec2S5_(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull %23, ptr noundef nonnull %24, ptr noundef nonnull %25, i1 noundef zeroext %105, ptr noundef %103, i32 noundef %93, ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %14)
  %118 = fmul float %27, %96
  %119 = load float, ptr %20, align 4, !tbaa !41
  %120 = load float, ptr %21, align 4, !tbaa !41
  %121 = load float, ptr %22, align 4, !tbaa !41
  %122 = load float, ptr %23, align 4, !tbaa !41
  %123 = load float, ptr %24, align 4, !tbaa !41
  %124 = load float, ptr %25, align 4, !tbaa !41
  %125 = call noundef float @_ZNK16b2ParticleSystem21ComputeDampingImpulseEfffffff(ptr noundef nonnull align 8 dereferenceable(632) %0, float noundef %119, float noundef %120, float noundef %121, float noundef %122, float noundef %123, float noundef %124, float noundef %115)
  %126 = fmul float %118, %125
  %127 = load float, ptr %20, align 4, !tbaa !41
  %128 = load float, ptr %21, align 4, !tbaa !41
  %129 = load float, ptr %22, align 4, !tbaa !41
  call void @_ZN16b2ParticleSystem12ApplyDampingEfffbP15b2ParticleGroupifRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %0, float noundef %127, float noundef %128, float noundef %129, i1 noundef zeroext %104, ptr noundef %100, i32 noundef %92, float noundef %126, ptr noundef nonnull align 4 dereferenceable(8) %14)
  %130 = load float, ptr %23, align 4, !tbaa !41
  %131 = load float, ptr %24, align 4, !tbaa !41
  %132 = load float, ptr %25, align 4, !tbaa !41
  %133 = fneg float %126
  call void @_ZN16b2ParticleSystem12ApplyDampingEfffbP15b2ParticleGroupifRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %0, float noundef %130, float noundef %131, float noundef %132, i1 noundef zeroext %105, ptr noundef %103, i32 noundef %93, float noundef %133, ptr noundef nonnull align 4 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #7
  br label %134

134:                                              ; preds = %117, %106
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br label %135

135:                                              ; preds = %134, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  %136 = add nuw nsw i32 %.06773, 1
  %137 = call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %33)
  %138 = icmp slt i32 %136, %137
  br i1 %138, label %90, label %._crit_edge, !llvm.loop !44
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6b2Body18ApplyLinearImpulseERK6b2Vec2S2_(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #6 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK16b2ParticleSystem44InitDampingParameterWithRigidGroupOrParticleEPfS0_S0_bP15b2ParticleGroupiRK6b2Vec2S5_(ptr noundef nonnull align 8 dereferenceable(632), ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext, ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK16b2ParticleSystem20InitDampingParameterEPfS0_S0_ffRK6b2Vec2S3_S3_(ptr noundef nonnull align 8 dereferenceable(632), ptr noundef, ptr noundef, ptr noundef, float noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6b2Body7GetMassEv(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6b2Body10GetInertiaEv(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6b2Body14GetLocalCenterEv(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6b2Body14GetWorldCenterEv(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK16b2ParticleSystem21ComputeDampingImpulseEfffffff(ptr noundef nonnull align 8 dereferenceable(632), float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16b2ParticleSystem12ApplyDampingEfffbP15b2ParticleGroupifRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632), float noundef, float noundef, float noundef, i1 noundef zeroext, ptr noundef, i32 noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 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 = { 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 544}
!6 = !{!"_ZTS16b2ParticleSystem", !7, i64 0, !10, i64 4, !10, i64 8, !7, i64 12, !10, i64 16, !7, i64 20, !7, i64 21, !10, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !10, i64 44, !10, i64 48, !12, i64 56, !19, i64 112, !20, i64 128, !21, i64 144, !21, i64 160, !16, i64 176, !16, i64 184, !16, i64 192, !16, i64 200, !16, i64 208, !16, i64 216, !22, i64 224, !16, i64 240, !23, i64 248, !10, i64 264, !24, i64 272, !24, i64 288, !24, i64 304, !25, i64 320, !26, i64 344, !27, i64 368, !28, i64 392, !29, i64 416, !30, i64 440, !24, i64 464, !24, i64 480, !31, i64 496, !7, i64 504, !10, i64 508, !16, i64 512, !32, i64 520, !16, i64 608, !16, i64 616, !16, i64 624}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"_ZTS15b2SlabAllocatorI16b2ParticleHandleE", !13, i64 0, !10, i64 16, !17, i64 24}
!13 = !{!"_ZTS23b2TrackedBlockAllocator", !14, i64 0}
!14 = !{!"_ZTS24b2TypedIntrusiveListNodeI14b2TrackedBlockE", !15, i64 0}
!15 = !{!"_ZTS19b2IntrusiveListNode", !16, i64 0, !16, i64 8}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"_ZTS15b2TypedFreeListI16b2ParticleHandleE", !18, i64 0}
!18 = !{!"_ZTS10b2FreeList", !15, i64 0, !15, i64 16}
!19 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIP16b2ParticleHandleEE", !16, i64 0, !10, i64 8}
!20 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIjEE", !16, i64 0, !10, i64 8}
!21 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferI6b2Vec2EE", !16, i64 0, !10, i64 8}
!22 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferI15b2ParticleColorEE", !16, i64 0, !10, i64 8}
!23 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIPvEE", !16, i64 0, !10, i64 8}
!24 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIiEE", !16, i64 0, !10, i64 8}
!25 = !{!"_ZTS16b2GrowableBufferIiE", !16, i64 0, !10, i64 8, !10, i64 12, !16, i64 16}
!26 = !{!"_ZTS16b2GrowableBufferIN16b2ParticleSystem5ProxyEE", !16, i64 0, !10, i64 8, !10, i64 12, !16, i64 16}
!27 = !{!"_ZTS16b2GrowableBufferI17b2ParticleContactE", !16, i64 0, !10, i64 8, !10, i64 12, !16, i64 16}
!28 = !{!"_ZTS16b2GrowableBufferI21b2ParticleBodyContactE", !16, i64 0, !10, i64 8, !10, i64 12, !16, i64 16}
!29 = !{!"_ZTS16b2GrowableBufferI14b2ParticlePairE", !16, i64 0, !10, i64 8, !10, i64 12, !16, i64 16}
!30 = !{!"_ZTS16b2GrowableBufferI15b2ParticleTriadE", !16, i64 0, !10, i64 8, !10, i64 12, !16, i64 16}
!31 = !{!"long long", !8, i64 0}
!32 = !{!"_ZTS19b2ParticleSystemDef", !7, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !10, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !10, i64 68, !11, i64 72, !7, i64 76, !11, i64 80}
!33 = !{!34, !10, i64 0}
!34 = !{!"_ZTS21b2ParticleBodyContact", !10, i64 0, !16, i64 8, !16, i64 16, !11, i64 24, !35, i64 28, !11, i64 36}
!35 = !{!"_ZTS6b2Vec2", !11, i64 0, !11, i64 4}
!36 = !{!6, !16, i64 240}
!37 = !{!16, !16, i64 0}
!38 = !{!34, !16, i64 8}
!39 = !{!34, !11, i64 24}
!40 = !{!6, !16, i64 144}
!41 = !{!11, !11, i64 0}
!42 = distinct !{!42, !43}
!43 = !{!"llvm.loop.mustprogress"}
!44 = distinct !{!44, !43}


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