; LLVM IR from erincatto/box2d :: src (body)

; 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 }
%struct.b2ShapeExtent = type { float, float }
%struct.b2MassData = type { float, %struct.b2Vec2, float }
%struct.b2Body = type { [32 x i8], ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float, float, i32, i32, i32, i16, i8, i8, i8, i8 }
%struct.b2BodySim = type { %struct.b2Transform, %struct.b2Vec2, %struct.b2Rot, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, float, float, float, i32, i8, i8, i8, i8, i8 }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Rot = type { float, float }
%struct.b2World = type { %struct.b2ArenaAllocator, %struct.b2BroadPhase, %struct.b2ConstraintGraph, %struct.b2IdPool, %struct.b2BodyArray, %struct.b2IdPool, %struct.b2SolverSetArray, %struct.b2IdPool, %struct.b2JointArray, %struct.b2IdPool, %struct.b2ContactArray, %struct.b2IdPool, %struct.b2IslandArray, %struct.b2IdPool, %struct.b2IdPool, %struct.b2ShapeArray, %struct.b2ChainShapeArray, %struct.b2SensorArray, %struct.b2TaskContextArray, %struct.b2SensorTaskContextArray, %struct.b2BodyMoveEventArray, %struct.b2SensorBeginTouchEventArray, %struct.b2ContactBeginTouchEventArray, [2 x %struct.b2SensorEndTouchEventArray], [2 x %struct.b2ContactEndTouchEventArray], i32, %struct.b2ContactHitEventArray, %struct.b2BitSet, %struct.b2BitSet, %struct.b2BitSet, %struct.b2BitSet, i64, i32, %struct.b2Vec2, float, float, float, float, float, float, float, float, ptr, ptr, i16, %struct.b2Profile, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, float, i32, i32, i16, i8, i8, i8, i8, i8, i8 }
%struct.b2ArenaAllocator = type { ptr, i32, i32, i32, i32, %struct.b2ArenaEntryArray }
%struct.b2ArenaEntryArray = type { ptr, i32, i32 }
%struct.b2BroadPhase = type { [3 x %struct.b2DynamicTree], i32, %struct.b2HashSet, %struct.b2IntArray, ptr, ptr, i32, %struct.b2AtomicInt, %struct.b2HashSet }
%struct.b2DynamicTree = type { ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32 }
%struct.b2IntArray = type { ptr, i32, i32 }
%struct.b2AtomicInt = type { i32 }
%struct.b2HashSet = type { ptr, i32, i32 }
%struct.b2ConstraintGraph = type { [12 x %struct.b2GraphColor] }
%struct.b2GraphColor = type { %struct.b2BitSet, %struct.b2ContactSimArray, %struct.b2JointSimArray, %union.anon }
%struct.b2ContactSimArray = type { ptr, i32, i32 }
%struct.b2JointSimArray = type { ptr, i32, i32 }
%union.anon = type { ptr }
%struct.b2BodyArray = type { ptr, i32, i32 }
%struct.b2SolverSetArray = type { ptr, i32, i32 }
%struct.b2JointArray = type { ptr, i32, i32 }
%struct.b2ContactArray = type { ptr, i32, i32 }
%struct.b2IslandArray = type { ptr, i32, i32 }
%struct.b2IdPool = type { %struct.b2IntArray, i32 }
%struct.b2ShapeArray = type { ptr, i32, i32 }
%struct.b2ChainShapeArray = type { ptr, i32, i32 }
%struct.b2SensorArray = type { ptr, i32, i32 }
%struct.b2TaskContextArray = type { ptr, i32, i32 }
%struct.b2SensorTaskContextArray = type { ptr, i32, i32 }
%struct.b2BodyMoveEventArray = type { ptr, i32, i32 }
%struct.b2SensorBeginTouchEventArray = type { ptr, i32, i32 }
%struct.b2ContactBeginTouchEventArray = type { ptr, i32, i32 }
%struct.b2SensorEndTouchEventArray = type { ptr, i32, i32 }
%struct.b2ContactEndTouchEventArray = type { ptr, i32, i32 }
%struct.b2ContactHitEventArray = type { ptr, i32, i32 }
%struct.b2BitSet = type { ptr, i32, i32 }
%struct.b2Profile = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
%struct.b2Shape = type { i32, i32, i32, i32, i32, i32, float, float, float, float, float, i32, %struct.b2AABB, %struct.b2AABB, %struct.b2Vec2, i32, %struct.b2Filter, ptr, i32, %union.anon.0, i16, i8, i8, i8, i8, i8 }
%struct.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%struct.b2Filter = type { i64, i64, i32 }
%union.anon.0 = type { %struct.b2Polygon }
%struct.b2Polygon = type { [8 x %struct.b2Vec2], [8 x %struct.b2Vec2], %struct.b2Vec2, float, i32 }
%struct.b2BodyState = type { %struct.b2Vec2, float, i32, %struct.b2Vec2, %struct.b2Rot }

@.str.1 = external hidden unnamed_addr constant [60 x i8], align 1
@b2_lengthUnitsPerMeter = external global float, align 4
@b2Vec2_zero = external hidden constant %struct.b2Vec2, align 4
@.str.19 = external hidden unnamed_addr constant [21 x i8], align 1

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

