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

; 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.b2ShapeId = type { i32, i16, i16 }
%struct.b2ContactEndTouchEvent = type { %struct.b2ShapeId, %struct.b2ShapeId }
%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.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.0 }
%struct.b2ContactSimArray = type { ptr, i32, i32 }
%struct.b2JointSimArray = type { ptr, i32, i32 }
%union.anon.0 = 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.b2Shape = type { i32, i32, i32, i32, i32, i32, float, float, float, float, float, i32, %struct.b2AABB, %struct.b2AABB, %struct.b2Vec2, i32, %struct.b2Filter, ptr, i32, %union.anon, i16, i8, i8, i8, i8, i8 }
%struct.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%struct.b2Filter = type { i64, i64, i32 }
%union.anon = type { %struct.b2Polygon }
%struct.b2Polygon = type { [8 x %struct.b2Vec2], [8 x %struct.b2Vec2], %struct.b2Vec2, float, 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.b2SolverSet = type { %struct.b2BodySimArray, %struct.b2BodyStateArray, %struct.b2JointSimArray, %struct.b2ContactSimArray, %struct.b2IslandSimArray, i32 }
%struct.b2BodySimArray = type { ptr, i32, i32 }
%struct.b2BodyStateArray = type { ptr, i32, i32 }
%struct.b2IslandSimArray = type { ptr, i32, i32 }
%struct.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] }

@.str.1 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [85 x i8], align 1

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @b2DestroyContact(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2) #5 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca i16, align 2
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %struct.b2ShapeId, align 4
  %20 = alloca %struct.b2ShapeId, align 4
  %21 = alloca %struct.b2ContactEndTouchEvent, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %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
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %37 = zext i1 %2 to i8
  store i8 %37, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.b2Contact, ptr %38, i32 0, i32 4
  %40 = load i32, ptr %39, align 4, !tbaa !11
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.b2Contact, ptr %41, i32 0, i32 5
  %43 = load i32, ptr %42, align 4, !tbaa !14
  %44 = icmp slt i32 %40, %43
  br i1 %44, label %45, label %56

45:                                               ; preds = %3
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.b2Contact, ptr %46, i32 0, i32 4
  %48 = load i32, ptr %47, align 4, !tbaa !11
  %49 = sext i32 %48 to i64
  %50 = shl i64 %49, 32
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.b2Contact, ptr %51, i32 0, i32 5
  %53 = load i32, ptr %52, align 4, !tbaa !14
  %54 = sext i32 %53 to i64
  %55 = or i64 %50, %54
  br label %67

56:                                               ; preds = %3
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.b2Contact, ptr %57, i32 0, i32 5
  %59 = load i32, ptr %58, align 4, !tbaa !14
  %60 = sext i32 %59 to i64
  %61 = shl i64 %60, 32
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.b2Contact, ptr %62, i32 0, i32 4
  %64 = load i32, ptr %63, align 4, !tbaa !11
  %65 = sext i32 %64 to i64
  %66 = or i64 %61, %65
  br label %67

67:                                               ; preds = %56, %45
  %68 = phi i64 [ %55, %45 ], [ %66, %56 ]
  store i64 %68, ptr %7, align 8, !tbaa !15
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.b2World, ptr %69, i32 0, i32 1
  %71 = getelementptr inbounds %struct.b2BroadPhase, ptr %70, i32 0, i32 8
  %72 = load i64, ptr %7, align 8, !tbaa !15
  %73 = call zeroext i1 @b2RemoveKey(ptr noundef %71, i64 noundef %72)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.b2Contact, ptr %74, i32 0, i32 3
  %76 = getelementptr inbounds [2 x %struct.b2ContactEdge], ptr %75, i64 0, i64 0
  %77 = getelementptr inbounds %struct.b2ContactEdge, ptr %76, i64 0
  store ptr %77, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.b2Contact, ptr %78, i32 0, i32 3
  %80 = getelementptr inbounds [2 x %struct.b2ContactEdge], ptr %79, i64 0, i64 0
  %81 = getelementptr inbounds %struct.b2ContactEdge, ptr %80, i64 1
  store ptr %81, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.b2ContactEdge, ptr %82, i32 0, i32 0
  %84 = load i32, ptr %83, align 4, !tbaa !17
  store i32 %84, ptr %10, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.b2ContactEdge, ptr %85, i32 0, i32 0
  %87 = load i32, ptr %86, align 4, !tbaa !17
  store i32 %87, ptr %11, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.b2World, ptr %88, i32 0, i32 4
  %90 = load i32, ptr %10, align 4, !tbaa !19
  %91 = call ptr @b2BodyArray_Get(ptr noundef %89, i32 noundef %90)
  store ptr %91, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.b2World, ptr %92, i32 0, i32 4
  %94 = load i32, ptr %11, align 4, !tbaa !19
  %95 = call ptr @b2BodyArray_Get(ptr noundef %93, i32 noundef %94)
  store ptr %95, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.b2Contact, ptr %96, i32 0, i32 10
  %98 = load i32, ptr %97, align 4, !tbaa !20
  store i32 %98, ptr %14, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  %99 = load i32, ptr %14, align 4, !tbaa !19
  %100 = and i32 %99, 1
  %101 = icmp ne i32 %100, 0
  %102 = zext i1 %101 to i8
  store i8 %102, ptr %15, align 1, !tbaa !9
  %103 = load i8, ptr %15, align 1, !tbaa !9, !range !21, !noundef !22
  %104 = trunc i8 %103 to i1
  br i1 %104, label %105, label %161

105:                                              ; preds = %67
  %106 = load i32, ptr %14, align 4, !tbaa !19
  %107 = and i32 %106, 4
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %161

109:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 2, ptr %16) #6
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.b2World, ptr %110, i32 0, i32 59
  %112 = load i16, ptr %111, align 4, !tbaa !23
  store i16 %112, ptr %16, align 2, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.b2World, ptr %113, i32 0, i32 15
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.b2Contact, ptr %115, i32 0, i32 4
  %117 = load i32, ptr %116, align 4, !tbaa !11
  %118 = call ptr @b2ShapeArray_Get(ptr noundef %114, i32 noundef %117)
  store ptr %118, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.b2World, ptr %119, i32 0, i32 15
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.b2Contact, ptr %121, i32 0, i32 5
  %123 = load i32, ptr %122, align 4, !tbaa !14
  %124 = call ptr @b2ShapeArray_Get(ptr noundef %120, i32 noundef %123)
  store ptr %124, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %125 = getelementptr inbounds %struct.b2ShapeId, ptr %19, i32 0, i32 0
  %126 = load ptr, ptr %17, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.b2Shape, ptr %126, i32 0, i32 0
  %128 = load i32, ptr %127, align 8, !tbaa !38
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %125, align 4, !tbaa !42
  %130 = getelementptr inbounds %struct.b2ShapeId, ptr %19, i32 0, i32 1
  %131 = load i16, ptr %16, align 2, !tbaa !37
  store i16 %131, ptr %130, align 4, !tbaa !44
  %132 = getelementptr inbounds %struct.b2ShapeId, ptr %19, i32 0, i32 2
  %133 = load ptr, ptr %17, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.b2Shape, ptr %133, i32 0, i32 20
  %135 = load i16, ptr %134, align 4, !tbaa !45
  store i16 %135, ptr %132, align 2, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %136 = getelementptr inbounds %struct.b2ShapeId, ptr %20, i32 0, i32 0
  %137 = load ptr, ptr %18, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.b2Shape, ptr %137, i32 0, i32 0
  %139 = load i32, ptr %138, align 8, !tbaa !38
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %136, align 4, !tbaa !42
  %141 = getelementptr inbounds %struct.b2ShapeId, ptr %20, i32 0, i32 1
  %142 = load i16, ptr %16, align 2, !tbaa !37
  store i16 %142, ptr %141, align 4, !tbaa !44
  %143 = getelementptr inbounds %struct.b2ShapeId, ptr %20, i32 0, i32 2
  %144 = load ptr, ptr %18, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.b2Shape, ptr %144, i32 0, i32 20
  %146 = load i16, ptr %145, align 4, !tbaa !45
  store i16 %146, ptr %143, align 2, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #6
  %147 = getelementptr inbounds %struct.b2ContactEndTouchEvent, ptr %21, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %147, ptr align 4 %19, i64 8, i1 false), !tbaa.struct !47
  %148 = getelementptr inbounds %struct.b2ContactEndTouchEvent, ptr %21, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %148, ptr align 4 %20, i64 8, i1 false), !tbaa.struct !47
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.b2World, ptr %149, i32 0, i32 24
  %151 = getelementptr inbounds [2 x %struct.b2ContactEndTouchEventArray], ptr %150, i64 0, i64 0
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.b2World, ptr %152, i32 0, i32 25
  %154 = load i32, ptr %153, align 8, !tbaa !48
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds %struct.b2ContactEndTouchEventArray, ptr %151, i64 %155
  %157 = getelementptr inbounds { i64, i64 }, ptr %21, i32 0, i32 0
  %158 = load i64, ptr %157, align 4
  %159 = getelementptr inbounds { i64, i64 }, ptr %21, i32 0, i32 1
  %160 = load i64, ptr %159, align 4
  call void @b2ContactEndTouchEventArray_Push(ptr noundef %156, i64 %158, i64 %160)
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %16) #6
  br label %161

161:                                              ; preds = %109, %105, %67
  %162 = load ptr, ptr %8, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.b2ContactEdge, ptr %162, i32 0, i32 1
  %164 = load i32, ptr %163, align 4, !tbaa !49
  %165 = icmp ne i32 %164, -1
  br i1 %165, label %166, label %188

166:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.b2World, ptr %167, i32 0, i32 10
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.b2ContactEdge, ptr %169, i32 0, i32 1
  %171 = load i32, ptr %170, align 4, !tbaa !49
  %172 = ashr i32 %171, 1
  %173 = call ptr @b2ContactArray_Get(ptr noundef %168, i32 noundef %172)
  store ptr %173, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %174 = load ptr, ptr %22, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.b2Contact, ptr %174, i32 0, i32 3
  %176 = getelementptr inbounds [2 x %struct.b2ContactEdge], ptr %175, i64 0, i64 0
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.b2ContactEdge, ptr %177, i32 0, i32 1
  %179 = load i32, ptr %178, align 4, !tbaa !49
  %180 = and i32 %179, 1
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds %struct.b2ContactEdge, ptr %176, i64 %181
  store ptr %182, ptr %23, align 8, !tbaa !5
  %183 = load ptr, ptr %8, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.b2ContactEdge, ptr %183, i32 0, i32 2
  %185 = load i32, ptr %184, align 4, !tbaa !50
  %186 = load ptr, ptr %23, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.b2ContactEdge, ptr %186, i32 0, i32 2
  store i32 %185, ptr %187, align 4, !tbaa !50
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %188

188:                                              ; preds = %166, %161
  %189 = load ptr, ptr %8, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.b2ContactEdge, ptr %189, i32 0, i32 2
  %191 = load i32, ptr %190, align 4, !tbaa !50
  %192 = icmp ne i32 %191, -1
  br i1 %192, label %193, label %215

193:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %194 = load ptr, ptr %4, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.b2World, ptr %194, i32 0, i32 10
  %196 = load ptr, ptr %8, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.b2ContactEdge, ptr %196, i32 0, i32 2
  %198 = load i32, ptr %197, align 4, !tbaa !50
  %199 = ashr i32 %198, 1
  %200 = call ptr @b2ContactArray_Get(ptr noundef %195, i32 noundef %199)
  store ptr %200, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %201 = load ptr, ptr %24, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.b2Contact, ptr %201, i32 0, i32 3
  %203 = getelementptr inbounds [2 x %struct.b2ContactEdge], ptr %202, i64 0, i64 0
  %204 = load ptr, ptr %8, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.b2ContactEdge, ptr %204, i32 0, i32 2
  %206 = load i32, ptr %205, align 4, !tbaa !50
  %207 = and i32 %206, 1
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds %struct.b2ContactEdge, ptr %203, i64 %208
  store ptr %209, ptr %25, align 8, !tbaa !5
  %210 = load ptr, ptr %8, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.b2ContactEdge, ptr %210, i32 0, i32 1
  %212 = load i32, ptr %211, align 4, !tbaa !49
  %213 = load ptr, ptr %25, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.b2ContactEdge, ptr %213, i32 0, i32 1
  store i32 %212, ptr %214, align 4, !tbaa !49
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %215

215:                                              ; preds = %193, %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %216 = load ptr, ptr %5, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.b2Contact, ptr %216, i32 0, i32 9
  %218 = load i32, ptr %217, align 4, !tbaa !51
  store i32 %218, ptr %26, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %219 = load i32, ptr %26, align 4, !tbaa !19
  %220 = shl i32 %219, 1
  %221 = or i32 %220, 0
  store i32 %221, ptr %27, align 4, !tbaa !19
  %222 = load ptr, ptr %12, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.b2Body, ptr %222, i32 0, i32 4
  %224 = load i32, ptr %223, align 8, !tbaa !52
  %225 = load i32, ptr %27, align 4, !tbaa !19
  %226 = icmp eq i32 %224, %225
  br i1 %226, label %227, label %233

227:                                              ; preds = %215
  %228 = load ptr, ptr %8, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.b2ContactEdge, ptr %228, i32 0, i32 2
  %230 = load i32, ptr %229, align 4, !tbaa !50
  %231 = load ptr, ptr %12, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.b2Body, ptr %231, i32 0, i32 4
  store i32 %230, ptr %232, align 8, !tbaa !52
  br label %233

233:                                              ; preds = %227, %215
  %234 = load ptr, ptr %12, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.b2Body, ptr %234, i32 0, i32 5
  %236 = load i32, ptr %235, align 4, !tbaa !54
  %237 = sub nsw i32 %236, 1
  store i32 %237, ptr %235, align 4, !tbaa !54
  %238 = load ptr, ptr %9, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.b2ContactEdge, ptr %238, i32 0, i32 1
  %240 = load i32, ptr %239, align 4, !tbaa !49
  %241 = icmp ne i32 %240, -1
  br i1 %241, label %242, label %264

242:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %243 = load ptr, ptr %4, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.b2World, ptr %243, i32 0, i32 10
  %245 = load ptr, ptr %9, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.b2ContactEdge, ptr %245, i32 0, i32 1
  %247 = load i32, ptr %246, align 4, !tbaa !49
  %248 = ashr i32 %247, 1
  %249 = call ptr @b2ContactArray_Get(ptr noundef %244, i32 noundef %248)
  store ptr %249, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %250 = load ptr, ptr %28, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.b2Contact, ptr %250, i32 0, i32 3
  %252 = getelementptr inbounds [2 x %struct.b2ContactEdge], ptr %251, i64 0, i64 0
  %253 = load ptr, ptr %9, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.b2ContactEdge, ptr %253, i32 0, i32 1
  %255 = load i32, ptr %254, align 4, !tbaa !49
  %256 = and i32 %255, 1
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds %struct.b2ContactEdge, ptr %252, i64 %257
  store ptr %258, ptr %29, align 8, !tbaa !5
  %259 = load ptr, ptr %9, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.b2ContactEdge, ptr %259, i32 0, i32 2
  %261 = load i32, ptr %260, align 4, !tbaa !50
  %262 = load ptr, ptr %29, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.b2ContactEdge, ptr %262, i32 0, i32 2
  store i32 %261, ptr %263, align 4, !tbaa !50
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %264

264:                                              ; preds = %242, %233
  %265 = load ptr, ptr %9, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.b2ContactEdge, ptr %265, i32 0, i32 2
  %267 = load i32, ptr %266, align 4, !tbaa !50
  %268 = icmp ne i32 %267, -1
  br i1 %268, label %269, label %291

269:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %270 = load ptr, ptr %4, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.b2World, ptr %270, i32 0, i32 10
  %272 = load ptr, ptr %9, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.b2ContactEdge, ptr %272, i32 0, i32 2
  %274 = load i32, ptr %273, align 4, !tbaa !50
  %275 = ashr i32 %274, 1
  %276 = call ptr @b2ContactArray_Get(ptr noundef %271, i32 noundef %275)
  store ptr %276, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %277 = load ptr, ptr %30, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.b2Contact, ptr %277, i32 0, i32 3
  %279 = getelementptr inbounds [2 x %struct.b2ContactEdge], ptr %278, i64 0, i64 0
  %280 = load ptr, ptr %9, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.b2ContactEdge, ptr %280, i32 0, i32 2
  %282 = load i32, ptr %281, align 4, !tbaa !50
  %283 = and i32 %282, 1
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds %struct.b2ContactEdge, ptr %279, i64 %284
  store ptr %285, ptr %31, align 8, !tbaa !5
  %286 = load ptr, ptr %9, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.b2ContactEdge, ptr %286, i32 0, i32 1
  %288 = load i32, ptr %287, align 4, !tbaa !49
  %289 = load ptr, ptr %31, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.b2ContactEdge, ptr %289, i32 0, i32 1
  store i32 %288, ptr %290, align 4, !tbaa !49
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %291

291:                                              ; preds = %269, %264
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  %292 = load i32, ptr %26, align 4, !tbaa !19
  %293 = shl i32 %292, 1
  %294 = or i32 %293, 1
  store i32 %294, ptr %32, align 4, !tbaa !19
  %295 = load ptr, ptr %13, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.b2Body, ptr %295, i32 0, i32 4
  %297 = load i32, ptr %296, align 8, !tbaa !52
  %298 = load i32, ptr %32, align 4, !tbaa !19
  %299 = icmp eq i32 %297, %298
  br i1 %299, label %300, label %306

300:                                              ; preds = %291
  %301 = load ptr, ptr %9, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.b2ContactEdge, ptr %301, i32 0, i32 2
  %303 = load i32, ptr %302, align 4, !tbaa !50
  %304 = load ptr, ptr %13, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.b2Body, ptr %304, i32 0, i32 4
  store i32 %303, ptr %305, align 8, !tbaa !52
  br label %306

306:                                              ; preds = %300, %291
  %307 = load ptr, ptr %13, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.b2Body, ptr %307, i32 0, i32 5
  %309 = load i32, ptr %308, align 4, !tbaa !54
  %310 = sub nsw i32 %309, 1
  store i32 %310, ptr %308, align 4, !tbaa !54
  %311 = load ptr, ptr %5, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.b2Contact, ptr %311, i32 0, i32 8
  %313 = load i32, ptr %312, align 4, !tbaa !55
  %314 = icmp ne i32 %313, -1
  br i1 %314, label %315, label %318

315:                                              ; preds = %306
  %316 = load ptr, ptr %4, align 8, !tbaa !5
  %317 = load ptr, ptr %5, align 8, !tbaa !5
  call void @b2UnlinkContact(ptr noundef %316, ptr noundef %317)
  br label %318

318:                                              ; preds = %315, %306
  %319 = load ptr, ptr %5, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.b2Contact, ptr %319, i32 0, i32 1
  %321 = load i32, ptr %320, align 4, !tbaa !56
  %322 = icmp ne i32 %321, -1
  br i1 %322, label %323, label %345

323:                                              ; preds = %318
  br label %324

324:                                              ; preds = %323
  %325 = load ptr, ptr %5, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.b2Contact, ptr %325, i32 0, i32 0
  %327 = load i32, ptr %326, align 4, !tbaa !57
  %328 = icmp eq i32 %327, 2
  br i1 %328, label %333, label %329

329:                                              ; preds = %324
  %330 = call i32 @b2InternalAssertFcn(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 424)
  %331 = icmp ne i32 %330, 0
  br i1 %331, label %332, label %333

332:                                              ; preds = %329
  call void @llvm.trap()
  br label %333

333:                                              ; preds = %332, %329, %324
  br label %334

334:                                              ; preds = %333
  br label %335

335:                                              ; preds = %334
  %336 = load ptr, ptr %4, align 8, !tbaa !5
  %337 = load i32, ptr %10, align 4, !tbaa !19
  %338 = load i32, ptr %11, align 4, !tbaa !19
  %339 = load ptr, ptr %5, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.b2Contact, ptr %339, i32 0, i32 1
  %341 = load i32, ptr %340, align 4, !tbaa !56
  %342 = load ptr, ptr %5, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.b2Contact, ptr %342, i32 0, i32 2
  %344 = load i32, ptr %343, align 4, !tbaa !58
  call void @b2RemoveContactFromGraph(ptr noundef %336, i32 noundef %337, i32 noundef %338, i32 noundef %341, i32 noundef %344)
  br label %400

345:                                              ; preds = %318
  br label %346

346:                                              ; preds = %345
  %347 = load ptr, ptr %5, align 8, !tbaa !5
  %348 = getelementptr inbounds %struct.b2Contact, ptr %347, i32 0, i32 0
  %349 = load i32, ptr %348, align 4, !tbaa !57
  %350 = icmp ne i32 %349, 2
  br i1 %350, label %361, label %351

351:                                              ; preds = %346
  %352 = load ptr, ptr %5, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.b2Contact, ptr %352, i32 0, i32 10
  %354 = load i32, ptr %353, align 4, !tbaa !20
  %355 = and i32 %354, 1
  %356 = icmp eq i32 %355, 0
  br i1 %356, label %361, label %357

357:                                              ; preds = %351
  %358 = call i32 @b2InternalAssertFcn(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 430)
  %359 = icmp ne i32 %358, 0
  br i1 %359, label %360, label %361

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

361:                                              ; preds = %360, %357, %351, %346
  br label %362

362:                                              ; preds = %361
  br label %363

363:                                              ; preds = %362
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %364 = load ptr, ptr %4, align 8, !tbaa !5
  %365 = getelementptr inbounds %struct.b2World, ptr %364, i32 0, i32 6
  %366 = load ptr, ptr %5, align 8, !tbaa !5
  %367 = getelementptr inbounds %struct.b2Contact, ptr %366, i32 0, i32 0
  %368 = load i32, ptr %367, align 4, !tbaa !57
  %369 = call ptr @b2SolverSetArray_Get(ptr noundef %365, i32 noundef %368)
  store ptr %369, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  %370 = load ptr, ptr %33, align 8, !tbaa !5
  %371 = getelementptr inbounds %struct.b2SolverSet, ptr %370, i32 0, i32 3
  %372 = load ptr, ptr %5, align 8, !tbaa !5
  %373 = getelementptr inbounds %struct.b2Contact, ptr %372, i32 0, i32 2
  %374 = load i32, ptr %373, align 4, !tbaa !58
  %375 = call i32 @b2ContactSimArray_RemoveSwap(ptr noundef %371, i32 noundef %374)
  store i32 %375, ptr %34, align 4, !tbaa !19
  %376 = load i32, ptr %34, align 4, !tbaa !19
  %377 = icmp ne i32 %376, -1
  br i1 %377, label %378, label %399

378:                                              ; preds = %363
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  %379 = load ptr, ptr %33, align 8, !tbaa !5
  %380 = getelementptr inbounds %struct.b2SolverSet, ptr %379, i32 0, i32 3
  %381 = getelementptr inbounds %struct.b2ContactSimArray, ptr %380, i32 0, i32 0
  %382 = load ptr, ptr %381, align 8, !tbaa !59
  %383 = load ptr, ptr %5, align 8, !tbaa !5
  %384 = getelementptr inbounds %struct.b2Contact, ptr %383, i32 0, i32 2
  %385 = load i32, ptr %384, align 4, !tbaa !58
  %386 = sext i32 %385 to i64
  %387 = getelementptr inbounds %struct.b2ContactSim, ptr %382, i64 %386
  store ptr %387, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  %388 = load ptr, ptr %4, align 8, !tbaa !5
  %389 = getelementptr inbounds %struct.b2World, ptr %388, i32 0, i32 10
  %390 = load ptr, ptr %35, align 8, !tbaa !5
  %391 = getelementptr inbounds %struct.b2ContactSim, ptr %390, i32 0, i32 0
  %392 = load i32, ptr %391, align 4, !tbaa !61
  %393 = call ptr @b2ContactArray_Get(ptr noundef %389, i32 noundef %392)
  store ptr %393, ptr %36, align 8, !tbaa !5
  %394 = load ptr, ptr %5, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.b2Contact, ptr %394, i32 0, i32 2
  %396 = load i32, ptr %395, align 4, !tbaa !58
  %397 = load ptr, ptr %36, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct.b2Contact, ptr %397, i32 0, i32 2
  store i32 %396, ptr %398, align 4, !tbaa !58
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  br label %399

399:                                              ; preds = %378, %363
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  br label %400

400:                                              ; preds = %399, %335
  %401 = load ptr, ptr %5, align 8, !tbaa !5
  %402 = getelementptr inbounds %struct.b2Contact, ptr %401, i32 0, i32 9
  store i32 -1, ptr %402, align 4, !tbaa !51
  %403 = load ptr, ptr %5, align 8, !tbaa !5
  %404 = getelementptr inbounds %struct.b2Contact, ptr %403, i32 0, i32 0
  store i32 -1, ptr %404, align 4, !tbaa !57
  %405 = load ptr, ptr %5, align 8, !tbaa !5
  %406 = getelementptr inbounds %struct.b2Contact, ptr %405, i32 0, i32 1
  store i32 -1, ptr %406, align 4, !tbaa !56
  %407 = load ptr, ptr %5, align 8, !tbaa !5
  %408 = getelementptr inbounds %struct.b2Contact, ptr %407, i32 0, i32 2
  store i32 -1, ptr %408, align 4, !tbaa !58
  %409 = load ptr, ptr %4, align 8, !tbaa !5
  %410 = getelementptr inbounds %struct.b2World, ptr %409, i32 0, i32 9
  %411 = load i32, ptr %26, align 4, !tbaa !19
  call void @b2FreeId(ptr noundef %410, i32 noundef %411)
  %412 = load i8, ptr %6, align 1, !tbaa !9, !range !21, !noundef !22
  %413 = trunc i8 %412 to i1
  br i1 %413, label %414, label %424

414:                                              ; preds = %400
  %415 = load i8, ptr %15, align 1, !tbaa !9, !range !21, !noundef !22
  %416 = trunc i8 %415 to i1
  br i1 %416, label %417, label %424

417:                                              ; preds = %414
  %418 = load ptr, ptr %4, align 8, !tbaa !5
  %419 = load ptr, ptr %12, align 8, !tbaa !5
  %420 = call zeroext i1 @b2WakeBody(ptr noundef %418, ptr noundef %419)
  %421 = load ptr, ptr %4, align 8, !tbaa !5
  %422 = load ptr, ptr %13, align 8, !tbaa !5
  %423 = call zeroext i1 @b2WakeBody(ptr noundef %421, ptr noundef %422)
  br label %424

424:                                              ; preds = %417, %414, %400
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret void
}

declare zeroext i1 @b2RemoveKey(ptr noundef, i64 noundef) #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @b2ContactEndTouchEventArray_Push(ptr noundef, i64, i64) #3

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

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

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

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

declare zeroext i1 @b2WakeBody(ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { cold noreturn nounwind memory(inaccessiblemem: write) }
attributes #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"_Bool", !7, i64 0}
!11 = !{!12, !13, i64 36}
!12 = !{!"b2Contact", !13, i64 0, !13, i64 4, !13, i64 8, !7, i64 12, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !10, i64 64}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 40}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !13, i64 0}
!18 = !{!"b2ContactEdge", !13, i64 0, !13, i64 4, !13, i64 8}
!19 = !{!13, !13, i64 0}
!20 = !{!12, !13, i64 60}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!24, !35, i64 1796}
!24 = !{!"b2World", !25, i64 0, !27, i64 40, !30, i64 336, !31, i64 1008, !26, i64 1032, !31, i64 1048, !26, i64 1072, !31, i64 1088, !26, i64 1112, !31, i64 1128, !26, i64 1152, !31, i64 1168, !26, i64 1192, !31, i64 1208, !31, i64 1232, !26, i64 1256, !26, i64 1272, !26, i64 1288, !26, i64 1304, !26, i64 1320, !26, i64 1336, !26, i64 1352, !26, i64 1368, !7, i64 1384, !7, i64 1416, !13, i64 1448, !26, i64 1456, !32, i64 1472, !32, i64 1488, !32, i64 1504, !32, i64 1520, !16, i64 1536, !13, i64 1544, !33, i64 1548, !34, i64 1556, !34, i64 1560, !34, i64 1564, !34, i64 1568, !34, i64 1572, !34, i64 1576, !34, i64 1580, !34, i64 1584, !6, i64 1592, !6, i64 1600, !35, i64 1608, !36, i64 1612, !6, i64 1704, !6, i64 1712, !6, i64 1720, !6, i64 1728, !13, i64 1736, !6, i64 1744, !6, i64 1752, !6, i64 1760, !6, i64 1768, !6, i64 1776, !34, i64 1784, !13, i64 1788, !13, i64 1792, !35, i64 1796, !10, i64 1798, !10, i64 1799, !10, i64 1800, !10, i64 1801, !10, i64 1802, !10, i64 1803}
!25 = !{!"b2ArenaAllocator", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !26, i64 24}
!26 = !{!"", !6, i64 0, !13, i64 8, !13, i64 12}
!27 = !{!"b2BroadPhase", !7, i64 0, !13, i64 216, !28, i64 224, !26, i64 240, !6, i64 256, !6, i64 264, !13, i64 272, !29, i64 276, !28, i64 280}
!28 = !{!"b2HashSet", !6, i64 0, !13, i64 8, !13, i64 12}
!29 = !{!"b2AtomicInt", !13, i64 0}
!30 = !{!"b2ConstraintGraph", !7, i64 0}
!31 = !{!"b2IdPool", !26, i64 0, !13, i64 16}
!32 = !{!"b2BitSet", !6, i64 0, !13, i64 8, !13, i64 12}
!33 = !{!"b2Vec2", !34, i64 0, !34, i64 4}
!34 = !{!"float", !7, i64 0}
!35 = !{!"short", !7, i64 0}
!36 = !{!"b2Profile", !34, i64 0, !34, i64 4, !34, i64 8, !34, i64 12, !34, i64 16, !34, i64 20, !34, i64 24, !34, i64 28, !34, i64 32, !34, i64 36, !34, i64 40, !34, i64 44, !34, i64 48, !34, i64 52, !34, i64 56, !34, i64 60, !34, i64 64, !34, i64 68, !34, i64 72, !34, i64 76, !34, i64 80, !34, i64 84}
!37 = !{!35, !35, i64 0}
!38 = !{!39, !13, i64 0}
!39 = !{!"b2Shape", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !34, i64 24, !34, i64 28, !34, i64 32, !34, i64 36, !34, i64 40, !13, i64 44, !40, i64 48, !40, i64 64, !33, i64 80, !13, i64 88, !41, i64 96, !6, i64 120, !13, i64 128, !7, i64 132, !35, i64 276, !10, i64 278, !10, i64 279, !10, i64 280, !10, i64 281, !10, i64 282}
!40 = !{!"b2AABB", !33, i64 0, !33, i64 8}
!41 = !{!"b2Filter", !16, i64 0, !16, i64 8, !13, i64 16}
!42 = !{!43, !13, i64 0}
!43 = !{!"b2ShapeId", !13, i64 0, !35, i64 4, !35, i64 6}
!44 = !{!43, !35, i64 4}
!45 = !{!39, !35, i64 276}
!46 = !{!43, !35, i64 6}
!47 = !{i64 0, i64 4, !19, i64 4, i64 2, !37, i64 6, i64 2, !37}
!48 = !{!24, !13, i64 1448}
!49 = !{!18, !13, i64 4}
!50 = !{!18, !13, i64 8}
!51 = !{!12, !13, i64 56}
!52 = !{!53, !13, i64 48}
!53 = !{!"b2Body", !7, i64 0, !6, i64 32, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !34, i64 88, !34, i64 92, !34, i64 96, !34, i64 100, !13, i64 104, !13, i64 108, !13, i64 112, !35, i64 116, !10, i64 118, !10, i64 119, !10, i64 120, !10, i64 121}
!54 = !{!53, !13, i64 52}
!55 = !{!12, !13, i64 52}
!56 = !{!12, !13, i64 4}
!57 = !{!12, !13, i64 0}
!58 = !{!12, !13, i64 8}
!59 = !{!60, !6, i64 48}
!60 = !{!"b2SolverSet", !26, i64 0, !26, i64 16, !26, i64 32, !26, i64 48, !26, i64 64, !13, i64 80}
!61 = !{!62, !13, i64 0}
!62 = !{!"b2ContactSim", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !34, i64 20, !34, i64 24, !34, i64 28, !34, i64 32, !63, i64 36, !34, i64 148, !34, i64 152, !34, i64 156, !34, i64 160, !13, i64 164, !64, i64 168}
!63 = !{!"b2Manifold", !33, i64 0, !34, i64 8, !7, i64 12, !13, i64 108}
!64 = !{!"b2SimplexCache", !35, i64 0, !7, i64 2, !7, i64 5}


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

@.str.1 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [85 x i8], align 1

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @b2SolverSetArray_Get(ptr noundef, i32 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: nounwind uwtable
define dso_local void @b2DestroyContact(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2) local_unnamed_addr #3 {
  %4 = getelementptr inbounds i8, ptr %1, i64 36
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 40
  %7 = load i32, ptr %6, align 4, !tbaa !11
  %8 = icmp slt i32 %5, %7
  %9 = sext i32 %5 to i64
  %10 = shl nsw i64 %9, 32
  %11 = sext i32 %7 to i64
  %12 = or i64 %10, %11
  %13 = shl nsw i64 %11, 32
  %14 = or i64 %13, %9
  %15 = select i1 %8, i64 %12, i64 %14
  %16 = getelementptr inbounds i8, ptr %0, i64 320
  %17 = tail call zeroext i1 @b2RemoveKey(ptr noundef nonnull %16, i64 noundef %15) #4
  %18 = getelementptr inbounds i8, ptr %1, i64 12
  %19 = getelementptr inbounds i8, ptr %1, i64 24
  %20 = load i32, ptr %18, align 4, !tbaa !12
  %21 = load i32, ptr %19, align 4, !tbaa !12
  %22 = getelementptr inbounds i8, ptr %0, i64 1032
  %23 = tail call ptr @b2BodyArray_Get(ptr noundef nonnull %22, i32 noundef %20)
  %24 = tail call ptr @b2BodyArray_Get(ptr noundef nonnull %22, i32 noundef %21)
  %25 = getelementptr inbounds i8, ptr %1, i64 60
  %26 = load i32, ptr %25, align 4, !tbaa !14
  %27 = and i32 %26, 1
  %.not = icmp ne i32 %27, 0
  %28 = and i32 %26, 5
  %or.cond.not = icmp eq i32 %28, 5
  br i1 %or.cond.not, label %29, label %52

29:                                               ; preds = %3
  %30 = getelementptr inbounds i8, ptr %0, i64 1796
  %31 = load i16, ptr %30, align 4, !tbaa !15
  %32 = getelementptr inbounds i8, ptr %0, i64 1256
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = tail call ptr @b2ShapeArray_Get(ptr noundef nonnull %32, i32 noundef %33)
  %35 = load i32, ptr %6, align 4, !tbaa !11
  %36 = tail call ptr @b2ShapeArray_Get(ptr noundef nonnull %32, i32 noundef %35)
  %37 = load i32, ptr %34, align 8, !tbaa !31
  %38 = add nsw i32 %37, 1
  %39 = getelementptr inbounds i8, ptr %34, i64 276
  %40 = load i16, ptr %39, align 4, !tbaa !35
  %41 = load i32, ptr %36, align 8, !tbaa !31
  %42 = add nsw i32 %41, 1
  %43 = getelementptr inbounds i8, ptr %36, i64 276
  %44 = load i16, ptr %43, align 4, !tbaa !35
  %.sroa.521.0.insert.ext = zext i16 %40 to i64
  %.sroa.521.0.insert.shift = shl nuw i64 %.sroa.521.0.insert.ext, 48
  %.sroa.420.0.insert.ext = zext i16 %31 to i64
  %.sroa.420.0.insert.shift = shl nuw nsw i64 %.sroa.420.0.insert.ext, 32
  %.sroa.019.0.insert.ext = zext i32 %38 to i64
  %45 = or disjoint i64 %.sroa.521.0.insert.shift, %.sroa.019.0.insert.ext
  %.sroa.019.0.insert.insert = or disjoint i64 %45, %.sroa.420.0.insert.shift
  %.sroa.5.0.insert.ext = zext i16 %44 to i64
  %.sroa.5.0.insert.shift = shl nuw i64 %.sroa.5.0.insert.ext, 48
  %.sroa.017.0.insert.ext = zext i32 %42 to i64
  %46 = or disjoint i64 %.sroa.5.0.insert.shift, %.sroa.017.0.insert.ext
  %.sroa.017.0.insert.insert = or disjoint i64 %46, %.sroa.420.0.insert.shift
  %47 = getelementptr inbounds i8, ptr %0, i64 1416
  %48 = getelementptr inbounds i8, ptr %0, i64 1448
  %49 = load i32, ptr %48, align 8, !tbaa !36
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds %struct.b2ContactEndTouchEventArray, ptr %47, i64 %50
  tail call void @b2ContactEndTouchEventArray_Push(ptr noundef nonnull %51, i64 %.sroa.019.0.insert.insert, i64 %.sroa.017.0.insert.insert)
  br label %52

52:                                               ; preds = %29, %3
  %53 = getelementptr inbounds i8, ptr %1, i64 16
  %54 = load i32, ptr %53, align 4, !tbaa !37
  %.not120 = icmp eq i32 %54, -1
  br i1 %.not120, label %._crit_edge, label %55

._crit_edge:                                      ; preds = %52
  %.phi.trans.insert = getelementptr inbounds i8, ptr %1, i64 20
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !38
  br label %66

55:                                               ; preds = %52
  %56 = getelementptr inbounds i8, ptr %0, i64 1152
  %57 = ashr i32 %54, 1
  %58 = tail call ptr @b2ContactArray_Get(ptr noundef nonnull %56, i32 noundef %57)
  %59 = getelementptr inbounds i8, ptr %58, i64 12
  %60 = load i32, ptr %53, align 4, !tbaa !37
  %61 = and i32 %60, 1
  %62 = zext nneg i32 %61 to i64
  %63 = getelementptr inbounds i8, ptr %1, i64 20
  %64 = load i32, ptr %63, align 4, !tbaa !38
  %65 = getelementptr inbounds %struct.b2ContactEdge, ptr %59, i64 %62, i32 2
  store i32 %64, ptr %65, align 4, !tbaa !38
  br label %66

66:                                               ; preds = %._crit_edge, %55
  %67 = phi i32 [ %.pre, %._crit_edge ], [ %64, %55 ]
  %.not121 = icmp eq i32 %67, -1
  br i1 %.not121, label %79, label %68

68:                                               ; preds = %66
  %69 = getelementptr inbounds i8, ptr %1, i64 20
  %70 = getelementptr inbounds i8, ptr %0, i64 1152
  %71 = ashr i32 %67, 1
  %72 = tail call ptr @b2ContactArray_Get(ptr noundef nonnull %70, i32 noundef %71)
  %73 = getelementptr inbounds i8, ptr %72, i64 12
  %74 = load i32, ptr %69, align 4, !tbaa !38
  %75 = and i32 %74, 1
  %76 = zext nneg i32 %75 to i64
  %77 = load i32, ptr %53, align 4, !tbaa !37
  %78 = getelementptr inbounds %struct.b2ContactEdge, ptr %73, i64 %76, i32 1
  store i32 %77, ptr %78, align 4, !tbaa !37
  br label %79

79:                                               ; preds = %68, %66
  %80 = phi i32 [ %74, %68 ], [ -1, %66 ]
  %81 = getelementptr inbounds i8, ptr %1, i64 56
  %82 = load i32, ptr %81, align 4, !tbaa !39
  %83 = shl i32 %82, 1
  %84 = getelementptr inbounds i8, ptr %23, i64 48
  %85 = load i32, ptr %84, align 8, !tbaa !40
  %86 = icmp eq i32 %85, %83
  br i1 %86, label %87, label %88

87:                                               ; preds = %79
  store i32 %80, ptr %84, align 8, !tbaa !40
  br label %88

88:                                               ; preds = %87, %79
  %89 = getelementptr inbounds i8, ptr %23, i64 52
  %90 = load i32, ptr %89, align 4, !tbaa !42
  %91 = add nsw i32 %90, -1
  store i32 %91, ptr %89, align 4, !tbaa !42
  %92 = getelementptr inbounds i8, ptr %1, i64 28
  %93 = load i32, ptr %92, align 4, !tbaa !37
  %.not122 = icmp eq i32 %93, -1
  br i1 %.not122, label %._crit_edge131, label %94

._crit_edge131:                                   ; preds = %88
  %.phi.trans.insert132 = getelementptr inbounds i8, ptr %1, i64 32
  %.pre133 = load i32, ptr %.phi.trans.insert132, align 4, !tbaa !38
  br label %105

94:                                               ; preds = %88
  %95 = getelementptr inbounds i8, ptr %0, i64 1152
  %96 = ashr i32 %93, 1
  %97 = tail call ptr @b2ContactArray_Get(ptr noundef nonnull %95, i32 noundef %96)
  %98 = getelementptr inbounds i8, ptr %97, i64 12
  %99 = load i32, ptr %92, align 4, !tbaa !37
  %100 = and i32 %99, 1
  %101 = zext nneg i32 %100 to i64
  %102 = getelementptr inbounds i8, ptr %1, i64 32
  %103 = load i32, ptr %102, align 4, !tbaa !38
  %104 = getelementptr inbounds %struct.b2ContactEdge, ptr %98, i64 %101, i32 2
  store i32 %103, ptr %104, align 4, !tbaa !38
  br label %105

105:                                              ; preds = %._crit_edge131, %94
  %106 = phi i32 [ %.pre133, %._crit_edge131 ], [ %103, %94 ]
  %.not123 = icmp eq i32 %106, -1
  br i1 %.not123, label %118, label %107

107:                                              ; preds = %105
  %108 = getelementptr inbounds i8, ptr %1, i64 32
  %109 = getelementptr inbounds i8, ptr %0, i64 1152
  %110 = ashr i32 %106, 1
  %111 = tail call ptr @b2ContactArray_Get(ptr noundef nonnull %109, i32 noundef %110)
  %112 = getelementptr inbounds i8, ptr %111, i64 12
  %113 = load i32, ptr %108, align 4, !tbaa !38
  %114 = and i32 %113, 1
  %115 = zext nneg i32 %114 to i64
  %116 = load i32, ptr %92, align 4, !tbaa !37
  %117 = getelementptr inbounds %struct.b2ContactEdge, ptr %112, i64 %115, i32 1
  store i32 %116, ptr %117, align 4, !tbaa !37
  br label %118

118:                                              ; preds = %107, %105
  %119 = phi i32 [ %113, %107 ], [ -1, %105 ]
  %120 = or disjoint i32 %83, 1
  %121 = getelementptr inbounds i8, ptr %24, i64 48
  %122 = load i32, ptr %121, align 8, !tbaa !40
  %123 = icmp eq i32 %122, %120
  br i1 %123, label %124, label %125

124:                                              ; preds = %118
  store i32 %119, ptr %121, align 8, !tbaa !40
  br label %125

125:                                              ; preds = %124, %118
  %126 = getelementptr inbounds i8, ptr %24, i64 52
  %127 = load i32, ptr %126, align 4, !tbaa !42
  %128 = add nsw i32 %127, -1
  store i32 %128, ptr %126, align 4, !tbaa !42
  %129 = getelementptr inbounds i8, ptr %1, i64 52
  %130 = load i32, ptr %129, align 4, !tbaa !43
  %.not124 = icmp eq i32 %130, -1
  br i1 %.not124, label %132, label %131

131:                                              ; preds = %125
  tail call void @b2UnlinkContact(ptr noundef %0, ptr noundef nonnull %1) #4
  br label %132

132:                                              ; preds = %131, %125
  %133 = getelementptr inbounds i8, ptr %1, i64 4
  %134 = load i32, ptr %133, align 4, !tbaa !44
  %.not125 = icmp eq i32 %134, -1
  %135 = load i32, ptr %1, align 4, !tbaa !45
  %.not126 = icmp eq i32 %135, 2
  br i1 %.not125, label %144, label %136

136:                                              ; preds = %132
  br i1 %.not126, label %140, label %137

137:                                              ; preds = %136
  %138 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 424) #4
  %.not129 = icmp eq i32 %138, 0
  br i1 %.not129, label %._crit_edge134, label %139

._crit_edge134:                                   ; preds = %137
  %.pre135 = load i32, ptr %133, align 4, !tbaa !44
  br label %140

139:                                              ; preds = %137
  tail call void @llvm.trap()
  unreachable

140:                                              ; preds = %._crit_edge134, %136
  %141 = phi i32 [ %.pre135, %._crit_edge134 ], [ %134, %136 ]
  %142 = getelementptr inbounds i8, ptr %1, i64 8
  %143 = load i32, ptr %142, align 4, !tbaa !46
  tail call void @b2RemoveContactFromGraph(ptr noundef %0, i32 noundef %20, i32 noundef %21, i32 noundef %141, i32 noundef %143) #4
  br label %170

144:                                              ; preds = %132
  br i1 %.not126, label %145, label %152

145:                                              ; preds = %144
  %146 = load i32, ptr %25, align 4, !tbaa !14
  %147 = and i32 %146, 1
  %148 = icmp eq i32 %147, 0
  br i1 %148, label %152, label %149

149:                                              ; preds = %145
  %150 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 430) #4
  %.not127 = icmp eq i32 %150, 0
  br i1 %.not127, label %._crit_edge136, label %151

._crit_edge136:                                   ; preds = %149
  %.pre137 = load i32, ptr %1, align 4, !tbaa !45
  br label %152

151:                                              ; preds = %149
  tail call void @llvm.trap()
  unreachable

152:                                              ; preds = %._crit_edge136, %145, %144
  %153 = phi i32 [ %.pre137, %._crit_edge136 ], [ 2, %145 ], [ %135, %144 ]
  %154 = getelementptr inbounds i8, ptr %0, i64 1072
  %155 = tail call ptr @b2SolverSetArray_Get(ptr noundef nonnull %154, i32 noundef %153)
  %156 = getelementptr inbounds i8, ptr %155, i64 48
  %157 = getelementptr inbounds i8, ptr %1, i64 8
  %158 = load i32, ptr %157, align 4, !tbaa !46
  %159 = tail call i32 @b2ContactSimArray_RemoveSwap(ptr noundef nonnull %156, i32 noundef %158)
  %.not128 = icmp eq i32 %159, -1
  br i1 %.not128, label %170, label %160

160:                                              ; preds = %152
  %161 = load ptr, ptr %156, align 8, !tbaa !47
  %162 = load i32, ptr %157, align 4, !tbaa !46
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds %struct.b2ContactSim, ptr %161, i64 %163
  %165 = getelementptr inbounds i8, ptr %0, i64 1152
  %166 = load i32, ptr %164, align 4, !tbaa !49
  %167 = tail call ptr @b2ContactArray_Get(ptr noundef nonnull %165, i32 noundef %166)
  %168 = load i32, ptr %157, align 4, !tbaa !46
  %169 = getelementptr inbounds i8, ptr %167, i64 8
  store i32 %168, ptr %169, align 4, !tbaa !46
  br label %170

170:                                              ; preds = %152, %160, %140
  store i32 -1, ptr %81, align 4, !tbaa !39
  store i32 -1, ptr %1, align 4, !tbaa !45
  store i32 -1, ptr %133, align 4, !tbaa !44
  %171 = getelementptr inbounds i8, ptr %1, i64 8
  store i32 -1, ptr %171, align 4, !tbaa !46
  %172 = getelementptr inbounds i8, ptr %0, i64 1128
  tail call void @b2FreeId(ptr noundef nonnull %172, i32 noundef %82) #4
  %brmerge.not = and i1 %.not, %2
  br i1 %brmerge.not, label %173, label %176

173:                                              ; preds = %170
  %174 = tail call zeroext i1 @b2WakeBody(ptr noundef %0, ptr noundef nonnull %23) #4
  %175 = tail call zeroext i1 @b2WakeBody(ptr noundef %0, ptr noundef nonnull %24) #4
  br label %176

176:                                              ; preds = %170, %173
  ret void
}

declare zeroext i1 @b2RemoveKey(ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

declare void @b2UnlinkContact(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @b2RemoveContactFromGraph(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

declare zeroext i1 @b2WakeBody(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 36}
!6 = !{!"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, !10, i64 64}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_Bool", !8, i64 0}
!11 = !{!6, !7, i64 40}
!12 = !{!13, !7, i64 0}
!13 = !{!"b2ContactEdge", !7, i64 0, !7, i64 4, !7, i64 8}
!14 = !{!6, !7, i64 60}
!15 = !{!16, !29, i64 1796}
!16 = !{!"b2World", !17, i64 0, !20, i64 40, !23, i64 336, !24, i64 1008, !19, i64 1032, !24, i64 1048, !19, i64 1072, !24, i64 1088, !19, i64 1112, !24, i64 1128, !19, i64 1152, !24, i64 1168, !19, i64 1192, !24, i64 1208, !24, i64 1232, !19, i64 1256, !19, i64 1272, !19, i64 1288, !19, i64 1304, !19, i64 1320, !19, i64 1336, !19, i64 1352, !19, i64 1368, !8, i64 1384, !8, i64 1416, !7, i64 1448, !19, i64 1456, !25, i64 1472, !25, i64 1488, !25, i64 1504, !25, i64 1520, !26, i64 1536, !7, i64 1544, !27, i64 1548, !28, i64 1556, !28, i64 1560, !28, i64 1564, !28, i64 1568, !28, i64 1572, !28, i64 1576, !28, i64 1580, !28, i64 1584, !18, i64 1592, !18, i64 1600, !29, i64 1608, !30, i64 1612, !18, i64 1704, !18, i64 1712, !18, i64 1720, !18, i64 1728, !7, i64 1736, !18, i64 1744, !18, i64 1752, !18, i64 1760, !18, i64 1768, !18, i64 1776, !28, i64 1784, !7, i64 1788, !7, i64 1792, !29, i64 1796, !10, i64 1798, !10, i64 1799, !10, i64 1800, !10, i64 1801, !10, i64 1802, !10, i64 1803}
!17 = !{!"b2ArenaAllocator", !18, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !19, i64 24}
!18 = !{!"any pointer", !8, i64 0}
!19 = !{!"", !18, i64 0, !7, i64 8, !7, i64 12}
!20 = !{!"b2BroadPhase", !8, i64 0, !7, i64 216, !21, i64 224, !19, i64 240, !18, i64 256, !18, i64 264, !7, i64 272, !22, i64 276, !21, i64 280}
!21 = !{!"b2HashSet", !18, i64 0, !7, i64 8, !7, i64 12}
!22 = !{!"b2AtomicInt", !7, i64 0}
!23 = !{!"b2ConstraintGraph", !8, i64 0}
!24 = !{!"b2IdPool", !19, i64 0, !7, i64 16}
!25 = !{!"b2BitSet", !18, i64 0, !7, i64 8, !7, i64 12}
!26 = !{!"long", !8, i64 0}
!27 = !{!"b2Vec2", !28, i64 0, !28, i64 4}
!28 = !{!"float", !8, i64 0}
!29 = !{!"short", !8, i64 0}
!30 = !{!"b2Profile", !28, i64 0, !28, i64 4, !28, i64 8, !28, i64 12, !28, i64 16, !28, i64 20, !28, i64 24, !28, i64 28, !28, i64 32, !28, i64 36, !28, i64 40, !28, i64 44, !28, i64 48, !28, i64 52, !28, i64 56, !28, i64 60, !28, i64 64, !28, i64 68, !28, i64 72, !28, i64 76, !28, i64 80, !28, i64 84}
!31 = !{!32, !7, i64 0}
!32 = !{!"b2Shape", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !28, i64 24, !28, i64 28, !28, i64 32, !28, i64 36, !28, i64 40, !7, i64 44, !33, i64 48, !33, i64 64, !27, i64 80, !7, i64 88, !34, i64 96, !18, i64 120, !7, i64 128, !8, i64 132, !29, i64 276, !10, i64 278, !10, i64 279, !10, i64 280, !10, i64 281, !10, i64 282}
!33 = !{!"b2AABB", !27, i64 0, !27, i64 8}
!34 = !{!"b2Filter", !26, i64 0, !26, i64 8, !7, i64 16}
!35 = !{!32, !29, i64 276}
!36 = !{!16, !7, i64 1448}
!37 = !{!13, !7, i64 4}
!38 = !{!13, !7, i64 8}
!39 = !{!6, !7, i64 56}
!40 = !{!41, !7, i64 48}
!41 = !{!"b2Body", !8, i64 0, !18, 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, !28, i64 88, !28, i64 92, !28, i64 96, !28, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !29, i64 116, !10, i64 118, !10, i64 119, !10, i64 120, !10, i64 121}
!42 = !{!41, !7, i64 52}
!43 = !{!6, !7, i64 52}
!44 = !{!6, !7, i64 4}
!45 = !{!6, !7, i64 0}
!46 = !{!6, !7, i64 8}
!47 = !{!48, !18, i64 48}
!48 = !{!"b2SolverSet", !19, i64 0, !19, i64 16, !19, i64 32, !19, i64 48, !19, i64 64, !7, i64 80}
!49 = !{!50, !7, i64 0}
!50 = !{!"b2ContactSim", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !28, i64 20, !28, i64 24, !28, i64 28, !28, i64 32, !51, i64 36, !28, i64 148, !28, i64 152, !28, i64 156, !28, i64 160, !7, i64 164, !52, i64 168}
!51 = !{!"b2Manifold", !27, i64 0, !28, i64 8, !8, i64 12, !7, i64 108}
!52 = !{!"b2SimplexCache", !29, i64 0, !8, i64 2, !8, i64 5}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass