; LLVM IR from mtsamis/box2d-optimized :: src/dynamics/b2_world.ll (ZN7b2World8SolveTOIERK10b2TimeStep)

; 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"

%class.b2Island = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32 }
%class.b2TOIMinHeap = type { i32, i32, ptr }
%struct.b2TOIQueryWrapper = type { ptr, ptr, ptr }
%struct.b2Sweep = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float }
%struct.b2Vec2 = type { float, float }
%struct.b2TimeStep = type { float, float, float, i32, i32, i32, i8 }
%class.b2World = type { %class.b2BlockAllocator, %class.b2StackAllocator, %class.b2ContactManager, ptr, ptr, ptr, ptr, i32, i32, %struct.b2Vec2, i8, ptr, ptr, float, i8, i8, i8, i8, i8, i8, i8, i8, %struct.b2Profile }
%class.b2BlockAllocator = type { ptr, i32, i32, [14 x ptr] }
%class.b2StackAllocator = type <{ [102400 x i8], i32, i32, i32, [4 x i8], [32 x %struct.b2StackEntry], i32, [4 x i8] }>
%struct.b2StackEntry = type { ptr, i32, i8 }
%class.b2ContactManager = type { %class.b2BroadPhase, i32, ptr, ptr, ptr, ptr }
%class.b2BroadPhase = type <{ ptr, ptr, ptr, ptr, %struct.b2TreeNode, ptr, ptr, ptr, i32, i32, %class.b2IntHashTable, i32, i32, i8, [7 x i8] }>
%struct.b2TreeNode = type { ptr, ptr, ptr, ptr, %struct.b2AABB }
%struct.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%class.b2IntHashTable = type <{ ptr, i32, [4 x i8] }>
%struct.b2Profile = type { float, float, float, float, float }
%class.b2Body = type { i32, i16, i32, %struct.b2Transform, %struct.b2Transform, %struct.b2Sweep, %struct.b2Vec2, float, %struct.b2Vec2, float, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, float, float, float, float, float, float, float, float, %struct.b2BodyUserData }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Rot = type { float, float }
%struct.b2BodyUserData = type { i64 }
%class.b2Contact = type { ptr, ptr, ptr, ptr, ptr, %struct.b2Manifold, i32, i32, float, float, float, float }
%struct.b2Manifold = type { [2 x %struct.b2ManifoldPoint], %struct.b2Vec2, %struct.b2Vec2, i32, i32 }
%struct.b2ManifoldPoint = type { %struct.b2Vec2, float, float, %union.b2ContactID }
%union.b2ContactID = type { i32 }
%struct.b2HeapNode = type { float, i32, ptr }
%class.b2Fixture = type <{ float, [4 x i8], ptr, ptr, ptr, %struct.b2AABB, float, float, float, %struct.b2Filter, i8, [5 x i8], %struct.b2FixtureUserData, i32, [4 x i8] }>
%struct.b2Filter = type { i16, i16, i16 }
%struct.b2FixtureUserData = type { i64 }

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7b2World18RemoveDeadContactsEv(ptr noundef nonnull align 8 dereferenceable(103352)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6b2Body15GetContactCountEv(ptr noundef nonnull align 8 dereferenceable(208)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6b2Body10GetContactEi(ptr noundef nonnull align 8 dereferenceable(208), i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9b2Contact11GetFixtureAEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9b2Contact11GetFixtureBEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6b2Body8SetAwakeEb(ptr noundef nonnull align 8 dereferenceable(208), i1 noundef zeroext) #4 align 2

declare void @_ZN8b2IslandC1EiiiP16b2StackAllocatorP17b2ContactListener(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8b2Island5ClearEv(ptr noundef nonnull align 8 dereferenceable(80)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8b2Island3AddEP6b2Body(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9b2Contact9IsEnabledEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9b2Contact10IsTouchingEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8b2Island3AddEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) #6 align 2

; Function Attrs: nounwind
declare void @_ZN8b2IslandD1Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN12b2TOIMinHeap7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(16)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN12b2TOIMinHeap3MinEv(ptr noundef nonnull align 8 dereferenceable(16)) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12b2TOIMinHeap6InsertEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #2 align 2

declare noundef float @_ZN9b2Contact12CalculateTOIEv(ptr noundef nonnull align 8 dereferenceable(128)) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12b2TOIMinHeap6UpdateEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12b2TOIMinHeap5BuildEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7b2World8SolveTOIERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(103352) %0, ptr noundef nonnull align 4 dereferenceable(28) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.b2Island, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %class.b2TOIMinHeap, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca float, align 4
  %14 = alloca %struct.b2TOIQueryWrapper, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca float, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %struct.b2Sweep, align 4
  %24 = alloca %struct.b2Sweep, align 4
  %25 = alloca [2 x ptr], align 16
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca i8, align 1
  %34 = alloca i8, align 1
  %35 = alloca %struct.b2Sweep, align 4
  %36 = alloca %struct.b2TimeStep, align 4
  %37 = alloca i32, align 4
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca i32, align 4
  %41 = alloca ptr, align 8
  %42 = alloca i32, align 4
  %43 = alloca ptr, align 8
  %44 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %45 = load ptr, ptr %3, align 8
  %46 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 2
  %47 = getelementptr inbounds %class.b2ContactManager, ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 8, !tbaa !9
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %51

50:                                               ; preds = %2
  br label %740

51:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 80, ptr %5) #9
  %52 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 1
  %53 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 2
  %54 = getelementptr inbounds %class.b2ContactManager, ptr %53, i32 0, i32 3
  %55 = load ptr, ptr %54, align 8, !tbaa !23
  call void @_ZN8b2IslandC1EiiiP16b2StackAllocatorP17b2ContactListener(ptr noundef nonnull align 8 dereferenceable(80) %5, i32 noundef 64, i32 noundef 32, i32 noundef 0, ptr noundef %52, ptr noundef %55)
  %56 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 21
  %57 = load i8, ptr %56, align 1, !tbaa !24, !range !25, !noundef !26
  %58 = trunc i8 %57 to i1
  br i1 %58, label %59, label %107

59:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  %60 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 3
  %61 = load ptr, ptr %60, align 8, !tbaa !27
  store ptr %61, ptr %6, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %76, %59
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = icmp ne ptr %63, null
  br i1 %64, label %66, label %65

65:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  br label %80

66:                                               ; preds = %62
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %class.b2Body, ptr %67, i32 0, i32 1
  %69 = load i16, ptr %68, align 4, !tbaa !28
  %70 = zext i16 %69 to i32
  %71 = and i32 %70, -2
  %72 = trunc i32 %71 to i16
  store i16 %72, ptr %68, align 4, !tbaa !28
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %class.b2Body, ptr %73, i32 0, i32 5
  %75 = getelementptr inbounds %struct.b2Sweep, ptr %74, i32 0, i32 5
  store float 0.000000e+00, ptr %75, align 4, !tbaa !37
  br label %76

76:                                               ; preds = %66
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %class.b2Body, ptr %77, i32 0, i32 12
  %79 = load ptr, ptr %78, align 8, !tbaa !38
  store ptr %79, ptr %6, align 8, !tbaa !5
  br label %62, !llvm.loop !39

80:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  %81 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 2
  %82 = invoke noundef ptr @_ZNK16b2ContactManager5StartEv(ptr noundef nonnull align 8 dereferenceable(184) %81)
          to label %83 unwind label %91

83:                                               ; preds = %80
  store ptr %82, ptr %7, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %105, %83
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 2
  %87 = invoke noundef ptr @_ZNK16b2ContactManager3EndEv(ptr noundef nonnull align 8 dereferenceable(184) %86)
          to label %88 unwind label %91

88:                                               ; preds = %84
  %89 = icmp ne ptr %85, %87
  br i1 %89, label %95, label %90

90:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %106

91:                                               ; preds = %102, %84, %80
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %8, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %748

95:                                               ; preds = %88
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = getelementptr inbounds %class.b2Contact, ptr %96, i32 0, i32 6
  %98 = load i32, ptr %97, align 8, !tbaa !41
  %99 = and i32 %98, -2
  store i32 %99, ptr %97, align 8, !tbaa !41
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = getelementptr inbounds %class.b2Contact, ptr %100, i32 0, i32 7
  store i32 -1, ptr %101, align 4, !tbaa !45
  br label %102

102:                                              ; preds = %95
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = invoke noundef ptr @_ZN9b2Contact7GetNextEv(ptr noundef nonnull align 8 dereferenceable(128) %103)
          to label %105 unwind label %91

105:                                              ; preds = %102
  store ptr %104, ptr %7, align 8, !tbaa !5
  br label %84, !llvm.loop !46

106:                                              ; preds = %90
  br label %107

107:                                              ; preds = %106, %51
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #9
  %108 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 2
  %109 = getelementptr inbounds %class.b2ContactManager, ptr %108, i32 0, i32 1
  %110 = load i32, ptr %109, align 8, !tbaa !9
  %111 = mul nsw i32 %110, 3
  %112 = sdiv i32 %111, 2
  invoke void @_ZN12b2TOIMinHeapC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %112)
          to label %113 unwind label %124

113:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 0, ptr %11, align 4, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %114 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 2
  %115 = invoke noundef ptr @_ZNK16b2ContactManager5StartEv(ptr noundef nonnull align 8 dereferenceable(184) %114)
          to label %116 unwind label %128

116:                                              ; preds = %113
  store ptr %115, ptr %12, align 8, !tbaa !5
  br label %117

117:                                              ; preds = %168, %116
  %118 = load ptr, ptr %12, align 8, !tbaa !5
  %119 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 2
  %120 = invoke noundef ptr @_ZNK16b2ContactManager3EndEv(ptr noundef nonnull align 8 dereferenceable(184) %119)
          to label %121 unwind label %128

121:                                              ; preds = %117
  %122 = icmp ne ptr %118, %120
  br i1 %122, label %132, label %123

123:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %170

124:                                              ; preds = %107
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %8, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %9, align 4
  br label %747

128:                                              ; preds = %165, %132, %117, %113
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %8, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %9, align 4
  br label %169

132:                                              ; preds = %121
  %133 = load ptr, ptr %12, align 8, !tbaa !5
  %134 = invoke noundef zeroext i1 @_ZNK9b2Contact9IsEnabledEv(ptr noundef nonnull align 8 dereferenceable(128) %133)
          to label %135 unwind label %128

135:                                              ; preds = %132
  br i1 %134, label %136, label %164

136:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %137 = load ptr, ptr %12, align 8, !tbaa !5
  %138 = invoke noundef float @_ZN9b2Contact12CalculateTOIEv(ptr noundef nonnull align 8 dereferenceable(128) %137)
          to label %139 unwind label %159

139:                                              ; preds = %136
  store float %138, ptr %13, align 4, !tbaa !48
  %140 = load float, ptr %13, align 4, !tbaa !48
  %141 = fcmp olt float %140, 1.000000e+00
  br i1 %141, label %142, label %163

142:                                              ; preds = %139
  %143 = load ptr, ptr %12, align 8, !tbaa !5
  %144 = load i32, ptr %11, align 4, !tbaa !47
  %145 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN12b2TOIMinHeapixEi(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %144)
          to label %146 unwind label %159

146:                                              ; preds = %142
  %147 = getelementptr inbounds %struct.b2HeapNode, ptr %145, i32 0, i32 2
  store ptr %143, ptr %147, align 8, !tbaa !49
  %148 = load float, ptr %13, align 4, !tbaa !48
  %149 = load i32, ptr %11, align 4, !tbaa !47
  %150 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN12b2TOIMinHeapixEi(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %149)
          to label %151 unwind label %159

151:                                              ; preds = %146
  %152 = getelementptr inbounds %struct.b2HeapNode, ptr %150, i32 0, i32 0
  store float %148, ptr %152, align 8, !tbaa !51
  %153 = load i32, ptr %11, align 4, !tbaa !47
  %154 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN12b2TOIMinHeapixEi(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %153)
          to label %155 unwind label %159

155:                                              ; preds = %151
  %156 = getelementptr inbounds %struct.b2HeapNode, ptr %154, i32 0, i32 1
  store i32 0, ptr %156, align 4, !tbaa !52
  %157 = load i32, ptr %11, align 4, !tbaa !47
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %11, align 4, !tbaa !47
  br label %163

159:                                              ; preds = %151, %146, %142, %136
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %8, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %169

163:                                              ; preds = %155, %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %164

164:                                              ; preds = %163, %135
  br label %165

165:                                              ; preds = %164
  %166 = load ptr, ptr %12, align 8, !tbaa !5
  %167 = invoke noundef ptr @_ZN9b2Contact7GetNextEv(ptr noundef nonnull align 8 dereferenceable(128) %166)
          to label %168 unwind label %128

168:                                              ; preds = %165
  store ptr %167, ptr %12, align 8, !tbaa !5
  br label %117, !llvm.loop !53

169:                                              ; preds = %159, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %746

170:                                              ; preds = %123
  %171 = load i32, ptr %11, align 4, !tbaa !47
  %172 = getelementptr inbounds %class.b2TOIMinHeap, ptr %10, i32 0, i32 0
  store i32 %171, ptr %172, align 8, !tbaa !54
  invoke void @_ZN12b2TOIMinHeap5BuildEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %173 unwind label %199

173:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #9
  %174 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 2
  %175 = getelementptr inbounds %struct.b2TOIQueryWrapper, ptr %14, i32 0, i32 1
  store ptr %174, ptr %175, align 8, !tbaa !56
  %176 = getelementptr inbounds %struct.b2TOIQueryWrapper, ptr %14, i32 0, i32 2
  store ptr %10, ptr %176, align 8, !tbaa !58
  br label %177

177:                                              ; preds = %728, %726, %173
  %178 = call noundef zeroext i1 @_ZN12b2TOIMinHeap7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %179 = xor i1 %178, true
  br i1 %179, label %180, label %736

180:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  %181 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12b2TOIMinHeap3MinEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  store ptr %181, ptr %15, align 8, !tbaa !5
  %182 = load ptr, ptr %15, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.b2HeapNode, ptr %182, i32 0, i32 1
  %184 = load i32, ptr %183, align 4, !tbaa !52
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %183, align 4, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %186 = load ptr, ptr %15, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.b2HeapNode, ptr %186, i32 0, i32 2
  %188 = load ptr, ptr %187, align 8, !tbaa !49
  store ptr %188, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  %189 = load ptr, ptr %15, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.b2HeapNode, ptr %189, i32 0, i32 0
  %191 = load float, ptr %190, align 8, !tbaa !51
  store float %191, ptr %17, align 4, !tbaa !48
  %192 = load ptr, ptr %16, align 8, !tbaa !5
  %193 = icmp eq ptr %192, null
  br i1 %193, label %197, label %194

194:                                              ; preds = %180
  %195 = load float, ptr %17, align 4, !tbaa !48
  %196 = fcmp olt float 0x3FEFFFFD80000000, %195
  br i1 %196, label %197, label %203

197:                                              ; preds = %194, %180
  %198 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 21
  store i8 1, ptr %198, align 1, !tbaa !24
  store i32 12, ptr %18, align 4
  br label %726

199:                                              ; preds = %170
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %8, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %9, align 4
  br label %746

203:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %204 = load ptr, ptr %16, align 8, !tbaa !5
  %205 = invoke noundef ptr @_ZN9b2Contact11GetFixtureAEv(ptr noundef nonnull align 8 dereferenceable(128) %204)
          to label %206 unwind label %257

206:                                              ; preds = %203
  store ptr %205, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %207 = load ptr, ptr %16, align 8, !tbaa !5
  %208 = invoke noundef ptr @_ZN9b2Contact11GetFixtureBEv(ptr noundef nonnull align 8 dereferenceable(128) %207)
          to label %209 unwind label %261

209:                                              ; preds = %206
  store ptr %208, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %210 = load ptr, ptr %19, align 8, !tbaa !5
  %211 = invoke noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84) %210)
          to label %212 unwind label %265

212:                                              ; preds = %209
  store ptr %211, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %213 = load ptr, ptr %20, align 8, !tbaa !5
  %214 = invoke noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84) %213)
          to label %215 unwind label %269

