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

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

@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__._ZN16b2ParticleSystem20UpdatePairsAndTriadsEiiRKNS_16ConnectionFilterE = external hidden unnamed_addr constant [84 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem20UpdatePairsAndTriadsEiiRKNS_16ConnectionFilterE(ptr noundef nonnull align 8 dereferenceable(632) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %class.b2VoronoiDiagram, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca float, align 4
  %27 = alloca %class.UpdateTriadsCallback, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  %28 = load ptr, ptr %5, align 8
  %29 = load i32, ptr %6, align 4, !tbaa !9
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %32, label %33

32:                                               ; preds = %4
  br label %35

33:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str.23, ptr noundef @.str.1, i32 noundef 1448, ptr noundef @__PRETTY_FUNCTION__._ZN16b2ParticleSystem20UpdatePairsAndTriadsEiiRKNS_16ConnectionFilterE) #9
  unreachable

34:                                               ; No predecessors!
  br label %35

35:                                               ; preds = %34, %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #10
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #10
  %36 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %36, ptr %10, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %52, %35
  %38 = load i32, ptr %10, align 4, !tbaa !9
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  br label %55

42:                                               ; preds = %37
  %43 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 16
  %44 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.0", ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = load i32, ptr %10, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr %45, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = or i32 %50, %49
  store i32 %51, ptr %9, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %42
  %53 = load i32, ptr %10, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %10, align 4, !tbaa !9
  br label %37, !llvm.loop !35

55:                                               ; preds = %41
  %56 = load i32, ptr %9, align 4, !tbaa !9
  %57 = and i32 %56, 1032
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %217

59:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %207, %59
  %61 = load i32, ptr %11, align 4, !tbaa !9
  %62 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 35
  %63 = call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %62)
  %64 = icmp slt i32 %61, %63
  br i1 %64, label %66, label %65

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

66:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %67 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 35
  %68 = load i32, ptr %11, align 4, !tbaa !9
  %69 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %67, i32 noundef %68)
  store ptr %69, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  %71 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %70)
  store i32 %71, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #10
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %72)
  store i32 %73, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #10
  %74 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 16
  %75 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.0", ptr %74, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !11
  %77 = load i32, ptr %13, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i32, ptr %76, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !9
  store i32 %80, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  %81 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 16
  %82 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.0", ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !11
  %84 = load i32, ptr %14, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr %83, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !9
  store i32 %87, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  %88 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 26
  %89 = load ptr, ptr %88, align 8, !tbaa !37
  %90 = load i32, ptr %13, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds ptr, ptr %89, i64 %91
  %93 = load ptr, ptr %92, align 8, !tbaa !5
  store ptr %93, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %94 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 26
  %95 = load ptr, ptr %94, align 8, !tbaa !37
  %96 = load i32, ptr %14, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds ptr, ptr %95, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  store ptr %99, ptr %18, align 8, !tbaa !5
  %100 = load i32, ptr %13, align 4, !tbaa !9
  %101 = load i32, ptr %6, align 4, !tbaa !9
  %102 = icmp sge i32 %100, %101
  br i1 %102, label %103, label %206

103:                                              ; preds = %66
  %104 = load i32, ptr %13, align 4, !tbaa !9
  %105 = load i32, ptr %7, align 4, !tbaa !9
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %107, label %206

107:                                              ; preds = %103
  %108 = load i32, ptr %14, align 4, !tbaa !9
  %109 = load i32, ptr %6, align 4, !tbaa !9
  %110 = icmp sge i32 %108, %109
  br i1 %110, label %111, label %206

111:                                              ; preds = %107
  %112 = load i32, ptr %14, align 4, !tbaa !9
  %113 = load i32, ptr %7, align 4, !tbaa !9
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %115, label %206

115:                                              ; preds = %111
  %116 = load i32, ptr %15, align 4, !tbaa !9
  %117 = load i32, ptr %16, align 4, !tbaa !9
  %118 = or i32 %116, %117
  %119 = and i32 %118, 2
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %206, label %121

121:                                              ; preds = %115
  %122 = load i32, ptr %15, align 4, !tbaa !9
  %123 = load i32, ptr %16, align 4, !tbaa !9
  %124 = or i32 %122, %123
  %125 = and i32 %124, 1032
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %127, label %206

127:                                              ; preds = %121
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = load i32, ptr %13, align 4, !tbaa !9
  %130 = load ptr, ptr %128, align 8, !tbaa !38
  %131 = getelementptr inbounds ptr, ptr %130, i64 2
  %132 = load ptr, ptr %131, align 8
  %133 = call noundef zeroext i1 %132(ptr noundef nonnull align 8 dereferenceable(8) %128, i32 noundef %129)
  br i1 %133, label %141, label %134

134:                                              ; preds = %127
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = load i32, ptr %14, align 4, !tbaa !9
  %137 = load ptr, ptr %135, align 8, !tbaa !38
  %138 = getelementptr inbounds ptr, ptr %137, i64 2
  %139 = load ptr, ptr %138, align 8
  %140 = call noundef zeroext i1 %139(ptr noundef nonnull align 8 dereferenceable(8) %135, i32 noundef %136)
  br i1 %140, label %141, label %206

141:                                              ; preds = %134, %127
  %142 = load i32, ptr %15, align 4, !tbaa !9
  %143 = load ptr, ptr %17, align 8, !tbaa !5
  %144 = call noundef zeroext i1 @_ZL22ParticleCanBeConnectedjP15b2ParticleGroup(i32 noundef %142, ptr noundef %143)
  br i1 %144, label %145, label %206

145:                                              ; preds = %141
  %146 = load i32, ptr %16, align 4, !tbaa !9
  %147 = load ptr, ptr %18, align 8, !tbaa !5
  %148 = call noundef zeroext i1 @_ZL22ParticleCanBeConnectedjP15b2ParticleGroup(i32 noundef %146, ptr noundef %147)
  br i1 %148, label %149, label %206

149:                                              ; preds = %145
  %150 = load ptr, ptr %8, align 8, !tbaa !5
  %151 = load i32, ptr %13, align 4, !tbaa !9
  %152 = load i32, ptr %14, align 4, !tbaa !9
  %153 = load ptr, ptr %150, align 8, !tbaa !38
  %154 = getelementptr inbounds ptr, ptr %153, i64 3
  %155 = load ptr, ptr %154, align 8
  %156 = call noundef zeroext i1 %155(ptr noundef nonnull align 8 dereferenceable(8) %150, i32 noundef %151, i32 noundef %152)
  br i1 %156, label %157, label %206

157:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  %158 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 37
  %159 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZN16b2GrowableBufferI14b2ParticlePairE6AppendEv(ptr noundef nonnull align 8 dereferenceable(24) %158)
  store ptr %159, ptr %19, align 8, !tbaa !5
  %160 = load i32, ptr %13, align 4, !tbaa !9
  %161 = load ptr, ptr %19, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.b2ParticlePair, ptr %161, i32 0, i32 0
  store i32 %160, ptr %162, align 4, !tbaa !40
  %163 = load i32, ptr %14, align 4, !tbaa !9
  %164 = load ptr, ptr %19, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.b2ParticlePair, ptr %164, i32 0, i32 1
  store i32 %163, ptr %165, align 4, !tbaa !42
  %166 = load ptr, ptr %12, align 8, !tbaa !5
  %167 = call noundef i32 @_ZNK17b2ParticleContact8GetFlagsEv(ptr noundef nonnull align 4 dereferenceable(24) %166)
  %168 = load ptr, ptr %19, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.b2ParticlePair, ptr %168, i32 0, i32 2
  store i32 %167, ptr %169, align 4, !tbaa !43
  %170 = load ptr, ptr %17, align 8, !tbaa !5
  %171 = icmp ne ptr %170, null
  br i1 %171, label %172, label %176

172:                                              ; preds = %157
  %173 = load ptr, ptr %17, align 8, !tbaa !5
  %174 = getelementptr inbounds %class.b2ParticleGroup, ptr %173, i32 0, i32 4
  %175 = load float, ptr %174, align 4, !tbaa !44
  br label %177

176:                                              ; preds = %157
  br label %177

177:                                              ; preds = %176, %172
  %178 = phi float [ %175, %172 ], [ 1.000000e+00, %176 ]
  %179 = load ptr, ptr %18, align 8, !tbaa !5
  %180 = icmp ne ptr %179, null
  br i1 %180, label %181, label %185

181:                                              ; preds = %177
  %182 = load ptr, ptr %18, align 8, !tbaa !5
  %183 = getelementptr inbounds %class.b2ParticleGroup, ptr %182, i32 0, i32 4
  %184 = load float, ptr %183, align 4, !tbaa !44
  br label %186

185:                                              ; preds = %177
  br label %186

186:                                              ; preds = %185, %181
  %187 = phi float [ %184, %181 ], [ 1.000000e+00, %185 ]
  %188 = call noundef float @_Z5b2MinIfET_S0_S0_(float noundef %178, float noundef %187)
  %189 = load ptr, ptr %19, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.b2ParticlePair, ptr %189, i32 0, i32 3
  store float %188, ptr %190, align 4, !tbaa !49
  %191 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 17
  %192 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %191, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8, !tbaa !50
  %194 = load i32, ptr %13, align 4, !tbaa !9
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds %struct.b2Vec2, ptr %193, i64 %195
  %197 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 17
  %198 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %197, i32 0, i32 0
  %199 = load ptr, ptr %198, align 8, !tbaa !50
  %200 = load i32, ptr %14, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds %struct.b2Vec2, ptr %199, i64 %201
  %203 = call noundef float @_Z10b2DistanceRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %196, ptr noundef nonnull align 4 dereferenceable(8) %202)
  %204 = load ptr, ptr %19, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.b2ParticlePair, ptr %204, i32 0, i32 4
  store float %203, ptr %205, align 4, !tbaa !51
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  br label %206

206:                                              ; preds = %186, %149, %145, %141, %134, %121, %115, %111, %107, %103, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  br label %207

207:                                              ; preds = %206
  %208 = load i32, ptr %11, align 4, !tbaa !9
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %11, align 4, !tbaa !9
  br label %60, !llvm.loop !52

210:                                              ; preds = %65
  %211 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 37
  %212 = call noundef ptr @_ZN16b2GrowableBufferI14b2ParticlePairE5BeginEv(ptr noundef nonnull align 8 dereferenceable(24) %211)
  %213 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 37
  %214 = call noundef ptr @_ZN16b2GrowableBufferI14b2ParticlePairE3EndEv(ptr noundef nonnull align 8 dereferenceable(24) %213)
  call void @_ZSt11stable_sortIP14b2ParticlePairPFbRKS0_S3_EEvT_S6_T0_(ptr noundef %212, ptr noundef %214, ptr noundef @_ZN16b2ParticleSystem18ComparePairIndicesERK14b2ParticlePairS2_)
  %215 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 37
  %216 = call noundef ptr @_ZN16b2GrowableBufferI14b2ParticlePairE6UniqueIPFbRKS0_S4_EEEPS0_T_(ptr noundef nonnull align 8 dereferenceable(24) %215, ptr noundef @_ZN16b2ParticleSystem16MatchPairIndicesERK14b2ParticlePairS2_)
  br label %217

217:                                              ; preds = %210, %55
  %218 = load i32, ptr %9, align 4, !tbaa !9
  %219 = and i32 %218, 16
  %220 = icmp ne i32 %219, 0
  br i1 %220, label %221, label %316

221:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 40, ptr %20) #10
  %222 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 46
  %223 = load ptr, ptr %222, align 8, !tbaa !53
  %224 = getelementptr inbounds %class.b2World, ptr %223, i32 0, i32 1
  %225 = load i32, ptr %7, align 4, !tbaa !9
  %226 = load i32, ptr %6, align 4, !tbaa !9
  %227 = sub nsw i32 %225, %226
  call void @_ZN16b2VoronoiDiagramC1EP16b2StackAllocatori(ptr noundef nonnull align 8 dereferenceable(40) %20, ptr noundef %224, i32 noundef %227)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #10
  %228 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %228, ptr %21, align 4, !tbaa !9
  br label %229

229:                                              ; preds = %277, %221
  %230 = load i32, ptr %21, align 4, !tbaa !9
  %231 = load i32, ptr %7, align 4, !tbaa !9
  %232 = icmp slt i32 %230, %231
  br i1 %232, label %234, label %233

233:                                              ; preds = %229
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  br label %280

234:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  %235 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 16
  %236 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.0", ptr %235, i32 0, i32 0
  %237 = load ptr, ptr %236, align 8, !tbaa !11
  %238 = load i32, ptr %21, align 4, !tbaa !9
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds i32, ptr %237, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !9
  store i32 %241, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %242 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 26
  %243 = load ptr, ptr %242, align 8, !tbaa !37
  %244 = load i32, ptr %21, align 4, !tbaa !9
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds ptr, ptr %243, i64 %245
  %247 = load ptr, ptr %246, align 8, !tbaa !5
  store ptr %247, ptr %23, align 8, !tbaa !5
  %248 = load i32, ptr %22, align 4, !tbaa !9
  %249 = and i32 %248, 2
  %250 = icmp ne i32 %249, 0
  br i1 %250, label %276, label %251

251:                                              ; preds = %234
  %252 = load i32, ptr %22, align 4, !tbaa !9
  %253 = load ptr, ptr %23, align 8, !tbaa !5
  %254 = invoke noundef zeroext i1 @_ZL22ParticleCanBeConnectedjP15b2ParticleGroup(i32 noundef %252, ptr noundef %253)
          to label %255 unwind label %272

255:                                              ; preds = %251
  br i1 %254, label %256, label %276

256:                                              ; preds = %255
  %257 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 17
  %258 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %257, i32 0, i32 0
  %259 = load ptr, ptr %258, align 8, !tbaa !50
  %260 = load i32, ptr %21, align 4, !tbaa !9
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds %struct.b2Vec2, ptr %259, i64 %261
  %263 = load i32, ptr %21, align 4, !tbaa !9
  %264 = load ptr, ptr %8, align 8, !tbaa !5
  %265 = load i32, ptr %21, align 4, !tbaa !9
  %266 = load ptr, ptr %264, align 8, !tbaa !38
  %267 = getelementptr inbounds ptr, ptr %266, i64 2
  %268 = load ptr, ptr %267, align 8
  %269 = invoke noundef zeroext i1 %268(ptr noundef nonnull align 8 dereferenceable(8) %264, i32 noundef %265)
          to label %270 unwind label %272

270:                                              ; preds = %256
  invoke void @_ZN16b2VoronoiDiagram12AddGeneratorERK6b2Vec2ib(ptr noundef nonnull align 8 dereferenceable(40) %20, ptr noundef nonnull align 4 dereferenceable(8) %262, i32 noundef %263, i1 noundef zeroext %269)
          to label %271 unwind label %272

271:                                              ; preds = %270
  br label %276

272:                                              ; preds = %270, %256, %251
  %273 = landingpad { ptr, i32 }
          cleanup
  %274 = extractvalue { ptr, i32 } %273, 0
  store ptr %274, ptr %24, align 8
  %275 = extractvalue { ptr, i32 } %273, 1
  store i32 %275, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  br label %315

276:                                              ; preds = %271, %255, %234
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  br label %277

277:                                              ; preds = %276
  %278 = load i32, ptr %21, align 4, !tbaa !9
  %279 = add nsw i32 %278, 1
  store i32 %279, ptr %21, align 4, !tbaa !9
  br label %229, !llvm.loop !54

280:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #10
  %281 = invoke noundef float @_ZNK16b2ParticleSystem17GetParticleStrideEv(ptr noundef nonnull align 8 dereferenceable(632) %28)
          to label %282 unwind label %301

282:                                              ; preds = %280
  store float %281, ptr %26, align 4, !tbaa !55
  %283 = load float, ptr %26, align 4, !tbaa !55
  %284 = fdiv float %283, 2.000000e+00
  %285 = load float, ptr %26, align 4, !tbaa !55
  %286 = fmul float %285, 2.000000e+00
  invoke void @_ZN16b2VoronoiDiagram8GenerateEff(ptr noundef nonnull align 8 dereferenceable(40) %20, float noundef %284, float noundef %286)
          to label %287 unwind label %301

287:                                              ; preds = %282
  call void @llvm.lifetime.start.p0(i64 24, ptr %27) #10
  %288 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZZN16b2ParticleSystem20UpdatePairsAndTriadsEiiRKNS_16ConnectionFilterEEN20UpdateTriadsCallbackC2EPS_PS1_(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef %28, ptr noundef %288)
          to label %289 unwind label %305

289:                                              ; preds = %287
  invoke void @_ZNK16b2VoronoiDiagram8GetNodesERNS_12NodeCallbackE(ptr noundef nonnull align 8 dereferenceable(40) %20, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %290 unwind label %309

290:                                              ; preds = %289
  %291 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 38
  %292 = invoke noundef ptr @_ZN16b2GrowableBufferI15b2ParticleTriadE5BeginEv(ptr noundef nonnull align 8 dereferenceable(24) %291)
          to label %293 unwind label %309

293:                                              ; preds = %290
  %294 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 38
  %295 = invoke noundef ptr @_ZN16b2GrowableBufferI15b2ParticleTriadE3EndEv(ptr noundef nonnull align 8 dereferenceable(24) %294)
          to label %296 unwind label %309

296:                                              ; preds = %293
  invoke void @_ZSt11stable_sortIP15b2ParticleTriadPFbRKS0_S3_EEvT_S6_T0_(ptr noundef %292, ptr noundef %295, ptr noundef @_ZN16b2ParticleSystem19CompareTriadIndicesERK15b2ParticleTriadS2_)
          to label %297 unwind label %309

297:                                              ; preds = %296
  %298 = getelementptr inbounds %class.b2ParticleSystem, ptr %28, i32 0, i32 38
  %299 = invoke noundef ptr @_ZN16b2GrowableBufferI15b2ParticleTriadE6UniqueIPFbRKS0_S4_EEEPS0_T_(ptr noundef nonnull align 8 dereferenceable(24) %298, ptr noundef @_ZN16b2ParticleSystem17MatchTriadIndicesERK15b2ParticleTriadS2_)
          to label %300 unwind label %309

300:                                              ; preds = %297
  call void @_ZN16b2VoronoiDiagram12NodeCallbackD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #10
  call void @_ZN16b2VoronoiDiagramD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #10
  br label %316

301:                                              ; preds = %282, %280
  %302 = landingpad { ptr, i32 }
          cleanup
  %303 = extractvalue { ptr, i32 } %302, 0
  store ptr %303, ptr %24, align 8
  %304 = extractvalue { ptr, i32 } %302, 1
  store i32 %304, ptr %25, align 4
  br label %314

305:                                              ; preds = %287
  %306 = landingpad { ptr, i32 }
          cleanup
  %307 = extractvalue { ptr, i32 } %306, 0
  store ptr %307, ptr %24, align 8
  %308 = extractvalue { ptr, i32 } %306, 1
  store i32 %308, ptr %25, align 4
  br label %313

309:                                              ; preds = %297, %296, %293, %290, %289
  %310 = landingpad { ptr, i32 }
          cleanup
  %311 = extractvalue { ptr, i32 } %310, 0
  store ptr %311, ptr %24, align 8
  %312 = extractvalue { ptr, i32 } %310, 1
  store i32 %312, ptr %25, align 4
  call void @_ZN16b2VoronoiDiagram12NodeCallbackD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #10
  br label %313

313:                                              ; preds = %309, %305
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #10
  br label %314

314:                                              ; preds = %313, %301
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #10
  br label %315

315:                                              ; preds = %314, %272
  call void @_ZN16b2VoronoiDiagramD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  br label %317

316:                                              ; preds = %300, %217
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  ret void

317:                                              ; preds = %315
  %318 = load ptr, ptr %24, align 8
  %319 = load i32, ptr %25, align 4
  %320 = insertvalue { ptr, i32 } poison, ptr %318, 0
  %321 = insertvalue { ptr, i32 } %320, i32 %319, 1
  resume { ptr, i32 } %321
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZL22ParticleCanBeConnectedjP15b2ParticleGroup(i32 noundef, ptr noundef) #4

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11stable_sortIP14b2ParticlePairPFbRKS0_S3_EEvT_S6_T0_(ptr noundef, ptr noundef, ptr noundef) #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN16b2ParticleSystem18ComparePairIndicesERK14b2ParticlePairS2_(ptr noundef nonnull align 4 dereferenceable(20), ptr noundef nonnull align 4 dereferenceable(20)) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN16b2ParticleSystem16MatchPairIndicesERK14b2ParticlePairS2_(ptr noundef nonnull align 4 dereferenceable(20), ptr noundef nonnull align 4 dereferenceable(20)) #4 align 2

declare void @_ZN16b2VoronoiDiagramC1EP16b2StackAllocatori(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, i32 noundef) unnamed_addr #7

declare void @_ZN16b2VoronoiDiagram12AddGeneratorERK6b2Vec2ib(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i1 noundef zeroext) #7

declare void @_ZN16b2VoronoiDiagram8GenerateEff(ptr noundef nonnull align 8 dereferenceable(40), float noundef, float noundef) #7

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZZN16b2ParticleSystem20UpdatePairsAndTriadsEiiRKNS_16ConnectionFilterEEN20UpdateTriadsCallbackC2EPS_PS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef) unnamed_addr #4 align 2

declare void @_ZNK16b2VoronoiDiagram8GetNodesERNS_12NodeCallbackE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(8)) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11stable_sortIP15b2ParticleTriadPFbRKS0_S3_EEvT_S6_T0_(ptr noundef, ptr noundef, ptr noundef) #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN16b2ParticleSystem19CompareTriadIndicesERK15b2ParticleTriadS2_(ptr noundef nonnull align 4 dereferenceable(60), ptr noundef nonnull align 4 dereferenceable(60)) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN16b2ParticleSystem17MatchTriadIndicesERK15b2ParticleTriadS2_(ptr noundef nonnull align 4 dereferenceable(60), ptr noundef nonnull align 4 dereferenceable(60)) #4 align 2

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

; Function Attrs: nounwind
declare void @_ZN16b2VoronoiDiagramD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #8

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

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

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


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

%class.b2VoronoiDiagram = type { ptr, ptr, i32, i32, i32, i32, ptr }
%class.UpdateTriadsCallback = type { %"class.b2VoronoiDiagram::NodeCallback", ptr, ptr }
%"class.b2VoronoiDiagram::NodeCallback" = type { ptr }
%struct.b2Vec2 = type { float, float }

@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__._ZN16b2ParticleSystem20UpdatePairsAndTriadsEiiRKNS_16ConnectionFilterE = external hidden unnamed_addr constant [84 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem20UpdatePairsAndTriadsEiiRKNS_16ConnectionFilterE(ptr noundef nonnull align 8 dereferenceable(632) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(8) %3) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %class.b2VoronoiDiagram, align 8
  %6 = alloca %class.UpdateTriadsCallback, align 8
  %.not = icmp sgt i32 %1, %2
  br i1 %.not, label %17, label %.preheader108

.preheader108:                                    ; preds = %4
  %7 = icmp slt i32 %1, %2
  br i1 %7, label %.lr.ph, label %.thread

.lr.ph:                                           ; preds = %.preheader108
  %8 = getelementptr inbounds i8, ptr %0, i64 128
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = sext i32 %1 to i64
  %wide.trip.count = sext i32 %2 to i64
  %11 = sub nsw i64 %wide.trip.count, %10
  %min.iters.check = icmp ult i64 %11, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ %10, %.lr.ph ], [ %ind.end, %middle.block ]
  %.0110.ph = phi i32 [ 0, %.lr.ph ], [ %16, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %11, -8
  %ind.end = add nsw i64 %n.vec, %10
  %invariant.gep = getelementptr i32, ptr %9, i64 %10
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %13, %vector.body ]
  %vec.phi128 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %14, %vector.body ]
  %gep = getelementptr i32, ptr %invariant.gep, i64 %index
  %12 = getelementptr inbounds i8, ptr %gep, i64 16
  %wide.load = load <4 x i32>, ptr %gep, align 4, !tbaa !33
  %wide.load129 = load <4 x i32>, ptr %12, align 4, !tbaa !33
  %13 = or <4 x i32> %wide.load, %vec.phi
  %14 = or <4 x i32> %wide.load129, %vec.phi128
  %index.next = add nuw i64 %index, 8
  %15 = icmp eq i64 %index.next, %n.vec
  br i1 %15, label %middle.block, label %vector.body, !llvm.loop !34

middle.block:                                     ; preds = %vector.body
  %bin.rdx = or <4 x i32> %14, %13
  %16 = tail call i32 @llvm.vector.reduce.or.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %11, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

17:                                               ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.1, i32 noundef 1448, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN16b2ParticleSystem20UpdatePairsAndTriadsEiiRKNS_16ConnectionFilterE) #10
  unreachable

._crit_edge:                                      ; preds = %scalar.ph, %middle.block
  %.lcssa = phi i32 [ %16, %middle.block ], [ %28, %scalar.ph ]
  %18 = and i32 %.lcssa, 1032
  %.not88 = icmp eq i32 %18, 0
  br i1 %.not88, label %100, label %.preheader

.preheader:                                       ; preds = %._crit_edge
  %19 = getelementptr inbounds i8, ptr %0, i64 368
  %20 = tail call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %19)
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph112, label %._crit_edge113

.lr.ph112:                                        ; preds = %.preheader
  %22 = getelementptr inbounds i8, ptr %0, i64 128
  %23 = getelementptr inbounds i8, ptr %0, i64 240
  %24 = getelementptr inbounds i8, ptr %0, i64 416
  %25 = getelementptr inbounds i8, ptr %0, i64 144
  br label %33

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.0110 = phi i32 [ %28, %scalar.ph ], [ %.0110.ph, %scalar.ph.preheader ]
  %26 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv
  %27 = load i32, ptr %26, align 4, !tbaa !33
  %28 = or i32 %27, %.0110
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !38

._crit_edge113:                                   ; preds = %96, %.preheader
  %29 = getelementptr inbounds i8, ptr %0, i64 416
  %30 = tail call noundef ptr @_ZN16b2GrowableBufferI14b2ParticlePairE5BeginEv(ptr noundef nonnull align 8 dereferenceable(24) %29)
  %31 = tail call noundef ptr @_ZN16b2GrowableBufferI14b2ParticlePairE3EndEv(ptr noundef nonnull align 8 dereferenceable(24) %29)
  tail call void @_ZSt11stable_sortIP14b2ParticlePairPFbRKS0_S3_EEvT_S6_T0_(ptr noundef %30, ptr noundef %31, ptr noundef nonnull @_ZN16b2ParticleSystem18ComparePairIndicesERK14b2ParticlePairS2_)
  %32 = tail call noundef ptr @_ZN16b2GrowableBufferI14b2ParticlePairE6UniqueIPFbRKS0_S4_EEEPS0_T_(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull @_ZN16b2ParticleSystem16MatchPairIndicesERK14b2ParticlePairS2_)
  br label %100

33:                                               ; preds = %.lr.ph112, %96
  %.080111 = phi i32 [ 0, %.lr.ph112 ], [ %97, %96 ]
  %34 = tail call noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef %.080111)
  %35 = tail call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %34)
  %36 = tail call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %34)
  %37 = load ptr, ptr %22, align 8, !tbaa !5
  %38 = sext i32 %35 to i64
  %39 = getelementptr inbounds i32, ptr %37, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !33
  %41 = sext i32 %36 to i64
  %42 = getelementptr inbounds i32, ptr %37, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !33
  %44 = load ptr, ptr %23, align 8, !tbaa !39
  %45 = getelementptr inbounds ptr, ptr %44, i64 %38
  %46 = load ptr, ptr %45, align 8, !tbaa !40
  %47 = getelementptr inbounds ptr, ptr %44, i64 %41
  %48 = load ptr, ptr %47, align 8, !tbaa !40
  %.not94 = icmp sge i32 %35, %1
  %49 = icmp slt i32 %35, %2
  %or.cond.not104.not107 = and i1 %.not94, %49
  %.not95 = icmp sge i32 %36, %1
  %or.cond100.not105 = and i1 %or.cond.not104.not107, %.not95
  %50 = icmp slt i32 %36, %2
  %or.cond101 = and i1 %50, %or.cond100.not105
  br i1 %or.cond101, label %51, label %96

51:                                               ; preds = %33
  %52 = or i32 %43, %40
  %53 = and i32 %52, 2
  %.not96 = icmp ne i32 %53, 0
  %54 = and i32 %52, 1032
  %.not97 = icmp eq i32 %54, 0
  %or.cond102 = or i1 %.not96, %.not97
  br i1 %or.cond102, label %96, label %55

55:                                               ; preds = %51
  %56 = load ptr, ptr %3, align 8, !tbaa !41
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  %58 = load ptr, ptr %57, align 8
  %59 = tail call noundef zeroext i1 %58(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %35)
  br i1 %59, label %65, label %60

60:                                               ; preds = %55
  %61 = load ptr, ptr %3, align 8, !tbaa !41
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  %63 = load ptr, ptr %62, align 8
  %64 = tail call noundef zeroext i1 %63(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %36)
  br i1 %64, label %65, label %96

65:                                               ; preds = %60, %55
  %66 = tail call noundef zeroext i1 @_ZL22ParticleCanBeConnectedjP15b2ParticleGroup(i32 noundef %40, ptr noundef %46)
  br i1 %66, label %67, label %96

67:                                               ; preds = %65
  %68 = tail call noundef zeroext i1 @_ZL22ParticleCanBeConnectedjP15b2ParticleGroup(i32 noundef %43, ptr noundef %48)
  br i1 %68, label %69, label %96

69:                                               ; preds = %67
  %70 = load ptr, ptr %3, align 8, !tbaa !41
  %71 = getelementptr inbounds i8, ptr %70, i64 24
  %72 = load ptr, ptr %71, align 8
  %73 = tail call noundef zeroext i1 %72(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %35, i32 noundef %36)
  br i1 %73, label %74, label %96

74:                                               ; preds = %69
  %75 = tail call noundef nonnull align 4 dereferenceable(20) ptr @_ZN16b2GrowableBufferI14b2ParticlePairE6AppendEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
  store i32 %35, ptr %75, align 4, !tbaa !43
  %76 = getelementptr inbounds i8, ptr %75, i64 4
  store i32 %36, ptr %76, align 4, !tbaa !45
  %77 = tail call noundef i32 @_ZNK17b2ParticleContact8GetFlagsEv(ptr noundef nonnull align 4 dereferenceable(24) %34)
  %78 = getelementptr inbounds i8, ptr %75, i64 8
  store i32 %77, ptr %78, align 4, !tbaa !46
  %.not98 = icmp eq ptr %46, null
  br i1 %.not98, label %82, label %79

79:                                               ; preds = %74
  %80 = getelementptr inbounds i8, ptr %46, i64 20
  %81 = load float, ptr %80, align 4, !tbaa !47
  br label %82

82:                                               ; preds = %74, %79
  %83 = phi float [ %81, %79 ], [ 1.000000e+00, %74 ]
  %.not99 = icmp eq ptr %48, null
  br i1 %.not99, label %87, label %84

84:                                               ; preds = %82
  %85 = getelementptr inbounds i8, ptr %48, i64 20
  %86 = load float, ptr %85, align 4, !tbaa !47
  br label %87

87:                                               ; preds = %82, %84
  %88 = phi float [ %86, %84 ], [ 1.000000e+00, %82 ]
  %89 = tail call noundef float @_Z5b2MinIfET_S0_S0_(float noundef %83, float noundef %88)
  %90 = getelementptr inbounds i8, ptr %75, i64 12
  store float %89, ptr %90, align 4, !tbaa !52
  %91 = load ptr, ptr %25, align 8, !tbaa !53
  %92 = getelementptr inbounds %struct.b2Vec2, ptr %91, i64 %38
  %93 = getelementptr inbounds %struct.b2Vec2, ptr %91, i64 %41
  %94 = tail call noundef float @_Z10b2DistanceRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %92, ptr noundef nonnull align 4 dereferenceable(8) %93)
  %95 = getelementptr inbounds i8, ptr %75, i64 16
  store float %94, ptr %95, align 4, !tbaa !54
  br label %96

96:                                               ; preds = %87, %69, %67, %65, %60, %51, %33
  %97 = add nuw nsw i32 %.080111, 1
  %98 = tail call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %19)
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %33, label %._crit_edge113, !llvm.loop !55

100:                                              ; preds = %._crit_edge113, %._crit_edge
  %101 = and i32 %.lcssa, 16
  %.not89 = icmp eq i32 %101, 0
  br i1 %.not89, label %.thread, label %102

102:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #11
  %103 = getelementptr inbounds i8, ptr %0, i64 608
  %104 = load ptr, ptr %103, align 8, !tbaa !56
  %105 = getelementptr inbounds i8, ptr %104, i64 128
  %106 = sub nsw i32 %2, %1
  call void @_ZN16b2VoronoiDiagramC1EP16b2StackAllocatori(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef nonnull %105, i32 noundef %106)
  br i1 %7, label %.lr.ph116, label %._crit_edge117

.lr.ph116:                                        ; preds = %102
  %107 = getelementptr inbounds i8, ptr %0, i64 128
  %108 = getelementptr inbounds i8, ptr %0, i64 240
  %109 = getelementptr inbounds i8, ptr %0, i64 144
  %110 = sext i32 %1 to i64
  br label %114

._crit_edge117:                                   ; preds = %135, %102
  %111 = call noundef float @_ZNK16b2ParticleSystem17GetParticleStrideEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  %112 = fmul float %111, 5.000000e-01
  %113 = fmul float %111, 2.000000e+00
  invoke void @_ZN16b2VoronoiDiagram8GenerateEff(ptr noundef nonnull align 8 dereferenceable(40) %5, float noundef %112, float noundef %113)
          to label %136 unwind label %144

114:                                              ; preds = %.lr.ph116, %135
  %indvars.iv119 = phi i64 [ %110, %.lr.ph116 ], [ %indvars.iv.next120, %135 ]
  %115 = load ptr, ptr %107, align 8, !tbaa !5
  %116 = getelementptr inbounds i32, ptr %115, i64 %indvars.iv119
  %117 = load i32, ptr %116, align 4, !tbaa !33
  %118 = and i32 %117, 2
  %.not91 = icmp eq i32 %118, 0
  br i1 %.not91, label %119, label %135

119:                                              ; preds = %114
  %120 = load ptr, ptr %108, align 8, !tbaa !39
  %121 = getelementptr inbounds ptr, ptr %120, i64 %indvars.iv119
  %122 = load ptr, ptr %121, align 8, !tbaa !40
  %123 = call noundef zeroext i1 @_ZL22ParticleCanBeConnectedjP15b2ParticleGroup(i32 noundef %117, ptr noundef %122)
  br i1 %123, label %124, label %135

124:                                              ; preds = %119
  %125 = load ptr, ptr %109, align 8, !tbaa !53
  %126 = load ptr, ptr %3, align 8, !tbaa !41
  %127 = getelementptr inbounds i8, ptr %126, i64 16
  %128 = load ptr, ptr %127, align 8
  %129 = trunc nsw i64 %indvars.iv119 to i32
  %130 = invoke noundef zeroext i1 %128(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %129)
          to label %131 unwind label %133

131:                                              ; preds = %124
  %132 = getelementptr inbounds %struct.b2Vec2, ptr %125, i64 %indvars.iv119
  invoke void @_ZN16b2VoronoiDiagram12AddGeneratorERK6b2Vec2ib(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef nonnull align 4 dereferenceable(8) %132, i32 noundef %129, i1 noundef zeroext %130)
          to label %135 unwind label %133

133:                                              ; preds = %131, %124
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %148

135:                                              ; preds = %131, %119, %114
  %indvars.iv.next120 = add nsw i64 %indvars.iv119, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next120 to i32
  %exitcond122.not = icmp eq i32 %lftr.wideiv, %2
  br i1 %exitcond122.not, label %._crit_edge117, label %114, !llvm.loop !57

136:                                              ; preds = %._crit_edge117
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #11
  call void @_ZZN16b2ParticleSystem20UpdatePairsAndTriadsEiiRKNS_16ConnectionFilterEEN20UpdateTriadsCallbackC2EPS_PS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull %0, ptr noundef nonnull %3)
  invoke void @_ZNK16b2VoronoiDiagram8GetNodesERNS_12NodeCallbackE(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %137 unwind label %146

137:                                              ; preds = %136
  %138 = getelementptr inbounds i8, ptr %0, i64 440
  %139 = call noundef ptr @_ZN16b2GrowableBufferI15b2ParticleTriadE5BeginEv(ptr noundef nonnull align 8 dereferenceable(24) %138)
  %140 = call noundef ptr @_ZN16b2GrowableBufferI15b2ParticleTriadE3EndEv(ptr noundef nonnull align 8 dereferenceable(24) %138)
  invoke void @_ZSt11stable_sortIP15b2ParticleTriadPFbRKS0_S3_EEvT_S6_T0_(ptr noundef %139, ptr noundef %140, ptr noundef nonnull @_ZN16b2ParticleSystem19CompareTriadIndicesERK15b2ParticleTriadS2_)
          to label %141 unwind label %146

141:                                              ; preds = %137
  %142 = invoke noundef ptr @_ZN16b2GrowableBufferI15b2ParticleTriadE6UniqueIPFbRKS0_S4_EEEPS0_T_(ptr noundef nonnull align 8 dereferenceable(24) %138, ptr noundef nonnull @_ZN16b2ParticleSystem17MatchTriadIndicesERK15b2ParticleTriadS2_)
          to label %143 unwind label %146

143:                                              ; preds = %141
  call void @_ZN16b2VoronoiDiagram12NodeCallbackD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #11
  call void @_ZN16b2VoronoiDiagramD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #11
  br label %.thread

144:                                              ; preds = %._crit_edge117
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %148

146:                                              ; preds = %141, %137, %136
  %147 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN16b2VoronoiDiagram12NodeCallbackD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #11
  br label %148

148:                                              ; preds = %144, %146, %133
  %.pn92 = phi { ptr, i32 } [ %134, %133 ], [ %147, %146 ], [ %145, %144 ]
  call void @_ZN16b2VoronoiDiagramD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #11
  resume { ptr, i32 } %.pn92

.thread:                                          ; preds = %.preheader108, %143, %100
  ret void
}

; 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 hidden noundef zeroext i1 @_ZL22ParticleCanBeConnectedjP15b2ParticleGroup(i32 noundef, ptr noundef) local_unnamed_addr #4

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11stable_sortIP14b2ParticlePairPFbRKS0_S3_EEvT_S6_T0_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN16b2ParticleSystem18ComparePairIndicesERK14b2ParticlePairS2_(ptr noundef nonnull align 4 dereferenceable(20), ptr noundef nonnull align 4 dereferenceable(20)) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN16b2ParticleSystem16MatchPairIndicesERK14b2ParticlePairS2_(ptr noundef nonnull align 4 dereferenceable(20), ptr noundef nonnull align 4 dereferenceable(20)) #4 align 2

declare void @_ZN16b2VoronoiDiagramC1EP16b2StackAllocatori(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, i32 noundef) unnamed_addr #7

declare void @_ZN16b2VoronoiDiagram12AddGeneratorERK6b2Vec2ib(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i1 noundef zeroext) local_unnamed_addr #7

declare void @_ZN16b2VoronoiDiagram8GenerateEff(ptr noundef nonnull align 8 dereferenceable(40), float noundef, float noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZZN16b2ParticleSystem20UpdatePairsAndTriadsEiiRKNS_16ConnectionFilterEEN20UpdateTriadsCallbackC2EPS_PS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef) unnamed_addr #4 align 2

declare void @_ZNK16b2VoronoiDiagram8GetNodesERNS_12NodeCallbackE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11stable_sortIP15b2ParticleTriadPFbRKS0_S3_EEvT_S6_T0_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN16b2ParticleSystem19CompareTriadIndicesERK15b2ParticleTriadS2_(ptr noundef nonnull align 4 dereferenceable(60), ptr noundef nonnull align 4 dereferenceable(60)) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN16b2ParticleSystem17MatchTriadIndicesERK15b2ParticleTriadS2_(ptr noundef nonnull align 4 dereferenceable(60), ptr noundef nonnull align 4 dereferenceable(60)) #4 align 2

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

; Function Attrs: nounwind
declare void @_ZN16b2VoronoiDiagramD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #8

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.or.v4i32(<4 x i32>) #9

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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { "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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { noreturn nounwind }
attributes #11 = { 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 128}
!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 = !{!10, !10, i64 0}
!34 = distinct !{!34, !35, !36, !37}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!"llvm.loop.isvectorized", i32 1}
!37 = !{!"llvm.loop.unroll.runtime.disable"}
!38 = distinct !{!38, !35, !37, !36}
!39 = !{!6, !16, i64 240}
!40 = !{!16, !16, i64 0}
!41 = !{!42, !42, i64 0}
!42 = !{!"vtable pointer", !9, i64 0}
!43 = !{!44, !10, i64 0}
!44 = !{!"_ZTS14b2ParticlePair", !10, i64 0, !10, i64 4, !10, i64 8, !11, i64 12, !11, i64 16}
!45 = !{!44, !10, i64 4}
!46 = !{!44, !10, i64 8}
!47 = !{!48, !11, i64 20}
!48 = !{!"_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, !49, i64 52, !49, i64 60, !11, i64 68, !50, i64 72, !16, i64 88}
!49 = !{!"_ZTS6b2Vec2", !11, i64 0, !11, i64 4}
!50 = !{!"_ZTS11b2Transform", !49, i64 0, !51, i64 8}
!51 = !{!"_ZTS5b2Rot", !11, i64 0, !11, i64 4}
!52 = !{!44, !11, i64 12}
!53 = !{!6, !16, i64 144}
!54 = !{!44, !11, i64 16}
!55 = distinct !{!55, !35}
!56 = !{!6, !16, i64 608}
!57 = distinct !{!57, !35}


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