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

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

%struct.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 }

@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@b2Vec2_zero = external global %struct.b2Vec2, align 4
@.str.30 = external hidden unnamed_addr constant [22 x i8], align 1
@__PRETTY_FUNCTION__._ZN16b2ParticleSystem12SolveTensileERK10b2TimeStep = external hidden unnamed_addr constant [56 x i8], align 1

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

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

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

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

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

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

; Function Attrs: mustprogress 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 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) #5

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

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

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

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

31:                                               ; preds = %2
  br label %34

32:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.30, ptr noundef @.str.1, i32 noundef 3379, ptr noundef @__PRETTY_FUNCTION__._ZN16b2ParticleSystem12SolveTensileERK10b2TimeStep) #8
  unreachable

33:                                               ; No predecessors!
  br label %34

34:                                               ; preds = %33, %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  store i32 0, ptr %5, align 4, !tbaa !34
  br label %35

35:                                               ; preds = %47, %34
  %36 = load i32, ptr %5, align 4, !tbaa !34
  %37 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 12
  %38 = load i32, ptr %37, align 4, !tbaa !35
  %39 = icmp slt i32 %36, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  br label %50

41:                                               ; preds = %35
  %42 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 23
  %43 = load ptr, ptr %42, align 8, !tbaa !9
  %44 = load i32, ptr %5, align 4, !tbaa !34
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds %struct.b2Vec2, ptr %43, i64 %45
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 @b2Vec2_zero, i64 8, i1 false), !tbaa.struct !36
  br label %47

47:                                               ; preds = %41
  %48 = load i32, ptr %5, align 4, !tbaa !34
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %5, align 4, !tbaa !34
  br label %35, !llvm.loop !38

50:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  store i32 0, ptr %6, align 4, !tbaa !34
  br label %51

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

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

57:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  %58 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 35
  %59 = load i32, ptr %6, align 4, !tbaa !34
  %60 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %58, i32 noundef %59)
  store ptr %60, ptr %7, align 8, !tbaa !5
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = call noundef i32 @_ZNK17b2ParticleContact8GetFlagsEv(ptr noundef nonnull align 4 dereferenceable(24) %61)
  %63 = and i32 %62, 128
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %89

65:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %66)
  store i32 %67, ptr %8, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %68)
  store i32 %69, ptr %9, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = call noundef float @_ZNK17b2ParticleContact9GetWeightEv(ptr noundef nonnull align 4 dereferenceable(24) %70)
  store float %71, ptr %10, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK17b2ParticleContact9GetNormalEv(ptr noundef nonnull align 4 dereferenceable(24) %72)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %73, i64 8, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %74 = load float, ptr %10, align 4, !tbaa !37
  %75 = fsub float 1.000000e+00, %74
  %76 = load float, ptr %10, align 4, !tbaa !37
  %77 = fmul float %75, %76
  %78 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %77, ptr noundef nonnull align 4 dereferenceable(8) %11)
  store <2 x float> %78, ptr %12, align 4
  %79 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 23
  %80 = load ptr, ptr %79, align 8, !tbaa !9
  %81 = load i32, ptr %8, align 4, !tbaa !34
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds %struct.b2Vec2, ptr %80, i64 %82
  call void @_ZN6b2Vec2mIERKS_(ptr noundef nonnull align 4 dereferenceable(8) %83, ptr noundef nonnull align 4 dereferenceable(8) %12)
  %84 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 23
  %85 = load ptr, ptr %84, align 8, !tbaa !9
  %86 = load i32, ptr %9, align 4, !tbaa !34
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds %struct.b2Vec2, ptr %85, i64 %87
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %88, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  br label %89

89:                                               ; preds = %65, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %6, align 4, !tbaa !34
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %6, align 4, !tbaa !34
  br label %51, !llvm.loop !40

93:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = call noundef float @_ZNK16b2ParticleSystem19GetCriticalVelocityERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %27, ptr noundef nonnull align 4 dereferenceable(28) %94)
  store float %95, ptr %13, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  %96 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 45
  %97 = getelementptr inbounds %struct.b2ParticleSystemDef, ptr %96, i32 0, i32 10
  %98 = load float, ptr %97, align 8, !tbaa !41
  %99 = load float, ptr %13, align 4, !tbaa !37
  %100 = fmul float %98, %99
  store float %100, ptr %14, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %101 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 45
  %102 = getelementptr inbounds %struct.b2ParticleSystemDef, ptr %101, i32 0, i32 11
  %103 = load float, ptr %102, align 4, !tbaa !42
  %104 = load float, ptr %13, align 4, !tbaa !37
  %105 = fmul float %103, %104
  store float %105, ptr %15, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %106 = load float, ptr %13, align 4, !tbaa !37
  %107 = fmul float 5.000000e-01, %106
  store float %107, ptr %16, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store i32 0, ptr %17, align 4, !tbaa !34
  br label %108

108:                                              ; preds = %181, %93
  %109 = load i32, ptr %17, align 4, !tbaa !34
  %110 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 35
  %111 = call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %110)
  %112 = icmp slt i32 %109, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %184

114:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %115 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 35
  %116 = load i32, ptr %17, align 4, !tbaa !34
  %117 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %115, i32 noundef %116)
  store ptr %117, ptr %18, align 8, !tbaa !5
  %118 = load ptr, ptr %18, align 8, !tbaa !5
  %119 = call noundef i32 @_ZNK17b2ParticleContact8GetFlagsEv(ptr noundef nonnull align 4 dereferenceable(24) %118)
  %120 = and i32 %119, 128
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %180

122:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %123 = load ptr, ptr %18, align 8, !tbaa !5
  %124 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %123)
  store i32 %124, ptr %19, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %125 = load ptr, ptr %18, align 8, !tbaa !5
  %126 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %125)
  store i32 %126, ptr %20, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  %127 = load ptr, ptr %18, align 8, !tbaa !5
  %128 = call noundef float @_ZNK17b2ParticleContact9GetWeightEv(ptr noundef nonnull align 4 dereferenceable(24) %127)
  store float %128, ptr %21, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %129 = load ptr, ptr %18, align 8, !tbaa !5
  %130 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK17b2ParticleContact9GetNormalEv(ptr noundef nonnull align 4 dereferenceable(24) %129)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %130, i64 8, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  %131 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 20
  %132 = load ptr, ptr %131, align 8, !tbaa !43
  %133 = load i32, ptr %19, align 4, !tbaa !34
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds float, ptr %132, i64 %134
  %136 = load float, ptr %135, align 4, !tbaa !37
  %137 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 20
  %138 = load ptr, ptr %137, align 8, !tbaa !43
  %139 = load i32, ptr %20, align 4, !tbaa !34
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds float, ptr %138, i64 %140
  %142 = load float, ptr %141, align 4, !tbaa !37
  %143 = fadd float %136, %142
  store float %143, ptr %23, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  %144 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 23
  %145 = load ptr, ptr %144, align 8, !tbaa !9
  %146 = load i32, ptr %20, align 4, !tbaa !34
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds %struct.b2Vec2, ptr %145, i64 %147
  %149 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 23
  %150 = load ptr, ptr %149, align 8, !tbaa !9
  %151 = load i32, ptr %19, align 4, !tbaa !34
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds %struct.b2Vec2, ptr %150, i64 %152
  %154 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %148, ptr noundef nonnull align 4 dereferenceable(8) %153)
  store <2 x float> %154, ptr %24, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  %155 = load float, ptr %14, align 4, !tbaa !37
  %156 = load float, ptr %23, align 4, !tbaa !37
  %157 = fsub float %156, 2.000000e+00
  %158 = load float, ptr %15, align 4, !tbaa !37
  %159 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %24, ptr noundef nonnull align 4 dereferenceable(8) %22)
  %160 = fmul float %158, %159
  %161 = call float @llvm.fmuladd.f32(float %155, float %157, float %160)
  %162 = load float, ptr %16, align 4, !tbaa !37
  %163 = call noundef float @_Z5b2MinIfET_S0_S0_(float noundef %161, float noundef %162)
  %164 = load float, ptr %21, align 4, !tbaa !37
  %165 = fmul float %163, %164
  store float %165, ptr %25, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %166 = load float, ptr %25, align 4, !tbaa !37
  %167 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %166, ptr noundef nonnull align 4 dereferenceable(8) %22)
  store <2 x float> %167, ptr %26, align 4
  %168 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 18
  %169 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %168, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8, !tbaa !44
  %171 = load i32, ptr %19, align 4, !tbaa !34
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds %struct.b2Vec2, ptr %170, i64 %172
  call void @_ZN6b2Vec2mIERKS_(ptr noundef nonnull align 4 dereferenceable(8) %173, ptr noundef nonnull align 4 dereferenceable(8) %26)
  %174 = getelementptr inbounds %class.b2ParticleSystem, ptr %27, i32 0, i32 18
  %175 = getelementptr inbounds %"struct.b2ParticleSystem::UserOverridableBuffer.2", ptr %174, i32 0, i32 0
  %176 = load ptr, ptr %175, align 8, !tbaa !44
  %177 = load i32, ptr %20, align 4, !tbaa !34
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds %struct.b2Vec2, ptr %176, i64 %178
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %179, ptr noundef nonnull align 4 dereferenceable(8) %26)
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  br label %180

180:                                              ; preds = %122, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %17, align 4, !tbaa !34
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %17, align 4, !tbaa !34
  br label %108, !llvm.loop !45

184:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  ret void
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK16b2ParticleSystem19GetCriticalVelocityERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632), ptr noundef nonnull align 4 dereferenceable(28)) #5 align 2

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

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

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


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

%struct.b2Vec2 = type { float, float }

@.str.1 = external hidden unnamed_addr constant [93 x i8], align 1
@b2Vec2_zero = external local_unnamed_addr global %struct.b2Vec2, align 4
@.str.30 = external hidden unnamed_addr constant [22 x i8], align 1
@__PRETTY_FUNCTION__._ZN16b2ParticleSystem12SolveTensileERK10b2TimeStep = external hidden unnamed_addr constant [56 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

; 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: 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 noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

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

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

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

.preheader43:                                     ; preds = %2
  %10 = getelementptr inbounds i8, ptr %0, i64 44
  %11 = load i32, ptr %10, align 4, !tbaa !33
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %.preheader

13:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.1, i32 noundef 3379, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN16b2ParticleSystem12SolveTensileERK10b2TimeStep) #7
  unreachable

.preheader:                                       ; preds = %.lr.ph, %.preheader43
  %14 = getelementptr inbounds i8, ptr %0, i64 368
  %15 = tail call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph46, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader43, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader43 ]
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.b2Vec2, ptr %17, i64 %indvars.iv
  %19 = load i64, ptr @b2Vec2_zero, align 4
  store i64 %19, ptr %18, align 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %20 = load i32, ptr %10, align 4, !tbaa !33
  %21 = sext i32 %20 to i64
  %22 = icmp slt i64 %indvars.iv.next, %21
  br i1 %22, label %.lr.ph, label %.preheader, !llvm.loop !34

._crit_edge:                                      ; preds = %53, %.preheader
  %23 = call noundef float @_ZNK16b2ParticleSystem19GetCriticalVelocityERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(632) %0, ptr noundef nonnull align 4 dereferenceable(28) %1)
  %24 = getelementptr inbounds i8, ptr %0, i64 560
  %25 = load float, ptr %24, align 8, !tbaa !36
  %26 = fmul float %23, %25
  %27 = getelementptr inbounds i8, ptr %0, i64 564
  %28 = load float, ptr %27, align 4, !tbaa !37
  %29 = fmul float %23, %28
  %30 = fmul float %23, 5.000000e-01
  %31 = call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.lr.ph49, label %._crit_edge50

.lr.ph49:                                         ; preds = %._crit_edge
  %33 = getelementptr inbounds i8, ptr %0, i64 184
  %34 = getelementptr inbounds i8, ptr %0, i64 160
  br label %57

.lr.ph46:                                         ; preds = %.preheader, %53
  %.03945 = phi i32 [ %54, %53 ], [ 0, %.preheader ]
  %35 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %.03945)
  %36 = call noundef i32 @_ZNK17b2ParticleContact8GetFlagsEv(ptr noundef nonnull align 4 dereferenceable(24) %35)
  %37 = and i32 %36, 128
  %.not42 = icmp eq i32 %37, 0
  br i1 %.not42, label %53, label %38

38:                                               ; preds = %.lr.ph46
  %39 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %35)
  %40 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %35)
  %41 = call noundef float @_ZNK17b2ParticleContact9GetWeightEv(ptr noundef nonnull align 4 dereferenceable(24) %35)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %42 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK17b2ParticleContact9GetNormalEv(ptr noundef nonnull align 4 dereferenceable(24) %35)
  %43 = load i64, ptr %42, align 4
  store i64 %43, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %44 = fsub float 1.000000e+00, %41
  %45 = fmul float %41, %44
  %46 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %45, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %46, ptr %4, align 8
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = sext i32 %39 to i64
  %49 = getelementptr inbounds %struct.b2Vec2, ptr %47, i64 %48
  call void @_ZN6b2Vec2mIERKS_(ptr noundef nonnull align 4 dereferenceable(8) %49, ptr noundef nonnull align 4 dereferenceable(8) %4)
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = sext i32 %40 to i64
  %52 = getelementptr inbounds %struct.b2Vec2, ptr %50, i64 %51
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %52, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %53

53:                                               ; preds = %38, %.lr.ph46
  %54 = add nuw nsw i32 %.03945, 1
  %55 = call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %.lr.ph46, label %._crit_edge, !llvm.loop !38

._crit_edge50:                                    ; preds = %90, %._crit_edge
  ret void

57:                                               ; preds = %.lr.ph49, %90
  %.04047 = phi i32 [ 0, %.lr.ph49 ], [ %91, %90 ]
  %58 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN16b2GrowableBufferI17b2ParticleContactEixEi(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %.04047)
  %59 = call noundef i32 @_ZNK17b2ParticleContact8GetFlagsEv(ptr noundef nonnull align 4 dereferenceable(24) %58)
  %60 = and i32 %59, 128
  %.not41 = icmp eq i32 %60, 0
  br i1 %.not41, label %90, label %61

61:                                               ; preds = %57
  %62 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexAEv(ptr noundef nonnull align 4 dereferenceable(24) %58)
  %63 = call noundef i32 @_ZNK17b2ParticleContact9GetIndexBEv(ptr noundef nonnull align 4 dereferenceable(24) %58)
  %64 = call noundef float @_ZNK17b2ParticleContact9GetWeightEv(ptr noundef nonnull align 4 dereferenceable(24) %58)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %65 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK17b2ParticleContact9GetNormalEv(ptr noundef nonnull align 4 dereferenceable(24) %58)
  %66 = load i64, ptr %65, align 4
  store i64 %66, ptr %5, align 8
  %67 = load ptr, ptr %33, align 8, !tbaa !39
  %68 = sext i32 %62 to i64
  %69 = getelementptr inbounds float, ptr %67, i64 %68
  %70 = load float, ptr %69, align 4, !tbaa !40
  %71 = sext i32 %63 to i64
  %72 = getelementptr inbounds float, ptr %67, i64 %71
  %73 = load float, ptr %72, align 4, !tbaa !40
  %74 = fadd float %70, %73
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.b2Vec2, ptr %75, i64 %71
  %77 = getelementptr inbounds %struct.b2Vec2, ptr %75, i64 %68
  %78 = call <2 x float> @_ZmiRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %76, ptr noundef nonnull align 4 dereferenceable(8) %77)
  store <2 x float> %78, ptr %6, align 8
  %79 = fadd float %74, -2.000000e+00
  %80 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %5)
  %81 = fmul float %29, %80
  %82 = call float @llvm.fmuladd.f32(float %26, float %79, float %81)
  %83 = call noundef float @_Z5b2MinIfET_S0_S0_(float noundef %82, float noundef %30)
  %84 = fmul float %64, %83
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %85 = call <2 x float> @_ZmlfRK6b2Vec2(float noundef %84, ptr noundef nonnull align 4 dereferenceable(8) %5)
  store <2 x float> %85, ptr %7, align 8
  %86 = load ptr, ptr %34, align 8, !tbaa !41
  %87 = getelementptr inbounds %struct.b2Vec2, ptr %86, i64 %68
  call void @_ZN6b2Vec2mIERKS_(ptr noundef nonnull align 4 dereferenceable(8) %87, ptr noundef nonnull align 4 dereferenceable(8) %7)
  %88 = load ptr, ptr %34, align 8, !tbaa !41
  %89 = getelementptr inbounds %struct.b2Vec2, ptr %88, i64 %71
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %89, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %90

90:                                               ; preds = %61, %57
  %91 = add nuw nsw i32 %.04047, 1
  %92 = call noundef i32 @_ZNK16b2GrowableBufferI17b2ParticleContactE8GetCountEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %93 = icmp slt i32 %91, %92
  br i1 %93, label %57, label %._crit_edge50, !llvm.loop !42
}

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

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

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

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 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 = { 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 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { noreturn nounwind }
attributes #8 = { 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 208}
!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 44}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!6, !11, i64 560}
!37 = !{!6, !11, i64 564}
!38 = distinct !{!38, !35}
!39 = !{!6, !16, i64 184}
!40 = !{!11, !11, i64 0}
!41 = !{!6, !16, i64 160}
!42 = distinct !{!42, !35}


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