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

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

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

; 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 @_ZN16b2ParticleSystem11SolveZombieEv(ptr noundef nonnull align 8 dereferenceable(632)) #2 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem5SolveERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %1) #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.b2TimeStep, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.b2Vec2, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %8 = load ptr, ptr %3, align 8
  %9 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 12
  %10 = load i32, ptr %9, align 4, !tbaa !9
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %12, label %13

12:                                               ; preds = %2
  br label %200

13:                                               ; preds = %2
  %14 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 39
  %15 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %14, i32 0, i32 0
  %16 = load ptr, ptr %15, align 8, !tbaa !34
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %20

18:                                               ; preds = %13
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN16b2ParticleSystem14SolveLifetimesERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %19)
  br label %20

20:                                               ; preds = %18, %13
  %21 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 2
  %22 = load i32, ptr %21, align 8, !tbaa !35
  %23 = and i32 %22, 2
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %26

25:                                               ; preds = %20
  call void @_ZN16b2ParticleSystem11SolveZombieEv(ptr noundef nonnull align 8 dereferenceable(632) %8)
  br label %26

26:                                               ; preds = %25, %20
  %27 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 3
  %28 = load i8, ptr %27, align 4, !tbaa !36, !range !37, !noundef !38
  %29 = trunc i8 %28 to i1
  br i1 %29, label %30, label %31

30:                                               ; preds = %26
  call void @_ZN16b2ParticleSystem22UpdateAllParticleFlagsEv(ptr noundef nonnull align 8 dereferenceable(632) %8)
  br label %31

31:                                               ; preds = %30, %26
  %32 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 5
  %33 = load i8, ptr %32, align 4, !tbaa !39, !range !37, !noundef !38
  %34 = trunc i8 %33 to i1
  br i1 %34, label %35, label %36

35:                                               ; preds = %31
  call void @_ZN16b2ParticleSystem19UpdateAllGroupFlagsEv(ptr noundef nonnull align 8 dereferenceable(632) %8)
  br label %36

36:                                               ; preds = %35, %31
  %37 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 0
  %38 = load i8, ptr %37, align 8, !tbaa !40, !range !37, !noundef !38
  %39 = trunc i8 %38 to i1
  br i1 %39, label %40, label %41

40:                                               ; preds = %36
  br label %200

41:                                               ; preds = %36
  %42 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 7
  store i32 0, ptr %42, align 8, !tbaa !41
  br label %43

43:                                               ; preds = %196, %41
  %44 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 7
  %45 = load i32, ptr %44, align 8, !tbaa !41
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.b2TimeStep, ptr %46, i32 0, i32 5
  %48 = load i32, ptr %47, align 4, !tbaa !42
  %49 = icmp slt i32 %45, %48
  br i1 %49, label %50, label %200

50:                                               ; preds = %43
  %51 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 1
  %52 = load i32, ptr %51, align 4, !tbaa !44
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %51, align 4, !tbaa !44
  call void @llvm.lifetime.start.p0(i64 28, ptr %5) #6
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %54, i64 28, i1 false), !tbaa.struct !45
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.b2TimeStep, ptr %55, i32 0, i32 5
  %57 = load i32, ptr %56, align 4, !tbaa !42
  %58 = sitofp i32 %57 to float
  %59 = getelementptr inbounds %struct.b2TimeStep, ptr %5, i32 0, i32 0
  %60 = load float, ptr %59, align 4, !tbaa !49
  %61 = fdiv float %60, %58
  store float %61, ptr %59, align 4, !tbaa !49
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.b2TimeStep, ptr %62, i32 0, i32 5
  %64 = load i32, ptr %63, align 4, !tbaa !42
  %65 = sitofp i32 %64 to float
  %66 = getelementptr inbounds %struct.b2TimeStep, ptr %5, i32 0, i32 1
  %67 = load float, ptr %66, align 4, !tbaa !50
  %68 = fmul float %67, %65
  store float %68, ptr %66, align 4, !tbaa !50
  call void @_ZN16b2ParticleSystem14UpdateContactsEb(ptr noundef nonnull align 8 dereferenceable(632) %8, i1 noundef zeroext false)
  call void @_ZN16b2ParticleSystem18UpdateBodyContactsEv(ptr noundef nonnull align 8 dereferenceable(632) %8)
  call void @_ZN16b2ParticleSystem13ComputeWeightEv(ptr noundef nonnull align 8 dereferenceable(632) %8)
  %69 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 4
  %70 = load i32, ptr %69, align 8, !tbaa !51
  %71 = and i32 %70, 16
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %50
  call void @_ZN16b2ParticleSystem12ComputeDepthEv(ptr noundef nonnull align 8 dereferenceable(632) %8)
  br label %74

74:                                               ; preds = %73, %50
  %75 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 2
  %76 = load i32, ptr %75, align 8, !tbaa !35
  %77 = and i32 %76, 4096
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %80

79:                                               ; preds = %74
  call void @_ZN16b2ParticleSystem41UpdatePairsAndTriadsWithReactiveParticlesEv(ptr noundef nonnull align 8 dereferenceable(632) %8)
  br label %80

80:                                               ; preds = %79, %74
  %81 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 6
  %82 = load i8, ptr %81, align 1, !tbaa !52, !range !37, !noundef !38
  %83 = trunc i8 %82 to i1
  br i1 %83, label %84, label %85

84:                                               ; preds = %80
  call void @_ZN16b2ParticleSystem10SolveForceERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  br label %85

85:                                               ; preds = %84, %80
  %86 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 2
  %87 = load i32, ptr %86, align 8, !tbaa !35
  %88 = and i32 %87, 32
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %91

90:                                               ; preds = %85
  call void @_ZN16b2ParticleSystem12SolveViscousEv(ptr noundef nonnull align 8 dereferenceable(632) %8)
  br label %91

91:                                               ; preds = %90, %85
  %92 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 2
  %93 = load i32, ptr %92, align 8, !tbaa !35
  %94 = and i32 %93, 8192
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %97

96:                                               ; preds = %91
  call void @_ZN16b2ParticleSystem14SolveRepulsiveERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  br label %97

97:                                               ; preds = %96, %91
  %98 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 2
  %99 = load i32, ptr %98, align 8, !tbaa !35
  %100 = and i32 %99, 64
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %103

102:                                              ; preds = %97
  call void @_ZN16b2ParticleSystem11SolvePowderERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  br label %103

103:                                              ; preds = %102, %97
  %104 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 2
  %105 = load i32, ptr %104, align 8, !tbaa !35
  %106 = and i32 %105, 128
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %109

108:                                              ; preds = %103
  call void @_ZN16b2ParticleSystem12SolveTensileERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  br label %109

109:                                              ; preds = %108, %103
  %110 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 4
  %111 = load i32, ptr %110, align 8, !tbaa !51
  %112 = and i32 %111, 1
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %114, label %115

114:                                              ; preds = %109
  call void @_ZN16b2ParticleSystem10SolveSolidERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  br label %115

115:                                              ; preds = %114, %109
  %116 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 2
  %117 = load i32, ptr %116, align 8, !tbaa !35
  %118 = and i32 %117, 256
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %121

120:                                              ; preds = %115
  call void @_ZN16b2ParticleSystem16SolveColorMixingEv(ptr noundef nonnull align 8 dereferenceable(632) %8)
  br label %121

121:                                              ; preds = %120, %115
  call void @_ZN16b2ParticleSystem12SolveGravityERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  %122 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 2
  %123 = load i32, ptr %122, align 8, !tbaa !35
  %124 = and i32 %123, 2048
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %127

126:                                              ; preds = %121
  call void @_ZN16b2ParticleSystem19SolveStaticPressureERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  br label %127

127:                                              ; preds = %126, %121
  call void @_ZN16b2ParticleSystem13SolvePressureERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  call void @_ZN16b2ParticleSystem12SolveDampingERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  %128 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 2
  %129 = load i32, ptr %128, align 8, !tbaa !35
  %130 = and i32 %129, 2048
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %133

132:                                              ; preds = %127
  call void @_ZN16b2ParticleSystem17SolveExtraDampingEv(ptr noundef nonnull align 8 dereferenceable(632) %8)
  br label %133

133:                                              ; preds = %132, %127
  %134 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 2
  %135 = load i32, ptr %134, align 8, !tbaa !35
  %136 = and i32 %135, 16
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %138, label %139

