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

; 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.FixtureParticleSet = type { %"class.(anonymous namespace)::TypedFixedSetAllocator.16" }
%"class.(anonymous namespace)::TypedFixedSetAllocator.16" = type { %"class.(anonymous namespace)::FixedSetAllocator" }
%"class.(anonymous namespace)::FixedSetAllocator" = type { ptr, ptr, i32, ptr }
%class.UpdateBodyContactsCallback = type { %class.b2FixtureParticleQueryCallback, ptr }
%class.b2FixtureParticleQueryCallback = type { %class.b2QueryCallback, ptr }
%class.b2QueryCallback = type { ptr }
%struct.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%struct.b2Vec2 = type { float, float }
%class.b2ParticleSystem = type { i8, i32, i32, i8, i32, i8, i8, i32, float, float, float, float, i32, i32, %class.b2SlabAllocator, %"struct.b2ParticleSystem::UserOverridableBuffer", %"struct.b2ParticleSystem::UserOverridableBuffer.0", %"struct.b2ParticleSystem::UserOverridableBuffer.2", %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr, ptr, ptr, ptr, ptr, ptr, %"struct.b2ParticleSystem::UserOverridableBuffer.4", ptr, %"struct.b2ParticleSystem::UserOverridableBuffer.6", i32, [4 x i8], %"struct.b2ParticleSystem::UserOverridableBuffer.8", %"struct.b2ParticleSystem::UserOverridableBuffer.8", %"struct.b2ParticleSystem::UserOverridableBuffer.8", %class.b2GrowableBuffer, %class.b2GrowableBuffer.10, %class.b2GrowableBuffer.11, %class.b2GrowableBuffer.12, %class.b2GrowableBuffer.13, %class.b2GrowableBuffer.14, %"struct.b2ParticleSystem::UserOverridableBuffer.8", %"struct.b2ParticleSystem::UserOverridableBuffer.8", i64, i8, i32, ptr, %struct.b2ParticleSystemDef, ptr, ptr, ptr }
%class.b2SlabAllocator = type { %class.b2TrackedBlockAllocator, i32, %class.b2TypedFreeList }
%class.b2TrackedBlockAllocator = type { %class.b2TypedIntrusiveListNode }
%class.b2TypedIntrusiveListNode = type { %class.b2IntrusiveListNode }
%class.b2IntrusiveListNode = type { ptr, ptr }
%class.b2TypedFreeList = type { %class.b2FreeList }
%class.b2FreeList = type { %class.b2IntrusiveListNode, %class.b2IntrusiveListNode }
%"struct.b2ParticleSystem::UserOverridableBuffer" = type <{ ptr, i32, [4 x i8] }>
%"struct.b2ParticleSystem::UserOverridableBuffer.0" = type <{ ptr, i32, [4 x i8] }>
%"struct.b2ParticleSystem::UserOverridableBuffer.2" = type <{ ptr, i32, [4 x i8] }>
%"struct.b2ParticleSystem::UserOverridableBuffer.4" = type <{ ptr, i32, [4 x i8] }>
%"struct.b2ParticleSystem::UserOverridableBuffer.6" = type <{ ptr, i32, [4 x i8] }>
%class.b2GrowableBuffer = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.10 = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.11 = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.12 = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.13 = type { ptr, i32, i32, ptr }
%class.b2GrowableBuffer.14 = type { ptr, i32, i32, ptr }
%"struct.b2ParticleSystem::UserOverridableBuffer.8" = type <{ ptr, i32, [4 x i8] }>
%struct.b2ParticleSystemDef = type { i8, float, float, float, i32, float, float, float, float, float, float, float, float, float, float, float, float, i32, float, i8, float }
%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 }
%class.b2IntHashTable = type <{ ptr, i32, [4 x i8] }>
%struct.b2Profile = type { float, float, float, float, float }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN7b2World9QueryAABBEP15b2QueryCallbackRK6b2AABB(ptr noundef nonnull align 8 dereferenceable(103352), ptr noundef, ptr noundef nonnull align 4 dereferenceable(16)) #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem18UpdateBodyContactsEv(ptr noundef nonnull align 8 dereferenceable(632) %0) #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %class.FixtureParticleSet, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %class.UpdateBodyContactsCallback, align 8
  %9 = alloca %struct.b2AABB, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #7
  %11 = getelementptr inbounds %class.b2ParticleSystem, ptr %10, i32 0, i32 46
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  %13 = getelementptr inbounds %class.b2World, ptr %12, i32 0, i32 1
  call void @_ZN18FixtureParticleSetC2EP16b2StackAllocator(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef %13)
  invoke void @_ZNK16b2ParticleSystem35NotifyBodyContactListenerPreContactEP18FixtureParticleSet(ptr noundef nonnull align 8 dereferenceable(632) %10, ptr noundef %3)
          to label %14 unwind label %26

14:                                               ; preds = %1
  %15 = getelementptr inbounds %class.b2ParticleSystem, ptr %10, i32 0, i32 28
  %16 = load i32, ptr %15, align 8, !tbaa !34
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %18, label %64

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %19 = invoke noundef i32 @_ZNK16b2ParticleSystem16GetParticleCountEv(ptr noundef nonnull align 8 dereferenceable(632) %10)
          to label %20 unwind label %30

20:                                               ; preds = %18
  store i32 %19, ptr %6, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !35
  br label %21

21:                                               ; preds = %60, %20
  %22 = load i32, ptr %7, align 4, !tbaa !35
  %23 = load i32, ptr %6, align 4, !tbaa !35
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %34, label %25

25:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %63

26:                                               ; preds = %66, %64, %1
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %4, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %5, align 4
  br label %94

30:                                               ; preds = %18
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %4, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %94

34:                                               ; preds = %21
  %35 = getelementptr inbounds %class.b2ParticleSystem, ptr %10, i32 0, i32 31
  %36 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !36
  %38 = load i32, ptr %7, align 4, !tbaa !35
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds i32, ptr %37, i64 %39
  store i32 0, ptr %40, align 4, !tbaa !35
  %41 = getelementptr inbounds %class.b2ParticleSystem, ptr %10, i32 0, i32 1
  %42 = load i32, ptr %41, align 4, !tbaa !37
  %43 = getelementptr inbounds %class.b2ParticleSystem, ptr %10, i32 0, i32 30
  %44 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !38
  %46 = load i32, ptr %7, align 4, !tbaa !35
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr %45, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !35
  %50 = add nsw i32 %49, 1
  %51 = icmp sgt i32 %42, %50
  br i1 %51, label %52, label %59

52:                                               ; preds = %34
  %53 = getelementptr inbounds %class.b2ParticleSystem, ptr %10, i32 0, i32 32
  %54 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.8", ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !39
  %56 = load i32, ptr %7, align 4, !tbaa !35
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i32, ptr %55, i64 %57
  store i32 0, ptr %58, align 4, !tbaa !35
  br label %59

59:                                               ; preds = %52, %34
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %7, align 4, !tbaa !35
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %7, align 4, !tbaa !35
  br label %21, !llvm.loop !40

63:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %64

64:                                               ; preds = %63, %14
  %65 = getelementptr inbounds %class.b2ParticleSystem, ptr %10, i32 0, i32 36
  invoke void @_ZN16b2GrowableBufferI21b2ParticleBodyContactE8SetCountEi(ptr noundef nonnull align 8 dereferenceable(24) %65, i32 noundef 0)
          to label %66 unwind label %26

66:                                               ; preds = %64
  %67 = getelementptr inbounds %class.b2ParticleSystem, ptr %10, i32 0, i32 33
  invoke void @_ZN16b2GrowableBufferIiE8SetCountEi(ptr noundef nonnull align 8 dereferenceable(24) %67, i32 noundef 0)
          to label %68 unwind label %26

68:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #7
  %69 = invoke noundef ptr @_ZNK16b2ParticleSystem23GetFixtureContactFilterEv(ptr noundef nonnull align 8 dereferenceable(632) %10)
          to label %70 unwind label %83

70:                                               ; preds = %68
  invoke void @_ZZN16b2ParticleSystem18UpdateBodyContactsEvEN26UpdateBodyContactsCallbackC2EPS_P15b2ContactFilter(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef %10, ptr noundef %69)
          to label %71 unwind label %83

71:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  invoke void @_ZN6b2AABBC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %9)
          to label %72 unwind label %87

72:                                               ; preds = %71
  invoke void @_ZNK16b2ParticleSystem11ComputeAABBEP6b2AABB(ptr noundef nonnull align 8 dereferenceable(632) %10, ptr noundef %9)
          to label %73 unwind label %87

73:                                               ; preds = %72
  %74 = getelementptr inbounds %class.b2ParticleSystem, ptr %10, i32 0, i32 46
  %75 = load ptr, ptr %74, align 8, !tbaa !9
  invoke void @_ZN7b2World9QueryAABBEP15b2QueryCallbackRK6b2AABB(ptr noundef nonnull align 8 dereferenceable(103352) %75, ptr noundef %8, ptr noundef nonnull align 4 dereferenceable(16) %9)
          to label %76 unwind label %87

76:                                               ; preds = %73
  %77 = getelementptr inbounds %class.b2ParticleSystem, ptr %10, i32 0, i32 45
  %78 = getelementptr inbounds %struct.b2ParticleSystemDef, ptr %77, i32 0, i32 0
  %79 = load i8, ptr %78, align 8, !tbaa !42, !range !43, !noundef !44
  %80 = trunc i8 %79 to i1
  br i1 %80, label %81, label %91

81:                                               ; preds = %76
  invoke void @_ZN16b2ParticleSystem26RemoveSpuriousBodyContactsEv(ptr noundef nonnull align 8 dereferenceable(632) %10)
          to label %82 unwind label %87

82:                                               ; preds = %81
  br label %91

83:                                               ; preds = %70, %68
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %4, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %5, align 4
  br label %93

87:                                               ; preds = %91, %81, %73, %72, %71
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %4, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  call void @_ZN15b2QueryCallbackD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  br label %93

91:                                               ; preds = %82, %76
  invoke void @_ZN16b2ParticleSystem36NotifyBodyContactListenerPostContactER18FixtureParticleSet(ptr noundef nonnull align 8 dereferenceable(632) %10, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %92 unwind label %87

92:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  call void @_ZN15b2QueryCallbackD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  call void @_ZN12_GLOBAL__N_117FixedSetAllocatorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #7
  ret void

93:                                               ; preds = %87, %83
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  br label %94

94:                                               ; preds = %93, %30, %26
  call void @_ZN12_GLOBAL__N_117FixedSetAllocatorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #7
  br label %95

95:                                               ; preds = %94
  %96 = load ptr, ptr %4, align 8
  %97 = load i32, ptr %5, align 4
  %98 = insertvalue { ptr, i32 } poison, ptr %96, 0
  %99 = insertvalue { ptr, i32 } %98, i32 %97, 1
  resume { ptr, i32 } %99
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN18FixtureParticleSetC2EP16b2StackAllocator(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN16b2GrowableBufferI21b2ParticleBodyContactE8SetCountEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN16b2GrowableBufferIiE8SetCountEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #6 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_117FixedSetAllocatorD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6 align 2

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

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

!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 = !{!10, !12, i64 264}
!35 = !{!12, !12, i64 0}
!36 = !{!10, !6, i64 288}
!37 = !{!10, !12, i64 4}
!38 = !{!10, !6, i64 272}
!39 = !{!10, !6, i64 304}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = !{!10, !11, i64 520}
!43 = !{i8 0, i8 2}
!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"

%class.FixtureParticleSet = type { %"class.(anonymous namespace)::TypedFixedSetAllocator.16" }
%"class.(anonymous namespace)::TypedFixedSetAllocator.16" = type { %"class.(anonymous namespace)::FixedSetAllocator" }
%"class.(anonymous namespace)::FixedSetAllocator" = type { ptr, ptr, i32, ptr }
%class.UpdateBodyContactsCallback = type { %class.b2FixtureParticleQueryCallback, ptr }
%class.b2FixtureParticleQueryCallback = type { %class.b2QueryCallback, ptr }
%class.b2QueryCallback = type { ptr }
%struct.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%struct.b2Vec2 = type { float, float }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

declare void @_ZN7b2World9QueryAABBEP15b2QueryCallbackRK6b2AABB(ptr noundef nonnull align 8 dereferenceable(103352), ptr noundef, ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem18UpdateBodyContactsEv(ptr noundef nonnull align 8 dereferenceable(632) %0) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.FixtureParticleSet, align 8
  %3 = alloca %class.UpdateBodyContactsCallback, align 8
  %4 = alloca %struct.b2AABB, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  %5 = getelementptr inbounds i8, ptr %0, i64 608
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 128
  call void @_ZN18FixtureParticleSetC2EP16b2StackAllocator(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull %7)
  invoke void @_ZNK16b2ParticleSystem35NotifyBodyContactListenerPreContactEP18FixtureParticleSet(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull %2)
          to label %8 unwind label %50

8:                                                ; preds = %1
  %9 = getelementptr inbounds i8, ptr %0, i64 264
  %10 = load i32, ptr %9, align 8, !tbaa !33
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %12, label %.loopexit

12:                                               ; preds = %8
  %13 = call noundef i32 @_ZNK16b2ParticleSystem16GetParticleCountEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %12
  %15 = getelementptr inbounds i8, ptr %0, i64 288
  %16 = load ptr, ptr %15, align 8, !tbaa !34
  %17 = getelementptr inbounds i8, ptr %0, i64 4
  %18 = getelementptr inbounds i8, ptr %0, i64 272
  %19 = load ptr, ptr %18, align 8, !tbaa !35
  %20 = getelementptr inbounds i8, ptr %0, i64 304
  %21 = load ptr, ptr %20, align 8
  %wide.trip.count = zext nneg i32 %13 to i64
  %min.iters.check = icmp ult i32 %13, 32
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %22 = getelementptr inbounds i32, ptr %16, i64 %indvars.iv.ph
  store i32 0, ptr %22, align 4, !tbaa !36
  %23 = load i32, ptr %17, align 4, !tbaa !37
  %24 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv.ph
  %25 = load i32, ptr %24, align 4, !tbaa !36
  %26 = add nsw i32 %25, 1
  %27 = icmp sgt i32 %23, %26
  br i1 %27, label %28, label %scalar.ph.prol.loopexit.unr-lcssa

28:                                               ; preds = %scalar.ph.prol
  %29 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv.ph
  store i32 0, ptr %29, align 4, !tbaa !36
  br label %scalar.ph.prol.loopexit.unr-lcssa

scalar.ph.prol.loopexit.unr-lcssa:                ; preds = %28, %scalar.ph.prol
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol.loopexit.unr-lcssa, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol.loopexit.unr-lcssa ]
  %30 = add nsw i64 %wide.trip.count, -1
  %31 = icmp eq i64 %indvars.iv.ph, %30
  br i1 %31, label %.loopexit, label %scalar.ph

vector.memcheck:                                  ; preds = %.lr.ph
  %32 = shl nuw nsw i64 %wide.trip.count, 2
  %scevgep = getelementptr i8, ptr %16, i64 %32
  %scevgep15 = getelementptr i8, ptr %21, i64 %32
  %scevgep16 = getelementptr inbounds i8, ptr %0, i64 8
  %scevgep17 = getelementptr i8, ptr %19, i64 %32
  %bound0 = icmp ult ptr %16, %scevgep15
  %bound1 = icmp ult ptr %21, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  %bound018 = icmp ult ptr %16, %scevgep16
  %bound119 = icmp ult ptr %17, %scevgep
  %found.conflict20 = and i1 %bound018, %bound119
  %conflict.rdx = or i1 %found.conflict, %found.conflict20
  %bound021 = icmp ult ptr %16, %scevgep17
  %bound122 = icmp ult ptr %19, %scevgep
  %found.conflict23 = and i1 %bound021, %bound122
  %conflict.rdx24 = or i1 %conflict.rdx, %found.conflict23
  %bound025 = icmp ult ptr %21, %scevgep16
  %bound126 = icmp ult ptr %17, %scevgep15
  %found.conflict27 = and i1 %bound025, %bound126
  %conflict.rdx28 = or i1 %conflict.rdx24, %found.conflict27
  %bound029 = icmp ult ptr %21, %scevgep17
  %bound130 = icmp ult ptr %19, %scevgep15
  %found.conflict31 = and i1 %bound029, %bound130
  %conflict.rdx32 = or i1 %conflict.rdx28, %found.conflict31
  br i1 %conflict.rdx32, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %pred.store.continue38, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue38 ]
  %33 = getelementptr inbounds i32, ptr %16, i64 %index
  store <4 x i32> zeroinitializer, ptr %33, align 4, !tbaa !36, !alias.scope !38, !noalias !41
  %34 = load <4 x i32>, ptr %17, align 4
  %broadcast.splat = shufflevector <4 x i32> %34, <4 x i32> poison, <4 x i32> zeroinitializer
  %35 = getelementptr inbounds i32, ptr %19, i64 %index
  %wide.load = load <4 x i32>, ptr %35, align 4, !tbaa !36, !alias.scope !45
  %36 = add nsw <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %37 = icmp sgt <4 x i32> %broadcast.splat, %36
  %38 = extractelement <4 x i1> %37, i64 0
  br i1 %38, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  %39 = getelementptr inbounds i32, ptr %21, i64 %index
  store i32 0, ptr %39, align 4, !tbaa !36, !alias.scope !46, !noalias !47
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %40 = extractelement <4 x i1> %37, i64 1
  br i1 %40, label %pred.store.if33, label %pred.store.continue34

pred.store.if33:                                  ; preds = %pred.store.continue
  %41 = or disjoint i64 %index, 1
  %42 = getelementptr inbounds i32, ptr %21, i64 %41
  store i32 0, ptr %42, align 4, !tbaa !36, !alias.scope !46, !noalias !47
  br label %pred.store.continue34

pred.store.continue34:                            ; preds = %pred.store.if33, %pred.store.continue
  %43 = extractelement <4 x i1> %37, i64 2
  br i1 %43, label %pred.store.if35, label %pred.store.continue36

pred.store.if35:                                  ; preds = %pred.store.continue34
  %44 = or disjoint i64 %index, 2
  %45 = getelementptr inbounds i32, ptr %21, i64 %44
  store i32 0, ptr %45, align 4, !tbaa !36, !alias.scope !46, !noalias !47
  br label %pred.store.continue36

pred.store.continue36:                            ; preds = %pred.store.if35, %pred.store.continue34
  %46 = extractelement <4 x i1> %37, i64 3
  br i1 %46, label %pred.store.if37, label %pred.store.continue38

pred.store.if37:                                  ; preds = %pred.store.continue36
  %47 = or disjoint i64 %index, 3
  %48 = getelementptr inbounds i32, ptr %21, i64 %47
  store i32 0, ptr %48, align 4, !tbaa !36, !alias.scope !46, !noalias !47
  br label %pred.store.continue38

pred.store.continue38:                            ; preds = %pred.store.if37, %pred.store.continue36
  %index.next = add nuw i64 %index, 4
  %49 = icmp eq i64 %index.next, %n.vec
  br i1 %49, label %middle.block, label %vector.body, !llvm.loop !48

middle.block:                                     ; preds = %pred.store.continue38
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.loopexit, label %scalar.ph.preheader

50:                                               ; preds = %1
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %88

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %68
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %68 ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %52 = getelementptr inbounds i32, ptr %16, i64 %indvars.iv
  store i32 0, ptr %52, align 4, !tbaa !36
  %53 = load i32, ptr %17, align 4, !tbaa !37
  %54 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv
  %55 = load i32, ptr %54, align 4, !tbaa !36
  %56 = add nsw i32 %55, 1
  %57 = icmp sgt i32 %53, %56
  br i1 %57, label %58, label %scalar.ph.1

58:                                               ; preds = %scalar.ph
  %59 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv
  store i32 0, ptr %59, align 4, !tbaa !36
  br label %scalar.ph.1

scalar.ph.1:                                      ; preds = %scalar.ph, %58
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %60 = getelementptr inbounds i32, ptr %16, i64 %indvars.iv.next
  store i32 0, ptr %60, align 4, !tbaa !36
  %61 = load i32, ptr %17, align 4, !tbaa !37
  %62 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv.next
  %63 = load i32, ptr %62, align 4, !tbaa !36
  %64 = add nsw i32 %63, 1
  %65 = icmp sgt i32 %61, %64
  br i1 %65, label %66, label %68

66:                                               ; preds = %scalar.ph.1
  %67 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv.next
  store i32 0, ptr %67, align 4, !tbaa !36
  br label %68

68:                                               ; preds = %66, %scalar.ph.1
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %.loopexit, label %scalar.ph, !llvm.loop !52

.loopexit:                                        ; preds = %scalar.ph.prol.loopexit, %68, %middle.block, %12, %8
  %69 = getelementptr inbounds i8, ptr %0, i64 392
  call void @_ZN16b2GrowableBufferI21b2ParticleBodyContactE8SetCountEi(ptr noundef nonnull align 8 dereferenceable(24) %69, i32 noundef 0)
  %70 = getelementptr inbounds i8, ptr %0, i64 320
  call void @_ZN16b2GrowableBufferIiE8SetCountEi(ptr noundef nonnull align 8 dereferenceable(24) %70, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  %71 = call noundef ptr @_ZNK16b2ParticleSystem23GetFixtureContactFilterEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  invoke void @_ZZN16b2ParticleSystem18UpdateBodyContactsEvEN26UpdateBodyContactsCallbackC2EPS_P15b2ContactFilter(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull %0, ptr noundef %71)
          to label %72 unwind label %81

72:                                               ; preds = %.loopexit
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  invoke void @_ZN6b2AABBC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %4)
          to label %73 unwind label %83

73:                                               ; preds = %72
  invoke void @_ZNK16b2ParticleSystem11ComputeAABBEP6b2AABB(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull %4)
          to label %74 unwind label %83

74:                                               ; preds = %73
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN7b2World9QueryAABBEP15b2QueryCallbackRK6b2AABB(ptr noundef nonnull align 8 dereferenceable(103352) %75, ptr noundef nonnull %3, ptr noundef nonnull align 4 dereferenceable(16) %4)
          to label %76 unwind label %83

76:                                               ; preds = %74
  %77 = getelementptr inbounds i8, ptr %0, i64 520
  %78 = load i8, ptr %77, align 8, !tbaa !53, !range !54, !noundef !55
  %79 = trunc nuw i8 %78 to i1
  br i1 %79, label %80, label %85

80:                                               ; preds = %76
  invoke void @_ZN16b2ParticleSystem26RemoveSpuriousBodyContactsEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
          to label %85 unwind label %83

81:                                               ; preds = %.loopexit
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %87

83:                                               ; preds = %85, %80, %74, %73, %72
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @_ZN15b2QueryCallbackD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  br label %87

85:                                               ; preds = %80, %76
  invoke void @_ZN16b2ParticleSystem36NotifyBodyContactListenerPostContactER18FixtureParticleSet(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %86 unwind label %83

86:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @_ZN15b2QueryCallbackD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @_ZN12_GLOBAL__N_117FixedSetAllocatorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  ret void

87:                                               ; preds = %83, %81
  %.pn = phi { ptr, i32 } [ %84, %83 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  br label %88

88:                                               ; preds = %87, %50
  %.pn.pn = phi { ptr, i32 } [ %.pn, %87 ], [ %51, %50 ]
  call void @_ZN12_GLOBAL__N_117FixedSetAllocatorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN18FixtureParticleSetC2EP16b2StackAllocator(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #5 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_117FixedSetAllocatorD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6 align 2

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

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

!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 264}
!34 = !{!6, !16, i64 288}
!35 = !{!6, !16, i64 272}
!36 = !{!10, !10, i64 0}
!37 = !{!6, !10, i64 4}
!38 = !{!39}
!39 = distinct !{!39, !40}
!40 = distinct !{!40, !"LVerDomain"}
!41 = !{!42, !43, !44}
!42 = distinct !{!42, !40}
!43 = distinct !{!43, !40}
!44 = distinct !{!44, !40}
!45 = !{!44}
!46 = !{!42}
!47 = !{!43, !44}
!48 = distinct !{!48, !49, !50, !51}
!49 = !{!"llvm.loop.mustprogress"}
!50 = !{!"llvm.loop.isvectorized", i32 1}
!51 = !{!"llvm.loop.unroll.runtime.disable"}
!52 = distinct !{!52, !49, !50}
!53 = !{!6, !7, i64 520}
!54 = !{i8 0, i8 2}
!55 = !{}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,VectorCombinePass