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

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

%"class.b2ParticleSystem::InsideBoundsEnumerator" = type { i32, i32, i32, i32, ptr, ptr }
%struct.b2Vec2 = type { float, float }
%struct.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%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.b2TimeStep = type { float, float, float, i32, i32, i32, i8 }
%struct.b2ParticlePair = type { i32, i32, i32, float, float }
%class.b2ParticleGroup = type { ptr, i32, i32, i32, float, ptr, ptr, i32, float, float, %struct.b2Vec2, %struct.b2Vec2, float, %struct.b2Transform, ptr }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Rot = type { float, float }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN16b2ParticleSystem22InsideBoundsEnumerator7GetNextEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6b2AABBC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: nounwind
declare float @sqrtf(float noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK16b2ParticleSystem25GetInsideBoundsEnumeratorERK6b2AABB(ptr dead_on_unwind noalias writable sret(%"class.b2ParticleSystem::InsideBoundsEnumerator") align 8, ptr noundef nonnull align 8 dereferenceable(632), ptr noundef nonnull align 4 dereferenceable(16)) #6 align 2

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

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

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

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

65:                                               ; preds = %90, %2
  %66 = load i32, ptr %5, align 4, !tbaa !9
  %67 = getelementptr inbounds %class.b2ParticleSystem, ptr %64, i32 0, i32 12
  %68 = load i32, ptr %67, align 4, !tbaa !11
  %69 = icmp slt i32 %66, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #10
  br label %93

71:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #10
  %72 = getelementptr inbounds %class.b2ParticleSystem, ptr %64, i32 0, i32 16
  %73 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.0", ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !35
  %75 = load i32, ptr %5, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds i32, ptr %74, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !9
  store i32 %78, ptr %6, align 4, !tbaa !9
  %79 = load i32, ptr %6, align 4, !tbaa !9
  %80 = and i32 %79, 1028
  %81 = icmp eq i32 %80, 1028
  br i1 %81, label %82, label %89

82:                                               ; preds = %71
  %83 = getelementptr inbounds %class.b2ParticleSystem, ptr %64, i32 0, i32 18
  %84 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !36
  %86 = load i32, ptr %5, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds %struct.b2Vec2, ptr %85, i64 %87
  call void @_ZN6b2Vec27SetZeroEv(ptr noundef nonnull align 4 dereferenceable(8) %88)
  br label %89

89:                                               ; preds = %82, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %5, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %5, align 4, !tbaa !9
  br label %65, !llvm.loop !37

93:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #10
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.b2TimeStep, ptr %94, i32 0, i32 0
  %96 = load float, ptr %95, align 4, !tbaa !39
  %97 = fmul float 2.500000e+00, %96
  store float %97, ptr %7, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #10
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %372, %93
  %99 = load i32, ptr %8, align 4, !tbaa !9
  %100 = getelementptr inbounds %class.b2ParticleSystem, ptr %64, i32 0, i32 37
  %101 = call noundef i32 @_ZNK16b2GrowableBufferI14b2ParticlePairE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %100)
  %102 = icmp slt i32 %99, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %98
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  br label %375

104:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  %105 = getelementptr inbounds %class.b2ParticleSystem, ptr %64, i32 0, i32 37
  %106 = load i32, ptr %8, align 4, !tbaa !9
  %107 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZN16b2GrowableBufferI14b2ParticlePairEixEi(ptr noundef nonnull align 8 dereferenceable(24) %105, i32 noundef %106)
  store ptr %107, ptr %10, align 8, !tbaa !5
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.b2ParticlePair, ptr %108, i32 0, i32 2
  %110 = load i32, ptr %109, align 4, !tbaa !42
  %111 = and i32 %110, 1024
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %371

113:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.b2ParticlePair, ptr %114, i32 0, i32 0
  %116 = load i32, ptr %115, align 4, !tbaa !44
  store i32 %116, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.b2ParticlePair, ptr %117, i32 0, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !45
  store i32 %119, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  %120 = getelementptr inbounds %class.b2ParticleSystem, ptr %64, i32 0, i32 17
  %121 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %120, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8, !tbaa !46
  %123 = load i32, ptr %11, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds %struct.b2Vec2, ptr %122, i64 %124
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %125, i64 8, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %126 = getelementptr inbounds %class.b2ParticleSystem, ptr %64, i32 0, i32 17
  %127 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !46
  %129 = load i32, ptr %12, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds %struct.b2Vec2, ptr %128, i64 %130
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %131, i64 8, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #10
  call void @_ZN6b2AABBC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %15)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  %132 = call <2 x float> @_Z5b2MinRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %14)
  store <2 x float> %132, ptr %16, align 4
  %133 = getelementptr inbounds %struct.b2AABB, ptr %15, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %133, ptr align 4 %16, i64 8, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  %134 = call <2 x float> @_Z5b2MaxRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %14)
  store <2 x float> %134, ptr %17, align 4
  %135 = getelementptr inbounds %struct.b2AABB, ptr %15, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %135, ptr align 4 %17, i64 8, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %136 = getelementptr inbounds %class.b2ParticleSystem, ptr %64, i32 0, i32 26
  %137 = load ptr, ptr %136, align 8, !tbaa !48
  %138 = load i32, ptr %11, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds ptr, ptr %137, i64 %139
  %141 = load ptr, ptr %140, align 8, !tbaa !5
  store ptr %141, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  %142 = getelementptr inbounds %class.b2ParticleSystem, ptr %64, i32 0, i32 26
  %143 = load ptr, ptr %142, align 8, !tbaa !48
  %144 = load i32, ptr %12, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds ptr, ptr %143, i64 %145
  %147 = load ptr, ptr %146, align 8, !tbaa !5
  store ptr %147, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #10
  %148 = load ptr, ptr %18, align 8, !tbaa !5
  %149 = load i32, ptr %11, align 4, !tbaa !9
  %150 = call <2 x float> @_ZNK16b2ParticleSystem17GetLinearVelocityEP15b2ParticleGroupiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %64, ptr noundef %148, i32 noundef %149, ptr noundef nonnull align 4 dereferenceable(8) %13)
  store <2 x float> %150, ptr %20, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #10
  %151 = load ptr, ptr %19, align 8, !tbaa !5
  %152 = load i32, ptr %12, align 4, !tbaa !9
  %153 = call <2 x float> @_ZNK16b2ParticleSystem17GetLinearVelocityEP15b2ParticleGroupiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %64, ptr noundef %151, i32 noundef %152, ptr noundef nonnull align 4 dereferenceable(8) %14)
  store <2 x float> %153, ptr %21, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #10
  %154 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %13)
  store <2 x float> %154, ptr %22, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %155 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(8) %20)
  store <2 x float> %155, ptr %23, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #10
  call void @_ZNK16b2ParticleSystem25GetInsideBoundsEnumeratorERK6b2AABB(ptr dead_on_unwind writable sret(%"class.b2ParticleSystem::InsideBoundsEnumerator") align 8 %24, ptr noundef nonnull align 8 dereferenceable(632) %64, ptr noundef nonnull align 4 dereferenceable(16) %15)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #10
  br label %156

156:                                              ; preds = %369, %367, %113
  %157 = call noundef i32 @_ZN16b2ParticleSystem22InsideBoundsEnumerator7GetNextEv(ptr noundef nonnull align 8 dereferenceable(32) %24)
  store i32 %157, ptr %25, align 4, !tbaa !9
  %158 = icmp sge i32 %157, 0
  br i1 %158, label %159, label %370

159:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #10
  %160 = getelementptr inbounds %class.b2ParticleSystem, ptr %64, i32 0, i32 17
  %161 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %160, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8, !tbaa !46
  %163 = load i32, ptr %25, align 4, !tbaa !9
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds %struct.b2Vec2, ptr %162, i64 %164
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %165, i64 8, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #10
  %166 = getelementptr inbounds %class.b2ParticleSystem, ptr %64, i32 0, i32 26
  %167 = load ptr, ptr %166, align 8, !tbaa !48
  %168 = load i32, ptr %25, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds ptr, ptr %167, i64 %169
  %171 = load ptr, ptr %170, align 8, !tbaa !5
  store ptr %171, ptr %27, align 8, !tbaa !5
  %172 = load ptr, ptr %18, align 8, !tbaa !5
  %173 = load ptr, ptr %27, align 8, !tbaa !5
  %174 = icmp ne ptr %172, %173
  br i1 %174, label %175, label %366

175:                                              ; preds = %159
  %176 = load ptr, ptr %19, align 8, !tbaa !5
  %177 = load ptr, ptr %27, align 8, !tbaa !5
  %178 = icmp ne ptr %176, %177
  br i1 %178, label %179, label %366

179:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #10
  %180 = load ptr, ptr %27, align 8, !tbaa !5
  %181 = load i32, ptr %25, align 4, !tbaa !9
  %182 = call <2 x float> @_ZNK16b2ParticleSystem17GetLinearVelocityEP15b2ParticleGroupiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %64, ptr noundef %180, i32 noundef %181, ptr noundef nonnull align 4 dereferenceable(8) %26)
  store <2 x float> %182, ptr %28, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #10
  %183 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %26, ptr noundef nonnull align 4 dereferenceable(8) %13)
  store <2 x float> %183, ptr %29, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %184 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %28, ptr noundef nonnull align 4 dereferenceable(8) %20)
  store <2 x float> %184, ptr %30, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #10
  %185 = call noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(8) %30)
  store float %185, ptr %31, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #10
  %186 = call noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(8) %30)
  %187 = call noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(8) %23)
  %188 = fsub float %186, %187
  store float %188, ptr %32, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #10
  %189 = call noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(8) %29)
  store float %189, ptr %33, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #10
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %36)
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #10
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %37)
  %190 = load float, ptr %31, align 4, !tbaa !41
  %191 = fcmp oeq float %190, 0.000000e+00
  br i1 %191, label %192, label %225

192:                                              ; preds = %179
  %193 = load float, ptr %32, align 4, !tbaa !41
  %194 = fcmp oeq float %193, 0.000000e+00
  br i1 %194, label %195, label %196

195:                                              ; preds = %192
  store i32 8, ptr %9, align 4
  br label %363, !llvm.loop !49

196:                                              ; preds = %192
  %197 = load float, ptr %33, align 4, !tbaa !41
  %198 = fneg float %197
  %199 = load float, ptr %32, align 4, !tbaa !41
  %200 = fdiv float %198, %199
  store float %200, ptr %35, align 4, !tbaa !41
  %201 = load float, ptr %35, align 4, !tbaa !41
  %202 = fcmp oge float %201, 0.000000e+00
  br i1 %202, label %203, label %207

203:                                              ; preds = %196
  %204 = load float, ptr %35, align 4, !tbaa !41
  %205 = load float, ptr %7, align 4, !tbaa !41
  %206 = fcmp olt float %204, %205
  br i1 %206, label %208, label %207

207:                                              ; preds = %203, %196
  store i32 8, ptr %9, align 4
  br label %363, !llvm.loop !49

208:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #10
  %209 = load float, ptr %35, align 4, !tbaa !41
  %210 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %209, ptr noundef nonnull align 4 dereferenceable(8) %23)
  store <2 x float> %210, ptr %39, align 4
  %211 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(8) %39)
  store <2 x float> %211, ptr %38, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %38, i64 8, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #10
  %212 = load float, ptr %35, align 4, !tbaa !41
  %213 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %212, ptr noundef nonnull align 4 dereferenceable(8) %30)
  store <2 x float> %213, ptr %41, align 4
  %214 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(8) %41)
  store <2 x float> %214, ptr %40, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %40, i64 8, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #10
  %215 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(8) %37)
  %216 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(8) %36)
  %217 = fdiv float %215, %216
  store float %217, ptr %34, align 4, !tbaa !41
  %218 = load float, ptr %34, align 4, !tbaa !41
  %219 = fcmp oge float %218, 0.000000e+00
  br i1 %219, label %220, label %223

220:                                              ; preds = %208
  %221 = load float, ptr %34, align 4, !tbaa !41
  %222 = fcmp ole float %221, 1.000000e+00
  br i1 %222, label %224, label %223

223:                                              ; preds = %220, %208
  store i32 8, ptr %9, align 4
  br label %363, !llvm.loop !49

224:                                              ; preds = %220
  br label %312

225:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #10
  %226 = load float, ptr %32, align 4, !tbaa !41
  %227 = load float, ptr %32, align 4, !tbaa !41
  %228 = load float, ptr %33, align 4, !tbaa !41
  %229 = fmul float 4.000000e+00, %228
  %230 = load float, ptr %31, align 4, !tbaa !41
  %231 = fmul float %229, %230
  %232 = fneg float %231
  %233 = call float @llvm.fmuladd.f32(float %226, float %227, float %232)
  store float %233, ptr %42, align 4, !tbaa !41
  %234 = load float, ptr %42, align 4, !tbaa !41
  %235 = fcmp olt float %234, 0.000000e+00
  br i1 %235, label %236, label %237

236:                                              ; preds = %225
  store i32 8, ptr %9, align 4
  br label %309, !llvm.loop !49

237:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #10
  %238 = load float, ptr %42, align 4, !tbaa !41
  %239 = call float @sqrtf(float noundef %238) #10
  store float %239, ptr %43, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #10
  %240 = load float, ptr %32, align 4, !tbaa !41
  %241 = fneg float %240
  %242 = load float, ptr %43, align 4, !tbaa !41
  %243 = fsub float %241, %242
  %244 = load float, ptr %31, align 4, !tbaa !41
  %245 = fmul float 2.000000e+00, %244
  %246 = fdiv float %243, %245
  store float %246, ptr %44, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #10
  %247 = load float, ptr %32, align 4, !tbaa !41
  %248 = fneg float %247
  %249 = load float, ptr %43, align 4, !tbaa !41
  %250 = fadd float %248, %249
  %251 = load float, ptr %31, align 4, !tbaa !41
  %252 = fmul float 2.000000e+00, %251
  %253 = fdiv float %250, %252
  store float %253, ptr %45, align 4, !tbaa !41
  %254 = load float, ptr %44, align 4, !tbaa !41
  %255 = load float, ptr %45, align 4, !tbaa !41
  %256 = fcmp ogt float %254, %255
  br i1 %256, label %257, label %258

257:                                              ; preds = %237
  call void @_Z6b2SwapIfEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %44, ptr noundef nonnull align 4 dereferenceable(4) %45)
  br label %258

258:                                              ; preds = %257, %237
  %259 = load float, ptr %44, align 4, !tbaa !41
  store float %259, ptr %35, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #10
  %260 = load float, ptr %35, align 4, !tbaa !41
  %261 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %260, ptr noundef nonnull align 4 dereferenceable(8) %23)
  store <2 x float> %261, ptr %47, align 4
  %262 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(8) %47)
  store <2 x float> %262, ptr %46, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %46, i64 8, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #10
  %263 = load float, ptr %35, align 4, !tbaa !41
  %264 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %263, ptr noundef nonnull align 4 dereferenceable(8) %30)
  store <2 x float> %264, ptr %49, align 4
  %265 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(8) %49)
  store <2 x float> %265, ptr %48, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %48, i64 8, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #10
  %266 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(8) %37)
  %267 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(8) %36)
  %268 = fdiv float %266, %267
  store float %268, ptr %34, align 4, !tbaa !41
  %269 = load float, ptr %35, align 4, !tbaa !41
  %270 = fcmp oge float %269, 0.000000e+00
  br i1 %270, label %271, label %281

271:                                              ; preds = %258
  %272 = load float, ptr %35, align 4, !tbaa !41
  %273 = load float, ptr %7, align 4, !tbaa !41
  %274 = fcmp olt float %272, %273
  br i1 %274, label %275, label %281

275:                                              ; preds = %271
  %276 = load float, ptr %34, align 4, !tbaa !41
  %277 = fcmp oge float %276, 0.000000e+00
  br i1 %277, label %278, label %281

278:                                              ; preds = %275
  %279 = load float, ptr %34, align 4, !tbaa !41
  %280 = fcmp ole float %279, 1.000000e+00
  br i1 %280, label %307, label %281

281:                                              ; preds = %278, %275, %271, %258
  %282 = load float, ptr %45, align 4, !tbaa !41
  store float %282, ptr %35, align 4, !tbaa !41
  %283 = load float, ptr %35, align 4, !tbaa !41
  %284 = fcmp oge float %283, 0.000000e+00
  br i1 %284, label %285, label %289

285:                                              ; preds = %281
  %286 = load float, ptr %35, align 4, !tbaa !41
  %287 = load float, ptr %7, align 4, !tbaa !41
  %288 = fcmp olt float %286, %287
  br i1 %288, label %290, label %289

289:                                              ; preds = %285, %281
  store i32 8, ptr %9, align 4
  br label %308, !llvm.loop !49

290:                                              ; preds = %285
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #10
  %291 = load float, ptr %35, align 4, !tbaa !41
  %292 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %291, ptr noundef nonnull align 4 dereferenceable(8) %23)
  store <2 x float> %292, ptr %51, align 4
  %293 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(8) %51)
  store <2 x float> %293, ptr %50, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %50, i64 8, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #10
  %294 = load float, ptr %35, align 4, !tbaa !41
  %295 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %294, ptr noundef nonnull align 4 dereferenceable(8) %30)
  store <2 x float> %295, ptr %53, align 4
  %296 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(8) %53)
  store <2 x float> %296, ptr %52, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %52, i64 8, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #10
  %297 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(8) %37)
  %298 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(8) %36)
  %299 = fdiv float %297, %298
  store float %299, ptr %34, align 4, !tbaa !41
  %300 = load float, ptr %34, align 4, !tbaa !41
  %301 = fcmp oge float %300, 0.000000e+00
  br i1 %301, label %302, label %305

302:                                              ; preds = %290
  %303 = load float, ptr %34, align 4, !tbaa !41
  %304 = fcmp ole float %303, 1.000000e+00
  br i1 %304, label %306, label %305

305:                                              ; preds = %302, %290
  store i32 8, ptr %9, align 4
  br label %308, !llvm.loop !49

306:                                              ; preds = %302
  br label %307

307:                                              ; preds = %306, %278
  store i32 0, ptr %9, align 4
  br label %308

308:                                              ; preds = %307, %305, %289
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #10
  br label %309

309:                                              ; preds = %308, %236
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #10
  %310 = load i32, ptr %9, align 4
  switch i32 %310, label %363 [
    i32 0, label %311
  ]

311:                                              ; preds = %309
  br label %312

312:                                              ; preds = %311, %224
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #10
  %313 = load float, ptr %34, align 4, !tbaa !41
  %314 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %313, ptr noundef nonnull align 4 dereferenceable(8) %23)
  store <2 x float> %314, ptr %56, align 4
  %315 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(8) %56)
  store <2 x float> %315, ptr %55, align 4
  %316 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %55, ptr noundef nonnull align 4 dereferenceable(8) %28)
  store <2 x float> %316, ptr %54, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #10
  %317 = call noundef float @_ZNK16b2ParticleSystem15GetParticleMassEv(ptr noundef nonnull align 8 dereferenceable(632) %64)
  %318 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %317, ptr noundef nonnull align 4 dereferenceable(8) %54)
  store <2 x float> %318, ptr %57, align 4
  %319 = load ptr, ptr %27, align 8, !tbaa !5
  %320 = call noundef zeroext i1 @_ZNK16b2ParticleSystem12IsRigidGroupEP15b2ParticleGroup(ptr noundef nonnull align 8 dereferenceable(632) %64, ptr noundef %319)
  br i1 %320, label %321, label %349

321:                                              ; preds = %312
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #10
  %322 = load ptr, ptr %27, align 8, !tbaa !5
  %323 = call noundef float @_ZNK15b2ParticleGroup7GetMassEv(ptr noundef nonnull align 8 dereferenceable(96) %322)
  store float %323, ptr %58, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #10
  %324 = load ptr, ptr %27, align 8, !tbaa !5
  %325 = call noundef float @_ZNK15b2ParticleGroup10GetInertiaEv(ptr noundef nonnull align 8 dereferenceable(96) %324)
  store float %325, ptr %59, align 4, !tbaa !41
  %326 = load float, ptr %58, align 4, !tbaa !41
  %327 = fcmp ogt float %326, 0.000000e+00
  br i1 %327, label %328, label %334

328:                                              ; preds = %321
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #10
  %329 = load float, ptr %58, align 4, !tbaa !41
  %330 = fdiv float 1.000000e+00, %329
  %331 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %330, ptr noundef nonnull align 4 dereferenceable(8) %57)
  store <2 x float> %331, ptr %60, align 4
  %332 = load ptr, ptr %27, align 8, !tbaa !5
  %333 = getelementptr inbounds %class.b2ParticleGroup, ptr %332, i32 0, i32 11
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %333, ptr noundef nonnull align 4 dereferenceable(8) %60)
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #10
  br label %334

334:                                              ; preds = %328, %321
  %335 = load float, ptr %59, align 4, !tbaa !41
  %336 = fcmp ogt float %335, 0.000000e+00
  br i1 %336, label %337, label %348

337:                                              ; preds = %334
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #10
  %338 = load ptr, ptr %27, align 8, !tbaa !5
  %339 = call <2 x float> @_ZNK15b2ParticleGroup9GetCenterEv(ptr noundef nonnull align 8 dereferenceable(96) %338)
  store <2 x float> %339, ptr %62, align 4
  %340 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %26, ptr noundef nonnull align 4 dereferenceable(8) %62)
  store <2 x float> %340, ptr %61, align 4
  %341 = call noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %61, ptr noundef nonnull align 4 dereferenceable(8) %57)
  %342 = load float, ptr %59, align 4, !tbaa !41
  %343 = fdiv float %341, %342
  %344 = load ptr, ptr %27, align 8, !tbaa !5
  %345 = getelementptr inbounds %class.b2ParticleGroup, ptr %344, i32 0, i32 12
  %346 = load float, ptr %345, align 4, !tbaa !50
  %347 = fadd float %346, %343
  store float %347, ptr %345, align 4, !tbaa !50
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #10
  br label %348

348:                                              ; preds = %337, %334
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #10
  br label %356

349:                                              ; preds = %312
  %350 = getelementptr inbounds %class.b2ParticleSystem, ptr %64, i32 0, i32 18
  %351 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %350, i32 0, i32 0
  %352 = load ptr, ptr %351, align 8, !tbaa !36
  %353 = load i32, ptr %25, align 4, !tbaa !9
  %354 = sext i32 %353 to i64
  %355 = getelementptr inbounds %struct.b2Vec2, ptr %352, i64 %354
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %355, ptr noundef nonnull align 4 dereferenceable(8) %54)
  br label %356

356:                                              ; preds = %349, %348
  %357 = load i32, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #10
  %358 = load ptr, ptr %4, align 8, !tbaa !5
  %359 = getelementptr inbounds %struct.b2TimeStep, ptr %358, i32 0, i32 1
  %360 = load float, ptr %359, align 4, !tbaa !55
  %361 = fneg float %360
  %362 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %361, ptr noundef nonnull align 4 dereferenceable(8) %57)
  store <2 x float> %362, ptr %63, align 4
  call void @_ZN16b2ParticleSystem18ParticleApplyForceEiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %64, i32 noundef %357, ptr noundef nonnull align 4 dereferenceable(8) %63)
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #10
  store i32 0, ptr %9, align 4
  br label %363

363:                                              ; preds = %356, %309, %223, %207, %195
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #10
  %364 = load i32, ptr %9, align 4
  switch i32 %364, label %367 [
    i32 0, label %365
  ]

365:                                              ; preds = %363
  br label %366

366:                                              ; preds = %365, %175, %159
  store i32 0, ptr %9, align 4
  br label %367

367:                                              ; preds = %366, %363
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  %368 = load i32, ptr %9, align 4
  switch i32 %368, label %376 [
    i32 0, label %369
    i32 8, label %156
  ]

369:                                              ; preds = %367
  br label %156, !llvm.loop !49

370:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  br label %371

371:                                              ; preds = %370, %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  br label %372

372:                                              ; preds = %371
  %373 = load i32, ptr %8, align 4, !tbaa !9
  %374 = add nsw i32 %373, 1
  store i32 %374, ptr %8, align 4, !tbaa !9
  br label %98, !llvm.loop !56

375:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #10
  ret void

376:                                              ; preds = %367
  unreachable
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #0 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)) #9

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

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { nounwind "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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 #9 = { 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 #10 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 44}
!12 = !{!"_ZTS16b2ParticleSystem", !13, i64 0, !10, i64 4, !10, i64 8, !13, i64 12, !10, i64 16, !13, i64 20, !13, i64 21, !10, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !10, i64 44, !10, i64 48, !15, i64 56, !21, i64 112, !22, i64 128, !23, i64 144, !23, i64 160, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !24, i64 224, !6, i64 240, !25, i64 248, !10, i64 264, !26, i64 272, !26, i64 288, !26, i64 304, !27, i64 320, !28, i64 344, !29, i64 368, !30, i64 392, !31, i64 416, !32, i64 440, !26, i64 464, !26, i64 480, !33, i64 496, !13, i64 504, !10, i64 508, !6, i64 512, !34, i64 520, !6, i64 608, !6, i64 616, !6, i64 624}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!"_ZTS15b2SlabAllocatorI16b2ParticleHandleE", !16, i64 0, !10, i64 16, !19, i64 24}
!16 = !{!"_ZTS23b2TrackedBlockAllocator", !17, i64 0}
!17 = !{!"_ZTS24b2TypedIntrusiveListNodeI14b2TrackedBlockE", !18, i64 0}
!18 = !{!"_ZTS19b2IntrusiveListNode", !6, i64 0, !6, i64 8}
!19 = !{!"_ZTS15b2TypedFreeListI16b2ParticleHandleE", !20, i64 0}
!20 = !{!"_ZTS10b2FreeList", !18, i64 0, !18, i64 16}
!21 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIP16b2ParticleHandleEE", !6, i64 0, !10, i64 8}
!22 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIjEE", !6, i64 0, !10, i64 8}
!23 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferI6b2Vec2EE", !6, i64 0, !10, i64 8}
!24 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferI15b2ParticleColorEE", !6, i64 0, !10, i64 8}
!25 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIPvEE", !6, i64 0, !10, i64 8}
!26 = !{!"_ZTSN16b2ParticleSystem21UserOverridableBufferIiEE", !6, i64 0, !10, i64 8}
!27 = !{!"_ZTS16b2GrowableBufferIiE", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!28 = !{!"_ZTS16b2GrowableBufferIN16b2ParticleSystem5ProxyEE", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!29 = !{!"_ZTS16b2GrowableBufferI17b2ParticleContactE", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!30 = !{!"_ZTS16b2GrowableBufferI21b2ParticleBodyContactE", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!31 = !{!"_ZTS16b2GrowableBufferI14b2ParticlePairE", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!32 = !{!"_ZTS16b2GrowableBufferI15b2ParticleTriadE", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!33 = !{!"long long", !7, i64 0}
!34 = !{!"_ZTS19b2ParticleSystemDef", !13, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !10, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44, !14, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !14, i64 64, !10, i64 68, !14, i64 72, !13, i64 76, !14, i64 80}
!35 = !{!12, !6, i64 128}
!36 = !{!12, !6, i64 160}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!40, !14, i64 0}
!40 = !{!"_ZTS10b2TimeStep", !14, i64 0, !14, i64 4, !14, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !13, i64 24}
!41 = !{!14, !14, i64 0}
!42 = !{!43, !10, i64 8}
!43 = !{!"_ZTS14b2ParticlePair", !10, i64 0, !10, i64 4, !10, i64 8, !14, i64 12, !14, i64 16}
!44 = !{!43, !10, i64 0}
!45 = !{!43, !10, i64 4}
!46 = !{!12, !6, i64 144}
!47 = !{i64 0, i64 4, !41, i64 4, i64 4, !41}
!48 = !{!12, !6, i64 240}
!49 = distinct !{!49, !38}
!50 = !{!51, !14, i64 68}
!51 = !{!"_ZTS15b2ParticleGroup", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !14, i64 20, !6, i64 24, !6, i64 32, !10, i64 40, !14, i64 44, !14, i64 48, !52, i64 52, !52, i64 60, !14, i64 68, !53, i64 72, !6, i64 88}
!52 = !{!"_ZTS6b2Vec2", !14, i64 0, !14, i64 4}
!53 = !{!"_ZTS11b2Transform", !52, i64 0, !54, i64 8}
!54 = !{!"_ZTS5b2Rot", !14, i64 0, !14, i64 4}
!55 = !{!40, !14, i64 4}
!56 = distinct !{!56, !38}


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

%"class.b2ParticleSystem::InsideBoundsEnumerator" = type { i32, i32, i32, i32, ptr, ptr }
%struct.b2Vec2 = type { float, float }
%struct.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6b2AABBC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #2 align 2

; 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 #3

; 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 #3

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @sqrtf(float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK16b2ParticleSystem25GetInsideBoundsEnumeratorERK6b2AABB(ptr dead_on_unwind noalias writable sret(%"class.b2ParticleSystem::InsideBoundsEnumerator") align 8, ptr noundef nonnull align 8 dereferenceable(632), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #5 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem12SolveBarrierERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr nocapture noundef nonnull readonly align 4 dereferenceable(28) %1) local_unnamed_addr #7 align 2 {
  %3 = alloca %struct.b2Vec2, align 8
  %4 = alloca %struct.b2Vec2, align 8
  %5 = alloca %struct.b2AABB, align 8
  %6 = alloca %struct.b2Vec2, align 8
  %7 = alloca %struct.b2Vec2, align 8
  %8 = alloca %struct.b2Vec2, align 8
  %9 = alloca %struct.b2Vec2, align 8
  %10 = alloca %"class.b2ParticleSystem::InsideBoundsEnumerator", align 8
  %11 = alloca %struct.b2Vec2, align 8
  %12 = alloca %struct.b2Vec2, align 8
  %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 float, align 4
  %20 = alloca float, align 4
  %21 = alloca %struct.b2Vec2, align 8
  %22 = alloca %struct.b2Vec2, align 8
  %23 = alloca %struct.b2Vec2, align 8
  %24 = alloca %struct.b2Vec2, align 8
  %25 = alloca %struct.b2Vec2, align 8
  %26 = alloca %struct.b2Vec2, align 8
  %27 = alloca %struct.b2Vec2, align 8
  %28 = alloca %struct.b2Vec2, align 8
  %29 = alloca %struct.b2Vec2, align 8
  %30 = alloca %struct.b2Vec2, align 8
  %31 = alloca %struct.b2Vec2, align 8
  %32 = alloca %struct.b2Vec2, align 8
  %33 = getelementptr inbounds i8, ptr %0, i64 44
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = icmp sgt i32 %34, 0
  br i1 %35, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %36 = getelementptr inbounds i8, ptr %0, i64 128
  %37 = getelementptr inbounds i8, ptr %0, i64 160
  br label %48

._crit_edge:                                      ; preds = %58, %2
  %38 = load float, ptr %1, align 4, !tbaa !33
  %39 = fmul float %38, 2.500000e+00
  %40 = getelementptr inbounds i8, ptr %0, i64 416
  %41 = tail call noundef i32 @_ZNK16b2GrowableBufferI14b2ParticlePairE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %40)
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.lr.ph134, label %._crit_edge135

.lr.ph134:                                        ; preds = %._crit_edge
  %43 = getelementptr inbounds i8, ptr %0, i64 144
  %44 = getelementptr inbounds i8, ptr %5, i64 8
  %45 = getelementptr inbounds i8, ptr %0, i64 240
  %46 = getelementptr inbounds i8, ptr %0, i64 160
  %47 = getelementptr inbounds i8, ptr %1, i64 4
  br label %62

48:                                               ; preds = %.lr.ph, %58
  %49 = phi i32 [ %34, %.lr.ph ], [ %59, %58 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %58 ]
  %50 = load ptr, ptr %36, align 8, !tbaa !35
  %51 = getelementptr inbounds i32, ptr %50, i64 %indvars.iv
  %52 = load i32, ptr %51, align 4, !tbaa !36
  %53 = and i32 %52, 1028
  %54 = icmp eq i32 %53, 1028
  br i1 %54, label %55, label %58

55:                                               ; preds = %48
  %56 = load ptr, ptr %37, align 8, !tbaa !37
  %57 = getelementptr inbounds %struct.b2Vec2, ptr %56, i64 %indvars.iv
  tail call void @_ZN6b2Vec27SetZeroEv(ptr noundef nonnull align 4 dereferenceable(8) %57)
  %.pre = load i32, ptr %33, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %55, %48
  %59 = phi i32 [ %.pre, %55 ], [ %49, %48 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %60 = sext i32 %59 to i64
  %61 = icmp slt i64 %indvars.iv.next, %60
  br i1 %61, label %48, label %._crit_edge, !llvm.loop !38

._crit_edge135:                                   ; preds = %211, %._crit_edge
  ret void

62:                                               ; preds = %.lr.ph134, %211
  %.096132 = phi i32 [ 0, %.lr.ph134 ], [ %212, %211 ]
  %63 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZN16b2GrowableBufferI14b2ParticlePairEixEi(ptr noundef nonnull align 8 dereferenceable(24) %40, i32 noundef %.096132)
  %64 = getelementptr inbounds i8, ptr %63, i64 8
  %65 = load i32, ptr %64, align 4, !tbaa !40
  %66 = and i32 %65, 1024
  %.not = icmp eq i32 %66, 0
  br i1 %.not, label %211, label %67

67:                                               ; preds = %62
  %68 = load i32, ptr %63, align 4, !tbaa !42
  %69 = getelementptr inbounds i8, ptr %63, i64 4
  %70 = load i32, ptr %69, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %71 = load ptr, ptr %43, align 8, !tbaa !44
  %72 = sext i32 %68 to i64
  %73 = getelementptr inbounds %struct.b2Vec2, ptr %71, i64 %72
  %74 = load i64, ptr %73, align 4
  store i64 %74, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  %75 = sext i32 %70 to i64
  %76 = getelementptr inbounds %struct.b2Vec2, ptr %71, i64 %75
  %77 = load i64, ptr %76, align 4
  store i64 %77, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #9
  call void @_ZN6b2AABBC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %5)
  %78 = call <2 x float> @_Z5b2MinRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %4)
  store <2 x float> %78, ptr %5, align 8
  %79 = call <2 x float> @_Z5b2MaxRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %4)
  store <2 x float> %79, ptr %44, align 8
  %80 = load ptr, ptr %45, align 8, !tbaa !45
  %81 = getelementptr inbounds ptr, ptr %80, i64 %72
  %82 = load ptr, ptr %81, align 8, !tbaa !46
  %83 = getelementptr inbounds ptr, ptr %80, i64 %75
  %84 = load ptr, ptr %83, align 8, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %85 = call <2 x float> @_ZNK16b2ParticleSystem17GetLinearVelocityEP15b2ParticleGroupiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef %82, i32 noundef %68, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %85, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %86 = call <2 x float> @_ZNK16b2ParticleSystem17GetLinearVelocityEP15b2ParticleGroupiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef %84, i32 noundef %70, ptr noundef nonnull align 4 dereferenceable(8) %4)
  store <2 x float> %86, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %87 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %87, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %88 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %6)
  store <2 x float> %88, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #9
  call void @_ZNK16b2ParticleSystem25GetInsideBoundsEnumeratorERK6b2AABB(ptr dead_on_unwind nonnull writable sret(%"class.b2ParticleSystem::InsideBoundsEnumerator") align 8 %10, ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(16) %5)
  %89 = call noundef i32 @_ZN16b2ParticleSystem22InsideBoundsEnumerator7GetNextEv(ptr noundef nonnull align 8 dereferenceable(32) %10)
  %90 = icmp sgt i32 %89, -1
  br i1 %90, label %.lr.ph129, label %._crit_edge130

.lr.ph129:                                        ; preds = %67, %208
  %91 = phi i32 [ %209, %208 ], [ %89, %67 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  %92 = load ptr, ptr %43, align 8, !tbaa !44
  %93 = zext nneg i32 %91 to i64
  %94 = getelementptr inbounds %struct.b2Vec2, ptr %92, i64 %93
  %95 = load i64, ptr %94, align 4
  store i64 %95, ptr %11, align 8
  %96 = load ptr, ptr %45, align 8, !tbaa !45
  %97 = getelementptr inbounds ptr, ptr %96, i64 %93
  %98 = load ptr, ptr %97, align 8, !tbaa !46
  %.not114 = icmp eq ptr %82, %98
  %.not115 = icmp eq ptr %84, %98
  %or.cond116 = select i1 %.not114, i1 true, i1 %.not115
  br i1 %or.cond116, label %208, label %99

99:                                               ; preds = %.lr.ph129
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %100 = call <2 x float> @_ZNK16b2ParticleSystem17GetLinearVelocityEP15b2ParticleGroupiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef %98, i32 noundef %91, ptr noundef nonnull align 4 dereferenceable(8) %11)
  store <2 x float> %100, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #9
  %101 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %101, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #9
  %102 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %6)
  store <2 x float> %102, ptr %14, align 8
  %103 = call noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %14)
  %104 = call noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %14)
  %105 = call noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %9)
  %106 = fsub float %104, %105
  %107 = call noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #9
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %15)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #9
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %16)
  %108 = fcmp oeq float %103, 0.000000e+00
  br i1 %108, label %109, label %126

