; 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.b2EdgeShape = type <{ %class.b2Shape, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, i8, [7 x i8] }>
%class.b2Shape = type { ptr, i32, float }
%struct.b2Vec2 = type { float, float }
%struct.b2ParticleGroupDef = type { i32, i32, %struct.b2Vec2, float, %struct.b2Vec2, float, %class.b2ParticleColor, float, ptr, ptr, i32, float, i32, ptr, float, ptr, ptr }
%class.b2ParticleColor = type { i8, i8, i8, i8 }

; 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: mustprogress uwtable
declare dso_local noundef i32 @_ZN16b2ParticleSystem22CreateParticleForGroupERK18b2ParticleGroupDefRK11b2TransformRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632), ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(8)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem34CreateParticlesStrokeShapeForGroupEPK7b2ShapeRK18b2ParticleGroupDefRK11b2Transform(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(104) %2, ptr noundef nonnull align 4 dereferenceable(16) %3) #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca %class.b2EdgeShape, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %struct.b2Vec2, align 4
  %15 = alloca float, align 4
  %16 = alloca %struct.b2Vec2, align 4
  %17 = alloca %struct.b2Vec2, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.b2ParticleGroupDef, ptr %19, i32 0, i32 11
  %21 = load float, ptr %20, align 4, !tbaa !9
  store float %21, ptr %9, align 4, !tbaa !15
  %22 = load float, ptr %9, align 4, !tbaa !15
  %23 = fcmp oeq float %22, 0.000000e+00
  br i1 %23, label %24, label %26

24:                                               ; preds = %4
  %25 = call noundef float @_ZNK16b2ParticleSystem17GetParticleStrideEv(ptr noundef nonnull align 8 dereferenceable(632) %18)
  store float %25, ptr %9, align 4, !tbaa !15
  br label %26

26:                                               ; preds = %24, %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store float 0.000000e+00, ptr %10, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 56, ptr %11) #6
  call void @_ZN11b2EdgeShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(49) %11)
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = invoke noundef i32 @_ZNK7b2Shape7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(16) %27)
          to label %29 unwind label %34

29:                                               ; preds = %26
  %30 = icmp eq i32 %28, 1
  br i1 %30, label %31, label %38

31:                                               ; preds = %29
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZN11b2EdgeShapeaSERKS_(ptr noundef nonnull align 8 dereferenceable(49) %11, ptr noundef nonnull align 8 dereferenceable(49) %32) #6
  br label %39

34:                                               ; preds = %26
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %12, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %13, align 4
  br label %89

38:                                               ; preds = %29
  br label %39

39:                                               ; preds = %38, %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %40 = getelementptr inbounds %class.b2EdgeShape, ptr %11, i32 0, i32 2
  %41 = getelementptr inbounds %class.b2EdgeShape, ptr %11, i32 0, i32 1
  %42 = invoke <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %40, ptr noundef nonnull align 4 dereferenceable(8) %41)
          to label %43 unwind label %66

43:                                               ; preds = %39
  store <2 x float> %42, ptr %14, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %44 = invoke noundef float @_ZNK6b2Vec26LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %45 unwind label %70

45:                                               ; preds = %43
  store float %44, ptr %15, align 4, !tbaa !15
  br label %46

46:                                               ; preds = %62, %45
  %47 = load float, ptr %10, align 4, !tbaa !15
  %48 = load float, ptr %15, align 4, !tbaa !15
  %49 = fcmp olt float %47, %48
  br i1 %49, label %50, label %83

50:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %51 = getelementptr inbounds %class.b2EdgeShape, ptr %11, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %52 = load float, ptr %10, align 4, !tbaa !15
  %53 = load float, ptr %15, align 4, !tbaa !15
  %54 = fdiv float %52, %53
  %55 = invoke <2 x float> @_ZmlfRK6b2Vec2(float noundef %54, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %56 unwind label %74

56:                                               ; preds = %50
  store <2 x float> %55, ptr %17, align 4
  %57 = invoke <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %51, ptr noundef nonnull align 4 dereferenceable(8) %17)
          to label %58 unwind label %74

58:                                               ; preds = %56
  store <2 x float> %57, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = invoke noundef i32 @_ZN16b2ParticleSystem22CreateParticleForGroupERK18b2ParticleGroupDefRK11b2TransformRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %18, ptr noundef nonnull align 8 dereferenceable(104) %59, ptr noundef nonnull align 4 dereferenceable(16) %60, ptr noundef nonnull align 4 dereferenceable(8) %16)
          to label %62 unwind label %78

62:                                               ; preds = %58
  %63 = load float, ptr %9, align 4, !tbaa !15
  %64 = load float, ptr %10, align 4, !tbaa !15
  %65 = fadd float %64, %63
  store float %65, ptr %10, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %46, !llvm.loop !16

66:                                               ; preds = %39
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %12, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %13, align 4
  br label %88

70:                                               ; preds = %43
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %12, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %13, align 4
  br label %87

74:                                               ; preds = %56, %50
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %12, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %82

78:                                               ; preds = %58
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %12, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %13, align 4
  br label %82

82:                                               ; preds = %78, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %87

83:                                               ; preds = %46
  %84 = load float, ptr %15, align 4, !tbaa !15
  %85 = load float, ptr %10, align 4, !tbaa !15
  %86 = fsub float %85, %84
  store float %86, ptr %10, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @_ZN7b2ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(49) %11) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  ret void

87:                                               ; preds = %82, %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %88

88:                                               ; preds = %87, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %89

89:                                               ; preds = %88, %34
  call void @_ZN7b2ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(49) %11) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %90

90:                                               ; preds = %89
  %91 = load ptr, ptr %12, align 8
  %92 = load i32, ptr %13, align 4
  %93 = insertvalue { ptr, i32 } poison, ptr %91, 0
  %94 = insertvalue { ptr, i32 } %93, i32 %92, 1
  resume { ptr, i32 } %94
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(49) ptr @_ZN11b2EdgeShapeaSERKS_(ptr noundef nonnull align 8 dereferenceable(49), ptr noundef nonnull align 8 dereferenceable(49)) #3 align 2

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !13, i64 60}
!10 = !{!"_ZTS18b2ParticleGroupDef", !11, i64 0, !11, i64 4, !12, i64 8, !13, i64 16, !12, i64 20, !13, i64 28, !14, i64 32, !13, i64 36, !6, i64 40, !6, i64 48, !11, i64 56, !13, i64 60, !11, i64 64, !6, i64 72, !13, i64 80, !6, i64 88, !6, i64 96}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS6b2Vec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTS15b2ParticleColor", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!15 = !{!13, !13, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; 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.b2EdgeShape = type <{ %class.b2Shape, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, i8, [7 x i8] }>
%class.b2Shape = type { ptr, i32, float }
%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: mustprogress uwtable
declare dso_local noundef i32 @_ZN16b2ParticleSystem22CreateParticleForGroupERK18b2ParticleGroupDefRK11b2TransformRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632), ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16b2ParticleSystem34CreateParticlesStrokeShapeForGroupEPK7b2ShapeRK18b2ParticleGroupDefRK11b2Transform(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(104) %2, ptr noundef nonnull align 4 dereferenceable(16) %3) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %class.b2EdgeShape, align 8
  %6 = alloca %struct.b2Vec2, align 8
  %7 = alloca %struct.b2Vec2, align 8
  %8 = alloca %struct.b2Vec2, align 8
  %9 = getelementptr inbounds i8, ptr %2, i64 60
  %10 = load float, ptr %9, align 4, !tbaa !5
  %11 = fcmp oeq float %10, 0.000000e+00
  br i1 %11, label %12, label %14

12:                                               ; preds = %4
  %13 = tail call noundef float @_ZNK16b2ParticleSystem17GetParticleStrideEv(ptr noundef nonnull align 8 dereferenceable(632) %0)
  br label %14

14:                                               ; preds = %12, %4
  %.0 = phi float [ %13, %12 ], [ %10, %4 ]
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #6
  call void @_ZN11b2EdgeShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(49) %5)
  %15 = call noundef i32 @_ZNK7b2Shape7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %16 = icmp eq i32 %15, 1
  br i1 %16, label %17, label %19

17:                                               ; preds = %14
  %18 = call noundef nonnull align 8 dereferenceable(49) ptr @_ZN11b2EdgeShapeaSERKS_(ptr noundef nonnull align 8 dereferenceable(49) %5, ptr noundef nonnull align 8 dereferenceable(49) %1) #6
  br label %19

19:                                               ; preds = %14, %17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %20 = getelementptr inbounds i8, ptr %5, i64 24
  %21 = getelementptr inbounds i8, ptr %5, i64 16
  %22 = invoke <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(8) %21)
          to label %23 unwind label %35

23:                                               ; preds = %19
  store <2 x float> %22, ptr %6, align 8
  %24 = call noundef float @_ZNK6b2Vec26LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %6)
  %25 = fcmp ogt float %24, 0.000000e+00
  br i1 %25, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %23, %32
  %.01924 = phi float [ %33, %32 ], [ 0.000000e+00, %23 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %26 = fdiv float %.01924, %24
  %27 = invoke <2 x float> @_ZmlfRK6b2Vec2(float noundef %26, ptr noundef nonnull align 4 dereferenceable(8) %6)
          to label %28 unwind label %37

28:                                               ; preds = %.lr.ph
  store <2 x float> %27, ptr %8, align 8
  %29 = invoke <2 x float> @_ZplRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %30 unwind label %37

30:                                               ; preds = %28
  store <2 x float> %29, ptr %7, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %31 = invoke noundef i32 @_ZN16b2ParticleSystem22CreateParticleForGroupERK18b2ParticleGroupDefRK11b2TransformRK6b2Vec2(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 8 dereferenceable(104) %2, ptr noundef nonnull align 4 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %32 unwind label %39

32:                                               ; preds = %30
  %33 = fadd float %.0, %.01924
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %34 = fcmp olt float %33, %24
  br i1 %34, label %.lr.ph, label %._crit_edge, !llvm.loop !14

35:                                               ; preds = %19
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %42

37:                                               ; preds = %28, %.lr.ph
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %41

39:                                               ; preds = %30
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %41

41:                                               ; preds = %39, %37
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %42

._crit_edge:                                      ; preds = %32, %23
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @_ZN7b2ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(49) %5) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #6
  ret void

42:                                               ; preds = %41, %35
  %.pn.pn = phi { ptr, i32 } [ %.pn, %41 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @_ZN7b2ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(49) %5) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn.pn
}

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 60}
!6 = !{!"_ZTS18b2ParticleGroupDef", !7, i64 0, !7, i64 4, !10, i64 8, !11, i64 16, !10, i64 20, !11, i64 28, !12, i64 32, !11, i64 36, !13, i64 40, !13, i64 48, !7, i64 56, !11, i64 60, !7, i64 64, !13, i64 72, !11, i64 80, !13, i64 88, !13, i64 96}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS6b2Vec2", !11, i64 0, !11, i64 4}
!11 = !{!"float", !8, i64 0}
!12 = !{!"_ZTS15b2ParticleColor", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3}
!13 = !{!"any pointer", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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