declare i32 @b2InternalAssertFcn(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: cold noreturn nounwind memory(inaccessiblemem: write)
declare void @llvm.trap() #2

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

; 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) #4

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @b2GetBodySim(ptr noundef, ptr noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local ptr @b2GetBodyState(ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2ShapeArray_Get(ptr noundef, i32 noundef) #6

; Function Attrs: nounwind uwtable
define dso_local void @b2UpdateBodyMassData(ptr noundef %0, ptr noundef %1) #7 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %struct.b2ShapeExtent, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.b2Vec2, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %struct.b2MassData, align 4
  %14 = alloca %struct.b2Vec2, align 4
  %15 = alloca %struct.b2Vec2, align 4
  %16 = alloca %struct.b2Vec2, align 4
  %17 = alloca %struct.b2Vec2, align 4
  %18 = alloca ptr, align 8
  %19 = alloca %struct.b2Vec2, align 4
  %20 = alloca %struct.b2Vec2, align 4
  %21 = alloca %struct.b2Vec2, align 4
  %22 = alloca ptr, align 8
  %23 = alloca %struct.b2ShapeExtent, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #10
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = call ptr @b2GetBodySim(ptr noundef %24, ptr noundef %25)
  store ptr %26, ptr %5, align 8, !tbaa !5
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.b2Body, ptr %27, i32 0, i32 14
  store float 0.000000e+00, ptr %28, align 8, !tbaa !9
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.b2Body, ptr %29, i32 0, i32 15
  store float 0.000000e+00, ptr %30, align 4, !tbaa !15
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.b2BodySim, ptr %31, i32 0, i32 7
  store float 0.000000e+00, ptr %32, align 4, !tbaa !16
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.b2BodySim, ptr %33, i32 0, i32 8
  store float 0.000000e+00, ptr %34, align 4, !tbaa !21
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.b2BodySim, ptr %35, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 @b2Vec2_zero, i64 8, i1 false), !tbaa.struct !22
  %37 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !23
  %38 = fmul float 1.000000e+05, %37
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.b2BodySim, ptr %39, i32 0, i32 9
  store float %38, ptr %40, align 4, !tbaa !24
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.b2BodySim, ptr %41, i32 0, i32 10
  store float 0.000000e+00, ptr %42, align 4, !tbaa !25
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.b2Body, ptr %43, i32 0, i32 20
  %45 = load i32, ptr %44, align 8, !tbaa !26
  %46 = icmp ne i32 %45, 2
  br i1 %46, label %47, label %93

47:                                               ; preds = %2
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.b2BodySim, ptr %48, i32 0, i32 1
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.b2BodySim, ptr %50, i32 0, i32 0
  %52 = getelementptr inbounds %struct.b2Transform, ptr %51, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %49, ptr align 4 %52, i64 8, i1 false), !tbaa.struct !22
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.b2Body, ptr %53, i32 0, i32 20
  %55 = load i32, ptr %54, align 8, !tbaa !26
  %56 = icmp eq i32 %55, 1
  br i1 %56, label %57, label %92

57:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #10
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.b2Body, ptr %58, i32 0, i32 6
  %60 = load i32, ptr %59, align 8, !tbaa !27
  store i32 %60, ptr %6, align 4, !tbaa !28
  br label %61

61:                                               ; preds = %64, %57
  %62 = load i32, ptr %6, align 4, !tbaa !28
  %63 = icmp ne i32 %62, -1
  br i1 %63, label %64, label %91

64:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.b2World, ptr %65, i32 0, i32 15
  %67 = load i32, ptr %6, align 4, !tbaa !28
  %68 = call ptr @b2ShapeArray_Get(ptr noundef %66, i32 noundef %67)
  store ptr %68, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = load <2 x float>, ptr @b2Vec2_zero, align 4
  %71 = call <2 x float> @b2ComputeShapeExtent(ptr noundef %69, <2 x float> %70)
  store <2 x float> %71, ptr %8, align 4
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.b2BodySim, ptr %72, i32 0, i32 9
  %74 = load float, ptr %73, align 4, !tbaa !24
  %75 = getelementptr inbounds %struct.b2ShapeExtent, ptr %8, i32 0, i32 0
  %76 = load float, ptr %75, align 4, !tbaa !29
  %77 = call float @b2MinFloat(float noundef %74, float noundef %76)
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.b2BodySim, ptr %78, i32 0, i32 9
  store float %77, ptr %79, align 4, !tbaa !24
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.b2BodySim, ptr %80, i32 0, i32 10
  %82 = load float, ptr %81, align 4, !tbaa !25
  %83 = getelementptr inbounds %struct.b2ShapeExtent, ptr %8, i32 0, i32 1
  %84 = load float, ptr %83, align 4, !tbaa !31
  %85 = call float @b2MaxFloat(float noundef %82, float noundef %84)
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.b2BodySim, ptr %86, i32 0, i32 10
  store float %85, ptr %87, align 4, !tbaa !25
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.b2Shape, ptr %88, i32 0, i32 3
  %90 = load i32, ptr %89, align 4, !tbaa !32
  store i32 %90, ptr %6, align 4, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  br label %61, !llvm.loop !37

91:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  br label %92

92:                                               ; preds = %91, %47
  store i32 1, ptr %9, align 4
  br label %284

93:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  call void @llvm.memset.p0.i64(ptr align 4 %10, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.b2Body, ptr %94, i32 0, i32 6
  %96 = load i32, ptr %95, align 8, !tbaa !27
  store i32 %96, ptr %11, align 4, !tbaa !28
  br label %97

97:                                               ; preds = %140, %138, %93
  %98 = load i32, ptr %11, align 4, !tbaa !28
  %99 = icmp ne i32 %98, -1
  br i1 %99, label %100, label %141

100:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.b2World, ptr %101, i32 0, i32 15
  %103 = load i32, ptr %11, align 4, !tbaa !28
  %104 = call ptr @b2ShapeArray_Get(ptr noundef %102, i32 noundef %103)
  store ptr %104, ptr %12, align 8, !tbaa !5
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.b2Shape, ptr %105, i32 0, i32 3
  %107 = load i32, ptr %106, align 4, !tbaa !32
  store i32 %107, ptr %11, align 4, !tbaa !28
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.b2Shape, ptr %108, i32 0, i32 6
  %110 = load float, ptr %109, align 8, !tbaa !39
  %111 = fcmp oeq float %110, 0.000000e+00
  br i1 %111, label %112, label %113

112:                                              ; preds = %100
  store i32 4, ptr %9, align 4
  br label %138, !llvm.loop !40

113:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #10
  %114 = load ptr, ptr %12, align 8, !tbaa !5
  %115 = call { <2 x float>, <2 x float> } @b2ComputeShapeMass(ptr noundef %114)
  %116 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 0
  %117 = extractvalue { <2 x float>, <2 x float> } %115, 0
  store <2 x float> %117, ptr %116, align 4
  %118 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 1
  %119 = extractvalue { <2 x float>, <2 x float> } %115, 1
  store <2 x float> %119, ptr %118, align 4
  %120 = getelementptr inbounds %struct.b2MassData, ptr %13, i32 0, i32 0
  %121 = load float, ptr %120, align 4, !tbaa !41
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.b2Body, ptr %122, i32 0, i32 14
  %124 = load float, ptr %123, align 8, !tbaa !9
  %125 = fadd float %124, %121
  store float %125, ptr %123, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %126 = getelementptr inbounds %struct.b2MassData, ptr %13, i32 0, i32 0
  %127 = load float, ptr %126, align 4, !tbaa !41
  %128 = getelementptr inbounds %struct.b2MassData, ptr %13, i32 0, i32 1
  %129 = load <2 x float>, ptr %10, align 4
  %130 = load <2 x float>, ptr %128, align 4
  %131 = call <2 x float> @b2MulAdd(<2 x float> %129, float noundef %127, <2 x float> %130)
  store <2 x float> %131, ptr %14, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %14, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  %132 = getelementptr inbounds %struct.b2MassData, ptr %13, i32 0, i32 2
  %133 = load float, ptr %132, align 4, !tbaa !43
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.b2Body, ptr %134, i32 0, i32 15
  %136 = load float, ptr %135, align 4, !tbaa !15
  %137 = fadd float %136, %133
  store float %137, ptr %135, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #10
  store i32 0, ptr %9, align 4
  br label %138

138:                                              ; preds = %113, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  %139 = load i32, ptr %9, align 4
  switch i32 %139, label %287 [
    i32 0, label %140
    i32 4, label %97
  ]

140:                                              ; preds = %138
  br label %97, !llvm.loop !40

141:                                              ; preds = %97
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.b2Body, ptr %142, i32 0, i32 14
  %144 = load float, ptr %143, align 8, !tbaa !9
  %145 = fcmp ogt float %144, 0.000000e+00
  br i1 %145, label %146, label %158

146:                                              ; preds = %141
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.b2Body, ptr %147, i32 0, i32 14
  %149 = load float, ptr %148, align 8, !tbaa !9
  %150 = fdiv float 1.000000e+00, %149
  %151 = load ptr, ptr %5, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.b2BodySim, ptr %151, i32 0, i32 7
  store float %150, ptr %152, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.b2BodySim, ptr %153, i32 0, i32 7
  %155 = load float, ptr %154, align 4, !tbaa !16
  %156 = load <2 x float>, ptr %10, align 4
  %157 = call <2 x float> @b2MulSV(float noundef %155, <2 x float> %156)
  store <2 x float> %157, ptr %15, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %15, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  br label %158

158:                                              ; preds = %146, %141
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.b2Body, ptr %159, i32 0, i32 15
  %161 = load float, ptr %160, align 4, !tbaa !15
  %162 = fcmp ogt float %161, 0.000000e+00
  br i1 %162, label %163, label %200

163:                                              ; preds = %158
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.b2Body, ptr %164, i32 0, i32 23
  %166 = load i8, ptr %165, align 1, !tbaa !44, !range !45, !noundef !46
  %167 = trunc i8 %166 to i1
  %168 = zext i1 %167 to i32
  %169 = icmp eq i32 %168, 0
  br i1 %169, label %170, label %200

170:                                              ; preds = %163
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.b2Body, ptr %171, i32 0, i32 14
  %173 = load float, ptr %172, align 8, !tbaa !9
  %174 = load <2 x float>, ptr %10, align 4
  %175 = load <2 x float>, ptr %10, align 4
  %176 = call float @b2Dot(<2 x float> %174, <2 x float> %175)
  %177 = load ptr, ptr %4, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.b2Body, ptr %177, i32 0, i32 15
  %179 = load float, ptr %178, align 4, !tbaa !15
  %180 = fneg float %173
  %181 = call float @llvm.fmuladd.f32(float %180, float %176, float %179)
  store float %181, ptr %178, align 4, !tbaa !15
  br label %182

182:                                              ; preds = %170
  %183 = load ptr, ptr %4, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.b2Body, ptr %183, i32 0, i32 15
  %185 = load float, ptr %184, align 4, !tbaa !15
  %186 = fcmp ogt float %185, 0.000000e+00
  br i1 %186, label %191, label %187

187:                                              ; preds = %182
  %188 = call i32 @b2InternalAssertFcn(ptr noundef @.str.19, ptr noundef @.str.1, i32 noundef 589)
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %191

190:                                              ; preds = %187
  call void @llvm.trap()
  br label %191

191:                                              ; preds = %190, %187, %182
  br label %192

192:                                              ; preds = %191
  br label %193

193:                                              ; preds = %192
  %194 = load ptr, ptr %4, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.b2Body, ptr %194, i32 0, i32 15
  %196 = load float, ptr %195, align 4, !tbaa !15
  %197 = fdiv float 1.000000e+00, %196
  %198 = load ptr, ptr %5, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.b2BodySim, ptr %198, i32 0, i32 8
  store float %197, ptr %199, align 4, !tbaa !21
  br label %205

200:                                              ; preds = %163, %158
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.b2Body, ptr %201, i32 0, i32 15
  store float 0.000000e+00, ptr %202, align 4, !tbaa !15
  %203 = load ptr, ptr %5, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.b2BodySim, ptr %203, i32 0, i32 8
  store float 0.000000e+00, ptr %204, align 4, !tbaa !21
  br label %205

205:                                              ; preds = %200, %193
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.b2BodySim, ptr %206, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %207, i64 8, i1 false), !tbaa.struct !22
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.b2BodySim, ptr %208, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %209, ptr align 4 %10, i64 8, i1 false), !tbaa.struct !22
  %210 = load ptr, ptr %5, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.b2BodySim, ptr %210, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  %212 = load ptr, ptr %5, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.b2BodySim, ptr %212, i32 0, i32 0
  %214 = load ptr, ptr %5, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.b2BodySim, ptr %214, i32 0, i32 4
  %216 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %213, i32 0, i32 0
  %217 = load <2 x float>, ptr %216, align 4
  %218 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %213, i32 0, i32 1
  %219 = load <2 x float>, ptr %218, align 4
  %220 = load <2 x float>, ptr %215, align 4
  %221 = call <2 x float> @b2TransformPoint(<2 x float> %217, <2 x float> %219, <2 x float> %220)
  store <2 x float> %221, ptr %17, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %211, ptr align 4 %17, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  %222 = load ptr, ptr %5, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.b2BodySim, ptr %222, i32 0, i32 3
  %224 = load ptr, ptr %5, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.b2BodySim, ptr %224, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %223, ptr align 4 %225, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %226 = load ptr, ptr %3, align 8, !tbaa !5
  %227 = load ptr, ptr %4, align 8, !tbaa !5
  %228 = call ptr @b2GetBodyState(ptr noundef %226, ptr noundef %227)
  store ptr %228, ptr %18, align 8, !tbaa !5
  %229 = load ptr, ptr %18, align 8, !tbaa !5
  %230 = icmp ne ptr %229, null
  br i1 %230, label %231, label %249

231:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  %232 = load ptr, ptr %18, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.b2BodyState, ptr %232, i32 0, i32 1
  %234 = load float, ptr %233, align 4, !tbaa !47
  %235 = load ptr, ptr %5, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.b2BodySim, ptr %235, i32 0, i32 1
  %237 = load <2 x float>, ptr %236, align 4
  %238 = load <2 x float>, ptr %16, align 4
  %239 = call <2 x float> @b2Sub(<2 x float> %237, <2 x float> %238)
  store <2 x float> %239, ptr %20, align 4
  %240 = load <2 x float>, ptr %20, align 4
  %241 = call <2 x float> @b2CrossSV(float noundef %234, <2 x float> %240)
  store <2 x float> %241, ptr %19, align 4
  %242 = load ptr, ptr %18, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.b2BodyState, ptr %242, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #10
  %244 = load ptr, ptr %18, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.b2BodyState, ptr %244, i32 0, i32 0
  %246 = load <2 x float>, ptr %245, align 4
  %247 = load <2 x float>, ptr %19, align 4
  %248 = call <2 x float> @b2Add(<2 x float> %246, <2 x float> %247)
  store <2 x float> %248, ptr %21, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %243, ptr align 4 %21, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  br label %249

249:                                              ; preds = %231, %205
  %250 = load ptr, ptr %4, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.b2Body, ptr %250, i32 0, i32 6
  %252 = load i32, ptr %251, align 8, !tbaa !27
  store i32 %252, ptr %11, align 4, !tbaa !28
  br label %253

253:                                              ; preds = %256, %249
  %254 = load i32, ptr %11, align 4, !tbaa !28
  %255 = icmp ne i32 %254, -1
  br i1 %255, label %256, label %283

256:                                              ; preds = %253
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #10
  %257 = load ptr, ptr %3, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.b2World, ptr %257, i32 0, i32 15
  %259 = load i32, ptr %11, align 4, !tbaa !28
  %260 = call ptr @b2ShapeArray_Get(ptr noundef %258, i32 noundef %259)
  store ptr %260, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %261 = load ptr, ptr %22, align 8, !tbaa !5
  %262 = load <2 x float>, ptr %10, align 4
  %263 = call <2 x float> @b2ComputeShapeExtent(ptr noundef %261, <2 x float> %262)
  store <2 x float> %263, ptr %23, align 4
  %264 = load ptr, ptr %5, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.b2BodySim, ptr %264, i32 0, i32 9
  %266 = load float, ptr %265, align 4, !tbaa !24
  %267 = getelementptr inbounds %struct.b2ShapeExtent, ptr %23, i32 0, i32 0
  %268 = load float, ptr %267, align 4, !tbaa !29
  %269 = call float @b2MinFloat(float noundef %266, float noundef %268)
  %270 = load ptr, ptr %5, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.b2BodySim, ptr %270, i32 0, i32 9
  store float %269, ptr %271, align 4, !tbaa !24
  %272 = load ptr, ptr %5, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.b2BodySim, ptr %272, i32 0, i32 10
  %274 = load float, ptr %273, align 4, !tbaa !25
  %275 = getelementptr inbounds %struct.b2ShapeExtent, ptr %23, i32 0, i32 1
  %276 = load float, ptr %275, align 4, !tbaa !31
  %277 = call float @b2MaxFloat(float noundef %274, float noundef %276)
  %278 = load ptr, ptr %5, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.b2BodySim, ptr %278, i32 0, i32 10
  store float %277, ptr %279, align 4, !tbaa !25
  %280 = load ptr, ptr %22, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.b2Shape, ptr %280, i32 0, i32 3
  %282 = load i32, ptr %281, align 4, !tbaa !32
  store i32 %282, ptr %11, align 4, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  br label %253, !llvm.loop !49

283:                                              ; preds = %253
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  store i32 0, ptr %9, align 4
  br label %284

284:                                              ; preds = %283, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  %285 = load i32, ptr %9, align 4
  switch i32 %285, label %287 [
    i32 0, label %286
    i32 1, label %286
  ]

286:                                              ; preds = %284, %284
  ret void

287:                                              ; preds = %284, %138
  unreachable
}

declare <2 x float> @b2ComputeShapeExtent(ptr noundef, <2 x float>) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2MinFloat(float noundef, float noundef) #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2MaxFloat(float noundef, float noundef) #6

declare { <2 x float>, <2 x float> } @b2ComputeShapeMass(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2MulAdd(<2 x float>, float noundef, <2 x float>) #8

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2MulSV(float noundef, <2 x float>) #8

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2Dot(<2 x float>, <2 x float>) #8

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2TransformPoint(<2 x float>, <2 x float>, <2 x float>) #8

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2CrossSV(float noundef, <2 x float>) #8

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Sub(<2 x float>, <2 x float>) #8

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Add(<2 x float>, <2 x float>) #8

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 88}
!10 = !{!"b2Body", !7, i64 0, !6, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !13, i64 116, !14, i64 118, !14, i64 119, !14, i64 120, !14, i64 121}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!"_Bool", !7, i64 0}
!15 = !{!10, !12, i64 92}
!16 = !{!17, !12, i64 60}
!17 = !{!"b2BodySim", !18, i64 0, !19, i64 16, !20, i64 24, !19, i64 32, !19, i64 40, !19, i64 48, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !12, i64 84, !11, i64 88, !14, i64 92, !14, i64 93, !14, i64 94, !14, i64 95, !14, i64 96}
!18 = !{!"b2Transform", !19, i64 0, !20, i64 8}
!19 = !{!"b2Vec2", !12, i64 0, !12, i64 4}
!20 = !{!"b2Rot", !12, i64 0, !12, i64 4}
!21 = !{!17, !12, i64 64}
!22 = !{i64 0, i64 4, !23, i64 4, i64 4, !23}
!23 = !{!12, !12, i64 0}
!24 = !{!17, !12, i64 68}
!25 = !{!17, !12, i64 72}
!26 = !{!10, !11, i64 112}
!27 = !{!10, !11, i64 56}
!28 = !{!11, !11, i64 0}
!29 = !{!30, !12, i64 0}
!30 = !{!"b2ShapeExtent", !12, i64 0, !12, i64 4}
!31 = !{!30, !12, i64 4}
!32 = !{!33, !11, i64 12}
!33 = !{!"b2Shape", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !11, i64 44, !34, i64 48, !34, i64 64, !19, i64 80, !11, i64 88, !35, i64 96, !6, i64 120, !11, i64 128, !7, i64 132, !13, i64 276, !14, i64 278, !14, i64 279, !14, i64 280, !14, i64 281, !14, i64 282}
!34 = !{!"b2AABB", !19, i64 0, !19, i64 8}
!35 = !{!"b2Filter", !36, i64 0, !36, i64 8, !11, i64 16}
!36 = !{!"long", !7, i64 0}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!33, !12, i64 24}
!40 = distinct !{!40, !38}
!41 = !{!42, !12, i64 0}
!42 = !{!"b2MassData", !12, i64 0, !19, i64 4, !12, i64 12}
!43 = !{!42, !12, i64 12}
!44 = !{!10, !14, i64 119}
!45 = !{i8 0, i8 2}
!46 = !{}
!47 = !{!48, !12, i64 8}
!48 = !{!"b2BodyState", !19, i64 0, !12, i64 8, !11, i64 12, !19, i64 16, !20, i64 24}
!49 = distinct !{!49, !38}


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

@.str.1 = external hidden unnamed_addr constant [60 x i8], align 1
@b2_lengthUnitsPerMeter = external local_unnamed_addr global float, align 4
@b2Vec2_zero = external hidden local_unnamed_addr constant %struct.b2Vec2, align 4
@.str.19 = external hidden unnamed_addr constant [21 x i8], align 1

declare i32 @b2InternalAssertFcn(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: cold noreturn nounwind memory(inaccessiblemem: write)
declare void @llvm.trap() #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @b2GetBodySim(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local ptr @b2GetBodyState(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2ShapeArray_Get(ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local void @b2UpdateBodyMassData(ptr noundef %0, ptr noundef %1) local_unnamed_addr #5 {
  %3 = alloca %struct.b2MassData, align 8
  %4 = tail call ptr @b2GetBodySim(ptr noundef %0, ptr noundef %1)
  %5 = getelementptr inbounds i8, ptr %1, i64 88
  %6 = getelementptr inbounds i8, ptr %1, i64 92
  store <2 x float> zeroinitializer, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %4, i64 60
  %8 = getelementptr inbounds i8, ptr %4, i64 64
  store <2 x float> zeroinitializer, ptr %7, align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %4, i64 40
  %10 = load i64, ptr @b2Vec2_zero, align 4
  store i64 %10, ptr %9, align 4
  %11 = load float, ptr @b2_lengthUnitsPerMeter, align 4, !tbaa !5
  %12 = fmul float %11, 1.000000e+05
  %13 = getelementptr inbounds i8, ptr %4, i64 68
  store float %12, ptr %13, align 4, !tbaa !9
  %14 = getelementptr inbounds i8, ptr %4, i64 72
  store float 0.000000e+00, ptr %14, align 4, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %1, i64 112
  %16 = load i32, ptr %15, align 8, !tbaa !17
  %.not = icmp eq i32 %16, 2
  %17 = bitcast i64 %10 to <2 x float>
  br i1 %.not, label %34, label %18

18:                                               ; preds = %2
  %19 = getelementptr inbounds i8, ptr %4, i64 16
  %20 = load i64, ptr %4, align 4
  store i64 %20, ptr %19, align 4
  %21 = load i32, ptr %15, align 8, !tbaa !17
  %22 = icmp eq i32 %21, 1
  br i1 %22, label %23, label %.loopexit

23:                                               ; preds = %18
  %24 = getelementptr inbounds i8, ptr %1, i64 56
  %.095 = load i32, ptr %24, align 4, !tbaa !21
  %.not9096 = icmp eq i32 %.095, -1
  br i1 %.not9096, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %23
  %25 = getelementptr inbounds i8, ptr %0, i64 1256
  br label %26

26:                                               ; preds = %.lr.ph, %26
  %.097 = phi i32 [ %.095, %.lr.ph ], [ %.0, %26 ]
  %27 = tail call ptr @b2ShapeArray_Get(ptr noundef nonnull %25, i32 noundef %.097)
  %28 = tail call <2 x float> @b2ComputeShapeExtent(ptr noundef %27, <2 x float> %17) #8
  %29 = load float, ptr %13, align 4, !tbaa !9
  %.sroa.026.0.vec.extract = extractelement <2 x float> %28, i64 0
  %30 = tail call float @b2MinFloat(float noundef %29, float noundef %.sroa.026.0.vec.extract)
  store float %30, ptr %13, align 4, !tbaa !9
  %31 = load float, ptr %14, align 4, !tbaa !16
  %.sroa.026.4.vec.extract = extractelement <2 x float> %28, i64 1
  %32 = tail call float @b2MaxFloat(float noundef %31, float noundef %.sroa.026.4.vec.extract)
  store float %32, ptr %14, align 4, !tbaa !16
  %33 = getelementptr inbounds i8, ptr %27, i64 12
  %.0 = load i32, ptr %33, align 4, !tbaa !21
  %.not90 = icmp eq i32 %.0, -1
  br i1 %.not90, label %.loopexit, label %26, !llvm.loop !22

34:                                               ; preds = %2
  %35 = getelementptr inbounds i8, ptr %1, i64 56
  %36 = load i32, ptr %35, align 8, !tbaa !24
  %.not8698 = icmp eq i32 %36, -1
  br i1 %.not8698, label %._crit_edge, label %.lr.ph101

.lr.ph101:                                        ; preds = %34
  %37 = getelementptr inbounds i8, ptr %0, i64 1256
  %.8.sroa_idx115 = getelementptr inbounds i8, ptr %3, i64 8
  %.4.sroa_idx114 = getelementptr inbounds i8, ptr %3, i64 4
  br label %38

38:                                               ; preds = %.lr.ph101, %56
  %.sroa.021.0100 = phi <2 x float> [ zeroinitializer, %.lr.ph101 ], [ %.sroa.021.1, %56 ]
  %.08399 = phi i32 [ %36, %.lr.ph101 ], [ %41, %56 ]
  %39 = tail call ptr @b2ShapeArray_Get(ptr noundef nonnull %37, i32 noundef %.08399)
  %40 = getelementptr inbounds i8, ptr %39, i64 12
  %41 = load i32, ptr %40, align 4, !tbaa !25
  %42 = getelementptr inbounds i8, ptr %39, i64 24
  %43 = load float, ptr %42, align 8, !tbaa !30
  %44 = fcmp oeq float %43, 0.000000e+00
  br i1 %44, label %56, label %45, !llvm.loop !31

45:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3)
  %46 = tail call { <2 x float>, <2 x float> } @b2ComputeShapeMass(ptr noundef nonnull %39) #8
  %47 = extractvalue { <2 x float>, <2 x float> } %46, 0
  store <2 x float> %47, ptr %3, align 8
  %48 = extractvalue { <2 x float>, <2 x float> } %46, 1
  store <2 x float> %48, ptr %.8.sroa_idx115, align 8
  %49 = extractelement <2 x float> %47, i64 0
  %50 = load float, ptr %5, align 8, !tbaa !32
  %51 = fadd float %49, %50
  store float %51, ptr %5, align 8, !tbaa !32
  %.4..4..4..4. = load <2 x float>, ptr %.4.sroa_idx114, align 4
  %52 = tail call <2 x float> @b2MulAdd(<2 x float> %.sroa.021.0100, float noundef %49, <2 x float> %.4..4..4..4.)
  %53 = extractelement <2 x float> %48, i64 1
  %54 = load float, ptr %6, align 4, !tbaa !33
  %55 = fadd float %53, %54
  store float %55, ptr %6, align 4, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3)
  br label %56

56:                                               ; preds = %38, %45
  %.sroa.021.1 = phi <2 x float> [ %52, %45 ], [ %.sroa.021.0100, %38 ]
  %.not86 = icmp eq i32 %41, -1
  br i1 %.not86, label %._crit_edge, label %38

._crit_edge:                                      ; preds = %56, %34
  %.sroa.021.0.lcssa = phi <2 x float> [ zeroinitializer, %34 ], [ %.sroa.021.1, %56 ]
  %57 = load float, ptr %5, align 8, !tbaa !32
  %58 = fcmp ogt float %57, 0.000000e+00
  br i1 %58, label %59, label %62

59:                                               ; preds = %._crit_edge
  %60 = fdiv float 1.000000e+00, %57
  store float %60, ptr %7, align 4, !tbaa !34
  %61 = tail call <2 x float> @b2MulSV(float noundef %60, <2 x float> %.sroa.021.0.lcssa)
  br label %62

62:                                               ; preds = %59, %._crit_edge
  %.sroa.021.2 = phi <2 x float> [ %61, %59 ], [ %.sroa.021.0.lcssa, %._crit_edge ]
  %63 = load float, ptr %6, align 4, !tbaa !33
  %64 = fcmp ogt float %63, 0.000000e+00
  br i1 %64, label %65, label %82

65:                                               ; preds = %62
  %66 = getelementptr inbounds i8, ptr %1, i64 119
  %67 = load i8, ptr %66, align 1, !tbaa !35, !range !36, !noundef !37
  %68 = icmp eq i8 %67, 0
  br i1 %68, label %69, label %82

69:                                               ; preds = %65
  %70 = load float, ptr %5, align 8, !tbaa !32
  %71 = tail call float @b2Dot(<2 x float> %.sroa.021.2, <2 x float> %.sroa.021.2)
  %72 = load float, ptr %6, align 4, !tbaa !33
  %73 = fneg float %70
  %74 = tail call float @llvm.fmuladd.f32(float %73, float %71, float %72)
  store float %74, ptr %6, align 4, !tbaa !33
  %75 = fcmp ogt float %74, 0.000000e+00
  br i1 %75, label %79, label %76

76:                                               ; preds = %69
  %77 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.1, i32 noundef 589) #8
  %.not87 = icmp eq i32 %77, 0
  br i1 %.not87, label %._crit_edge108, label %78

._crit_edge108:                                   ; preds = %76
  %.pre = load float, ptr %6, align 4, !tbaa !33
  br label %79

78:                                               ; preds = %76
  tail call void @llvm.trap()
  unreachable

79:                                               ; preds = %._crit_edge108, %69
  %80 = phi float [ %.pre, %._crit_edge108 ], [ %74, %69 ]
  %81 = fdiv float 1.000000e+00, %80
  br label %83

82:                                               ; preds = %65, %62
  store float 0.000000e+00, ptr %6, align 4, !tbaa !33
  br label %83

83:                                               ; preds = %82, %79
  %storemerge = phi float [ 0.000000e+00, %82 ], [ %81, %79 ]
  store float %storemerge, ptr %8, align 4, !tbaa !38
  %84 = getelementptr inbounds i8, ptr %4, i64 16
  %.sroa.010.0.copyload = load <2 x float>, ptr %84, align 4
  store <2 x float> %.sroa.021.2, ptr %9, align 4
  %85 = load <2 x float>, ptr %4, align 4
  %86 = getelementptr inbounds i8, ptr %4, i64 8
  %87 = load <2 x float>, ptr %86, align 4
  %88 = tail call <2 x float> @b2TransformPoint(<2 x float> %85, <2 x float> %87, <2 x float> %.sroa.021.2)
  store <2 x float> %88, ptr %84, align 4
  %89 = getelementptr inbounds i8, ptr %4, i64 32
  store <2 x float> %88, ptr %89, align 4
  %90 = tail call ptr @b2GetBodyState(ptr noundef %0, ptr noundef nonnull %1)
  %.not88 = icmp eq ptr %90, null
  br i1 %.not88, label %99, label %91

91:                                               ; preds = %83
  %92 = getelementptr inbounds i8, ptr %90, i64 8
  %93 = load float, ptr %92, align 4, !tbaa !39
  %94 = load <2 x float>, ptr %84, align 4
  %95 = tail call <2 x float> @b2Sub(<2 x float> %94, <2 x float> %.sroa.010.0.copyload)
  %96 = tail call <2 x float> @b2CrossSV(float noundef %93, <2 x float> %95)
  %97 = load <2 x float>, ptr %90, align 4
  %98 = tail call <2 x float> @b2Add(<2 x float> %97, <2 x float> %96)
  store <2 x float> %98, ptr %90, align 4
  br label %99

99:                                               ; preds = %91, %83
  %.1102 = load i32, ptr %35, align 4, !tbaa !21
  %.not89103 = icmp eq i32 %.1102, -1
  br i1 %.not89103, label %.loopexit, label %.lr.ph106

.lr.ph106:                                        ; preds = %99
  %100 = getelementptr inbounds i8, ptr %0, i64 1256
  br label %101

101:                                              ; preds = %.lr.ph106, %101
  %.1104 = phi i32 [ %.1102, %.lr.ph106 ], [ %.1, %101 ]
  %102 = tail call ptr @b2ShapeArray_Get(ptr noundef nonnull %100, i32 noundef %.1104)
  %103 = tail call <2 x float> @b2ComputeShapeExtent(ptr noundef %102, <2 x float> %.sroa.021.2) #8
  %104 = load float, ptr %13, align 4, !tbaa !9
  %.sroa.0.0.vec.extract = extractelement <2 x float> %103, i64 0
  %105 = tail call float @b2MinFloat(float noundef %104, float noundef %.sroa.0.0.vec.extract)
  store float %105, ptr %13, align 4, !tbaa !9
  %106 = load float, ptr %14, align 4, !tbaa !16
  %.sroa.0.4.vec.extract = extractelement <2 x float> %103, i64 1
  %107 = tail call float @b2MaxFloat(float noundef %106, float noundef %.sroa.0.4.vec.extract)
  store float %107, ptr %14, align 4, !tbaa !16
  %108 = getelementptr inbounds i8, ptr %102, i64 12
  %.1 = load i32, ptr %108, align 4, !tbaa !21
  %.not89 = icmp eq i32 %.1, -1
  br i1 %.not89, label %.loopexit, label %101, !llvm.loop !41

.loopexit:                                        ; preds = %26, %101, %23, %99, %18
  ret void
}

declare <2 x float> @b2ComputeShapeExtent(ptr noundef, <2 x float>) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2MinFloat(float noundef, float noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2MaxFloat(float noundef, float noundef) local_unnamed_addr #4

declare { <2 x float>, <2 x float> } @b2ComputeShapeMass(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2MulAdd(<2 x float>, float noundef, <2 x float>) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2MulSV(float noundef, <2 x float>) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden float @b2Dot(<2 x float>, <2 x float>) local_unnamed_addr #6

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2TransformPoint(<2 x float>, <2 x float>, <2 x float>) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2CrossSV(float noundef, <2 x float>) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Sub(<2 x float>, <2 x float>) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @b2Add(<2 x float>, <2 x float>) local_unnamed_addr #6

attributes #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 #1 = { cold noreturn nounwind memory(inaccessiblemem: write) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 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 = { nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint nounwind 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 68}
!10 = !{!"b2BodySim", !11, i64 0, !12, i64 16, !13, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !14, i64 88, !15, i64 92, !15, i64 93, !15, i64 94, !15, i64 95, !15, i64 96}
!11 = !{!"b2Transform", !12, i64 0, !13, i64 8}
!12 = !{!"b2Vec2", !6, i64 0, !6, i64 4}
!13 = !{!"b2Rot", !6, i64 0, !6, i64 4}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!10, !6, i64 72}
!17 = !{!18, !14, i64 112}
!18 = !{!"b2Body", !7, i64 0, !19, i64 32, !14, i64 40, !14, i64 44, !14, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !14, i64 64, !14, i64 68, !14, i64 72, !14, i64 76, !14, i64 80, !14, i64 84, !6, i64 88, !6, i64 92, !6, i64 96, !6, i64 100, !14, i64 104, !14, i64 108, !14, i64 112, !20, i64 116, !15, i64 118, !15, i64 119, !15, i64 120, !15, i64 121}
!19 = !{!"any pointer", !7, i64 0}
!20 = !{!"short", !7, i64 0}
!21 = !{!14, !14, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!18, !14, i64 56}
!25 = !{!26, !14, i64 12}
!26 = !{!"b2Shape", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !14, i64 44, !27, i64 48, !27, i64 64, !12, i64 80, !14, i64 88, !28, i64 96, !19, i64 120, !14, i64 128, !7, i64 132, !20, i64 276, !15, i64 278, !15, i64 279, !15, i64 280, !15, i64 281, !15, i64 282}
!27 = !{!"b2AABB", !12, i64 0, !12, i64 8}
!28 = !{!"b2Filter", !29, i64 0, !29, i64 8, !14, i64 16}
!29 = !{!"long", !7, i64 0}
!30 = !{!26, !6, i64 24}
!31 = distinct !{!31, !23}
!32 = !{!18, !6, i64 88}
!33 = !{!18, !6, i64 92}
!34 = !{!10, !6, i64 60}
!35 = !{!18, !15, i64 119}
!36 = !{i8 0, i8 2}
!37 = !{}
!38 = !{!10, !6, i64 64}
!39 = !{!40, !6, i64 8}
!40 = !{!"b2BodyState", !12, i64 0, !6, i64 8, !14, i64 12, !12, i64 16, !13, i64 24}
!41 = distinct !{!41, !23}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass