; 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.b2BodyId = type { i32, i16, i16 }
%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.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.b2Vec2 = type { float, float }
%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.b2Joint = type { ptr, i32, i32, i32, [2 x %struct.b2JointEdge], i32, i32, i32, i32, float, i32, i16, i8, i8 }
%struct.b2JointEdge = type { i32, i32, i32 }
%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.b2ChainShape = type { i32, i32, i32, i32, i32, ptr, ptr, i16 }
%struct.b2SolverSet = type { %struct.b2BodySimArray, %struct.b2BodyStateArray, %struct.b2JointSimArray, %struct.b2ContactSimArray, %struct.b2IslandSimArray, i32 }
%struct.b2BodySimArray = type { ptr, i32, i32 }
%struct.b2BodyStateArray = type { ptr, i32, i32 }
%struct.b2IslandSimArray = type { ptr, i32, i32 }
%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 }

@.str.1 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @b2GetBodyFullId(ptr noundef, i64) #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: inlinehint nounwind uwtable
declare hidden ptr @b2BodyArray_Get(ptr noundef, i32 noundef) #3

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

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

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

declare void @b2ValidateSolverSets(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @b2DestroyBody(i64 %0) #0 {
  %2 = alloca %struct.b2BodyId, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  store i64 %0, ptr %2, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %21 = getelementptr inbounds %struct.b2BodyId, ptr %2, i32 0, i32 1
  %22 = load i16, ptr %21, align 4, !tbaa !5
  %23 = zext i16 %22 to i32
  %24 = call ptr @b2GetWorldLocked(i32 noundef %23)
  store ptr %24, ptr %3, align 8, !tbaa !11
  %25 = load ptr, ptr %3, align 8, !tbaa !11
  %26 = icmp eq ptr %25, null
  br i1 %26, label %27, label %28

27:                                               ; preds = %1
  store i32 1, ptr %4, align 4
  br label %219

28:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %29 = load ptr, ptr %3, align 8, !tbaa !11
  %30 = load i64, ptr %2, align 4
  %31 = call ptr @b2GetBodyFullId(ptr noundef %29, i64 %30)
  store ptr %31, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 1, ptr %6, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %32 = load ptr, ptr %5, align 8, !tbaa !11
  %33 = getelementptr inbounds %struct.b2Body, ptr %32, i32 0, i32 9
  %34 = load i32, ptr %33, align 4, !tbaa !15
  store i32 %34, ptr %7, align 4, !tbaa !18
  br label %35

35:                                               ; preds = %38, %28
  %36 = load i32, ptr %7, align 4, !tbaa !18
  %37 = icmp ne i32 %36, -1
  br i1 %37, label %38, label %58

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %39 = load i32, ptr %7, align 4, !tbaa !18
  %40 = ashr i32 %39, 1
  store i32 %40, ptr %8, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %41 = load i32, ptr %7, align 4, !tbaa !18
  %42 = and i32 %41, 1
  store i32 %42, ptr %9, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %43 = load ptr, ptr %3, align 8, !tbaa !11
  %44 = getelementptr inbounds %struct.b2World, ptr %43, i32 0, i32 8
  %45 = load i32, ptr %8, align 4, !tbaa !18
  %46 = call ptr @b2JointArray_Get(ptr noundef %44, i32 noundef %45)
  store ptr %46, ptr %10, align 8, !tbaa !11
  %47 = load ptr, ptr %10, align 8, !tbaa !11
  %48 = getelementptr inbounds %struct.b2Joint, ptr %47, i32 0, i32 4
  %49 = load i32, ptr %9, align 4, !tbaa !18
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [2 x %struct.b2JointEdge], ptr %48, i64 0, i64 %50
  %52 = getelementptr inbounds %struct.b2JointEdge, ptr %51, i32 0, i32 2
  %53 = load i32, ptr %52, align 4, !tbaa !19
  store i32 %53, ptr %7, align 4, !tbaa !18
  %54 = load ptr, ptr %3, align 8, !tbaa !11
  %55 = load ptr, ptr %10, align 8, !tbaa !11
  %56 = load i8, ptr %6, align 1, !tbaa !13, !range !21, !noundef !22
  %57 = trunc i8 %56 to i1
  call void @b2DestroyJointInternal(ptr noundef %54, ptr noundef %55, i1 noundef zeroext %57)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %35, !llvm.loop !23

58:                                               ; preds = %35
  %59 = load ptr, ptr %3, align 8, !tbaa !11
  %60 = load ptr, ptr %5, align 8, !tbaa !11
  %61 = load i8, ptr %6, align 1, !tbaa !13, !range !21, !noundef !22
  %62 = trunc i8 %61 to i1
  call void @b2DestroyBodyContacts(ptr noundef %59, ptr noundef %60, i1 noundef zeroext %62)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %63 = load ptr, ptr %5, align 8, !tbaa !11
  %64 = getelementptr inbounds %struct.b2Body, ptr %63, i32 0, i32 6
  %65 = load i32, ptr %64, align 8, !tbaa !25
  store i32 %65, ptr %11, align 4, !tbaa !18
  br label %66

66:                                               ; preds = %81, %58
  %67 = load i32, ptr %11, align 4, !tbaa !18
  %68 = icmp ne i32 %67, -1
  br i1 %68, label %69, label %93

69:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %70 = load ptr, ptr %3, align 8, !tbaa !11
  %71 = getelementptr inbounds %struct.b2World, ptr %70, i32 0, i32 15
  %72 = load i32, ptr %11, align 4, !tbaa !18
  %73 = call ptr @b2ShapeArray_Get(ptr noundef %71, i32 noundef %72)
  store ptr %73, ptr %12, align 8, !tbaa !11
  %74 = load ptr, ptr %12, align 8, !tbaa !11
  %75 = getelementptr inbounds %struct.b2Shape, ptr %74, i32 0, i32 4
  %76 = load i32, ptr %75, align 8, !tbaa !26
  %77 = icmp ne i32 %76, -1
  br i1 %77, label %78, label %81

78:                                               ; preds = %69
  %79 = load ptr, ptr %3, align 8, !tbaa !11
  %80 = load ptr, ptr %12, align 8, !tbaa !11
  call void @b2DestroySensor(ptr noundef %79, ptr noundef %80)
  br label %81

81:                                               ; preds = %78, %69
  %82 = load ptr, ptr %12, align 8, !tbaa !11
  %83 = load ptr, ptr %3, align 8, !tbaa !11
  %84 = getelementptr inbounds %struct.b2World, ptr %83, i32 0, i32 1
  call void @b2DestroyShapeProxy(ptr noundef %82, ptr noundef %84)
  %85 = load ptr, ptr %3, align 8, !tbaa !11
  %86 = getelementptr inbounds %struct.b2World, ptr %85, i32 0, i32 13
  %87 = load i32, ptr %11, align 4, !tbaa !18
  call void @b2FreeId(ptr noundef %86, i32 noundef %87)
  %88 = load ptr, ptr %12, align 8, !tbaa !11
  %89 = getelementptr inbounds %struct.b2Shape, ptr %88, i32 0, i32 0
  store i32 -1, ptr %89, align 8, !tbaa !32
  %90 = load ptr, ptr %12, align 8, !tbaa !11
  %91 = getelementptr inbounds %struct.b2Shape, ptr %90, i32 0, i32 3
  %92 = load i32, ptr %91, align 4, !tbaa !33
  store i32 %92, ptr %11, align 4, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %66, !llvm.loop !34

93:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %94 = load ptr, ptr %5, align 8, !tbaa !11
  %95 = getelementptr inbounds %struct.b2Body, ptr %94, i32 0, i32 8
  %96 = load i32, ptr %95, align 8, !tbaa !35
  store i32 %96, ptr %13, align 4, !tbaa !18
  br label %97

97:                                               ; preds = %100, %93
  %98 = load i32, ptr %13, align 4, !tbaa !18
  %99 = icmp ne i32 %98, -1
  br i1 %99, label %100, label %114

100:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %101 = load ptr, ptr %3, align 8, !tbaa !11
  %102 = getelementptr inbounds %struct.b2World, ptr %101, i32 0, i32 16
  %103 = load i32, ptr %13, align 4, !tbaa !18
  %104 = call ptr @b2ChainShapeArray_Get(ptr noundef %102, i32 noundef %103)
  store ptr %104, ptr %14, align 8, !tbaa !11
  %105 = load ptr, ptr %14, align 8, !tbaa !11
  call void @b2FreeChainData(ptr noundef %105)
  %106 = load ptr, ptr %3, align 8, !tbaa !11
  %107 = getelementptr inbounds %struct.b2World, ptr %106, i32 0, i32 14
  %108 = load i32, ptr %13, align 4, !tbaa !18
  call void @b2FreeId(ptr noundef %107, i32 noundef %108)
  %109 = load ptr, ptr %14, align 8, !tbaa !11
  %110 = getelementptr inbounds %struct.b2ChainShape, ptr %109, i32 0, i32 0
  store i32 -1, ptr %110, align 8, !tbaa !36
  %111 = load ptr, ptr %14, align 8, !tbaa !11
  %112 = getelementptr inbounds %struct.b2ChainShape, ptr %111, i32 0, i32 2
  %113 = load i32, ptr %112, align 8, !tbaa !38
  store i32 %113, ptr %13, align 4, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %97, !llvm.loop !39

114:                                              ; preds = %97
  %115 = load ptr, ptr %3, align 8, !tbaa !11
  %116 = load ptr, ptr %5, align 8, !tbaa !11
  call void @b2RemoveBodyFromIsland(ptr noundef %115, ptr noundef %116)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %117 = load ptr, ptr %3, align 8, !tbaa !11
  %118 = getelementptr inbounds %struct.b2World, ptr %117, i32 0, i32 6
  %119 = load ptr, ptr %5, align 8, !tbaa !11
  %120 = getelementptr inbounds %struct.b2Body, ptr %119, i32 0, i32 2
  %121 = load i32, ptr %120, align 8, !tbaa !40
  %122 = call ptr @b2SolverSetArray_Get(ptr noundef %118, i32 noundef %121)
  store ptr %122, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %123 = load ptr, ptr %15, align 8, !tbaa !11
  %124 = getelementptr inbounds %struct.b2SolverSet, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %5, align 8, !tbaa !11
  %126 = getelementptr inbounds %struct.b2Body, ptr %125, i32 0, i32 3
  %127 = load i32, ptr %126, align 4, !tbaa !41
  %128 = call i32 @b2BodySimArray_RemoveSwap(ptr noundef %124, i32 noundef %127)
  store i32 %128, ptr %16, align 4, !tbaa !18
  %129 = load i32, ptr %16, align 4, !tbaa !18
  %130 = icmp ne i32 %129, -1
  br i1 %130, label %131, label %166

131:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %132 = load ptr, ptr %15, align 8, !tbaa !11
  %133 = getelementptr inbounds %struct.b2SolverSet, ptr %132, i32 0, i32 0
  %134 = getelementptr inbounds %struct.b2BodySimArray, ptr %133, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8, !tbaa !42
  %136 = load ptr, ptr %5, align 8, !tbaa !11
  %137 = getelementptr inbounds %struct.b2Body, ptr %136, i32 0, i32 3
  %138 = load i32, ptr %137, align 4, !tbaa !41
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds %struct.b2BodySim, ptr %135, i64 %139
  store ptr %140, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %141 = load ptr, ptr %17, align 8, !tbaa !11
  %142 = getelementptr inbounds %struct.b2BodySim, ptr %141, i32 0, i32 14
  %143 = load i32, ptr %142, align 4, !tbaa !45
  store i32 %143, ptr %18, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %144 = load ptr, ptr %3, align 8, !tbaa !11
  %145 = getelementptr inbounds %struct.b2World, ptr %144, i32 0, i32 4
  %146 = load i32, ptr %18, align 4, !tbaa !18
  %147 = call ptr @b2BodyArray_Get(ptr noundef %145, i32 noundef %146)
  store ptr %147, ptr %19, align 8, !tbaa !11
  br label %148

148:                                              ; preds = %131
  %149 = load ptr, ptr %19, align 8, !tbaa !11
  %150 = getelementptr inbounds %struct.b2Body, ptr %149, i32 0, i32 3
  %151 = load i32, ptr %150, align 4, !tbaa !41
  %152 = load i32, ptr %16, align 4, !tbaa !18
  %153 = icmp eq i32 %151, %152
  br i1 %153, label %158, label %154

154:                                              ; preds = %148
  %155 = call i32 @b2InternalAssertFcn(ptr noundef @.str.16, ptr noundef @.str.1, i32 noundef 412)
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %157, label %158

157:                                              ; preds = %154
  call void @llvm.trap()
  br label %158

158:                                              ; preds = %157, %154, %148
  br label %159

159:                                              ; preds = %158
  br label %160

160:                                              ; preds = %159
  %161 = load ptr, ptr %5, align 8, !tbaa !11
  %162 = getelementptr inbounds %struct.b2Body, ptr %161, i32 0, i32 3
  %163 = load i32, ptr %162, align 4, !tbaa !41
  %164 = load ptr, ptr %19, align 8, !tbaa !11
  %165 = getelementptr inbounds %struct.b2Body, ptr %164, i32 0, i32 3
  store i32 %163, ptr %165, align 4, !tbaa !41
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %166

166:                                              ; preds = %160, %114
  %167 = load ptr, ptr %5, align 8, !tbaa !11
  %168 = getelementptr inbounds %struct.b2Body, ptr %167, i32 0, i32 2
  %169 = load i32, ptr %168, align 8, !tbaa !40
  %170 = icmp eq i32 %169, 2
  br i1 %170, label %171, label %189

171:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %172 = load ptr, ptr %15, align 8, !tbaa !11
  %173 = getelementptr inbounds %struct.b2SolverSet, ptr %172, i32 0, i32 1
  %174 = load ptr, ptr %5, align 8, !tbaa !11
  %175 = getelementptr inbounds %struct.b2Body, ptr %174, i32 0, i32 3
  %176 = load i32, ptr %175, align 4, !tbaa !41
  %177 = call i32 @b2BodyStateArray_RemoveSwap(ptr noundef %173, i32 noundef %176)
  store i32 %177, ptr %20, align 4, !tbaa !18
  br label %178

178:                                              ; preds = %171
  %179 = load i32, ptr %20, align 4, !tbaa !18
  %180 = load i32, ptr %16, align 4, !tbaa !18
  %181 = icmp eq i32 %179, %180
  br i1 %181, label %186, label %182

182:                                              ; preds = %178
  %183 = call i32 @b2InternalAssertFcn(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 420)
  %184 = icmp ne i32 %183, 0
  br i1 %184, label %185, label %186

185:                                              ; preds = %182
  call void @llvm.trap()
  br label %186

186:                                              ; preds = %185, %182, %178
  br label %187

187:                                              ; preds = %186
  br label %188

188:                                              ; preds = %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %206

189:                                              ; preds = %166
  %190 = load ptr, ptr %15, align 8, !tbaa !11
  %191 = getelementptr inbounds %struct.b2SolverSet, ptr %190, i32 0, i32 5
  %192 = load i32, ptr %191, align 8, !tbaa !49
  %193 = icmp sge i32 %192, 3
  br i1 %193, label %194, label %205

194:                                              ; preds = %189
  %195 = load ptr, ptr %15, align 8, !tbaa !11
  %196 = getelementptr inbounds %struct.b2SolverSet, ptr %195, i32 0, i32 0
  %197 = getelementptr inbounds %struct.b2BodySimArray, ptr %196, i32 0, i32 1
  %198 = load i32, ptr %197, align 8, !tbaa !50
  %199 = icmp eq i32 %198, 0
  br i1 %199, label %200, label %205

200:                                              ; preds = %194
  %201 = load ptr, ptr %3, align 8, !tbaa !11
  %202 = load ptr, ptr %15, align 8, !tbaa !11
  %203 = getelementptr inbounds %struct.b2SolverSet, ptr %202, i32 0, i32 5
  %204 = load i32, ptr %203, align 8, !tbaa !49
  call void @b2DestroySolverSet(ptr noundef %201, i32 noundef %204)
  br label %205

205:                                              ; preds = %200, %194, %189
  br label %206

206:                                              ; preds = %205, %188
  %207 = load ptr, ptr %3, align 8, !tbaa !11
  %208 = getelementptr inbounds %struct.b2World, ptr %207, i32 0, i32 3
  %209 = load ptr, ptr %5, align 8, !tbaa !11
  %210 = getelementptr inbounds %struct.b2Body, ptr %209, i32 0, i32 19
  %211 = load i32, ptr %210, align 4, !tbaa !51
  call void @b2FreeId(ptr noundef %208, i32 noundef %211)
  %212 = load ptr, ptr %5, align 8, !tbaa !11
  %213 = getelementptr inbounds %struct.b2Body, ptr %212, i32 0, i32 2
  store i32 -1, ptr %213, align 8, !tbaa !40
  %214 = load ptr, ptr %5, align 8, !tbaa !11
  %215 = getelementptr inbounds %struct.b2Body, ptr %214, i32 0, i32 3
  store i32 -1, ptr %215, align 4, !tbaa !41
  %216 = load ptr, ptr %5, align 8, !tbaa !11
  %217 = getelementptr inbounds %struct.b2Body, ptr %216, i32 0, i32 19
  store i32 -1, ptr %217, align 4, !tbaa !51
  %218 = load ptr, ptr %3, align 8, !tbaa !11
  call void @b2ValidateSolverSets(ptr noundef %218)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  store i32 0, ptr %4, align 4
  br label %219

219:                                              ; preds = %206, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  %220 = load i32, ptr %4, align 4
  switch i32 %220, label %222 [
    i32 0, label %221
    i32 1, label %221
  ]

221:                                              ; preds = %219, %219
  ret void

222:                                              ; preds = %219
  unreachable
}

declare ptr @b2GetWorldLocked(i32 noundef) #1

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

declare void @b2DestroyJointInternal(ptr noundef, ptr noundef, i1 noundef zeroext) #1

; Function Attrs: nounwind uwtable
declare hidden void @b2DestroyBodyContacts(ptr noundef, ptr noundef, i1 noundef zeroext) #0

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

declare void @b2DestroySensor(ptr noundef, ptr noundef) #1

declare void @b2DestroyShapeProxy(ptr noundef, ptr noundef) #1

declare void @b2FreeId(ptr noundef, i32 noundef) #1

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

declare void @b2FreeChainData(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @b2RemoveBodyFromIsland(ptr noundef, ptr noundef) #0

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

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

declare void @b2DestroySolverSet(ptr noundef, i32 noundef) #1

attributes #0 = { 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 #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 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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, !10, i64 4}
!6 = !{!"b2BodyId", !7, i64 0, !10, i64 4, !10, i64 6}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_Bool", !8, i64 0}
!15 = !{!16, !7, i64 68}
!16 = !{!"b2Body", !8, i64 0, !12, i64 32, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !17, i64 88, !17, i64 92, !17, i64 96, !17, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !10, i64 116, !14, i64 118, !14, i64 119, !14, i64 120, !14, i64 121}
!17 = !{!"float", !8, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !7, i64 8}
!20 = !{!"b2JointEdge", !7, i64 0, !7, i64 4, !7, i64 8}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!16, !7, i64 56}
!26 = !{!27, !7, i64 16}
!27 = !{!"b2Shape", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !17, i64 24, !17, i64 28, !17, i64 32, !17, i64 36, !17, i64 40, !7, i64 44, !28, i64 48, !28, i64 64, !29, i64 80, !7, i64 88, !30, i64 96, !12, i64 120, !7, i64 128, !8, i64 132, !10, i64 276, !14, i64 278, !14, i64 279, !14, i64 280, !14, i64 281, !14, i64 282}
!28 = !{!"b2AABB", !29, i64 0, !29, i64 8}
!29 = !{!"b2Vec2", !17, i64 0, !17, i64 4}
!30 = !{!"b2Filter", !31, i64 0, !31, i64 8, !7, i64 16}
!31 = !{!"long", !8, i64 0}
!32 = !{!27, !7, i64 0}
!33 = !{!27, !7, i64 12}
!34 = distinct !{!34, !24}
!35 = !{!16, !7, i64 64}
!36 = !{!37, !7, i64 0}
!37 = !{!"b2ChainShape", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !12, i64 24, !12, i64 32, !10, i64 40}
!38 = !{!37, !7, i64 8}
!39 = distinct !{!39, !24}
!40 = !{!16, !7, i64 40}
!41 = !{!16, !7, i64 44}
!42 = !{!43, !12, i64 0}
!43 = !{!"b2SolverSet", !44, i64 0, !44, i64 16, !44, i64 32, !44, i64 48, !44, i64 64, !7, i64 80}
!44 = !{!"", !12, i64 0, !7, i64 8, !7, i64 12}
!45 = !{!46, !7, i64 88}
!46 = !{!"b2BodySim", !47, i64 0, !29, i64 16, !48, i64 24, !29, i64 32, !29, i64 40, !29, i64 48, !17, i64 56, !17, i64 60, !17, i64 64, !17, i64 68, !17, i64 72, !17, i64 76, !17, i64 80, !17, i64 84, !7, i64 88, !14, i64 92, !14, i64 93, !14, i64 94, !14, i64 95, !14, i64 96}
!47 = !{!"b2Transform", !29, i64 0, !48, i64 8}
!48 = !{!"b2Rot", !17, i64 0, !17, i64 4}
!49 = !{!43, !7, i64 80}
!50 = !{!43, !7, i64 8}
!51 = !{!16, !7, i64 108}


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