215:                                              ; preds = %212
  store ptr %214, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 36, ptr %23) #9
  %216 = load ptr, ptr %21, align 8, !tbaa !5
  %217 = getelementptr inbounds %class.b2Body, ptr %216, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %217, i64 36, i1 false), !tbaa.struct !59
  call void @llvm.lifetime.start.p0(i64 36, ptr %24) #9
  %218 = load ptr, ptr %22, align 8, !tbaa !5
  %219 = getelementptr inbounds %class.b2Body, ptr %218, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %219, i64 36, i1 false), !tbaa.struct !59
  %220 = load ptr, ptr %21, align 8, !tbaa !5
  %221 = load float, ptr %17, align 4, !tbaa !48
  invoke void @_ZN6b2Body7AdvanceEf(ptr noundef nonnull align 8 dereferenceable(208) %220, float noundef %221)
          to label %222 unwind label %273

222:                                              ; preds = %215
  %223 = load ptr, ptr %22, align 8, !tbaa !5
  %224 = load float, ptr %17, align 4, !tbaa !48
  invoke void @_ZN6b2Body7AdvanceEf(ptr noundef nonnull align 8 dereferenceable(208) %223, float noundef %224)
          to label %225 unwind label %273

225:                                              ; preds = %222
  %226 = load ptr, ptr %16, align 8, !tbaa !5
  %227 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 2
  %228 = getelementptr inbounds %class.b2ContactManager, ptr %227, i32 0, i32 3
  %229 = load ptr, ptr %228, align 8, !tbaa !23
  invoke void @_ZN9b2Contact6UpdateEP17b2ContactListener(ptr noundef nonnull align 8 dereferenceable(128) %226, ptr noundef %229)
          to label %230 unwind label %273

230:                                              ; preds = %225
  %231 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZN12b2TOIMinHeap6UpdateEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef %231)
          to label %232 unwind label %273

232:                                              ; preds = %230
  %233 = load ptr, ptr %16, align 8, !tbaa !5
  %234 = invoke noundef zeroext i1 @_ZNK9b2Contact9IsEnabledEv(ptr noundef nonnull align 8 dereferenceable(128) %233)
          to label %235 unwind label %273

235:                                              ; preds = %232
  %236 = zext i1 %234 to i32
  %237 = icmp eq i32 %236, 0
  br i1 %237, label %244, label %238

238:                                              ; preds = %235
  %239 = load ptr, ptr %16, align 8, !tbaa !5
  %240 = invoke noundef zeroext i1 @_ZNK9b2Contact10IsTouchingEv(ptr noundef nonnull align 8 dereferenceable(128) %239)
          to label %241 unwind label %273

241:                                              ; preds = %238
  %242 = zext i1 %240 to i32
  %243 = icmp eq i32 %242, 0
  br i1 %243, label %244, label %277

244:                                              ; preds = %241, %235
  %245 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZN9b2Contact10SetEnabledEb(ptr noundef nonnull align 8 dereferenceable(128) %245, i1 noundef zeroext false)
          to label %246 unwind label %273

246:                                              ; preds = %244
  %247 = load ptr, ptr %21, align 8, !tbaa !5
  %248 = getelementptr inbounds %class.b2Body, ptr %247, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %248, ptr align 4 %23, i64 36, i1 false), !tbaa.struct !59
  %249 = load ptr, ptr %22, align 8, !tbaa !5
  %250 = getelementptr inbounds %class.b2Body, ptr %249, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %250, ptr align 4 %24, i64 36, i1 false), !tbaa.struct !59
  %251 = load ptr, ptr %21, align 8, !tbaa !5
  invoke void @_ZN6b2Body20SynchronizeTransformEv(ptr noundef nonnull align 8 dereferenceable(208) %251)
          to label %252 unwind label %273

252:                                              ; preds = %246
  %253 = load ptr, ptr %22, align 8, !tbaa !5
  invoke void @_ZN6b2Body20SynchronizeTransformEv(ptr noundef nonnull align 8 dereferenceable(208) %253)
          to label %254 unwind label %273

254:                                              ; preds = %252
  %255 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZN12b2TOIMinHeap6UpdateEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef %255)
          to label %256 unwind label %273

256:                                              ; preds = %254
  store i32 11, ptr %18, align 4
  br label %725, !llvm.loop !60

257:                                              ; preds = %203
  %258 = landingpad { ptr, i32 }
          cleanup
  %259 = extractvalue { ptr, i32 } %258, 0
  store ptr %259, ptr %8, align 8
  %260 = extractvalue { ptr, i32 } %258, 1
  store i32 %260, ptr %9, align 4
  br label %735

261:                                              ; preds = %206
  %262 = landingpad { ptr, i32 }
          cleanup
  %263 = extractvalue { ptr, i32 } %262, 0
  store ptr %263, ptr %8, align 8
  %264 = extractvalue { ptr, i32 } %262, 1
  store i32 %264, ptr %9, align 4
  br label %734

265:                                              ; preds = %209
  %266 = landingpad { ptr, i32 }
          cleanup
  %267 = extractvalue { ptr, i32 } %266, 0
  store ptr %267, ptr %8, align 8
  %268 = extractvalue { ptr, i32 } %266, 1
  store i32 %268, ptr %9, align 4
  br label %733

269:                                              ; preds = %212
  %270 = landingpad { ptr, i32 }
          cleanup
  %271 = extractvalue { ptr, i32 } %270, 0
  store ptr %271, ptr %8, align 8
  %272 = extractvalue { ptr, i32 } %270, 1
  store i32 %272, ptr %9, align 4
  br label %732

273:                                              ; preds = %286, %284, %282, %281, %279, %277, %254, %252, %246, %244, %238, %232, %230, %225, %222, %215
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %8, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %9, align 4
  br label %731

277:                                              ; preds = %241
  %278 = load ptr, ptr %21, align 8, !tbaa !5
  invoke void @_ZN6b2Body8SetAwakeEb(ptr noundef nonnull align 8 dereferenceable(208) %278, i1 noundef zeroext true)
          to label %279 unwind label %273

279:                                              ; preds = %277
  %280 = load ptr, ptr %22, align 8, !tbaa !5
  invoke void @_ZN6b2Body8SetAwakeEb(ptr noundef nonnull align 8 dereferenceable(208) %280, i1 noundef zeroext true)
          to label %281 unwind label %273

281:                                              ; preds = %279
  invoke void @_ZN8b2Island5ClearEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %282 unwind label %273

282:                                              ; preds = %281
  %283 = load ptr, ptr %21, align 8, !tbaa !5
  invoke void @_ZN8b2Island3AddEP6b2Body(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef %283)
          to label %284 unwind label %273

284:                                              ; preds = %282
  %285 = load ptr, ptr %22, align 8, !tbaa !5
  invoke void @_ZN8b2Island3AddEP6b2Body(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef %285)
          to label %286 unwind label %273

286:                                              ; preds = %284
  %287 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZN8b2Island3AddEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef %287)
          to label %288 unwind label %273

288:                                              ; preds = %286
  %289 = load ptr, ptr %21, align 8, !tbaa !5
  %290 = getelementptr inbounds %class.b2Body, ptr %289, i32 0, i32 1
  %291 = load i16, ptr %290, align 4, !tbaa !28
  %292 = zext i16 %291 to i32
  %293 = or i32 %292, 1
  %294 = trunc i32 %293 to i16
  store i16 %294, ptr %290, align 4, !tbaa !28
  %295 = load ptr, ptr %22, align 8, !tbaa !5
  %296 = getelementptr inbounds %class.b2Body, ptr %295, i32 0, i32 1
  %297 = load i16, ptr %296, align 4, !tbaa !28
  %298 = zext i16 %297 to i32
  %299 = or i32 %298, 1
  %300 = trunc i32 %299 to i16
  store i16 %300, ptr %296, align 4, !tbaa !28
  %301 = load ptr, ptr %16, align 8, !tbaa !5
  %302 = getelementptr inbounds %class.b2Contact, ptr %301, i32 0, i32 6
  %303 = load i32, ptr %302, align 8, !tbaa !41
  %304 = or i32 %303, 1
  store i32 %304, ptr %302, align 8, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #9
  %305 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %305, ptr %25, align 8, !tbaa !5
  %306 = getelementptr inbounds ptr, ptr %25, i64 1
  %307 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %307, ptr %306, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  store i32 0, ptr %26, align 4, !tbaa !47
  br label %308

308:                                              ; preds = %531, %288
  %309 = load i32, ptr %26, align 4, !tbaa !47
  %310 = icmp slt i32 %309, 2
  br i1 %310, label %312, label %311

311:                                              ; preds = %308
  store i32 13, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  br label %534

312:                                              ; preds = %308
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %313 = load i32, ptr %26, align 4, !tbaa !47
  %314 = sext i32 %313 to i64
  %315 = getelementptr inbounds [2 x ptr], ptr %25, i64 0, i64 %314
  %316 = load ptr, ptr %315, align 8, !tbaa !5
  store ptr %316, ptr %27, align 8, !tbaa !5
  %317 = load ptr, ptr %27, align 8, !tbaa !5
  %318 = getelementptr inbounds %class.b2Body, ptr %317, i32 0, i32 0
  %319 = load i32, ptr %318, align 8, !tbaa !61
  %320 = icmp eq i32 %319, 2
  br i1 %320, label %321, label %530

321:                                              ; preds = %312
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  store i32 0, ptr %28, align 4, !tbaa !47
  br label %322

322:                                              ; preds = %520, %321
  %323 = load i32, ptr %28, align 4, !tbaa !47
  %324 = load ptr, ptr %27, align 8, !tbaa !5
  %325 = invoke noundef i32 @_ZN6b2Body15GetContactCountEv(ptr noundef nonnull align 8 dereferenceable(208) %324)
          to label %326 unwind label %329

326:                                              ; preds = %322
  %327 = icmp slt i32 %323, %325
  br i1 %327, label %333, label %328

328:                                              ; preds = %326
  store i32 16, ptr %18, align 4
  br label %527

329:                                              ; preds = %322
  %330 = landingpad { ptr, i32 }
          cleanup
  %331 = extractvalue { ptr, i32 } %330, 0
  store ptr %331, ptr %8, align 8
  %332 = extractvalue { ptr, i32 } %330, 1
  store i32 %332, ptr %9, align 4
  br label %528

333:                                              ; preds = %326
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %334 = load ptr, ptr %27, align 8, !tbaa !5
  %335 = load i32, ptr %28, align 4, !tbaa !47
  %336 = invoke noundef ptr @_ZN6b2Body10GetContactEi(ptr noundef nonnull align 8 dereferenceable(208) %334, i32 noundef %335)
          to label %337 unwind label %344

337:                                              ; preds = %333
  store ptr %336, ptr %29, align 8, !tbaa !5
  %338 = getelementptr inbounds %class.b2Island, ptr %5, i32 0, i32 7
  %339 = load i32, ptr %338, align 8, !tbaa !62
  %340 = getelementptr inbounds %class.b2Island, ptr %5, i32 0, i32 10
  %341 = load i32, ptr %340, align 4, !tbaa !64
  %342 = icmp eq i32 %339, %341
  br i1 %342, label %343, label %348

343:                                              ; preds = %337
  store i32 16, ptr %18, align 4
  br label %517

344:                                              ; preds = %333
  %345 = landingpad { ptr, i32 }
          cleanup
  %346 = extractvalue { ptr, i32 } %345, 0
  store ptr %346, ptr %8, align 8
  %347 = extractvalue { ptr, i32 } %345, 1
  store i32 %347, ptr %9, align 4
  br label %526

348:                                              ; preds = %337
  %349 = getelementptr inbounds %class.b2Island, ptr %5, i32 0, i32 9
  %350 = load i32, ptr %349, align 8, !tbaa !65
  %351 = getelementptr inbounds %class.b2Island, ptr %5, i32 0, i32 11
  %352 = load i32, ptr %351, align 8, !tbaa !66
  %353 = icmp eq i32 %350, %352
  br i1 %353, label %354, label %355

354:                                              ; preds = %348
  store i32 16, ptr %18, align 4
  br label %517

355:                                              ; preds = %348
  %356 = load ptr, ptr %29, align 8, !tbaa !5
  %357 = getelementptr inbounds %class.b2Contact, ptr %356, i32 0, i32 6
  %358 = load i32, ptr %357, align 8, !tbaa !41
  %359 = and i32 %358, 1
  %360 = icmp ne i32 %359, 0
  br i1 %360, label %361, label %362

361:                                              ; preds = %355
  store i32 18, ptr %18, align 4
  br label %517

362:                                              ; preds = %355
  %363 = load ptr, ptr %29, align 8, !tbaa !5
  %364 = getelementptr inbounds %class.b2Contact, ptr %363, i32 0, i32 6
  %365 = load i32, ptr %364, align 8, !tbaa !41
  %366 = and i32 %365, 2
  %367 = icmp eq i32 %366, 0
  br i1 %367, label %368, label %369

368:                                              ; preds = %362
  store i32 18, ptr %18, align 4
  br label %517

369:                                              ; preds = %362
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #9
  %370 = load ptr, ptr %29, align 8, !tbaa !5
  %371 = invoke noundef ptr @_ZN9b2Contact11GetFixtureAEv(ptr noundef nonnull align 8 dereferenceable(128) %370)
          to label %372 unwind label %406

372:                                              ; preds = %369
  %373 = invoke noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84) %371)
          to label %374 unwind label %406

374:                                              ; preds = %372
  store ptr %373, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  %375 = load ptr, ptr %29, align 8, !tbaa !5
  %376 = invoke noundef ptr @_ZN9b2Contact11GetFixtureBEv(ptr noundef nonnull align 8 dereferenceable(128) %375)
          to label %377 unwind label %410

377:                                              ; preds = %374
  %378 = invoke noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84) %376)
          to label %379 unwind label %410

379:                                              ; preds = %377
  store ptr %378, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  %380 = load ptr, ptr %30, align 8, !tbaa !5
  %381 = load ptr, ptr %27, align 8, !tbaa !5
  %382 = icmp eq ptr %380, %381
  br i1 %382, label %383, label %385