109:                                              ; preds = %99
  %110 = fcmp oeq float %106, 0.000000e+00
  br i1 %110, label %.thread, label %111, !llvm.loop !47

111:                                              ; preds = %109
  %112 = fneg float %107
  %113 = fdiv float %112, %106
  %114 = fcmp oge float %113, 0.000000e+00
  %115 = fcmp olt float %113, %39
  %or.cond117 = select i1 %114, i1 %115, i1 false
  br i1 %or.cond117, label %116, label %.thread, !llvm.loop !47

116:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #9
  %117 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %113, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %117, ptr %17, align 8
  %118 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %17)
  store <2 x float> %118, ptr %15, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #9
  %119 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %113, ptr noundef nonnull align 4 dereferenceable(8) %14)
  store <2 x float> %119, ptr %18, align 8
  %120 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %18)
  store <2 x float> %120, ptr %16, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #9
  %121 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %16)
  %122 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %15)
  %123 = fdiv float %121, %122
  %124 = fcmp oge float %123, 0.000000e+00
  %125 = fcmp ole float %123, 1.000000e+00
  %or.cond = and i1 %124, %125
  br i1 %or.cond, label %176, label %.thread, !llvm.loop !47

126:                                              ; preds = %99
  %127 = fmul float %107, -4.000000e+00
  %128 = fmul float %103, %127
  %129 = call float @llvm.fmuladd.f32(float %106, float %106, float %128)
  %130 = fcmp olt float %129, 0.000000e+00
  br i1 %130, label %.thread, label %131, !llvm.loop !47

131:                                              ; preds = %126
  %132 = call float @sqrtf(float noundef %129) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #9
  %133 = fneg float %106
  %134 = fmul float %103, 2.000000e+00
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #9
  %135 = insertelement <2 x float> poison, float %133, i64 0
  %136 = insertelement <2 x float> %135, float %132, i64 1
  %137 = insertelement <2 x float> poison, float %132, i64 0
  %138 = insertelement <2 x float> %137, float %106, i64 1
  %139 = fsub <2 x float> %136, %138
  %140 = insertelement <2 x float> poison, float %134, i64 0
  %141 = shufflevector <2 x float> %140, <2 x float> poison, <2 x i32> zeroinitializer
  %142 = fdiv <2 x float> %139, %141
  %143 = extractelement <2 x float> %142, i64 0
  store float %143, ptr %19, align 4, !tbaa !48
  %144 = extractelement <2 x float> %142, i64 1
  store float %144, ptr %20, align 4, !tbaa !48
  %145 = fcmp ogt float %143, %144
  br i1 %145, label %146, label %147

146:                                              ; preds = %131
  call void @_Z6b2SwapIfEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %.pre137 = load float, ptr %19, align 4, !tbaa !48
  br label %147

147:                                              ; preds = %146, %131
  %148 = phi float [ %.pre137, %146 ], [ %143, %131 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #9
  %149 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %148, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %149, ptr %21, align 8
  %150 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %21)
  store <2 x float> %150, ptr %15, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #9
  %151 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %148, ptr noundef nonnull align 4 dereferenceable(8) %14)
  store <2 x float> %151, ptr %22, align 8
  %152 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %22)
  store <2 x float> %152, ptr %16, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #9
  %153 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %16)
  %154 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %15)
  %155 = fcmp ult float %148, 0.000000e+00
  br i1 %155, label %161, label %156

156:                                              ; preds = %147
  %157 = fdiv float %153, %154
  %158 = fcmp olt float %148, %39
  %159 = fcmp oge float %157, 0.000000e+00
  %or.cond4 = and i1 %158, %159
  %160 = fcmp ole float %157, 1.000000e+00
  %or.cond6 = and i1 %160, %or.cond4
  br i1 %or.cond6, label %.thread122, label %161

161:                                              ; preds = %156, %147
  %162 = load float, ptr %20, align 4, !tbaa !48
  %163 = fcmp oge float %162, 0.000000e+00
  %164 = fcmp olt float %162, %39
  %or.cond118 = select i1 %163, i1 %164, i1 false
  br i1 %or.cond118, label %165, label %175, !llvm.loop !47

165:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #9
  %166 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %162, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %166, ptr %23, align 8
  %167 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %23)
  store <2 x float> %167, ptr %15, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #9
  %168 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %162, ptr noundef nonnull align 4 dereferenceable(8) %14)
  store <2 x float> %168, ptr %24, align 8
  %169 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(8) %24)
  store <2 x float> %169, ptr %16, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #9
  %170 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %16)
  %171 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %15)
  %172 = fdiv float %170, %171
  %173 = fcmp oge float %172, 0.000000e+00
  %174 = fcmp ole float %172, 1.000000e+00
  %or.cond8 = and i1 %173, %174
  br i1 %or.cond8, label %.thread122, label %175, !llvm.loop !47

.thread122:                                       ; preds = %156, %165
  %.3.ph = phi float [ %157, %156 ], [ %172, %165 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #9
  br label %176

175:                                              ; preds = %165, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #9
  br label %.thread

176:                                              ; preds = %.thread122, %116
  %.5 = phi float [ %123, %116 ], [ %.3.ph, %.thread122 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #9
  %177 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %.5, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %177, ptr %27, align 8
  %178 = call <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %27)
  store <2 x float> %178, ptr %26, align 8
  %179 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %26, ptr noundef nonnull align 4 dereferenceable(8) %12)
  store <2 x float> %179, ptr %25, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #9
  %180 = call noundef float @_ZNK16b2ParticleSystem15GetParticleMassEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  %181 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %180, ptr noundef nonnull align 4 dereferenceable(8) %25)
  store <2 x float> %181, ptr %28, align 8
  %182 = call noundef zeroext i1 @_ZNK16b2ParticleSystem12IsRigidGroupEP15b2ParticleGroup(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef %98)
  br i1 %182, label %183, label %201

183:                                              ; preds = %176
  %184 = call noundef float @_ZNK15b2ParticleGroup7GetMassEv(ptr noundef nonnull align 8 dereferenceable(96) %98)
  %185 = call noundef float @_ZNK15b2ParticleGroup10GetInertiaEv(ptr noundef nonnull align 8 dereferenceable(96) %98)
  %186 = fcmp ogt float %184, 0.000000e+00
  br i1 %186, label %187, label %191

187:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #9
  %188 = fdiv float 1.000000e+00, %184
  %189 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %188, ptr noundef nonnull align 4 dereferenceable(8) %28)
  store <2 x float> %189, ptr %29, align 8
  %190 = getelementptr inbounds i8, ptr %98, i64 60
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %190, ptr noundef nonnull align 4 dereferenceable(8) %29)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #9
  br label %191

191:                                              ; preds = %187, %183
  %192 = fcmp ogt float %185, 0.000000e+00
  br i1 %192, label %193, label %204

193:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %31) #9
  %194 = call <2 x float> @_ZNK15b2ParticleGroup9GetCenterEv(ptr noundef nonnull align 8 dereferenceable(96) %98)
  store <2 x float> %194, ptr %31, align 8
  %195 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %31)
  store <2 x float> %195, ptr %30, align 8
  %196 = call noundef float @_Z7b2CrossRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %30, ptr noundef nonnull align 4 dereferenceable(8) %28)
  %197 = fdiv float %196, %185
  %198 = getelementptr inbounds i8, ptr %98, i64 68
  %199 = load float, ptr %198, align 4, !tbaa !49
  %200 = fadd float %199, %197
  store float %200, ptr %198, align 4, !tbaa !49
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #9
  br label %204

201:                                              ; preds = %176
  %202 = load ptr, ptr %46, align 8, !tbaa !37
  %203 = getelementptr inbounds %struct.b2Vec2, ptr %202, i64 %93
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %203, ptr noundef nonnull align 4 dereferenceable(8) %25)
  br label %204

204:                                              ; preds = %191, %193, %201
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %32) #9
  %205 = load float, ptr %47, align 4, !tbaa !54
  %206 = fneg float %205
  %207 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %206, ptr noundef nonnull align 4 dereferenceable(8) %28)
  store <2 x float> %207, ptr %32, align 8
  call void @_ZN16b2ParticleSystem18ParticleApplyForceEiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %0, i32 noundef %91, ptr noundef nonnull align 4 dereferenceable(8) %32)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #9
  br label %.thread

.thread:                                          ; preds = %126, %175, %116, %111, %109, %204
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  br label %208

208:                                              ; preds = %.thread, %.lr.ph129
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  %209 = call noundef i32 @_ZN16b2ParticleSystem22InsideBoundsEnumerator7GetNextEv(ptr noundef nonnull align 8 dereferenceable(32) %10)
  %210 = icmp sgt i32 %209, -1
  br i1 %210, label %.lr.ph129, label %._crit_edge130

._crit_edge130:                                   ; preds = %208, %67
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  br label %211

211:                                              ; preds = %._crit_edge130, %62
  %212 = add nuw nsw i32 %.096132, 1
  %213 = call noundef i32 @_ZNK16b2GrowableBufferI14b2ParticlePairE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %40)
  %214 = icmp slt i32 %212, %213
  br i1 %214, label %62, label %._crit_edge135, !llvm.loop !55
}

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

; 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 #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #0 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 #8

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

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

; 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 #8 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16b2ParticleSystem18ParticleApplyForceEiRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632), i32 noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 44}
!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, !11, i64 0}
!34 = !{!"_ZTS10b2TimeStep", !11, i64 0, !11, i64 4, !11, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !7, i64 24}
!35 = !{!6, !16, i64 128}
!36 = !{!10, !10, i64 0}
!37 = !{!6, !16, i64 160}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!41, !10, i64 8}
!41 = !{!"_ZTS14b2ParticlePair", !10, i64 0, !10, i64 4, !10, i64 8, !11, i64 12, !11, i64 16}
!42 = !{!41, !10, i64 0}
!43 = !{!41, !10, i64 4}
!44 = !{!6, !16, i64 144}
!45 = !{!6, !16, i64 240}
!46 = !{!16, !16, i64 0}
!47 = distinct !{!47, !39}
!48 = !{!11, !11, i64 0}
!49 = !{!50, !11, i64 68}
!50 = !{!"_ZTS15b2ParticleGroup", !16, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !11, i64 20, !16, i64 24, !16, i64 32, !10, i64 40, !11, i64 44, !11, i64 48, !51, i64 52, !51, i64 60, !11, i64 68, !52, i64 72, !16, i64 88}
!51 = !{!"_ZTS6b2Vec2", !11, i64 0, !11, i64 4}
!52 = !{!"_ZTS11b2Transform", !51, i64 0, !53, i64 8}
!53 = !{!"_ZTS5b2Rot", !11, i64 0, !11, i64 4}
!54 = !{!34, !11, i64 4}
!55 = distinct !{!55, !39}


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