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

; 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 = 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 }
%class.b2World = type { %class.b2BlockAllocator, %class.b2StackAllocator, %class.b2ContactManager, ptr, ptr, ptr, ptr, i32, i32, %struct.b2Vec2, i8, ptr, ptr, float, i8, i8, i8, i8, i8, i8, i8, i8, %struct.b2Profile }
%class.b2BlockAllocator = type { ptr, i32, i32, [14 x ptr] }
%class.b2StackAllocator = type <{ [102400 x i8], i32, i32, i32, [4 x i8], [32 x %struct.b2StackEntry], i32, [4 x i8] }>
%struct.b2StackEntry = type { ptr, i32, i8 }
%class.b2ContactManager = type { %class.b2BroadPhase, i32, ptr, ptr, ptr, ptr }
%class.b2BroadPhase = type <{ ptr, ptr, ptr, ptr, %struct.b2TreeNode, ptr, ptr, ptr, i32, i32, %class.b2IntHashTable, i32, i32, i8, [7 x i8] }>
%struct.b2TreeNode = type { ptr, ptr, ptr, ptr, %struct.b2AABB }
%struct.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%class.b2IntHashTable = type <{ ptr, i32, [4 x i8] }>
%struct.b2Vec2 = type { float, float }
%struct.b2Profile = type { float, float, float, float, float }
%class.b2ParticleColor = type { i8, i8, i8, i8 }
%"struct.b2ParticleSystem::Proxy" = type { i32, i32 }
%struct.b2ParticleBodyContact = type { i32, ptr, ptr, float, %struct.b2Vec2, float }
%struct.b2ParticlePair = type { i32, i32, i32, float, float }
%struct.b2ParticleTriad = type { i32, i32, i32, i32, float, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, 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: 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: mustprogress uwtable
declare dso_local void @_ZN16b2ParticleSystem20DestroyParticleGroupEP15b2ParticleGroup(ptr noundef nonnull align 8 dereferenceable(632), ptr noundef) #2 align 2

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

43:                                               ; preds = %359, %1
  %44 = load i32, ptr %6, align 4, !tbaa !9
  %45 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 12
  %46 = load i32, ptr %45, align 4, !tbaa !35
  %47 = icmp slt i32 %44, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %362

49:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %50 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 16
  %51 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.0", ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !36
  %53 = load i32, ptr %6, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds i32, ptr %52, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !9
  store i32 %56, ptr %7, align 4, !tbaa !9
  %57 = load i32, ptr %7, align 4, !tbaa !9
  %58 = and i32 %57, 2
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %108

60:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %61 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 46
  %62 = load ptr, ptr %61, align 8, !tbaa !11
  %63 = getelementptr inbounds %class.b2World, ptr %62, i32 0, i32 11
  %64 = load ptr, ptr %63, align 8, !tbaa !37
  store ptr %64, ptr %8, align 8, !tbaa !5
  %65 = load i32, ptr %7, align 4, !tbaa !9
  %66 = and i32 %65, 512
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %77

68:                                               ; preds = %60
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = icmp ne ptr %69, null
  br i1 %70, label %71, label %77

71:                                               ; preds = %68
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = load i32, ptr %6, align 4, !tbaa !9
  %74 = load ptr, ptr %72, align 8, !tbaa !48
  %75 = getelementptr inbounds ptr, ptr %74, i64 5
  %76 = load ptr, ptr %75, align 8
  call void %76(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef %33, i32 noundef %73)
  br label %77

77:                                               ; preds = %71, %68, %60
  %78 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 15
  %79 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer", ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !50
  %81 = icmp ne ptr %80, null
  br i1 %81, label %82, label %103

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %83 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 15
  %84 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer", ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !50
  %86 = load i32, ptr %6, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds ptr, ptr %85, i64 %87
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  store ptr %89, ptr %9, align 8, !tbaa !5
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = icmp ne ptr %90, null
  br i1 %91, label %92, label %102

92:                                               ; preds = %82
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN16b2ParticleHandle8SetIndexEi(ptr noundef nonnull align 8 dereferenceable(20) %93, i32 noundef -1)
  %94 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 15
  %95 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer", ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !50
  %97 = load i32, ptr %6, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds ptr, ptr %96, i64 %98
  store ptr null, ptr %99, align 8, !tbaa !5
  %100 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 14
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN15b2SlabAllocatorI16b2ParticleHandleE4FreeEPS0_(ptr noundef nonnull align 8 dereferenceable(56) %100, ptr noundef %101)
  br label %102

102:                                              ; preds = %92, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %103

103:                                              ; preds = %102, %77
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = load i32, ptr %6, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i32, ptr %104, i64 %106
  store i32 -1, ptr %107, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %358

108:                                              ; preds = %49
  %109 = load i32, ptr %3, align 4, !tbaa !9
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = load i32, ptr %6, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds i32, ptr %110, i64 %112
  store i32 %109, ptr %113, align 4, !tbaa !9
  %114 = load i32, ptr %6, align 4, !tbaa !9
  %115 = load i32, ptr %3, align 4, !tbaa !9
  %116 = icmp ne i32 %114, %115
  br i1 %116, label %117, label %352

117:                                              ; preds = %108
  %118 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 15
  %119 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer", ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !50
  %121 = icmp ne ptr %120, null
  br i1 %121, label %122, label %143

122:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %123 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 15
  %124 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer", ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !50
  %126 = load i32, ptr %6, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds ptr, ptr %125, i64 %127
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  store ptr %129, ptr %10, align 8, !tbaa !5
  %130 = load ptr, ptr %10, align 8, !tbaa !5
  %131 = icmp ne ptr %130, null
  br i1 %131, label %132, label %135

132:                                              ; preds = %122
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  %134 = load i32, ptr %3, align 4, !tbaa !9
  call void @_ZN16b2ParticleHandle8SetIndexEi(ptr noundef nonnull align 8 dereferenceable(20) %133, i32 noundef %134)
  br label %135

135:                                              ; preds = %132, %122
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 15
  %138 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer", ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !50
  %140 = load i32, ptr %3, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds ptr, ptr %139, i64 %141
  store ptr %136, ptr %142, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %143

143:                                              ; preds = %135, %117
  %144 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 16
  %145 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.0", ptr %144, i32 0, i32 0
  %146 = load ptr, ptr %145, align 8, !tbaa !36
  %147 = load i32, ptr %6, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds i32, ptr %146, i64 %148
  %150 = load i32, ptr %149, align 4, !tbaa !9
  %151 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 16
  %152 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.0", ptr %151, i32 0, i32 0
  %153 = load ptr, ptr %152, align 8, !tbaa !36
  %154 = load i32, ptr %3, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds i32, ptr %153, i64 %155
  store i32 %150, ptr %156, align 4, !tbaa !9
  %157 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 30
  %158 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %157, i32 0, i32 0
  %159 = load ptr, ptr %158, align 8, !tbaa !51
  %160 = icmp ne ptr %159, null
  br i1 %160, label %161, label %175

161:                                              ; preds = %143
  %162 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 30
  %163 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %162, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !51
  %165 = load i32, ptr %6, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds i32, ptr %164, i64 %166
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 30
  %170 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %169, i32 0, i32 0
  %171 = load ptr, ptr %170, align 8, !tbaa !51
  %172 = load i32, ptr %3, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds i32, ptr %171, i64 %173
  store i32 %168, ptr %174, align 4, !tbaa !9
  br label %175

175:                                              ; preds = %161, %143
  %176 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 31
  %177 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %176, i32 0, i32 0
  %178 = load ptr, ptr %177, align 8, !tbaa !52
  %179 = icmp ne ptr %178, null
  br i1 %179, label %180, label %194

180:                                              ; preds = %175
  %181 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 31
  %182 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %181, i32 0, i32 0
  %183 = load ptr, ptr %182, align 8, !tbaa !52
  %184 = load i32, ptr %6, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds i32, ptr %183, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !9
  %188 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 31
  %189 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %188, i32 0, i32 0
  %190 = load ptr, ptr %189, align 8, !tbaa !52
  %191 = load i32, ptr %3, align 4, !tbaa !9
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds i32, ptr %190, i64 %192
  store i32 %187, ptr %193, align 4, !tbaa !9
  br label %194

194:                                              ; preds = %180, %175
  %195 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 32
  %196 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %195, i32 0, i32 0
  %197 = load ptr, ptr %196, align 8, !tbaa !53
  %198 = icmp ne ptr %197, null
  br i1 %198, label %199, label %213

199:                                              ; preds = %194
  %200 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 32
  %201 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %200, i32 0, i32 0
  %202 = load ptr, ptr %201, align 8, !tbaa !53
  %203 = load i32, ptr %6, align 4, !tbaa !9
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds i32, ptr %202, i64 %204
  %206 = load i32, ptr %205, align 4, !tbaa !9
  %207 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 32
  %208 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %207, i32 0, i32 0
  %209 = load ptr, ptr %208, align 8, !tbaa !53
  %210 = load i32, ptr %3, align 4, !tbaa !9
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds i32, ptr %209, i64 %211
  store i32 %206, ptr %212, align 4, !tbaa !9
  br label %213

213:                                              ; preds = %199, %194
  %214 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 17
  %215 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %214, i32 0, i32 0
  %216 = load ptr, ptr %215, align 8, !tbaa !54
  %217 = load i32, ptr %6, align 4, !tbaa !9
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds %struct.b2Vec2, ptr %216, i64 %218
  %220 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 17
  %221 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %220, i32 0, i32 0
  %222 = load ptr, ptr %221, align 8, !tbaa !54
  %223 = load i32, ptr %3, align 4, !tbaa !9
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds %struct.b2Vec2, ptr %222, i64 %224
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %225, ptr align 4 %219, i64 8, i1 false), !tbaa.struct !55
  %226 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 18
  %227 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %226, i32 0, i32 0
  %228 = load ptr, ptr %227, align 8, !tbaa !57
  %229 = load i32, ptr %6, align 4, !tbaa !9
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds %struct.b2Vec2, ptr %228, i64 %230
  %232 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 18
  %233 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %232, i32 0, i32 0
  %234 = load ptr, ptr %233, align 8, !tbaa !57
  %235 = load i32, ptr %3, align 4, !tbaa !9
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds %struct.b2Vec2, ptr %234, i64 %236
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %237, ptr align 4 %231, i64 8, i1 false), !tbaa.struct !55
  %238 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 26
  %239 = load ptr, ptr %238, align 8, !tbaa !58
  %240 = load i32, ptr %6, align 4, !tbaa !9
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds ptr, ptr %239, i64 %241
  %243 = load ptr, ptr %242, align 8, !tbaa !5
  %244 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 26
  %245 = load ptr, ptr %244, align 8, !tbaa !58
  %246 = load i32, ptr %3, align 4, !tbaa !9
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds ptr, ptr %245, i64 %247
  store ptr %243, ptr %248, align 8, !tbaa !5
  %249 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 6
  %250 = load i8, ptr %249, align 1, !tbaa !59, !range !60, !noundef !61
  %251 = trunc i8 %250 to i1
  br i1 %251, label %252, label %263

252:                                              ; preds = %213
  %253 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 19
  %254 = load ptr, ptr %253, align 8, !tbaa !62
  %255 = load i32, ptr %6, align 4, !tbaa !9
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds %struct.b2Vec2, ptr %254, i64 %256
  %258 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 19
  %259 = load ptr, ptr %258, align 8, !tbaa !62
  %260 = load i32, ptr %3, align 4, !tbaa !9
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds %struct.b2Vec2, ptr %259, i64 %261
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %262, ptr align 4 %257, i64 8, i1 false), !tbaa.struct !55
  br label %263

263:                                              ; preds = %252, %213
  %264 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 21
  %265 = load ptr, ptr %264, align 8, !tbaa !63
  %266 = icmp ne ptr %265, null
  br i1 %266, label %267, label %279

267:                                              ; preds = %263
  %268 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 21
  %269 = load ptr, ptr %268, align 8, !tbaa !63
  %270 = load i32, ptr %6, align 4, !tbaa !9
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds float, ptr %269, i64 %271
  %273 = load float, ptr %272, align 4, !tbaa !56
  %274 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 21
  %275 = load ptr, ptr %274, align 8, !tbaa !63
  %276 = load i32, ptr %3, align 4, !tbaa !9
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds float, ptr %275, i64 %277
  store float %273, ptr %278, align 4, !tbaa !56
  br label %279

279:                                              ; preds = %267, %263
  %280 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 24
  %281 = load ptr, ptr %280, align 8, !tbaa !64
  %282 = icmp ne ptr %281, null
  br i1 %282, label %283, label %295

283:                                              ; preds = %279
  %284 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 24
  %285 = load ptr, ptr %284, align 8, !tbaa !64
  %286 = load i32, ptr %6, align 4, !tbaa !9
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds float, ptr %285, i64 %287
  %289 = load float, ptr %288, align 4, !tbaa !56
  %290 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 24
  %291 = load ptr, ptr %290, align 8, !tbaa !64
  %292 = load i32, ptr %3, align 4, !tbaa !9
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds float, ptr %291, i64 %293
  store float %289, ptr %294, align 4, !tbaa !56
  br label %295

295:                                              ; preds = %283, %279
  %296 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 25
  %297 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.4", ptr %296, i32 0, i32 0
  %298 = load ptr, ptr %297, align 8, !tbaa !65
  %299 = icmp ne ptr %298, null
  br i1 %299, label %300, label %313

300:                                              ; preds = %295
  %301 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 25
  %302 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.4", ptr %301, i32 0, i32 0
  %303 = load ptr, ptr %302, align 8, !tbaa !65
  %304 = load i32, ptr %6, align 4, !tbaa !9
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds %class.b2ParticleColor, ptr %303, i64 %305
  %307 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 25
  %308 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.4", ptr %307, i32 0, i32 0
  %309 = load ptr, ptr %308, align 8, !tbaa !65
  %310 = load i32, ptr %3, align 4, !tbaa !9
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds %class.b2ParticleColor, ptr %309, i64 %311
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %312, ptr align 1 %306, i64 4, i1 false), !tbaa.struct !66
  br label %313

313:                                              ; preds = %300, %295
  %314 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 27
  %315 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.6", ptr %314, i32 0, i32 0
  %316 = load ptr, ptr %315, align 8, !tbaa !68
  %317 = icmp ne ptr %316, null
  br i1 %317, label %318, label %332

318:                                              ; preds = %313
  %319 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 27
  %320 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.6", ptr %319, i32 0, i32 0
  %321 = load ptr, ptr %320, align 8, !tbaa !68
  %322 = load i32, ptr %6, align 4, !tbaa !9
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds ptr, ptr %321, i64 %323
  %325 = load ptr, ptr %324, align 8, !tbaa !5
  %326 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 27
  %327 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.6", ptr %326, i32 0, i32 0
  %328 = load ptr, ptr %327, align 8, !tbaa !68
  %329 = load i32, ptr %3, align 4, !tbaa !9
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds ptr, ptr %328, i64 %330
  store ptr %325, ptr %331, align 8, !tbaa !5
  br label %332

332:                                              ; preds = %318, %313
  %333 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 39
  %334 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %333, i32 0, i32 0
  %335 = load ptr, ptr %334, align 8, !tbaa !69
  %336 = icmp ne ptr %335, null
  br i1 %336, label %337, label %351

337:                                              ; preds = %332
  %338 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 39
  %339 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %338, i32 0, i32 0
  %340 = load ptr, ptr %339, align 8, !tbaa !69
  %341 = load i32, ptr %6, align 4, !tbaa !9
  %342 = sext i32 %341 to i64
  %343 = getelementptr inbounds i32, ptr %340, i64 %342
  %344 = load i32, ptr %343, align 4, !tbaa !9
  %345 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 39
  %346 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %345, i32 0, i32 0
  %347 = load ptr, ptr %346, align 8, !tbaa !69
  %348 = load i32, ptr %3, align 4, !tbaa !9
  %349 = sext i32 %348 to i64
  %350 = getelementptr inbounds i32, ptr %347, i64 %349
  store i32 %344, ptr %350, align 4, !tbaa !9
  br label %351

351:                                              ; preds = %337, %332
  br label %352

352:                                              ; preds = %351, %108
  %353 = load i32, ptr %3, align 4, !tbaa !9
  %354 = add nsw i32 %353, 1
  store i32 %354, ptr %3, align 4, !tbaa !9
  %355 = load i32, ptr %7, align 4, !tbaa !9
  %356 = load i32, ptr %5, align 4, !tbaa !9
  %357 = or i32 %356, %355
  store i32 %357, ptr %5, align 4, !tbaa !9
  br label %358

358:                                              ; preds = %352, %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %359

359:                                              ; preds = %358
  %360 = load i32, ptr %6, align 4, !tbaa !9
  %361 = add nsw i32 %360, 1
  store i32 %361, ptr %6, align 4, !tbaa !9
  br label %43, !llvm.loop !70

362:                                              ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %363

363:                                              ; preds = %384, %362
  %364 = load i32, ptr %11, align 4, !tbaa !9
  %365 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 34
  %366 = call noundef i32 @_ZNK16b2GrowableBufferIN16b2ParticleSystem5ProxyEE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %365)
  %367 = icmp slt i32 %364, %366
  br i1 %367, label %369, label %368

368:                                              ; preds = %363
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %387

369:                                              ; preds = %363
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %370 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 34
  %371 = call noundef ptr @_ZN16b2GrowableBufferIN16b2ParticleSystem5ProxyEE5BeginEv(ptr noundef nonnull align 8 dereferenceable(24) %370)
  %372 = load i32, ptr %11, align 4, !tbaa !9
  %373 = sext i32 %372 to i64
  %374 = getelementptr inbounds %"struct.b2ParticleSystem::Proxy", ptr %371, i64 %373
  store ptr %374, ptr %12, align 8, !tbaa !5
  %375 = load ptr, ptr %4, align 8, !tbaa !5
  %376 = load ptr, ptr %12, align 8, !tbaa !5
  %377 = getelementptr inbounds %"struct.b2ParticleSystem::Proxy", ptr %376, i32 0, i32 0
  %378 = load i32, ptr %377, align 4, !tbaa !72
  %379 = sext i32 %378 to i64
  %380 = getelementptr inbounds i32, ptr %375, i64 %379
  %381 = load i32, ptr %380, align 4, !tbaa !9
  %382 = load ptr, ptr %12, align 8, !tbaa !5
  %383 = getelementptr inbounds %"struct.b2ParticleSystem::Proxy", ptr %382, i32 0, i32 0
  store i32 %381, ptr %383, align 4, !tbaa !72
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %384

384:                                              ; preds = %369
  %385 = load i32, ptr %11, align 4, !tbaa !9
  %386 = add nsw i32 %385, 1
  store i32 %386, ptr %11, align 4, !tbaa !9
  br label %363, !llvm.loop !74

387:                                              ; preds = %368
  %388 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 34
  %389 = call noundef ptr @_ZN16b2GrowableBufferIN16b2ParticleSystem5ProxyEE8RemoveIfIPFbRKS1_EEEPS1_T_(ptr noundef nonnull align 8 dereferenceable(24) %388, ptr noundef @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test14IsProxyInvalidERKNS_5ProxyE)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %390

390:                                              ; preds = %413, %387
  %391 = load i32, ptr %13, align 4, !tbaa !9
  %392 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 35
  %393 = call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %392)
  %394 = icmp slt i32 %391, %393
  br i1 %394, label %396, label %395

395:                                              ; preds = %390
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %416

396:                                              ; preds = %390
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %397 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 35
  %398 = load i32, ptr %13, align 4, !tbaa !9
  %399 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %397, i32 noundef %398)
  store ptr %399, ptr %14, align 8, !tbaa !5
  %400 = load ptr, ptr %14, align 8, !tbaa !5
  %401 = load ptr, ptr %4, align 8, !tbaa !5
  %402 = load ptr, ptr %14, align 8, !tbaa !5
  %403 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %402)
  %404 = sext i32 %403 to i64
  %405 = getelementptr inbounds i32, ptr %401, i64 %404
  %406 = load i32, ptr %405, align 4, !tbaa !9
  %407 = load ptr, ptr %4, align 8, !tbaa !5
  %408 = load ptr, ptr %14, align 8, !tbaa !5
  %409 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %408)
  %410 = sext i32 %409 to i64
  %411 = getelementptr inbounds i32, ptr %407, i64 %410
  %412 = load i32, ptr %411, align 4, !tbaa !9
  call void @_ZN17b2ParticleContact10SetIndicesEii(ptr noundef nonnull align 4 dereferenceable(24) %400, i32 noundef %406, i32 noundef %412)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %413

413:                                              ; preds = %396
  %414 = load i32, ptr %13, align 4, !tbaa !9
  %415 = add nsw i32 %414, 1
  store i32 %415, ptr %13, align 4, !tbaa !9
  br label %390, !llvm.loop !75

416:                                              ; preds = %395
  %417 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 35
  %418 = call noundef ptr @_ZN16b2GrowableBufferI17b2ParticleContactE8RemoveIfIPFbRKS0_EEEPS0_T_(ptr noundef nonnull align 8 dereferenceable(24) %417, ptr noundef @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test16IsContactInvalidERK17b2ParticleContact)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %419

419:                                              ; preds = %438, %416
  %420 = load i32, ptr %15, align 4, !tbaa !9
  %421 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 36
  %422 = call noundef i32 @_ZNK16b2GrowableBufferI21b2ParticleBodyContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %421)
  %423 = icmp slt i32 %420, %422
  br i1 %423, label %425, label %424

424:                                              ; preds = %419
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %441

425:                                              ; preds = %419
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %426 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 36
  %427 = load i32, ptr %15, align 4, !tbaa !9
  %428 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN16b2GrowableBufferI21b2ParticleBodyContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %426, i32 noundef %427)
  store ptr %428, ptr %16, align 8, !tbaa !5
  %429 = load ptr, ptr %4, align 8, !tbaa !5
  %430 = load ptr, ptr %16, align 8, !tbaa !5
  %431 = getelementptr inbounds %struct.b2ParticleBodyContact, ptr %430, i32 0, i32 0
  %432 = load i32, ptr %431, align 8, !tbaa !76
  %433 = sext i32 %432 to i64
  %434 = getelementptr inbounds i32, ptr %429, i64 %433
  %435 = load i32, ptr %434, align 4, !tbaa !9
  %436 = load ptr, ptr %16, align 8, !tbaa !5
  %437 = getelementptr inbounds %struct.b2ParticleBodyContact, ptr %436, i32 0, i32 0
  store i32 %435, ptr %437, align 8, !tbaa !76
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %438

438:                                              ; preds = %425
  %439 = load i32, ptr %15, align 4, !tbaa !9
  %440 = add nsw i32 %439, 1
  store i32 %440, ptr %15, align 4, !tbaa !9
  br label %419, !llvm.loop !78

441:                                              ; preds = %424
  %442 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 36
  %443 = call noundef ptr @_ZN16b2GrowableBufferI21b2ParticleBodyContactE8RemoveIfIPFbRKS0_EEEPS0_T_(ptr noundef nonnull align 8 dereferenceable(24) %442, ptr noundef @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test20IsBodyContactInvalidERK21b2ParticleBodyContact)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %444

444:                                              ; preds = %472, %441
  %445 = load i32, ptr %17, align 4, !tbaa !9
  %446 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 37
  %447 = call noundef i32 @_ZNK16b2GrowableBufferI14b2ParticlePairE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %446)
  %448 = icmp slt i32 %445, %447
  br i1 %448, label %450, label %449

449:                                              ; preds = %444
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %475

450:                                              ; preds = %444
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %451 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 37
  %452 = load i32, ptr %17, align 4, !tbaa !9
  %453 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZN16b2GrowableBufferI14b2ParticlePairEixEi(ptr noundef nonnull align 8 dereferenceable(24) %451, i32 noundef %452)
  store ptr %453, ptr %18, align 8, !tbaa !5
  %454 = load ptr, ptr %4, align 8, !tbaa !5
  %455 = load ptr, ptr %18, align 8, !tbaa !5
  %456 = getelementptr inbounds %struct.b2ParticlePair, ptr %455, i32 0, i32 0
  %457 = load i32, ptr %456, align 4, !tbaa !79
  %458 = sext i32 %457 to i64
  %459 = getelementptr inbounds i32, ptr %454, i64 %458
  %460 = load i32, ptr %459, align 4, !tbaa !9
  %461 = load ptr, ptr %18, align 8, !tbaa !5
  %462 = getelementptr inbounds %struct.b2ParticlePair, ptr %461, i32 0, i32 0
  store i32 %460, ptr %462, align 4, !tbaa !79
  %463 = load ptr, ptr %4, align 8, !tbaa !5
  %464 = load ptr, ptr %18, align 8, !tbaa !5
  %465 = getelementptr inbounds %struct.b2ParticlePair, ptr %464, i32 0, i32 1
  %466 = load i32, ptr %465, align 4, !tbaa !81
  %467 = sext i32 %466 to i64
  %468 = getelementptr inbounds i32, ptr %463, i64 %467
  %469 = load i32, ptr %468, align 4, !tbaa !9
  %470 = load ptr, ptr %18, align 8, !tbaa !5
  %471 = getelementptr inbounds %struct.b2ParticlePair, ptr %470, i32 0, i32 1
  store i32 %469, ptr %471, align 4, !tbaa !81
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %472

472:                                              ; preds = %450
  %473 = load i32, ptr %17, align 4, !tbaa !9
  %474 = add nsw i32 %473, 1
  store i32 %474, ptr %17, align 4, !tbaa !9
  br label %444, !llvm.loop !82

475:                                              ; preds = %449
  %476 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 37
  %477 = call noundef ptr @_ZN16b2GrowableBufferI14b2ParticlePairE8RemoveIfIPFbRKS0_EEEPS0_T_(ptr noundef nonnull align 8 dereferenceable(24) %476, ptr noundef @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test13IsPairInvalidERK14b2ParticlePair)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %478

478:                                              ; preds = %515, %475
  %479 = load i32, ptr %19, align 4, !tbaa !9
  %480 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 38
  %481 = call noundef i32 @_ZNK16b2GrowableBufferI15b2ParticleTriadE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %480)
  %482 = icmp slt i32 %479, %481
  br i1 %482, label %484, label %483

483:                                              ; preds = %478
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %518

484:                                              ; preds = %478
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %485 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 38
  %486 = load i32, ptr %19, align 4, !tbaa !9
  %487 = call noundef nonnull align 4 dereferenceable(60) ptr @_ZN16b2GrowableBufferI15b2ParticleTriadEixEi(ptr noundef nonnull align 8 dereferenceable(24) %485, i32 noundef %486)
  store ptr %487, ptr %20, align 8, !tbaa !5
  %488 = load ptr, ptr %4, align 8, !tbaa !5
  %489 = load ptr, ptr %20, align 8, !tbaa !5
  %490 = getelementptr inbounds %struct.b2ParticleTriad, ptr %489, i32 0, i32 0
  %491 = load i32, ptr %490, align 4, !tbaa !83
  %492 = sext i32 %491 to i64
  %493 = getelementptr inbounds i32, ptr %488, i64 %492
  %494 = load i32, ptr %493, align 4, !tbaa !9
  %495 = load ptr, ptr %20, align 8, !tbaa !5
  %496 = getelementptr inbounds %struct.b2ParticleTriad, ptr %495, i32 0, i32 0
  store i32 %494, ptr %496, align 4, !tbaa !83
  %497 = load ptr, ptr %4, align 8, !tbaa !5
  %498 = load ptr, ptr %20, align 8, !tbaa !5
  %499 = getelementptr inbounds %struct.b2ParticleTriad, ptr %498, i32 0, i32 1
  %500 = load i32, ptr %499, align 4, !tbaa !85
  %501 = sext i32 %500 to i64
  %502 = getelementptr inbounds i32, ptr %497, i64 %501
  %503 = load i32, ptr %502, align 4, !tbaa !9
  %504 = load ptr, ptr %20, align 8, !tbaa !5
  %505 = getelementptr inbounds %struct.b2ParticleTriad, ptr %504, i32 0, i32 1
  store i32 %503, ptr %505, align 4, !tbaa !85
  %506 = load ptr, ptr %4, align 8, !tbaa !5
  %507 = load ptr, ptr %20, align 8, !tbaa !5
  %508 = getelementptr inbounds %struct.b2ParticleTriad, ptr %507, i32 0, i32 2
  %509 = load i32, ptr %508, align 4, !tbaa !86
  %510 = sext i32 %509 to i64
  %511 = getelementptr inbounds i32, ptr %506, i64 %510
  %512 = load i32, ptr %511, align 4, !tbaa !9
  %513 = load ptr, ptr %20, align 8, !tbaa !5
  %514 = getelementptr inbounds %struct.b2ParticleTriad, ptr %513, i32 0, i32 2
  store i32 %512, ptr %514, align 4, !tbaa !86
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %515

515:                                              ; preds = %484
  %516 = load i32, ptr %19, align 4, !tbaa !9
  %517 = add nsw i32 %516, 1
  store i32 %517, ptr %19, align 4, !tbaa !9
  br label %478, !llvm.loop !87

518:                                              ; preds = %483
  %519 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 38
  %520 = call noundef ptr @_ZN16b2GrowableBufferI15b2ParticleTriadE8RemoveIfIPFbRKS0_EEEPS0_T_(ptr noundef nonnull align 8 dereferenceable(24) %519, ptr noundef @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test14IsTriadInvalidERK15b2ParticleTriad)
  %521 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 40
  %522 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %521, i32 0, i32 0
  %523 = load ptr, ptr %522, align 8, !tbaa !88
  %524 = icmp ne ptr %523, null
  br i1 %524, label %525, label %560

525:                                              ; preds = %518
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %526

526:                                              ; preds = %556, %525
  %527 = load i32, ptr %22, align 4, !tbaa !9
  %528 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 12
  %529 = load i32, ptr %528, align 4, !tbaa !35
  %530 = icmp slt i32 %527, %529
  br i1 %530, label %532, label %531

531:                                              ; preds = %526
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %559

532:                                              ; preds = %526
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %533 = load ptr, ptr %4, align 8, !tbaa !5
  %534 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 40
  %535 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %534, i32 0, i32 0
  %536 = load ptr, ptr %535, align 8, !tbaa !88
  %537 = load i32, ptr %22, align 4, !tbaa !9
  %538 = sext i32 %537 to i64
  %539 = getelementptr inbounds i32, ptr %536, i64 %538
  %540 = load i32, ptr %539, align 4, !tbaa !9
  %541 = sext i32 %540 to i64
  %542 = getelementptr inbounds i32, ptr %533, i64 %541
  %543 = load i32, ptr %542, align 4, !tbaa !9
  store i32 %543, ptr %23, align 4, !tbaa !9
  %544 = load i32, ptr %23, align 4, !tbaa !9
  %545 = icmp ne i32 %544, -1
  br i1 %545, label %546, label %555

546:                                              ; preds = %532
  %547 = load i32, ptr %23, align 4, !tbaa !9
  %548 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 40
  %549 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %548, i32 0, i32 0
  %550 = load ptr, ptr %549, align 8, !tbaa !88
  %551 = load i32, ptr %21, align 4, !tbaa !9
  %552 = add nsw i32 %551, 1
  store i32 %552, ptr %21, align 4, !tbaa !9
  %553 = sext i32 %551 to i64
  %554 = getelementptr inbounds i32, ptr %550, i64 %553
  store i32 %547, ptr %554, align 4, !tbaa !9
  br label %555

555:                                              ; preds = %546, %532
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %556

556:                                              ; preds = %555
  %557 = load i32, ptr %22, align 4, !tbaa !9
  %558 = add nsw i32 %557, 1
  store i32 %558, ptr %22, align 4, !tbaa !9
  br label %526, !llvm.loop !89

559:                                              ; preds = %531
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %560

560:                                              ; preds = %559, %518
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %561 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 44
  %562 = load ptr, ptr %561, align 8, !tbaa !90
  store ptr %562, ptr %24, align 8, !tbaa !5
  br label %563

563:                                              ; preds = %645, %560
  %564 = load ptr, ptr %24, align 8, !tbaa !5
  %565 = icmp ne ptr %564, null
  br i1 %565, label %567, label %566

566:                                              ; preds = %563
  store i32 23, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %648

567:                                              ; preds = %563
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %568 = load i32, ptr %3, align 4, !tbaa !9
  store i32 %568, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  store i32 0, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #6
  store i8 0, ptr %28, align 1, !tbaa !91
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  %569 = load ptr, ptr %24, align 8, !tbaa !5
  %570 = getelementptr inbounds %class.b2ParticleGroup, ptr %569, i32 0, i32 1
  %571 = load i32, ptr %570, align 8, !tbaa !92
  store i32 %571, ptr %29, align 4, !tbaa !9
  br label %572

572:                                              ; preds = %597, %567
  %573 = load i32, ptr %29, align 4, !tbaa !9
  %574 = load ptr, ptr %24, align 8, !tbaa !5
  %575 = getelementptr inbounds %class.b2ParticleGroup, ptr %574, i32 0, i32 2
  %576 = load i32, ptr %575, align 4, !tbaa !96
  %577 = icmp slt i32 %573, %576
  br i1 %577, label %579, label %578

578:                                              ; preds = %572
  store i32 26, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %600

579:                                              ; preds = %572
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  %580 = load ptr, ptr %4, align 8, !tbaa !5
  %581 = load i32, ptr %29, align 4, !tbaa !9
  %582 = sext i32 %581 to i64
  %583 = getelementptr inbounds i32, ptr %580, i64 %582
  %584 = load i32, ptr %583, align 4, !tbaa !9
  store i32 %584, ptr %30, align 4, !tbaa !9
  %585 = load i32, ptr %30, align 4, !tbaa !9
  %586 = icmp sge i32 %585, 0
  br i1 %586, label %587, label %595

587:                                              ; preds = %579
  %588 = load i32, ptr %26, align 4, !tbaa !9
  %589 = load i32, ptr %30, align 4, !tbaa !9
  %590 = call noundef i32 @_Z5b2MinIiET_S0_S0_(i32 noundef %588, i32 noundef %589)
  store i32 %590, ptr %26, align 4, !tbaa !9
  %591 = load i32, ptr %27, align 4, !tbaa !9
  %592 = load i32, ptr %30, align 4, !tbaa !9
  %593 = add nsw i32 %592, 1
  %594 = call noundef i32 @_Z5b2MaxIiET_S0_S0_(i32 noundef %591, i32 noundef %593)
  store i32 %594, ptr %27, align 4, !tbaa !9
  br label %596

595:                                              ; preds = %579
  store i8 1, ptr %28, align 1, !tbaa !91
  br label %596

596:                                              ; preds = %595, %587
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %597

597:                                              ; preds = %596
  %598 = load i32, ptr %29, align 4, !tbaa !9
  %599 = add nsw i32 %598, 1
  store i32 %599, ptr %29, align 4, !tbaa !9
  br label %572, !llvm.loop !97

600:                                              ; preds = %578
  %601 = load i32, ptr %26, align 4, !tbaa !9
  %602 = load i32, ptr %27, align 4, !tbaa !9
  %603 = icmp slt i32 %601, %602
  br i1 %603, label %604, label %627

604:                                              ; preds = %600
  %605 = load i32, ptr %26, align 4, !tbaa !9
  %606 = load ptr, ptr %24, align 8, !tbaa !5
  %607 = getelementptr inbounds %class.b2ParticleGroup, ptr %606, i32 0, i32 1
  store i32 %605, ptr %607, align 8, !tbaa !92
  %608 = load i32, ptr %27, align 4, !tbaa !9
  %609 = load ptr, ptr %24, align 8, !tbaa !5
  %610 = getelementptr inbounds %class.b2ParticleGroup, ptr %609, i32 0, i32 2
  store i32 %608, ptr %610, align 4, !tbaa !96
  %611 = load i8, ptr %28, align 1, !tbaa !91, !range !60, !noundef !61
  %612 = trunc i8 %611 to i1
  br i1 %612, label %613, label %626

613:                                              ; preds = %604
  %614 = load ptr, ptr %24, align 8, !tbaa !5
  %615 = getelementptr inbounds %class.b2ParticleGroup, ptr %614, i32 0, i32 3
  %616 = load i32, ptr %615, align 8, !tbaa !98
  %617 = and i32 %616, 1
  %618 = icmp ne i32 %617, 0
  br i1 %618, label %619, label %625

619:                                              ; preds = %613
  %620 = load ptr, ptr %24, align 8, !tbaa !5
  %621 = load ptr, ptr %24, align 8, !tbaa !5
  %622 = getelementptr inbounds %class.b2ParticleGroup, ptr %621, i32 0, i32 3
  %623 = load i32, ptr %622, align 8, !tbaa !98
  %624 = or i32 %623, 16
  call void @_ZN16b2ParticleSystem13SetGroupFlagsEP15b2ParticleGroupj(ptr noundef nonnull align 8 dereferenceable(632) %33, ptr noundef %620, i32 noundef %624)
  br label %625

625:                                              ; preds = %619, %613
  br label %626

626:                                              ; preds = %625, %604
  br label %644

627:                                              ; preds = %600
  %628 = load ptr, ptr %24, align 8, !tbaa !5
  %629 = getelementptr inbounds %class.b2ParticleGroup, ptr %628, i32 0, i32 1
  store i32 0, ptr %629, align 8, !tbaa !92
  %630 = load ptr, ptr %24, align 8, !tbaa !5
  %631 = getelementptr inbounds %class.b2ParticleGroup, ptr %630, i32 0, i32 2
  store i32 0, ptr %631, align 4, !tbaa !96
  %632 = load ptr, ptr %24, align 8, !tbaa !5
  %633 = getelementptr inbounds %class.b2ParticleGroup, ptr %632, i32 0, i32 3
  %634 = load i32, ptr %633, align 8, !tbaa !98
  %635 = and i32 %634, 4
  %636 = icmp ne i32 %635, 0
  br i1 %636, label %643, label %637

637:                                              ; preds = %627
  %638 = load ptr, ptr %24, align 8, !tbaa !5
  %639 = load ptr, ptr %24, align 8, !tbaa !5
  %640 = getelementptr inbounds %class.b2ParticleGroup, ptr %639, i32 0, i32 3
  %641 = load i32, ptr %640, align 8, !tbaa !98
  %642 = or i32 %641, 8
  call void @_ZN16b2ParticleSystem13SetGroupFlagsEP15b2ParticleGroupj(ptr noundef nonnull align 8 dereferenceable(632) %33, ptr noundef %638, i32 noundef %642)
  br label %643

643:                                              ; preds = %637, %627
  br label %644

644:                                              ; preds = %643, %626
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %645

645:                                              ; preds = %644
  %646 = load ptr, ptr %24, align 8, !tbaa !5
  %647 = call noundef ptr @_ZN15b2ParticleGroup7GetNextEv(ptr noundef nonnull align 8 dereferenceable(96) %646)
  store ptr %647, ptr %24, align 8, !tbaa !5
  br label %563, !llvm.loop !99

648:                                              ; preds = %566
  %649 = load i32, ptr %3, align 4, !tbaa !9
  %650 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 12
  store i32 %649, ptr %650, align 4, !tbaa !35
  %651 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 46
  %652 = load ptr, ptr %651, align 8, !tbaa !11
  %653 = getelementptr inbounds %class.b2World, ptr %652, i32 0, i32 1
  %654 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN16b2StackAllocator4FreeEPv(ptr noundef nonnull align 8 dereferenceable(102932) %653, ptr noundef %654)
  %655 = load i32, ptr %5, align 4, !tbaa !9
  %656 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 2
  store i32 %655, ptr %656, align 8, !tbaa !100
  %657 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 3
  store i8 0, ptr %657, align 4, !tbaa !101
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %658 = getelementptr inbounds %class.b2ParticleSystem, ptr %33, i32 0, i32 44
  %659 = load ptr, ptr %658, align 8, !tbaa !90
  store ptr %659, ptr %31, align 8, !tbaa !5
  br label %660

660:                                              ; preds = %674, %648
  %661 = load ptr, ptr %31, align 8, !tbaa !5
  %662 = icmp ne ptr %661, null
  br i1 %662, label %664, label %663

663:                                              ; preds = %660
  store i32 29, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %676

664:                                              ; preds = %660
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %665 = load ptr, ptr %31, align 8, !tbaa !5
  %666 = call noundef ptr @_ZN15b2ParticleGroup7GetNextEv(ptr noundef nonnull align 8 dereferenceable(96) %665)
  store ptr %666, ptr %32, align 8, !tbaa !5
  %667 = load ptr, ptr %31, align 8, !tbaa !5
  %668 = getelementptr inbounds %class.b2ParticleGroup, ptr %667, i32 0, i32 3
  %669 = load i32, ptr %668, align 8, !tbaa !98
  %670 = and i32 %669, 8
  %671 = icmp ne i32 %670, 0
  br i1 %671, label %672, label %674

672:                                              ; preds = %664
  %673 = load ptr, ptr %31, align 8, !tbaa !5
  call void @_ZN16b2ParticleSystem20DestroyParticleGroupEP15b2ParticleGroup(ptr noundef nonnull align 8 dereferenceable(632) %33, ptr noundef %673)
  br label %674

674:                                              ; preds = %672, %664
  %675 = load ptr, ptr %32, align 8, !tbaa !5
  store ptr %675, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  br label %660, !llvm.loop !102

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN16b2ParticleHandle8SetIndexEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #3 align 2

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

declare noundef ptr @_ZN16b2StackAllocator8AllocateEi(ptr noundef nonnull align 8 dereferenceable(102932), i32 noundef) #4

declare void @_ZN16b2StackAllocator4FreeEPv(ptr noundef nonnull align 8 dereferenceable(102932), ptr noundef) #4

; 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 i32 @_ZNK16b2GrowableBufferI14b2ParticlePairE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 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) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(60) ptr @_ZN16b2GrowableBufferI15b2ParticleTriadEixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #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: 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN15b2ParticleGroup7GetNextEv(ptr noundef nonnull align 8 dereferenceable(96)) #5 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test14IsProxyInvalidERKNS_5ProxyE(ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN17b2ParticleContact10SetIndicesEii(ptr noundef nonnull align 4 dereferenceable(24), i32 noundef, i32 noundef) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test16IsContactInvalidERK17b2ParticleContact(ptr noundef nonnull align 4 dereferenceable(24)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test20IsBodyContactInvalidERK21b2ParticleBodyContact(ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test13IsPairInvalidERK14b2ParticlePair(ptr noundef nonnull align 4 dereferenceable(20)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test14IsTriadInvalidERK15b2ParticleTriad(ptr noundef nonnull align 4 dereferenceable(60)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5b2MinIiET_S0_S0_(i32 noundef, i32 noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z5b2MaxIiET_S0_S0_(i32 noundef, i32 noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 #6 = { 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, !6, i64 608}
!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, !10, i64 44}
!36 = !{!12, !6, i64 128}
!37 = !{!38, !6, i64 103304}
!38 = !{!"_ZTS7b2World", !39, i64 0, !40, i64 128, !41, i64 103064, !6, i64 103248, !6, i64 103256, !6, i64 103264, !6, i64 103272, !10, i64 103280, !10, i64 103284, !45, i64 103288, !13, i64 103296, !6, i64 103304, !6, i64 103312, !14, i64 103320, !13, i64 103324, !13, i64 103325, !13, i64 103326, !13, i64 103327, !13, i64 103328, !13, i64 103329, !13, i64 103330, !13, i64 103331, !47, i64 103332}
!39 = !{!"_ZTS16b2BlockAllocator", !6, i64 0, !10, i64 8, !10, i64 12, !7, i64 16}
!40 = !{!"_ZTS16b2StackAllocator", !7, i64 0, !10, i64 102400, !10, i64 102404, !10, i64 102408, !7, i64 102416, !10, i64 102928}
!41 = !{!"_ZTS16b2ContactManager", !42, i64 0, !10, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!42 = !{!"_ZTS12b2BroadPhase", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !43, i64 32, !6, i64 80, !6, i64 88, !6, i64 96, !10, i64 104, !10, i64 108, !46, i64 112, !10, i64 128, !10, i64 132, !13, i64 136}
!43 = !{!"_ZTS10b2TreeNode", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !44, i64 32}
!44 = !{!"_ZTS6b2AABB", !45, i64 0, !45, i64 8}
!45 = !{!"_ZTS6b2Vec2", !14, i64 0, !14, i64 4}
!46 = !{!"_ZTS14b2IntHashTable", !6, i64 0, !10, i64 8}
!47 = !{!"_ZTS9b2Profile", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16}
!48 = !{!49, !49, i64 0}
!49 = !{!"vtable pointer", !8, i64 0}
!50 = !{!12, !6, i64 112}
!51 = !{!12, !6, i64 272}
!52 = !{!12, !6, i64 288}
!53 = !{!12, !6, i64 304}
!54 = !{!12, !6, i64 144}
!55 = !{i64 0, i64 4, !56, i64 4, i64 4, !56}
!56 = !{!14, !14, i64 0}
!57 = !{!12, !6, i64 160}
!58 = !{!12, !6, i64 240}
!59 = !{!12, !13, i64 21}
!60 = !{i8 0, i8 2}
!61 = !{}
!62 = !{!12, !6, i64 176}
!63 = !{!12, !6, i64 192}
!64 = !{!12, !6, i64 216}
!65 = !{!12, !6, i64 224}
!66 = !{i64 0, i64 1, !67, i64 1, i64 1, !67, i64 2, i64 1, !67, i64 3, i64 1, !67}
!67 = !{!7, !7, i64 0}
!68 = !{!12, !6, i64 248}
!69 = !{!12, !6, i64 464}
!70 = distinct !{!70, !71}
!71 = !{!"llvm.loop.mustprogress"}
!72 = !{!73, !10, i64 0}
!73 = !{!"_ZTSN16b2ParticleSystem5ProxyE", !10, i64 0, !10, i64 4}
!74 = distinct !{!74, !71}
!75 = distinct !{!75, !71}
!76 = !{!77, !10, i64 0}
!77 = !{!"_ZTS21b2ParticleBodyContact", !10, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !45, i64 28, !14, i64 36}
!78 = distinct !{!78, !71}
!79 = !{!80, !10, i64 0}
!80 = !{!"_ZTS14b2ParticlePair", !10, i64 0, !10, i64 4, !10, i64 8, !14, i64 12, !14, i64 16}
!81 = !{!80, !10, i64 4}
!82 = distinct !{!82, !71}
!83 = !{!84, !10, i64 0}
!84 = !{!"_ZTS15b2ParticleTriad", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !14, i64 16, !45, i64 20, !45, i64 28, !45, i64 36, !14, i64 44, !14, i64 48, !14, i64 52, !14, i64 56}
!85 = !{!84, !10, i64 4}
!86 = !{!84, !10, i64 8}
!87 = distinct !{!87, !71}
!88 = !{!12, !6, i64 480}
!89 = distinct !{!89, !71}
!90 = !{!12, !6, i64 512}
!91 = !{!13, !13, i64 0}
!92 = !{!93, !10, i64 8}
!93 = !{!"_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, !45, i64 52, !45, i64 60, !14, i64 68, !94, i64 72, !6, i64 88}
!94 = !{!"_ZTS11b2Transform", !45, i64 0, !95, i64 8}
!95 = !{!"_ZTS5b2Rot", !14, i64 0, !14, i64 4}
!96 = !{!93, !10, i64 12}
!97 = distinct !{!97, !71}
!98 = !{!93, !10, i64 16}
!99 = distinct !{!99, !71}
!100 = !{!12, !10, i64 8}
!101 = !{!12, !13, i64 12}
!102 = distinct !{!102, !71}


; 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 }
%class.b2ParticleColor = type { i8, i8, i8, i8 }
%"struct.b2ParticleSystem::Proxy" = type { i32, i32 }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem11SolveZombieEv(ptr noundef nonnull align 8 dereferenceable(632) %0) local_unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 608
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 128
  %5 = getelementptr inbounds i8, ptr %0, i64 44
  %6 = load i32, ptr %5, align 4, !tbaa !33
  %7 = shl i32 %6, 2
  %8 = tail call noundef ptr @_ZN16b2StackAllocator8AllocateEi(ptr noundef nonnull align 8 dereferenceable(102932) %4, i32 noundef %7)
  %9 = load i32, ptr %5, align 4, !tbaa !33
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph, label %.preheader196

.lr.ph:                                           ; preds = %1
  %11 = getelementptr inbounds i8, ptr %0, i64 128
  %12 = getelementptr inbounds i8, ptr %0, i64 112
  %13 = getelementptr inbounds i8, ptr %0, i64 56
  %14 = getelementptr inbounds i8, ptr %0, i64 272
  %15 = getelementptr inbounds i8, ptr %0, i64 288
  %16 = getelementptr inbounds i8, ptr %0, i64 304
  %17 = getelementptr inbounds i8, ptr %0, i64 144
  %18 = getelementptr inbounds i8, ptr %0, i64 160
  %19 = getelementptr inbounds i8, ptr %0, i64 240
  %20 = getelementptr inbounds i8, ptr %0, i64 21
  %21 = getelementptr inbounds i8, ptr %0, i64 176
  %22 = getelementptr inbounds i8, ptr %0, i64 192
  %23 = getelementptr inbounds i8, ptr %0, i64 216
  %24 = getelementptr inbounds i8, ptr %0, i64 224
  %25 = getelementptr inbounds i8, ptr %0, i64 248
  %26 = getelementptr inbounds i8, ptr %0, i64 464
  br label %30

.preheader196:                                    ; preds = %145, %1
  %.0142.lcssa = phi i32 [ 0, %1 ], [ %.1143, %145 ]
  %.0.lcssa = phi i32 [ 0, %1 ], [ %.1, %145 ]
  %27 = getelementptr inbounds i8, ptr %0, i64 344
  %28 = tail call noundef i32 @_ZNK16b2GrowableBufferIN16b2ParticleSystem5ProxyEE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %27)
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.lr.ph208, label %._crit_edge

30:                                               ; preds = %.lr.ph, %145
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %145 ]
  %.0205 = phi i32 [ 0, %.lr.ph ], [ %.1, %145 ]
  %.0142204 = phi i32 [ 0, %.lr.ph ], [ %.1143, %145 ]
  %31 = load ptr, ptr %11, align 8, !tbaa !34
  %32 = getelementptr inbounds i32, ptr %31, i64 %indvars.iv
  %33 = load i32, ptr %32, align 4, !tbaa !35
  %34 = and i32 %33, 2
  %.not182 = icmp eq i32 %34, 0
  br i1 %.not182, label %57, label %35

35:                                               ; preds = %30
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 103304
  %38 = load ptr, ptr %37, align 8, !tbaa !36
  %39 = and i32 %33, 512
  %40 = icmp ne i32 %39, 0
  %41 = icmp ne ptr %38, null
  %or.cond = select i1 %40, i1 %41, i1 false
  br i1 %or.cond, label %42, label %47

42:                                               ; preds = %35
  %43 = load ptr, ptr %38, align 8, !tbaa !47
  %44 = getelementptr inbounds i8, ptr %43, i64 40
  %45 = load ptr, ptr %44, align 8
  %46 = trunc nuw nsw i64 %indvars.iv to i32
  tail call void %45(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull %0, i32 noundef %46)
  br label %47

47:                                               ; preds = %42, %35
  %48 = load ptr, ptr %12, align 8, !tbaa !49
  %.not194 = icmp eq ptr %48, null
  br i1 %.not194, label %55, label %49

49:                                               ; preds = %47
  %50 = getelementptr inbounds ptr, ptr %48, i64 %indvars.iv
  %51 = load ptr, ptr %50, align 8, !tbaa !50
  %.not195 = icmp eq ptr %51, null
  br i1 %.not195, label %55, label %52

52:                                               ; preds = %49
  tail call void @_ZN16b2ParticleHandle8SetIndexEi(ptr noundef nonnull align 8 dereferenceable(20) %51, i32 noundef -1)
  %53 = load ptr, ptr %12, align 8, !tbaa !49
  %54 = getelementptr inbounds ptr, ptr %53, i64 %indvars.iv
  store ptr null, ptr %54, align 8, !tbaa !50
  tail call void @_ZN15b2SlabAllocatorI16b2ParticleHandleE4FreeEPS0_(ptr noundef nonnull align 8 dereferenceable(56) %13, ptr noundef nonnull %51)
  br label %55

55:                                               ; preds = %49, %52, %47
  %56 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv
  store i32 -1, ptr %56, align 4, !tbaa !35
  br label %145

57:                                               ; preds = %30
  %58 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv
  store i32 %.0205, ptr %58, align 4, !tbaa !35
  %59 = zext i32 %.0205 to i64
  %.not183 = icmp eq i64 %indvars.iv, %59
  br i1 %.not183, label %142, label %60

60:                                               ; preds = %57
  %61 = load ptr, ptr %12, align 8, !tbaa !49
  %.not184 = icmp eq ptr %61, null
  br i1 %.not184, label %._crit_edge267, label %62

._crit_edge267:                                   ; preds = %60
  %.pre268 = sext i32 %.0205 to i64
  br label %70

62:                                               ; preds = %60
  %63 = getelementptr inbounds ptr, ptr %61, i64 %indvars.iv
  %64 = load ptr, ptr %63, align 8, !tbaa !50
  %.not185 = icmp eq ptr %64, null
  br i1 %.not185, label %66, label %65

65:                                               ; preds = %62
  tail call void @_ZN16b2ParticleHandle8SetIndexEi(ptr noundef nonnull align 8 dereferenceable(20) %64, i32 noundef %.0205)
  %.pre = load ptr, ptr %12, align 8, !tbaa !49
  br label %66

66:                                               ; preds = %65, %62
  %67 = phi ptr [ %.pre, %65 ], [ %61, %62 ]
  %68 = sext i32 %.0205 to i64
  %69 = getelementptr inbounds ptr, ptr %67, i64 %68
  store ptr %64, ptr %69, align 8, !tbaa !50
  %.pre264 = load ptr, ptr %11, align 8, !tbaa !34
  br label %70

70:                                               ; preds = %._crit_edge267, %66
  %.pre-phi = phi i64 [ %.pre268, %._crit_edge267 ], [ %68, %66 ]
  %71 = phi ptr [ %31, %._crit_edge267 ], [ %.pre264, %66 ]
  %72 = getelementptr inbounds i32, ptr %71, i64 %indvars.iv
  %73 = load i32, ptr %72, align 4, !tbaa !35
  %74 = getelementptr inbounds i32, ptr %71, i64 %.pre-phi
  store i32 %73, ptr %74, align 4, !tbaa !35
  %75 = load ptr, ptr %14, align 8, !tbaa !51
  %.not186 = icmp eq ptr %75, null
  br i1 %.not186, label %80, label %76

76:                                               ; preds = %70
  %77 = getelementptr inbounds i32, ptr %75, i64 %indvars.iv
  %78 = load i32, ptr %77, align 4, !tbaa !35
  %79 = getelementptr inbounds i32, ptr %75, i64 %.pre-phi
  store i32 %78, ptr %79, align 4, !tbaa !35
  br label %80

80:                                               ; preds = %76, %70
  %81 = load ptr, ptr %15, align 8, !tbaa !52
  %.not187 = icmp eq ptr %81, null
  br i1 %.not187, label %86, label %82

82:                                               ; preds = %80
  %83 = getelementptr inbounds i32, ptr %81, i64 %indvars.iv
  %84 = load i32, ptr %83, align 4, !tbaa !35
  %85 = getelementptr inbounds i32, ptr %81, i64 %.pre-phi
  store i32 %84, ptr %85, align 4, !tbaa !35
  br label %86

86:                                               ; preds = %82, %80
  %87 = load ptr, ptr %16, align 8, !tbaa !53
  %.not188 = icmp eq ptr %87, null
  br i1 %.not188, label %92, label %88

88:                                               ; preds = %86
  %89 = getelementptr inbounds i32, ptr %87, i64 %indvars.iv
  %90 = load i32, ptr %89, align 4, !tbaa !35
  %91 = getelementptr inbounds i32, ptr %87, i64 %.pre-phi
  store i32 %90, ptr %91, align 4, !tbaa !35
  br label %92

92:                                               ; preds = %88, %86
  %93 = load ptr, ptr %17, align 8, !tbaa !54
  %94 = getelementptr inbounds %struct.b2Vec2, ptr %93, i64 %indvars.iv
  %95 = getelementptr inbounds %struct.b2Vec2, ptr %93, i64 %.pre-phi
  %96 = load i64, ptr %94, align 4
  store i64 %96, ptr %95, align 4
  %97 = load ptr, ptr %18, align 8, !tbaa !55
  %98 = getelementptr inbounds %struct.b2Vec2, ptr %97, i64 %indvars.iv
  %99 = getelementptr inbounds %struct.b2Vec2, ptr %97, i64 %.pre-phi
  %100 = load i64, ptr %98, align 4
  store i64 %100, ptr %99, align 4
  %101 = load ptr, ptr %19, align 8, !tbaa !56
  %102 = getelementptr inbounds ptr, ptr %101, i64 %indvars.iv
  %103 = load ptr, ptr %102, align 8, !tbaa !50
  %104 = getelementptr inbounds ptr, ptr %101, i64 %.pre-phi
  store ptr %103, ptr %104, align 8, !tbaa !50
  %105 = load i8, ptr %20, align 1, !tbaa !57, !range !58, !noundef !59
  %106 = trunc nuw i8 %105 to i1
  br i1 %106, label %107, label %112

107:                                              ; preds = %92
  %108 = load ptr, ptr %21, align 8, !tbaa !60
  %109 = getelementptr inbounds %struct.b2Vec2, ptr %108, i64 %indvars.iv
  %110 = getelementptr inbounds %struct.b2Vec2, ptr %108, i64 %.pre-phi
  %111 = load i64, ptr %109, align 4
  store i64 %111, ptr %110, align 4
  br label %112

112:                                              ; preds = %107, %92
  %113 = load ptr, ptr %22, align 8, !tbaa !61
  %.not189 = icmp eq ptr %113, null
  br i1 %.not189, label %118, label %114

114:                                              ; preds = %112
  %115 = getelementptr inbounds float, ptr %113, i64 %indvars.iv
  %116 = load float, ptr %115, align 4, !tbaa !62
  %117 = getelementptr inbounds float, ptr %113, i64 %.pre-phi
  store float %116, ptr %117, align 4, !tbaa !62
  br label %118

118:                                              ; preds = %114, %112
  %119 = load ptr, ptr %23, align 8, !tbaa !63
  %.not190 = icmp eq ptr %119, null
  br i1 %.not190, label %124, label %120

120:                                              ; preds = %118
  %121 = getelementptr inbounds float, ptr %119, i64 %indvars.iv
  %122 = load float, ptr %121, align 4, !tbaa !62
  %123 = getelementptr inbounds float, ptr %119, i64 %.pre-phi
  store float %122, ptr %123, align 4, !tbaa !62
  br label %124

124:                                              ; preds = %120, %118
  %125 = load ptr, ptr %24, align 8, !tbaa !64
  %.not191 = icmp eq ptr %125, null
  br i1 %.not191, label %130, label %126

126:                                              ; preds = %124
  %127 = getelementptr inbounds %class.b2ParticleColor, ptr %125, i64 %indvars.iv
  %128 = getelementptr inbounds %class.b2ParticleColor, ptr %125, i64 %.pre-phi
  %129 = load i32, ptr %127, align 1
  store i32 %129, ptr %128, align 1
  br label %130

130:                                              ; preds = %126, %124
  %131 = load ptr, ptr %25, align 8, !tbaa !65
  %.not192 = icmp eq ptr %131, null
  br i1 %.not192, label %136, label %132

132:                                              ; preds = %130
  %133 = getelementptr inbounds ptr, ptr %131, i64 %indvars.iv
  %134 = load ptr, ptr %133, align 8, !tbaa !50
  %135 = getelementptr inbounds ptr, ptr %131, i64 %.pre-phi
  store ptr %134, ptr %135, align 8, !tbaa !50
  br label %136

136:                                              ; preds = %132, %130
  %137 = load ptr, ptr %26, align 8, !tbaa !66
  %.not193 = icmp eq ptr %137, null
  br i1 %.not193, label %142, label %138

138:                                              ; preds = %136
  %139 = getelementptr inbounds i32, ptr %137, i64 %indvars.iv
  %140 = load i32, ptr %139, align 4, !tbaa !35
  %141 = getelementptr inbounds i32, ptr %137, i64 %.pre-phi
  store i32 %140, ptr %141, align 4, !tbaa !35
  br label %142

142:                                              ; preds = %136, %138, %57
  %143 = add nsw i32 %.0205, 1
  %144 = or i32 %33, %.0142204
  br label %145

145:                                              ; preds = %142, %55
  %.1143 = phi i32 [ %.0142204, %55 ], [ %144, %142 ]
  %.1 = phi i32 [ %.0205, %55 ], [ %143, %142 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %146 = load i32, ptr %5, align 4, !tbaa !33
  %147 = sext i32 %146 to i64
  %148 = icmp slt i64 %indvars.iv.next, %147
  br i1 %148, label %30, label %.preheader196, !llvm.loop !67

._crit_edge:                                      ; preds = %.lr.ph208, %.preheader196
  %149 = tail call noundef ptr @_ZN16b2GrowableBufferIN16b2ParticleSystem5ProxyEE8RemoveIfIPFbRKS1_EEEPS1_T_(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test14IsProxyInvalidERKNS_5ProxyE)
  %150 = getelementptr inbounds i8, ptr %0, i64 368
  %151 = tail call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %150)
  %152 = icmp sgt i32 %151, 0
  br i1 %152, label %.lr.ph212, label %._crit_edge213

.lr.ph208:                                        ; preds = %.preheader196, %.lr.ph208
  %indvars.iv256 = phi i64 [ %indvars.iv.next257, %.lr.ph208 ], [ 0, %.preheader196 ]
  %153 = tail call noundef ptr @_ZN16b2GrowableBufferIN16b2ParticleSystem5ProxyEE5BeginEv(ptr noundef nonnull align 8 dereferenceable(24) %27)
  %154 = getelementptr inbounds %"struct.b2ParticleSystem::Proxy", ptr %153, i64 %indvars.iv256
  %155 = load i32, ptr %154, align 4, !tbaa !69
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds i32, ptr %8, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !35
  store i32 %158, ptr %154, align 4, !tbaa !69
  %indvars.iv.next257 = add nuw nsw i64 %indvars.iv256, 1
  %159 = tail call noundef i32 @_ZNK16b2GrowableBufferIN16b2ParticleSystem5ProxyEE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %27)
  %160 = sext i32 %159 to i64
  %161 = icmp slt i64 %indvars.iv.next257, %160
  br i1 %161, label %.lr.ph208, label %._crit_edge, !llvm.loop !71

._crit_edge213:                                   ; preds = %.lr.ph212, %._crit_edge
  %162 = tail call noundef ptr @_ZN16b2GrowableBufferI17b2ParticleContactE8RemoveIfIPFbRKS0_EEEPS0_T_(ptr noundef nonnull align 8 dereferenceable(24) %150, ptr noundef nonnull @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test16IsContactInvalidERK17b2ParticleContact)
  %163 = getelementptr inbounds i8, ptr %0, i64 392
  %164 = tail call noundef i32 @_ZNK16b2GrowableBufferI21b2ParticleBodyContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %163)
  %165 = icmp sgt i32 %164, 0
  br i1 %165, label %.lr.ph217, label %._crit_edge218

.lr.ph212:                                        ; preds = %._crit_edge, %.lr.ph212
  %.0158210 = phi i32 [ %175, %.lr.ph212 ], [ 0, %._crit_edge ]
  %166 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %150, i32 noundef %.0158210)
  %167 = tail call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %166)
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds i32, ptr %8, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !35
  %171 = tail call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %166)
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds i32, ptr %8, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !35
  tail call void @_ZN17b2ParticleContact10SetIndicesEii(ptr noundef nonnull align 4 dereferenceable(24) %166, i32 noundef %170, i32 noundef %174)
  %175 = add nuw nsw i32 %.0158210, 1
  %176 = tail call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %150)
  %177 = icmp slt i32 %175, %176
  br i1 %177, label %.lr.ph212, label %._crit_edge213, !llvm.loop !72

._crit_edge218:                                   ; preds = %.lr.ph217, %._crit_edge213
  %178 = tail call noundef ptr @_ZN16b2GrowableBufferI21b2ParticleBodyContactE8RemoveIfIPFbRKS0_EEEPS0_T_(ptr noundef nonnull align 8 dereferenceable(24) %163, ptr noundef nonnull @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test20IsBodyContactInvalidERK21b2ParticleBodyContact)
  %179 = getelementptr inbounds i8, ptr %0, i64 416
  %180 = tail call noundef i32 @_ZNK16b2GrowableBufferI14b2ParticlePairE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %179)
  %181 = icmp sgt i32 %180, 0
  br i1 %181, label %.lr.ph222, label %._crit_edge223

.lr.ph217:                                        ; preds = %._crit_edge213, %.lr.ph217
  %.0160215 = phi i32 [ %187, %.lr.ph217 ], [ 0, %._crit_edge213 ]
  %182 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZN16b2GrowableBufferI21b2ParticleBodyContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %163, i32 noundef %.0160215)
  %183 = load i32, ptr %182, align 8, !tbaa !73
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds i32, ptr %8, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !35
  store i32 %186, ptr %182, align 8, !tbaa !73
  %187 = add nuw nsw i32 %.0160215, 1
  %188 = tail call noundef i32 @_ZNK16b2GrowableBufferI21b2ParticleBodyContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %163)
  %189 = icmp slt i32 %187, %188
  br i1 %189, label %.lr.ph217, label %._crit_edge218, !llvm.loop !75

._crit_edge223:                                   ; preds = %.lr.ph222, %._crit_edge218
  %190 = tail call noundef ptr @_ZN16b2GrowableBufferI14b2ParticlePairE8RemoveIfIPFbRKS0_EEEPS0_T_(ptr noundef nonnull align 8 dereferenceable(24) %179, ptr noundef nonnull @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test13IsPairInvalidERK14b2ParticlePair)
  %191 = getelementptr inbounds i8, ptr %0, i64 440
  %192 = tail call noundef i32 @_ZNK16b2GrowableBufferI15b2ParticleTriadE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %191)
  %193 = icmp sgt i32 %192, 0
  br i1 %193, label %.lr.ph227, label %._crit_edge228

.lr.ph222:                                        ; preds = %._crit_edge218, %.lr.ph222
  %.0159220 = phi i32 [ %204, %.lr.ph222 ], [ 0, %._crit_edge218 ]
  %194 = tail call noundef nonnull align 4 dereferenceable(20) ptr @_ZN16b2GrowableBufferI14b2ParticlePairEixEi(ptr noundef nonnull align 8 dereferenceable(24) %179, i32 noundef %.0159220)
  %195 = load i32, ptr %194, align 4, !tbaa !76
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds i32, ptr %8, i64 %196
  %198 = load i32, ptr %197, align 4, !tbaa !35
  store i32 %198, ptr %194, align 4, !tbaa !76
  %199 = getelementptr inbounds i8, ptr %194, i64 4
  %200 = load i32, ptr %199, align 4, !tbaa !78
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds i32, ptr %8, i64 %201
  %203 = load i32, ptr %202, align 4, !tbaa !35
  store i32 %203, ptr %199, align 4, !tbaa !78
  %204 = add nuw nsw i32 %.0159220, 1
  %205 = tail call noundef i32 @_ZNK16b2GrowableBufferI14b2ParticlePairE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %179)
  %206 = icmp slt i32 %204, %205
  br i1 %206, label %.lr.ph222, label %._crit_edge223, !llvm.loop !79

._crit_edge228:                                   ; preds = %.lr.ph227, %._crit_edge223
  %207 = tail call noundef ptr @_ZN16b2GrowableBufferI15b2ParticleTriadE8RemoveIfIPFbRKS0_EEEPS0_T_(ptr noundef nonnull align 8 dereferenceable(24) %191, ptr noundef nonnull @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test14IsTriadInvalidERK15b2ParticleTriad)
  %208 = getelementptr inbounds i8, ptr %0, i64 480
  %209 = load ptr, ptr %208, align 8, !tbaa !80
  %.not = icmp ne ptr %209, null
  %210 = load i32, ptr %5, align 4
  %211 = icmp sgt i32 %210, 0
  %or.cond254 = select i1 %.not, i1 %211, i1 false
  br i1 %or.cond254, label %.lr.ph232, label %.loopexit

.lr.ph227:                                        ; preds = %._crit_edge223, %.lr.ph227
  %.0157225 = phi i32 [ %227, %.lr.ph227 ], [ 0, %._crit_edge223 ]
  %212 = tail call noundef nonnull align 4 dereferenceable(60) ptr @_ZN16b2GrowableBufferI15b2ParticleTriadEixEi(ptr noundef nonnull align 8 dereferenceable(24) %191, i32 noundef %.0157225)
  %213 = load i32, ptr %212, align 4, !tbaa !81
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds i32, ptr %8, i64 %214
  %216 = load i32, ptr %215, align 4, !tbaa !35
  store i32 %216, ptr %212, align 4, !tbaa !81
  %217 = getelementptr inbounds i8, ptr %212, i64 4
  %218 = load i32, ptr %217, align 4, !tbaa !83
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds i32, ptr %8, i64 %219
  %221 = load i32, ptr %220, align 4, !tbaa !35
  store i32 %221, ptr %217, align 4, !tbaa !83
  %222 = getelementptr inbounds i8, ptr %212, i64 8
  %223 = load i32, ptr %222, align 4, !tbaa !84
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds i32, ptr %8, i64 %224
  %226 = load i32, ptr %225, align 4, !tbaa !35
  store i32 %226, ptr %222, align 4, !tbaa !84
  %227 = add nuw nsw i32 %.0157225, 1
  %228 = tail call noundef i32 @_ZNK16b2GrowableBufferI15b2ParticleTriadE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %191)
  %229 = icmp slt i32 %227, %228
  br i1 %229, label %.lr.ph227, label %._crit_edge228, !llvm.loop !85

.lr.ph232:                                        ; preds = %._crit_edge228, %240
  %230 = phi i32 [ %241, %240 ], [ %210, %._crit_edge228 ]
  %indvars.iv259 = phi i64 [ %indvars.iv.next260, %240 ], [ 0, %._crit_edge228 ]
  %.0154230 = phi i32 [ %.1155, %240 ], [ 0, %._crit_edge228 ]
  %231 = getelementptr inbounds i32, ptr %209, i64 %indvars.iv259
  %232 = load i32, ptr %231, align 4, !tbaa !35
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds i32, ptr %8, i64 %233
  %235 = load i32, ptr %234, align 4, !tbaa !35
  %.not181 = icmp eq i32 %235, -1
  br i1 %.not181, label %240, label %236

236:                                              ; preds = %.lr.ph232
  %237 = add nsw i32 %.0154230, 1
  %238 = sext i32 %.0154230 to i64
  %239 = getelementptr inbounds i32, ptr %209, i64 %238
  store i32 %235, ptr %239, align 4, !tbaa !35
  %.pre265 = load i32, ptr %5, align 4, !tbaa !33
  br label %240

240:                                              ; preds = %236, %.lr.ph232
  %241 = phi i32 [ %.pre265, %236 ], [ %230, %.lr.ph232 ]
  %.1155 = phi i32 [ %237, %236 ], [ %.0154230, %.lr.ph232 ]
  %indvars.iv.next260 = add nuw nsw i64 %indvars.iv259, 1
  %242 = sext i32 %241 to i64
  %243 = icmp slt i64 %indvars.iv.next260, %242
  br i1 %243, label %.lr.ph232, label %.loopexit, !llvm.loop !86

.loopexit:                                        ; preds = %240, %._crit_edge228
  %244 = getelementptr inbounds i8, ptr %0, i64 512
  %245 = load ptr, ptr %244, align 8, !tbaa !87
  %.not176243 = icmp eq ptr %245, null
  br i1 %.not176243, label %._crit_edge247, label %.lr.ph246.preheader

.lr.ph246.preheader:                              ; preds = %.loopexit
  %246 = icmp slt i32 %.0.lcssa, 0
  br label %.lr.ph246

._crit_edge247:                                   ; preds = %284, %.loopexit
  store i32 %.0.lcssa, ptr %5, align 4, !tbaa !33
  %247 = load ptr, ptr %2, align 8, !tbaa !5
  %248 = getelementptr inbounds i8, ptr %247, i64 128
  tail call void @_ZN16b2StackAllocator4FreeEPv(ptr noundef nonnull align 8 dereferenceable(102932) %248, ptr noundef %8)
  %249 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %.0142.lcssa, ptr %249, align 8, !tbaa !88
  %250 = getelementptr inbounds i8, ptr %0, i64 12
  store i8 0, ptr %250, align 4, !tbaa !89
  %251 = load ptr, ptr %244, align 8, !tbaa !87
  %.not177248 = icmp eq ptr %251, null
  br i1 %.not177248, label %._crit_edge252, label %.lr.ph251

.lr.ph246:                                        ; preds = %.lr.ph246.preheader, %284
  %.0151244 = phi ptr [ %285, %284 ], [ %245, %.lr.ph246.preheader ]
  %252 = getelementptr inbounds i8, ptr %.0151244, i64 8
  %253 = load i32, ptr %252, align 8, !tbaa !90
  %254 = getelementptr inbounds i8, ptr %.0151244, i64 12
  %255 = load i32, ptr %254, align 4, !tbaa !94
  %256 = icmp slt i32 %253, %255
  br i1 %256, label %.lr.ph238.preheader, label %._crit_edge239.thread

.lr.ph238.preheader:                              ; preds = %.lr.ph246
  %257 = sext i32 %253 to i64
  br label %.lr.ph238

._crit_edge239:                                   ; preds = %267
  %258 = icmp slt i32 %.1150, %.1148
  br i1 %258, label %271, label %278

._crit_edge239.thread:                            ; preds = %.lr.ph246
  br i1 %246, label %.thread, label %278

.thread:                                          ; preds = %._crit_edge239.thread
  store i32 %.0.lcssa, ptr %252, align 8, !tbaa !90
  store i32 0, ptr %254, align 4, !tbaa !94
  br label %284

.lr.ph238:                                        ; preds = %.lr.ph238.preheader, %267
  %259 = phi i32 [ %255, %.lr.ph238.preheader ], [ %268, %267 ]
  %indvars.iv262 = phi i64 [ %257, %.lr.ph238.preheader ], [ %indvars.iv.next263, %267 ]
  %.0145235 = phi i1 [ false, %.lr.ph238.preheader ], [ %.1146, %267 ]
  %.0147234 = phi i32 [ 0, %.lr.ph238.preheader ], [ %.1148, %267 ]
  %.0149233 = phi i32 [ %.0.lcssa, %.lr.ph238.preheader ], [ %.1150, %267 ]
  %260 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv262
  %261 = load i32, ptr %260, align 4, !tbaa !35
  %262 = icmp sgt i32 %261, -1
  br i1 %262, label %263, label %267

263:                                              ; preds = %.lr.ph238
  %264 = tail call noundef i32 @_Z5b2MinIiET_S0_S0_(i32 noundef %.0149233, i32 noundef %261)
  %265 = add nuw nsw i32 %261, 1
  %266 = tail call noundef i32 @_Z5b2MaxIiET_S0_S0_(i32 noundef %.0147234, i32 noundef %265)
  %.pre266 = load i32, ptr %254, align 4, !tbaa !94
  br label %267

267:                                              ; preds = %.lr.ph238, %263
  %268 = phi i32 [ %.pre266, %263 ], [ %259, %.lr.ph238 ]
  %.1150 = phi i32 [ %264, %263 ], [ %.0149233, %.lr.ph238 ]
  %.1148 = phi i32 [ %266, %263 ], [ %.0147234, %.lr.ph238 ]
  %.1146 = phi i1 [ %.0145235, %263 ], [ true, %.lr.ph238 ]
  %indvars.iv.next263 = add nsw i64 %indvars.iv262, 1
  %269 = sext i32 %268 to i64
  %270 = icmp slt i64 %indvars.iv.next263, %269
  br i1 %270, label %.lr.ph238, label %._crit_edge239, !llvm.loop !95

271:                                              ; preds = %._crit_edge239
  store i32 %.1150, ptr %252, align 8, !tbaa !90
  store i32 %.1148, ptr %254, align 4, !tbaa !94
  br i1 %.1146, label %272, label %284

272:                                              ; preds = %271
  %273 = getelementptr inbounds i8, ptr %.0151244, i64 16
  %274 = load i32, ptr %273, align 8, !tbaa !96
  %275 = and i32 %274, 1
  %.not180 = icmp eq i32 %275, 0
  br i1 %.not180, label %284, label %276

276:                                              ; preds = %272
  %277 = or i32 %274, 16
  tail call void @_ZN16b2ParticleSystem13SetGroupFlagsEP15b2ParticleGroupj(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull %.0151244, i32 noundef %277)
  br label %284

278:                                              ; preds = %._crit_edge239.thread, %._crit_edge239
  store i32 0, ptr %252, align 8, !tbaa !90
  store i32 0, ptr %254, align 4, !tbaa !94
  %279 = getelementptr inbounds i8, ptr %.0151244, i64 16
  %280 = load i32, ptr %279, align 8, !tbaa !96
  %281 = and i32 %280, 4
  %.not179 = icmp eq i32 %281, 0
  br i1 %.not179, label %282, label %284

282:                                              ; preds = %278
  %283 = or i32 %280, 8
  tail call void @_ZN16b2ParticleSystem13SetGroupFlagsEP15b2ParticleGroupj(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull %.0151244, i32 noundef %283)
  br label %284

284:                                              ; preds = %.thread, %278, %282, %271, %276, %272
  %285 = tail call noundef ptr @_ZN15b2ParticleGroup7GetNextEv(ptr noundef nonnull align 8 dereferenceable(96) %.0151244)
  %.not176 = icmp eq ptr %285, null
  br i1 %.not176, label %._crit_edge247, label %.lr.ph246, !llvm.loop !97

._crit_edge252:                                   ; preds = %291, %._crit_edge247
  ret void

.lr.ph251:                                        ; preds = %._crit_edge247, %291
  %.0141249 = phi ptr [ %286, %291 ], [ %251, %._crit_edge247 ]
  %286 = tail call noundef ptr @_ZN15b2ParticleGroup7GetNextEv(ptr noundef nonnull align 8 dereferenceable(96) %.0141249)
  %287 = getelementptr inbounds i8, ptr %.0141249, i64 16
  %288 = load i32, ptr %287, align 8, !tbaa !96
  %289 = and i32 %288, 8
  %.not178 = icmp eq i32 %289, 0
  br i1 %.not178, label %291, label %290

290:                                              ; preds = %.lr.ph251
  tail call void @_ZN16b2ParticleSystem20DestroyParticleGroupEP15b2ParticleGroup(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull %.0141249)
  br label %291

291:                                              ; preds = %290, %.lr.ph251
  %.not177 = icmp eq ptr %286, null
  br i1 %.not177, label %._crit_edge252, label %.lr.ph251, !llvm.loop !98
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN16b2ParticleHandle8SetIndexEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) local_unnamed_addr #1 align 2

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

declare noundef ptr @_ZN16b2StackAllocator8AllocateEi(ptr noundef nonnull align 8 dereferenceable(102932), i32 noundef) local_unnamed_addr #2

declare void @_ZN16b2StackAllocator4FreeEPv(ptr noundef nonnull align 8 dereferenceable(102932), ptr noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2GrowableBufferI14b2ParticlePairE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 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 #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(60) ptr @_ZN16b2GrowableBufferI15b2ParticleTriadEixEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1 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 #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16b2GrowableBufferI21b2ParticleBodyContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 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 #1 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test14IsProxyInvalidERKNS_5ProxyE(ptr noundef nonnull align 4 dereferenceable(8)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test16IsContactInvalidERK17b2ParticleContact(ptr noundef nonnull align 4 dereferenceable(24)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test20IsBodyContactInvalidERK21b2ParticleBodyContact(ptr noundef nonnull align 8 dereferenceable(40)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test13IsPairInvalidERK14b2ParticlePair(ptr noundef nonnull align 4 dereferenceable(20)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZZN16b2ParticleSystem11SolveZombieEvEN4Test14IsTriadInvalidERK15b2ParticleTriad(ptr noundef nonnull align 4 dereferenceable(60)) #1 align 2

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

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

attributes #0 = { 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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" }

!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, !16, i64 608}
!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 = !{!6, !10, i64 44}
!34 = !{!6, !16, i64 128}
!35 = !{!10, !10, i64 0}
!36 = !{!37, !16, i64 103304}
!37 = !{!"_ZTS7b2World", !38, i64 0, !39, i64 128, !40, i64 103064, !16, i64 103248, !16, i64 103256, !16, i64 103264, !16, i64 103272, !10, i64 103280, !10, i64 103284, !44, i64 103288, !7, i64 103296, !16, i64 103304, !16, i64 103312, !11, i64 103320, !7, i64 103324, !7, i64 103325, !7, i64 103326, !7, i64 103327, !7, i64 103328, !7, i64 103329, !7, i64 103330, !7, i64 103331, !46, i64 103332}
!38 = !{!"_ZTS16b2BlockAllocator", !16, i64 0, !10, i64 8, !10, i64 12, !8, i64 16}
!39 = !{!"_ZTS16b2StackAllocator", !8, i64 0, !10, i64 102400, !10, i64 102404, !10, i64 102408, !8, i64 102416, !10, i64 102928}
!40 = !{!"_ZTS16b2ContactManager", !41, i64 0, !10, i64 144, !16, i64 152, !16, i64 160, !16, i64 168, !16, i64 176}
!41 = !{!"_ZTS12b2BroadPhase", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !42, i64 32, !16, i64 80, !16, i64 88, !16, i64 96, !10, i64 104, !10, i64 108, !45, i64 112, !10, i64 128, !10, i64 132, !7, i64 136}
!42 = !{!"_ZTS10b2TreeNode", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !43, i64 32}
!43 = !{!"_ZTS6b2AABB", !44, i64 0, !44, i64 8}
!44 = !{!"_ZTS6b2Vec2", !11, i64 0, !11, i64 4}
!45 = !{!"_ZTS14b2IntHashTable", !16, i64 0, !10, i64 8}
!46 = !{!"_ZTS9b2Profile", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16}
!47 = !{!48, !48, i64 0}
!48 = !{!"vtable pointer", !9, i64 0}
!49 = !{!6, !16, i64 112}
!50 = !{!16, !16, i64 0}
!51 = !{!6, !16, i64 272}
!52 = !{!6, !16, i64 288}
!53 = !{!6, !16, i64 304}
!54 = !{!6, !16, i64 144}
!55 = !{!6, !16, i64 160}
!56 = !{!6, !16, i64 240}
!57 = !{!6, !7, i64 21}
!58 = !{i8 0, i8 2}
!59 = !{}
!60 = !{!6, !16, i64 176}
!61 = !{!6, !16, i64 192}
!62 = !{!11, !11, i64 0}
!63 = !{!6, !16, i64 216}
!64 = !{!6, !16, i64 224}
!65 = !{!6, !16, i64 248}
!66 = !{!6, !16, i64 464}
!67 = distinct !{!67, !68}
!68 = !{!"llvm.loop.mustprogress"}
!69 = !{!70, !10, i64 0}
!70 = !{!"_ZTSN16b2ParticleSystem5ProxyE", !10, i64 0, !10, i64 4}
!71 = distinct !{!71, !68}
!72 = distinct !{!72, !68}
!73 = !{!74, !10, i64 0}
!74 = !{!"_ZTS21b2ParticleBodyContact", !10, i64 0, !16, i64 8, !16, i64 16, !11, i64 24, !44, i64 28, !11, i64 36}
!75 = distinct !{!75, !68}
!76 = !{!77, !10, i64 0}
!77 = !{!"_ZTS14b2ParticlePair", !10, i64 0, !10, i64 4, !10, i64 8, !11, i64 12, !11, i64 16}
!78 = !{!77, !10, i64 4}
!79 = distinct !{!79, !68}
!80 = !{!6, !16, i64 480}
!81 = !{!82, !10, i64 0}
!82 = !{!"_ZTS15b2ParticleTriad", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !11, i64 16, !44, i64 20, !44, i64 28, !44, i64 36, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56}
!83 = !{!82, !10, i64 4}
!84 = !{!82, !10, i64 8}
!85 = distinct !{!85, !68}
!86 = distinct !{!86, !68}
!87 = !{!6, !16, i64 512}
!88 = !{!6, !10, i64 8}
!89 = !{!6, !7, i64 12}
!90 = !{!91, !10, i64 8}
!91 = !{!"_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, !44, i64 52, !44, i64 60, !11, i64 68, !92, i64 72, !16, i64 88}
!92 = !{!"_ZTS11b2Transform", !44, i64 0, !93, i64 8}
!93 = !{!"_ZTS5b2Rot", !11, i64 0, !11, i64 4}
!94 = !{!91, !10, i64 12}
!95 = distinct !{!95, !68}
!96 = !{!91, !10, i64 16}
!97 = distinct !{!97, !68}
!98 = distinct !{!98, !68}


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