383:                                              ; preds = %379
  %384 = load ptr, ptr %31, align 8, !tbaa !5
  br label %387

385:                                              ; preds = %379
  %386 = load ptr, ptr %30, align 8, !tbaa !5
  br label %387

387:                                              ; preds = %385, %383
  %388 = phi ptr [ %384, %383 ], [ %386, %385 ]
  store ptr %388, ptr %32, align 8, !tbaa !5
  %389 = load ptr, ptr %32, align 8, !tbaa !5
  %390 = getelementptr inbounds %class.b2Body, ptr %389, i32 0, i32 0
  %391 = load i32, ptr %390, align 8, !tbaa !61
  %392 = icmp eq i32 %391, 2
  br i1 %392, label %393, label %418

393:                                              ; preds = %387
  %394 = load ptr, ptr %27, align 8, !tbaa !5
  %395 = invoke noundef zeroext i1 @_ZNK6b2Body8IsBulletEv(ptr noundef nonnull align 8 dereferenceable(208) %394)
          to label %396 unwind label %414

396:                                              ; preds = %393
  %397 = zext i1 %395 to i32
  %398 = icmp eq i32 %397, 0
  br i1 %398, label %399, label %418

399:                                              ; preds = %396
  %400 = load ptr, ptr %32, align 8, !tbaa !5
  %401 = invoke noundef zeroext i1 @_ZNK6b2Body8IsBulletEv(ptr noundef nonnull align 8 dereferenceable(208) %400)
          to label %402 unwind label %414

402:                                              ; preds = %399
  %403 = zext i1 %401 to i32
  %404 = icmp eq i32 %403, 0
  br i1 %404, label %405, label %418

405:                                              ; preds = %402
  store i32 18, ptr %18, align 4
  br label %516

406:                                              ; preds = %372, %369
  %407 = landingpad { ptr, i32 }
          cleanup
  %408 = extractvalue { ptr, i32 } %407, 0
  store ptr %408, ptr %8, align 8
  %409 = extractvalue { ptr, i32 } %407, 1
  store i32 %409, ptr %9, align 4
  br label %525

410:                                              ; preds = %377, %374
  %411 = landingpad { ptr, i32 }
          cleanup
  %412 = extractvalue { ptr, i32 } %411, 0
  store ptr %412, ptr %8, align 8
  %413 = extractvalue { ptr, i32 } %411, 1
  store i32 %413, ptr %9, align 4
  br label %524

414:                                              ; preds = %399, %393
  %415 = landingpad { ptr, i32 }
          cleanup
  %416 = extractvalue { ptr, i32 } %415, 0
  store ptr %416, ptr %8, align 8
  %417 = extractvalue { ptr, i32 } %415, 1
  store i32 %417, ptr %9, align 4
  br label %523

418:                                              ; preds = %402, %396, %387
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #9
  %419 = load ptr, ptr %29, align 8, !tbaa !5
  %420 = getelementptr inbounds %class.b2Contact, ptr %419, i32 0, i32 3
  %421 = load ptr, ptr %420, align 8, !tbaa !67
  %422 = getelementptr inbounds %class.b2Fixture, ptr %421, i32 0, i32 10
  %423 = load i8, ptr %422, align 2, !tbaa !68, !range !25, !noundef !26
  %424 = trunc i8 %423 to i1
  %425 = zext i1 %424 to i8
  store i8 %425, ptr %33, align 1, !tbaa !72
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #9
  %426 = load ptr, ptr %29, align 8, !tbaa !5
  %427 = getelementptr inbounds %class.b2Contact, ptr %426, i32 0, i32 4
  %428 = load ptr, ptr %427, align 8, !tbaa !73
  %429 = getelementptr inbounds %class.b2Fixture, ptr %428, i32 0, i32 10
  %430 = load i8, ptr %429, align 2, !tbaa !68, !range !25, !noundef !26
  %431 = trunc i8 %430 to i1
  %432 = zext i1 %431 to i8
  store i8 %432, ptr %34, align 1, !tbaa !72
  %433 = load i8, ptr %33, align 1, !tbaa !72, !range !25, !noundef !26
  %434 = trunc i8 %433 to i1
  br i1 %434, label %438, label %435

435:                                              ; preds = %418
  %436 = load i8, ptr %34, align 1, !tbaa !72, !range !25, !noundef !26
  %437 = trunc i8 %436 to i1
  br i1 %437, label %438, label %439

438:                                              ; preds = %435, %418
  store i32 18, ptr %18, align 4
  br label %515

439:                                              ; preds = %435
  call void @llvm.lifetime.start.p0(i64 36, ptr %35) #9
  %440 = load ptr, ptr %32, align 8, !tbaa !5
  %441 = getelementptr inbounds %class.b2Body, ptr %440, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %441, i64 36, i1 false), !tbaa.struct !59
  %442 = load ptr, ptr %32, align 8, !tbaa !5
  %443 = getelementptr inbounds %class.b2Body, ptr %442, i32 0, i32 1
  %444 = load i16, ptr %443, align 4, !tbaa !28
  %445 = zext i16 %444 to i32
  %446 = and i32 %445, 1
  %447 = icmp eq i32 %446, 0
  br i1 %447, label %448, label %456

448:                                              ; preds = %439
  %449 = load ptr, ptr %32, align 8, !tbaa !5
  %450 = load float, ptr %17, align 4, !tbaa !48
  invoke void @_ZN6b2Body7AdvanceEf(ptr noundef nonnull align 8 dereferenceable(208) %449, float noundef %450)
          to label %451 unwind label %452

451:                                              ; preds = %448
  br label %456

452:                                              ; preds = %511, %508, %483, %478, %472, %467, %461, %456, %448
  %453 = landingpad { ptr, i32 }
          cleanup
  %454 = extractvalue { ptr, i32 } %453, 0
  store ptr %454, ptr %8, align 8
  %455 = extractvalue { ptr, i32 } %453, 1
  store i32 %455, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 36, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #9
  br label %523

456:                                              ; preds = %451, %439
  %457 = load ptr, ptr %29, align 8, !tbaa !5
  %458 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 2
  %459 = getelementptr inbounds %class.b2ContactManager, ptr %458, i32 0, i32 3
  %460 = load ptr, ptr %459, align 8, !tbaa !23
  invoke void @_ZN9b2Contact6UpdateEP17b2ContactListener(ptr noundef nonnull align 8 dereferenceable(128) %457, ptr noundef %460)
          to label %461 unwind label %452

461:                                              ; preds = %456
  %462 = load ptr, ptr %29, align 8, !tbaa !5
  %463 = invoke noundef zeroext i1 @_ZNK9b2Contact9IsEnabledEv(ptr noundef nonnull align 8 dereferenceable(128) %462)
          to label %464 unwind label %452

464:                                              ; preds = %461
  %465 = zext i1 %463 to i32
  %466 = icmp eq i32 %465, 0
  br i1 %466, label %467, label %472

467:                                              ; preds = %464
  %468 = load ptr, ptr %32, align 8, !tbaa !5
  %469 = getelementptr inbounds %class.b2Body, ptr %468, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %469, ptr align 4 %35, i64 36, i1 false), !tbaa.struct !59
  %470 = load ptr, ptr %32, align 8, !tbaa !5
  invoke void @_ZN6b2Body20SynchronizeTransformEv(ptr noundef nonnull align 8 dereferenceable(208) %470)
          to label %471 unwind label %452

471:                                              ; preds = %467
  store i32 18, ptr %18, align 4
  br label %514

472:                                              ; preds = %464
  %473 = load ptr, ptr %29, align 8, !tbaa !5
  %474 = invoke noundef zeroext i1 @_ZNK9b2Contact10IsTouchingEv(ptr noundef nonnull align 8 dereferenceable(128) %473)
          to label %475 unwind label %452

475:                                              ; preds = %472
  %476 = zext i1 %474 to i32
  %477 = icmp eq i32 %476, 0
  br i1 %477, label %478, label %483

478:                                              ; preds = %475
  %479 = load ptr, ptr %32, align 8, !tbaa !5
  %480 = getelementptr inbounds %class.b2Body, ptr %479, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %480, ptr align 4 %35, i64 36, i1 false), !tbaa.struct !59
  %481 = load ptr, ptr %32, align 8, !tbaa !5
  invoke void @_ZN6b2Body20SynchronizeTransformEv(ptr noundef nonnull align 8 dereferenceable(208) %481)
          to label %482 unwind label %452

482:                                              ; preds = %478
  store i32 18, ptr %18, align 4
  br label %514

483:                                              ; preds = %475
  %484 = load ptr, ptr %29, align 8, !tbaa !5
  %485 = getelementptr inbounds %class.b2Contact, ptr %484, i32 0, i32 6
  %486 = load i32, ptr %485, align 8, !tbaa !41
  %487 = or i32 %486, 1
  store i32 %487, ptr %485, align 8, !tbaa !41
  %488 = load ptr, ptr %29, align 8, !tbaa !5
  invoke void @_ZN8b2Island3AddEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef %488)
          to label %489 unwind label %452

489:                                              ; preds = %483
  %490 = load ptr, ptr %32, align 8, !tbaa !5
  %491 = getelementptr inbounds %class.b2Body, ptr %490, i32 0, i32 1
  %492 = load i16, ptr %491, align 4, !tbaa !28
  %493 = zext i16 %492 to i32
  %494 = and i32 %493, 1
  %495 = icmp ne i32 %494, 0
  br i1 %495, label %496, label %497

496:                                              ; preds = %489
  store i32 18, ptr %18, align 4
  br label %514

497:                                              ; preds = %489
  %498 = load ptr, ptr %32, align 8, !tbaa !5
  %499 = getelementptr inbounds %class.b2Body, ptr %498, i32 0, i32 1
  %500 = load i16, ptr %499, align 4, !tbaa !28
  %501 = zext i16 %500 to i32
  %502 = or i32 %501, 1
  %503 = trunc i32 %502 to i16
  store i16 %503, ptr %499, align 4, !tbaa !28
  %504 = load ptr, ptr %32, align 8, !tbaa !5
  %505 = getelementptr inbounds %class.b2Body, ptr %504, i32 0, i32 0
  %506 = load i32, ptr %505, align 8, !tbaa !61
  %507 = icmp ne i32 %506, 0
  br i1 %507, label %508, label %511

508:                                              ; preds = %497
  %509 = load ptr, ptr %32, align 8, !tbaa !5
  invoke void @_ZN6b2Body8SetAwakeEb(ptr noundef nonnull align 8 dereferenceable(208) %509, i1 noundef zeroext true)
          to label %510 unwind label %452

510:                                              ; preds = %508
  br label %511

511:                                              ; preds = %510, %497
  %512 = load ptr, ptr %32, align 8, !tbaa !5
  invoke void @_ZN8b2Island3AddEP6b2Body(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef %512)
          to label %513 unwind label %452

513:                                              ; preds = %511
  store i32 0, ptr %18, align 4
  br label %514

514:                                              ; preds = %513, %496, %482, %471
  call void @llvm.lifetime.end.p0(i64 36, ptr %35) #9
  br label %515

515:                                              ; preds = %514, %438
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #9
  br label %516

516:                                              ; preds = %515, %405
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  br label %517

517:                                              ; preds = %516, %368, %361, %354, %343
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  %518 = load i32, ptr %18, align 4
  switch i32 %518, label %527 [
    i32 0, label %519
    i32 18, label %520
  ]

519:                                              ; preds = %517
  br label %520

520:                                              ; preds = %519, %517
  %521 = load i32, ptr %28, align 4, !tbaa !47
  %522 = add nsw i32 %521, 1
  store i32 %522, ptr %28, align 4, !tbaa !47
  br label %322, !llvm.loop !74

523:                                              ; preds = %452, %414
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  br label %524

524:                                              ; preds = %523, %410
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  br label %525

525:                                              ; preds = %524, %406
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  br label %526

526:                                              ; preds = %525, %344
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  br label %528

527:                                              ; preds = %517, %328
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  br label %529

528:                                              ; preds = %526, %329
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  br label %730

529:                                              ; preds = %527
  br label %530

530:                                              ; preds = %529, %312
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  br label %531

531:                                              ; preds = %530
  %532 = load i32, ptr %26, align 4, !tbaa !47
  %533 = add nsw i32 %532, 1
  store i32 %533, ptr %26, align 4, !tbaa !47
  br label %308, !llvm.loop !75

534:                                              ; preds = %311
  call void @llvm.lifetime.start.p0(i64 28, ptr %36) #9
  %535 = load float, ptr %17, align 4, !tbaa !48
  %536 = fsub float 1.000000e+00, %535
  %537 = load ptr, ptr %4, align 8, !tbaa !5
  %538 = getelementptr inbounds %struct.b2TimeStep, ptr %537, i32 0, i32 0
  %539 = load float, ptr %538, align 4, !tbaa !76
  %540 = fmul float %536, %539
  %541 = getelementptr inbounds %struct.b2TimeStep, ptr %36, i32 0, i32 0
  store float %540, ptr %541, align 4, !tbaa !76
  %542 = getelementptr inbounds %struct.b2TimeStep, ptr %36, i32 0, i32 0
  %543 = load float, ptr %542, align 4, !tbaa !76
  %544 = fdiv float 1.000000e+00, %543
  %545 = getelementptr inbounds %struct.b2TimeStep, ptr %36, i32 0, i32 1
  store float %544, ptr %545, align 4, !tbaa !78
  %546 = getelementptr inbounds %struct.b2TimeStep, ptr %36, i32 0, i32 2
  store float 1.000000e+00, ptr %546, align 4, !tbaa !79
  %547 = getelementptr inbounds %struct.b2TimeStep, ptr %36, i32 0, i32 4
  store i32 20, ptr %547, align 4, !tbaa !80
  %548 = load ptr, ptr %4, align 8, !tbaa !5
  %549 = getelementptr inbounds %struct.b2TimeStep, ptr %548, i32 0, i32 3
  %550 = load i32, ptr %549, align 4, !tbaa !81
  %551 = getelementptr inbounds %struct.b2TimeStep, ptr %36, i32 0, i32 3
  store i32 %550, ptr %551, align 4, !tbaa !81
  %552 = load ptr, ptr %4, align 8, !tbaa !5
  %553 = getelementptr inbounds %struct.b2TimeStep, ptr %552, i32 0, i32 5
  %554 = load i32, ptr %553, align 4, !tbaa !82
  %555 = getelementptr inbounds %struct.b2TimeStep, ptr %36, i32 0, i32 5
  store i32 %554, ptr %555, align 4, !tbaa !82
  %556 = getelementptr inbounds %struct.b2TimeStep, ptr %36, i32 0, i32 6
  store i8 0, ptr %556, align 4, !tbaa !83
  %557 = load ptr, ptr %21, align 8, !tbaa !5
  %558 = getelementptr inbounds %class.b2Body, ptr %557, i32 0, i32 2
  %559 = load i32, ptr %558, align 8, !tbaa !84
  %560 = load ptr, ptr %22, align 8, !tbaa !5
  %561 = getelementptr inbounds %class.b2Body, ptr %560, i32 0, i32 2
  %562 = load i32, ptr %561, align 8, !tbaa !84
  invoke void @_ZN8b2Island8SolveTOIERK10b2TimeStepii(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(28) %36, i32 noundef %559, i32 noundef %562)
          to label %563 unwind label %570

563:                                              ; preds = %534
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #9
  store i32 0, ptr %37, align 4, !tbaa !47
  br label %564

564:                                              ; preds = %665, %563
  %565 = load i32, ptr %37, align 4, !tbaa !47
  %566 = getelementptr inbounds %class.b2Island, ptr %5, i32 0, i32 7
  %567 = load i32, ptr %566, align 8, !tbaa !62
  %568 = icmp slt i32 %565, %567
  br i1 %568, label %574, label %569

569:                                              ; preds = %564
  store i32 19, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  br label %669

570:                                              ; preds = %534
  %571 = landingpad { ptr, i32 }
          cleanup
  %572 = extractvalue { ptr, i32 } %571, 0
  store ptr %572, ptr %8, align 8
  %573 = extractvalue { ptr, i32 } %571, 1
  store i32 %573, ptr %9, align 4
  br label %729

574:                                              ; preds = %564
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #9
  %575 = getelementptr inbounds %class.b2Island, ptr %5, i32 0, i32 2
  %576 = load ptr, ptr %575, align 8, !tbaa !85
  %577 = load i32, ptr %37, align 4, !tbaa !47
  %578 = sext i32 %577 to i64
  %579 = getelementptr inbounds ptr, ptr %576, i64 %578
  %580 = load ptr, ptr %579, align 8, !tbaa !5
  store ptr %580, ptr %38, align 8, !tbaa !5
  %581 = load ptr, ptr %38, align 8, !tbaa !5
  %582 = getelementptr inbounds %class.b2Body, ptr %581, i32 0, i32 1
  %583 = load i16, ptr %582, align 4, !tbaa !28
  %584 = zext i16 %583 to i32
  %585 = and i32 %584, -2
  %586 = trunc i32 %585 to i16
  store i16 %586, ptr %582, align 4, !tbaa !28
  %587 = load ptr, ptr %38, align 8, !tbaa !5
  %588 = getelementptr inbounds %class.b2Body, ptr %587, i32 0, i32 0
  %589 = load i32, ptr %588, align 8, !tbaa !61
  %590 = icmp ne i32 %589, 2
  br i1 %590, label %591, label %592

591:                                              ; preds = %574
  store i32 21, ptr %18, align 4
  br label %662

592:                                              ; preds = %574
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #9
  %593 = load ptr, ptr %38, align 8, !tbaa !5
  %594 = invoke noundef ptr @_ZN6b2Body14GetFixtureListEv(ptr noundef nonnull align 8 dereferenceable(208) %593)
          to label %595 unwind label %600

595:                                              ; preds = %592
  store ptr %594, ptr %39, align 8, !tbaa !5
  br label %596

596:                                              ; preds = %613, %595
  %597 = load ptr, ptr %39, align 8, !tbaa !5
  %598 = icmp ne ptr %597, null
  br i1 %598, label %604, label %599

599:                                              ; preds = %596
  store i32 22, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #9
  br label %614

600:                                              ; preds = %610, %604, %592
  %601 = landingpad { ptr, i32 }
          cleanup
  %602 = extractvalue { ptr, i32 } %601, 0
  store ptr %602, ptr %8, align 8
  %603 = extractvalue { ptr, i32 } %601, 1
  store i32 %603, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #9
  br label %668

604:                                              ; preds = %596
  %605 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 2
  %606 = getelementptr inbounds %class.b2ContactManager, ptr %605, i32 0, i32 0
  %607 = load ptr, ptr %39, align 8, !tbaa !5
  %608 = invoke noundef zeroext i1 @_ZN12b2BroadPhase15UpdateNoRebuildEP9b2Fixture(ptr noundef nonnull align 8 dereferenceable(137) %606, ptr noundef %607)
          to label %609 unwind label %600

609:                                              ; preds = %604
  br label %610

610:                                              ; preds = %609
  %611 = load ptr, ptr %39, align 8, !tbaa !5
  %612 = invoke noundef ptr @_ZN9b2Fixture7GetNextEv(ptr noundef nonnull align 8 dereferenceable(84) %611)
          to label %613 unwind label %600

613:                                              ; preds = %610
  store ptr %612, ptr %39, align 8, !tbaa !5
  br label %596, !llvm.loop !86

614:                                              ; preds = %599
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #9
  store i32 0, ptr %40, align 4, !tbaa !47
  br label %615

615:                                              ; preds = %657, %614
  %616 = load i32, ptr %40, align 4, !tbaa !47
  %617 = load ptr, ptr %38, align 8, !tbaa !5
  %618 = invoke noundef i32 @_ZN6b2Body15GetContactCountEv(ptr noundef nonnull align 8 dereferenceable(208) %617)
          to label %619 unwind label %622

619:                                              ; preds = %615
  %620 = icmp slt i32 %616, %618
  br i1 %620, label %626, label %621

621:                                              ; preds = %619
  store i32 25, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  br label %661

622:                                              ; preds = %615
  %623 = landingpad { ptr, i32 }
          cleanup
  %624 = extractvalue { ptr, i32 } %623, 0
  store ptr %624, ptr %8, align 8
  %625 = extractvalue { ptr, i32 } %623, 1
  store i32 %625, ptr %9, align 4
  br label %660

626:                                              ; preds = %619
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #9
  %627 = load ptr, ptr %38, align 8, !tbaa !5
  %628 = load i32, ptr %40, align 4, !tbaa !47
  %629 = invoke noundef ptr @_ZN6b2Body10GetContactEi(ptr noundef nonnull align 8 dereferenceable(208) %627, i32 noundef %628)
          to label %630 unwind label %644

630:                                              ; preds = %626
  store ptr %629, ptr %41, align 8, !tbaa !5
  %631 = load ptr, ptr %41, align 8, !tbaa !5
  %632 = getelementptr inbounds %class.b2Contact, ptr %631, i32 0, i32 6
  %633 = load i32, ptr %632, align 8, !tbaa !41
  %634 = and i32 %633, 2
  %635 = icmp ne i32 %634, 0
  br i1 %635, label %636, label %652

636:                                              ; preds = %630
  %637 = load ptr, ptr %41, align 8, !tbaa !5
  %638 = getelementptr inbounds %class.b2Contact, ptr %637, i32 0, i32 7
  %639 = load i32, ptr %638, align 4, !tbaa !45
  %640 = icmp eq i32 %639, -1
  br i1 %640, label %641, label %648

641:                                              ; preds = %636
  %642 = load ptr, ptr %41, align 8, !tbaa !5
  invoke void @_ZN12b2TOIMinHeap6InsertEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef %642)
          to label %643 unwind label %644

643:                                              ; preds = %641
  br label %651

644:                                              ; preds = %648, %641, %626
  %645 = landingpad { ptr, i32 }
          cleanup
  %646 = extractvalue { ptr, i32 } %645, 0
  store ptr %646, ptr %8, align 8
  %647 = extractvalue { ptr, i32 } %645, 1
  store i32 %647, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #9
  br label %660

648:                                              ; preds = %636
  %649 = load ptr, ptr %41, align 8, !tbaa !5
  invoke void @_ZN12b2TOIMinHeap6UpdateEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef %649)
          to label %650 unwind label %644

650:                                              ; preds = %648
  br label %651

651:                                              ; preds = %650, %643
  br label %652

652:                                              ; preds = %651, %630
  %653 = load ptr, ptr %41, align 8, !tbaa !5
  %654 = getelementptr inbounds %class.b2Contact, ptr %653, i32 0, i32 6
  %655 = load i32, ptr %654, align 8, !tbaa !41
  %656 = and i32 %655, -4
  store i32 %656, ptr %654, align 8, !tbaa !41
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #9
  br label %657

657:                                              ; preds = %652
  %658 = load i32, ptr %40, align 4, !tbaa !47
  %659 = add nsw i32 %658, 1
  store i32 %659, ptr %40, align 4, !tbaa !47
  br label %615, !llvm.loop !87

660:                                              ; preds = %644, %622
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  br label %668

661:                                              ; preds = %621
  store i32 0, ptr %18, align 4
  br label %662

662:                                              ; preds = %661, %591
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  %663 = load i32, ptr %18, align 4
  switch i32 %663, label %754 [
    i32 0, label %664
    i32 21, label %665
  ]

664:                                              ; preds = %662
  br label %665

665:                                              ; preds = %664, %662
  %666 = load i32, ptr %37, align 4, !tbaa !47
  %667 = add nsw i32 %666, 1
  store i32 %667, ptr %37, align 4, !tbaa !47
  br label %564, !llvm.loop !88

668:                                              ; preds = %660, %600
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  br label %729

669:                                              ; preds = %569
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #9
  store i32 0, ptr %42, align 4, !tbaa !47
  br label %670

670:                                              ; preds = %714, %669
  %671 = load i32, ptr %42, align 4, !tbaa !47
  %672 = getelementptr inbounds %class.b2Island, ptr %5, i32 0, i32 7
  %673 = load i32, ptr %672, align 8, !tbaa !62
  %674 = icmp slt i32 %671, %673
  br i1 %674, label %676, label %675

675:                                              ; preds = %670
  store i32 28, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  br label %717

676:                                              ; preds = %670
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #9
  %677 = getelementptr inbounds %class.b2Island, ptr %5, i32 0, i32 2
  %678 = load ptr, ptr %677, align 8, !tbaa !85
  %679 = load i32, ptr %42, align 4, !tbaa !47
  %680 = sext i32 %679 to i64
  %681 = getelementptr inbounds ptr, ptr %678, i64 %680
  %682 = load ptr, ptr %681, align 8, !tbaa !5
  store ptr %682, ptr %43, align 8, !tbaa !5
  %683 = load ptr, ptr %43, align 8, !tbaa !5
  %684 = getelementptr inbounds %class.b2Body, ptr %683, i32 0, i32 0
  %685 = load i32, ptr %684, align 8, !tbaa !61
  %686 = icmp eq i32 %685, 2
  br i1 %686, label %687, label %713

687:                                              ; preds = %676
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #9
  %688 = load ptr, ptr %43, align 8, !tbaa !5
  %689 = invoke noundef ptr @_ZN6b2Body14GetFixtureListEv(ptr noundef nonnull align 8 dereferenceable(208) %688)
          to label %690 unwind label %695

690:                                              ; preds = %687
  store ptr %689, ptr %44, align 8, !tbaa !5
  br label %691

691:                                              ; preds = %711, %690
  %692 = load ptr, ptr %44, align 8, !tbaa !5
  %693 = icmp ne ptr %692, null
  br i1 %693, label %699, label %694

694:                                              ; preds = %691
  store i32 31, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #9
  br label %712

695:                                              ; preds = %708, %706, %699, %687
  %696 = landingpad { ptr, i32 }
          cleanup
  %697 = extractvalue { ptr, i32 } %696, 0
  store ptr %697, ptr %8, align 8
  %698 = extractvalue { ptr, i32 } %696, 1
  store i32 %698, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  br label %729

699:                                              ; preds = %691
  %700 = load ptr, ptr %44, align 8, !tbaa !5
  %701 = getelementptr inbounds %struct.b2TOIQueryWrapper, ptr %14, i32 0, i32 0
  store ptr %700, ptr %701, align 8, !tbaa !89
  %702 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 2
  %703 = getelementptr inbounds %class.b2ContactManager, ptr %702, i32 0, i32 0
  %704 = load ptr, ptr %44, align 8, !tbaa !5
  %705 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9b2Fixture7GetAABBEv(ptr noundef nonnull align 8 dereferenceable(84) %704)
          to label %706 unwind label %695

706:                                              ; preds = %699
  invoke void @_ZN12b2BroadPhase5QueryI17b2TOIQueryWrapperEEvPT_RK6b2AABB(ptr noundef nonnull align 8 dereferenceable(137) %703, ptr noundef %14, ptr noundef nonnull align 4 dereferenceable(16) %705)
          to label %707 unwind label %695

707:                                              ; preds = %706
  br label %708

708:                                              ; preds = %707
  %709 = load ptr, ptr %44, align 8, !tbaa !5
  %710 = invoke noundef ptr @_ZN9b2Fixture7GetNextEv(ptr noundef nonnull align 8 dereferenceable(84) %709)
          to label %711 unwind label %695

711:                                              ; preds = %708
  store ptr %710, ptr %44, align 8, !tbaa !5
  br label %691, !llvm.loop !90

712:                                              ; preds = %694
  br label %713

713:                                              ; preds = %712, %676
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #9
  br label %714

714:                                              ; preds = %713
  %715 = load i32, ptr %42, align 4, !tbaa !47
  %716 = add nsw i32 %715, 1
  store i32 %716, ptr %42, align 4, !tbaa !47
  br label %670, !llvm.loop !91

717:                                              ; preds = %675
  %718 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 20
  %719 = load i8, ptr %718, align 2, !tbaa !92, !range !25, !noundef !26
  %720 = trunc i8 %719 to i1
  br i1 %720, label %721, label %723

721:                                              ; preds = %717
  %722 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 21
  store i8 0, ptr %722, align 1, !tbaa !24
  store i32 12, ptr %18, align 4
  br label %724

723:                                              ; preds = %717
  store i32 0, ptr %18, align 4
  br label %724

724:                                              ; preds = %723, %721
  call void @llvm.lifetime.end.p0(i64 28, ptr %36) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #9
  br label %725

725:                                              ; preds = %724, %256
  call void @llvm.lifetime.end.p0(i64 36, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 36, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %726

726:                                              ; preds = %725, %197
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  %727 = load i32, ptr %18, align 4
  switch i32 %727, label %754 [
    i32 0, label %728
    i32 12, label %736
    i32 11, label %177
  ]

728:                                              ; preds = %726
  br label %177, !llvm.loop !60

729:                                              ; preds = %695, %668, %570
  call void @llvm.lifetime.end.p0(i64 28, ptr %36) #9
  br label %730

730:                                              ; preds = %729, %528
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #9
  br label %731

731:                                              ; preds = %730, %273
  call void @llvm.lifetime.end.p0(i64 36, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 36, ptr %23) #9
  br label %732

732:                                              ; preds = %731, %269
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %733

733:                                              ; preds = %732, %265
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %734

734:                                              ; preds = %733, %261
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %735

735:                                              ; preds = %734, %257
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %745

736:                                              ; preds = %726, %177
  invoke void @_ZN7b2World18RemoveDeadContactsEv(ptr noundef nonnull align 8 dereferenceable(103352) %45)
          to label %737 unwind label %741

737:                                              ; preds = %736
  %738 = getelementptr inbounds %class.b2World, ptr %45, i32 0, i32 2
  invoke void @_ZN16b2ContactManager18RemoveDeadContactsEv(ptr noundef nonnull align 8 dereferenceable(184) %738)
          to label %739 unwind label %741

739:                                              ; preds = %737
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @_ZN12b2TOIMinHeapD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #9
  call void @_ZN8b2IslandD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #9
  br label %740

740:                                              ; preds = %739, %50
  ret void

741:                                              ; preds = %737, %736
  %742 = landingpad { ptr, i32 }
          cleanup
  %743 = extractvalue { ptr, i32 } %742, 0
  store ptr %743, ptr %8, align 8
  %744 = extractvalue { ptr, i32 } %742, 1
  store i32 %744, ptr %9, align 4
  br label %745

745:                                              ; preds = %741, %735
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #9
  br label %746

746:                                              ; preds = %745, %199, %169
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @_ZN12b2TOIMinHeapD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #9
  br label %747

747:                                              ; preds = %746, %124
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #9
  br label %748

748:                                              ; preds = %747, %91
  call void @_ZN8b2IslandD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #9
  br label %749

749:                                              ; preds = %748
  %750 = load ptr, ptr %8, align 8
  %751 = load i32, ptr %9, align 4
  %752 = insertvalue { ptr, i32 } poison, ptr %750, 0
  %753 = insertvalue { ptr, i32 } %752, i32 %751, 1
  resume { ptr, i32 } %753

754:                                              ; preds = %726, %662
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK16b2ContactManager5StartEv(ptr noundef nonnull align 8 dereferenceable(184)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK16b2ContactManager3EndEv(ptr noundef nonnull align 8 dereferenceable(184)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9b2Contact7GetNextEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN12b2TOIMinHeapixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6b2Body7AdvanceEf(ptr noundef nonnull align 8 dereferenceable(208), float noundef) #8 align 2

declare void @_ZN9b2Contact6UpdateEP17b2ContactListener(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9b2Contact10SetEnabledEb(ptr noundef nonnull align 8 dereferenceable(128), i1 noundef zeroext) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6b2Body20SynchronizeTransformEv(ptr noundef nonnull align 8 dereferenceable(208)) #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6b2Body8IsBulletEv(ptr noundef nonnull align 8 dereferenceable(208)) #3 align 2

declare void @_ZN8b2Island8SolveTOIERK10b2TimeStepii(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(28), i32 noundef, i32 noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6b2Body14GetFixtureListEv(ptr noundef nonnull align 8 dereferenceable(208)) #3 align 2

declare noundef zeroext i1 @_ZN12b2BroadPhase15UpdateNoRebuildEP9b2Fixture(ptr noundef nonnull align 8 dereferenceable(137), ptr noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9b2Fixture7GetNextEv(ptr noundef nonnull align 8 dereferenceable(84)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN12b2BroadPhase5QueryI17b2TOIQueryWrapperEEvPT_RK6b2AABB(ptr noundef nonnull align 8 dereferenceable(137), ptr noundef, ptr noundef nonnull align 4 dereferenceable(16)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9b2Fixture7GetAABBEv(ptr noundef nonnull align 8 dereferenceable(84)) #3 align 2

declare void @_ZN16b2ContactManager18RemoveDeadContactsEv(ptr noundef nonnull align 8 dereferenceable(184)) #5

declare void @_ZN12b2TOIMinHeapC1Ei(ptr, i32)

declare void @_ZN12b2TOIMinHeapD1Ev(ptr)

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { "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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { 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++ TBAA"}
!9 = !{!10, !12, i64 103208}
!10 = !{!"_ZTS7b2World", !11, i64 0, !13, i64 128, !14, i64 103064, !6, i64 103248, !6, i64 103256, !6, i64 103264, !6, i64 103272, !12, i64 103280, !12, i64 103284, !18, i64 103288, !21, i64 103296, !6, i64 103304, !6, i64 103312, !19, i64 103320, !21, i64 103324, !21, i64 103325, !21, i64 103326, !21, i64 103327, !21, i64 103328, !21, i64 103329, !21, i64 103330, !21, i64 103331, !22, i64 103332}
!11 = !{!"_ZTS16b2BlockAllocator", !6, i64 0, !12, i64 8, !12, i64 12, !7, i64 16}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS16b2StackAllocator", !7, i64 0, !12, i64 102400, !12, i64 102404, !12, i64 102408, !7, i64 102416, !12, i64 102928}
!14 = !{!"_ZTS16b2ContactManager", !15, i64 0, !12, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!15 = !{!"_ZTS12b2BroadPhase", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !16, i64 32, !6, i64 80, !6, i64 88, !6, i64 96, !12, i64 104, !12, i64 108, !20, i64 112, !12, i64 128, !12, i64 132, !21, i64 136}
!16 = !{!"_ZTS10b2TreeNode", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !17, i64 32}
!17 = !{!"_ZTS6b2AABB", !18, i64 0, !18, i64 8}
!18 = !{!"_ZTS6b2Vec2", !19, i64 0, !19, i64 4}
!19 = !{!"float", !7, i64 0}
!20 = !{!"_ZTS14b2IntHashTable", !6, i64 0, !12, i64 8}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTS9b2Profile", !19, i64 0, !19, i64 4, !19, i64 8, !19, i64 12, !19, i64 16}
!23 = !{!10, !6, i64 103224}
!24 = !{!10, !21, i64 103331}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!10, !6, i64 103248}
!28 = !{!29, !31, i64 4}
!29 = !{!"_ZTS6b2Body", !30, i64 0, !31, i64 4, !12, i64 8, !32, i64 12, !32, i64 28, !34, i64 44, !18, i64 80, !19, i64 88, !18, i64 92, !19, i64 100, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !12, i64 136, !6, i64 144, !6, i64 152, !12, i64 160, !12, i64 164, !19, i64 168, !19, i64 172, !19, i64 176, !19, i64 180, !19, i64 184, !19, i64 188, !19, i64 192, !19, i64 196, !35, i64 200}
!30 = !{!"_ZTS10b2BodyType", !7, i64 0}
!31 = !{!"short", !7, i64 0}
!32 = !{!"_ZTS11b2Transform", !18, i64 0, !33, i64 8}
!33 = !{!"_ZTS5b2Rot", !19, i64 0, !19, i64 4}
!34 = !{!"_ZTS7b2Sweep", !18, i64 0, !18, i64 8, !18, i64 16, !19, i64 24, !19, i64 28, !19, i64 32}
!35 = !{!"_ZTS14b2BodyUserData", !36, i64 0}
!36 = !{!"long", !7, i64 0}
!37 = !{!29, !19, i64 76}
!38 = !{!29, !6, i64 120}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!42, !12, i64 104}
!42 = !{!"_ZTS9b2Contact", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !43, i64 40, !12, i64 104, !12, i64 108, !19, i64 112, !19, i64 116, !19, i64 120, !19, i64 124}
!43 = !{!"_ZTS10b2Manifold", !7, i64 0, !18, i64 40, !18, i64 48, !44, i64 56, !12, i64 60}
!44 = !{!"_ZTSN10b2Manifold4TypeE", !7, i64 0}
!45 = !{!42, !12, i64 108}
!46 = distinct !{!46, !40}
!47 = !{!12, !12, i64 0}
!48 = !{!19, !19, i64 0}
!49 = !{!50, !6, i64 8}
!50 = !{!"_ZTS10b2HeapNode", !19, i64 0, !12, i64 4, !6, i64 8}
!51 = !{!50, !19, i64 0}
!52 = !{!50, !12, i64 4}
!53 = distinct !{!53, !40}
!54 = !{!55, !12, i64 0}
!55 = !{!"_ZTS12b2TOIMinHeap", !12, i64 0, !12, i64 4, !6, i64 8}
!56 = !{!57, !6, i64 8}
!57 = !{!"_ZTS17b2TOIQueryWrapper", !6, i64 0, !6, i64 8, !6, i64 16}
!58 = !{!57, !6, i64 16}
!59 = !{i64 0, i64 4, !48, i64 4, i64 4, !48, i64 8, i64 4, !48, i64 12, i64 4, !48, i64 16, i64 4, !48, i64 20, i64 4, !48, i64 24, i64 4, !48, i64 28, i64 4, !48, i64 32, i64 4, !48}
!60 = distinct !{!60, !40}
!61 = !{!29, !30, i64 0}
!62 = !{!63, !12, i64 56}
!63 = !{!"_ZTS8b2Island", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76}
!64 = !{!63, !12, i64 68}
!65 = !{!63, !12, i64 64}
!66 = !{!63, !12, i64 72}
!67 = !{!42, !6, i64 24}
!68 = !{!69, !21, i64 66}
!69 = !{!"_ZTS9b2Fixture", !19, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !17, i64 32, !19, i64 48, !19, i64 52, !19, i64 56, !70, i64 60, !21, i64 66, !71, i64 72, !12, i64 80}
!70 = !{!"_ZTS8b2Filter", !31, i64 0, !31, i64 2, !31, i64 4}
!71 = !{!"_ZTS17b2FixtureUserData", !36, i64 0}
!72 = !{!21, !21, i64 0}
!73 = !{!42, !6, i64 32}
!74 = distinct !{!74, !40}
!75 = distinct !{!75, !40}
!76 = !{!77, !19, i64 0}
!77 = !{!"_ZTS10b2TimeStep", !19, i64 0, !19, i64 4, !19, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !21, i64 24}
!78 = !{!77, !19, i64 4}
!79 = !{!77, !19, i64 8}
!80 = !{!77, !12, i64 16}
!81 = !{!77, !12, i64 12}
!82 = !{!77, !12, i64 20}
!83 = !{!77, !21, i64 24}
!84 = !{!29, !12, i64 8}
!85 = !{!63, !6, i64 16}
!86 = distinct !{!86, !40}
!87 = distinct !{!87, !40}
!88 = distinct !{!88, !40}
!89 = !{!57, !6, i64 0}
!90 = distinct !{!90, !40}
!91 = distinct !{!91, !40}
!92 = !{!10, !21, i64 103330}


; 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"

%class.b2Island = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32 }
%class.b2TOIMinHeap = type { i32, i32, ptr }
%struct.b2TOIQueryWrapper = type { ptr, ptr, ptr }
%struct.b2Sweep = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float }
%struct.b2Vec2 = type { float, float }
%struct.b2TimeStep = type { float, float, float, i32, i32, i32, i8 }

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7b2World18RemoveDeadContactsEv(ptr noundef nonnull align 8 dereferenceable(103352)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN6b2Body15GetContactCountEv(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6b2Body10GetContactEi(ptr noundef nonnull align 8 dereferenceable(208), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9b2Contact11GetFixtureAEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9b2Contact11GetFixtureBEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6b2Body8SetAwakeEb(ptr noundef nonnull align 8 dereferenceable(208), i1 noundef zeroext) local_unnamed_addr #4 align 2

declare void @_ZN8b2IslandC1EiiiP16b2StackAllocatorP17b2ContactListener(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8b2Island5ClearEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8b2Island3AddEP6b2Body(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9b2Contact9IsEnabledEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9b2Contact10IsTouchingEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8b2Island3AddEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) local_unnamed_addr #6 align 2

; Function Attrs: nounwind
declare void @_ZN8b2IslandD1Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN12b2TOIMinHeap7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN12b2TOIMinHeap3MinEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12b2TOIMinHeap6InsertEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #2 align 2

declare noundef float @_ZN9b2Contact12CalculateTOIEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12b2TOIMinHeap6UpdateEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12b2TOIMinHeap5BuildEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7b2World8SolveTOIERK10b2TimeStep(ptr noundef nonnull align 8 dereferenceable(103352) %0, ptr nocapture noundef nonnull readonly align 4 dereferenceable(28) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.b2Island, align 8
  %4 = alloca %class.b2TOIMinHeap, align 8
  %5 = alloca %struct.b2TOIQueryWrapper, align 8
  %6 = alloca %struct.b2Sweep, align 4
  %7 = alloca %struct.b2Sweep, align 4
  %8 = alloca %struct.b2Sweep, align 4
  %9 = alloca %struct.b2TimeStep, align 4
  %10 = getelementptr inbounds i8, ptr %0, i64 103064
  %11 = getelementptr inbounds i8, ptr %0, i64 103208
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %337, label %14

14:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #9
  %15 = getelementptr inbounds i8, ptr %0, i64 128
  %16 = getelementptr inbounds i8, ptr %0, i64 103224
  %17 = load ptr, ptr %16, align 8, !tbaa !22
  call void @_ZN8b2IslandC1EiiiP16b2StackAllocatorP17b2ContactListener(ptr noundef nonnull align 8 dereferenceable(80) %3, i32 noundef 64, i32 noundef 32, i32 noundef 0, ptr noundef nonnull %15, ptr noundef %17)
  %18 = getelementptr inbounds i8, ptr %0, i64 103331
  %19 = load i8, ptr %18, align 1, !tbaa !23, !range !24, !noundef !25
  %20 = trunc nuw i8 %19 to i1
  br i1 %20, label %21, label %.loopexit201

21:                                               ; preds = %14
  %22 = getelementptr inbounds i8, ptr %0, i64 103248
  %.0136205 = load ptr, ptr %22, align 8, !tbaa !26
  %.not206 = icmp eq ptr %.0136205, null
  br i1 %.not206, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %21
  %23 = call noundef ptr @_ZNK16b2ContactManager5StartEv(ptr noundef nonnull align 8 dereferenceable(184) %10)
  %24 = call noundef ptr @_ZNK16b2ContactManager3EndEv(ptr noundef nonnull align 8 dereferenceable(184) %10)
  %.not166208 = icmp eq ptr %23, %24
  br i1 %.not166208, label %.loopexit201, label %.lr.ph211

.lr.ph:                                           ; preds = %21, %.lr.ph
  %.0136207 = phi ptr [ %.0136, %.lr.ph ], [ %.0136205, %21 ]
  %25 = getelementptr inbounds i8, ptr %.0136207, i64 4
  %26 = load i16, ptr %25, align 4, !tbaa !27
  %27 = and i16 %26, -2
  store i16 %27, ptr %25, align 4, !tbaa !27
  %28 = getelementptr inbounds i8, ptr %.0136207, i64 76
  store float 0.000000e+00, ptr %28, align 4, !tbaa !36
  %29 = getelementptr inbounds i8, ptr %.0136207, i64 120
  %.0136 = load ptr, ptr %29, align 8, !tbaa !26
  %.not = icmp eq ptr %.0136, null
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !37

.lr.ph211:                                        ; preds = %._crit_edge, %.lr.ph211
  %.0138209 = phi ptr [ %34, %.lr.ph211 ], [ %23, %._crit_edge ]
  %30 = getelementptr inbounds i8, ptr %.0138209, i64 104
  %31 = load i32, ptr %30, align 8, !tbaa !39
  %32 = and i32 %31, -2
  store i32 %32, ptr %30, align 8, !tbaa !39
  %33 = getelementptr inbounds i8, ptr %.0138209, i64 108
  store i32 -1, ptr %33, align 4, !tbaa !43
  %34 = call noundef ptr @_ZN9b2Contact7GetNextEv(ptr noundef nonnull align 8 dereferenceable(128) %.0138209)
  %35 = call noundef ptr @_ZNK16b2ContactManager3EndEv(ptr noundef nonnull align 8 dereferenceable(184) %10)
  %.not166 = icmp eq ptr %34, %35
  br i1 %.not166, label %.loopexit201, label %.lr.ph211, !llvm.loop !44

.loopexit201:                                     ; preds = %.lr.ph211, %._crit_edge, %14
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #9
  %36 = load i32, ptr %11, align 8, !tbaa !5
  %37 = mul nsw i32 %36, 3
  %38 = sdiv i32 %37, 2
  invoke void @_ZN12b2TOIMinHeapC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %38)
          to label %39 unwind label %42

39:                                               ; preds = %.loopexit201
  %40 = call noundef ptr @_ZNK16b2ContactManager5StartEv(ptr noundef nonnull align 8 dereferenceable(184) %10)
  %41 = call noundef ptr @_ZNK16b2ContactManager3EndEv(ptr noundef nonnull align 8 dereferenceable(184) %10)
  %.not167212 = icmp eq ptr %40, %41
  br i1 %.not167212, label %._crit_edge217, label %.lr.ph216

._crit_edge217:                                   ; preds = %58, %39
  %.0150.lcssa = phi i32 [ 0, %39 ], [ %.2152, %58 ]
  store i32 %.0150.lcssa, ptr %4, align 8, !tbaa !45
  invoke void @_ZN12b2TOIMinHeap5BuildEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %61 unwind label %90

42:                                               ; preds = %.loopexit201
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %342

.lr.ph216:                                        ; preds = %39, %58
  %.0150214 = phi i32 [ %.2152, %58 ], [ 0, %39 ]
  %.0153213 = phi ptr [ %59, %58 ], [ %40, %39 ]
  %44 = call noundef zeroext i1 @_ZNK9b2Contact9IsEnabledEv(ptr noundef nonnull align 8 dereferenceable(128) %.0153213)
  br i1 %44, label %45, label %58

45:                                               ; preds = %.lr.ph216
  %46 = invoke noundef float @_ZN9b2Contact12CalculateTOIEv(ptr noundef nonnull align 8 dereferenceable(128) %.0153213)
          to label %47 unwind label %56

47:                                               ; preds = %45
  %48 = fcmp olt float %46, 1.000000e+00
  br i1 %48, label %49, label %58

49:                                               ; preds = %47
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12b2TOIMinHeapixEi(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %.0150214)
  %51 = getelementptr inbounds i8, ptr %50, i64 8
  store ptr %.0153213, ptr %51, align 8, !tbaa !47
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12b2TOIMinHeapixEi(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %.0150214)
  store float %46, ptr %52, align 8, !tbaa !49
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12b2TOIMinHeapixEi(ptr noundef nonnull align 8 dereferenceable(16) %4, i32 noundef %.0150214)
  %54 = getelementptr inbounds i8, ptr %53, i64 4
  store i32 0, ptr %54, align 4, !tbaa !50
  %55 = add nsw i32 %.0150214, 1
  br label %58

56:                                               ; preds = %45
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %341

58:                                               ; preds = %47, %49, %.lr.ph216
  %.2152 = phi i32 [ %.0150214, %.lr.ph216 ], [ %55, %49 ], [ %.0150214, %47 ]
  %59 = call noundef ptr @_ZN9b2Contact7GetNextEv(ptr noundef nonnull align 8 dereferenceable(128) %.0153213)
  %60 = call noundef ptr @_ZNK16b2ContactManager3EndEv(ptr noundef nonnull align 8 dereferenceable(184) %10)
  %.not167 = icmp eq ptr %59, %60
  br i1 %.not167, label %._crit_edge217, label %.lr.ph216, !llvm.loop !51

61:                                               ; preds = %._crit_edge217
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #9
  %62 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr %10, ptr %62, align 8, !tbaa !52
  %63 = getelementptr inbounds i8, ptr %5, i64 16
  store ptr %4, ptr %63, align 8, !tbaa !54
  %64 = getelementptr inbounds i8, ptr %3, i64 56
  %65 = getelementptr inbounds i8, ptr %3, i64 68
  %66 = getelementptr inbounds i8, ptr %3, i64 64
  %67 = getelementptr inbounds i8, ptr %3, i64 72
  %68 = getelementptr inbounds i8, ptr %9, i64 4
  %69 = getelementptr inbounds i8, ptr %9, i64 8
  %70 = getelementptr inbounds i8, ptr %9, i64 16
  %71 = getelementptr inbounds i8, ptr %1, i64 12
  %72 = getelementptr inbounds i8, ptr %9, i64 12
  %73 = getelementptr inbounds i8, ptr %1, i64 20
  %74 = getelementptr inbounds i8, ptr %9, i64 20
  %75 = getelementptr inbounds i8, ptr %9, i64 24
  %76 = getelementptr inbounds i8, ptr %3, i64 16
  %77 = getelementptr inbounds i8, ptr %0, i64 103330
  br label %78

78:                                               ; preds = %332, %61
  %79 = call noundef zeroext i1 @_ZN12b2TOIMinHeap7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
  br i1 %79, label %.loopexit200, label %80

80:                                               ; preds = %78
  %81 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN12b2TOIMinHeap3MinEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
  %82 = getelementptr inbounds i8, ptr %81, i64 4
  %83 = load i32, ptr %82, align 4, !tbaa !50
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %82, align 4, !tbaa !50
  %85 = getelementptr inbounds i8, ptr %81, i64 8
  %86 = load ptr, ptr %85, align 8, !tbaa !47
  %87 = load float, ptr %81, align 8, !tbaa !49
  %88 = icmp eq ptr %86, null
  %89 = fcmp ogt float %87, 0x3FEFFFFD80000000
  %or.cond = select i1 %88, i1 true, i1 %89
  br i1 %or.cond, label %.thread192, label %92

.thread192:                                       ; preds = %80
  store i8 1, ptr %18, align 1, !tbaa !23
  br label %.loopexit200

90:                                               ; preds = %._crit_edge217
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %341

92:                                               ; preds = %80
  %93 = call noundef ptr @_ZN9b2Contact11GetFixtureAEv(ptr noundef nonnull align 8 dereferenceable(128) %86)
  %94 = call noundef ptr @_ZN9b2Contact11GetFixtureBEv(ptr noundef nonnull align 8 dereferenceable(128) %86)
  %95 = call noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84) %93)
  %96 = call noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84) %94)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %6)
  %97 = getelementptr inbounds i8, ptr %95, i64 44
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %6, ptr noundef nonnull align 4 dereferenceable(36) %97, i64 36, i1 false), !tbaa.struct !55
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %7)
  %98 = getelementptr inbounds i8, ptr %96, i64 44
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %7, ptr noundef nonnull align 4 dereferenceable(36) %98, i64 36, i1 false), !tbaa.struct !55
  invoke void @_ZN6b2Body7AdvanceEf(ptr noundef nonnull align 8 dereferenceable(208) %95, float noundef %87)
          to label %99 unwind label %110

99:                                               ; preds = %92
  invoke void @_ZN6b2Body7AdvanceEf(ptr noundef nonnull align 8 dereferenceable(208) %96, float noundef %87)
          to label %100 unwind label %110

100:                                              ; preds = %99
  %101 = load ptr, ptr %16, align 8, !tbaa !22
  invoke void @_ZN9b2Contact6UpdateEP17b2ContactListener(ptr noundef nonnull align 8 dereferenceable(128) %86, ptr noundef %101)
          to label %102 unwind label %110

102:                                              ; preds = %100
  invoke void @_ZN12b2TOIMinHeap6UpdateEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull %86)
          to label %103 unwind label %110

103:                                              ; preds = %102
  %104 = call noundef zeroext i1 @_ZNK9b2Contact9IsEnabledEv(ptr noundef nonnull align 8 dereferenceable(128) %86)
  br i1 %104, label %105, label %107

105:                                              ; preds = %103
  %106 = call noundef zeroext i1 @_ZNK9b2Contact10IsTouchingEv(ptr noundef nonnull align 8 dereferenceable(128) %86)
  br i1 %106, label %112, label %107

107:                                              ; preds = %105, %103
  call void @_ZN9b2Contact10SetEnabledEb(ptr noundef nonnull align 8 dereferenceable(128) %86, i1 noundef zeroext false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %97, ptr noundef nonnull align 4 dereferenceable(36) %6, i64 36, i1 false), !tbaa.struct !55
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %98, ptr noundef nonnull align 4 dereferenceable(36) %7, i64 36, i1 false), !tbaa.struct !55
  invoke void @_ZN6b2Body20SynchronizeTransformEv(ptr noundef nonnull align 8 dereferenceable(208) %95)
          to label %108 unwind label %110

108:                                              ; preds = %107
  invoke void @_ZN6b2Body20SynchronizeTransformEv(ptr noundef nonnull align 8 dereferenceable(208) %96)
          to label %109 unwind label %110

109:                                              ; preds = %108
  invoke void @_ZN12b2TOIMinHeap6UpdateEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull %86)
          to label %332 unwind label %110, !llvm.loop !57

110:                                              ; preds = %113, %112, %109, %108, %107, %102, %100, %99, %92
  %111 = landingpad { ptr, i32 }
          cleanup
  br label %334

112:                                              ; preds = %105
  invoke void @_ZN6b2Body8SetAwakeEb(ptr noundef nonnull align 8 dereferenceable(208) %95, i1 noundef zeroext true)
          to label %113 unwind label %110

113:                                              ; preds = %112
  invoke void @_ZN6b2Body8SetAwakeEb(ptr noundef nonnull align 8 dereferenceable(208) %96, i1 noundef zeroext true)
          to label %114 unwind label %110

114:                                              ; preds = %113
  call void @_ZN8b2Island5ClearEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  call void @_ZN8b2Island3AddEP6b2Body(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull %95)
  call void @_ZN8b2Island3AddEP6b2Body(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull %96)
  call void @_ZN8b2Island3AddEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull %86)
  %115 = getelementptr inbounds i8, ptr %95, i64 4
  %116 = load i16, ptr %115, align 4, !tbaa !27
  %117 = or i16 %116, 1
  store i16 %117, ptr %115, align 4, !tbaa !27
  %118 = getelementptr inbounds i8, ptr %96, i64 4
  %119 = load i16, ptr %118, align 4, !tbaa !27
  %120 = or i16 %119, 1
  store i16 %120, ptr %118, align 4, !tbaa !27
  %121 = getelementptr inbounds i8, ptr %86, i64 104
  %122 = load i32, ptr %121, align 8, !tbaa !39
  %123 = or i32 %122, 1
  store i32 %123, ptr %121, align 8, !tbaa !39
  %124 = load i32, ptr %95, align 8, !tbaa !58
  %125 = icmp eq i32 %124, 2
  br i1 %125, label %.preheader197, label %.thread190

.preheader199:                                    ; preds = %.thread190.1
  %126 = load i32, ptr %64, align 8, !tbaa !59
  %127 = icmp sgt i32 %126, 0
  br i1 %127, label %.lr.ph230, label %._crit_edge237

.preheader197:                                    ; preds = %114
  %128 = call noundef i32 @_ZN6b2Body15GetContactCountEv(ptr noundef nonnull align 8 dereferenceable(208) %95)
  %129 = icmp sgt i32 %128, 0
  br i1 %129, label %.lr.ph219, label %.thread190

.lr.ph219:                                        ; preds = %.preheader197, %.thread
  %.0162218 = phi i32 [ %192, %.thread ], [ 0, %.preheader197 ]
  %130 = call noundef ptr @_ZN6b2Body10GetContactEi(ptr noundef nonnull align 8 dereferenceable(208) %95, i32 noundef %.0162218)
  %131 = load i32, ptr %64, align 8, !tbaa !59
  %132 = load i32, ptr %65, align 4, !tbaa !61
  %133 = icmp eq i32 %131, %132
  br i1 %133, label %.thread190, label %134

134:                                              ; preds = %.lr.ph219
  %135 = load i32, ptr %66, align 8, !tbaa !62
  %136 = load i32, ptr %67, align 8, !tbaa !63
  %137 = icmp eq i32 %135, %136
  br i1 %137, label %.thread190, label %138

138:                                              ; preds = %134
  %139 = getelementptr inbounds i8, ptr %130, i64 104
  %140 = load i32, ptr %139, align 8, !tbaa !39
  %141 = and i32 %140, 3
  %or.cond187.not = icmp eq i32 %141, 2
  br i1 %or.cond187.not, label %142, label %.thread

142:                                              ; preds = %138
  %143 = call noundef ptr @_ZN9b2Contact11GetFixtureAEv(ptr noundef nonnull align 8 dereferenceable(128) %130)
  %144 = call noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84) %143)
  %145 = call noundef ptr @_ZN9b2Contact11GetFixtureBEv(ptr noundef nonnull align 8 dereferenceable(128) %130)
  %146 = call noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84) %145)
  %147 = icmp eq ptr %144, %95
  %148 = select i1 %147, ptr %146, ptr %144
  %149 = load i32, ptr %148, align 8, !tbaa !58
  %150 = icmp eq i32 %149, 2
  br i1 %150, label %151, label %155

151:                                              ; preds = %142
  %152 = call noundef zeroext i1 @_ZNK6b2Body8IsBulletEv(ptr noundef nonnull align 8 dereferenceable(208) %95)
  br i1 %152, label %155, label %153

153:                                              ; preds = %151
  %154 = call noundef zeroext i1 @_ZNK6b2Body8IsBulletEv(ptr noundef nonnull align 8 dereferenceable(208) %148)
  br i1 %154, label %155, label %.thread

155:                                              ; preds = %153, %151, %142
  %156 = getelementptr inbounds i8, ptr %130, i64 24
  %157 = load ptr, ptr %156, align 8, !tbaa !64
  %158 = getelementptr inbounds i8, ptr %157, i64 66
  %159 = load i8, ptr %158, align 2, !tbaa !65, !range !24, !noundef !25
  %160 = trunc nuw i8 %159 to i1
  br i1 %160, label %.thread, label %161

161:                                              ; preds = %155
  %162 = getelementptr inbounds i8, ptr %130, i64 32
  %163 = load ptr, ptr %162, align 8, !tbaa !69
  %164 = getelementptr inbounds i8, ptr %163, i64 66
  %165 = load i8, ptr %164, align 2, !tbaa !65, !range !24, !noundef !25
  %166 = trunc nuw i8 %165 to i1
  br i1 %166, label %.thread, label %167

167:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %8)
  %168 = getelementptr inbounds i8, ptr %148, i64 44
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %8, ptr noundef nonnull align 4 dereferenceable(36) %168, i64 36, i1 false), !tbaa.struct !55
  %169 = getelementptr inbounds i8, ptr %148, i64 4
  %170 = load i16, ptr %169, align 4, !tbaa !27
  %171 = and i16 %170, 1
  %172 = icmp eq i16 %171, 0
  br i1 %172, label %173, label %175

173:                                              ; preds = %167
  invoke void @_ZN6b2Body7AdvanceEf(ptr noundef nonnull align 8 dereferenceable(208) %148, float noundef %87)
          to label %175 unwind label %.loopexit239

.loopexit239:                                     ; preds = %.invoke, %173, %175, %189
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %174

.loopexit.split-lp:                               ; preds = %.invoke244, %242, %243, %257
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %174

174:                                              ; preds = %.loopexit.split-lp, %.loopexit239
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit239 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %8)
  br label %334

175:                                              ; preds = %173, %167
  %176 = load ptr, ptr %16, align 8, !tbaa !22
  invoke void @_ZN9b2Contact6UpdateEP17b2ContactListener(ptr noundef nonnull align 8 dereferenceable(128) %130, ptr noundef %176)
          to label %177 unwind label %.loopexit239

177:                                              ; preds = %175
  %178 = call noundef zeroext i1 @_ZNK9b2Contact9IsEnabledEv(ptr noundef nonnull align 8 dereferenceable(128) %130)
  br i1 %178, label %179, label %.invoke

.invoke:                                          ; preds = %177, %179
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %168, ptr noundef nonnull align 4 dereferenceable(36) %8, i64 36, i1 false)
  invoke void @_ZN6b2Body20SynchronizeTransformEv(ptr noundef nonnull align 8 dereferenceable(208) %148)
          to label %191 unwind label %.loopexit239

179:                                              ; preds = %177
  %180 = call noundef zeroext i1 @_ZNK9b2Contact10IsTouchingEv(ptr noundef nonnull align 8 dereferenceable(128) %130)
  br i1 %180, label %181, label %.invoke

181:                                              ; preds = %179
  %182 = load i32, ptr %139, align 8, !tbaa !39
  %183 = or i32 %182, 1
  store i32 %183, ptr %139, align 8, !tbaa !39
  call void @_ZN8b2Island3AddEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull %130)
  %184 = load i16, ptr %169, align 4, !tbaa !27
  %185 = and i16 %184, 1
  %.not175 = icmp eq i16 %185, 0
  br i1 %.not175, label %186, label %191

186:                                              ; preds = %181
  %187 = or disjoint i16 %184, 1
  store i16 %187, ptr %169, align 4, !tbaa !27
  %188 = load i32, ptr %148, align 8, !tbaa !58
  %.not176 = icmp eq i32 %188, 0
  br i1 %.not176, label %190, label %189

189:                                              ; preds = %186
  invoke void @_ZN6b2Body8SetAwakeEb(ptr noundef nonnull align 8 dereferenceable(208) %148, i1 noundef zeroext true)
          to label %190 unwind label %.loopexit239

190:                                              ; preds = %189, %186
  call void @_ZN8b2Island3AddEP6b2Body(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull %148)
  br label %191

191:                                              ; preds = %.invoke, %190, %181
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %8)
  br label %.thread

.thread:                                          ; preds = %155, %161, %153, %138, %191
  %192 = add nuw nsw i32 %.0162218, 1
  %193 = call noundef i32 @_ZN6b2Body15GetContactCountEv(ptr noundef nonnull align 8 dereferenceable(208) %95)
  %194 = icmp slt i32 %192, %193
  br i1 %194, label %.lr.ph219, label %.thread190, !llvm.loop !70

.thread190:                                       ; preds = %.thread, %.lr.ph219, %134, %.preheader197, %114
  %195 = load i32, ptr %96, align 8, !tbaa !58
  %196 = icmp eq i32 %195, 2
  br i1 %196, label %.preheader197.1, label %.thread190.1

.preheader197.1:                                  ; preds = %.thread190
  %197 = call noundef i32 @_ZN6b2Body15GetContactCountEv(ptr noundef nonnull align 8 dereferenceable(208) %96)
  %198 = icmp sgt i32 %197, 0
  br i1 %198, label %.lr.ph219.1, label %.thread190.1

.lr.ph219.1:                                      ; preds = %.preheader197.1, %.thread.1
  %.0162218.1 = phi i32 [ %260, %.thread.1 ], [ 0, %.preheader197.1 ]
  %199 = call noundef ptr @_ZN6b2Body10GetContactEi(ptr noundef nonnull align 8 dereferenceable(208) %96, i32 noundef %.0162218.1)
  %200 = load i32, ptr %64, align 8, !tbaa !59
  %201 = load i32, ptr %65, align 4, !tbaa !61
  %202 = icmp eq i32 %200, %201
  br i1 %202, label %.thread190.1, label %203

203:                                              ; preds = %.lr.ph219.1
  %204 = load i32, ptr %66, align 8, !tbaa !62
  %205 = load i32, ptr %67, align 8, !tbaa !63
  %206 = icmp eq i32 %204, %205
  br i1 %206, label %.thread190.1, label %207

207:                                              ; preds = %203
  %208 = getelementptr inbounds i8, ptr %199, i64 104
  %209 = load i32, ptr %208, align 8, !tbaa !39
  %210 = and i32 %209, 3
  %or.cond187.not.1 = icmp eq i32 %210, 2
  br i1 %or.cond187.not.1, label %211, label %.thread.1

211:                                              ; preds = %207
  %212 = call noundef ptr @_ZN9b2Contact11GetFixtureAEv(ptr noundef nonnull align 8 dereferenceable(128) %199)
  %213 = call noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84) %212)
  %214 = call noundef ptr @_ZN9b2Contact11GetFixtureBEv(ptr noundef nonnull align 8 dereferenceable(128) %199)
  %215 = call noundef ptr @_ZN9b2Fixture7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(84) %214)
  %216 = icmp eq ptr %213, %96
  %217 = select i1 %216, ptr %215, ptr %213
  %218 = load i32, ptr %217, align 8, !tbaa !58
  %219 = icmp eq i32 %218, 2
  br i1 %219, label %220, label %224

220:                                              ; preds = %211
  %221 = call noundef zeroext i1 @_ZNK6b2Body8IsBulletEv(ptr noundef nonnull align 8 dereferenceable(208) %96)
  br i1 %221, label %224, label %222

222:                                              ; preds = %220
  %223 = call noundef zeroext i1 @_ZNK6b2Body8IsBulletEv(ptr noundef nonnull align 8 dereferenceable(208) %217)
  br i1 %223, label %224, label %.thread.1

224:                                              ; preds = %222, %220, %211
  %225 = getelementptr inbounds i8, ptr %199, i64 24
  %226 = load ptr, ptr %225, align 8, !tbaa !64
  %227 = getelementptr inbounds i8, ptr %226, i64 66
  %228 = load i8, ptr %227, align 2, !tbaa !65, !range !24, !noundef !25
  %229 = trunc nuw i8 %228 to i1
  br i1 %229, label %.thread.1, label %230

230:                                              ; preds = %224
  %231 = getelementptr inbounds i8, ptr %199, i64 32
  %232 = load ptr, ptr %231, align 8, !tbaa !69
  %233 = getelementptr inbounds i8, ptr %232, i64 66
  %234 = load i8, ptr %233, align 2, !tbaa !65, !range !24, !noundef !25
  %235 = trunc nuw i8 %234 to i1
  br i1 %235, label %.thread.1, label %236

236:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %8)
  %237 = getelementptr inbounds i8, ptr %217, i64 44
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %8, ptr noundef nonnull align 4 dereferenceable(36) %237, i64 36, i1 false), !tbaa.struct !55
  %238 = getelementptr inbounds i8, ptr %217, i64 4
  %239 = load i16, ptr %238, align 4, !tbaa !27
  %240 = and i16 %239, 1
  %241 = icmp eq i16 %240, 0
  br i1 %241, label %242, label %243

242:                                              ; preds = %236
  invoke void @_ZN6b2Body7AdvanceEf(ptr noundef nonnull align 8 dereferenceable(208) %217, float noundef %87)
          to label %243 unwind label %.loopexit.split-lp

243:                                              ; preds = %242, %236
  %244 = load ptr, ptr %16, align 8, !tbaa !22
  invoke void @_ZN9b2Contact6UpdateEP17b2ContactListener(ptr noundef nonnull align 8 dereferenceable(128) %199, ptr noundef %244)
          to label %245 unwind label %.loopexit.split-lp

245:                                              ; preds = %243
  %246 = call noundef zeroext i1 @_ZNK9b2Contact9IsEnabledEv(ptr noundef nonnull align 8 dereferenceable(128) %199)
  br i1 %246, label %247, label %.invoke244

.invoke244:                                       ; preds = %245, %247
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %237, ptr noundef nonnull align 4 dereferenceable(36) %8, i64 36, i1 false)
  invoke void @_ZN6b2Body20SynchronizeTransformEv(ptr noundef nonnull align 8 dereferenceable(208) %217)
          to label %259 unwind label %.loopexit.split-lp

247:                                              ; preds = %245
  %248 = call noundef zeroext i1 @_ZNK9b2Contact10IsTouchingEv(ptr noundef nonnull align 8 dereferenceable(128) %199)
  br i1 %248, label %249, label %.invoke244

249:                                              ; preds = %247
  %250 = load i32, ptr %208, align 8, !tbaa !39
  %251 = or i32 %250, 1
  store i32 %251, ptr %208, align 8, !tbaa !39
  call void @_ZN8b2Island3AddEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull %199)
  %252 = load i16, ptr %238, align 4, !tbaa !27
  %253 = and i16 %252, 1
  %.not175.1 = icmp eq i16 %253, 0
  br i1 %.not175.1, label %254, label %259

254:                                              ; preds = %249
  %255 = or disjoint i16 %252, 1
  store i16 %255, ptr %238, align 4, !tbaa !27
  %256 = load i32, ptr %217, align 8, !tbaa !58
  %.not176.1 = icmp eq i32 %256, 0
  br i1 %.not176.1, label %258, label %257

257:                                              ; preds = %254
  invoke void @_ZN6b2Body8SetAwakeEb(ptr noundef nonnull align 8 dereferenceable(208) %217, i1 noundef zeroext true)
          to label %258 unwind label %.loopexit.split-lp

258:                                              ; preds = %257, %254
  call void @_ZN8b2Island3AddEP6b2Body(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull %217)
  br label %259

259:                                              ; preds = %.invoke244, %258, %249
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %8)
  br label %.thread.1

.thread.1:                                        ; preds = %259, %230, %224, %222, %207
  %260 = add nuw nsw i32 %.0162218.1, 1
  %261 = call noundef i32 @_ZN6b2Body15GetContactCountEv(ptr noundef nonnull align 8 dereferenceable(208) %96)
  %262 = icmp slt i32 %260, %261
  br i1 %262, label %.lr.ph219.1, label %.thread190.1, !llvm.loop !70

.thread190.1:                                     ; preds = %.lr.ph219.1, %203, %.thread.1, %.preheader197.1, %.thread190
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %9) #9
  %263 = fsub float 1.000000e+00, %87
  %264 = load float, ptr %1, align 4, !tbaa !71
  %265 = fmul float %263, %264
  store float %265, ptr %9, align 4, !tbaa !71
  %266 = fdiv float 1.000000e+00, %265
  store float %266, ptr %68, align 4, !tbaa !73
  store float 1.000000e+00, ptr %69, align 4, !tbaa !74
  store i32 20, ptr %70, align 4, !tbaa !75
  %267 = load i32, ptr %71, align 4, !tbaa !76
  store i32 %267, ptr %72, align 4, !tbaa !76
  %268 = load i32, ptr %73, align 4, !tbaa !77
  store i32 %268, ptr %74, align 4, !tbaa !77
  store i8 0, ptr %75, align 4, !tbaa !78
  %269 = getelementptr inbounds i8, ptr %95, i64 8
  %270 = load i32, ptr %269, align 8, !tbaa !79
  %271 = getelementptr inbounds i8, ptr %96, i64 8
  %272 = load i32, ptr %271, align 8, !tbaa !79
  invoke void @_ZN8b2Island8SolveTOIERK10b2TimeStepii(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(28) %9, i32 noundef %270, i32 noundef %272)
          to label %.preheader199 unwind label %274

.preheader198:                                    ; preds = %.loopexit196
  %273 = icmp sgt i32 %310, 0
  br i1 %273, label %.lr.ph236, label %._crit_edge237

274:                                              ; preds = %.thread190.1
  %275 = landingpad { ptr, i32 }
          cleanup
  br label %333

.lr.ph230:                                        ; preds = %.preheader199, %.loopexit196
  %indvars.iv = phi i64 [ %indvars.iv.next, %.loopexit196 ], [ 0, %.preheader199 ]
  %276 = load ptr, ptr %76, align 8, !tbaa !80
  %277 = getelementptr inbounds ptr, ptr %276, i64 %indvars.iv
  %278 = load ptr, ptr %277, align 8, !tbaa !26
  %279 = getelementptr inbounds i8, ptr %278, i64 4
  %280 = load i16, ptr %279, align 4, !tbaa !27
  %281 = and i16 %280, -2
  store i16 %281, ptr %279, align 4, !tbaa !27
  %282 = load i32, ptr %278, align 8, !tbaa !58
  %.not169 = icmp eq i32 %282, 2
  br i1 %.not169, label %283, label %.loopexit196

283:                                              ; preds = %.lr.ph230
  %284 = call noundef ptr @_ZN6b2Body14GetFixtureListEv(ptr noundef nonnull align 8 dereferenceable(208) %278)
  %.not170223 = icmp eq ptr %284, null
  br i1 %.not170223, label %.preheader, label %.lr.ph226

.preheader:                                       ; preds = %290, %283
  %285 = call noundef i32 @_ZN6b2Body15GetContactCountEv(ptr noundef nonnull align 8 dereferenceable(208) %278)
  %286 = icmp sgt i32 %285, 0
  br i1 %286, label %.lr.ph228, label %.loopexit196

287:                                              ; preds = %.lr.ph226
  %288 = landingpad { ptr, i32 }
          cleanup
  br label %333

.lr.ph226:                                        ; preds = %283, %290
  %.0140224 = phi ptr [ %291, %290 ], [ %284, %283 ]
  %289 = invoke noundef zeroext i1 @_ZN12b2BroadPhase15UpdateNoRebuildEP9b2Fixture(ptr noundef nonnull align 8 dereferenceable(137) %10, ptr noundef nonnull %.0140224)
          to label %290 unwind label %287

290:                                              ; preds = %.lr.ph226
  %291 = call noundef ptr @_ZN9b2Fixture7GetNextEv(ptr noundef nonnull align 8 dereferenceable(84) %.0140224)
  %.not170 = icmp eq ptr %291, null
  br i1 %.not170, label %.preheader, label %.lr.ph226, !llvm.loop !81

.lr.ph228:                                        ; preds = %.preheader, %304
  %.0139227 = phi i32 [ %307, %304 ], [ 0, %.preheader ]
  %292 = call noundef ptr @_ZN6b2Body10GetContactEi(ptr noundef nonnull align 8 dereferenceable(208) %278, i32 noundef %.0139227)
  %293 = getelementptr inbounds i8, ptr %292, i64 104
  %294 = load i32, ptr %293, align 8, !tbaa !39
  %295 = and i32 %294, 2
  %.not171 = icmp eq i32 %295, 0
  br i1 %.not171, label %304, label %296

296:                                              ; preds = %.lr.ph228
  %297 = getelementptr inbounds i8, ptr %292, i64 108
  %298 = load i32, ptr %297, align 4, !tbaa !43
  %299 = icmp eq i32 %298, -1
  br i1 %299, label %300, label %303

300:                                              ; preds = %296
  invoke void @_ZN12b2TOIMinHeap6InsertEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull %292)
          to label %304 unwind label %301

301:                                              ; preds = %303, %300
  %302 = landingpad { ptr, i32 }
          cleanup
  br label %333

303:                                              ; preds = %296
  invoke void @_ZN12b2TOIMinHeap6UpdateEP9b2Contact(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull %292)
          to label %304 unwind label %301

304:                                              ; preds = %300, %303, %.lr.ph228
  %305 = load i32, ptr %293, align 8, !tbaa !39
  %306 = and i32 %305, -4
  store i32 %306, ptr %293, align 8, !tbaa !39
  %307 = add nuw nsw i32 %.0139227, 1
  %308 = call noundef i32 @_ZN6b2Body15GetContactCountEv(ptr noundef nonnull align 8 dereferenceable(208) %278)
  %309 = icmp slt i32 %307, %308
  br i1 %309, label %.lr.ph228, label %.loopexit196, !llvm.loop !82

.loopexit196:                                     ; preds = %304, %.preheader, %.lr.ph230
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %310 = load i32, ptr %64, align 8, !tbaa !59
  %311 = sext i32 %310 to i64
  %312 = icmp slt i64 %indvars.iv.next, %311
  br i1 %312, label %.lr.ph230, label %.preheader198, !llvm.loop !83

._crit_edge237:                                   ; preds = %.loopexit, %.preheader199, %.preheader198
  %313 = load i8, ptr %77, align 2, !tbaa !84, !range !24, !noundef !25
  %314 = trunc nuw i8 %313 to i1
  br i1 %314, label %330, label %331

.lr.ph236:                                        ; preds = %.preheader198, %.loopexit
  %indvars.iv241 = phi i64 [ %indvars.iv.next242, %.loopexit ], [ 0, %.preheader198 ]
  %315 = load ptr, ptr %76, align 8, !tbaa !80
  %316 = getelementptr inbounds ptr, ptr %315, i64 %indvars.iv241
  %317 = load ptr, ptr %316, align 8, !tbaa !26
  %318 = load i32, ptr %317, align 8, !tbaa !58
  %319 = icmp eq i32 %318, 2
  br i1 %319, label %320, label %.loopexit

320:                                              ; preds = %.lr.ph236
  %321 = call noundef ptr @_ZN6b2Body14GetFixtureListEv(ptr noundef nonnull align 8 dereferenceable(208) %317)
  %.not168231 = icmp eq ptr %321, null
  br i1 %.not168231, label %.loopexit, label %.lr.ph234

322:                                              ; preds = %.lr.ph234
  %323 = landingpad { ptr, i32 }
          cleanup
  br label %333

.lr.ph234:                                        ; preds = %320, %325
  %.0232 = phi ptr [ %326, %325 ], [ %321, %320 ]
  store ptr %.0232, ptr %5, align 8, !tbaa !85
  %324 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9b2Fixture7GetAABBEv(ptr noundef nonnull align 8 dereferenceable(84) %.0232)
  invoke void @_ZN12b2BroadPhase5QueryI17b2TOIQueryWrapperEEvPT_RK6b2AABB(ptr noundef nonnull align 8 dereferenceable(137) %10, ptr noundef nonnull %5, ptr noundef nonnull align 4 dereferenceable(16) %324)
          to label %325 unwind label %322

325:                                              ; preds = %.lr.ph234
  %326 = call noundef ptr @_ZN9b2Fixture7GetNextEv(ptr noundef nonnull align 8 dereferenceable(84) %.0232)
  %.not168 = icmp eq ptr %326, null
  br i1 %.not168, label %.loopexit, label %.lr.ph234, !llvm.loop !86

.loopexit:                                        ; preds = %325, %320, %.lr.ph236
  %indvars.iv.next242 = add nuw nsw i64 %indvars.iv241, 1
  %327 = load i32, ptr %64, align 8, !tbaa !59
  %328 = sext i32 %327 to i64
  %329 = icmp slt i64 %indvars.iv.next242, %328
  br i1 %329, label %.lr.ph236, label %._crit_edge237, !llvm.loop !87

330:                                              ; preds = %._crit_edge237
  store i8 0, ptr %18, align 1, !tbaa !23
  br label %331

331:                                              ; preds = %._crit_edge237, %330
  %.4158 = phi i32 [ 12, %330 ], [ 0, %._crit_edge237 ]
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %9) #9
  br label %332

332:                                              ; preds = %331, %109
  %.5159 = phi i32 [ %.4158, %331 ], [ 11, %109 ]
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %7)
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %6)
  %switch = icmp eq i32 %.5159, 12
  br i1 %switch, label %.loopexit200, label %78

333:                                              ; preds = %287, %301, %322, %274
  %.pn.pn = phi { ptr, i32 } [ %323, %322 ], [ %275, %274 ], [ %288, %287 ], [ %302, %301 ]
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %9) #9
  br label %334

334:                                              ; preds = %174, %333, %110
  %.pn179 = phi { ptr, i32 } [ %111, %110 ], [ %lpad.phi, %174 ], [ %.pn.pn, %333 ]
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %7)
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %6)
  br label %340

.loopexit200:                                     ; preds = %332, %78, %.thread192
  invoke void @_ZN7b2World18RemoveDeadContactsEv(ptr noundef nonnull align 8 dereferenceable(103352) %0)
          to label %335 unwind label %338

335:                                              ; preds = %.loopexit200
  invoke void @_ZN16b2ContactManager18RemoveDeadContactsEv(ptr noundef nonnull align 8 dereferenceable(184) %10)
          to label %336 unwind label %338

336:                                              ; preds = %335
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  call void @_ZN12b2TOIMinHeapD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  call void @_ZN8b2IslandD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #9
  br label %337

337:                                              ; preds = %2, %336
  ret void

338:                                              ; preds = %335, %.loopexit200
  %339 = landingpad { ptr, i32 }
          cleanup
  br label %340

340:                                              ; preds = %338, %334
  %.pn181 = phi { ptr, i32 } [ %339, %338 ], [ %.pn179, %334 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  br label %341

341:                                              ; preds = %340, %90, %56
  %.pn183 = phi { ptr, i32 } [ %57, %56 ], [ %.pn181, %340 ], [ %91, %90 ]
  call void @_ZN12b2TOIMinHeapD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #9
  br label %342

342:                                              ; preds = %341, %42
  %.pn183.pn = phi { ptr, i32 } [ %.pn183, %341 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  call void @_ZN8b2IslandD1Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #9
  resume { ptr, i32 } %.pn183.pn
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK16b2ContactManager5StartEv(ptr noundef nonnull align 8 dereferenceable(184)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK16b2ContactManager3EndEv(ptr noundef nonnull align 8 dereferenceable(184)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9b2Contact7GetNextEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN12b2TOIMinHeapixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6b2Body7AdvanceEf(ptr noundef nonnull align 8 dereferenceable(208), float noundef) local_unnamed_addr #8 align 2

declare void @_ZN9b2Contact6UpdateEP17b2ContactListener(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9b2Contact10SetEnabledEb(ptr noundef nonnull align 8 dereferenceable(128), i1 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6b2Body20SynchronizeTransformEv(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6b2Body8IsBulletEv(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #3 align 2

declare void @_ZN8b2Island8SolveTOIERK10b2TimeStepii(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(28), i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6b2Body14GetFixtureListEv(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #3 align 2

declare noundef zeroext i1 @_ZN12b2BroadPhase15UpdateNoRebuildEP9b2Fixture(ptr noundef nonnull align 8 dereferenceable(137), ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9b2Fixture7GetNextEv(ptr noundef nonnull align 8 dereferenceable(84)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN12b2BroadPhase5QueryI17b2TOIQueryWrapperEEvPT_RK6b2AABB(ptr noundef nonnull align 8 dereferenceable(137), ptr noundef, ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9b2Fixture7GetAABBEv(ptr noundef nonnull align 8 dereferenceable(84)) local_unnamed_addr #3 align 2

declare void @_ZN16b2ContactManager18RemoveDeadContactsEv(ptr noundef nonnull align 8 dereferenceable(184)) local_unnamed_addr #5

declare void @_ZN12b2TOIMinHeapC1Ei(ptr, i32) local_unnamed_addr

declare void @_ZN12b2TOIMinHeapD1Ev(ptr) local_unnamed_addr

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { "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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { 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 103208}
!6 = !{!"_ZTS7b2World", !7, i64 0, !12, i64 128, !13, i64 103064, !8, i64 103248, !8, i64 103256, !8, i64 103264, !8, i64 103272, !11, i64 103280, !11, i64 103284, !17, i64 103288, !20, i64 103296, !8, i64 103304, !8, i64 103312, !18, i64 103320, !20, i64 103324, !20, i64 103325, !20, i64 103326, !20, i64 103327, !20, i64 103328, !20, i64 103329, !20, i64 103330, !20, i64 103331, !21, i64 103332}
!7 = !{!"_ZTS16b2BlockAllocator", !8, i64 0, !11, i64 8, !11, i64 12, !9, i64 16}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"_ZTS16b2StackAllocator", !9, i64 0, !11, i64 102400, !11, i64 102404, !11, i64 102408, !9, i64 102416, !11, i64 102928}
!13 = !{!"_ZTS16b2ContactManager", !14, i64 0, !11, i64 144, !8, i64 152, !8, i64 160, !8, i64 168, !8, i64 176}
!14 = !{!"_ZTS12b2BroadPhase", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !15, i64 32, !8, i64 80, !8, i64 88, !8, i64 96, !11, i64 104, !11, i64 108, !19, i64 112, !11, i64 128, !11, i64 132, !20, i64 136}
!15 = !{!"_ZTS10b2TreeNode", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !16, i64 32}
!16 = !{!"_ZTS6b2AABB", !17, i64 0, !17, i64 8}
!17 = !{!"_ZTS6b2Vec2", !18, i64 0, !18, i64 4}
!18 = !{!"float", !9, i64 0}
!19 = !{!"_ZTS14b2IntHashTable", !8, i64 0, !11, i64 8}
!20 = !{!"bool", !9, i64 0}
!21 = !{!"_ZTS9b2Profile", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16}
!22 = !{!6, !8, i64 103224}
!23 = !{!6, !20, i64 103331}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!8, !8, i64 0}
!27 = !{!28, !30, i64 4}
!28 = !{!"_ZTS6b2Body", !29, i64 0, !30, i64 4, !11, i64 8, !31, i64 12, !31, i64 28, !33, i64 44, !17, i64 80, !18, i64 88, !17, i64 92, !18, i64 100, !8, i64 104, !8, i64 112, !8, i64 120, !8, i64 128, !11, i64 136, !8, i64 144, !8, i64 152, !11, i64 160, !11, i64 164, !18, i64 168, !18, i64 172, !18, i64 176, !18, i64 180, !18, i64 184, !18, i64 188, !18, i64 192, !18, i64 196, !34, i64 200}
!29 = !{!"_ZTS10b2BodyType", !9, i64 0}
!30 = !{!"short", !9, i64 0}
!31 = !{!"_ZTS11b2Transform", !17, i64 0, !32, i64 8}
!32 = !{!"_ZTS5b2Rot", !18, i64 0, !18, i64 4}
!33 = !{!"_ZTS7b2Sweep", !17, i64 0, !17, i64 8, !17, i64 16, !18, i64 24, !18, i64 28, !18, i64 32}
!34 = !{!"_ZTS14b2BodyUserData", !35, i64 0}
!35 = !{!"long", !9, i64 0}
!36 = !{!28, !18, i64 76}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!40, !11, i64 104}
!40 = !{!"_ZTS9b2Contact", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32, !41, i64 40, !11, i64 104, !11, i64 108, !18, i64 112, !18, i64 116, !18, i64 120, !18, i64 124}
!41 = !{!"_ZTS10b2Manifold", !9, i64 0, !17, i64 40, !17, i64 48, !42, i64 56, !11, i64 60}
!42 = !{!"_ZTSN10b2Manifold4TypeE", !9, i64 0}
!43 = !{!40, !11, i64 108}
!44 = distinct !{!44, !38}
!45 = !{!46, !11, i64 0}
!46 = !{!"_ZTS12b2TOIMinHeap", !11, i64 0, !11, i64 4, !8, i64 8}
!47 = !{!48, !8, i64 8}
!48 = !{!"_ZTS10b2HeapNode", !18, i64 0, !11, i64 4, !8, i64 8}
!49 = !{!48, !18, i64 0}
!50 = !{!48, !11, i64 4}
!51 = distinct !{!51, !38}
!52 = !{!53, !8, i64 8}
!53 = !{!"_ZTS17b2TOIQueryWrapper", !8, i64 0, !8, i64 8, !8, i64 16}
!54 = !{!53, !8, i64 16}
!55 = !{i64 0, i64 4, !56, i64 4, i64 4, !56, i64 8, i64 4, !56, i64 12, i64 4, !56, i64 16, i64 4, !56, i64 20, i64 4, !56, i64 24, i64 4, !56, i64 28, i64 4, !56, i64 32, i64 4, !56}
!56 = !{!18, !18, i64 0}
!57 = distinct !{!57, !38}
!58 = !{!28, !29, i64 0}
!59 = !{!60, !11, i64 56}
!60 = !{!"_ZTS8b2Island", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32, !8, i64 40, !8, i64 48, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76}
!61 = !{!60, !11, i64 68}
!62 = !{!60, !11, i64 64}
!63 = !{!60, !11, i64 72}
!64 = !{!40, !8, i64 24}
!65 = !{!66, !20, i64 66}
!66 = !{!"_ZTS9b2Fixture", !18, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !16, i64 32, !18, i64 48, !18, i64 52, !18, i64 56, !67, i64 60, !20, i64 66, !68, i64 72, !11, i64 80}
!67 = !{!"_ZTS8b2Filter", !30, i64 0, !30, i64 2, !30, i64 4}
!68 = !{!"_ZTS17b2FixtureUserData", !35, i64 0}
!69 = !{!40, !8, i64 32}
!70 = distinct !{!70, !38}
!71 = !{!72, !18, i64 0}
!72 = !{!"_ZTS10b2TimeStep", !18, i64 0, !18, i64 4, !18, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !20, i64 24}
!73 = !{!72, !18, i64 4}
!74 = !{!72, !18, i64 8}
!75 = !{!72, !11, i64 16}
!76 = !{!72, !11, i64 12}
!77 = !{!72, !11, i64 20}
!78 = !{!72, !20, i64 24}
!79 = !{!28, !11, i64 8}
!80 = !{!60, !8, i64 16}
!81 = distinct !{!81, !38}
!82 = distinct !{!82, !38}
!83 = distinct !{!83, !38}
!84 = !{!6, !20, i64 103330}
!85 = !{!53, !8, i64 0}
!86 = distinct !{!86, !38}
!87 = distinct !{!87, !38}


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