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

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

@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @b2OverlapSensors(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %struct.b2ShapeId, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %struct.b2ShapeId, align 4
  %28 = alloca %struct.b2SensorEndTouchEvent, align 4
  %29 = alloca %struct.b2ShapeId, align 4
  %30 = alloca %struct.b2SensorBeginTouchEvent, align 4
  %31 = alloca %struct.b2ShapeId, align 4
  %32 = alloca %struct.b2SensorEndTouchEvent, align 4
  %33 = alloca %struct.b2ShapeId, align 4
  %34 = alloca %struct.b2SensorBeginTouchEvent, align 4
  %35 = alloca ptr, align 8
  %36 = alloca %struct.b2ShapeId, align 4
  %37 = alloca %struct.b2SensorEndTouchEvent, align 4
  %38 = alloca ptr, align 8
  %39 = alloca %struct.b2ShapeId, align 4
  %40 = alloca %struct.b2SensorBeginTouchEvent, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.b2World, ptr %41, i32 0, i32 17
  %43 = getelementptr inbounds %struct.b2SensorArray, ptr %42, i32 0, i32 1
  %44 = load i32, ptr %43, align 8, !tbaa !9
  store i32 %44, ptr %3, align 4, !tbaa !26
  %45 = load i32, ptr %3, align 4, !tbaa !26
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %48

47:                                               ; preds = %1
  store i32 1, ptr %4, align 4
  br label %450

48:                                               ; preds = %1
  br label %49

49:                                               ; preds = %48
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.b2World, ptr %50, i32 0, i32 50
  %52 = load i32, ptr %51, align 8, !tbaa !27
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %58, label %54

54:                                               ; preds = %49
  %55 = call i32 @b2InternalAssertFcn(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 223)
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %58

57:                                               ; preds = %54
  call void @llvm.trap()
  br label %58

58:                                               ; preds = %57, %54, %49
  br label %59

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !26
  br label %61

61:                                               ; preds = %78, %60
  %62 = load i32, ptr %5, align 4, !tbaa !26
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.b2World, ptr %63, i32 0, i32 50
  %65 = load i32, ptr %64, align 8, !tbaa !27
  %66 = icmp slt i32 %62, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %61
  store i32 4, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %81

68:                                               ; preds = %61
  %69 = load ptr, ptr %2, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.b2World, ptr %69, i32 0, i32 19
  %71 = getelementptr inbounds %struct.b2SensorTaskContextArray, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !28
  %73 = load i32, ptr %5, align 4, !tbaa !26
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds %struct.b2SensorTaskContext, ptr %72, i64 %74
  %76 = getelementptr inbounds %struct.b2SensorTaskContext, ptr %75, i32 0, i32 0
  %77 = load i32, ptr %3, align 4, !tbaa !26
  call void @b2SetBitCountAndClear(ptr noundef %76, i32 noundef %77)
  br label %78

78:                                               ; preds = %68
  %79 = load i32, ptr %5, align 4, !tbaa !26
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %5, align 4, !tbaa !26
  br label %61, !llvm.loop !29

81:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 16, ptr %6, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %82 = load ptr, ptr %2, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.b2World, ptr %82, i32 0, i32 51
  %84 = load ptr, ptr %83, align 8, !tbaa !31
  %85 = load i32, ptr %3, align 4, !tbaa !26
  %86 = load i32, ptr %6, align 4, !tbaa !26
  %87 = load ptr, ptr %2, align 8, !tbaa !5
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.b2World, ptr %88, i32 0, i32 53
  %90 = load ptr, ptr %89, align 8, !tbaa !32
  %91 = call ptr %84(ptr noundef @b2SensorTask, i32 noundef %85, i32 noundef %86, ptr noundef %87, ptr noundef %90)
  store ptr %91, ptr %7, align 8, !tbaa !5
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.b2World, ptr %92, i32 0, i32 58
  %94 = load i32, ptr %93, align 8, !tbaa !33
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %93, align 8, !tbaa !33
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = icmp ne ptr %96, null
  br i1 %97, label %98, label %106

98:                                               ; preds = %81
  %99 = load ptr, ptr %2, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.b2World, ptr %99, i32 0, i32 52
  %101 = load ptr, ptr %100, align 8, !tbaa !34
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = load ptr, ptr %2, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.b2World, ptr %103, i32 0, i32 53
  %105 = load ptr, ptr %104, align 8, !tbaa !32
  call void %101(ptr noundef %102, ptr noundef %105)
  br label %106

106:                                              ; preds = %98, %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %107 = load ptr, ptr %2, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.b2World, ptr %107, i32 0, i32 19
  %109 = getelementptr inbounds %struct.b2SensorTaskContextArray, ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !28
  %111 = getelementptr inbounds %struct.b2SensorTaskContext, ptr %110, i64 0
  %112 = getelementptr inbounds %struct.b2SensorTaskContext, ptr %111, i32 0, i32 0
  store ptr %112, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 1, ptr %9, align 4, !tbaa !26
  br label %113

113:                                              ; preds = %130, %106
  %114 = load i32, ptr %9, align 4, !tbaa !26
  %115 = load ptr, ptr %2, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.b2World, ptr %115, i32 0, i32 50
  %117 = load i32, ptr %116, align 8, !tbaa !27
  %118 = icmp slt i32 %114, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %113
  store i32 7, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %133

120:                                              ; preds = %113
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = load ptr, ptr %2, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.b2World, ptr %122, i32 0, i32 19
  %124 = getelementptr inbounds %struct.b2SensorTaskContextArray, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !28
  %126 = load i32, ptr %9, align 4, !tbaa !26
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds %struct.b2SensorTaskContext, ptr %125, i64 %127
  %129 = getelementptr inbounds %struct.b2SensorTaskContext, ptr %128, i32 0, i32 0
  call void @b2InPlaceUnion(ptr noundef %121, ptr noundef %129)
  br label %130

130:                                              ; preds = %120
  %131 = load i32, ptr %9, align 4, !tbaa !26
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %9, align 4, !tbaa !26
  br label %113, !llvm.loop !35

133:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.b2BitSet, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !36
  store ptr %136, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.b2BitSet, ptr %137, i32 0, i32 2
  %139 = load i32, ptr %138, align 4, !tbaa !37
  store i32 %139, ptr %11, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !26
  br label %140

140:                                              ; preds = %446, %133
  %141 = load i32, ptr %12, align 4, !tbaa !26
  %142 = load i32, ptr %11, align 4, !tbaa !26
  %143 = icmp ult i32 %141, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %140
  store i32 10, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %449

145:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = load i32, ptr %12, align 4, !tbaa !26
  %148 = zext i32 %147 to i64
  %149 = getelementptr inbounds i64, ptr %146, i64 %148
  %150 = load i64, ptr %149, align 8, !tbaa !38
  store i64 %150, ptr %13, align 8, !tbaa !38
  br label %151

151:                                              ; preds = %440, %145
  %152 = load i64, ptr %13, align 8, !tbaa !38
  %153 = icmp ne i64 %152, 0
  br i1 %153, label %154, label %445

154:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %155 = load i64, ptr %13, align 8, !tbaa !38
  %156 = call i32 @b2CTZ64(i64 noundef %155)
  store i32 %156, ptr %14, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %157 = load i32, ptr %12, align 4, !tbaa !26
  %158 = mul i32 64, %157
  %159 = load i32, ptr %14, align 4, !tbaa !26
  %160 = add i32 %158, %159
  store i32 %160, ptr %15, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %161 = load ptr, ptr %2, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.b2World, ptr %161, i32 0, i32 17
  %163 = load i32, ptr %15, align 4, !tbaa !26
  %164 = call ptr @b2SensorArray_Get(ptr noundef %162, i32 noundef %163)
  store ptr %164, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %165 = load ptr, ptr %2, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.b2World, ptr %165, i32 0, i32 15
  %167 = load ptr, ptr %16, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.b2Sensor, ptr %167, i32 0, i32 2
  %169 = load i32, ptr %168, align 8, !tbaa !39
  %170 = call ptr @b2ShapeArray_Get(ptr noundef %166, i32 noundef %169)
  store ptr %170, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %171 = getelementptr inbounds %struct.b2ShapeId, ptr %18, i32 0, i32 0
  %172 = load ptr, ptr %16, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.b2Sensor, ptr %172, i32 0, i32 2
  %174 = load i32, ptr %173, align 8, !tbaa !39
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %171, align 4, !tbaa !41
  %176 = getelementptr inbounds %struct.b2ShapeId, ptr %18, i32 0, i32 1
  %177 = load ptr, ptr %2, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.b2World, ptr %177, i32 0, i32 59
  %179 = load i16, ptr %178, align 4, !tbaa !43
  store i16 %179, ptr %176, align 4, !tbaa !44
  %180 = getelementptr inbounds %struct.b2ShapeId, ptr %18, i32 0, i32 2
  %181 = load ptr, ptr %17, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.b2Shape, ptr %181, i32 0, i32 20
  %183 = load i16, ptr %182, align 4, !tbaa !45
  store i16 %183, ptr %180, align 2, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %184 = load ptr, ptr %16, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.b2Sensor, ptr %184, i32 0, i32 0
  %186 = getelementptr inbounds %struct.b2ShapeRefArray, ptr %185, i32 0, i32 1
  %187 = load i32, ptr %186, align 8, !tbaa !50
  store i32 %187, ptr %19, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %188 = load ptr, ptr %16, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.b2Sensor, ptr %188, i32 0, i32 1
  %190 = getelementptr inbounds %struct.b2ShapeRefArray, ptr %189, i32 0, i32 1
  %191 = load i32, ptr %190, align 8, !tbaa !51
  store i32 %191, ptr %20, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %192 = load ptr, ptr %16, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.b2Sensor, ptr %192, i32 0, i32 0
  %194 = getelementptr inbounds %struct.b2ShapeRefArray, ptr %193, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8, !tbaa !52
  store ptr %195, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %196 = load ptr, ptr %16, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.b2Sensor, ptr %196, i32 0, i32 1
  %198 = getelementptr inbounds %struct.b2ShapeRefArray, ptr %197, i32 0, i32 0
  %199 = load ptr, ptr %198, align 8, !tbaa !53
  store ptr %199, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 0, ptr %24, align 4, !tbaa !26
  br label %200

200:                                              ; preds = %368, %154
  %201 = load i32, ptr %23, align 4, !tbaa !26
  %202 = load i32, ptr %19, align 4, !tbaa !26
  %203 = icmp slt i32 %201, %202
  br i1 %203, label %204, label %208

204:                                              ; preds = %200
  %205 = load i32, ptr %24, align 4, !tbaa !26
  %206 = load i32, ptr %20, align 4, !tbaa !26
  %207 = icmp slt i32 %205, %206
  br label %208

208:                                              ; preds = %204, %200
  %209 = phi i1 [ false, %200 ], [ %207, %204 ]
  br i1 %209, label %210, label %369

210:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %211 = load ptr, ptr %21, align 8, !tbaa !5
  %212 = load i32, ptr %23, align 4, !tbaa !26
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds %struct.b2ShapeRef, ptr %211, i64 %213
  store ptr %214, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %215 = load ptr, ptr %22, align 8, !tbaa !5
  %216 = load i32, ptr %24, align 4, !tbaa !26
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds %struct.b2ShapeRef, ptr %215, i64 %217
  store ptr %218, ptr %26, align 8, !tbaa !5
  %219 = load ptr, ptr %25, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.b2ShapeRef, ptr %219, i32 0, i32 0
  %221 = load i32, ptr %220, align 4, !tbaa !54
  %222 = load ptr, ptr %26, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.b2ShapeRef, ptr %222, i32 0, i32 0
  %224 = load i32, ptr %223, align 4, !tbaa !54
  %225 = icmp eq i32 %221, %224
  br i1 %225, label %226, label %306

226:                                              ; preds = %210
  %227 = load ptr, ptr %25, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.b2ShapeRef, ptr %227, i32 0, i32 1
  %229 = load i16, ptr %228, align 4, !tbaa !56
  %230 = zext i16 %229 to i32
  %231 = load ptr, ptr %26, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.b2ShapeRef, ptr %231, i32 0, i32 1
  %233 = load i16, ptr %232, align 4, !tbaa !56
  %234 = zext i16 %233 to i32
  %235 = icmp slt i32 %230, %234
  br i1 %235, label %236, label %265

236:                                              ; preds = %226
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %237 = getelementptr inbounds %struct.b2ShapeId, ptr %27, i32 0, i32 0
  %238 = load ptr, ptr %25, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.b2ShapeRef, ptr %238, i32 0, i32 0
  %240 = load i32, ptr %239, align 4, !tbaa !54
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %237, align 4, !tbaa !41
  %242 = getelementptr inbounds %struct.b2ShapeId, ptr %27, i32 0, i32 1
  %243 = load ptr, ptr %2, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.b2World, ptr %243, i32 0, i32 59
  %245 = load i16, ptr %244, align 4, !tbaa !43
  store i16 %245, ptr %242, align 4, !tbaa !44
  %246 = getelementptr inbounds %struct.b2ShapeId, ptr %27, i32 0, i32 2
  %247 = load ptr, ptr %25, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.b2ShapeRef, ptr %247, i32 0, i32 1
  %249 = load i16, ptr %248, align 4, !tbaa !56
  store i16 %249, ptr %246, align 2, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #7
  %250 = getelementptr inbounds %struct.b2SensorEndTouchEvent, ptr %28, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %250, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !57
  %251 = getelementptr inbounds %struct.b2SensorEndTouchEvent, ptr %28, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %251, ptr align 4 %27, i64 8, i1 false), !tbaa.struct !57
  %252 = load ptr, ptr %2, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.b2World, ptr %252, i32 0, i32 23
  %254 = load ptr, ptr %2, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.b2World, ptr %254, i32 0, i32 25
  %256 = load i32, ptr %255, align 8, !tbaa !59
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [2 x %struct.b2SensorEndTouchEventArray], ptr %253, i64 0, i64 %257
  %259 = getelementptr inbounds { i64, i64 }, ptr %28, i32 0, i32 0
  %260 = load i64, ptr %259, align 4
  %261 = getelementptr inbounds { i64, i64 }, ptr %28, i32 0, i32 1
  %262 = load i64, ptr %261, align 4
  call void @b2SensorEndTouchEventArray_Push(ptr noundef %258, i64 %260, i64 %262)
  %263 = load i32, ptr %23, align 4, !tbaa !26
  %264 = add nsw i32 %263, 1
  store i32 %264, ptr %23, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %305

265:                                              ; preds = %226
  %266 = load ptr, ptr %25, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.b2ShapeRef, ptr %266, i32 0, i32 1
  %268 = load i16, ptr %267, align 4, !tbaa !56
  %269 = zext i16 %268 to i32
  %270 = load ptr, ptr %26, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.b2ShapeRef, ptr %270, i32 0, i32 1
  %272 = load i16, ptr %271, align 4, !tbaa !56
  %273 = zext i16 %272 to i32
  %274 = icmp sgt i32 %269, %273
  br i1 %274, label %275, label %299

275:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %276 = getelementptr inbounds %struct.b2ShapeId, ptr %29, i32 0, i32 0
  %277 = load ptr, ptr %26, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.b2ShapeRef, ptr %277, i32 0, i32 0
  %279 = load i32, ptr %278, align 4, !tbaa !54
  %280 = add nsw i32 %279, 1
  store i32 %280, ptr %276, align 4, !tbaa !41
  %281 = getelementptr inbounds %struct.b2ShapeId, ptr %29, i32 0, i32 1
  %282 = load ptr, ptr %2, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.b2World, ptr %282, i32 0, i32 59
  %284 = load i16, ptr %283, align 4, !tbaa !43
  store i16 %284, ptr %281, align 4, !tbaa !44
  %285 = getelementptr inbounds %struct.b2ShapeId, ptr %29, i32 0, i32 2
  %286 = load ptr, ptr %26, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.b2ShapeRef, ptr %286, i32 0, i32 1
  %288 = load i16, ptr %287, align 4, !tbaa !56
  store i16 %288, ptr %285, align 2, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #7
  %289 = getelementptr inbounds %struct.b2SensorBeginTouchEvent, ptr %30, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %289, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !57
  %290 = getelementptr inbounds %struct.b2SensorBeginTouchEvent, ptr %30, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %290, ptr align 4 %29, i64 8, i1 false), !tbaa.struct !57
  %291 = load ptr, ptr %2, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.b2World, ptr %291, i32 0, i32 21
  %293 = getelementptr inbounds { i64, i64 }, ptr %30, i32 0, i32 0
  %294 = load i64, ptr %293, align 4
  %295 = getelementptr inbounds { i64, i64 }, ptr %30, i32 0, i32 1
  %296 = load i64, ptr %295, align 4
  call void @b2SensorBeginTouchEventArray_Push(ptr noundef %292, i64 %294, i64 %296)
  %297 = load i32, ptr %24, align 4, !tbaa !26
  %298 = add nsw i32 %297, 1
  store i32 %298, ptr %24, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  br label %304

299:                                              ; preds = %265
  %300 = load i32, ptr %23, align 4, !tbaa !26
  %301 = add nsw i32 %300, 1
  store i32 %301, ptr %23, align 4, !tbaa !26
  %302 = load i32, ptr %24, align 4, !tbaa !26
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %24, align 4, !tbaa !26
  br label %304

304:                                              ; preds = %299, %275
  br label %305

305:                                              ; preds = %304, %236
  br label %368

306:                                              ; preds = %210
  %307 = load ptr, ptr %25, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.b2ShapeRef, ptr %307, i32 0, i32 0
  %309 = load i32, ptr %308, align 4, !tbaa !54
  %310 = load ptr, ptr %26, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.b2ShapeRef, ptr %310, i32 0, i32 0
  %312 = load i32, ptr %311, align 4, !tbaa !54
  %313 = icmp slt i32 %309, %312
  br i1 %313, label %314, label %343

314:                                              ; preds = %306
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %315 = getelementptr inbounds %struct.b2ShapeId, ptr %31, i32 0, i32 0
  %316 = load ptr, ptr %25, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.b2ShapeRef, ptr %316, i32 0, i32 0
  %318 = load i32, ptr %317, align 4, !tbaa !54
  %319 = add nsw i32 %318, 1
  store i32 %319, ptr %315, align 4, !tbaa !41
  %320 = getelementptr inbounds %struct.b2ShapeId, ptr %31, i32 0, i32 1
  %321 = load ptr, ptr %2, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.b2World, ptr %321, i32 0, i32 59
  %323 = load i16, ptr %322, align 4, !tbaa !43
  store i16 %323, ptr %320, align 4, !tbaa !44
  %324 = getelementptr inbounds %struct.b2ShapeId, ptr %31, i32 0, i32 2
  %325 = load ptr, ptr %25, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.b2ShapeRef, ptr %325, i32 0, i32 1
  %327 = load i16, ptr %326, align 4, !tbaa !56
  store i16 %327, ptr %324, align 2, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #7
  %328 = getelementptr inbounds %struct.b2SensorEndTouchEvent, ptr %32, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %328, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !57
  %329 = getelementptr inbounds %struct.b2SensorEndTouchEvent, ptr %32, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %329, ptr align 4 %31, i64 8, i1 false), !tbaa.struct !57
  %330 = load ptr, ptr %2, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.b2World, ptr %330, i32 0, i32 23
  %332 = load ptr, ptr %2, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct.b2World, ptr %332, i32 0, i32 25
  %334 = load i32, ptr %333, align 8, !tbaa !59
  %335 = sext i32 %334 to i64
  %336 = getelementptr inbounds [2 x %struct.b2SensorEndTouchEventArray], ptr %331, i64 0, i64 %335
  %337 = getelementptr inbounds { i64, i64 }, ptr %32, i32 0, i32 0
  %338 = load i64, ptr %337, align 4
  %339 = getelementptr inbounds { i64, i64 }, ptr %32, i32 0, i32 1
  %340 = load i64, ptr %339, align 4
  call void @b2SensorEndTouchEventArray_Push(ptr noundef %336, i64 %338, i64 %340)
  %341 = load i32, ptr %23, align 4, !tbaa !26
  %342 = add nsw i32 %341, 1
  store i32 %342, ptr %23, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %367

343:                                              ; preds = %306
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %344 = getelementptr inbounds %struct.b2ShapeId, ptr %33, i32 0, i32 0
  %345 = load ptr, ptr %26, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.b2ShapeRef, ptr %345, i32 0, i32 0
  %347 = load i32, ptr %346, align 4, !tbaa !54
  %348 = add nsw i32 %347, 1
  store i32 %348, ptr %344, align 4, !tbaa !41
  %349 = getelementptr inbounds %struct.b2ShapeId, ptr %33, i32 0, i32 1
  %350 = load ptr, ptr %2, align 8, !tbaa !5
  %351 = getelementptr inbounds %struct.b2World, ptr %350, i32 0, i32 59
  %352 = load i16, ptr %351, align 4, !tbaa !43
  store i16 %352, ptr %349, align 4, !tbaa !44
  %353 = getelementptr inbounds %struct.b2ShapeId, ptr %33, i32 0, i32 2
  %354 = load ptr, ptr %26, align 8, !tbaa !5
  %355 = getelementptr inbounds %struct.b2ShapeRef, ptr %354, i32 0, i32 1
  %356 = load i16, ptr %355, align 4, !tbaa !56
  store i16 %356, ptr %353, align 2, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #7
  %357 = getelementptr inbounds %struct.b2SensorBeginTouchEvent, ptr %34, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %357, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !57
  %358 = getelementptr inbounds %struct.b2SensorBeginTouchEvent, ptr %34, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %358, ptr align 4 %33, i64 8, i1 false), !tbaa.struct !57
  %359 = load ptr, ptr %2, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.b2World, ptr %359, i32 0, i32 21
  %361 = getelementptr inbounds { i64, i64 }, ptr %34, i32 0, i32 0
  %362 = load i64, ptr %361, align 4
  %363 = getelementptr inbounds { i64, i64 }, ptr %34, i32 0, i32 1
  %364 = load i64, ptr %363, align 4
  call void @b2SensorBeginTouchEventArray_Push(ptr noundef %360, i64 %362, i64 %364)
  %365 = load i32, ptr %24, align 4, !tbaa !26
  %366 = add nsw i32 %365, 1
  store i32 %366, ptr %24, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  br label %367

367:                                              ; preds = %343, %314
  br label %368

368:                                              ; preds = %367, %305
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %200, !llvm.loop !60

369:                                              ; preds = %208
  br label %370

370:                                              ; preds = %374, %369
  %371 = load i32, ptr %23, align 4, !tbaa !26
  %372 = load i32, ptr %19, align 4, !tbaa !26
  %373 = icmp slt i32 %371, %372
  br i1 %373, label %374, label %407

374:                                              ; preds = %370
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %375 = load ptr, ptr %21, align 8, !tbaa !5
  %376 = load i32, ptr %23, align 4, !tbaa !26
  %377 = sext i32 %376 to i64
  %378 = getelementptr inbounds %struct.b2ShapeRef, ptr %375, i64 %377
  store ptr %378, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  %379 = getelementptr inbounds %struct.b2ShapeId, ptr %36, i32 0, i32 0
  %380 = load ptr, ptr %35, align 8, !tbaa !5
  %381 = getelementptr inbounds %struct.b2ShapeRef, ptr %380, i32 0, i32 0
  %382 = load i32, ptr %381, align 4, !tbaa !54
  %383 = add nsw i32 %382, 1
  store i32 %383, ptr %379, align 4, !tbaa !41
  %384 = getelementptr inbounds %struct.b2ShapeId, ptr %36, i32 0, i32 1
  %385 = load ptr, ptr %2, align 8, !tbaa !5
  %386 = getelementptr inbounds %struct.b2World, ptr %385, i32 0, i32 59
  %387 = load i16, ptr %386, align 4, !tbaa !43
  store i16 %387, ptr %384, align 4, !tbaa !44
  %388 = getelementptr inbounds %struct.b2ShapeId, ptr %36, i32 0, i32 2
  %389 = load ptr, ptr %35, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.b2ShapeRef, ptr %389, i32 0, i32 1
  %391 = load i16, ptr %390, align 4, !tbaa !56
  store i16 %391, ptr %388, align 2, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #7
  %392 = getelementptr inbounds %struct.b2SensorEndTouchEvent, ptr %37, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %392, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !57
  %393 = getelementptr inbounds %struct.b2SensorEndTouchEvent, ptr %37, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %393, ptr align 4 %36, i64 8, i1 false), !tbaa.struct !57
  %394 = load ptr, ptr %2, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.b2World, ptr %394, i32 0, i32 23
  %396 = load ptr, ptr %2, align 8, !tbaa !5
  %397 = getelementptr inbounds %struct.b2World, ptr %396, i32 0, i32 25
  %398 = load i32, ptr %397, align 8, !tbaa !59
  %399 = sext i32 %398 to i64
  %400 = getelementptr inbounds [2 x %struct.b2SensorEndTouchEventArray], ptr %395, i64 0, i64 %399
  %401 = getelementptr inbounds { i64, i64 }, ptr %37, i32 0, i32 0
  %402 = load i64, ptr %401, align 4
  %403 = getelementptr inbounds { i64, i64 }, ptr %37, i32 0, i32 1
  %404 = load i64, ptr %403, align 4
  call void @b2SensorEndTouchEventArray_Push(ptr noundef %400, i64 %402, i64 %404)
  %405 = load i32, ptr %23, align 4, !tbaa !26
  %406 = add nsw i32 %405, 1
  store i32 %406, ptr %23, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 16, 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
  br label %370, !llvm.loop !61

407:                                              ; preds = %370
  br label %408

408:                                              ; preds = %412, %407
  %409 = load i32, ptr %24, align 4, !tbaa !26
  %410 = load i32, ptr %20, align 4, !tbaa !26
  %411 = icmp slt i32 %409, %410
  br i1 %411, label %412, label %440

412:                                              ; preds = %408
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %413 = load ptr, ptr %22, align 8, !tbaa !5
  %414 = load i32, ptr %24, align 4, !tbaa !26
  %415 = sext i32 %414 to i64
  %416 = getelementptr inbounds %struct.b2ShapeRef, ptr %413, i64 %415
  store ptr %416, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  %417 = getelementptr inbounds %struct.b2ShapeId, ptr %39, i32 0, i32 0
  %418 = load ptr, ptr %38, align 8, !tbaa !5
  %419 = getelementptr inbounds %struct.b2ShapeRef, ptr %418, i32 0, i32 0
  %420 = load i32, ptr %419, align 4, !tbaa !54
  %421 = add nsw i32 %420, 1
  store i32 %421, ptr %417, align 4, !tbaa !41
  %422 = getelementptr inbounds %struct.b2ShapeId, ptr %39, i32 0, i32 1
  %423 = load ptr, ptr %2, align 8, !tbaa !5
  %424 = getelementptr inbounds %struct.b2World, ptr %423, i32 0, i32 59
  %425 = load i16, ptr %424, align 4, !tbaa !43
  store i16 %425, ptr %422, align 4, !tbaa !44
  %426 = getelementptr inbounds %struct.b2ShapeId, ptr %39, i32 0, i32 2
  %427 = load ptr, ptr %38, align 8, !tbaa !5
  %428 = getelementptr inbounds %struct.b2ShapeRef, ptr %427, i32 0, i32 1
  %429 = load i16, ptr %428, align 4, !tbaa !56
  store i16 %429, ptr %426, align 2, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #7
  %430 = getelementptr inbounds %struct.b2SensorBeginTouchEvent, ptr %40, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %430, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !57
  %431 = getelementptr inbounds %struct.b2SensorBeginTouchEvent, ptr %40, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %431, ptr align 4 %39, i64 8, i1 false), !tbaa.struct !57
  %432 = load ptr, ptr %2, align 8, !tbaa !5
  %433 = getelementptr inbounds %struct.b2World, ptr %432, i32 0, i32 21
  %434 = getelementptr inbounds { i64, i64 }, ptr %40, i32 0, i32 0
  %435 = load i64, ptr %434, align 4
  %436 = getelementptr inbounds { i64, i64 }, ptr %40, i32 0, i32 1
  %437 = load i64, ptr %436, align 4
  call void @b2SensorBeginTouchEventArray_Push(ptr noundef %433, i64 %435, i64 %437)
  %438 = load i32, ptr %24, align 4, !tbaa !26
  %439 = add nsw i32 %438, 1
  store i32 %439, ptr %24, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  br label %408, !llvm.loop !62

440:                                              ; preds = %408
  %441 = load i64, ptr %13, align 8, !tbaa !38
  %442 = load i64, ptr %13, align 8, !tbaa !38
  %443 = sub i64 %442, 1
  %444 = and i64 %441, %443
  store i64 %444, ptr %13, align 8, !tbaa !38
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #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 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %151, !llvm.loop !63

445:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %446

446:                                              ; preds = %445
  %447 = load i32, ptr %12, align 4, !tbaa !26
  %448 = add i32 %447, 1
  store i32 %448, ptr %12, align 4, !tbaa !26
  br label %140, !llvm.loop !64

449:                                              ; preds = %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  store i32 0, ptr %4, align 4
  br label %450

450:                                              ; preds = %449, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  %451 = load i32, ptr %4, align 4
  switch i32 %451, label %453 [
    i32 0, label %452
    i32 1, label %452
  ]

452:                                              ; preds = %450, %450
  ret void

453:                                              ; preds = %450
  unreachable
}

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

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

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

declare void @b2SetBitCountAndClear(ptr noundef, i32 noundef) #2

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

; Function Attrs: nounwind uwtable
declare hidden void @b2SensorTask(i32 noundef, i32 noundef, i32 noundef, ptr noundef) #4

declare void @b2InPlaceUnion(ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @b2CTZ64(i64 noundef) #5

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

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

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

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

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

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


; 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.b2SensorTaskContext = type { %struct.b2BitSet }
%struct.b2BitSet = type { ptr, i32, i32 }
%struct.b2ShapeRef = type { i32, i16 }
%struct.b2SensorEndTouchEventArray = type { ptr, i32, i32 }

@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @b2OverlapSensors(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 1288
  %3 = getelementptr inbounds i8, ptr %0, i64 1296
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = icmp eq i32 %4, 0
  br i1 %5, label %.loopexit, label %6

6:                                                ; preds = %1
  %7 = getelementptr inbounds i8, ptr %0, i64 1736
  %8 = load i32, ptr %7, align 8, !tbaa !25
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %10

10:                                               ; preds = %6
  %11 = tail call i32 @b2InternalAssertFcn(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 223) #5
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %13, label %12

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

13:                                               ; preds = %10
  %.pre = load i32, ptr %7, align 8, !tbaa !25
  %14 = icmp sgt i32 %.pre, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %6, %13
  %15 = getelementptr inbounds i8, ptr %0, i64 1320
  br label %24

._crit_edge:                                      ; preds = %24, %13
  %16 = getelementptr inbounds i8, ptr %0, i64 1744
  %17 = load ptr, ptr %16, align 8, !tbaa !26
  %18 = getelementptr inbounds i8, ptr %0, i64 1760
  %19 = load ptr, ptr %18, align 8, !tbaa !27
  %20 = tail call ptr %17(ptr noundef nonnull @b2SensorTask, i32 noundef %4, i32 noundef 16, ptr noundef nonnull %0, ptr noundef %19) #5
  %21 = getelementptr inbounds i8, ptr %0, i64 1792
  %22 = load i32, ptr %21, align 8, !tbaa !28
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr %21, align 8, !tbaa !28
  %.not206 = icmp eq ptr %20, null
  br i1 %.not206, label %34, label %30

24:                                               ; preds = %.lr.ph, %24
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %24 ]
  %25 = load ptr, ptr %15, align 8, !tbaa !29
  %26 = getelementptr inbounds %struct.b2SensorTaskContext, ptr %25, i64 %indvars.iv
  tail call void @b2SetBitCountAndClear(ptr noundef %26, i32 noundef %4) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %27 = load i32, ptr %7, align 8, !tbaa !25
  %28 = sext i32 %27 to i64
  %29 = icmp slt i64 %indvars.iv.next, %28
  br i1 %29, label %24, label %._crit_edge, !llvm.loop !30

30:                                               ; preds = %._crit_edge
  %31 = getelementptr inbounds i8, ptr %0, i64 1752
  %32 = load ptr, ptr %31, align 8, !tbaa !32
  %33 = load ptr, ptr %18, align 8, !tbaa !27
  tail call void %32(ptr noundef nonnull %20, ptr noundef %33) #5
  br label %34

34:                                               ; preds = %30, %._crit_edge
  %35 = getelementptr inbounds i8, ptr %0, i64 1320
  %36 = load ptr, ptr %35, align 8, !tbaa !29
  %37 = load i32, ptr %7, align 8, !tbaa !25
  %38 = icmp sgt i32 %37, 1
  br i1 %38, label %.lr.ph212, label %._crit_edge213

._crit_edge213:                                   ; preds = %.lr.ph212, %34
  %39 = load ptr, ptr %36, align 8, !tbaa !33
  %40 = getelementptr inbounds i8, ptr %36, i64 12
  %41 = load i32, ptr %40, align 4, !tbaa !34
  %.not232 = icmp eq i32 %41, 0
  br i1 %.not232, label %.loopexit, label %.lr.ph231

.lr.ph231:                                        ; preds = %._crit_edge213
  %42 = getelementptr inbounds i8, ptr %0, i64 1256
  %43 = getelementptr inbounds i8, ptr %0, i64 1796
  %44 = getelementptr inbounds i8, ptr %0, i64 1352
  %45 = getelementptr inbounds i8, ptr %0, i64 1384
  %46 = getelementptr inbounds i8, ptr %0, i64 1448
  %wide.trip.count248 = zext i32 %41 to i64
  br label %52

.lr.ph212:                                        ; preds = %34, %.lr.ph212
  %indvars.iv234 = phi i64 [ %indvars.iv.next235, %.lr.ph212 ], [ 1, %34 ]
  %47 = load ptr, ptr %35, align 8, !tbaa !29
  %48 = getelementptr inbounds %struct.b2SensorTaskContext, ptr %47, i64 %indvars.iv234
  tail call void @b2InPlaceUnion(ptr noundef %36, ptr noundef nonnull %48) #5
  %indvars.iv.next235 = add nuw nsw i64 %indvars.iv234, 1
  %49 = load i32, ptr %7, align 8, !tbaa !25
  %50 = sext i32 %49 to i64
  %51 = icmp slt i64 %indvars.iv.next235, %50
  br i1 %51, label %.lr.ph212, label %._crit_edge213, !llvm.loop !35

52:                                               ; preds = %.lr.ph231, %._crit_edge228
  %indvars.iv245 = phi i64 [ 0, %.lr.ph231 ], [ %indvars.iv.next246, %._crit_edge228 ]
  %53 = getelementptr inbounds i64, ptr %39, i64 %indvars.iv245
  %54 = load i64, ptr %53, align 8, !tbaa !36
  %.not207224 = icmp eq i64 %54, 0
  br i1 %.not207224, label %._crit_edge228, label %.lr.ph227

.lr.ph227:                                        ; preds = %52
  %55 = trunc nuw i64 %indvars.iv245 to i32
  %56 = shl i32 %55, 6
  br label %57

57:                                               ; preds = %.lr.ph227, %._crit_edge223
  %.0193225 = phi i64 [ %54, %.lr.ph227 ], [ %153, %._crit_edge223 ]
  %58 = tail call i32 @b2CTZ64(i64 noundef %.0193225)
  %59 = add i32 %58, %56
  %60 = tail call ptr @b2SensorArray_Get(ptr noundef nonnull %2, i32 noundef %59)
  %61 = getelementptr inbounds i8, ptr %60, i64 32
  %62 = load i32, ptr %61, align 8, !tbaa !37
  %63 = tail call ptr @b2ShapeArray_Get(ptr noundef nonnull %42, i32 noundef %62)
  %64 = load i32, ptr %61, align 8, !tbaa !37
  %65 = add nsw i32 %64, 1
  %66 = load i16, ptr %43, align 4, !tbaa !39
  %67 = getelementptr inbounds i8, ptr %63, i64 276
  %68 = load i16, ptr %67, align 4, !tbaa !40
  %69 = getelementptr inbounds i8, ptr %60, i64 8
  %70 = load i32, ptr %69, align 8, !tbaa !44
  %71 = getelementptr inbounds i8, ptr %60, i64 16
  %72 = getelementptr inbounds i8, ptr %60, i64 24
  %73 = load i32, ptr %72, align 8, !tbaa !45
  %74 = load ptr, ptr %60, align 8, !tbaa !46
  %75 = load ptr, ptr %71, align 8, !tbaa !47
  %76 = icmp sgt i32 %70, 0
  %77 = icmp sgt i32 %73, 0
  %78 = select i1 %76, i1 %77, i1 false
  br i1 %78, label %.lr.ph217, label %.preheader208

.lr.ph217:                                        ; preds = %57
  %.sroa.10.0.insert.ext110 = zext i16 %68 to i64
  %.sroa.10.0.insert.shift111 = shl nuw i64 %.sroa.10.0.insert.ext110, 48
  %.sroa.9.0.insert.ext90 = zext i16 %66 to i64
  %.sroa.9.0.insert.shift91 = shl nuw nsw i64 %.sroa.9.0.insert.ext90, 32
  %.sroa.070.0.insert.ext74 = zext i32 %65 to i64
  %.sroa.9.0.insert.insert93 = or disjoint i64 %.sroa.9.0.insert.shift91, %.sroa.070.0.insert.ext74
  %.sroa.070.0.insert.insert76 = or disjoint i64 %.sroa.9.0.insert.insert93, %.sroa.10.0.insert.shift111
  br label %81

.preheader208:                                    ; preds = %129, %57
  %.0195.lcssa = phi i32 [ 0, %57 ], [ %.1196, %129 ]
  %.0194.lcssa = phi i32 [ 0, %57 ], [ %.1, %129 ]
  %79 = icmp slt i32 %.0194.lcssa, %70
  br i1 %79, label %.lr.ph220, label %.preheader

.lr.ph220:                                        ; preds = %.preheader208
  %.sroa.10.0.insert.ext106 = zext i16 %68 to i64
  %.sroa.10.0.insert.shift107 = shl nuw i64 %.sroa.10.0.insert.ext106, 48
  %.sroa.9.0.insert.ext86 = zext i16 %66 to i64
  %.sroa.9.0.insert.shift87 = shl nuw nsw i64 %.sroa.9.0.insert.ext86, 32
  %.sroa.070.0.insert.ext71 = zext i32 %65 to i64
  %.sroa.9.0.insert.insert89 = or disjoint i64 %.sroa.9.0.insert.shift87, %.sroa.070.0.insert.ext71
  %.sroa.070.0.insert.insert73 = or disjoint i64 %.sroa.9.0.insert.insert89, %.sroa.10.0.insert.shift107
  %80 = sext i32 %.0194.lcssa to i64
  %wide.trip.count = sext i32 %70 to i64
  br label %135

81:                                               ; preds = %.lr.ph217, %129
  %.0194215 = phi i32 [ 0, %.lr.ph217 ], [ %.1, %129 ]
  %.0195214 = phi i32 [ 0, %.lr.ph217 ], [ %.1196, %129 ]
  %82 = sext i32 %.0194215 to i64
  %83 = getelementptr inbounds %struct.b2ShapeRef, ptr %74, i64 %82
  %84 = sext i32 %.0195214 to i64
  %85 = getelementptr inbounds %struct.b2ShapeRef, ptr %75, i64 %84
  %86 = load i32, ptr %83, align 4, !tbaa !48
  %87 = load i32, ptr %85, align 4, !tbaa !48
  %88 = icmp eq i32 %86, %87
  br i1 %88, label %89, label %111

89:                                               ; preds = %81
  %90 = getelementptr inbounds i8, ptr %83, i64 4
  %91 = load i16, ptr %90, align 4, !tbaa !50
  %92 = getelementptr inbounds i8, ptr %85, i64 4
  %93 = load i16, ptr %92, align 4, !tbaa !50
  %94 = icmp ult i16 %91, %93
  br i1 %94, label %95, label %102

95:                                               ; preds = %89
  %96 = add nsw i32 %86, 1
  %97 = load i16, ptr %43, align 4, !tbaa !39
  %.sroa.530.0.insert.ext = zext i16 %91 to i64
  %.sroa.530.0.insert.shift = shl nuw i64 %.sroa.530.0.insert.ext, 48
  %.sroa.429.0.insert.ext = zext i16 %97 to i64
  %.sroa.429.0.insert.shift = shl nuw nsw i64 %.sroa.429.0.insert.ext, 32
  %.sroa.028.0.insert.ext = zext i32 %96 to i64
  %.sroa.429.0.insert.insert = or disjoint i64 %.sroa.530.0.insert.shift, %.sroa.028.0.insert.ext
  %.sroa.028.0.insert.insert = or disjoint i64 %.sroa.429.0.insert.insert, %.sroa.429.0.insert.shift
  %98 = load i32, ptr %46, align 8, !tbaa !51
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [2 x %struct.b2SensorEndTouchEventArray], ptr %45, i64 0, i64 %99
  tail call void @b2SensorEndTouchEventArray_Push(ptr noundef nonnull %100, i64 %.sroa.070.0.insert.insert76, i64 %.sroa.028.0.insert.insert)
  %101 = add nsw i32 %.0194215, 1
  br label %129

102:                                              ; preds = %89
  %103 = icmp ugt i16 %91, %93
  br i1 %103, label %104, label %108

104:                                              ; preds = %102
  %105 = add nsw i32 %86, 1
  %106 = load i16, ptr %43, align 4, !tbaa !39
  %.sroa.525.0.insert.ext = zext i16 %93 to i64
  %.sroa.525.0.insert.shift = shl nuw i64 %.sroa.525.0.insert.ext, 48
  %.sroa.424.0.insert.ext = zext i16 %106 to i64
  %.sroa.424.0.insert.shift = shl nuw nsw i64 %.sroa.424.0.insert.ext, 32
  %.sroa.023.0.insert.ext = zext i32 %105 to i64
  %.sroa.424.0.insert.insert = or disjoint i64 %.sroa.525.0.insert.shift, %.sroa.023.0.insert.ext
  %.sroa.023.0.insert.insert = or disjoint i64 %.sroa.424.0.insert.insert, %.sroa.424.0.insert.shift
  tail call void @b2SensorBeginTouchEventArray_Push(ptr noundef nonnull %44, i64 %.sroa.070.0.insert.insert76, i64 %.sroa.023.0.insert.insert)
  %107 = add nsw i32 %.0195214, 1
  br label %129

108:                                              ; preds = %102
  %109 = add nsw i32 %.0194215, 1
  %110 = add nsw i32 %.0195214, 1
  br label %129

111:                                              ; preds = %81
  %112 = icmp slt i32 %86, %87
  %113 = load i16, ptr %43, align 4, !tbaa !39
  %.sroa.419.0.insert.ext = zext i16 %113 to i64
  %.sroa.419.0.insert.shift = shl nuw nsw i64 %.sroa.419.0.insert.ext, 32
  br i1 %112, label %114, label %123

114:                                              ; preds = %111
  %115 = add nsw i32 %86, 1
  %116 = getelementptr inbounds i8, ptr %83, i64 4
  %117 = load i16, ptr %116, align 4, !tbaa !50
  %.sroa.520.0.insert.ext = zext i16 %117 to i64
  %.sroa.520.0.insert.shift = shl nuw i64 %.sroa.520.0.insert.ext, 48
  %.sroa.018.0.insert.ext = zext i32 %115 to i64
  %118 = or disjoint i64 %.sroa.520.0.insert.shift, %.sroa.018.0.insert.ext
  %.sroa.018.0.insert.insert = or disjoint i64 %118, %.sroa.419.0.insert.shift
  %119 = load i32, ptr %46, align 8, !tbaa !51
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [2 x %struct.b2SensorEndTouchEventArray], ptr %45, i64 0, i64 %120
  tail call void @b2SensorEndTouchEventArray_Push(ptr noundef nonnull %121, i64 %.sroa.070.0.insert.insert76, i64 %.sroa.018.0.insert.insert)
  %122 = add nsw i32 %.0194215, 1
  br label %129

123:                                              ; preds = %111
  %124 = add nsw i32 %87, 1
  %125 = getelementptr inbounds i8, ptr %85, i64 4
  %126 = load i16, ptr %125, align 4, !tbaa !50
  %.sroa.515.0.insert.ext = zext i16 %126 to i64
  %.sroa.515.0.insert.shift = shl nuw i64 %.sroa.515.0.insert.ext, 48
  %.sroa.013.0.insert.ext = zext i32 %124 to i64
  %127 = or disjoint i64 %.sroa.515.0.insert.shift, %.sroa.013.0.insert.ext
  %.sroa.013.0.insert.insert = or disjoint i64 %127, %.sroa.419.0.insert.shift
  tail call void @b2SensorBeginTouchEventArray_Push(ptr noundef nonnull %44, i64 %.sroa.070.0.insert.insert76, i64 %.sroa.013.0.insert.insert)
  %128 = add nsw i32 %.0195214, 1
  br label %129

129:                                              ; preds = %114, %123, %95, %108, %104
  %.1196 = phi i32 [ %.0195214, %95 ], [ %107, %104 ], [ %110, %108 ], [ %.0195214, %114 ], [ %128, %123 ]
  %.1 = phi i32 [ %101, %95 ], [ %.0194215, %104 ], [ %109, %108 ], [ %122, %114 ], [ %.0194215, %123 ]
  %130 = icmp slt i32 %.1, %70
  %131 = icmp slt i32 %.1196, %73
  %132 = select i1 %130, i1 %131, i1 false
  br i1 %132, label %81, label %.preheader208, !llvm.loop !52

.preheader:                                       ; preds = %135, %.preheader208
  %133 = icmp slt i32 %.0195.lcssa, %73
  br i1 %133, label %.lr.ph222, label %._crit_edge223

.lr.ph222:                                        ; preds = %.preheader
  %.sroa.10.0.insert.ext = zext i16 %68 to i64
  %.sroa.10.0.insert.shift = shl nuw i64 %.sroa.10.0.insert.ext, 48
  %.sroa.9.0.insert.ext = zext i16 %66 to i64
  %.sroa.9.0.insert.shift = shl nuw nsw i64 %.sroa.9.0.insert.ext, 32
  %.sroa.070.0.insert.ext = zext i32 %65 to i64
  %.sroa.9.0.insert.insert = or disjoint i64 %.sroa.9.0.insert.shift, %.sroa.070.0.insert.ext
  %.sroa.070.0.insert.insert = or disjoint i64 %.sroa.9.0.insert.insert, %.sroa.10.0.insert.shift
  %134 = sext i32 %.0195.lcssa to i64
  %wide.trip.count243 = sext i32 %73 to i64
  br label %145

135:                                              ; preds = %.lr.ph220, %135
  %indvars.iv237 = phi i64 [ %80, %.lr.ph220 ], [ %indvars.iv.next238, %135 ]
  %136 = getelementptr inbounds %struct.b2ShapeRef, ptr %74, i64 %indvars.iv237
  %137 = load i32, ptr %136, align 4, !tbaa !48
  %138 = add nsw i32 %137, 1
  %139 = load i16, ptr %43, align 4, !tbaa !39
  %140 = getelementptr inbounds i8, ptr %136, i64 4
  %141 = load i16, ptr %140, align 4, !tbaa !50
  %.sroa.58.0.insert.ext = zext i16 %141 to i64
  %.sroa.58.0.insert.shift = shl nuw i64 %.sroa.58.0.insert.ext, 48
  %.sroa.47.0.insert.ext = zext i16 %139 to i64
  %.sroa.47.0.insert.shift = shl nuw nsw i64 %.sroa.47.0.insert.ext, 32
  %.sroa.06.0.insert.ext = zext i32 %138 to i64
  %.sroa.47.0.insert.insert = or disjoint i64 %.sroa.47.0.insert.shift, %.sroa.06.0.insert.ext
  %.sroa.06.0.insert.insert = or disjoint i64 %.sroa.47.0.insert.insert, %.sroa.58.0.insert.shift
  %142 = load i32, ptr %46, align 8, !tbaa !51
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [2 x %struct.b2SensorEndTouchEventArray], ptr %45, i64 0, i64 %143
  tail call void @b2SensorEndTouchEventArray_Push(ptr noundef nonnull %144, i64 %.sroa.070.0.insert.insert73, i64 %.sroa.06.0.insert.insert)
  %indvars.iv.next238 = add nsw i64 %indvars.iv237, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next238, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %135, !llvm.loop !53

145:                                              ; preds = %.lr.ph222, %145
  %indvars.iv240 = phi i64 [ %134, %.lr.ph222 ], [ %indvars.iv.next241, %145 ]
  %146 = getelementptr inbounds %struct.b2ShapeRef, ptr %75, i64 %indvars.iv240
  %147 = load i32, ptr %146, align 4, !tbaa !48
  %148 = add nsw i32 %147, 1
  %149 = load i16, ptr %43, align 4, !tbaa !39
  %150 = getelementptr inbounds i8, ptr %146, i64 4
  %151 = load i16, ptr %150, align 4, !tbaa !50
  %.sroa.5.0.insert.ext = zext i16 %151 to i64
  %.sroa.5.0.insert.shift = shl nuw i64 %.sroa.5.0.insert.ext, 48
  %.sroa.42.0.insert.ext = zext i16 %149 to i64
  %.sroa.42.0.insert.shift = shl nuw nsw i64 %.sroa.42.0.insert.ext, 32
  %.sroa.01.0.insert.ext = zext i32 %148 to i64
  %.sroa.42.0.insert.insert = or disjoint i64 %.sroa.42.0.insert.shift, %.sroa.01.0.insert.ext
  %.sroa.01.0.insert.insert = or disjoint i64 %.sroa.42.0.insert.insert, %.sroa.5.0.insert.shift
  tail call void @b2SensorBeginTouchEventArray_Push(ptr noundef nonnull %44, i64 %.sroa.070.0.insert.insert, i64 %.sroa.01.0.insert.insert)
  %indvars.iv.next241 = add nsw i64 %indvars.iv240, 1
  %exitcond244.not = icmp eq i64 %indvars.iv.next241, %wide.trip.count243
  br i1 %exitcond244.not, label %._crit_edge223, label %145, !llvm.loop !54

._crit_edge223:                                   ; preds = %145, %.preheader
  %152 = add i64 %.0193225, -1
  %153 = and i64 %152, %.0193225
  %.not207 = icmp eq i64 %153, 0
  br i1 %.not207, label %._crit_edge228, label %57, !llvm.loop !55

._crit_edge228:                                   ; preds = %._crit_edge223, %52
  %indvars.iv.next246 = add nuw nsw i64 %indvars.iv245, 1
  %exitcond249.not = icmp eq i64 %indvars.iv.next246, %wide.trip.count248
  br i1 %exitcond249.not, label %.loopexit, label %52, !llvm.loop !56

.loopexit:                                        ; preds = %._crit_edge228, %._crit_edge213, %1
  ret void
}

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

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @b2CTZ64(i64 noundef) local_unnamed_addr #4

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

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

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

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

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

!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, !11, i64 1296}
!6 = !{!"b2World", !7, i64 0, !13, i64 40, !16, i64 336, !17, i64 1008, !12, i64 1032, !17, i64 1048, !12, i64 1072, !17, i64 1088, !12, i64 1112, !17, i64 1128, !12, i64 1152, !17, i64 1168, !12, i64 1192, !17, i64 1208, !17, i64 1232, !12, i64 1256, !12, i64 1272, !12, i64 1288, !12, i64 1304, !12, i64 1320, !12, i64 1336, !12, i64 1352, !12, i64 1368, !9, i64 1384, !9, i64 1416, !11, i64 1448, !12, i64 1456, !18, i64 1472, !18, i64 1488, !18, i64 1504, !18, i64 1520, !19, i64 1536, !11, i64 1544, !20, i64 1548, !21, i64 1556, !21, i64 1560, !21, i64 1564, !21, i64 1568, !21, i64 1572, !21, i64 1576, !21, i64 1580, !21, i64 1584, !8, i64 1592, !8, i64 1600, !22, i64 1608, !23, i64 1612, !8, i64 1704, !8, i64 1712, !8, i64 1720, !8, i64 1728, !11, i64 1736, !8, i64 1744, !8, i64 1752, !8, i64 1760, !8, i64 1768, !8, i64 1776, !21, i64 1784, !11, i64 1788, !11, i64 1792, !22, i64 1796, !24, i64 1798, !24, i64 1799, !24, i64 1800, !24, i64 1801, !24, i64 1802, !24, i64 1803}
!7 = !{!"b2ArenaAllocator", !8, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !12, i64 24}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"", !8, i64 0, !11, i64 8, !11, i64 12}
!13 = !{!"b2BroadPhase", !9, i64 0, !11, i64 216, !14, i64 224, !12, i64 240, !8, i64 256, !8, i64 264, !11, i64 272, !15, i64 276, !14, i64 280}
!14 = !{!"b2HashSet", !8, i64 0, !11, i64 8, !11, i64 12}
!15 = !{!"b2AtomicInt", !11, i64 0}
!16 = !{!"b2ConstraintGraph", !9, i64 0}
!17 = !{!"b2IdPool", !12, i64 0, !11, i64 16}
!18 = !{!"b2BitSet", !8, i64 0, !11, i64 8, !11, i64 12}
!19 = !{!"long", !9, i64 0}
!20 = !{!"b2Vec2", !21, i64 0, !21, i64 4}
!21 = !{!"float", !9, i64 0}
!22 = !{!"short", !9, i64 0}
!23 = !{!"b2Profile", !21, i64 0, !21, i64 4, !21, i64 8, !21, i64 12, !21, i64 16, !21, i64 20, !21, i64 24, !21, i64 28, !21, i64 32, !21, i64 36, !21, i64 40, !21, i64 44, !21, i64 48, !21, i64 52, !21, i64 56, !21, i64 60, !21, i64 64, !21, i64 68, !21, i64 72, !21, i64 76, !21, i64 80, !21, i64 84}
!24 = !{!"_Bool", !9, i64 0}
!25 = !{!6, !11, i64 1736}
!26 = !{!6, !8, i64 1744}
!27 = !{!6, !8, i64 1760}
!28 = !{!6, !11, i64 1792}
!29 = !{!6, !8, i64 1320}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!6, !8, i64 1752}
!33 = !{!18, !8, i64 0}
!34 = !{!18, !11, i64 12}
!35 = distinct !{!35, !31}
!36 = !{!19, !19, i64 0}
!37 = !{!38, !11, i64 32}
!38 = !{!"b2Sensor", !12, i64 0, !12, i64 16, !11, i64 32}
!39 = !{!6, !22, i64 1796}
!40 = !{!41, !22, i64 276}
!41 = !{!"b2Shape", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !21, i64 24, !21, i64 28, !21, i64 32, !21, i64 36, !21, i64 40, !11, i64 44, !42, i64 48, !42, i64 64, !20, i64 80, !11, i64 88, !43, i64 96, !8, i64 120, !11, i64 128, !9, i64 132, !22, i64 276, !24, i64 278, !24, i64 279, !24, i64 280, !24, i64 281, !24, i64 282}
!42 = !{!"b2AABB", !20, i64 0, !20, i64 8}
!43 = !{!"b2Filter", !19, i64 0, !19, i64 8, !11, i64 16}
!44 = !{!38, !11, i64 8}
!45 = !{!38, !11, i64 24}
!46 = !{!38, !8, i64 0}
!47 = !{!38, !8, i64 16}
!48 = !{!49, !11, i64 0}
!49 = !{!"b2ShapeRef", !11, i64 0, !22, i64 4}
!50 = !{!49, !22, i64 4}
!51 = !{!6, !11, i64 1448}
!52 = distinct !{!52, !31}
!53 = distinct !{!53, !31}
!54 = distinct !{!54, !31}
!55 = distinct !{!55, !31}
!56 = distinct !{!56, !31}


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