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

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

@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._ZN16b2ParticleSystem12ComputeDepthEv = external hidden unnamed_addr constant [38 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16b2ParticleSystem13SetGroupFlagsEP15b2ParticleGroupj(ptr noundef nonnull align 8 dereferenceable(632), ptr noundef, i32 noundef) #3 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)) #5 align 2

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

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

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

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

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

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

57:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %58 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 35
  %59 = load i32, ptr %5, align 4, !tbaa !34
  %60 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %58, i32 noundef %59)
  store ptr %60, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %61)
  store i32 %62, ptr %7, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %63)
  store i32 %64, ptr %8, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %65 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 26
  %66 = load ptr, ptr %65, align 8, !tbaa !35
  %67 = load i32, ptr %7, align 4, !tbaa !34
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds ptr, ptr %66, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  store ptr %70, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %71 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 26
  %72 = load ptr, ptr %71, align 8, !tbaa !35
  %73 = load i32, ptr %8, align 4, !tbaa !34
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds ptr, ptr %72, i64 %74
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  store ptr %76, ptr %10, align 8, !tbaa !5
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %96

79:                                               ; preds = %57
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = icmp eq ptr %80, %81
  br i1 %82, label %83, label %96

83:                                               ; preds = %79
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = getelementptr inbounds %class.b2ParticleGroup, ptr %84, i32 0, i32 3
  %86 = load i32, ptr %85, align 8, !tbaa !36
  %87 = and i32 %86, 16
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %96

89:                                               ; preds = %83
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = load i32, ptr %4, align 4, !tbaa !34
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %4, align 4, !tbaa !34
  %94 = sext i32 %92 to i64
  %95 = getelementptr inbounds %struct.b2ParticleContact, ptr %91, i64 %94
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %95, ptr align 4 %90, i64 24, i1 false), !tbaa.struct !41
  br label %96

96:                                               ; preds = %89, %83, %79, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %5, align 4, !tbaa !34
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %5, align 4, !tbaa !34
  br label %51, !llvm.loop !43

100:                                              ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %101 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 46
  %102 = load ptr, ptr %101, align 8, !tbaa !9
  %103 = getelementptr inbounds %class.b2World, ptr %102, i32 0, i32 1
  %104 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 43
  %105 = load i32, ptr %104, align 4, !tbaa !45
  %106 = sext i32 %105 to i64
  %107 = mul i64 8, %106
  %108 = trunc i64 %107 to i32
  %109 = call noundef ptr @_ZN16b2StackAllocator8AllocateEi(ptr noundef nonnull align 8 dereferenceable(102932) %103, i32 noundef %108)
  store ptr %109, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %110 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 44
  %111 = load ptr, ptr %110, align 8, !tbaa !46
  store ptr %111, ptr %13, align 8, !tbaa !5
  br label %112

112:                                              ; preds = %155, %100
  %113 = load ptr, ptr %13, align 8, !tbaa !5
  %114 = icmp ne ptr %113, null
  br i1 %114, label %116, label %115

115:                                              ; preds = %112
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %158

116:                                              ; preds = %112
  %117 = load ptr, ptr %13, align 8, !tbaa !5
  %118 = getelementptr inbounds %class.b2ParticleGroup, ptr %117, i32 0, i32 3
  %119 = load i32, ptr %118, align 8, !tbaa !36
  %120 = and i32 %119, 16
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %154

122:                                              ; preds = %116
  %123 = load ptr, ptr %13, align 8, !tbaa !5
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = load i32, ptr %12, align 4, !tbaa !34
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %12, align 4, !tbaa !34
  %127 = sext i32 %125 to i64
  %128 = getelementptr inbounds ptr, ptr %124, i64 %127
  store ptr %123, ptr %128, align 8, !tbaa !5
  %129 = load ptr, ptr %13, align 8, !tbaa !5
  %130 = load ptr, ptr %13, align 8, !tbaa !5
  %131 = getelementptr inbounds %class.b2ParticleGroup, ptr %130, i32 0, i32 3
  %132 = load i32, ptr %131, align 8, !tbaa !36
  %133 = and i32 %132, -17
  call void @_ZN16b2ParticleSystem13SetGroupFlagsEP15b2ParticleGroupj(ptr noundef nonnull align 8 dereferenceable(632) %41, ptr noundef %129, i32 noundef %133)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %134 = load ptr, ptr %13, align 8, !tbaa !5
  %135 = getelementptr inbounds %class.b2ParticleGroup, ptr %134, i32 0, i32 1
  %136 = load i32, ptr %135, align 8, !tbaa !47
  store i32 %136, ptr %15, align 4, !tbaa !34
  br label %137

137:                                              ; preds = %150, %122
  %138 = load i32, ptr %15, align 4, !tbaa !34
  %139 = load ptr, ptr %13, align 8, !tbaa !5
  %140 = getelementptr inbounds %class.b2ParticleGroup, ptr %139, i32 0, i32 2
  %141 = load i32, ptr %140, align 4, !tbaa !48
  %142 = icmp slt i32 %138, %141
  br i1 %142, label %144, label %143

143:                                              ; preds = %137
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %153

144:                                              ; preds = %137
  %145 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 22
  %146 = load ptr, ptr %145, align 8, !tbaa !49
  %147 = load i32, ptr %15, align 4, !tbaa !34
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds float, ptr %146, i64 %148
  store float 0.000000e+00, ptr %149, align 4, !tbaa !42
  br label %150

150:                                              ; preds = %144
  %151 = load i32, ptr %15, align 4, !tbaa !34
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %15, align 4, !tbaa !34
  br label %137, !llvm.loop !50

153:                                              ; preds = %143
  br label %154

154:                                              ; preds = %153, %116
  br label %155

155:                                              ; preds = %154
  %156 = load ptr, ptr %13, align 8, !tbaa !5
  %157 = call noundef ptr @_ZN15b2ParticleGroup7GetNextEv(ptr noundef nonnull align 8 dereferenceable(96) %156)
  store ptr %157, ptr %13, align 8, !tbaa !5
  br label %112, !llvm.loop !51

158:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !34
  br label %159

159:                                              ; preds = %191, %158
  %160 = load i32, ptr %16, align 4, !tbaa !34
  %161 = load i32, ptr %4, align 4, !tbaa !34
  %162 = icmp slt i32 %160, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %159
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %194

164:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = load i32, ptr %16, align 4, !tbaa !34
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds %struct.b2ParticleContact, ptr %165, i64 %167
  store ptr %168, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %169 = load ptr, ptr %17, align 8, !tbaa !5
  %170 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %169)
  store i32 %170, ptr %18, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %171 = load ptr, ptr %17, align 8, !tbaa !5
  %172 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %171)
  store i32 %172, ptr %19, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %173 = load ptr, ptr %17, align 8, !tbaa !5
  %174 = call noundef float @_ZNK17b2ParticleContact9GetWeightEv(ptr noundef nonnull align 4 dereferenceable(24) %173)
  store float %174, ptr %20, align 4, !tbaa !42
  %175 = load float, ptr %20, align 4, !tbaa !42
  %176 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 22
  %177 = load ptr, ptr %176, align 8, !tbaa !49
  %178 = load i32, ptr %18, align 4, !tbaa !34
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds float, ptr %177, i64 %179
  %181 = load float, ptr %180, align 4, !tbaa !42
  %182 = fadd float %181, %175
  store float %182, ptr %180, align 4, !tbaa !42
  %183 = load float, ptr %20, align 4, !tbaa !42
  %184 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 22
  %185 = load ptr, ptr %184, align 8, !tbaa !49
  %186 = load i32, ptr %19, align 4, !tbaa !34
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds float, ptr %185, i64 %187
  %189 = load float, ptr %188, align 4, !tbaa !42
  %190 = fadd float %189, %183
  store float %190, ptr %188, align 4, !tbaa !42
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %191

191:                                              ; preds = %164
  %192 = load i32, ptr %16, align 4, !tbaa !34
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %16, align 4, !tbaa !34
  br label %159, !llvm.loop !52

194:                                              ; preds = %163
  %195 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 24
  %196 = load ptr, ptr %195, align 8, !tbaa !53
  %197 = icmp ne ptr %196, null
  br i1 %197, label %198, label %199

198:                                              ; preds = %194
  br label %201

199:                                              ; preds = %194
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str.1, i32 noundef 1702, ptr noundef @__PRETTY_FUNCTION__._ZN16b2ParticleSystem12ComputeDepthEv) #9
  unreachable

200:                                              ; No predecessors!
  br label %201

201:                                              ; preds = %200, %198
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !34
  br label %202

202:                                              ; preds = %243, %201
  %203 = load i32, ptr %21, align 4, !tbaa !34
  %204 = load i32, ptr %12, align 4, !tbaa !34
  %205 = icmp slt i32 %203, %204
  br i1 %205, label %207, label %206

206:                                              ; preds = %202
  store i32 14, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %246

207:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %208 = load ptr, ptr %11, align 8, !tbaa !5
  %209 = load i32, ptr %21, align 4, !tbaa !34
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds ptr, ptr %208, i64 %210
  %212 = load ptr, ptr %211, align 8, !tbaa !5
  store ptr %212, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %213 = load ptr, ptr %22, align 8, !tbaa !5
  %214 = getelementptr inbounds %class.b2ParticleGroup, ptr %213, i32 0, i32 1
  %215 = load i32, ptr %214, align 8, !tbaa !47
  store i32 %215, ptr %23, align 4, !tbaa !34
  br label %216

216:                                              ; preds = %239, %207
  %217 = load i32, ptr %23, align 4, !tbaa !34
  %218 = load ptr, ptr %22, align 8, !tbaa !5
  %219 = getelementptr inbounds %class.b2ParticleGroup, ptr %218, i32 0, i32 2
  %220 = load i32, ptr %219, align 4, !tbaa !48
  %221 = icmp slt i32 %217, %220
  br i1 %221, label %223, label %222

222:                                              ; preds = %216
  store i32 17, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %242

223:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %224 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 22
  %225 = load ptr, ptr %224, align 8, !tbaa !49
  %226 = load i32, ptr %23, align 4, !tbaa !34
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds float, ptr %225, i64 %227
  %229 = load float, ptr %228, align 4, !tbaa !42
  store float %229, ptr %24, align 4, !tbaa !42
  %230 = load float, ptr %24, align 4, !tbaa !42
  %231 = fcmp olt float %230, 0x3FE99999A0000000
  %232 = zext i1 %231 to i64
  %233 = select i1 %231, float 0.000000e+00, float 0x47EFFFFFE0000000
  %234 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 24
  %235 = load ptr, ptr %234, align 8, !tbaa !53
  %236 = load i32, ptr %23, align 4, !tbaa !34
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds float, ptr %235, i64 %237
  store float %233, ptr %238, align 4, !tbaa !42
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %239

239:                                              ; preds = %223
  %240 = load i32, ptr %23, align 4, !tbaa !34
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %23, align 4, !tbaa !34
  br label %216, !llvm.loop !54

242:                                              ; preds = %222
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %243

243:                                              ; preds = %242
  %244 = load i32, ptr %21, align 4, !tbaa !34
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %21, align 4, !tbaa !34
  br label %202, !llvm.loop !55

246:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %247 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 12
  %248 = load i32, ptr %247, align 4, !tbaa !56
  %249 = sitofp i32 %248 to float
  %250 = call float @sqrtf(float noundef %249) #8
  %251 = fptosi float %250 to i32
  store i32 %251, ptr %25, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 0, ptr %26, align 4, !tbaa !34
  br label %252

252:                                              ; preds = %320, %246
  %253 = load i32, ptr %26, align 4, !tbaa !34
  %254 = load i32, ptr %25, align 4, !tbaa !34
  %255 = icmp slt i32 %253, %254
  br i1 %255, label %257, label %256

256:                                              ; preds = %252
  store i32 20, ptr %14, align 4
  br label %323

257:                                              ; preds = %252
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #8
  store i8 0, ptr %27, align 1, !tbaa !57
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  store i32 0, ptr %28, align 4, !tbaa !34
  br label %258

258:                                              ; preds = %309, %257
  %259 = load i32, ptr %28, align 4, !tbaa !34
  %260 = load i32, ptr %4, align 4, !tbaa !34
  %261 = icmp slt i32 %259, %260
  br i1 %261, label %263, label %262

262:                                              ; preds = %258
  store i32 23, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %312

263:                                              ; preds = %258
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %264 = load ptr, ptr %3, align 8, !tbaa !5
  %265 = load i32, ptr %28, align 4, !tbaa !34
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds %struct.b2ParticleContact, ptr %264, i64 %266
  store ptr %267, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  %268 = load ptr, ptr %29, align 8, !tbaa !5
  %269 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %268)
  store i32 %269, ptr %30, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %270 = load ptr, ptr %29, align 8, !tbaa !5
  %271 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %270)
  store i32 %271, ptr %31, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %272 = load ptr, ptr %29, align 8, !tbaa !5
  %273 = call noundef float @_ZNK17b2ParticleContact9GetWeightEv(ptr noundef nonnull align 4 dereferenceable(24) %272)
  %274 = fsub float 1.000000e+00, %273
  store float %274, ptr %32, align 4, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %275 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 24
  %276 = load ptr, ptr %275, align 8, !tbaa !53
  %277 = load i32, ptr %30, align 4, !tbaa !34
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds float, ptr %276, i64 %278
  store ptr %279, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %280 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 24
  %281 = load ptr, ptr %280, align 8, !tbaa !53
  %282 = load i32, ptr %31, align 4, !tbaa !34
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds float, ptr %281, i64 %283
  store ptr %284, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %285 = load ptr, ptr %34, align 8, !tbaa !5
  %286 = load float, ptr %285, align 4, !tbaa !42
  %287 = load float, ptr %32, align 4, !tbaa !42
  %288 = fadd float %286, %287
  store float %288, ptr %35, align 4, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  %289 = load ptr, ptr %33, align 8, !tbaa !5
  %290 = load float, ptr %289, align 4, !tbaa !42
  %291 = load float, ptr %32, align 4, !tbaa !42
  %292 = fadd float %290, %291
  store float %292, ptr %36, align 4, !tbaa !42
  %293 = load ptr, ptr %33, align 8, !tbaa !5
  %294 = load float, ptr %293, align 4, !tbaa !42
  %295 = load float, ptr %35, align 4, !tbaa !42
  %296 = fcmp ogt float %294, %295
  br i1 %296, label %297, label %300

297:                                              ; preds = %263
  %298 = load float, ptr %35, align 4, !tbaa !42
  %299 = load ptr, ptr %33, align 8, !tbaa !5
  store float %298, ptr %299, align 4, !tbaa !42
  store i8 1, ptr %27, align 1, !tbaa !57
  br label %300

300:                                              ; preds = %297, %263
  %301 = load ptr, ptr %34, align 8, !tbaa !5
  %302 = load float, ptr %301, align 4, !tbaa !42
  %303 = load float, ptr %36, align 4, !tbaa !42
  %304 = fcmp ogt float %302, %303
  br i1 %304, label %305, label %308

305:                                              ; preds = %300
  %306 = load float, ptr %36, align 4, !tbaa !42
  %307 = load ptr, ptr %34, align 8, !tbaa !5
  store float %306, ptr %307, align 4, !tbaa !42
  store i8 1, ptr %27, align 1, !tbaa !57
  br label %308

308:                                              ; preds = %305, %300
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %309

309:                                              ; preds = %308
  %310 = load i32, ptr %28, align 4, !tbaa !34
  %311 = add nsw i32 %310, 1
  store i32 %311, ptr %28, align 4, !tbaa !34
  br label %258, !llvm.loop !58

312:                                              ; preds = %262
  %313 = load i8, ptr %27, align 1, !tbaa !57, !range !59, !noundef !60
  %314 = trunc i8 %313 to i1
  br i1 %314, label %316, label %315

315:                                              ; preds = %312
  store i32 20, ptr %14, align 4
  br label %317

316:                                              ; preds = %312
  store i32 0, ptr %14, align 4
  br label %317

317:                                              ; preds = %316, %315
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #8
  %318 = load i32, ptr %14, align 4
  switch i32 %318, label %323 [
    i32 0, label %319
  ]

319:                                              ; preds = %317
  br label %320

320:                                              ; preds = %319
  %321 = load i32, ptr %26, align 4, !tbaa !34
  %322 = add nsw i32 %321, 1
  store i32 %322, ptr %26, align 4, !tbaa !34
  br label %252, !llvm.loop !61

323:                                              ; preds = %317, %256
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %324

324:                                              ; preds = %323
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  store i32 0, ptr %37, align 4, !tbaa !34
  br label %325

325:                                              ; preds = %368, %324
  %326 = load i32, ptr %37, align 4, !tbaa !34
  %327 = load i32, ptr %12, align 4, !tbaa !34
  %328 = icmp slt i32 %326, %327
  br i1 %328, label %330, label %329

329:                                              ; preds = %325
  store i32 26, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  br label %371

330:                                              ; preds = %325
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  %331 = load ptr, ptr %11, align 8, !tbaa !5
  %332 = load i32, ptr %37, align 4, !tbaa !34
  %333 = sext i32 %332 to i64
  %334 = getelementptr inbounds ptr, ptr %331, i64 %333
  %335 = load ptr, ptr %334, align 8, !tbaa !5
  store ptr %335, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  %336 = load ptr, ptr %38, align 8, !tbaa !5
  %337 = getelementptr inbounds %class.b2ParticleGroup, ptr %336, i32 0, i32 1
  %338 = load i32, ptr %337, align 8, !tbaa !47
  store i32 %338, ptr %39, align 4, !tbaa !34
  br label %339

339:                                              ; preds = %364, %330
  %340 = load i32, ptr %39, align 4, !tbaa !34
  %341 = load ptr, ptr %38, align 8, !tbaa !5
  %342 = getelementptr inbounds %class.b2ParticleGroup, ptr %341, i32 0, i32 2
  %343 = load i32, ptr %342, align 4, !tbaa !48
  %344 = icmp slt i32 %340, %343
  br i1 %344, label %346, label %345

345:                                              ; preds = %339
  store i32 29, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  br label %367

346:                                              ; preds = %339
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %347 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 24
  %348 = load ptr, ptr %347, align 8, !tbaa !53
  %349 = load i32, ptr %39, align 4, !tbaa !34
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds float, ptr %348, i64 %350
  store ptr %351, ptr %40, align 8, !tbaa !5
  %352 = load ptr, ptr %40, align 8, !tbaa !5
  %353 = load float, ptr %352, align 4, !tbaa !42
  %354 = fcmp olt float %353, 0x47EFFFFFE0000000
  br i1 %354, label %355, label %361

355:                                              ; preds = %346
  %356 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 9
  %357 = load float, ptr %356, align 8, !tbaa !62
  %358 = load ptr, ptr %40, align 8, !tbaa !5
  %359 = load float, ptr %358, align 4, !tbaa !42
  %360 = fmul float %359, %357
  store float %360, ptr %358, align 4, !tbaa !42
  br label %363

361:                                              ; preds = %346
  %362 = load ptr, ptr %40, align 8, !tbaa !5
  store float 0.000000e+00, ptr %362, align 4, !tbaa !42
  br label %363

363:                                              ; preds = %361, %355
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  br label %364

364:                                              ; preds = %363
  %365 = load i32, ptr %39, align 4, !tbaa !34
  %366 = add nsw i32 %365, 1
  store i32 %366, ptr %39, align 4, !tbaa !34
  br label %339, !llvm.loop !63

367:                                              ; preds = %345
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  br label %368

368:                                              ; preds = %367
  %369 = load i32, ptr %37, align 4, !tbaa !34
  %370 = add nsw i32 %369, 1
  store i32 %370, ptr %37, align 4, !tbaa !34
  br label %325, !llvm.loop !64

371:                                              ; preds = %329
  %372 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 46
  %373 = load ptr, ptr %372, align 8, !tbaa !9
  %374 = getelementptr inbounds %class.b2World, ptr %373, i32 0, i32 1
  %375 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN16b2StackAllocator4FreeEPv(ptr noundef nonnull align 8 dereferenceable(102932) %374, ptr noundef %375)
  %376 = getelementptr inbounds %class.b2ParticleSystem, ptr %41, i32 0, i32 46
  %377 = load ptr, ptr %376, align 8, !tbaa !9
  %378 = getelementptr inbounds %class.b2World, ptr %377, i32 0, i32 1
  %379 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN16b2StackAllocator4FreeEPv(ptr noundef nonnull align 8 dereferenceable(102932) %378, ptr noundef %379)
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  ret void
}

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

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

attributes #0 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { 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 #7 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { noreturn 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, !6, i64 608}
!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 = !{!12, !12, i64 0}
!35 = !{!10, !6, i64 240}
!36 = !{!37, !12, i64 16}
!37 = !{!"_ZTS15b2ParticleGroup", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !13, i64 20, !6, i64 24, !6, i64 32, !12, i64 40, !13, i64 44, !13, i64 48, !38, i64 52, !38, i64 60, !13, i64 68, !39, i64 72, !6, i64 88}
!38 = !{!"_ZTS6b2Vec2", !13, i64 0, !13, i64 4}
!39 = !{!"_ZTS11b2Transform", !38, i64 0, !40, i64 8}
!40 = !{!"_ZTS5b2Rot", !13, i64 0, !13, i64 4}
!41 = !{i64 0, i64 4, !34, i64 4, i64 4, !34, i64 8, i64 4, !42, i64 12, i64 4, !42, i64 16, i64 4, !42, i64 20, i64 4, !34}
!42 = !{!13, !13, i64 0}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = !{!10, !12, i64 508}
!46 = !{!10, !6, i64 512}
!47 = !{!37, !12, i64 8}
!48 = !{!37, !12, i64 12}
!49 = !{!10, !6, i64 200}
!50 = distinct !{!50, !44}
!51 = distinct !{!51, !44}
!52 = distinct !{!52, !44}
!53 = !{!10, !6, i64 216}
!54 = distinct !{!54, !44}
!55 = distinct !{!55, !44}
!56 = !{!10, !12, i64 44}
!57 = !{!11, !11, i64 0}
!58 = distinct !{!58, !44}
!59 = !{i8 0, i8 2}
!60 = !{}
!61 = distinct !{!61, !44}
!62 = !{!10, !13, i64 32}
!63 = distinct !{!63, !44}
!64 = distinct !{!64, !44}


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

@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._ZN16b2ParticleSystem12ComputeDepthEv = external hidden unnamed_addr constant [38 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #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 @_ZN16b2ParticleSystem13SetGroupFlagsEP15b2ParticleGroupj(ptr noundef nonnull align 8 dereferenceable(632), ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem12ComputeDepthEv(ptr noundef nonnull align 8 dereferenceable(632) %0) local_unnamed_addr #2 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 368
  %6 = tail call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %7 = mul i32 %6, 24
  %8 = tail call noundef ptr @_ZN16b2StackAllocator8AllocateEi(ptr noundef nonnull align 8 dereferenceable(102932) %4, i32 noundef %7)
  %9 = tail call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %11 = getelementptr inbounds i8, ptr %0, i64 240
  br label %21

._crit_edge:                                      ; preds = %42, %1
  %.0.lcssa = phi i32 [ 0, %1 ], [ %.1, %42 ]
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 128
  %14 = getelementptr inbounds i8, ptr %0, i64 508
  %15 = load i32, ptr %14, align 4, !tbaa !33
  %16 = shl i32 %15, 3
  %17 = tail call noundef ptr @_ZN16b2StackAllocator8AllocateEi(ptr noundef nonnull align 8 dereferenceable(102932) %13, i32 noundef %16)
  %18 = getelementptr inbounds i8, ptr %0, i64 512
  %19 = load ptr, ptr %18, align 8, !tbaa !34
  %.not123 = icmp eq ptr %19, null
  br i1 %.not123, label %.preheader117, label %.lr.ph127

.lr.ph127:                                        ; preds = %._crit_edge
  %20 = getelementptr inbounds i8, ptr %0, i64 200
  br label %48

21:                                               ; preds = %.lr.ph, %42
  %.0119 = phi i32 [ 0, %.lr.ph ], [ %.1, %42 ]
  %.094118 = phi i32 [ 0, %.lr.ph ], [ %43, %42 ]
  %22 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef %.094118)
  %23 = tail call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %22)
  %24 = tail call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %22)
  %25 = load ptr, ptr %11, align 8, !tbaa !35
  %26 = sext i32 %23 to i64
  %27 = getelementptr inbounds ptr, ptr %25, i64 %26
  %28 = load ptr, ptr %27, align 8, !tbaa !36
  %.not114 = icmp eq ptr %28, null
  br i1 %.not114, label %42, label %29

29:                                               ; preds = %21
  %30 = sext i32 %24 to i64
  %31 = getelementptr inbounds ptr, ptr %25, i64 %30
  %32 = load ptr, ptr %31, align 8, !tbaa !36
  %33 = icmp eq ptr %28, %32
  br i1 %33, label %34, label %42

34:                                               ; preds = %29
  %35 = getelementptr inbounds i8, ptr %28, i64 16
  %36 = load i32, ptr %35, align 8, !tbaa !37
  %37 = and i32 %36, 16
  %.not115 = icmp eq i32 %37, 0
  br i1 %.not115, label %42, label %38

38:                                               ; preds = %34
  %39 = add nsw i32 %.0119, 1
  %40 = sext i32 %.0119 to i64
  %41 = getelementptr inbounds %struct.b2ParticleContact, ptr %8, i64 %40
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(24) %41, ptr noundef nonnull align 4 dereferenceable(24) %22, i64 24, i1 false), !tbaa.struct !42
  br label %42

42:                                               ; preds = %38, %34, %29, %21
  %.1 = phi i32 [ %39, %38 ], [ %.0119, %34 ], [ %.0119, %29 ], [ %.0119, %21 ]
  %43 = add nuw nsw i32 %.094118, 1
  %44 = tail call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %21, label %._crit_edge, !llvm.loop !45

.preheader117:                                    ; preds = %.loopexit, %._crit_edge
  %.096.lcssa = phi i32 [ 0, %._crit_edge ], [ %.197, %.loopexit ]
  %46 = icmp slt i32 %.0.lcssa, 1
  br i1 %46, label %._crit_edge131, label %.lr.ph130

.lr.ph130:                                        ; preds = %.preheader117
  %47 = getelementptr inbounds i8, ptr %0, i64 200
  %wide.trip.count = zext nneg i32 %.0.lcssa to i64
  br label %79

48:                                               ; preds = %.lr.ph127, %.loopexit
  %.096125 = phi i32 [ 0, %.lr.ph127 ], [ %.197, %.loopexit ]
  %.098124 = phi ptr [ %19, %.lr.ph127 ], [ %70, %.loopexit ]
  %49 = getelementptr inbounds i8, ptr %.098124, i64 16
  %50 = load i32, ptr %49, align 8, !tbaa !37
  %51 = and i32 %50, 16
  %.not113 = icmp eq i32 %51, 0
  br i1 %.not113, label %.loopexit, label %52

52:                                               ; preds = %48
  %53 = add nsw i32 %.096125, 1
  %54 = sext i32 %.096125 to i64
  %55 = getelementptr inbounds ptr, ptr %17, i64 %54
  store ptr %.098124, ptr %55, align 8, !tbaa !36
  %56 = and i32 %50, -17
  tail call void @_ZN16b2ParticleSystem13SetGroupFlagsEP15b2ParticleGroupj(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull %.098124, i32 noundef %56)
  %57 = getelementptr inbounds i8, ptr %.098124, i64 8
  %58 = load i32, ptr %57, align 8, !tbaa !47
  %59 = getelementptr inbounds i8, ptr %.098124, i64 12
  %60 = load i32, ptr %59, align 4, !tbaa !48
  %61 = icmp slt i32 %58, %60
  br i1 %61, label %.lr.ph122, label %.loopexit

.lr.ph122:                                        ; preds = %52
  %62 = load ptr, ptr %20, align 8, !tbaa !49
  %63 = sext i32 %58 to i64
  %64 = shl nsw i64 %63, 2
  %scevgep = getelementptr i8, ptr %62, i64 %64
  %65 = xor i32 %58, -1
  %66 = add i32 %60, %65
  %67 = zext i32 %66 to i64
  %68 = shl nuw nsw i64 %67, 2
  %69 = add nuw nsw i64 %68, 4
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep, i8 0, i64 %69, i1 false), !tbaa !44
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph122, %52, %48
  %.197 = phi i32 [ %.096125, %48 ], [ %53, %52 ], [ %53, %.lr.ph122 ]
  %70 = tail call noundef ptr @_ZN15b2ParticleGroup7GetNextEv(ptr noundef nonnull align 8 dereferenceable(96) %.098124)
  %.not = icmp eq ptr %70, null
  br i1 %.not, label %.preheader117, label %48, !llvm.loop !50

._crit_edge131:                                   ; preds = %79, %.preheader117
  %71 = getelementptr inbounds i8, ptr %0, i64 216
  %72 = load ptr, ptr %71, align 8, !tbaa !51
  %73 = ptrtoint ptr %72 to i64
  %.not112 = icmp eq ptr %72, null
  br i1 %.not112, label %93, label %.preheader116

.preheader116:                                    ; preds = %._crit_edge131
  %74 = icmp sgt i32 %.096.lcssa, 0
  br i1 %74, label %.lr.ph137, label %._crit_edge138

.lr.ph137:                                        ; preds = %.preheader116
  %75 = getelementptr inbounds i8, ptr %0, i64 200
  %76 = load ptr, ptr %75, align 8
  %77 = ptrtoint ptr %76 to i64
  %wide.trip.count165 = zext nneg i32 %.096.lcssa to i64
  %78 = sub i64 %73, %77
  %diff.check = icmp ult i64 %78, 32
  br label %124

79:                                               ; preds = %.lr.ph130, %79
  %indvars.iv = phi i64 [ 0, %.lr.ph130 ], [ %indvars.iv.next, %79 ]
  %80 = getelementptr inbounds %struct.b2ParticleContact, ptr %8, i64 %indvars.iv
  %81 = tail call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %80)
  %82 = tail call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %80)
  %83 = tail call noundef float @_ZNK17b2ParticleContact9GetWeightEv(ptr noundef nonnull align 4 dereferenceable(24) %80)
  %84 = load ptr, ptr %47, align 8, !tbaa !49
  %85 = sext i32 %81 to i64
  %86 = getelementptr inbounds float, ptr %84, i64 %85
  %87 = load float, ptr %86, align 4, !tbaa !44
  %88 = fadd float %83, %87
  store float %88, ptr %86, align 4, !tbaa !44
  %89 = sext i32 %82 to i64
  %90 = getelementptr inbounds float, ptr %84, i64 %89
  %91 = load float, ptr %90, align 4, !tbaa !44
  %92 = fadd float %83, %91
  store float %92, ptr %90, align 4, !tbaa !44
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge131, label %79, !llvm.loop !52

93:                                               ; preds = %._crit_edge131
  tail call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.1, i32 noundef 1702, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN16b2ParticleSystem12ComputeDepthEv) #8
  unreachable

._crit_edge138:                                   ; preds = %._crit_edge135, %.preheader116
  %94 = getelementptr inbounds i8, ptr %0, i64 44
  %95 = load i32, ptr %94, align 4, !tbaa !53
  %96 = sitofp i32 %95 to float
  %97 = tail call float @sqrtf(float noundef %96) #9
  %98 = fptosi float %97 to i32
  %99 = icmp slt i32 %98, 1
  %brmerge = or i1 %99, %46
  br i1 %brmerge, label %._crit_edge145, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %._crit_edge138
  %wide.trip.count169 = zext nneg i32 %.0.lcssa to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge142.us
  %.0104144.us = phi i32 [ %122, %._crit_edge142.us ], [ 0, %.preheader.us.preheader ]
  br label %100

100:                                              ; preds = %.preheader.us, %121
  %indvars.iv167 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next168, %121 ]
  %.0106139.us = phi i1 [ false, %.preheader.us ], [ %.2.us, %121 ]
  %101 = getelementptr inbounds %struct.b2ParticleContact, ptr %8, i64 %indvars.iv167
  %102 = tail call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %101)
  %103 = tail call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %101)
  %104 = tail call noundef float @_ZNK17b2ParticleContact9GetWeightEv(ptr noundef nonnull align 4 dereferenceable(24) %101)
  %105 = fsub float 1.000000e+00, %104
  %106 = load ptr, ptr %71, align 8, !tbaa !51
  %107 = sext i32 %102 to i64
  %108 = getelementptr inbounds float, ptr %106, i64 %107
  %109 = sext i32 %103 to i64
  %110 = getelementptr inbounds float, ptr %106, i64 %109
  %111 = load float, ptr %110, align 4, !tbaa !44
  %112 = fadd float %105, %111
  %113 = load float, ptr %108, align 4, !tbaa !44
  %114 = fadd float %105, %113
  %115 = fcmp ogt float %113, %112
  br i1 %115, label %116, label %117

116:                                              ; preds = %100
  store float %112, ptr %108, align 4, !tbaa !44
  %.pre = load float, ptr %110, align 4, !tbaa !44
  br label %117

117:                                              ; preds = %116, %100
  %118 = phi float [ %.pre, %116 ], [ %111, %100 ]
  %.1107.us = phi i1 [ true, %116 ], [ %.0106139.us, %100 ]
  %119 = fcmp ogt float %118, %114
  br i1 %119, label %120, label %121

120:                                              ; preds = %117
  store float %114, ptr %110, align 4, !tbaa !44
  br label %121

121:                                              ; preds = %120, %117
  %.2.us = phi i1 [ true, %120 ], [ %.1107.us, %117 ]
  %indvars.iv.next168 = add nuw nsw i64 %indvars.iv167, 1
  %exitcond170.not = icmp eq i64 %indvars.iv.next168, %wide.trip.count169
  br i1 %exitcond170.not, label %._crit_edge142.us, label %100, !llvm.loop !54

._crit_edge142.us:                                ; preds = %121
  %122 = add nuw nsw i32 %.0104144.us, 1
  %123 = icmp slt i32 %122, %98
  %or.cond = select i1 %.2.us, i1 %123, i1 false
  br i1 %or.cond, label %.preheader.us, label %._crit_edge145, !llvm.loop !55

124:                                              ; preds = %.lr.ph137, %._crit_edge135
  %indvars.iv162 = phi i64 [ 0, %.lr.ph137 ], [ %indvars.iv.next163, %._crit_edge135 ]
  %125 = getelementptr inbounds ptr, ptr %17, i64 %indvars.iv162
  %126 = load ptr, ptr %125, align 8, !tbaa !36
  %127 = getelementptr inbounds i8, ptr %126, i64 8
  %128 = load i32, ptr %127, align 8, !tbaa !47
  %129 = getelementptr inbounds i8, ptr %126, i64 12
  %130 = load i32, ptr %129, align 4, !tbaa !48
  %131 = icmp slt i32 %128, %130
  br i1 %131, label %.lr.ph134.preheader, label %._crit_edge135

.lr.ph134.preheader:                              ; preds = %124
  %132 = sext i32 %128 to i64
  %wide.trip.count160 = sext i32 %130 to i64
  %133 = sub nsw i64 %wide.trip.count160, %132
  %min.iters.check = icmp ult i64 %133, 8
  %or.cond205 = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond205, label %.lr.ph134.preheader207, label %vector.ph

.lr.ph134.preheader207:                           ; preds = %middle.block, %.lr.ph134.preheader
  %indvars.iv157.ph = phi i64 [ %132, %.lr.ph134.preheader ], [ %ind.end, %middle.block ]
  %134 = sub nsw i64 %wide.trip.count160, %indvars.iv157.ph
  %xtraiter = and i64 %134, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph134.prol.loopexit, label %.lr.ph134.prol

.lr.ph134.prol:                                   ; preds = %.lr.ph134.preheader207
  %135 = getelementptr inbounds float, ptr %76, i64 %indvars.iv157.ph
  %136 = load float, ptr %135, align 4, !tbaa !44
  %137 = fcmp olt float %136, 0x3FE99999A0000000
  %138 = select i1 %137, float 0.000000e+00, float 0x47EFFFFFE0000000
  %139 = getelementptr inbounds float, ptr %72, i64 %indvars.iv157.ph
  store float %138, ptr %139, align 4, !tbaa !44
  %indvars.iv.next158.prol = add nsw i64 %indvars.iv157.ph, 1
  br label %.lr.ph134.prol.loopexit

.lr.ph134.prol.loopexit:                          ; preds = %.lr.ph134.prol, %.lr.ph134.preheader207
  %indvars.iv157.unr = phi i64 [ %indvars.iv157.ph, %.lr.ph134.preheader207 ], [ %indvars.iv.next158.prol, %.lr.ph134.prol ]
  %140 = add nsw i64 %wide.trip.count160, -1
  %141 = icmp eq i64 %indvars.iv157.ph, %140
  br i1 %141, label %._crit_edge135, label %.lr.ph134

vector.ph:                                        ; preds = %.lr.ph134.preheader
  %n.vec = and i64 %133, -8
  %ind.end = add nsw i64 %n.vec, %132
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %index, %132
  %142 = getelementptr inbounds float, ptr %76, i64 %offset.idx
  %143 = getelementptr inbounds i8, ptr %142, i64 16
  %wide.load = load <4 x float>, ptr %142, align 4, !tbaa !44
  %wide.load183 = load <4 x float>, ptr %143, align 4, !tbaa !44
  %144 = fcmp olt <4 x float> %wide.load, <float 0x3FE99999A0000000, float 0x3FE99999A0000000, float 0x3FE99999A0000000, float 0x3FE99999A0000000>
  %145 = fcmp olt <4 x float> %wide.load183, <float 0x3FE99999A0000000, float 0x3FE99999A0000000, float 0x3FE99999A0000000, float 0x3FE99999A0000000>
  %146 = select <4 x i1> %144, <4 x float> zeroinitializer, <4 x float> <float 0x47EFFFFFE0000000, float 0x47EFFFFFE0000000, float 0x47EFFFFFE0000000, float 0x47EFFFFFE0000000>
  %147 = select <4 x i1> %145, <4 x float> zeroinitializer, <4 x float> <float 0x47EFFFFFE0000000, float 0x47EFFFFFE0000000, float 0x47EFFFFFE0000000, float 0x47EFFFFFE0000000>
  %148 = getelementptr inbounds float, ptr %72, i64 %offset.idx
  %149 = getelementptr inbounds i8, ptr %148, i64 16
  store <4 x float> %146, ptr %148, align 4, !tbaa !44
  store <4 x float> %147, ptr %149, align 4, !tbaa !44
  %index.next = add nuw i64 %index, 8
  %150 = icmp eq i64 %index.next, %n.vec
  br i1 %150, label %middle.block, label %vector.body, !llvm.loop !56

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %133, %n.vec
  br i1 %cmp.n, label %._crit_edge135, label %.lr.ph134.preheader207

._crit_edge135:                                   ; preds = %.lr.ph134.prol.loopexit, %.lr.ph134, %middle.block, %124
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %exitcond166.not = icmp eq i64 %indvars.iv.next163, %wide.trip.count165
  br i1 %exitcond166.not, label %._crit_edge138, label %124, !llvm.loop !59

.lr.ph134:                                        ; preds = %.lr.ph134.prol.loopexit, %.lr.ph134
  %indvars.iv157 = phi i64 [ %indvars.iv.next158.1, %.lr.ph134 ], [ %indvars.iv157.unr, %.lr.ph134.prol.loopexit ]
  %151 = getelementptr inbounds float, ptr %76, i64 %indvars.iv157
  %152 = load float, ptr %151, align 4, !tbaa !44
  %153 = fcmp olt float %152, 0x3FE99999A0000000
  %154 = select i1 %153, float 0.000000e+00, float 0x47EFFFFFE0000000
  %155 = getelementptr inbounds float, ptr %72, i64 %indvars.iv157
  store float %154, ptr %155, align 4, !tbaa !44
  %indvars.iv.next158 = add nsw i64 %indvars.iv157, 1
  %156 = getelementptr inbounds float, ptr %76, i64 %indvars.iv.next158
  %157 = load float, ptr %156, align 4, !tbaa !44
  %158 = fcmp olt float %157, 0x3FE99999A0000000
  %159 = select i1 %158, float 0.000000e+00, float 0x47EFFFFFE0000000
  %160 = getelementptr inbounds float, ptr %72, i64 %indvars.iv.next158
  store float %159, ptr %160, align 4, !tbaa !44
  %indvars.iv.next158.1 = add nsw i64 %indvars.iv157, 2
  %exitcond161.not.1 = icmp eq i64 %indvars.iv.next158.1, %wide.trip.count160
  br i1 %exitcond161.not.1, label %._crit_edge135, label %.lr.ph134, !llvm.loop !60

._crit_edge145:                                   ; preds = %._crit_edge142.us, %._crit_edge138
  br i1 %74, label %.lr.ph153, label %._crit_edge154

.lr.ph153:                                        ; preds = %._crit_edge145
  %161 = load ptr, ptr %71, align 8
  %162 = getelementptr inbounds i8, ptr %0, i64 32
  %wide.trip.count179 = zext nneg i32 %.096.lcssa to i64
  %scevgep187 = getelementptr inbounds i8, ptr %0, i64 36
  %invariant.gep210 = getelementptr i8, ptr %161, i64 4
  br label %167

._crit_edge154:                                   ; preds = %._crit_edge150, %._crit_edge145
  %163 = load ptr, ptr %2, align 8, !tbaa !5
  %164 = getelementptr inbounds i8, ptr %163, i64 128
  tail call void @_ZN16b2StackAllocator4FreeEPv(ptr noundef nonnull align 8 dereferenceable(102932) %164, ptr noundef %17)
  %165 = load ptr, ptr %2, align 8, !tbaa !5
  %166 = getelementptr inbounds i8, ptr %165, i64 128
  tail call void @_ZN16b2StackAllocator4FreeEPv(ptr noundef nonnull align 8 dereferenceable(102932) %166, ptr noundef %8)
  ret void

167:                                              ; preds = %.lr.ph153, %._crit_edge150
  %indvars.iv176 = phi i64 [ 0, %.lr.ph153 ], [ %indvars.iv.next177, %._crit_edge150 ]
  %168 = getelementptr inbounds ptr, ptr %17, i64 %indvars.iv176
  %169 = load ptr, ptr %168, align 8, !tbaa !36
  %170 = getelementptr inbounds i8, ptr %169, i64 8
  %171 = load i32, ptr %170, align 8, !tbaa !47
  %172 = getelementptr inbounds i8, ptr %169, i64 12
  %173 = load i32, ptr %172, align 4, !tbaa !48
  %174 = icmp slt i32 %171, %173
  br i1 %174, label %.lr.ph149.preheader, label %._crit_edge150

.lr.ph149.preheader:                              ; preds = %167
  %175 = sext i32 %171 to i64
  %wide.trip.count174 = sext i32 %173 to i64
  %176 = sub nsw i64 %wide.trip.count174, %175
  %min.iters.check190 = icmp ult i64 %176, 8
  br i1 %min.iters.check190, label %.lr.ph149.preheader206, label %vector.memcheck184

.lr.ph149.preheader206:                           ; preds = %middle.block188, %vector.memcheck184, %.lr.ph149.preheader
  %indvars.iv171.ph = phi i64 [ %175, %vector.memcheck184 ], [ %175, %.lr.ph149.preheader ], [ %ind.end194, %middle.block188 ]
  %177 = sub nsw i64 %wide.trip.count174, %indvars.iv171.ph
  %xtraiter208 = and i64 %177, 1
  %lcmp.mod209.not = icmp eq i64 %xtraiter208, 0
  br i1 %lcmp.mod209.not, label %.lr.ph149.prol.loopexit, label %.lr.ph149.prol

.lr.ph149.prol:                                   ; preds = %.lr.ph149.preheader206
  %178 = getelementptr inbounds float, ptr %161, i64 %indvars.iv171.ph
  %179 = load float, ptr %178, align 4, !tbaa !44
  %180 = fcmp olt float %179, 0x47EFFFFFE0000000
  %181 = load float, ptr %162, align 8
  %182 = fmul float %179, %181
  %storemerge.prol = select i1 %180, float %182, float 0.000000e+00
  store float %storemerge.prol, ptr %178, align 4, !tbaa !44
  %indvars.iv.next172.prol = add nsw i64 %indvars.iv171.ph, 1
  br label %.lr.ph149.prol.loopexit

.lr.ph149.prol.loopexit:                          ; preds = %.lr.ph149.prol, %.lr.ph149.preheader206
  %indvars.iv171.unr = phi i64 [ %indvars.iv171.ph, %.lr.ph149.preheader206 ], [ %indvars.iv.next172.prol, %.lr.ph149.prol ]
  %183 = add nsw i64 %wide.trip.count174, -1
  %184 = icmp eq i64 %indvars.iv171.ph, %183
  br i1 %184, label %._crit_edge150, label %.lr.ph149

vector.memcheck184:                               ; preds = %.lr.ph149.preheader
  %185 = shl nsw i64 %175, 2
  %scevgep185 = getelementptr i8, ptr %161, i64 %185
  %186 = shl nsw i64 %wide.trip.count174, 2
  %scevgep186 = getelementptr i8, ptr %161, i64 %186
  %bound0 = icmp ult ptr %scevgep185, %scevgep187
  %bound1 = icmp ult ptr %162, %scevgep186
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph149.preheader206, label %vector.ph191

vector.ph191:                                     ; preds = %vector.memcheck184
  %n.vec193 = and i64 %176, -8
  %ind.end194 = add nsw i64 %n.vec193, %175
  %invariant.gep = getelementptr float, ptr %161, i64 %175
  br label %vector.body196

vector.body196:                                   ; preds = %vector.body196, %vector.ph191
  %index197 = phi i64 [ 0, %vector.ph191 ], [ %index.next203, %vector.body196 ]
  %gep = getelementptr float, ptr %invariant.gep, i64 %index197
  %187 = getelementptr inbounds i8, ptr %gep, i64 16
  %wide.load199 = load <4 x float>, ptr %gep, align 4, !tbaa !44, !alias.scope !61, !noalias !64
  %wide.load200 = load <4 x float>, ptr %187, align 4, !tbaa !44, !alias.scope !61, !noalias !64
  %188 = fcmp olt <4 x float> %wide.load199, <float 0x47EFFFFFE0000000, float 0x47EFFFFFE0000000, float 0x47EFFFFFE0000000, float 0x47EFFFFFE0000000>
  %189 = fcmp olt <4 x float> %wide.load200, <float 0x47EFFFFFE0000000, float 0x47EFFFFFE0000000, float 0x47EFFFFFE0000000, float 0x47EFFFFFE0000000>
  %190 = load <4 x float>, ptr %162, align 8
  %broadcast.splat202 = shufflevector <4 x float> %190, <4 x float> poison, <4 x i32> zeroinitializer
  %191 = fmul <4 x float> %wide.load199, %broadcast.splat202
  %192 = fmul <4 x float> %wide.load200, %broadcast.splat202
  %193 = select <4 x i1> %188, <4 x float> %191, <4 x float> zeroinitializer
  %194 = select <4 x i1> %189, <4 x float> %192, <4 x float> zeroinitializer
  store <4 x float> %193, ptr %gep, align 4, !tbaa !44, !alias.scope !61, !noalias !64
  store <4 x float> %194, ptr %187, align 4, !tbaa !44, !alias.scope !61, !noalias !64
  %index.next203 = add nuw i64 %index197, 8
  %195 = icmp eq i64 %index.next203, %n.vec193
  br i1 %195, label %middle.block188, label %vector.body196, !llvm.loop !66

middle.block188:                                  ; preds = %vector.body196
  %cmp.n204 = icmp eq i64 %176, %n.vec193
  br i1 %cmp.n204, label %._crit_edge150, label %.lr.ph149.preheader206

._crit_edge150:                                   ; preds = %.lr.ph149.prol.loopexit, %.lr.ph149, %middle.block188, %167
  %indvars.iv.next177 = add nuw nsw i64 %indvars.iv176, 1
  %exitcond180.not = icmp eq i64 %indvars.iv.next177, %wide.trip.count179
  br i1 %exitcond180.not, label %._crit_edge154, label %167, !llvm.loop !67

.lr.ph149:                                        ; preds = %.lr.ph149.prol.loopexit, %.lr.ph149
  %indvars.iv171 = phi i64 [ %indvars.iv.next172.1, %.lr.ph149 ], [ %indvars.iv171.unr, %.lr.ph149.prol.loopexit ]
  %196 = getelementptr inbounds float, ptr %161, i64 %indvars.iv171
  %197 = load float, ptr %196, align 4, !tbaa !44
  %198 = fcmp olt float %197, 0x47EFFFFFE0000000
  %199 = load float, ptr %162, align 8
  %200 = fmul float %197, %199
  %storemerge = select i1 %198, float %200, float 0.000000e+00
  store float %storemerge, ptr %196, align 4, !tbaa !44
  %gep211 = getelementptr float, ptr %invariant.gep210, i64 %indvars.iv171
  %201 = load float, ptr %gep211, align 4, !tbaa !44
  %202 = fcmp olt float %201, 0x47EFFFFFE0000000
  %203 = load float, ptr %162, align 8
  %204 = fmul float %201, %203
  %storemerge.1 = select i1 %202, float %204, float 0.000000e+00
  store float %storemerge.1, ptr %gep211, align 4, !tbaa !44
  %indvars.iv.next172.1 = add nsw i64 %indvars.iv171, 2
  %exitcond175.not.1 = icmp eq i64 %indvars.iv.next172.1, %wide.trip.count174
  br i1 %exitcond175.not.1, label %._crit_edge150, label %.lr.ph149, !llvm.loop !68
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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 508}
!34 = !{!6, !16, i64 512}
!35 = !{!6, !16, i64 240}
!36 = !{!16, !16, i64 0}
!37 = !{!38, !10, i64 16}
!38 = !{!"_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, !39, i64 52, !39, i64 60, !11, i64 68, !40, i64 72, !16, i64 88}
!39 = !{!"_ZTS6b2Vec2", !11, i64 0, !11, i64 4}
!40 = !{!"_ZTS11b2Transform", !39, i64 0, !41, i64 8}
!41 = !{!"_ZTS5b2Rot", !11, i64 0, !11, i64 4}
!42 = !{i64 0, i64 4, !43, i64 4, i64 4, !43, i64 8, i64 4, !44, i64 12, i64 4, !44, i64 16, i64 4, !44, i64 20, i64 4, !43}
!43 = !{!10, !10, i64 0}
!44 = !{!11, !11, i64 0}
!45 = distinct !{!45, !46}
!46 = !{!"llvm.loop.mustprogress"}
!47 = !{!38, !10, i64 8}
!48 = !{!38, !10, i64 12}
!49 = !{!6, !16, i64 200}
!50 = distinct !{!50, !46}
!51 = !{!6, !16, i64 216}
!52 = distinct !{!52, !46}
!53 = !{!6, !10, i64 44}
!54 = distinct !{!54, !46}
!55 = distinct !{!55, !46}
!56 = distinct !{!56, !46, !57, !58}
!57 = !{!"llvm.loop.isvectorized", i32 1}
!58 = !{!"llvm.loop.unroll.runtime.disable"}
!59 = distinct !{!59, !46}
!60 = distinct !{!60, !46, !57}
!61 = !{!62}
!62 = distinct !{!62, !63}
!63 = distinct !{!63, !"LVerDomain"}
!64 = !{!65}
!65 = distinct !{!65, !63}
!66 = distinct !{!66, !46, !57, !58}
!67 = distinct !{!67, !46}
!68 = distinct !{!68, !46, !57}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass