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

; 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.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.b2JointSimArray = type { ptr, i32, i32 }
%struct.b2ContactSimArray = type { ptr, i32, i32 }
%struct.b2IslandSimArray = type { ptr, i32, i32 }
%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 }
%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.b2Island = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%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.b2BodyMoveEvent = type { %struct.b2Transform, %struct.b2BodyId, ptr, i8 }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Rot = type { float, float }
%struct.b2BodyId = type { i32, i16, i16 }
%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.b2Contact = type { i32, i32, i32, [2 x %struct.b2ContactEdge], i32, i32, i32, i32, i32, i32, i32, i8 }
%struct.b2ContactEdge = type { i32, i32, i32 }
%struct.b2ContactSim = type { i32, i32, i32, i32, i32, float, float, float, float, %struct.b2Manifold, float, float, float, float, i32, %struct.b2SimplexCache }
%struct.b2Manifold = type { %struct.b2Vec2, float, [2 x %struct.b2ManifoldPoint], i32 }
%struct.b2ManifoldPoint = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, i16, i8 }
%struct.b2SimplexCache = type { i16, [3 x i8], [3 x i8] }
%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.b2JointSim = type { i32, i32, i32, i32, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, %union.anon.0 }
%union.anon.0 = type { %struct.b2PrismaticJoint }
%struct.b2PrismaticJoint = type { %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, float, float, float, float, float, float, i32, i32, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, %struct.b2Softness, i8, i8, i8 }
%struct.b2Softness = type { float, float, float }
%struct.b2IslandSim = type { i32 }

@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [44 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

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

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

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2BodySimArray_Add(ptr noundef) #2

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2ContactSimArray_Add(ptr noundef) #2

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2IslandSimArray_Add(ptr noundef) #2

declare void @b2ValidateSolverSets(ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @b2TrySleepIsland(ptr noundef %0, i32 noundef %1) #6 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %struct.b2SolverSet, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %struct.b2SolverSet, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %struct.b2BodySimArray, align 8
  %13 = alloca %struct.b2ContactSimArray, align 8
  %14 = alloca %struct.b2JointSimArray, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca i32, align 4
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca i32, align 4
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca i32, align 4
  %41 = alloca ptr, align 8
  %42 = alloca i32, align 4
  %43 = alloca ptr, align 8
  %44 = alloca i32, align 4
  %45 = alloca ptr, align 8
  %46 = alloca i32, align 4
  %47 = alloca ptr, align 8
  %48 = alloca i32, align 4
  %49 = alloca ptr, align 8
  %50 = alloca ptr, align 8
  %51 = alloca i32, align 4
  %52 = alloca ptr, align 8
  %53 = alloca i32, align 4
  %54 = alloca i32, align 4
  %55 = alloca ptr, align 8
  %56 = alloca ptr, align 8
  %57 = alloca i32, align 4
  %58 = alloca ptr, align 8
  %59 = alloca i32, align 4
  %60 = alloca ptr, align 8
  %61 = alloca i32, align 4
  %62 = alloca ptr, align 8
  %63 = alloca i32, align 4
  %64 = alloca ptr, align 8
  %65 = alloca i32, align 4
  %66 = alloca ptr, align 8
  %67 = alloca i32, align 4
  %68 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.b2World, ptr %69, i32 0, i32 12
  %71 = load i32, ptr %4, align 4, !tbaa !9
  %72 = call ptr @b2IslandArray_Get(ptr noundef %70, i32 noundef %71)
  store ptr %72, ptr %5, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %2
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.b2Island, ptr %74, i32 0, i32 0
  %76 = load i32, ptr %75, align 4, !tbaa !11
  %77 = icmp eq i32 %76, 2
  br i1 %77, label %82, label %78

78:                                               ; preds = %73
  %79 = call i32 @b2InternalAssertFcn(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 159)
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %82

81:                                               ; preds = %78
  call void @llvm.trap()
  br label %82

82:                                               ; preds = %81, %78, %73
  br label %83

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.b2Island, ptr %85, i32 0, i32 13
  %87 = load i32, ptr %86, align 4, !tbaa !13
  %88 = icmp sgt i32 %87, 0
  br i1 %88, label %89, label %90

89:                                               ; preds = %84
  store i32 1, ptr %6, align 4
  br label %853

90:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.b2World, ptr %91, i32 0, i32 5
  %93 = call i32 @b2AllocId(ptr noundef %92)
  store i32 %93, ptr %7, align 4, !tbaa !9
  %94 = load i32, ptr %7, align 4, !tbaa !9
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.b2World, ptr %95, i32 0, i32 6
  %97 = getelementptr inbounds %struct.b2SolverSetArray, ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 8, !tbaa !14
  %99 = icmp eq i32 %94, %98
  br i1 %99, label %100, label %104

100:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 88, ptr %8) #7
  call void @llvm.memset.p0.i64(ptr align 8 %8, i8 0, i64 88, i1 false)
  %101 = getelementptr inbounds %struct.b2SolverSet, ptr %8, i32 0, i32 5
  store i32 -1, ptr %101, align 8, !tbaa !30
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.b2World, ptr %102, i32 0, i32 6
  call void @b2SolverSetArray_Push(ptr noundef %103, ptr noundef byval(%struct.b2SolverSet) align 8 %8)
  call void @llvm.lifetime.end.p0(i64 88, ptr %8) #7
  br label %104

104:                                              ; preds = %100, %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.b2World, ptr %105, i32 0, i32 6
  %107 = load i32, ptr %7, align 4, !tbaa !9
  %108 = call ptr @b2SolverSetArray_Get(ptr noundef %106, i32 noundef %107)
  store ptr %108, ptr %9, align 8, !tbaa !5
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 88, i1 false)
  %110 = getelementptr inbounds %struct.b2SolverSet, ptr %10, i32 0, i32 0
  %111 = getelementptr inbounds %struct.b2BodySimArray, ptr %110, i32 0, i32 0
  %112 = getelementptr inbounds %struct.b2BodySimArray, ptr %110, i32 0, i32 1
  %113 = getelementptr inbounds %struct.b2BodySimArray, ptr %110, i32 0, i32 2
  %114 = getelementptr inbounds %struct.b2SolverSet, ptr %10, i32 0, i32 1
  %115 = getelementptr inbounds %struct.b2SolverSet, ptr %10, i32 0, i32 2
  %116 = getelementptr inbounds %struct.b2SolverSet, ptr %10, i32 0, i32 3
  %117 = getelementptr inbounds %struct.b2SolverSet, ptr %10, i32 0, i32 4
  %118 = getelementptr inbounds %struct.b2SolverSet, ptr %10, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %109, ptr align 8 %10, i64 88, i1 false), !tbaa.struct !32
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.b2World, ptr %119, i32 0, i32 6
  %121 = call ptr @b2SolverSetArray_Get(ptr noundef %120, i32 noundef 2)
  store ptr %121, ptr %11, align 8, !tbaa !5
  br label %122

122:                                              ; preds = %104
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.b2Island, ptr %123, i32 0, i32 1
  %125 = load i32, ptr %124, align 4, !tbaa !33
  %126 = icmp sle i32 0, %125
  br i1 %126, label %127, label %136

127:                                              ; preds = %122
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.b2Island, ptr %128, i32 0, i32 1
  %130 = load i32, ptr %129, align 4, !tbaa !33
  %131 = load ptr, ptr %11, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.b2SolverSet, ptr %131, i32 0, i32 4
  %133 = getelementptr inbounds %struct.b2IslandSimArray, ptr %132, i32 0, i32 1
  %134 = load i32, ptr %133, align 8, !tbaa !34
  %135 = icmp slt i32 %130, %134
  br i1 %135, label %140, label %136

136:                                              ; preds = %127, %122
  %137 = call i32 @b2InternalAssertFcn(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 186)
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %139, label %140

139:                                              ; preds = %136
  call void @llvm.trap()
  br label %140

140:                                              ; preds = %139, %136, %127
  br label %141

141:                                              ; preds = %140
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %7, align 4, !tbaa !9
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.b2SolverSet, ptr %144, i32 0, i32 5
  store i32 %143, ptr %145, align 8, !tbaa !30
  %146 = load ptr, ptr %9, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.b2SolverSet, ptr %146, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  %148 = load ptr, ptr %5, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.b2Island, ptr %148, i32 0, i32 5
  %150 = load i32, ptr %149, align 4, !tbaa !35
  %151 = call { ptr, i64 } @b2BodySimArray_Create(i32 noundef %150)
  %152 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 0
  %153 = extractvalue { ptr, i64 } %151, 0
  store ptr %153, ptr %152, align 8
  %154 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 1
  %155 = extractvalue { ptr, i64 } %151, 1
  store i64 %155, ptr %154, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %147, ptr align 8 %12, i64 16, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.b2SolverSet, ptr %156, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.b2Island, ptr %158, i32 0, i32 8
  %160 = load i32, ptr %159, align 4, !tbaa !37
  %161 = call { ptr, i64 } @b2ContactSimArray_Create(i32 noundef %160)
  %162 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 0
  %163 = extractvalue { ptr, i64 } %161, 0
  store ptr %163, ptr %162, align 8
  %164 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 1
  %165 = extractvalue { ptr, i64 } %161, 1
  store i64 %165, ptr %164, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %157, ptr align 8 %13, i64 16, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  %166 = load ptr, ptr %9, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.b2SolverSet, ptr %166, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.b2Island, ptr %168, i32 0, i32 11
  %170 = load i32, ptr %169, align 4, !tbaa !38
  %171 = call { ptr, i64 } @b2JointSimArray_Create(i32 noundef %170)
  %172 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %173 = extractvalue { ptr, i64 } %171, 0
  store ptr %173, ptr %172, align 8
  %174 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %175 = extractvalue { ptr, i64 } %171, 1
  store i64 %175, ptr %174, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %167, ptr align 8 %14, i64 16, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.b2World, ptr %176, i32 0, i32 6
  %178 = call ptr @b2SolverSetArray_Get(ptr noundef %177, i32 noundef 1)
  store ptr %178, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.b2Island, ptr %179, i32 0, i32 3
  %181 = load i32, ptr %180, align 4, !tbaa !39
  store i32 %181, ptr %16, align 4, !tbaa !9
  br label %182

182:                                              ; preds = %498, %142
  %183 = load i32, ptr %16, align 4, !tbaa !9
  %184 = icmp ne i32 %183, -1
  br i1 %184, label %185, label %502

185:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.b2World, ptr %186, i32 0, i32 4
  %188 = load i32, ptr %16, align 4, !tbaa !9
  %189 = call ptr @b2BodyArray_Get(ptr noundef %187, i32 noundef %188)
  store ptr %189, ptr %17, align 8, !tbaa !5
  br label %190

190:                                              ; preds = %185
  %191 = load ptr, ptr %17, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.b2Body, ptr %191, i32 0, i32 2
  %193 = load i32, ptr %192, align 8, !tbaa !40
  %194 = icmp eq i32 %193, 2
  br i1 %194, label %199, label %195

195:                                              ; preds = %190
  %196 = call i32 @b2InternalAssertFcn(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 201)
  %197 = icmp ne i32 %196, 0
  br i1 %197, label %198, label %199

198:                                              ; preds = %195
  call void @llvm.trap()
  br label %199

199:                                              ; preds = %198, %195, %190
  br label %200

200:                                              ; preds = %199
  br label %201

201:                                              ; preds = %200
  br label %202

202:                                              ; preds = %201
  %203 = load ptr, ptr %17, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.b2Body, ptr %203, i32 0, i32 11
  %205 = load i32, ptr %204, align 4, !tbaa !42
  %206 = load i32, ptr %4, align 4, !tbaa !9
  %207 = icmp eq i32 %205, %206
  br i1 %207, label %212, label %208

208:                                              ; preds = %202
  %209 = call i32 @b2InternalAssertFcn(ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 202)
  %210 = icmp ne i32 %209, 0
  br i1 %210, label %211, label %212

211:                                              ; preds = %208
  call void @llvm.trap()
  br label %212

212:                                              ; preds = %211, %208, %202
  br label %213

213:                                              ; preds = %212
  br label %214

214:                                              ; preds = %213
  %215 = load ptr, ptr %17, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.b2Body, ptr %215, i32 0, i32 18
  %217 = load i32, ptr %216, align 8, !tbaa !43
  %218 = icmp ne i32 %217, -1
  br i1 %218, label %219, label %263

219:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %220 = load ptr, ptr %3, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.b2World, ptr %220, i32 0, i32 20
  %222 = load ptr, ptr %17, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.b2Body, ptr %222, i32 0, i32 18
  %224 = load i32, ptr %223, align 8, !tbaa !43
  %225 = call ptr @b2BodyMoveEventArray_Get(ptr noundef %221, i32 noundef %224)
  store ptr %225, ptr %18, align 8, !tbaa !5
  br label %226

226:                                              ; preds = %219
  %227 = load ptr, ptr %18, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.b2BodyMoveEvent, ptr %227, i32 0, i32 1
  %229 = getelementptr inbounds %struct.b2BodyId, ptr %228, i32 0, i32 0
  %230 = load i32, ptr %229, align 8, !tbaa !44
  %231 = sub nsw i32 %230, 1
  %232 = load i32, ptr %16, align 4, !tbaa !9
  %233 = icmp eq i32 %231, %232
  br i1 %233, label %238, label %234

234:                                              ; preds = %226
  %235 = call i32 @b2InternalAssertFcn(ptr noundef @.str.15, ptr noundef @.str.1, i32 noundef 209)
  %236 = icmp ne i32 %235, 0
  br i1 %236, label %237, label %238

237:                                              ; preds = %234
  call void @llvm.trap()
  br label %238

238:                                              ; preds = %237, %234, %226
  br label %239

239:                                              ; preds = %238
  br label %240

240:                                              ; preds = %239
  br label %241

241:                                              ; preds = %240
  %242 = load ptr, ptr %18, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.b2BodyMoveEvent, ptr %242, i32 0, i32 1
  %244 = getelementptr inbounds %struct.b2BodyId, ptr %243, i32 0, i32 2
  %245 = load i16, ptr %244, align 2, !tbaa !49
  %246 = zext i16 %245 to i32
  %247 = load ptr, ptr %17, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.b2Body, ptr %247, i32 0, i32 21
  %249 = load i16, ptr %248, align 4, !tbaa !50
  %250 = zext i16 %249 to i32
  %251 = icmp eq i32 %246, %250
  br i1 %251, label %256, label %252

252:                                              ; preds = %241
  %253 = call i32 @b2InternalAssertFcn(ptr noundef @.str.16, ptr noundef @.str.1, i32 noundef 210)
  %254 = icmp ne i32 %253, 0
  br i1 %254, label %255, label %256

255:                                              ; preds = %252
  call void @llvm.trap()
  br label %256

256:                                              ; preds = %255, %252, %241
  br label %257

257:                                              ; preds = %256
  br label %258

258:                                              ; preds = %257
  %259 = load ptr, ptr %18, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.b2BodyMoveEvent, ptr %259, i32 0, i32 3
  store i8 1, ptr %260, align 8, !tbaa !51
  %261 = load ptr, ptr %17, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.b2Body, ptr %261, i32 0, i32 18
  store i32 -1, ptr %262, align 8, !tbaa !43
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %263

263:                                              ; preds = %258, %214
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %264 = load ptr, ptr %17, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.b2Body, ptr %264, i32 0, i32 3
  %266 = load i32, ptr %265, align 4, !tbaa !52
  store i32 %266, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %267 = load ptr, ptr %11, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.b2SolverSet, ptr %267, i32 0, i32 0
  %269 = load i32, ptr %19, align 4, !tbaa !9
  %270 = call ptr @b2BodySimArray_Get(ptr noundef %268, i32 noundef %269)
  store ptr %270, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %271 = load ptr, ptr %9, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.b2SolverSet, ptr %271, i32 0, i32 0
  %273 = getelementptr inbounds %struct.b2BodySimArray, ptr %272, i32 0, i32 1
  %274 = load i32, ptr %273, align 8, !tbaa !53
  store i32 %274, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %275 = load ptr, ptr %9, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.b2SolverSet, ptr %275, i32 0, i32 0
  %277 = call ptr @b2BodySimArray_Add(ptr noundef %276)
  store ptr %277, ptr %22, align 8, !tbaa !5
  %278 = load ptr, ptr %22, align 8, !tbaa !5
  %279 = load ptr, ptr %20, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %278, ptr align 4 %279, i64 100, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %280 = load ptr, ptr %11, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.b2SolverSet, ptr %280, i32 0, i32 0
  %282 = load i32, ptr %19, align 4, !tbaa !9
  %283 = call i32 @b2BodySimArray_RemoveSwap(ptr noundef %281, i32 noundef %282)
  store i32 %283, ptr %23, align 4, !tbaa !9
  %284 = load i32, ptr %23, align 4, !tbaa !9
  %285 = icmp ne i32 %284, -1
  br i1 %285, label %286, label %317

286:                                              ; preds = %263
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %287 = load ptr, ptr %11, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.b2SolverSet, ptr %287, i32 0, i32 0
  %289 = getelementptr inbounds %struct.b2BodySimArray, ptr %288, i32 0, i32 0
  %290 = load ptr, ptr %289, align 8, !tbaa !54
  %291 = load i32, ptr %19, align 4, !tbaa !9
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds %struct.b2BodySim, ptr %290, i64 %292
  store ptr %293, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %294 = load ptr, ptr %24, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.b2BodySim, ptr %294, i32 0, i32 14
  %296 = load i32, ptr %295, align 4, !tbaa !55
  store i32 %296, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %297 = load ptr, ptr %3, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.b2World, ptr %297, i32 0, i32 4
  %299 = load i32, ptr %25, align 4, !tbaa !9
  %300 = call ptr @b2BodyArray_Get(ptr noundef %298, i32 noundef %299)
  store ptr %300, ptr %26, align 8, !tbaa !5
  br label %301

301:                                              ; preds = %286
  %302 = load ptr, ptr %26, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.b2Body, ptr %302, i32 0, i32 3
  %304 = load i32, ptr %303, align 4, !tbaa !52
  %305 = load i32, ptr %23, align 4, !tbaa !9
  %306 = icmp eq i32 %304, %305
  br i1 %306, label %311, label %307

307:                                              ; preds = %301
  %308 = call i32 @b2InternalAssertFcn(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 230)
  %309 = icmp ne i32 %308, 0
  br i1 %309, label %310, label %311

310:                                              ; preds = %307
  call void @llvm.trap()
  br label %311

311:                                              ; preds = %310, %307, %301
  br label %312

312:                                              ; preds = %311
  br label %313

313:                                              ; preds = %312
  %314 = load i32, ptr %19, align 4, !tbaa !9
  %315 = load ptr, ptr %26, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.b2Body, ptr %315, i32 0, i32 3
  store i32 %314, ptr %316, align 4, !tbaa !52
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %317

317:                                              ; preds = %313, %263
  %318 = load ptr, ptr %11, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.b2SolverSet, ptr %318, i32 0, i32 1
  %320 = load i32, ptr %19, align 4, !tbaa !9
  %321 = call i32 @b2BodyStateArray_RemoveSwap(ptr noundef %319, i32 noundef %320)
  %322 = load i32, ptr %7, align 4, !tbaa !9
  %323 = load ptr, ptr %17, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.b2Body, ptr %323, i32 0, i32 2
  store i32 %322, ptr %324, align 8, !tbaa !40
  %325 = load i32, ptr %21, align 4, !tbaa !9
  %326 = load ptr, ptr %17, align 8, !tbaa !5
  %327 = getelementptr inbounds %struct.b2Body, ptr %326, i32 0, i32 3
  store i32 %325, ptr %327, align 4, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %328 = load ptr, ptr %17, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.b2Body, ptr %328, i32 0, i32 4
  %330 = load i32, ptr %329, align 8, !tbaa !57
  store i32 %330, ptr %27, align 4, !tbaa !9
  br label %331

331:                                              ; preds = %497, %495, %317
  %332 = load i32, ptr %27, align 4, !tbaa !9
  %333 = icmp ne i32 %332, -1
  br i1 %333, label %334, label %498

334:                                              ; preds = %331
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %335 = load i32, ptr %27, align 4, !tbaa !9
  %336 = ashr i32 %335, 1
  store i32 %336, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %337 = load i32, ptr %27, align 4, !tbaa !9
  %338 = and i32 %337, 1
  store i32 %338, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %339 = load ptr, ptr %3, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.b2World, ptr %339, i32 0, i32 10
  %341 = load i32, ptr %28, align 4, !tbaa !9
  %342 = call ptr @b2ContactArray_Get(ptr noundef %340, i32 noundef %341)
  store ptr %342, ptr %30, align 8, !tbaa !5
  br label %343

343:                                              ; preds = %334
  %344 = load ptr, ptr %30, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.b2Contact, ptr %344, i32 0, i32 0
  %346 = load i32, ptr %345, align 4, !tbaa !58
  %347 = icmp eq i32 %346, 2
  br i1 %347, label %357, label %348

348:                                              ; preds = %343
  %349 = load ptr, ptr %30, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.b2Contact, ptr %349, i32 0, i32 0
  %351 = load i32, ptr %350, align 4, !tbaa !58
  %352 = icmp eq i32 %351, 1
  br i1 %352, label %357, label %353

353:                                              ; preds = %348
  %354 = call i32 @b2InternalAssertFcn(ptr noundef @.str.18, ptr noundef @.str.1, i32 noundef 250)
  %355 = icmp ne i32 %354, 0
  br i1 %355, label %356, label %357

356:                                              ; preds = %353
  call void @llvm.trap()
  br label %357

357:                                              ; preds = %356, %353, %348, %343
  br label %358

358:                                              ; preds = %357
  br label %359

359:                                              ; preds = %358
  %360 = load ptr, ptr %30, align 8, !tbaa !5
  %361 = getelementptr inbounds %struct.b2Contact, ptr %360, i32 0, i32 3
  %362 = load i32, ptr %29, align 4, !tbaa !9
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds [2 x %struct.b2ContactEdge], ptr %361, i64 0, i64 %363
  %365 = getelementptr inbounds %struct.b2ContactEdge, ptr %364, i32 0, i32 2
  %366 = load i32, ptr %365, align 4, !tbaa !60
  store i32 %366, ptr %27, align 4, !tbaa !9
  %367 = load ptr, ptr %30, align 8, !tbaa !5
  %368 = getelementptr inbounds %struct.b2Contact, ptr %367, i32 0, i32 0
  %369 = load i32, ptr %368, align 4, !tbaa !58
  %370 = icmp eq i32 %369, 1
  br i1 %370, label %371, label %372

371:                                              ; preds = %359
  store i32 18, ptr %6, align 4
  br label %495, !llvm.loop !62

372:                                              ; preds = %359
  %373 = load ptr, ptr %30, align 8, !tbaa !5
  %374 = getelementptr inbounds %struct.b2Contact, ptr %373, i32 0, i32 1
  %375 = load i32, ptr %374, align 4, !tbaa !64
  %376 = icmp ne i32 %375, -1
  br i1 %376, label %377, label %391

377:                                              ; preds = %372
  br label %378

378:                                              ; preds = %377
  %379 = load ptr, ptr %30, align 8, !tbaa !5
  %380 = getelementptr inbounds %struct.b2Contact, ptr %379, i32 0, i32 10
  %381 = load i32, ptr %380, align 4, !tbaa !65
  %382 = and i32 %381, 1
  %383 = icmp ne i32 %382, 0
  br i1 %383, label %388, label %384

384:                                              ; preds = %378
  %385 = call i32 @b2InternalAssertFcn(ptr noundef @.str.19, ptr noundef @.str.1, i32 noundef 262)
  %386 = icmp ne i32 %385, 0
  br i1 %386, label %387, label %388

387:                                              ; preds = %384
  call void @llvm.trap()
  br label %388

388:                                              ; preds = %387, %384, %378
  br label %389

389:                                              ; preds = %388
  br label %390

390:                                              ; preds = %389
  store i32 18, ptr %6, align 4
  br label %495, !llvm.loop !62

391:                                              ; preds = %372
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  %392 = load i32, ptr %29, align 4, !tbaa !9
  %393 = xor i32 %392, 1
  store i32 %393, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  %394 = load ptr, ptr %30, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.b2Contact, ptr %394, i32 0, i32 3
  %396 = load i32, ptr %31, align 4, !tbaa !9
  %397 = sext i32 %396 to i64
  %398 = getelementptr inbounds [2 x %struct.b2ContactEdge], ptr %395, i64 0, i64 %397
  %399 = getelementptr inbounds %struct.b2ContactEdge, ptr %398, i32 0, i32 0
  %400 = load i32, ptr %399, align 4, !tbaa !66
  store i32 %400, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %401 = load ptr, ptr %3, align 8, !tbaa !5
  %402 = getelementptr inbounds %struct.b2World, ptr %401, i32 0, i32 4
  %403 = load i32, ptr %32, align 4, !tbaa !9
  %404 = call ptr @b2BodyArray_Get(ptr noundef %402, i32 noundef %403)
  store ptr %404, ptr %33, align 8, !tbaa !5
  %405 = load ptr, ptr %33, align 8, !tbaa !5
  %406 = getelementptr inbounds %struct.b2Body, ptr %405, i32 0, i32 2
  %407 = load i32, ptr %406, align 8, !tbaa !40
  %408 = icmp eq i32 %407, 2
  br i1 %408, label %409, label %410

409:                                              ; preds = %391
  store i32 18, ptr %6, align 4
  br label %494, !llvm.loop !62

410:                                              ; preds = %391
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  %411 = load ptr, ptr %30, align 8, !tbaa !5
  %412 = getelementptr inbounds %struct.b2Contact, ptr %411, i32 0, i32 2
  %413 = load i32, ptr %412, align 4, !tbaa !67
  store i32 %413, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %414 = load ptr, ptr %11, align 8, !tbaa !5
  %415 = getelementptr inbounds %struct.b2SolverSet, ptr %414, i32 0, i32 3
  %416 = load i32, ptr %34, align 4, !tbaa !9
  %417 = call ptr @b2ContactSimArray_Get(ptr noundef %415, i32 noundef %416)
  store ptr %417, ptr %35, align 8, !tbaa !5
  br label %418

418:                                              ; preds = %410
  %419 = load ptr, ptr %35, align 8, !tbaa !5
  %420 = getelementptr inbounds %struct.b2ContactSim, ptr %419, i32 0, i32 9
  %421 = getelementptr inbounds %struct.b2Manifold, ptr %420, i32 0, i32 3
  %422 = load i32, ptr %421, align 4, !tbaa !68
  %423 = icmp eq i32 %422, 0
  br i1 %423, label %428, label %424

424:                                              ; preds = %418
  %425 = call i32 @b2InternalAssertFcn(ptr noundef @.str.20, ptr noundef @.str.1, i32 noundef 279)
  %426 = icmp ne i32 %425, 0
  br i1 %426, label %427, label %428

427:                                              ; preds = %424
  call void @llvm.trap()
  br label %428

428:                                              ; preds = %427, %424, %418
  br label %429

429:                                              ; preds = %428
  br label %430

430:                                              ; preds = %429
  br label %431

431:                                              ; preds = %430
  %432 = load ptr, ptr %30, align 8, !tbaa !5
  %433 = getelementptr inbounds %struct.b2Contact, ptr %432, i32 0, i32 10
  %434 = load i32, ptr %433, align 4, !tbaa !65
  %435 = and i32 %434, 1
  %436 = icmp eq i32 %435, 0
  br i1 %436, label %441, label %437

437:                                              ; preds = %431
  %438 = call i32 @b2InternalAssertFcn(ptr noundef @.str.21, ptr noundef @.str.1, i32 noundef 280)
  %439 = icmp ne i32 %438, 0
  br i1 %439, label %440, label %441

440:                                              ; preds = %437
  call void @llvm.trap()
  br label %441

441:                                              ; preds = %440, %437, %431
  br label %442

442:                                              ; preds = %441
  br label %443

443:                                              ; preds = %442
  %444 = load ptr, ptr %30, align 8, !tbaa !5
  %445 = getelementptr inbounds %struct.b2Contact, ptr %444, i32 0, i32 0
  store i32 1, ptr %445, align 4, !tbaa !58
  %446 = load ptr, ptr %15, align 8, !tbaa !5
  %447 = getelementptr inbounds %struct.b2SolverSet, ptr %446, i32 0, i32 3
  %448 = getelementptr inbounds %struct.b2ContactSimArray, ptr %447, i32 0, i32 1
  %449 = load i32, ptr %448, align 8, !tbaa !72
  %450 = load ptr, ptr %30, align 8, !tbaa !5
  %451 = getelementptr inbounds %struct.b2Contact, ptr %450, i32 0, i32 2
  store i32 %449, ptr %451, align 4, !tbaa !67
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  %452 = load ptr, ptr %15, align 8, !tbaa !5
  %453 = getelementptr inbounds %struct.b2SolverSet, ptr %452, i32 0, i32 3
  %454 = call ptr @b2ContactSimArray_Add(ptr noundef %453)
  store ptr %454, ptr %36, align 8, !tbaa !5
  %455 = load ptr, ptr %36, align 8, !tbaa !5
  %456 = load ptr, ptr %35, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %455, ptr align 4 %456, i64 176, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #7
  %457 = load ptr, ptr %11, align 8, !tbaa !5
  %458 = getelementptr inbounds %struct.b2SolverSet, ptr %457, i32 0, i32 3
  %459 = load i32, ptr %34, align 4, !tbaa !9
  %460 = call i32 @b2ContactSimArray_RemoveSwap(ptr noundef %458, i32 noundef %459)
  store i32 %460, ptr %37, align 4, !tbaa !9
  %461 = load i32, ptr %37, align 4, !tbaa !9
  %462 = icmp ne i32 %461, -1
  br i1 %462, label %463, label %493

463:                                              ; preds = %443
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %464 = load ptr, ptr %11, align 8, !tbaa !5
  %465 = getelementptr inbounds %struct.b2SolverSet, ptr %464, i32 0, i32 3
  %466 = getelementptr inbounds %struct.b2ContactSimArray, ptr %465, i32 0, i32 0
  %467 = load ptr, ptr %466, align 8, !tbaa !73
  %468 = load i32, ptr %34, align 4, !tbaa !9
  %469 = sext i32 %468 to i64
  %470 = getelementptr inbounds %struct.b2ContactSim, ptr %467, i64 %469
  store ptr %470, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  %471 = load ptr, ptr %3, align 8, !tbaa !5
  %472 = getelementptr inbounds %struct.b2World, ptr %471, i32 0, i32 10
  %473 = load ptr, ptr %38, align 8, !tbaa !5
  %474 = getelementptr inbounds %struct.b2ContactSim, ptr %473, i32 0, i32 0
  %475 = load i32, ptr %474, align 4, !tbaa !74
  %476 = call ptr @b2ContactArray_Get(ptr noundef %472, i32 noundef %475)
  store ptr %476, ptr %39, align 8, !tbaa !5
  br label %477

477:                                              ; preds = %463
  %478 = load ptr, ptr %39, align 8, !tbaa !5
  %479 = getelementptr inbounds %struct.b2Contact, ptr %478, i32 0, i32 2
  %480 = load i32, ptr %479, align 4, !tbaa !67
  %481 = load i32, ptr %37, align 4, !tbaa !9
  %482 = icmp eq i32 %480, %481
  br i1 %482, label %487, label %483

483:                                              ; preds = %477
  %484 = call i32 @b2InternalAssertFcn(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 294)
  %485 = icmp ne i32 %484, 0
  br i1 %485, label %486, label %487

486:                                              ; preds = %483
  call void @llvm.trap()
  br label %487

487:                                              ; preds = %486, %483, %477
  br label %488

488:                                              ; preds = %487
  br label %489

489:                                              ; preds = %488
  %490 = load i32, ptr %34, align 4, !tbaa !9
  %491 = load ptr, ptr %39, align 8, !tbaa !5
  %492 = getelementptr inbounds %struct.b2Contact, ptr %491, i32 0, i32 2
  store i32 %490, ptr %492, align 4, !tbaa !67
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  br label %493

493:                                              ; preds = %489, %443
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  store i32 0, ptr %6, align 4
  br label %494

494:                                              ; preds = %493, %409
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %495

495:                                              ; preds = %494, %390, %371
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  %496 = load i32, ptr %6, align 4
  switch i32 %496, label %856 [
    i32 0, label %497
    i32 18, label %331
  ]

497:                                              ; preds = %495
  br label %331, !llvm.loop !62

498:                                              ; preds = %331
  %499 = load ptr, ptr %17, align 8, !tbaa !5
  %500 = getelementptr inbounds %struct.b2Body, ptr %499, i32 0, i32 13
  %501 = load i32, ptr %500, align 4, !tbaa !75
  store i32 %501, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %182, !llvm.loop !76

502:                                              ; preds = %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #7
  %503 = load ptr, ptr %5, align 8, !tbaa !5
  %504 = getelementptr inbounds %struct.b2Island, ptr %503, i32 0, i32 6
  %505 = load i32, ptr %504, align 4, !tbaa !77
  store i32 %505, ptr %40, align 4, !tbaa !9
  br label %506

506:                                              ; preds = %632, %502
  %507 = load i32, ptr %40, align 4, !tbaa !9
  %508 = icmp ne i32 %507, -1
  br i1 %508, label %509, label %644

509:                                              ; preds = %506
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  %510 = load ptr, ptr %3, align 8, !tbaa !5
  %511 = getelementptr inbounds %struct.b2World, ptr %510, i32 0, i32 10
  %512 = load i32, ptr %40, align 4, !tbaa !9
  %513 = call ptr @b2ContactArray_Get(ptr noundef %511, i32 noundef %512)
  store ptr %513, ptr %41, align 8, !tbaa !5
  br label %514

514:                                              ; preds = %509
  %515 = load ptr, ptr %41, align 8, !tbaa !5
  %516 = getelementptr inbounds %struct.b2Contact, ptr %515, i32 0, i32 0
  %517 = load i32, ptr %516, align 4, !tbaa !58
  %518 = icmp eq i32 %517, 2
  br i1 %518, label %523, label %519

519:                                              ; preds = %514
  %520 = call i32 @b2InternalAssertFcn(ptr noundef @.str.22, ptr noundef @.str.1, i32 noundef 310)
  %521 = icmp ne i32 %520, 0
  br i1 %521, label %522, label %523

522:                                              ; preds = %519
  call void @llvm.trap()
  br label %523

523:                                              ; preds = %522, %519, %514
  br label %524

524:                                              ; preds = %523
  br label %525

525:                                              ; preds = %524
  br label %526

526:                                              ; preds = %525
  %527 = load ptr, ptr %41, align 8, !tbaa !5
  %528 = getelementptr inbounds %struct.b2Contact, ptr %527, i32 0, i32 8
  %529 = load i32, ptr %528, align 4, !tbaa !78
  %530 = load i32, ptr %4, align 4, !tbaa !9
  %531 = icmp eq i32 %529, %530
  br i1 %531, label %536, label %532

532:                                              ; preds = %526
  %533 = call i32 @b2InternalAssertFcn(ptr noundef @.str.23, ptr noundef @.str.1, i32 noundef 311)
  %534 = icmp ne i32 %533, 0
  br i1 %534, label %535, label %536

535:                                              ; preds = %532
  call void @llvm.trap()
  br label %536

536:                                              ; preds = %535, %532, %526
  br label %537

537:                                              ; preds = %536
  br label %538

538:                                              ; preds = %537
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #7
  %539 = load ptr, ptr %41, align 8, !tbaa !5
  %540 = getelementptr inbounds %struct.b2Contact, ptr %539, i32 0, i32 1
  %541 = load i32, ptr %540, align 4, !tbaa !64
  store i32 %541, ptr %42, align 4, !tbaa !9
  br label %542

542:                                              ; preds = %538
  %543 = load i32, ptr %42, align 4, !tbaa !9
  %544 = icmp sle i32 0, %543
  br i1 %544, label %545, label %548

545:                                              ; preds = %542
  %546 = load i32, ptr %42, align 4, !tbaa !9
  %547 = icmp slt i32 %546, 12
  br i1 %547, label %552, label %548

548:                                              ; preds = %545, %542
  %549 = call i32 @b2InternalAssertFcn(ptr noundef @.str.24, ptr noundef @.str.1, i32 noundef 313)
  %550 = icmp ne i32 %549, 0
  br i1 %550, label %551, label %552

551:                                              ; preds = %548
  call void @llvm.trap()
  br label %552

552:                                              ; preds = %551, %548, %545
  br label %553

553:                                              ; preds = %552
  br label %554

554:                                              ; preds = %553
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #7
  %555 = load ptr, ptr %3, align 8, !tbaa !5
  %556 = getelementptr inbounds %struct.b2World, ptr %555, i32 0, i32 2
  %557 = getelementptr inbounds %struct.b2ConstraintGraph, ptr %556, i32 0, i32 0
  %558 = getelementptr inbounds [12 x %struct.b2GraphColor], ptr %557, i64 0, i64 0
  %559 = load i32, ptr %42, align 4, !tbaa !9
  %560 = sext i32 %559 to i64
  %561 = getelementptr inbounds %struct.b2GraphColor, ptr %558, i64 %560
  store ptr %561, ptr %43, align 8, !tbaa !5
  %562 = load i32, ptr %42, align 4, !tbaa !9
  %563 = icmp ne i32 %562, 11
  br i1 %563, label %564, label %579

564:                                              ; preds = %554
  %565 = load ptr, ptr %43, align 8, !tbaa !5
  %566 = getelementptr inbounds %struct.b2GraphColor, ptr %565, i32 0, i32 0
  %567 = load ptr, ptr %41, align 8, !tbaa !5
  %568 = getelementptr inbounds %struct.b2Contact, ptr %567, i32 0, i32 3
  %569 = getelementptr inbounds [2 x %struct.b2ContactEdge], ptr %568, i64 0, i64 0
  %570 = getelementptr inbounds %struct.b2ContactEdge, ptr %569, i32 0, i32 0
  %571 = load i32, ptr %570, align 4, !tbaa !66
  call void @b2ClearBit(ptr noundef %566, i32 noundef %571)
  %572 = load ptr, ptr %43, align 8, !tbaa !5
  %573 = getelementptr inbounds %struct.b2GraphColor, ptr %572, i32 0, i32 0
  %574 = load ptr, ptr %41, align 8, !tbaa !5
  %575 = getelementptr inbounds %struct.b2Contact, ptr %574, i32 0, i32 3
  %576 = getelementptr inbounds [2 x %struct.b2ContactEdge], ptr %575, i64 0, i64 1
  %577 = getelementptr inbounds %struct.b2ContactEdge, ptr %576, i32 0, i32 0
  %578 = load i32, ptr %577, align 4, !tbaa !66
  call void @b2ClearBit(ptr noundef %573, i32 noundef %578)
  br label %579

579:                                              ; preds = %564, %554
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #7
  %580 = load ptr, ptr %41, align 8, !tbaa !5
  %581 = getelementptr inbounds %struct.b2Contact, ptr %580, i32 0, i32 2
  %582 = load i32, ptr %581, align 4, !tbaa !67
  store i32 %582, ptr %44, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #7
  %583 = load ptr, ptr %43, align 8, !tbaa !5
  %584 = getelementptr inbounds %struct.b2GraphColor, ptr %583, i32 0, i32 1
  %585 = load i32, ptr %44, align 4, !tbaa !9
  %586 = call ptr @b2ContactSimArray_Get(ptr noundef %584, i32 noundef %585)
  store ptr %586, ptr %45, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #7
  %587 = load ptr, ptr %9, align 8, !tbaa !5
  %588 = getelementptr inbounds %struct.b2SolverSet, ptr %587, i32 0, i32 3
  %589 = getelementptr inbounds %struct.b2ContactSimArray, ptr %588, i32 0, i32 1
  %590 = load i32, ptr %589, align 8, !tbaa !72
  store i32 %590, ptr %46, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #7
  %591 = load ptr, ptr %9, align 8, !tbaa !5
  %592 = getelementptr inbounds %struct.b2SolverSet, ptr %591, i32 0, i32 3
  %593 = call ptr @b2ContactSimArray_Add(ptr noundef %592)
  store ptr %593, ptr %47, align 8, !tbaa !5
  %594 = load ptr, ptr %47, align 8, !tbaa !5
  %595 = load ptr, ptr %45, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %594, ptr align 4 %595, i64 176, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #7
  %596 = load ptr, ptr %43, align 8, !tbaa !5
  %597 = getelementptr inbounds %struct.b2GraphColor, ptr %596, i32 0, i32 1
  %598 = load i32, ptr %44, align 4, !tbaa !9
  %599 = call i32 @b2ContactSimArray_RemoveSwap(ptr noundef %597, i32 noundef %598)
  store i32 %599, ptr %48, align 4, !tbaa !9
  %600 = load i32, ptr %48, align 4, !tbaa !9
  %601 = icmp ne i32 %600, -1
  br i1 %601, label %602, label %632

602:                                              ; preds = %579
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #7
  %603 = load ptr, ptr %43, align 8, !tbaa !5
  %604 = getelementptr inbounds %struct.b2GraphColor, ptr %603, i32 0, i32 1
  %605 = getelementptr inbounds %struct.b2ContactSimArray, ptr %604, i32 0, i32 0
  %606 = load ptr, ptr %605, align 8, !tbaa !79
  %607 = load i32, ptr %44, align 4, !tbaa !9
  %608 = sext i32 %607 to i64
  %609 = getelementptr inbounds %struct.b2ContactSim, ptr %606, i64 %608
  store ptr %609, ptr %49, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #7
  %610 = load ptr, ptr %3, align 8, !tbaa !5
  %611 = getelementptr inbounds %struct.b2World, ptr %610, i32 0, i32 10
  %612 = load ptr, ptr %49, align 8, !tbaa !5
  %613 = getelementptr inbounds %struct.b2ContactSim, ptr %612, i32 0, i32 0
  %614 = load i32, ptr %613, align 4, !tbaa !74
  %615 = call ptr @b2ContactArray_Get(ptr noundef %611, i32 noundef %614)
  store ptr %615, ptr %50, align 8, !tbaa !5
  br label %616

616:                                              ; preds = %602
  %617 = load ptr, ptr %50, align 8, !tbaa !5
  %618 = getelementptr inbounds %struct.b2Contact, ptr %617, i32 0, i32 2
  %619 = load i32, ptr %618, align 4, !tbaa !67
  %620 = load i32, ptr %48, align 4, !tbaa !9
  %621 = icmp eq i32 %619, %620
  br i1 %621, label %626, label %622

622:                                              ; preds = %616
  %623 = call i32 @b2InternalAssertFcn(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 338)
  %624 = icmp ne i32 %623, 0
  br i1 %624, label %625, label %626

625:                                              ; preds = %622
  call void @llvm.trap()
  br label %626

626:                                              ; preds = %625, %622, %616
  br label %627

627:                                              ; preds = %626
  br label %628

628:                                              ; preds = %627
  %629 = load i32, ptr %44, align 4, !tbaa !9
  %630 = load ptr, ptr %50, align 8, !tbaa !5
  %631 = getelementptr inbounds %struct.b2Contact, ptr %630, i32 0, i32 2
  store i32 %629, ptr %631, align 4, !tbaa !67
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #7
  br label %632

632:                                              ; preds = %628, %579
  %633 = load i32, ptr %7, align 4, !tbaa !9
  %634 = load ptr, ptr %41, align 8, !tbaa !5
  %635 = getelementptr inbounds %struct.b2Contact, ptr %634, i32 0, i32 0
  store i32 %633, ptr %635, align 4, !tbaa !58
  %636 = load ptr, ptr %41, align 8, !tbaa !5
  %637 = getelementptr inbounds %struct.b2Contact, ptr %636, i32 0, i32 1
  store i32 -1, ptr %637, align 4, !tbaa !64
  %638 = load i32, ptr %46, align 4, !tbaa !9
  %639 = load ptr, ptr %41, align 8, !tbaa !5
  %640 = getelementptr inbounds %struct.b2Contact, ptr %639, i32 0, i32 2
  store i32 %638, ptr %640, align 4, !tbaa !67
  %641 = load ptr, ptr %41, align 8, !tbaa !5
  %642 = getelementptr inbounds %struct.b2Contact, ptr %641, i32 0, i32 7
  %643 = load i32, ptr %642, align 4, !tbaa !81
  store i32 %643, ptr %40, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  br label %506, !llvm.loop !82

644:                                              ; preds = %506
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #7
  %645 = load ptr, ptr %5, align 8, !tbaa !5
  %646 = getelementptr inbounds %struct.b2Island, ptr %645, i32 0, i32 9
  %647 = load i32, ptr %646, align 4, !tbaa !83
  store i32 %647, ptr %51, align 4, !tbaa !9
  br label %648

648:                                              ; preds = %775, %644
  %649 = load i32, ptr %51, align 4, !tbaa !9
  %650 = icmp ne i32 %649, -1
  br i1 %650, label %651, label %787

651:                                              ; preds = %648
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #7
  %652 = load ptr, ptr %3, align 8, !tbaa !5
  %653 = getelementptr inbounds %struct.b2World, ptr %652, i32 0, i32 8
  %654 = load i32, ptr %51, align 4, !tbaa !9
  %655 = call ptr @b2JointArray_Get(ptr noundef %653, i32 noundef %654)
  store ptr %655, ptr %52, align 8, !tbaa !5
  br label %656

656:                                              ; preds = %651
  %657 = load ptr, ptr %52, align 8, !tbaa !5
  %658 = getelementptr inbounds %struct.b2Joint, ptr %657, i32 0, i32 1
  %659 = load i32, ptr %658, align 8, !tbaa !84
  %660 = icmp eq i32 %659, 2
  br i1 %660, label %665, label %661

661:                                              ; preds = %656
  %662 = call i32 @b2InternalAssertFcn(ptr noundef @.str.25, ptr noundef @.str.1, i32 noundef 357)
  %663 = icmp ne i32 %662, 0
  br i1 %663, label %664, label %665

664:                                              ; preds = %661
  call void @llvm.trap()
  br label %665

665:                                              ; preds = %664, %661, %656
  br label %666

666:                                              ; preds = %665
  br label %667

667:                                              ; preds = %666
  br label %668

668:                                              ; preds = %667
  %669 = load ptr, ptr %52, align 8, !tbaa !5
  %670 = getelementptr inbounds %struct.b2Joint, ptr %669, i32 0, i32 6
  %671 = load i32, ptr %670, align 8, !tbaa !86
  %672 = load i32, ptr %4, align 4, !tbaa !9
  %673 = icmp eq i32 %671, %672
  br i1 %673, label %678, label %674

674:                                              ; preds = %668
  %675 = call i32 @b2InternalAssertFcn(ptr noundef @.str.26, ptr noundef @.str.1, i32 noundef 358)
  %676 = icmp ne i32 %675, 0
  br i1 %676, label %677, label %678

677:                                              ; preds = %674
  call void @llvm.trap()
  br label %678

678:                                              ; preds = %677, %674, %668
  br label %679

679:                                              ; preds = %678
  br label %680

680:                                              ; preds = %679
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #7
  %681 = load ptr, ptr %52, align 8, !tbaa !5
  %682 = getelementptr inbounds %struct.b2Joint, ptr %681, i32 0, i32 2
  %683 = load i32, ptr %682, align 4, !tbaa !87
  store i32 %683, ptr %53, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #7
  %684 = load ptr, ptr %52, align 8, !tbaa !5
  %685 = getelementptr inbounds %struct.b2Joint, ptr %684, i32 0, i32 3
  %686 = load i32, ptr %685, align 8, !tbaa !88
  store i32 %686, ptr %54, align 4, !tbaa !9
  br label %687

687:                                              ; preds = %680
  %688 = load i32, ptr %53, align 4, !tbaa !9
  %689 = icmp sle i32 0, %688
  br i1 %689, label %690, label %693

690:                                              ; preds = %687
  %691 = load i32, ptr %53, align 4, !tbaa !9
  %692 = icmp slt i32 %691, 12
  br i1 %692, label %697, label %693

693:                                              ; preds = %690, %687
  %694 = call i32 @b2InternalAssertFcn(ptr noundef @.str.24, ptr noundef @.str.1, i32 noundef 362)
  %695 = icmp ne i32 %694, 0
  br i1 %695, label %696, label %697

696:                                              ; preds = %693
  call void @llvm.trap()
  br label %697

697:                                              ; preds = %696, %693, %690
  br label %698

698:                                              ; preds = %697
  br label %699

699:                                              ; preds = %698
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #7
  %700 = load ptr, ptr %3, align 8, !tbaa !5
  %701 = getelementptr inbounds %struct.b2World, ptr %700, i32 0, i32 2
  %702 = getelementptr inbounds %struct.b2ConstraintGraph, ptr %701, i32 0, i32 0
  %703 = getelementptr inbounds [12 x %struct.b2GraphColor], ptr %702, i64 0, i64 0
  %704 = load i32, ptr %53, align 4, !tbaa !9
  %705 = sext i32 %704 to i64
  %706 = getelementptr inbounds %struct.b2GraphColor, ptr %703, i64 %705
  store ptr %706, ptr %55, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #7
  %707 = load ptr, ptr %55, align 8, !tbaa !5
  %708 = getelementptr inbounds %struct.b2GraphColor, ptr %707, i32 0, i32 2
  %709 = load i32, ptr %54, align 4, !tbaa !9
  %710 = call ptr @b2JointSimArray_Get(ptr noundef %708, i32 noundef %709)
  store ptr %710, ptr %56, align 8, !tbaa !5
  %711 = load i32, ptr %53, align 4, !tbaa !9
  %712 = icmp ne i32 %711, 11
  br i1 %712, label %713, label %728

713:                                              ; preds = %699
  %714 = load ptr, ptr %55, align 8, !tbaa !5
  %715 = getelementptr inbounds %struct.b2GraphColor, ptr %714, i32 0, i32 0
  %716 = load ptr, ptr %52, align 8, !tbaa !5
  %717 = getelementptr inbounds %struct.b2Joint, ptr %716, i32 0, i32 4
  %718 = getelementptr inbounds [2 x %struct.b2JointEdge], ptr %717, i64 0, i64 0
  %719 = getelementptr inbounds %struct.b2JointEdge, ptr %718, i32 0, i32 0
  %720 = load i32, ptr %719, align 4, !tbaa !89
  call void @b2ClearBit(ptr noundef %715, i32 noundef %720)
  %721 = load ptr, ptr %55, align 8, !tbaa !5
  %722 = getelementptr inbounds %struct.b2GraphColor, ptr %721, i32 0, i32 0
  %723 = load ptr, ptr %52, align 8, !tbaa !5
  %724 = getelementptr inbounds %struct.b2Joint, ptr %723, i32 0, i32 4
  %725 = getelementptr inbounds [2 x %struct.b2JointEdge], ptr %724, i64 0, i64 1
  %726 = getelementptr inbounds %struct.b2JointEdge, ptr %725, i32 0, i32 0
  %727 = load i32, ptr %726, align 4, !tbaa !89
  call void @b2ClearBit(ptr noundef %722, i32 noundef %727)
  br label %728

728:                                              ; preds = %713, %699
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #7
  %729 = load ptr, ptr %9, align 8, !tbaa !5
  %730 = getelementptr inbounds %struct.b2SolverSet, ptr %729, i32 0, i32 2
  %731 = getelementptr inbounds %struct.b2JointSimArray, ptr %730, i32 0, i32 1
  %732 = load i32, ptr %731, align 8, !tbaa !91
  store i32 %732, ptr %57, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #7
  %733 = load ptr, ptr %9, align 8, !tbaa !5
  %734 = getelementptr inbounds %struct.b2SolverSet, ptr %733, i32 0, i32 2
  %735 = call ptr @b2JointSimArray_Add(ptr noundef %734)
  store ptr %735, ptr %58, align 8, !tbaa !5
  %736 = load ptr, ptr %58, align 8, !tbaa !5
  %737 = load ptr, ptr %56, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %736, ptr align 4 %737, i64 172, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #7
  %738 = load ptr, ptr %55, align 8, !tbaa !5
  %739 = getelementptr inbounds %struct.b2GraphColor, ptr %738, i32 0, i32 2
  %740 = load i32, ptr %54, align 4, !tbaa !9
  %741 = call i32 @b2JointSimArray_RemoveSwap(ptr noundef %739, i32 noundef %740)
  store i32 %741, ptr %59, align 4, !tbaa !9
  %742 = load i32, ptr %59, align 4, !tbaa !9
  %743 = icmp ne i32 %742, -1
  br i1 %743, label %744, label %775

744:                                              ; preds = %728
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #7
  %745 = load ptr, ptr %55, align 8, !tbaa !5
  %746 = getelementptr inbounds %struct.b2GraphColor, ptr %745, i32 0, i32 2
  %747 = getelementptr inbounds %struct.b2JointSimArray, ptr %746, i32 0, i32 0
  %748 = load ptr, ptr %747, align 8, !tbaa !92
  %749 = load i32, ptr %54, align 4, !tbaa !9
  %750 = sext i32 %749 to i64
  %751 = getelementptr inbounds %struct.b2JointSim, ptr %748, i64 %750
  store ptr %751, ptr %60, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #7
  %752 = load ptr, ptr %60, align 8, !tbaa !5
  %753 = getelementptr inbounds %struct.b2JointSim, ptr %752, i32 0, i32 0
  %754 = load i32, ptr %753, align 4, !tbaa !93
  store i32 %754, ptr %61, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #7
  %755 = load ptr, ptr %3, align 8, !tbaa !5
  %756 = getelementptr inbounds %struct.b2World, ptr %755, i32 0, i32 8
  %757 = load i32, ptr %61, align 4, !tbaa !9
  %758 = call ptr @b2JointArray_Get(ptr noundef %756, i32 noundef %757)
  store ptr %758, ptr %62, align 8, !tbaa !5
  br label %759

759:                                              ; preds = %744
  %760 = load ptr, ptr %62, align 8, !tbaa !5
  %761 = getelementptr inbounds %struct.b2Joint, ptr %760, i32 0, i32 3
  %762 = load i32, ptr %761, align 8, !tbaa !88
  %763 = load i32, ptr %59, align 4, !tbaa !9
  %764 = icmp eq i32 %762, %763
  br i1 %764, label %769, label %765

765:                                              ; preds = %759
  %766 = call i32 @b2InternalAssertFcn(ptr noundef @.str.27, ptr noundef @.str.1, i32 noundef 386)
  %767 = icmp ne i32 %766, 0
  br i1 %767, label %768, label %769

768:                                              ; preds = %765
  call void @llvm.trap()
  br label %769

769:                                              ; preds = %768, %765, %759
  br label %770

770:                                              ; preds = %769
  br label %771

771:                                              ; preds = %770
  %772 = load i32, ptr %54, align 4, !tbaa !9
  %773 = load ptr, ptr %62, align 8, !tbaa !5
  %774 = getelementptr inbounds %struct.b2Joint, ptr %773, i32 0, i32 3
  store i32 %772, ptr %774, align 8, !tbaa !88
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #7
  br label %775

775:                                              ; preds = %771, %728
  %776 = load i32, ptr %7, align 4, !tbaa !9
  %777 = load ptr, ptr %52, align 8, !tbaa !5
  %778 = getelementptr inbounds %struct.b2Joint, ptr %777, i32 0, i32 1
  store i32 %776, ptr %778, align 8, !tbaa !84
  %779 = load ptr, ptr %52, align 8, !tbaa !5
  %780 = getelementptr inbounds %struct.b2Joint, ptr %779, i32 0, i32 2
  store i32 -1, ptr %780, align 4, !tbaa !87
  %781 = load i32, ptr %57, align 4, !tbaa !9
  %782 = load ptr, ptr %52, align 8, !tbaa !5
  %783 = getelementptr inbounds %struct.b2Joint, ptr %782, i32 0, i32 3
  store i32 %781, ptr %783, align 8, !tbaa !88
  %784 = load ptr, ptr %52, align 8, !tbaa !5
  %785 = getelementptr inbounds %struct.b2Joint, ptr %784, i32 0, i32 8
  %786 = load i32, ptr %785, align 8, !tbaa !95
  store i32 %786, ptr %51, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #7
  br label %648, !llvm.loop !96

787:                                              ; preds = %648
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #7
  br label %788

788:                                              ; preds = %787
  %789 = load ptr, ptr %5, align 8, !tbaa !5
  %790 = getelementptr inbounds %struct.b2Island, ptr %789, i32 0, i32 0
  %791 = load i32, ptr %790, align 4, !tbaa !11
  %792 = icmp eq i32 %791, 2
  br i1 %792, label %797, label %793

793:                                              ; preds = %788
  %794 = call i32 @b2InternalAssertFcn(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 400)
  %795 = icmp ne i32 %794, 0
  br i1 %795, label %796, label %797

796:                                              ; preds = %793
  call void @llvm.trap()
  br label %797

797:                                              ; preds = %796, %793, %788
  br label %798

798:                                              ; preds = %797
  br label %799

799:                                              ; preds = %798
  call void @llvm.lifetime.start.p0(i64 4, ptr %63) #7
  %800 = load ptr, ptr %5, align 8, !tbaa !5
  %801 = getelementptr inbounds %struct.b2Island, ptr %800, i32 0, i32 1
  %802 = load i32, ptr %801, align 4, !tbaa !33
  store i32 %802, ptr %63, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #7
  %803 = load ptr, ptr %9, align 8, !tbaa !5
  %804 = getelementptr inbounds %struct.b2SolverSet, ptr %803, i32 0, i32 4
  %805 = call ptr @b2IslandSimArray_Add(ptr noundef %804)
  store ptr %805, ptr %64, align 8, !tbaa !5
  %806 = load i32, ptr %4, align 4, !tbaa !9
  %807 = load ptr, ptr %64, align 8, !tbaa !5
  %808 = getelementptr inbounds %struct.b2IslandSim, ptr %807, i32 0, i32 0
  store i32 %806, ptr %808, align 4, !tbaa !97
  call void @llvm.lifetime.start.p0(i64 4, ptr %65) #7
  %809 = load ptr, ptr %11, align 8, !tbaa !5
  %810 = getelementptr inbounds %struct.b2SolverSet, ptr %809, i32 0, i32 4
  %811 = load i32, ptr %63, align 4, !tbaa !9
  %812 = call i32 @b2IslandSimArray_RemoveSwap(ptr noundef %810, i32 noundef %811)
  store i32 %812, ptr %65, align 4, !tbaa !9
  %813 = load i32, ptr %65, align 4, !tbaa !9
  %814 = icmp ne i32 %813, -1
  br i1 %814, label %815, label %846

815:                                              ; preds = %799
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #7
  %816 = load ptr, ptr %11, align 8, !tbaa !5
  %817 = getelementptr inbounds %struct.b2SolverSet, ptr %816, i32 0, i32 4
  %818 = getelementptr inbounds %struct.b2IslandSimArray, ptr %817, i32 0, i32 0
  %819 = load ptr, ptr %818, align 8, !tbaa !99
  %820 = load i32, ptr %63, align 4, !tbaa !9
  %821 = sext i32 %820 to i64
  %822 = getelementptr inbounds %struct.b2IslandSim, ptr %819, i64 %821
  store ptr %822, ptr %66, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #7
  %823 = load ptr, ptr %66, align 8, !tbaa !5
  %824 = getelementptr inbounds %struct.b2IslandSim, ptr %823, i32 0, i32 0
  %825 = load i32, ptr %824, align 4, !tbaa !97
  store i32 %825, ptr %67, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #7
  %826 = load ptr, ptr %3, align 8, !tbaa !5
  %827 = getelementptr inbounds %struct.b2World, ptr %826, i32 0, i32 12
  %828 = load i32, ptr %67, align 4, !tbaa !9
  %829 = call ptr @b2IslandArray_Get(ptr noundef %827, i32 noundef %828)
  store ptr %829, ptr %68, align 8, !tbaa !5
  br label %830

830:                                              ; preds = %815
  %831 = load ptr, ptr %68, align 8, !tbaa !5
  %832 = getelementptr inbounds %struct.b2Island, ptr %831, i32 0, i32 1
  %833 = load i32, ptr %832, align 4, !tbaa !33
  %834 = load i32, ptr %65, align 4, !tbaa !9
  %835 = icmp eq i32 %833, %834
  br i1 %835, label %840, label %836

836:                                              ; preds = %830
  %837 = call i32 @b2InternalAssertFcn(ptr noundef @.str.28, ptr noundef @.str.1, i32 noundef 413)
  %838 = icmp ne i32 %837, 0
  br i1 %838, label %839, label %840

839:                                              ; preds = %836
  call void @llvm.trap()
  br label %840

840:                                              ; preds = %839, %836, %830
  br label %841

841:                                              ; preds = %840
  br label %842

842:                                              ; preds = %841
  %843 = load i32, ptr %63, align 4, !tbaa !9
  %844 = load ptr, ptr %68, align 8, !tbaa !5
  %845 = getelementptr inbounds %struct.b2Island, ptr %844, i32 0, i32 1
  store i32 %843, ptr %845, align 4, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #7
  br label %846

846:                                              ; preds = %842, %799
  %847 = load i32, ptr %7, align 4, !tbaa !9
  %848 = load ptr, ptr %5, align 8, !tbaa !5
  %849 = getelementptr inbounds %struct.b2Island, ptr %848, i32 0, i32 0
  store i32 %847, ptr %849, align 4, !tbaa !11
  %850 = load ptr, ptr %5, align 8, !tbaa !5
  %851 = getelementptr inbounds %struct.b2Island, ptr %850, i32 0, i32 1
  store i32 0, ptr %851, align 4, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #7
  %852 = load ptr, ptr %3, align 8, !tbaa !5
  call void @b2ValidateSolverSets(ptr noundef %852)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  store i32 0, ptr %6, align 4
  br label %853

853:                                              ; preds = %846, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  %854 = load i32, ptr %6, align 4
  switch i32 %854, label %856 [
    i32 0, label %855
    i32 1, label %855
  ]

855:                                              ; preds = %853, %853
  ret void

856:                                              ; preds = %853, %495
  unreachable
}

declare i32 @b2AllocId(ptr noundef) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @b2SolverSetArray_Push(ptr noundef, ptr noundef byval(%struct.b2SolverSet) align 8) #2

declare { ptr, i64 } @b2BodySimArray_Create(i32 noundef) #4

declare { ptr, i64 } @b2ContactSimArray_Create(i32 noundef) #4

declare { ptr, i64 } @b2JointSimArray_Create(i32 noundef) #4

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

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @b2ClearBit(ptr noundef, i32 noundef) #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2JointSimArray_Add(ptr noundef) #2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"b2Island", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52}
!13 = !{!12, !10, i64 52}
!14 = !{!15, !10, i64 1080}
!15 = !{!"b2World", !16, i64 0, !18, i64 40, !21, i64 336, !22, i64 1008, !17, i64 1032, !22, i64 1048, !17, i64 1072, !22, i64 1088, !17, i64 1112, !22, i64 1128, !17, i64 1152, !22, i64 1168, !17, i64 1192, !22, i64 1208, !22, i64 1232, !17, i64 1256, !17, i64 1272, !17, i64 1288, !17, i64 1304, !17, i64 1320, !17, i64 1336, !17, i64 1352, !17, i64 1368, !7, i64 1384, !7, i64 1416, !10, i64 1448, !17, i64 1456, !23, i64 1472, !23, i64 1488, !23, i64 1504, !23, i64 1520, !24, i64 1536, !10, i64 1544, !25, i64 1548, !26, i64 1556, !26, i64 1560, !26, i64 1564, !26, i64 1568, !26, i64 1572, !26, i64 1576, !26, i64 1580, !26, i64 1584, !6, i64 1592, !6, i64 1600, !27, i64 1608, !28, i64 1612, !6, i64 1704, !6, i64 1712, !6, i64 1720, !6, i64 1728, !10, i64 1736, !6, i64 1744, !6, i64 1752, !6, i64 1760, !6, i64 1768, !6, i64 1776, !26, i64 1784, !10, i64 1788, !10, i64 1792, !27, i64 1796, !29, i64 1798, !29, i64 1799, !29, i64 1800, !29, i64 1801, !29, i64 1802, !29, i64 1803}
!16 = !{!"b2ArenaAllocator", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !17, i64 24}
!17 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12}
!18 = !{!"b2BroadPhase", !7, i64 0, !10, i64 216, !19, i64 224, !17, i64 240, !6, i64 256, !6, i64 264, !10, i64 272, !20, i64 276, !19, i64 280}
!19 = !{!"b2HashSet", !6, i64 0, !10, i64 8, !10, i64 12}
!20 = !{!"b2AtomicInt", !10, i64 0}
!21 = !{!"b2ConstraintGraph", !7, i64 0}
!22 = !{!"b2IdPool", !17, i64 0, !10, i64 16}
!23 = !{!"b2BitSet", !6, i64 0, !10, i64 8, !10, i64 12}
!24 = !{!"long", !7, i64 0}
!25 = !{!"b2Vec2", !26, i64 0, !26, i64 4}
!26 = !{!"float", !7, i64 0}
!27 = !{!"short", !7, i64 0}
!28 = !{!"b2Profile", !26, i64 0, !26, i64 4, !26, i64 8, !26, i64 12, !26, i64 16, !26, i64 20, !26, i64 24, !26, i64 28, !26, i64 32, !26, i64 36, !26, i64 40, !26, i64 44, !26, i64 48, !26, i64 52, !26, i64 56, !26, i64 60, !26, i64 64, !26, i64 68, !26, i64 72, !26, i64 76, !26, i64 80, !26, i64 84}
!29 = !{!"_Bool", !7, i64 0}
!30 = !{!31, !10, i64 80}
!31 = !{!"b2SolverSet", !17, i64 0, !17, i64 16, !17, i64 32, !17, i64 48, !17, i64 64, !10, i64 80}
!32 = !{i64 0, i64 8, !5, i64 8, i64 4, !9, i64 12, i64 4, !9, i64 16, i64 8, !5, i64 24, i64 4, !9, i64 28, i64 4, !9, i64 32, i64 8, !5, i64 40, i64 4, !9, i64 44, i64 4, !9, i64 48, i64 8, !5, i64 56, i64 4, !9, i64 60, i64 4, !9, i64 64, i64 8, !5, i64 72, i64 4, !9, i64 76, i64 4, !9, i64 80, i64 4, !9}
!33 = !{!12, !10, i64 4}
!34 = !{!31, !10, i64 72}
!35 = !{!12, !10, i64 20}
!36 = !{i64 0, i64 8, !5, i64 8, i64 4, !9, i64 12, i64 4, !9}
!37 = !{!12, !10, i64 32}
!38 = !{!12, !10, i64 44}
!39 = !{!12, !10, i64 12}
!40 = !{!41, !10, i64 40}
!41 = !{!"b2Body", !7, i64 0, !6, 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, !26, i64 88, !26, i64 92, !26, i64 96, !26, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !27, i64 116, !29, i64 118, !29, i64 119, !29, i64 120, !29, i64 121}
!42 = !{!41, !10, i64 76}
!43 = !{!41, !10, i64 104}
!44 = !{!45, !10, i64 16}
!45 = !{!"b2BodyMoveEvent", !46, i64 0, !48, i64 16, !6, i64 24, !29, i64 32}
!46 = !{!"b2Transform", !25, i64 0, !47, i64 8}
!47 = !{!"b2Rot", !26, i64 0, !26, i64 4}
!48 = !{!"b2BodyId", !10, i64 0, !27, i64 4, !27, i64 6}
!49 = !{!45, !27, i64 22}
!50 = !{!41, !27, i64 116}
!51 = !{!45, !29, i64 32}
!52 = !{!41, !10, i64 44}
!53 = !{!31, !10, i64 8}
!54 = !{!31, !6, i64 0}
!55 = !{!56, !10, i64 88}
!56 = !{!"b2BodySim", !46, i64 0, !25, i64 16, !47, i64 24, !25, i64 32, !25, i64 40, !25, i64 48, !26, i64 56, !26, i64 60, !26, i64 64, !26, i64 68, !26, i64 72, !26, i64 76, !26, i64 80, !26, i64 84, !10, i64 88, !29, i64 92, !29, i64 93, !29, i64 94, !29, i64 95, !29, i64 96}
!57 = !{!41, !10, i64 48}
!58 = !{!59, !10, i64 0}
!59 = !{!"b2Contact", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 12, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !29, i64 64}
!60 = !{!61, !10, i64 8}
!61 = !{!"b2ContactEdge", !10, i64 0, !10, i64 4, !10, i64 8}
!62 = distinct !{!62, !63}
!63 = !{!"llvm.loop.mustprogress"}
!64 = !{!59, !10, i64 4}
!65 = !{!59, !10, i64 60}
!66 = !{!61, !10, i64 0}
!67 = !{!59, !10, i64 8}
!68 = !{!69, !10, i64 144}
!69 = !{!"b2ContactSim", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !26, i64 20, !26, i64 24, !26, i64 28, !26, i64 32, !70, i64 36, !26, i64 148, !26, i64 152, !26, i64 156, !26, i64 160, !10, i64 164, !71, i64 168}
!70 = !{!"b2Manifold", !25, i64 0, !26, i64 8, !7, i64 12, !10, i64 108}
!71 = !{!"b2SimplexCache", !27, i64 0, !7, i64 2, !7, i64 5}
!72 = !{!31, !10, i64 56}
!73 = !{!31, !6, i64 48}
!74 = !{!69, !10, i64 0}
!75 = !{!41, !10, i64 84}
!76 = distinct !{!76, !63}
!77 = !{!12, !10, i64 24}
!78 = !{!59, !10, i64 52}
!79 = !{!80, !6, i64 16}
!80 = !{!"b2GraphColor", !23, i64 0, !17, i64 16, !17, i64 32, !7, i64 48}
!81 = !{!59, !10, i64 48}
!82 = distinct !{!82, !63}
!83 = !{!12, !10, i64 36}
!84 = !{!85, !10, i64 8}
!85 = !{!"b2Joint", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !7, i64 20, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !26, i64 60, !10, i64 64, !27, i64 68, !29, i64 70, !29, i64 71}
!86 = !{!85, !10, i64 48}
!87 = !{!85, !10, i64 12}
!88 = !{!85, !10, i64 16}
!89 = !{!90, !10, i64 0}
!90 = !{!"b2JointEdge", !10, i64 0, !10, i64 4, !10, i64 8}
!91 = !{!31, !10, i64 40}
!92 = !{!80, !6, i64 32}
!93 = !{!94, !10, i64 0}
!94 = !{!"b2JointSim", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !25, i64 16, !25, i64 24, !26, i64 32, !26, i64 36, !26, i64 40, !26, i64 44, !7, i64 48}
!95 = !{!85, !10, i64 56}
!96 = distinct !{!96, !63}
!97 = !{!98, !10, i64 0}
!98 = !{!"b2IslandSim", !10, i64 0}
!99 = !{!31, !6, i64 64}


; 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.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.b2JointSimArray = type { ptr, i32, i32 }
%struct.b2ContactSimArray = 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 }
%struct.b2Vec2 = type { float, float }
%struct.b2ContactEdge = type { i32, i32, i32 }
%struct.b2ContactSim = type { i32, i32, i32, i32, i32, float, float, float, float, %struct.b2Manifold, float, float, float, float, i32, %struct.b2SimplexCache }
%struct.b2Manifold = type { %struct.b2Vec2, float, [2 x %struct.b2ManifoldPoint], i32 }
%struct.b2ManifoldPoint = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, i16, i8 }
%struct.b2SimplexCache = type { i16, [3 x i8], [3 x i8] }
%struct.b2GraphColor = type { %struct.b2BitSet, %struct.b2ContactSimArray, %struct.b2JointSimArray, %union.anon }
%struct.b2BitSet = type { ptr, i32, i32 }
%union.anon = type { ptr }
%struct.b2JointSim = type { i32, i32, i32, i32, %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, %union.anon.0 }
%union.anon.0 = type { %struct.b2PrismaticJoint }
%struct.b2PrismaticJoint = type { %struct.b2Vec2, %struct.b2Vec2, float, float, float, float, float, float, float, float, float, float, float, i32, i32, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, %struct.b2Softness, i8, i8, i8 }
%struct.b2Softness = type { float, float, float }
%struct.b2IslandSim = type { i32 }

@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [44 x i8], align 1

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

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

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

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2BodySimArray_Add(ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2ContactSimArray_Add(ptr noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2IslandSimArray_Add(ptr noundef) local_unnamed_addr #2

declare void @b2ValidateSolverSets(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local void @b2TrySleepIsland(ptr noundef %0, i32 noundef %1) local_unnamed_addr #6 {
  %3 = alloca %struct.b2SolverSet, align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 1192
  %5 = tail call ptr @b2IslandArray_Get(ptr noundef nonnull %4, i32 noundef %1)
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = icmp eq i32 %6, 2
  br i1 %7, label %11, label %8

8:                                                ; preds = %2
  %9 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 159) #7
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %11, label %10

10:                                               ; preds = %8
  tail call void @llvm.trap()
  unreachable

11:                                               ; preds = %8, %2
  %12 = getelementptr inbounds i8, ptr %5, i64 52
  %13 = load i32, ptr %12, align 4, !tbaa !10
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %344, label %15

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %0, i64 1048
  %17 = tail call i32 @b2AllocId(ptr noundef nonnull %16) #7
  %18 = getelementptr inbounds i8, ptr %0, i64 1072
  %19 = getelementptr inbounds i8, ptr %0, i64 1080
  %20 = load i32, ptr %19, align 8, !tbaa !11
  %21 = icmp eq i32 %17, %20
  br i1 %21, label %22, label %24

22:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %3) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(88) %3, i8 0, i64 88, i1 false)
  %23 = getelementptr inbounds i8, ptr %3, i64 80
  store i32 -1, ptr %23, align 8, !tbaa !28
  tail call void @b2SolverSetArray_Push(ptr noundef nonnull %18, ptr noundef nonnull byval(%struct.b2SolverSet) align 8 %3)
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %3) #7
  br label %24

24:                                               ; preds = %22, %15
  %25 = tail call ptr @b2SolverSetArray_Get(ptr noundef nonnull %18, i32 noundef %17)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(88) %25, i8 0, i64 88, i1 false)
  %26 = tail call ptr @b2SolverSetArray_Get(ptr noundef nonnull %18, i32 noundef 2)
  %27 = getelementptr inbounds i8, ptr %5, i64 4
  %28 = load i32, ptr %27, align 4, !tbaa !30
  %29 = icmp sgt i32 %28, -1
  br i1 %29, label %30, label %34

30:                                               ; preds = %24
  %31 = getelementptr inbounds i8, ptr %26, i64 72
  %32 = load i32, ptr %31, align 8, !tbaa !31
  %33 = icmp slt i32 %28, %32
  br i1 %33, label %37, label %34

34:                                               ; preds = %30, %24
  %35 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 186) #7
  %.not228 = icmp eq i32 %35, 0
  br i1 %.not228, label %37, label %36

36:                                               ; preds = %34
  tail call void @llvm.trap()
  unreachable

37:                                               ; preds = %34, %30
  %38 = getelementptr inbounds i8, ptr %25, i64 80
  store i32 %17, ptr %38, align 8, !tbaa !28
  %39 = getelementptr inbounds i8, ptr %5, i64 20
  %40 = load i32, ptr %39, align 4, !tbaa !32
  %41 = tail call { ptr, i64 } @b2BodySimArray_Create(i32 noundef %40) #7
  %42 = extractvalue { ptr, i64 } %41, 0
  %43 = extractvalue { ptr, i64 } %41, 1
  store ptr %42, ptr %25, align 8, !tbaa !33
  %.sroa.4147.0..sroa_idx = getelementptr inbounds i8, ptr %25, i64 8
  store i64 %43, ptr %.sroa.4147.0..sroa_idx, align 8
  %44 = getelementptr inbounds i8, ptr %25, i64 48
  %45 = getelementptr inbounds i8, ptr %5, i64 32
  %46 = load i32, ptr %45, align 4, !tbaa !34
  %47 = tail call { ptr, i64 } @b2ContactSimArray_Create(i32 noundef %46) #7
  %48 = extractvalue { ptr, i64 } %47, 0
  %49 = extractvalue { ptr, i64 } %47, 1
  store ptr %48, ptr %44, align 8, !tbaa !33
  %.sroa.4145.0..sroa_idx = getelementptr inbounds i8, ptr %25, i64 56
  store i64 %49, ptr %.sroa.4145.0..sroa_idx, align 8
  %50 = getelementptr inbounds i8, ptr %25, i64 32
  %51 = getelementptr inbounds i8, ptr %5, i64 44
  %52 = load i32, ptr %51, align 4, !tbaa !35
  %53 = tail call { ptr, i64 } @b2JointSimArray_Create(i32 noundef %52) #7
  %54 = extractvalue { ptr, i64 } %53, 0
  %55 = extractvalue { ptr, i64 } %53, 1
  store ptr %54, ptr %50, align 8, !tbaa !33
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %25, i64 40
  store i64 %55, ptr %.sroa.4.0..sroa_idx, align 8
  %56 = tail call ptr @b2SolverSetArray_Get(ptr noundef nonnull %18, i32 noundef 1)
  %57 = getelementptr inbounds i8, ptr %5, i64 12
  %.0268 = load i32, ptr %57, align 4, !tbaa !36
  %.not229269 = icmp eq i32 %.0268, -1
  br i1 %.not229269, label %._crit_edge273, label %.lr.ph272

.lr.ph272:                                        ; preds = %37
  %58 = getelementptr inbounds i8, ptr %0, i64 1032
  %59 = getelementptr inbounds i8, ptr %0, i64 1336
  %60 = getelementptr inbounds i8, ptr %26, i64 16
  %61 = getelementptr inbounds i8, ptr %0, i64 1152
  %62 = getelementptr inbounds i8, ptr %26, i64 48
  %63 = getelementptr inbounds i8, ptr %56, i64 48
  %64 = getelementptr inbounds i8, ptr %56, i64 56
  br label %65

65:                                               ; preds = %.lr.ph272, %._crit_edge
  %.0270 = phi i32 [ %.0268, %.lr.ph272 ], [ %.0, %._crit_edge ]
  %66 = tail call ptr @b2BodyArray_Get(ptr noundef nonnull %58, i32 noundef %.0270)
  %67 = getelementptr inbounds i8, ptr %66, i64 40
  %68 = load i32, ptr %67, align 8, !tbaa !37
  %69 = icmp eq i32 %68, 2
  br i1 %69, label %73, label %70

70:                                               ; preds = %65
  %71 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 201) #7
  %.not247 = icmp eq i32 %71, 0
  br i1 %.not247, label %73, label %72

72:                                               ; preds = %70
  tail call void @llvm.trap()
  unreachable

73:                                               ; preds = %65, %70
  %74 = getelementptr inbounds i8, ptr %66, i64 76
  %75 = load i32, ptr %74, align 4, !tbaa !39
  %76 = icmp eq i32 %75, %1
  br i1 %76, label %80, label %77

77:                                               ; preds = %73
  %78 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 202) #7
  %.not248 = icmp eq i32 %78, 0
  br i1 %.not248, label %80, label %79

79:                                               ; preds = %77
  tail call void @llvm.trap()
  unreachable

80:                                               ; preds = %77, %73
  %81 = getelementptr inbounds i8, ptr %66, i64 104
  %82 = load i32, ptr %81, align 8, !tbaa !40
  %.not249 = icmp eq i32 %82, -1
  br i1 %.not249, label %103, label %83

83:                                               ; preds = %80
  %84 = tail call ptr @b2BodyMoveEventArray_Get(ptr noundef nonnull %59, i32 noundef %82)
  %85 = getelementptr inbounds i8, ptr %84, i64 16
  %86 = load i32, ptr %85, align 8, !tbaa !41
  %87 = add nsw i32 %86, -1
  %88 = icmp eq i32 %87, %.0270
  br i1 %88, label %92, label %89

89:                                               ; preds = %83
  %90 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1, i32 noundef 209) #7
  %.not250 = icmp eq i32 %90, 0
  br i1 %.not250, label %92, label %91

91:                                               ; preds = %89
  tail call void @llvm.trap()
  unreachable

92:                                               ; preds = %83, %89
  %93 = getelementptr inbounds i8, ptr %84, i64 22
  %94 = load i16, ptr %93, align 2, !tbaa !46
  %95 = getelementptr inbounds i8, ptr %66, i64 116
  %96 = load i16, ptr %95, align 4, !tbaa !47
  %97 = icmp eq i16 %94, %96
  br i1 %97, label %101, label %98

98:                                               ; preds = %92
  %99 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1, i32 noundef 210) #7
  %.not251 = icmp eq i32 %99, 0
  br i1 %.not251, label %101, label %100

100:                                              ; preds = %98
  tail call void @llvm.trap()
  unreachable

101:                                              ; preds = %98, %92
  %102 = getelementptr inbounds i8, ptr %84, i64 32
  store i8 1, ptr %102, align 8, !tbaa !48
  store i32 -1, ptr %81, align 8, !tbaa !40
  br label %103

103:                                              ; preds = %101, %80
  %104 = getelementptr inbounds i8, ptr %66, i64 44
  %105 = load i32, ptr %104, align 4, !tbaa !49
  %106 = tail call ptr @b2BodySimArray_Get(ptr noundef %26, i32 noundef %105)
  %107 = load i32, ptr %.sroa.4147.0..sroa_idx, align 8, !tbaa !50
  %108 = tail call ptr @b2BodySimArray_Add(ptr noundef nonnull %25)
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(100) %108, ptr noundef nonnull align 4 dereferenceable(100) %106, i64 100, i1 false)
  %109 = tail call i32 @b2BodySimArray_RemoveSwap(ptr noundef %26, i32 noundef %105)
  %.not252 = icmp eq i32 %109, -1
  br i1 %.not252, label %123, label %110

110:                                              ; preds = %103
  %111 = load ptr, ptr %26, align 8, !tbaa !51
  %112 = sext i32 %105 to i64
  %113 = getelementptr inbounds %struct.b2BodySim, ptr %111, i64 %112, i32 14
  %114 = load i32, ptr %113, align 4, !tbaa !52
  %115 = tail call ptr @b2BodyArray_Get(ptr noundef nonnull %58, i32 noundef %114)
  %116 = getelementptr inbounds i8, ptr %115, i64 44
  %117 = load i32, ptr %116, align 4, !tbaa !49
  %118 = icmp eq i32 %117, %109
  br i1 %118, label %122, label %119

119:                                              ; preds = %110
  %120 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 230) #7
  %.not253 = icmp eq i32 %120, 0
  br i1 %.not253, label %122, label %121

121:                                              ; preds = %119
  tail call void @llvm.trap()
  unreachable

122:                                              ; preds = %119, %110
  store i32 %105, ptr %116, align 4, !tbaa !49
  br label %123

123:                                              ; preds = %122, %103
  %124 = tail call i32 @b2BodyStateArray_RemoveSwap(ptr noundef nonnull %60, i32 noundef %105)
  store i32 %17, ptr %67, align 8, !tbaa !37
  store i32 %107, ptr %104, align 4, !tbaa !49
  %125 = getelementptr inbounds i8, ptr %66, i64 48
  %126 = load i32, ptr %125, align 8, !tbaa !54
  %.not254266 = icmp eq i32 %126, -1
  br i1 %.not254266, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %123, %195
  %.0217267 = phi i32 [ %139, %195 ], [ %126, %123 ]
  %127 = ashr i32 %.0217267, 1
  %128 = and i32 %.0217267, 1
  %129 = tail call ptr @b2ContactArray_Get(ptr noundef nonnull %61, i32 noundef %127)
  %130 = load i32, ptr %129, align 4, !tbaa !55
  %.off = add i32 %130, -1
  %switch = icmp ult i32 %.off, 2
  br i1 %switch, label %134, label %131

131:                                              ; preds = %.lr.ph
  %132 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.1, i32 noundef 250) #7
  %.not255 = icmp eq i32 %132, 0
  br i1 %.not255, label %thread-pre-split, label %133

133:                                              ; preds = %131
  tail call void @llvm.trap()
  unreachable

thread-pre-split:                                 ; preds = %131
  %.pr = load i32, ptr %129, align 4, !tbaa !55
  br label %134

134:                                              ; preds = %thread-pre-split, %.lr.ph
  %135 = phi i32 [ %.pr, %thread-pre-split ], [ %130, %.lr.ph ]
  %136 = getelementptr inbounds i8, ptr %129, i64 12
  %137 = zext nneg i32 %128 to i64
  %138 = getelementptr inbounds [2 x %struct.b2ContactEdge], ptr %136, i64 0, i64 %137, i32 2
  %139 = load i32, ptr %138, align 4, !tbaa !57
  %140 = icmp eq i32 %135, 1
  br i1 %140, label %195, label %141, !llvm.loop !59

141:                                              ; preds = %134
  %142 = getelementptr inbounds i8, ptr %129, i64 4
  %143 = load i32, ptr %142, align 4, !tbaa !61
  %.not256 = icmp eq i32 %143, -1
  br i1 %.not256, label %151, label %144

144:                                              ; preds = %141
  %145 = getelementptr inbounds i8, ptr %129, i64 60
  %146 = load i32, ptr %145, align 4, !tbaa !62
  %147 = and i32 %146, 1
  %.not261 = icmp eq i32 %147, 0
  br i1 %.not261, label %148, label %195, !llvm.loop !59

148:                                              ; preds = %144
  %149 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.1, i32 noundef 262) #7
  %.not262 = icmp eq i32 %149, 0
  br i1 %.not262, label %195, label %150, !llvm.loop !59

150:                                              ; preds = %148
  tail call void @llvm.trap()
  unreachable

151:                                              ; preds = %141
  %152 = xor i32 %128, 1
  %153 = zext nneg i32 %152 to i64
  %154 = getelementptr inbounds [2 x %struct.b2ContactEdge], ptr %136, i64 0, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !63
  %156 = tail call ptr @b2BodyArray_Get(ptr noundef nonnull %58, i32 noundef %155)
  %157 = getelementptr inbounds i8, ptr %156, i64 40
  %158 = load i32, ptr %157, align 8, !tbaa !37
  %159 = icmp eq i32 %158, 2
  br i1 %159, label %195, label %160, !llvm.loop !59

160:                                              ; preds = %151
  %161 = getelementptr inbounds i8, ptr %129, i64 8
  %162 = load i32, ptr %161, align 4, !tbaa !64
  %163 = tail call ptr @b2ContactSimArray_Get(ptr noundef nonnull %62, i32 noundef %162)
  %164 = getelementptr inbounds i8, ptr %163, i64 144
  %165 = load i32, ptr %164, align 4, !tbaa !65
  %166 = icmp eq i32 %165, 0
  br i1 %166, label %170, label %167

167:                                              ; preds = %160
  %168 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.1, i32 noundef 279) #7
  %.not257 = icmp eq i32 %168, 0
  br i1 %.not257, label %170, label %169

169:                                              ; preds = %167
  tail call void @llvm.trap()
  unreachable

170:                                              ; preds = %160, %167
  %171 = getelementptr inbounds i8, ptr %129, i64 60
  %172 = load i32, ptr %171, align 4, !tbaa !62
  %173 = and i32 %172, 1
  %174 = icmp eq i32 %173, 0
  br i1 %174, label %178, label %175

175:                                              ; preds = %170
  %176 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.1, i32 noundef 280) #7
  %.not258 = icmp eq i32 %176, 0
  br i1 %.not258, label %178, label %177

177:                                              ; preds = %175
  tail call void @llvm.trap()
  unreachable

178:                                              ; preds = %175, %170
  store i32 1, ptr %129, align 4, !tbaa !55
  %179 = load i32, ptr %64, align 8, !tbaa !69
  store i32 %179, ptr %161, align 4, !tbaa !64
  %180 = tail call ptr @b2ContactSimArray_Add(ptr noundef nonnull %63)
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(176) %180, ptr noundef nonnull align 4 dereferenceable(176) %163, i64 176, i1 false)
  %181 = tail call i32 @b2ContactSimArray_RemoveSwap(ptr noundef nonnull %62, i32 noundef %162)
  %.not259 = icmp eq i32 %181, -1
  br i1 %.not259, label %195, label %182

182:                                              ; preds = %178
  %183 = load ptr, ptr %62, align 8, !tbaa !70
  %184 = sext i32 %162 to i64
  %185 = getelementptr inbounds %struct.b2ContactSim, ptr %183, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !71
  %187 = tail call ptr @b2ContactArray_Get(ptr noundef nonnull %61, i32 noundef %186)
  %188 = getelementptr inbounds i8, ptr %187, i64 8
  %189 = load i32, ptr %188, align 4, !tbaa !64
  %190 = icmp eq i32 %189, %181
  br i1 %190, label %194, label %191

191:                                              ; preds = %182
  %192 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 294) #7
  %.not260 = icmp eq i32 %192, 0
  br i1 %.not260, label %194, label %193

193:                                              ; preds = %191
  tail call void @llvm.trap()
  unreachable

194:                                              ; preds = %191, %182
  store i32 %162, ptr %188, align 4, !tbaa !64
  br label %195

195:                                              ; preds = %151, %194, %178, %144, %148, %134
  %.not254 = icmp eq i32 %139, -1
  br i1 %.not254, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %195, %123
  %196 = getelementptr inbounds i8, ptr %66, i64 84
  %.0 = load i32, ptr %196, align 4, !tbaa !36
  %.not229 = icmp eq i32 %.0, -1
  br i1 %.not229, label %._crit_edge273, label %65, !llvm.loop !72

._crit_edge273:                                   ; preds = %._crit_edge, %37
  %197 = getelementptr inbounds i8, ptr %5, i64 24
  %.0218274 = load i32, ptr %197, align 4, !tbaa !36
  %.not230275 = icmp eq i32 %.0218274, -1
  br i1 %.not230275, label %._crit_edge279, label %.lr.ph278

.lr.ph278:                                        ; preds = %._crit_edge273
  %198 = getelementptr inbounds i8, ptr %0, i64 1152
  %199 = getelementptr inbounds i8, ptr %0, i64 336
  br label %200

200:                                              ; preds = %.lr.ph278, %253
  %.0218276 = phi i32 [ %.0218274, %.lr.ph278 ], [ %.0218, %253 ]
  %201 = tail call ptr @b2ContactArray_Get(ptr noundef nonnull %198, i32 noundef %.0218276)
  %202 = load i32, ptr %201, align 4, !tbaa !55
  %203 = icmp eq i32 %202, 2
  br i1 %203, label %207, label %204

204:                                              ; preds = %200
  %205 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.1, i32 noundef 310) #7
  %.not241 = icmp eq i32 %205, 0
  br i1 %.not241, label %207, label %206

206:                                              ; preds = %204
  tail call void @llvm.trap()
  unreachable

207:                                              ; preds = %200, %204
  %208 = getelementptr inbounds i8, ptr %201, i64 52
  %209 = load i32, ptr %208, align 4, !tbaa !73
  %210 = icmp eq i32 %209, %1
  br i1 %210, label %214, label %211

211:                                              ; preds = %207
  %212 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.1, i32 noundef 311) #7
  %.not242 = icmp eq i32 %212, 0
  br i1 %.not242, label %214, label %213

213:                                              ; preds = %211
  tail call void @llvm.trap()
  unreachable

214:                                              ; preds = %211, %207
  %215 = getelementptr inbounds i8, ptr %201, i64 4
  %216 = load i32, ptr %215, align 4, !tbaa !61
  %or.cond = icmp ult i32 %216, 12
  br i1 %or.cond, label %222, label %217

217:                                              ; preds = %214
  %218 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.1, i32 noundef 313) #7
  %.not243 = icmp eq i32 %218, 0
  br i1 %.not243, label %.thread, label %221

.thread:                                          ; preds = %217
  %219 = sext i32 %216 to i64
  %220 = getelementptr inbounds %struct.b2GraphColor, ptr %199, i64 %219
  br label %225

221:                                              ; preds = %217
  tail call void @llvm.trap()
  unreachable

222:                                              ; preds = %214
  %223 = zext nneg i32 %216 to i64
  %224 = getelementptr inbounds %struct.b2GraphColor, ptr %199, i64 %223
  %.not244 = icmp eq i32 %216, 11
  br i1 %.not244, label %231, label %225

225:                                              ; preds = %.thread, %222
  %226 = phi ptr [ %220, %.thread ], [ %224, %222 ]
  %227 = getelementptr inbounds i8, ptr %201, i64 12
  %228 = load i32, ptr %227, align 4, !tbaa !63
  tail call void @b2ClearBit(ptr noundef nonnull %226, i32 noundef %228)
  %229 = getelementptr inbounds i8, ptr %201, i64 24
  %230 = load i32, ptr %229, align 4, !tbaa !63
  tail call void @b2ClearBit(ptr noundef nonnull %226, i32 noundef %230)
  br label %231

231:                                              ; preds = %225, %222
  %232 = phi ptr [ %226, %225 ], [ %224, %222 ]
  %233 = getelementptr inbounds i8, ptr %201, i64 8
  %234 = load i32, ptr %233, align 4, !tbaa !64
  %235 = getelementptr inbounds i8, ptr %232, i64 16
  %236 = tail call ptr @b2ContactSimArray_Get(ptr noundef nonnull %235, i32 noundef %234)
  %237 = load i32, ptr %.sroa.4145.0..sroa_idx, align 8, !tbaa !69
  %238 = tail call ptr @b2ContactSimArray_Add(ptr noundef nonnull %44)
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(176) %238, ptr noundef nonnull align 4 dereferenceable(176) %236, i64 176, i1 false)
  %239 = tail call i32 @b2ContactSimArray_RemoveSwap(ptr noundef nonnull %235, i32 noundef %234)
  %.not245 = icmp eq i32 %239, -1
  br i1 %.not245, label %253, label %240

240:                                              ; preds = %231
  %241 = load ptr, ptr %235, align 8, !tbaa !74
  %242 = sext i32 %234 to i64
  %243 = getelementptr inbounds %struct.b2ContactSim, ptr %241, i64 %242
  %244 = load i32, ptr %243, align 4, !tbaa !71
  %245 = tail call ptr @b2ContactArray_Get(ptr noundef nonnull %198, i32 noundef %244)
  %246 = getelementptr inbounds i8, ptr %245, i64 8
  %247 = load i32, ptr %246, align 4, !tbaa !64
  %248 = icmp eq i32 %247, %239
  br i1 %248, label %252, label %249

249:                                              ; preds = %240
  %250 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 338) #7
  %.not246 = icmp eq i32 %250, 0
  br i1 %.not246, label %252, label %251

251:                                              ; preds = %249
  tail call void @llvm.trap()
  unreachable

252:                                              ; preds = %249, %240
  store i32 %234, ptr %246, align 4, !tbaa !64
  br label %253

253:                                              ; preds = %252, %231
  store i32 %17, ptr %201, align 4, !tbaa !55
  store i32 -1, ptr %215, align 4, !tbaa !61
  store i32 %237, ptr %233, align 4, !tbaa !64
  %254 = getelementptr inbounds i8, ptr %201, i64 48
  %.0218 = load i32, ptr %254, align 4, !tbaa !36
  %.not230 = icmp eq i32 %.0218, -1
  br i1 %.not230, label %._crit_edge279, label %200, !llvm.loop !76

._crit_edge279:                                   ; preds = %253, %._crit_edge273
  %255 = getelementptr inbounds i8, ptr %5, i64 36
  %.0219280 = load i32, ptr %255, align 4, !tbaa !36
  %.not231281 = icmp eq i32 %.0219280, -1
  br i1 %.not231281, label %._crit_edge285, label %.lr.ph284

.lr.ph284:                                        ; preds = %._crit_edge279
  %256 = getelementptr inbounds i8, ptr %0, i64 1112
  %257 = getelementptr inbounds i8, ptr %0, i64 336
  br label %258

258:                                              ; preds = %.lr.ph284, %317
  %.0219282 = phi i32 [ %.0219280, %.lr.ph284 ], [ %.0219, %317 ]
  %259 = tail call ptr @b2JointArray_Get(ptr noundef nonnull %256, i32 noundef %.0219282)
  %260 = getelementptr inbounds i8, ptr %259, i64 8
  %261 = load i32, ptr %260, align 8, !tbaa !77
  %262 = icmp eq i32 %261, 2
  br i1 %262, label %266, label %263

263:                                              ; preds = %258
  %264 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.1, i32 noundef 357) #7
  %.not235 = icmp eq i32 %264, 0
  br i1 %.not235, label %266, label %265

265:                                              ; preds = %263
  tail call void @llvm.trap()
  unreachable

266:                                              ; preds = %258, %263
  %267 = getelementptr inbounds i8, ptr %259, i64 48
  %268 = load i32, ptr %267, align 8, !tbaa !79
  %269 = icmp eq i32 %268, %1
  br i1 %269, label %273, label %270

270:                                              ; preds = %266
  %271 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.1, i32 noundef 358) #7
  %.not236 = icmp eq i32 %271, 0
  br i1 %.not236, label %273, label %272

272:                                              ; preds = %270
  tail call void @llvm.trap()
  unreachable

273:                                              ; preds = %270, %266
  %274 = getelementptr inbounds i8, ptr %259, i64 12
  %275 = load i32, ptr %274, align 4, !tbaa !80
  %276 = getelementptr inbounds i8, ptr %259, i64 16
  %277 = load i32, ptr %276, align 8, !tbaa !81
  %or.cond3 = icmp ult i32 %275, 12
  br i1 %or.cond3, label %285, label %278

278:                                              ; preds = %273
  %279 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.1, i32 noundef 362) #7
  %.not237 = icmp eq i32 %279, 0
  br i1 %.not237, label %.thread264, label %284

.thread264:                                       ; preds = %278
  %280 = sext i32 %275 to i64
  %281 = getelementptr inbounds %struct.b2GraphColor, ptr %257, i64 %280
  %282 = getelementptr inbounds i8, ptr %281, i64 32
  %283 = tail call ptr @b2JointSimArray_Get(ptr noundef nonnull %282, i32 noundef %277)
  br label %290

284:                                              ; preds = %278
  tail call void @llvm.trap()
  unreachable

285:                                              ; preds = %273
  %286 = zext nneg i32 %275 to i64
  %287 = getelementptr inbounds %struct.b2GraphColor, ptr %257, i64 %286
  %288 = getelementptr inbounds i8, ptr %287, i64 32
  %289 = tail call ptr @b2JointSimArray_Get(ptr noundef nonnull %288, i32 noundef %277)
  %.not238 = icmp eq i32 %275, 11
  br i1 %.not238, label %298, label %290

290:                                              ; preds = %.thread264, %285
  %291 = phi ptr [ %283, %.thread264 ], [ %289, %285 ]
  %292 = phi ptr [ %282, %.thread264 ], [ %288, %285 ]
  %293 = phi ptr [ %281, %.thread264 ], [ %287, %285 ]
  %294 = getelementptr inbounds i8, ptr %259, i64 20
  %295 = load i32, ptr %294, align 4, !tbaa !82
  tail call void @b2ClearBit(ptr noundef nonnull %293, i32 noundef %295)
  %296 = getelementptr inbounds i8, ptr %259, i64 32
  %297 = load i32, ptr %296, align 4, !tbaa !82
  tail call void @b2ClearBit(ptr noundef nonnull %293, i32 noundef %297)
  br label %298

298:                                              ; preds = %290, %285
  %299 = phi ptr [ %291, %290 ], [ %289, %285 ]
  %300 = phi ptr [ %292, %290 ], [ %288, %285 ]
  %301 = load i32, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !84
  %302 = tail call ptr @b2JointSimArray_Add(ptr noundef nonnull %50)
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(172) %302, ptr noundef nonnull align 4 dereferenceable(172) %299, i64 172, i1 false)
  %303 = tail call i32 @b2JointSimArray_RemoveSwap(ptr noundef nonnull %300, i32 noundef %277)
  %.not239 = icmp eq i32 %303, -1
  br i1 %.not239, label %317, label %304

304:                                              ; preds = %298
  %305 = load ptr, ptr %300, align 8, !tbaa !85
  %306 = sext i32 %277 to i64
  %307 = getelementptr inbounds %struct.b2JointSim, ptr %305, i64 %306
  %308 = load i32, ptr %307, align 4, !tbaa !86
  %309 = tail call ptr @b2JointArray_Get(ptr noundef nonnull %256, i32 noundef %308)
  %310 = getelementptr inbounds i8, ptr %309, i64 16
  %311 = load i32, ptr %310, align 8, !tbaa !81
  %312 = icmp eq i32 %311, %303
  br i1 %312, label %316, label %313

313:                                              ; preds = %304
  %314 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.1, i32 noundef 386) #7
  %.not240 = icmp eq i32 %314, 0
  br i1 %.not240, label %316, label %315

315:                                              ; preds = %313
  tail call void @llvm.trap()
  unreachable

316:                                              ; preds = %313, %304
  store i32 %277, ptr %310, align 8, !tbaa !81
  br label %317

317:                                              ; preds = %316, %298
  store i32 %17, ptr %260, align 8, !tbaa !77
  store i32 -1, ptr %274, align 4, !tbaa !80
  store i32 %301, ptr %276, align 8, !tbaa !81
  %318 = getelementptr inbounds i8, ptr %259, i64 56
  %.0219 = load i32, ptr %318, align 4, !tbaa !36
  %.not231 = icmp eq i32 %.0219, -1
  br i1 %.not231, label %._crit_edge285, label %258, !llvm.loop !88

._crit_edge285:                                   ; preds = %317, %._crit_edge279
  %319 = load i32, ptr %5, align 4, !tbaa !5
  %320 = icmp eq i32 %319, 2
  br i1 %320, label %324, label %321

321:                                              ; preds = %._crit_edge285
  %322 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 400) #7
  %.not232 = icmp eq i32 %322, 0
  br i1 %.not232, label %324, label %323

323:                                              ; preds = %321
  tail call void @llvm.trap()
  unreachable

324:                                              ; preds = %321, %._crit_edge285
  %325 = load i32, ptr %27, align 4, !tbaa !30
  %326 = getelementptr inbounds i8, ptr %25, i64 64
  %327 = tail call ptr @b2IslandSimArray_Add(ptr noundef nonnull %326)
  store i32 %1, ptr %327, align 4, !tbaa !89
  %328 = getelementptr inbounds i8, ptr %26, i64 64
  %329 = tail call i32 @b2IslandSimArray_RemoveSwap(ptr noundef nonnull %328, i32 noundef %325)
  %.not233 = icmp eq i32 %329, -1
  br i1 %.not233, label %343, label %330

330:                                              ; preds = %324
  %331 = load ptr, ptr %328, align 8, !tbaa !91
  %332 = sext i32 %325 to i64
  %333 = getelementptr inbounds %struct.b2IslandSim, ptr %331, i64 %332
  %334 = load i32, ptr %333, align 4, !tbaa !89
  %335 = tail call ptr @b2IslandArray_Get(ptr noundef nonnull %4, i32 noundef %334)
  %336 = getelementptr inbounds i8, ptr %335, i64 4
  %337 = load i32, ptr %336, align 4, !tbaa !30
  %338 = icmp eq i32 %337, %329
  br i1 %338, label %342, label %339

339:                                              ; preds = %330
  %340 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.1, i32 noundef 413) #7
  %.not234 = icmp eq i32 %340, 0
  br i1 %.not234, label %342, label %341

341:                                              ; preds = %339
  tail call void @llvm.trap()
  unreachable

342:                                              ; preds = %339, %330
  store i32 %325, ptr %336, align 4, !tbaa !30
  br label %343

343:                                              ; preds = %342, %324
  store i32 %17, ptr %5, align 4, !tbaa !5
  store i32 0, ptr %27, align 4, !tbaa !30
  tail call void @b2ValidateSolverSets(ptr noundef %0) #7
  br label %344

344:                                              ; preds = %11, %343
  ret void
}

declare i32 @b2AllocId(ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @b2SolverSetArray_Push(ptr noundef, ptr noundef byval(%struct.b2SolverSet) align 8) local_unnamed_addr #2

declare { ptr, i64 } @b2BodySimArray_Create(i32 noundef) local_unnamed_addr #4

declare { ptr, i64 } @b2ContactSimArray_Create(i32 noundef) local_unnamed_addr #4

declare { ptr, i64 } @b2JointSimArray_Create(i32 noundef) local_unnamed_addr #4

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

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @b2ClearBit(ptr noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2JointSimArray_Add(ptr noundef) local_unnamed_addr #2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"b2Island", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 52}
!11 = !{!12, !7, i64 1080}
!12 = !{!"b2World", !13, i64 0, !16, i64 40, !19, i64 336, !20, i64 1008, !15, i64 1032, !20, i64 1048, !15, i64 1072, !20, i64 1088, !15, i64 1112, !20, i64 1128, !15, i64 1152, !20, i64 1168, !15, i64 1192, !20, i64 1208, !20, i64 1232, !15, i64 1256, !15, i64 1272, !15, i64 1288, !15, i64 1304, !15, i64 1320, !15, i64 1336, !15, i64 1352, !15, i64 1368, !8, i64 1384, !8, i64 1416, !7, i64 1448, !15, i64 1456, !21, i64 1472, !21, i64 1488, !21, i64 1504, !21, i64 1520, !22, i64 1536, !7, i64 1544, !23, i64 1548, !24, i64 1556, !24, i64 1560, !24, i64 1564, !24, i64 1568, !24, i64 1572, !24, i64 1576, !24, i64 1580, !24, i64 1584, !14, i64 1592, !14, i64 1600, !25, i64 1608, !26, i64 1612, !14, i64 1704, !14, i64 1712, !14, i64 1720, !14, i64 1728, !7, i64 1736, !14, i64 1744, !14, i64 1752, !14, i64 1760, !14, i64 1768, !14, i64 1776, !24, i64 1784, !7, i64 1788, !7, i64 1792, !25, i64 1796, !27, i64 1798, !27, i64 1799, !27, i64 1800, !27, i64 1801, !27, i64 1802, !27, i64 1803}
!13 = !{!"b2ArenaAllocator", !14, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !15, i64 24}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"", !14, i64 0, !7, i64 8, !7, i64 12}
!16 = !{!"b2BroadPhase", !8, i64 0, !7, i64 216, !17, i64 224, !15, i64 240, !14, i64 256, !14, i64 264, !7, i64 272, !18, i64 276, !17, i64 280}
!17 = !{!"b2HashSet", !14, i64 0, !7, i64 8, !7, i64 12}
!18 = !{!"b2AtomicInt", !7, i64 0}
!19 = !{!"b2ConstraintGraph", !8, i64 0}
!20 = !{!"b2IdPool", !15, i64 0, !7, i64 16}
!21 = !{!"b2BitSet", !14, i64 0, !7, i64 8, !7, i64 12}
!22 = !{!"long", !8, i64 0}
!23 = !{!"b2Vec2", !24, i64 0, !24, i64 4}
!24 = !{!"float", !8, i64 0}
!25 = !{!"short", !8, i64 0}
!26 = !{!"b2Profile", !24, i64 0, !24, i64 4, !24, i64 8, !24, i64 12, !24, i64 16, !24, i64 20, !24, i64 24, !24, i64 28, !24, i64 32, !24, i64 36, !24, i64 40, !24, i64 44, !24, i64 48, !24, i64 52, !24, i64 56, !24, i64 60, !24, i64 64, !24, i64 68, !24, i64 72, !24, i64 76, !24, i64 80, !24, i64 84}
!27 = !{!"_Bool", !8, i64 0}
!28 = !{!29, !7, i64 80}
!29 = !{!"b2SolverSet", !15, i64 0, !15, i64 16, !15, i64 32, !15, i64 48, !15, i64 64, !7, i64 80}
!30 = !{!6, !7, i64 4}
!31 = !{!29, !7, i64 72}
!32 = !{!6, !7, i64 20}
!33 = !{!14, !14, i64 0}
!34 = !{!6, !7, i64 32}
!35 = !{!6, !7, i64 44}
!36 = !{!7, !7, i64 0}
!37 = !{!38, !7, i64 40}
!38 = !{!"b2Body", !8, i64 0, !14, 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, !24, i64 88, !24, i64 92, !24, i64 96, !24, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !25, i64 116, !27, i64 118, !27, i64 119, !27, i64 120, !27, i64 121}
!39 = !{!38, !7, i64 76}
!40 = !{!38, !7, i64 104}
!41 = !{!42, !7, i64 16}
!42 = !{!"b2BodyMoveEvent", !43, i64 0, !45, i64 16, !14, i64 24, !27, i64 32}
!43 = !{!"b2Transform", !23, i64 0, !44, i64 8}
!44 = !{!"b2Rot", !24, i64 0, !24, i64 4}
!45 = !{!"b2BodyId", !7, i64 0, !25, i64 4, !25, i64 6}
!46 = !{!42, !25, i64 22}
!47 = !{!38, !25, i64 116}
!48 = !{!42, !27, i64 32}
!49 = !{!38, !7, i64 44}
!50 = !{!29, !7, i64 8}
!51 = !{!29, !14, i64 0}
!52 = !{!53, !7, i64 88}
!53 = !{!"b2BodySim", !43, i64 0, !23, i64 16, !44, i64 24, !23, i64 32, !23, i64 40, !23, i64 48, !24, i64 56, !24, i64 60, !24, i64 64, !24, i64 68, !24, i64 72, !24, i64 76, !24, i64 80, !24, i64 84, !7, i64 88, !27, i64 92, !27, i64 93, !27, i64 94, !27, i64 95, !27, i64 96}
!54 = !{!38, !7, i64 48}
!55 = !{!56, !7, i64 0}
!56 = !{!"b2Contact", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 12, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !27, i64 64}
!57 = !{!58, !7, i64 8}
!58 = !{!"b2ContactEdge", !7, i64 0, !7, i64 4, !7, i64 8}
!59 = distinct !{!59, !60}
!60 = !{!"llvm.loop.mustprogress"}
!61 = !{!56, !7, i64 4}
!62 = !{!56, !7, i64 60}
!63 = !{!58, !7, i64 0}
!64 = !{!56, !7, i64 8}
!65 = !{!66, !7, i64 144}
!66 = !{!"b2ContactSim", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !24, i64 20, !24, i64 24, !24, i64 28, !24, i64 32, !67, i64 36, !24, i64 148, !24, i64 152, !24, i64 156, !24, i64 160, !7, i64 164, !68, i64 168}
!67 = !{!"b2Manifold", !23, i64 0, !24, i64 8, !8, i64 12, !7, i64 108}
!68 = !{!"b2SimplexCache", !25, i64 0, !8, i64 2, !8, i64 5}
!69 = !{!29, !7, i64 56}
!70 = !{!29, !14, i64 48}
!71 = !{!66, !7, i64 0}
!72 = distinct !{!72, !60}
!73 = !{!56, !7, i64 52}
!74 = !{!75, !14, i64 16}
!75 = !{!"b2GraphColor", !21, i64 0, !15, i64 16, !15, i64 32, !8, i64 48}
!76 = distinct !{!76, !60}
!77 = !{!78, !7, i64 8}
!78 = !{!"b2Joint", !14, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !8, i64 20, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !24, i64 60, !7, i64 64, !25, i64 68, !27, i64 70, !27, i64 71}
!79 = !{!78, !7, i64 48}
!80 = !{!78, !7, i64 12}
!81 = !{!78, !7, i64 16}
!82 = !{!83, !7, i64 0}
!83 = !{!"b2JointEdge", !7, i64 0, !7, i64 4, !7, i64 8}
!84 = !{!29, !7, i64 40}
!85 = !{!75, !14, i64 32}
!86 = !{!87, !7, i64 0}
!87 = !{!"b2JointSim", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !23, i64 16, !23, i64 24, !24, i64 32, !24, i64 36, !24, i64 40, !24, i64 44, !8, i64 48}
!88 = distinct !{!88, !60}
!89 = !{!90, !7, i64 0}
!90 = !{!"b2IslandSim", !7, i64 0}
!91 = !{!29, !14, i64 64}


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