138:                                              ; preds = %133
  call void @_ZN16b2ParticleSystem12SolveElasticERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  br label %139

139:                                              ; preds = %138, %133
  %140 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 2
  %141 = load i32, ptr %140, align 8, !tbaa !35
  %142 = and i32 %141, 8
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %145

144:                                              ; preds = %139
  call void @_ZN16b2ParticleSystem11SolveSpringERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  br label %145

145:                                              ; preds = %144, %139
  call void @_ZN16b2ParticleSystem13LimitVelocityERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  %146 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 4
  %147 = load i32, ptr %146, align 8, !tbaa !51
  %148 = and i32 %147, 2
  %149 = icmp ne i32 %148, 0
  br i1 %149, label %150, label %151

150:                                              ; preds = %145
  call void @_ZN16b2ParticleSystem17SolveRigidDampingEv(ptr noundef nonnull align 8 dereferenceable(632) %8)
  br label %151

151:                                              ; preds = %150, %145
  %152 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 2
  %153 = load i32, ptr %152, align 8, !tbaa !35
  %154 = and i32 %153, 1024
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %156, label %157

156:                                              ; preds = %151
  call void @_ZN16b2ParticleSystem12SolveBarrierERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  br label %157

157:                                              ; preds = %156, %151
  call void @_ZN16b2ParticleSystem14SolveCollisionERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  %158 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 4
  %159 = load i32, ptr %158, align 8, !tbaa !51
  %160 = and i32 %159, 2
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %162, label %163

162:                                              ; preds = %157
  call void @_ZN16b2ParticleSystem10SolveRigidERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %8, ptr noundef nonnull align 4 dereferenceable(28) %5)
  br label %163

163:                                              ; preds = %162, %157
  %164 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 2
  %165 = load i32, ptr %164, align 8, !tbaa !35
  %166 = and i32 %165, 4
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %168, label %169

168:                                              ; preds = %163
  call void @_ZN16b2ParticleSystem9SolveWallEv(ptr noundef nonnull align 8 dereferenceable(632) %8)
  br label %169

169:                                              ; preds = %168, %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !47
  br label %170

170:                                              ; preds = %192, %169
  %171 = load i32, ptr %6, align 4, !tbaa !47
  %172 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 12
  %173 = load i32, ptr %172, align 4, !tbaa !9
  %174 = icmp slt i32 %171, %173
  br i1 %174, label %176, label %175

175:                                              ; preds = %170
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %195

176:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %177 = getelementptr inbounds %struct.b2TimeStep, ptr %5, i32 0, i32 0
  %178 = load float, ptr %177, align 4, !tbaa !49
  %179 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 18
  %180 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %179, i32 0, i32 0
  %181 = load ptr, ptr %180, align 8, !tbaa !53
  %182 = load i32, ptr %6, align 4, !tbaa !47
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds %struct.b2Vec2, ptr %181, i64 %183
  %185 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %178, ptr noundef nonnull align 4 dereferenceable(8) %184)
  store <2 x float> %185, ptr %7, align 4
  %186 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 17
  %187 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %186, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !54
  %189 = load i32, ptr %6, align 4, !tbaa !47
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds %struct.b2Vec2, ptr %188, i64 %190
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %191, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %192

192:                                              ; preds = %176
  %193 = load i32, ptr %6, align 4, !tbaa !47
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr %6, align 4, !tbaa !47
  br label %170, !llvm.loop !55

195:                                              ; preds = %175
  call void @llvm.lifetime.end.p0(i64 28, ptr %5) #6
  br label %196

196:                                              ; preds = %195
  %197 = getelementptr inbounds %class.b2ParticleSystem, ptr %8, i32 0, i32 7
  %198 = load i32, ptr %197, align 8, !tbaa !41
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %197, align 8, !tbaa !41
  br label %43, !llvm.loop !57

200:                                              ; preds = %43, %40, %12
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN16b2ParticleSystem22UpdateAllParticleFlagsEv(ptr noundef nonnull align 8 dereferenceable(632)) #5 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


; 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.b2TimeStep = type { float, float, float, i32, i32, i32, i8 }
%struct.b2Vec2 = type { float, float }

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

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

; Function Attrs: mustprogress 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 @_ZN16b2ParticleSystem11SolveZombieEv(ptr noundef nonnull align 8 dereferenceable(632)) local_unnamed_addr #2 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem5SolveERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %1) local_unnamed_addr #4 align 2 {
  %3 = alloca %struct.b2TimeStep, align 4
  %4 = alloca %struct.b2Vec2, align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 44
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = icmp eq i32 %6, 0
  br i1 %7, label %.loopexit, label %8

8:                                                ; preds = %2
  %9 = getelementptr inbounds i8, ptr %0, i64 464
  %10 = load ptr, ptr %9, align 8, !tbaa !33
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %12, label %11

11:                                               ; preds = %8
  tail call void @_ZN16b2ParticleSystem14SolveLifetimesERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %1)
  br label %12

12:                                               ; preds = %11, %8
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load i32, ptr %13, align 8, !tbaa !34
  %15 = and i32 %14, 2
  %.not9 = icmp eq i32 %15, 0
  br i1 %.not9, label %17, label %16

16:                                               ; preds = %12
  tail call void @_ZN16b2ParticleSystem11SolveZombieEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  br label %17

17:                                               ; preds = %16, %12
  %18 = getelementptr inbounds i8, ptr %0, i64 12
  %19 = load i8, ptr %18, align 4, !tbaa !35, !range !36, !noundef !37
  %20 = trunc nuw i8 %19 to i1
  br i1 %20, label %21, label %22

21:                                               ; preds = %17
  tail call void @_ZN16b2ParticleSystem22UpdateAllParticleFlagsEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  br label %22

22:                                               ; preds = %21, %17
  %23 = getelementptr inbounds i8, ptr %0, i64 20
  %24 = load i8, ptr %23, align 4, !tbaa !38, !range !36, !noundef !37
  %25 = trunc nuw i8 %24 to i1
  br i1 %25, label %26, label %27

26:                                               ; preds = %22
  tail call void @_ZN16b2ParticleSystem19UpdateAllGroupFlagsEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  br label %27

27:                                               ; preds = %26, %22
  %28 = load i8, ptr %0, align 8, !tbaa !39, !range !36, !noundef !37
  %29 = trunc nuw i8 %28 to i1
  br i1 %29, label %.loopexit, label %30

30:                                               ; preds = %27
  %31 = getelementptr inbounds i8, ptr %0, i64 24
  %32 = getelementptr inbounds i8, ptr %1, i64 20
  store i32 0, ptr %31, align 8, !tbaa !40
  %33 = load i32, ptr %32, align 4, !tbaa !41
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph28, label %.loopexit

.lr.ph28:                                         ; preds = %30
  %35 = getelementptr inbounds i8, ptr %0, i64 4
  %36 = getelementptr inbounds i8, ptr %3, i64 4
  %37 = getelementptr inbounds i8, ptr %0, i64 16
  %38 = getelementptr inbounds i8, ptr %0, i64 21
  %39 = getelementptr inbounds i8, ptr %0, i64 160
  %40 = getelementptr inbounds i8, ptr %0, i64 144
  br label %41

41:                                               ; preds = %.lr.ph28, %._crit_edge
  %42 = phi i32 [ %33, %.lr.ph28 ], [ %122, %._crit_edge ]
  %43 = load i32, ptr %35, align 4, !tbaa !43
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %35, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %3) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(28) %3, ptr noundef nonnull align 4 dereferenceable(28) %1, i64 28, i1 false), !tbaa.struct !44
  %45 = sitofp i32 %42 to float
  %46 = load float, ptr %3, align 4, !tbaa !48
  %47 = fdiv float %46, %45
  store float %47, ptr %3, align 4, !tbaa !48
  %48 = load float, ptr %36, align 4, !tbaa !49
  %49 = fmul float %48, %45
  store float %49, ptr %36, align 4, !tbaa !49
  call void @_ZN16b2ParticleSystem14UpdateContactsEb(ptr noundef nonnull align 8 dereferenceable(632) %0, i1 noundef zeroext false)
  call void @_ZN16b2ParticleSystem18UpdateBodyContactsEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  call void @_ZN16b2ParticleSystem13ComputeWeightEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  %50 = load i32, ptr %37, align 8, !tbaa !50
  %51 = and i32 %50, 16
  %.not10 = icmp eq i32 %51, 0
  br i1 %.not10, label %53, label %52

52:                                               ; preds = %41
  call void @_ZN16b2ParticleSystem12ComputeDepthEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  br label %53

53:                                               ; preds = %52, %41
  %54 = load i32, ptr %13, align 8, !tbaa !34
  %55 = and i32 %54, 4096
  %.not11 = icmp eq i32 %55, 0
  br i1 %.not11, label %57, label %56

56:                                               ; preds = %53
  call void @_ZN16b2ParticleSystem41UpdatePairsAndTriadsWithReactiveParticlesEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  br label %57

57:                                               ; preds = %56, %53
  %58 = load i8, ptr %38, align 1, !tbaa !51, !range !36, !noundef !37
  %59 = trunc nuw i8 %58 to i1
  br i1 %59, label %60, label %61

60:                                               ; preds = %57
  call void @_ZN16b2ParticleSystem10SolveForceERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  br label %61

61:                                               ; preds = %60, %57
  %62 = load i32, ptr %13, align 8, !tbaa !34
  %63 = and i32 %62, 32
  %.not12 = icmp eq i32 %63, 0
  br i1 %.not12, label %65, label %64

64:                                               ; preds = %61
  call void @_ZN16b2ParticleSystem12SolveViscousEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  %.pre = load i32, ptr %13, align 8, !tbaa !34
  br label %65

65:                                               ; preds = %64, %61
  %66 = phi i32 [ %.pre, %64 ], [ %62, %61 ]
  %67 = and i32 %66, 8192
  %.not13 = icmp eq i32 %67, 0
  br i1 %.not13, label %69, label %68

68:                                               ; preds = %65
  call void @_ZN16b2ParticleSystem14SolveRepulsiveERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  %.pre30 = load i32, ptr %13, align 8, !tbaa !34
  br label %69

69:                                               ; preds = %68, %65
  %70 = phi i32 [ %.pre30, %68 ], [ %66, %65 ]
  %71 = and i32 %70, 64
  %.not14 = icmp eq i32 %71, 0
  br i1 %.not14, label %73, label %72

72:                                               ; preds = %69
  call void @_ZN16b2ParticleSystem11SolvePowderERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  %.pre31 = load i32, ptr %13, align 8, !tbaa !34
  br label %73

73:                                               ; preds = %72, %69
  %74 = phi i32 [ %.pre31, %72 ], [ %70, %69 ]
  %75 = and i32 %74, 128
  %.not15 = icmp eq i32 %75, 0
  br i1 %.not15, label %77, label %76

76:                                               ; preds = %73
  call void @_ZN16b2ParticleSystem12SolveTensileERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  br label %77

77:                                               ; preds = %76, %73
  %78 = load i32, ptr %37, align 8, !tbaa !50
  %79 = and i32 %78, 1
  %.not16 = icmp eq i32 %79, 0
  br i1 %.not16, label %81, label %80

80:                                               ; preds = %77
  call void @_ZN16b2ParticleSystem10SolveSolidERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  br label %81

81:                                               ; preds = %80, %77
  %82 = load i32, ptr %13, align 8, !tbaa !34
  %83 = and i32 %82, 256
  %.not17 = icmp eq i32 %83, 0
  br i1 %.not17, label %85, label %84

84:                                               ; preds = %81
  call void @_ZN16b2ParticleSystem16SolveColorMixingEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  br label %85

85:                                               ; preds = %84, %81
  call void @_ZN16b2ParticleSystem12SolveGravityERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  %86 = load i32, ptr %13, align 8, !tbaa !34
  %87 = and i32 %86, 2048
  %.not18 = icmp eq i32 %87, 0
  br i1 %.not18, label %89, label %88

88:                                               ; preds = %85
  call void @_ZN16b2ParticleSystem19SolveStaticPressureERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  br label %89

89:                                               ; preds = %88, %85
  call void @_ZN16b2ParticleSystem13SolvePressureERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  call void @_ZN16b2ParticleSystem12SolveDampingERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  %90 = load i32, ptr %13, align 8, !tbaa !34
  %91 = and i32 %90, 2048
  %.not19 = icmp eq i32 %91, 0
  br i1 %.not19, label %93, label %92

92:                                               ; preds = %89
  call void @_ZN16b2ParticleSystem17SolveExtraDampingEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  %.pre32 = load i32, ptr %13, align 8, !tbaa !34
  br label %93

93:                                               ; preds = %92, %89
  %94 = phi i32 [ %.pre32, %92 ], [ %90, %89 ]
  %95 = and i32 %94, 16
  %.not20 = icmp eq i32 %95, 0
  br i1 %.not20, label %97, label %96

96:                                               ; preds = %93
  call void @_ZN16b2ParticleSystem12SolveElasticERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  %.pre33 = load i32, ptr %13, align 8, !tbaa !34
  br label %97

97:                                               ; preds = %96, %93
  %98 = phi i32 [ %.pre33, %96 ], [ %94, %93 ]
  %99 = and i32 %98, 8
  %.not21 = icmp eq i32 %99, 0
  br i1 %.not21, label %101, label %100

100:                                              ; preds = %97
  call void @_ZN16b2ParticleSystem11SolveSpringERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  br label %101

101:                                              ; preds = %100, %97
  call void @_ZN16b2ParticleSystem13LimitVelocityERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  %102 = load i32, ptr %37, align 8, !tbaa !50
  %103 = and i32 %102, 2
  %.not22 = icmp eq i32 %103, 0
  br i1 %.not22, label %105, label %104

104:                                              ; preds = %101
  call void @_ZN16b2ParticleSystem17SolveRigidDampingEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  br label %105

105:                                              ; preds = %104, %101
  %106 = load i32, ptr %13, align 8, !tbaa !34
  %107 = and i32 %106, 1024
  %.not23 = icmp eq i32 %107, 0
  br i1 %.not23, label %109, label %108

108:                                              ; preds = %105
  call void @_ZN16b2ParticleSystem12SolveBarrierERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  br label %109

109:                                              ; preds = %108, %105
  call void @_ZN16b2ParticleSystem14SolveCollisionERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  %110 = load i32, ptr %37, align 8, !tbaa !50
  %111 = and i32 %110, 2
  %.not24 = icmp eq i32 %111, 0
  br i1 %.not24, label %113, label %112

112:                                              ; preds = %109
  call void @_ZN16b2ParticleSystem10SolveRigidERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %3)
  br label %113

113:                                              ; preds = %112, %109
  %114 = load i32, ptr %13, align 8, !tbaa !34
  %115 = and i32 %114, 4
  %.not25 = icmp eq i32 %115, 0
  br i1 %.not25, label %117, label %116

116:                                              ; preds = %113
  call void @_ZN16b2ParticleSystem9SolveWallEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  br label %117

117:                                              ; preds = %116, %113
  %118 = load i32, ptr %5, align 4, !tbaa !5
  %119 = icmp sgt i32 %118, 0
  br i1 %119, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %117
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %3) #6
  %120 = load i32, ptr %31, align 8, !tbaa !40
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %31, align 8, !tbaa !40
  %122 = load i32, ptr %32, align 4, !tbaa !41
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %41, label %.loopexit, !llvm.loop !52

.lr.ph:                                           ; preds = %117, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %117 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %124 = load float, ptr %3, align 4, !tbaa !48
  %125 = load ptr, ptr %39, align 8, !tbaa !54
  %126 = getelementptr inbounds %struct.b2Vec2, ptr %125, i64 %indvars.iv
  %127 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %124, ptr noundef nonnull align 4 dereferenceable(8) %126)
  store <2 x float> %127, ptr %4, align 8
  %128 = load ptr, ptr %40, align 8, !tbaa !55
  %129 = getelementptr inbounds %struct.b2Vec2, ptr %128, i64 %indvars.iv
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %129, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %130 = load i32, ptr %5, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = icmp slt i64 %indvars.iv.next, %131
  br i1 %132, label %.lr.ph, label %._crit_edge, !llvm.loop !56

.loopexit:                                        ; preds = %._crit_edge, %30, %27, %2
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN16b2ParticleSystem22UpdateAllParticleFlagsEv(ptr noundef nonnull align 8 dereferenceable(632)) local_unnamed_addr #5 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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