@.str.1 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @b2GetBodyFullId(ptr noundef, i64) local_unnamed_addr #0

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

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

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

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

declare void @b2ValidateSolverSets(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @b2DestroyBody(i64 %0) local_unnamed_addr #0 {
  %.sroa.2.0.extract.shift = lshr i64 %0, 32
  %2 = trunc nuw i64 %.sroa.2.0.extract.shift to i32
  %3 = and i32 %2, 65535
  %4 = tail call ptr @b2GetWorldLocked(i32 noundef %3) #4
  %5 = icmp eq ptr %4, null
  br i1 %5, label %83, label %6

6:                                                ; preds = %1
  %7 = tail call ptr @b2GetBodyFullId(ptr noundef nonnull %4, i64 %0)
  %8 = getelementptr inbounds i8, ptr %7, i64 68
  %9 = load i32, ptr %8, align 4, !tbaa !5
  %.not79 = icmp eq i32 %9, -1
  br i1 %.not79, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %6
  %10 = getelementptr inbounds i8, ptr %4, i64 1112
  br label %11

11:                                               ; preds = %.lr.ph, %11
  %.080 = phi i32 [ %9, %.lr.ph ], [ %18, %11 ]
  %12 = ashr i32 %.080, 1
  %13 = and i32 %.080, 1
  %14 = tail call ptr @b2JointArray_Get(ptr noundef nonnull %10, i32 noundef %12)
  %15 = getelementptr inbounds i8, ptr %14, i64 20
  %16 = zext nneg i32 %13 to i64
  %17 = getelementptr inbounds [2 x %struct.b2JointEdge], ptr %15, i64 0, i64 %16, i32 2
  %18 = load i32, ptr %17, align 4, !tbaa !14
  tail call void @b2DestroyJointInternal(ptr noundef nonnull %4, ptr noundef %14, i1 noundef zeroext true) #4
  %.not = icmp eq i32 %18, -1
  br i1 %.not, label %._crit_edge, label %11, !llvm.loop !16

._crit_edge:                                      ; preds = %11, %6
  tail call void @b2DestroyBodyContacts(ptr noundef nonnull %4, ptr noundef %7, i1 noundef zeroext true)
  %19 = getelementptr inbounds i8, ptr %7, i64 56
  %.06881 = load i32, ptr %19, align 4, !tbaa !18
  %.not7382 = icmp eq i32 %.06881, -1
  br i1 %.not7382, label %._crit_edge86, label %.lr.ph85

.lr.ph85:                                         ; preds = %._crit_edge
  %20 = getelementptr inbounds i8, ptr %4, i64 1256
  %21 = getelementptr inbounds i8, ptr %4, i64 40
  %22 = getelementptr inbounds i8, ptr %4, i64 1208
  br label %23

23:                                               ; preds = %.lr.ph85, %28
  %.06883 = phi i32 [ %.06881, %.lr.ph85 ], [ %.068, %28 ]
  %24 = tail call ptr @b2ShapeArray_Get(ptr noundef nonnull %20, i32 noundef %.06883)
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  %26 = load i32, ptr %25, align 8, !tbaa !19
  %.not78 = icmp eq i32 %26, -1
  br i1 %.not78, label %28, label %27

27:                                               ; preds = %23
  tail call void @b2DestroySensor(ptr noundef nonnull %4, ptr noundef nonnull %24) #4
  br label %28

28:                                               ; preds = %27, %23
  tail call void @b2DestroyShapeProxy(ptr noundef nonnull %24, ptr noundef nonnull %21) #4
  tail call void @b2FreeId(ptr noundef nonnull %22, i32 noundef %.06883) #4
  store i32 -1, ptr %24, align 8, !tbaa !25
  %29 = getelementptr inbounds i8, ptr %24, i64 12
  %.068 = load i32, ptr %29, align 4, !tbaa !18
  %.not73 = icmp eq i32 %.068, -1
  br i1 %.not73, label %._crit_edge86, label %23, !llvm.loop !26

._crit_edge86:                                    ; preds = %28, %._crit_edge
  %30 = getelementptr inbounds i8, ptr %7, i64 64
  %.06987 = load i32, ptr %30, align 8, !tbaa !18
  %.not7488 = icmp eq i32 %.06987, -1
  br i1 %.not7488, label %._crit_edge92, label %.lr.ph91

.lr.ph91:                                         ; preds = %._crit_edge86
  %31 = getelementptr inbounds i8, ptr %4, i64 1272
  %32 = getelementptr inbounds i8, ptr %4, i64 1232
  br label %33

33:                                               ; preds = %.lr.ph91, %33
  %.06989 = phi i32 [ %.06987, %.lr.ph91 ], [ %.069, %33 ]
  %34 = tail call ptr @b2ChainShapeArray_Get(ptr noundef nonnull %31, i32 noundef %.06989)
  tail call void @b2FreeChainData(ptr noundef %34) #4
  tail call void @b2FreeId(ptr noundef nonnull %32, i32 noundef %.06989) #4
  store i32 -1, ptr %34, align 8, !tbaa !27
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %.069 = load i32, ptr %35, align 8, !tbaa !18
  %.not74 = icmp eq i32 %.069, -1
  br i1 %.not74, label %._crit_edge92, label %33, !llvm.loop !29

._crit_edge92:                                    ; preds = %33, %._crit_edge86
  tail call void @b2RemoveBodyFromIsland(ptr noundef nonnull %4, ptr noundef %7)
  %36 = getelementptr inbounds i8, ptr %4, i64 1072
  %37 = getelementptr inbounds i8, ptr %7, i64 40
  %38 = load i32, ptr %37, align 8, !tbaa !30
  %39 = tail call ptr @b2SolverSetArray_Get(ptr noundef nonnull %36, i32 noundef %38)
  %40 = getelementptr inbounds i8, ptr %7, i64 44
  %41 = load i32, ptr %40, align 4, !tbaa !31
  %42 = tail call i32 @b2BodySimArray_RemoveSwap(ptr noundef %39, i32 noundef %41)
  %.not75 = icmp eq i32 %42, -1
  br i1 %.not75, label %59, label %43

43:                                               ; preds = %._crit_edge92
  %44 = load ptr, ptr %39, align 8, !tbaa !32
  %45 = load i32, ptr %40, align 4, !tbaa !31
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds %struct.b2BodySim, ptr %44, i64 %46, i32 14
  %48 = load i32, ptr %47, align 4, !tbaa !35
  %49 = getelementptr inbounds i8, ptr %4, i64 1032
  %50 = tail call ptr @b2BodyArray_Get(ptr noundef nonnull %49, i32 noundef %48)
  %51 = getelementptr inbounds i8, ptr %50, i64 44
  %52 = load i32, ptr %51, align 4, !tbaa !31
  %53 = icmp eq i32 %52, %42
  br i1 %53, label %57, label %54

54:                                               ; preds = %43
  %55 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1, i32 noundef 412) #4
  %.not76 = icmp eq i32 %55, 0
  br i1 %.not76, label %57, label %56

56:                                               ; preds = %54
  tail call void @llvm.trap()
  unreachable

57:                                               ; preds = %54, %43
  %58 = load i32, ptr %40, align 4, !tbaa !31
  store i32 %58, ptr %51, align 4, !tbaa !31
  br label %59

59:                                               ; preds = %57, %._crit_edge92
  %60 = load i32, ptr %37, align 8, !tbaa !30
  %61 = icmp eq i32 %60, 2
  br i1 %61, label %62, label %70

62:                                               ; preds = %59
  %63 = getelementptr inbounds i8, ptr %39, i64 16
  %64 = load i32, ptr %40, align 4, !tbaa !31
  %65 = tail call i32 @b2BodyStateArray_RemoveSwap(ptr noundef nonnull %63, i32 noundef %64)
  %66 = icmp eq i32 %65, %42
  br i1 %66, label %79, label %67

67:                                               ; preds = %62
  %68 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 420) #4
  %.not77 = icmp eq i32 %68, 0
  br i1 %.not77, label %79, label %69

69:                                               ; preds = %67
  tail call void @llvm.trap()
  unreachable

70:                                               ; preds = %59
  %71 = getelementptr inbounds i8, ptr %39, i64 80
  %72 = load i32, ptr %71, align 8, !tbaa !39
  %73 = icmp sgt i32 %72, 2
  br i1 %73, label %74, label %79

74:                                               ; preds = %70
  %75 = getelementptr inbounds i8, ptr %39, i64 8
  %76 = load i32, ptr %75, align 8, !tbaa !40
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %74
  tail call void @b2DestroySolverSet(ptr noundef nonnull %4, i32 noundef %72) #4
  br label %79

79:                                               ; preds = %62, %67, %70, %74, %78
  %80 = getelementptr inbounds i8, ptr %4, i64 1008
  %81 = getelementptr inbounds i8, ptr %7, i64 108
  %82 = load i32, ptr %81, align 4, !tbaa !41
  tail call void @b2FreeId(ptr noundef nonnull %80, i32 noundef %82) #4
  store i32 -1, ptr %37, align 8, !tbaa !30
  store i32 -1, ptr %40, align 4, !tbaa !31
  store i32 -1, ptr %81, align 4, !tbaa !41
  tail call void @b2ValidateSolverSets(ptr noundef nonnull %4) #4
  br label %83

83:                                               ; preds = %1, %79
  ret void
}

declare ptr @b2GetWorldLocked(i32 noundef) local_unnamed_addr #1

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

declare void @b2DestroyJointInternal(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @b2DestroyBodyContacts(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #0

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

declare void @b2DestroySensor(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @b2DestroyShapeProxy(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @b2FreeId(ptr noundef, i32 noundef) local_unnamed_addr #1

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

declare void @b2FreeChainData(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @b2RemoveBodyFromIsland(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

declare void @b2DestroySolverSet(ptr noundef, i32 noundef) local_unnamed_addr #1

attributes #0 = { 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 #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 = { 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 #4 = { 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, !10, i64 68}
!6 = !{!"b2Body", !7, i64 0, !9, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !12, i64 116, !13, i64 118, !13, i64 119, !13, i64 120, !13, i64 121}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!"float", !7, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!15, !10, i64 8}
!15 = !{!"b2JointEdge", !10, i64 0, !10, i64 4, !10, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!10, !10, i64 0}
!19 = !{!20, !10, i64 16}
!20 = !{!"b2Shape", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !10, i64 44, !21, i64 48, !21, i64 64, !22, i64 80, !10, i64 88, !23, i64 96, !9, i64 120, !10, i64 128, !7, i64 132, !12, i64 276, !13, i64 278, !13, i64 279, !13, i64 280, !13, i64 281, !13, i64 282}
!21 = !{!"b2AABB", !22, i64 0, !22, i64 8}
!22 = !{!"b2Vec2", !11, i64 0, !11, i64 4}
!23 = !{!"b2Filter", !24, i64 0, !24, i64 8, !10, i64 16}
!24 = !{!"long", !7, i64 0}
!25 = !{!20, !10, i64 0}
!26 = distinct !{!26, !17}
!27 = !{!28, !10, i64 0}
!28 = !{!"b2ChainShape", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !9, i64 24, !9, i64 32, !12, i64 40}
!29 = distinct !{!29, !17}
!30 = !{!6, !10, i64 40}
!31 = !{!6, !10, i64 44}
!32 = !{!33, !9, i64 0}
!33 = !{!"b2SolverSet", !34, i64 0, !34, i64 16, !34, i64 32, !34, i64 48, !34, i64 64, !10, i64 80}
!34 = !{!"", !9, i64 0, !10, i64 8, !10, i64 12}
!35 = !{!36, !10, i64 88}
!36 = !{!"b2BodySim", !37, i64 0, !22, i64 16, !38, i64 24, !22, i64 32, !22, i64 40, !22, i64 48, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !10, i64 88, !13, i64 92, !13, i64 93, !13, i64 94, !13, i64 95, !13, i64 96}
!37 = !{!"b2Transform", !22, i64 0, !38, i64 8}
!38 = !{!"b2Rot", !11, i64 0, !11, i64 4}
!39 = !{!33, !10, i64 80}
!40 = !{!33, !10, i64 8}
!41 = !{!6, !10, i64 108}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass