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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.b2Color = type { float, float, float, float }
%struct.b2Vec2 = type { float, float }
%struct.b2AABB = type { %struct.b2Vec2, %struct.b2Vec2 }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Rot = type { float, float }
%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 }
%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.b2Sweep = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float }
%struct.b2BodyUserData = type { i64 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6b2Body7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(208)) #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 @_ZN9b2Contact11GetFixtureBEv(ptr noundef nonnull align 8 dereferenceable(128)) #3 align 2

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

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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6b2Body14GetFixtureListEv(ptr noundef nonnull align 8 dereferenceable(208)) #3 align 2

; 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9b2Fixture7GetAABBEv(ptr noundef nonnull align 8 dereferenceable(84)) #3 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7b2World9DebugDrawEv(ptr noundef nonnull align 8 dereferenceable(103352) %0) #4 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.b2Color, align 4
  %9 = alloca %struct.b2Color, align 4
  %10 = alloca %struct.b2Color, align 4
  %11 = alloca %struct.b2Color, align 4
  %12 = alloca %struct.b2Color, align 4
  %13 = alloca %struct.b2Color, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %struct.b2Color, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %struct.b2Vec2, align 4
  %21 = alloca %struct.b2Vec2, align 4
  %22 = alloca %struct.b2Color, align 4
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca %struct.b2AABB, align 4
  %27 = alloca [4 x %struct.b2Vec2], align 16
  %28 = alloca ptr, align 8
  %29 = alloca %struct.b2Transform, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %30 = load ptr, ptr %2, align 8
  %31 = getelementptr inbounds %class.b2World, ptr %30, i32 0, i32 12
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %35

34:                                               ; preds = %1
  br label %293

35:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %36 = getelementptr inbounds %class.b2World, ptr %30, i32 0, i32 12
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = call noundef i32 @_ZNK6b2Draw8GetFlagsEv(ptr noundef nonnull align 8 dereferenceable(12) %37)
  store i32 %38, ptr %3, align 4, !tbaa !23
  %39 = load i32, ptr %3, align 4, !tbaa !23
  %40 = and i32 %39, 1
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %116

42:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %43 = getelementptr inbounds %class.b2World, ptr %30, i32 0, i32 3
  %44 = load ptr, ptr %43, align 8, !tbaa !24
  store ptr %44, ptr %4, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %112, %42
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = icmp ne ptr %46, null
  br i1 %47, label %49, label %48

48:                                               ; preds = %45
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %115

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK6b2Body12GetTransformEv(ptr noundef nonnull align 8 dereferenceable(208) %50)
  store ptr %51, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = call noundef ptr @_ZN6b2Body14GetFixtureListEv(ptr noundef nonnull align 8 dereferenceable(208) %52)
  store ptr %53, ptr %7, align 8, !tbaa !5
  br label %54

54:                                               ; preds = %108, %49
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %58, label %57

57:                                               ; preds = %54
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %111

58:                                               ; preds = %54
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = call noundef i32 @_ZNK6b2Body7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(208) %59)
  %61 = icmp eq i32 %60, 2
  br i1 %61, label %62, label %70

62:                                               ; preds = %58
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %class.b2Body, ptr %63, i32 0, i32 19
  %65 = load float, ptr %64, align 8, !tbaa !25
  %66 = fcmp oeq float %65, 0.000000e+00
  br i1 %66, label %67, label %70

67:                                               ; preds = %62
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %8, float noundef 1.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @_ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color(ptr noundef nonnull align 8 dereferenceable(103352) %30, ptr noundef %68, ptr noundef nonnull align 4 dereferenceable(16) %69, ptr noundef nonnull align 4 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  br label %107

70:                                               ; preds = %62, %58
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = call noundef zeroext i1 @_ZNK6b2Body9IsEnabledEv(ptr noundef nonnull align 8 dereferenceable(208) %71)
  %73 = zext i1 %72 to i32
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %75, label %78

75:                                               ; preds = %70
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %9, float noundef 5.000000e-01, float noundef 5.000000e-01, float noundef 0x3FD3333340000000, float noundef 1.000000e+00)
  call void @_ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color(ptr noundef nonnull align 8 dereferenceable(103352) %30, ptr noundef %76, ptr noundef nonnull align 4 dereferenceable(16) %77, ptr noundef nonnull align 4 dereferenceable(16) %9)
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  br label %106

78:                                               ; preds = %70
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = call noundef i32 @_ZNK6b2Body7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(208) %79)
  %81 = icmp eq i32 %80, 0
  br i1 %81, label %82, label %85

82:                                               ; preds = %78
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %10, float noundef 5.000000e-01, float noundef 0x3FECCCCCC0000000, float noundef 5.000000e-01, float noundef 1.000000e+00)
  call void @_ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color(ptr noundef nonnull align 8 dereferenceable(103352) %30, ptr noundef %83, ptr noundef nonnull align 4 dereferenceable(16) %84, ptr noundef nonnull align 4 dereferenceable(16) %10)
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  br label %105

85:                                               ; preds = %78
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = call noundef i32 @_ZNK6b2Body7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(208) %86)
  %88 = icmp eq i32 %87, 1
  br i1 %88, label %89, label %92

89:                                               ; preds = %85
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %11, float noundef 5.000000e-01, float noundef 5.000000e-01, float noundef 0x3FECCCCCC0000000, float noundef 1.000000e+00)
  call void @_ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color(ptr noundef nonnull align 8 dereferenceable(103352) %30, ptr noundef %90, ptr noundef nonnull align 4 dereferenceable(16) %91, ptr noundef nonnull align 4 dereferenceable(16) %11)
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  br label %104

92:                                               ; preds = %85
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = call noundef zeroext i1 @_ZNK6b2Body7IsAwakeEv(ptr noundef nonnull align 8 dereferenceable(208) %93)
  %95 = zext i1 %94 to i32
  %96 = icmp eq i32 %95, 0
  br i1 %96, label %97, label %100

97:                                               ; preds = %92
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %12, float noundef 0x3FE3333340000000, float noundef 0x3FE3333340000000, float noundef 0x3FE3333340000000, float noundef 1.000000e+00)
  call void @_ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color(ptr noundef nonnull align 8 dereferenceable(103352) %30, ptr noundef %98, ptr noundef nonnull align 4 dereferenceable(16) %99, ptr noundef nonnull align 4 dereferenceable(16) %12)
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  br label %103

100:                                              ; preds = %92
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %13, float noundef 0x3FECCCCCC0000000, float noundef 0x3FE6666660000000, float noundef 0x3FE6666660000000, float noundef 1.000000e+00)
  call void @_ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color(ptr noundef nonnull align 8 dereferenceable(103352) %30, ptr noundef %101, ptr noundef nonnull align 4 dereferenceable(16) %102, ptr noundef nonnull align 4 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  br label %103

103:                                              ; preds = %100, %97
  br label %104

104:                                              ; preds = %103, %89
  br label %105

105:                                              ; preds = %104, %82
  br label %106

106:                                              ; preds = %105, %75
  br label %107

107:                                              ; preds = %106, %67
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = call noundef ptr @_ZN9b2Fixture7GetNextEv(ptr noundef nonnull align 8 dereferenceable(84) %109)
  store ptr %110, ptr %7, align 8, !tbaa !5
  br label %54, !llvm.loop !34

111:                                              ; preds = %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %112

112:                                              ; preds = %111
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = call noundef ptr @_ZN6b2Body7GetNextEv(ptr noundef nonnull align 8 dereferenceable(208) %113)
  store ptr %114, ptr %4, align 8, !tbaa !5
  br label %45, !llvm.loop !36

115:                                              ; preds = %48
  br label %116

116:                                              ; preds = %115, %35
  %117 = load i32, ptr %3, align 4, !tbaa !23
  %118 = and i32 %117, 32
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %133

120:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %121 = getelementptr inbounds %class.b2World, ptr %30, i32 0, i32 6
  %122 = load ptr, ptr %121, align 8, !tbaa !37
  store ptr %122, ptr %14, align 8, !tbaa !5
  br label %123

123:                                              ; preds = %129, %120
  %124 = load ptr, ptr %14, align 8, !tbaa !5
  %125 = icmp ne ptr %124, null
  br i1 %125, label %127, label %126

126:                                              ; preds = %123
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %132

127:                                              ; preds = %123
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN7b2World18DrawParticleSystemERK16b2ParticleSystem(ptr noundef nonnull align 8 dereferenceable(103352) %30, ptr noundef nonnull align 8 dereferenceable(632) %128)
  br label %129

129:                                              ; preds = %127
  %130 = load ptr, ptr %14, align 8, !tbaa !5
  %131 = call noundef ptr @_ZN16b2ParticleSystem7GetNextEv(ptr noundef nonnull align 8 dereferenceable(632) %130)
  store ptr %131, ptr %14, align 8, !tbaa !5
  br label %123, !llvm.loop !38

132:                                              ; preds = %126
  br label %133

133:                                              ; preds = %132, %116
  %134 = load i32, ptr %3, align 4, !tbaa !23
  %135 = and i32 %134, 2
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %137, label %155

137:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %138 = getelementptr inbounds %class.b2World, ptr %30, i32 0, i32 5
  %139 = load ptr, ptr %138, align 8, !tbaa !39
  store ptr %139, ptr %15, align 8, !tbaa !5
  br label %140

140:                                              ; preds = %151, %137
  %141 = load ptr, ptr %15, align 8, !tbaa !5
  %142 = icmp ne ptr %141, null
  br i1 %142, label %144, label %143

143:                                              ; preds = %140
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %154

144:                                              ; preds = %140
  %145 = load ptr, ptr %15, align 8, !tbaa !5
  %146 = getelementptr inbounds %class.b2World, ptr %30, i32 0, i32 12
  %147 = load ptr, ptr %146, align 8, !tbaa !9
  %148 = load ptr, ptr %145, align 8, !tbaa !40
  %149 = getelementptr inbounds ptr, ptr %148, i64 6
  %150 = load ptr, ptr %149, align 8
  call void %150(ptr noundef nonnull align 8 dereferenceable(128) %145, ptr noundef %147)
  br label %151

151:                                              ; preds = %144
  %152 = load ptr, ptr %15, align 8, !tbaa !5
  %153 = call noundef ptr @_ZN7b2Joint7GetNextEv(ptr noundef nonnull align 8 dereferenceable(128) %152)
  store ptr %153, ptr %15, align 8, !tbaa !5
  br label %140, !llvm.loop !42

154:                                              ; preds = %143
  br label %155

155:                                              ; preds = %154, %133
  %156 = load i32, ptr %3, align 4, !tbaa !23
  %157 = and i32 %156, 8
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %159, label %188

159:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %16, float noundef 0x3FD3333340000000, float noundef 0x3FECCCCCC0000000, float noundef 0x3FECCCCCC0000000, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %160 = getelementptr inbounds %class.b2World, ptr %30, i32 0, i32 2
  %161 = call noundef ptr @_ZNK16b2ContactManager5StartEv(ptr noundef nonnull align 8 dereferenceable(184) %160)
  store ptr %161, ptr %17, align 8, !tbaa !5
  br label %162

162:                                              ; preds = %184, %159
  %163 = load ptr, ptr %17, align 8, !tbaa !5
  %164 = getelementptr inbounds %class.b2World, ptr %30, i32 0, i32 2
  %165 = call noundef ptr @_ZNK16b2ContactManager3EndEv(ptr noundef nonnull align 8 dereferenceable(184) %164)
  %166 = icmp ne ptr %163, %165
  br i1 %166, label %168, label %167

167:                                              ; preds = %162
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %187

168:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %169 = load ptr, ptr %17, align 8, !tbaa !5
  %170 = call noundef ptr @_ZN9b2Contact11GetFixtureAEv(ptr noundef nonnull align 8 dereferenceable(128) %169)
  store ptr %170, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %171 = load ptr, ptr %17, align 8, !tbaa !5
  %172 = call noundef ptr @_ZN9b2Contact11GetFixtureBEv(ptr noundef nonnull align 8 dereferenceable(128) %171)
  store ptr %172, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %173 = load ptr, ptr %18, align 8, !tbaa !5
  %174 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9b2Fixture7GetAABBEv(ptr noundef nonnull align 8 dereferenceable(84) %173)
  %175 = call <2 x float> @_ZNK6b2AABB9GetCenterEv(ptr noundef nonnull align 4 dereferenceable(16) %174)
  store <2 x float> %175, ptr %20, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %176 = load ptr, ptr %19, align 8, !tbaa !5
  %177 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9b2Fixture7GetAABBEv(ptr noundef nonnull align 8 dereferenceable(84) %176)
  %178 = call <2 x float> @_ZNK6b2AABB9GetCenterEv(ptr noundef nonnull align 4 dereferenceable(16) %177)
  store <2 x float> %178, ptr %21, align 4
  %179 = getelementptr inbounds %class.b2World, ptr %30, i32 0, i32 12
  %180 = load ptr, ptr %179, align 8, !tbaa !9
  %181 = load ptr, ptr %180, align 8, !tbaa !40
  %182 = getelementptr inbounds ptr, ptr %181, i64 7
  %183 = load ptr, ptr %182, align 8
  call void %183(ptr noundef nonnull align 8 dereferenceable(12) %180, ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(16) %16)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %184

184:                                              ; preds = %168
  %185 = load ptr, ptr %17, align 8, !tbaa !5
  %186 = call noundef ptr @_ZN9b2Contact7GetNextEv(ptr noundef nonnull align 8 dereferenceable(128) %185)
  store ptr %186, ptr %17, align 8, !tbaa !5
  br label %162, !llvm.loop !43

187:                                              ; preds = %167
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  br label %188

188:                                              ; preds = %187, %155
  %189 = load i32, ptr %3, align 4, !tbaa !23
  %190 = and i32 %189, 4
  %191 = icmp ne i32 %190, 0
  br i1 %191, label %192, label %266

192:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %22, float noundef 0x3FECCCCCC0000000, float noundef 0x3FD3333340000000, float noundef 0x3FECCCCCC0000000, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %193 = getelementptr inbounds %class.b2World, ptr %30, i32 0, i32 2
  %194 = getelementptr inbounds %class.b2ContactManager, ptr %193, i32 0, i32 0
  store ptr %194, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %195 = getelementptr inbounds %class.b2World, ptr %30, i32 0, i32 3
  %196 = load ptr, ptr %195, align 8, !tbaa !24
  store ptr %196, ptr %24, align 8, !tbaa !5
  br label %197

197:                                              ; preds = %262, %192
  %198 = load ptr, ptr %24, align 8, !tbaa !5
  %199 = icmp ne ptr %198, null
  br i1 %199, label %201, label %200

200:                                              ; preds = %197
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %265

201:                                              ; preds = %197
  %202 = load ptr, ptr %24, align 8, !tbaa !5
  %203 = call noundef zeroext i1 @_ZNK6b2Body9IsEnabledEv(ptr noundef nonnull align 8 dereferenceable(208) %202)
  %204 = zext i1 %203 to i32
  %205 = icmp eq i32 %204, 0
  br i1 %205, label %206, label %207

206:                                              ; preds = %201
  br label %262

207:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %208 = load ptr, ptr %24, align 8, !tbaa !5
  %209 = call noundef ptr @_ZN6b2Body14GetFixtureListEv(ptr noundef nonnull align 8 dereferenceable(208) %208)
  store ptr %209, ptr %25, align 8, !tbaa !5
  br label %210

210:                                              ; preds = %258, %207
  %211 = load ptr, ptr %25, align 8, !tbaa !5
  %212 = icmp ne ptr %211, null
  br i1 %212, label %214, label %213

213:                                              ; preds = %210
  store i32 20, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %261

214:                                              ; preds = %210
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #7
  %215 = load ptr, ptr %25, align 8, !tbaa !5
  %216 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9b2Fixture7GetAABBEv(ptr noundef nonnull align 8 dereferenceable(84) %215)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %216, i64 16, i1 false), !tbaa.struct !44
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #7
  %217 = getelementptr inbounds [4 x %struct.b2Vec2], ptr %27, i32 0, i32 0
  %218 = getelementptr inbounds %struct.b2Vec2, ptr %217, i64 4
  br label %219

219:                                              ; preds = %219, %214
  %220 = phi ptr [ %217, %214 ], [ %221, %219 ]
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %220)
  %221 = getelementptr inbounds %struct.b2Vec2, ptr %220, i64 1
  %222 = icmp eq ptr %221, %218
  br i1 %222, label %223, label %219

223:                                              ; preds = %219
  %224 = getelementptr inbounds [4 x %struct.b2Vec2], ptr %27, i64 0, i64 0
  %225 = getelementptr inbounds %struct.b2AABB, ptr %26, i32 0, i32 0
  %226 = getelementptr inbounds %struct.b2Vec2, ptr %225, i32 0, i32 0
  %227 = load float, ptr %226, align 4, !tbaa !46
  %228 = getelementptr inbounds %struct.b2AABB, ptr %26, i32 0, i32 0
  %229 = getelementptr inbounds %struct.b2Vec2, ptr %228, i32 0, i32 1
  %230 = load float, ptr %229, align 4, !tbaa !47
  call void @_ZN6b2Vec23SetEff(ptr noundef nonnull align 4 dereferenceable(8) %224, float noundef %227, float noundef %230)
  %231 = getelementptr inbounds [4 x %struct.b2Vec2], ptr %27, i64 0, i64 1
  %232 = getelementptr inbounds %struct.b2AABB, ptr %26, i32 0, i32 1
  %233 = getelementptr inbounds %struct.b2Vec2, ptr %232, i32 0, i32 0
  %234 = load float, ptr %233, align 4, !tbaa !48
  %235 = getelementptr inbounds %struct.b2AABB, ptr %26, i32 0, i32 0
  %236 = getelementptr inbounds %struct.b2Vec2, ptr %235, i32 0, i32 1
  %237 = load float, ptr %236, align 4, !tbaa !47
  call void @_ZN6b2Vec23SetEff(ptr noundef nonnull align 4 dereferenceable(8) %231, float noundef %234, float noundef %237)
  %238 = getelementptr inbounds [4 x %struct.b2Vec2], ptr %27, i64 0, i64 2
  %239 = getelementptr inbounds %struct.b2AABB, ptr %26, i32 0, i32 1
  %240 = getelementptr inbounds %struct.b2Vec2, ptr %239, i32 0, i32 0
  %241 = load float, ptr %240, align 4, !tbaa !48
  %242 = getelementptr inbounds %struct.b2AABB, ptr %26, i32 0, i32 1
  %243 = getelementptr inbounds %struct.b2Vec2, ptr %242, i32 0, i32 1
  %244 = load float, ptr %243, align 4, !tbaa !49
  call void @_ZN6b2Vec23SetEff(ptr noundef nonnull align 4 dereferenceable(8) %238, float noundef %241, float noundef %244)
  %245 = getelementptr inbounds [4 x %struct.b2Vec2], ptr %27, i64 0, i64 3
  %246 = getelementptr inbounds %struct.b2AABB, ptr %26, i32 0, i32 0
  %247 = getelementptr inbounds %struct.b2Vec2, ptr %246, i32 0, i32 0
  %248 = load float, ptr %247, align 4, !tbaa !46
  %249 = getelementptr inbounds %struct.b2AABB, ptr %26, i32 0, i32 1
  %250 = getelementptr inbounds %struct.b2Vec2, ptr %249, i32 0, i32 1
  %251 = load float, ptr %250, align 4, !tbaa !49
  call void @_ZN6b2Vec23SetEff(ptr noundef nonnull align 4 dereferenceable(8) %245, float noundef %248, float noundef %251)
  %252 = getelementptr inbounds %class.b2World, ptr %30, i32 0, i32 12
  %253 = load ptr, ptr %252, align 8, !tbaa !9
  %254 = getelementptr inbounds [4 x %struct.b2Vec2], ptr %27, i64 0, i64 0
  %255 = load ptr, ptr %253, align 8, !tbaa !40
  %256 = getelementptr inbounds ptr, ptr %255, i64 2
  %257 = load ptr, ptr %256, align 8
  call void %257(ptr noundef nonnull align 8 dereferenceable(12) %253, ptr noundef %254, i32 noundef 4, ptr noundef nonnull align 4 dereferenceable(16) %22)
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #7
  br label %258

258:                                              ; preds = %223
  %259 = load ptr, ptr %25, align 8, !tbaa !5
  %260 = call noundef ptr @_ZN9b2Fixture7GetNextEv(ptr noundef nonnull align 8 dereferenceable(84) %259)
  store ptr %260, ptr %25, align 8, !tbaa !5
  br label %210, !llvm.loop !50

261:                                              ; preds = %213
  br label %262

262:                                              ; preds = %261, %206
  %263 = load ptr, ptr %24, align 8, !tbaa !5
  %264 = call noundef ptr @_ZN6b2Body7GetNextEv(ptr noundef nonnull align 8 dereferenceable(208) %263)
  store ptr %264, ptr %24, align 8, !tbaa !5
  br label %197, !llvm.loop !51

265:                                              ; preds = %200
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  br label %266

266:                                              ; preds = %265, %188
  %267 = load i32, ptr %3, align 4, !tbaa !23
  %268 = and i32 %267, 16
  %269 = icmp ne i32 %268, 0
  br i1 %269, label %270, label %292

270:                                              ; preds = %266
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %271 = getelementptr inbounds %class.b2World, ptr %30, i32 0, i32 3
  %272 = load ptr, ptr %271, align 8, !tbaa !24
  store ptr %272, ptr %28, align 8, !tbaa !5
  br label %273

273:                                              ; preds = %288, %270
  %274 = load ptr, ptr %28, align 8, !tbaa !5
  %275 = icmp ne ptr %274, null
  br i1 %275, label %277, label %276

276:                                              ; preds = %273
  store i32 23, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %291

277:                                              ; preds = %273
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #7
  %278 = load ptr, ptr %28, align 8, !tbaa !5
  %279 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK6b2Body12GetTransformEv(ptr noundef nonnull align 8 dereferenceable(208) %278)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %279, i64 16, i1 false), !tbaa.struct !44
  %280 = load ptr, ptr %28, align 8, !tbaa !5
  %281 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6b2Body14GetWorldCenterEv(ptr noundef nonnull align 8 dereferenceable(208) %280)
  %282 = getelementptr inbounds %struct.b2Transform, ptr %29, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %282, ptr align 4 %281, i64 8, i1 false), !tbaa.struct !52
  %283 = getelementptr inbounds %class.b2World, ptr %30, i32 0, i32 12
  %284 = load ptr, ptr %283, align 8, !tbaa !9
  %285 = load ptr, ptr %284, align 8, !tbaa !40
  %286 = getelementptr inbounds ptr, ptr %285, i64 8
  %287 = load ptr, ptr %286, align 8
  call void %287(ptr noundef nonnull align 8 dereferenceable(12) %284, ptr noundef nonnull align 4 dereferenceable(16) %29)
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #7
  br label %288

288:                                              ; preds = %277
  %289 = load ptr, ptr %28, align 8, !tbaa !5
  %290 = call noundef ptr @_ZN6b2Body7GetNextEv(ptr noundef nonnull align 8 dereferenceable(208) %289)
  store ptr %290, ptr %28, align 8, !tbaa !5
  br label %273, !llvm.loop !53

291:                                              ; preds = %276
  br label %292

292:                                              ; preds = %291, %266
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %293

293:                                              ; preds = %292, %34
  ret void
}

declare noundef i32 @_ZNK6b2Draw8GetFlagsEv(ptr noundef nonnull align 8 dereferenceable(12)) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZNK6b2AABB9GetCenterEv(ptr noundef nonnull align 4 dereferenceable(16)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec23SetEff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) #0 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 103312}
!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 = !{!12, !12, i64 0}
!24 = !{!10, !6, i64 103248}
!25 = !{!26, !19, i64 168}
!26 = !{!"_ZTS6b2Body", !27, i64 0, !28, i64 4, !12, i64 8, !29, i64 12, !29, i64 28, !31, 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, !32, i64 200}
!27 = !{!"_ZTS10b2BodyType", !7, i64 0}
!28 = !{!"short", !7, i64 0}
!29 = !{!"_ZTS11b2Transform", !18, i64 0, !30, i64 8}
!30 = !{!"_ZTS5b2Rot", !19, i64 0, !19, i64 4}
!31 = !{!"_ZTS7b2Sweep", !18, i64 0, !18, i64 8, !18, i64 16, !19, i64 24, !19, i64 28, !19, i64 32}
!32 = !{!"_ZTS14b2BodyUserData", !33, i64 0}
!33 = !{!"long", !7, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}
!37 = !{!10, !6, i64 103272}
!38 = distinct !{!38, !35}
!39 = !{!10, !6, i64 103264}
!40 = !{!41, !41, i64 0}
!41 = !{!"vtable pointer", !8, i64 0}
!42 = distinct !{!42, !35}
!43 = distinct !{!43, !35}
!44 = !{i64 0, i64 4, !45, i64 4, i64 4, !45, i64 8, i64 4, !45, i64 12, i64 4, !45}
!45 = !{!19, !19, i64 0}
!46 = !{!17, !19, i64 0}
!47 = !{!17, !19, i64 4}
!48 = !{!17, !19, i64 8}
!49 = !{!17, !19, i64 12}
!50 = distinct !{!50, !35}
!51 = distinct !{!51, !35}
!52 = !{i64 0, i64 4, !45, i64 4, i64 4, !45}
!53 = distinct !{!53, !35}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.b2Color = type { float, float, float, float }
%struct.b2Vec2 = type { float, float }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Rot = type { float, float }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6b2Body7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(208)) 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 @_ZN9b2Contact11GetFixtureBEv(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 @_ZNK6b2Body9IsEnabledEv(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #3 align 2

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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN6b2Body14GetFixtureListEv(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7b2World9DebugDrawEv(ptr noundef nonnull align 8 dereferenceable(103352) %0) local_unnamed_addr #4 align 2 {
  %2 = alloca %struct.b2Color, align 4
  %3 = alloca %struct.b2Color, align 4
  %4 = alloca %struct.b2Color, align 4
  %5 = alloca %struct.b2Color, align 4
  %6 = alloca %struct.b2Color, align 4
  %7 = alloca %struct.b2Color, align 4
  %8 = alloca %struct.b2Color, align 4
  %9 = alloca %struct.b2Vec2, align 8
  %10 = alloca %struct.b2Vec2, align 8
  %11 = alloca %struct.b2Color, align 4
  %12 = alloca [4 x %struct.b2Vec2], align 16
  %13 = alloca %struct.b2Transform, align 8
  %14 = getelementptr inbounds i8, ptr %0, i64 103312
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %.loopexit, label %17

17:                                               ; preds = %1
  %18 = tail call noundef i32 @_ZNK6b2Draw8GetFlagsEv(ptr noundef nonnull align 8 dereferenceable(12) %15)
  %19 = and i32 %18, 1
  %.not = icmp eq i32 %19, 0
  %20 = getelementptr inbounds i8, ptr %0, i64 103248
  %21 = load ptr, ptr %20, align 8
  %.not6586 = icmp eq ptr %21, null
  %or.cond = select i1 %.not, i1 true, i1 %.not6586
  br i1 %or.cond, label %.loopexit82, label %.lr.ph89

.lr.ph89:                                         ; preds = %17, %._crit_edge
  %.05787 = phi ptr [ %25, %._crit_edge ], [ %21, %17 ]
  %22 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK6b2Body12GetTransformEv(ptr noundef nonnull align 8 dereferenceable(208) %.05787)
  %23 = call noundef ptr @_ZN6b2Body14GetFixtureListEv(ptr noundef nonnull align 8 dereferenceable(208) %.05787)
  %.not7883 = icmp eq ptr %23, null
  br i1 %.not7883, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph89
  %24 = getelementptr inbounds i8, ptr %.05787, i64 168
  br label %26

._crit_edge:                                      ; preds = %48, %.lr.ph89
  %25 = call noundef ptr @_ZN6b2Body7GetNextEv(ptr noundef nonnull align 8 dereferenceable(208) %.05787)
  %.not65 = icmp eq ptr %25, null
  br i1 %.not65, label %.loopexit82, label %.lr.ph89, !llvm.loop !22

26:                                               ; preds = %.lr.ph, %48
  %.05884 = phi ptr [ %23, %.lr.ph ], [ %49, %48 ]
  %27 = call noundef i32 @_ZNK6b2Body7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(208) %.05787)
  %28 = icmp eq i32 %27, 2
  br i1 %28, label %29, label %33

29:                                               ; preds = %26
  %30 = load float, ptr %24, align 8, !tbaa !24
  %31 = fcmp oeq float %30, 0.000000e+00
  br i1 %31, label %32, label %33

32:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %2, float noundef 1.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @_ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color(ptr noundef nonnull align 8 dereferenceable(103352) %0, ptr noundef nonnull %.05884, ptr noundef nonnull align 4 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(16) %2)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #7
  br label %48

33:                                               ; preds = %29, %26
  %34 = call noundef zeroext i1 @_ZNK6b2Body9IsEnabledEv(ptr noundef nonnull align 8 dereferenceable(208) %.05787)
  br i1 %34, label %36, label %35

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %3, float noundef 5.000000e-01, float noundef 5.000000e-01, float noundef 0x3FD3333340000000, float noundef 1.000000e+00)
  call void @_ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color(ptr noundef nonnull align 8 dereferenceable(103352) %0, ptr noundef nonnull %.05884, ptr noundef nonnull align 4 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(16) %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  br label %48

36:                                               ; preds = %33
  %37 = call noundef i32 @_ZNK6b2Body7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(208) %.05787)
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %40

39:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %4, float noundef 5.000000e-01, float noundef 0x3FECCCCCC0000000, float noundef 5.000000e-01, float noundef 1.000000e+00)
  call void @_ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color(ptr noundef nonnull align 8 dereferenceable(103352) %0, ptr noundef nonnull %.05884, ptr noundef nonnull align 4 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(16) %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  br label %48

40:                                               ; preds = %36
  %41 = call noundef i32 @_ZNK6b2Body7GetTypeEv(ptr noundef nonnull align 8 dereferenceable(208) %.05787)
  %42 = icmp eq i32 %41, 1
  br i1 %42, label %43, label %44

43:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %5, float noundef 5.000000e-01, float noundef 5.000000e-01, float noundef 0x3FECCCCCC0000000, float noundef 1.000000e+00)
  call void @_ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color(ptr noundef nonnull align 8 dereferenceable(103352) %0, ptr noundef nonnull %.05884, ptr noundef nonnull align 4 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  br label %48

44:                                               ; preds = %40
  %45 = call noundef zeroext i1 @_ZNK6b2Body7IsAwakeEv(ptr noundef nonnull align 8 dereferenceable(208) %.05787)
  br i1 %45, label %47, label %46

46:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %6, float noundef 0x3FE3333340000000, float noundef 0x3FE3333340000000, float noundef 0x3FE3333340000000, float noundef 1.000000e+00)
  call void @_ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color(ptr noundef nonnull align 8 dereferenceable(103352) %0, ptr noundef nonnull %.05884, ptr noundef nonnull align 4 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(16) %6)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %48

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %7, float noundef 0x3FECCCCCC0000000, float noundef 0x3FE6666660000000, float noundef 0x3FE6666660000000, float noundef 1.000000e+00)
  call void @_ZN7b2World9DrawShapeEP9b2FixtureRK11b2TransformRK7b2Color(ptr noundef nonnull align 8 dereferenceable(103352) %0, ptr noundef nonnull %.05884, ptr noundef nonnull align 4 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br label %48

48:                                               ; preds = %32, %39, %46, %47, %43, %35
  %49 = call noundef ptr @_ZN9b2Fixture7GetNextEv(ptr noundef nonnull align 8 dereferenceable(84) %.05884)
  %.not78 = icmp eq ptr %49, null
  br i1 %.not78, label %._crit_edge, label %26, !llvm.loop !33

.loopexit82:                                      ; preds = %._crit_edge, %17
  %50 = and i32 %18, 32
  %.not66 = icmp eq i32 %50, 0
  %51 = getelementptr inbounds i8, ptr %0, i64 103272
  %52 = load ptr, ptr %51, align 8
  %.not6790 = icmp eq ptr %52, null
  %or.cond118 = select i1 %.not66, i1 true, i1 %.not6790
  br i1 %or.cond118, label %.loopexit81, label %.lr.ph93

.lr.ph93:                                         ; preds = %.loopexit82, %.lr.ph93
  %.05991 = phi ptr [ %53, %.lr.ph93 ], [ %52, %.loopexit82 ]
  call void @_ZN7b2World18DrawParticleSystemERK16b2ParticleSystem(ptr noundef nonnull align 8 dereferenceable(103352) %0, ptr noundef nonnull align 8 dereferenceable(632) %.05991)
  %53 = call noundef ptr @_ZN16b2ParticleSystem7GetNextEv(ptr noundef nonnull align 8 dereferenceable(632) %.05991)
  %.not67 = icmp eq ptr %53, null
  br i1 %.not67, label %.loopexit81, label %.lr.ph93, !llvm.loop !34

.loopexit81:                                      ; preds = %.lr.ph93, %.loopexit82
  %54 = and i32 %18, 2
  %.not68 = icmp eq i32 %54, 0
  %55 = getelementptr inbounds i8, ptr %0, i64 103264
  %56 = load ptr, ptr %55, align 8
  %.not6994 = icmp eq ptr %56, null
  %or.cond120 = select i1 %.not68, i1 true, i1 %.not6994
  br i1 %or.cond120, label %.loopexit80, label %.lr.ph97

.lr.ph97:                                         ; preds = %.loopexit81, %.lr.ph97
  %.06295 = phi ptr [ %61, %.lr.ph97 ], [ %56, %.loopexit81 ]
  %57 = load ptr, ptr %14, align 8, !tbaa !5
  %58 = load ptr, ptr %.06295, align 8, !tbaa !35
  %59 = getelementptr inbounds i8, ptr %58, i64 48
  %60 = load ptr, ptr %59, align 8
  call void %60(ptr noundef nonnull align 8 dereferenceable(128) %.06295, ptr noundef %57)
  %61 = call noundef ptr @_ZN7b2Joint7GetNextEv(ptr noundef nonnull align 8 dereferenceable(128) %.06295)
  %.not69 = icmp eq ptr %61, null
  br i1 %.not69, label %.loopexit80, label %.lr.ph97, !llvm.loop !37

.loopexit80:                                      ; preds = %.lr.ph97, %.loopexit81
  %62 = and i32 %18, 8
  %.not70 = icmp eq i32 %62, 0
  br i1 %.not70, label %79, label %63

63:                                               ; preds = %.loopexit80
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %8, float noundef 0x3FD3333340000000, float noundef 0x3FECCCCCC0000000, float noundef 0x3FECCCCCC0000000, float noundef 1.000000e+00)
  %64 = getelementptr inbounds i8, ptr %0, i64 103064
  %65 = call noundef ptr @_ZNK16b2ContactManager5StartEv(ptr noundef nonnull align 8 dereferenceable(184) %64)
  %66 = call noundef ptr @_ZNK16b2ContactManager3EndEv(ptr noundef nonnull align 8 dereferenceable(184) %64)
  %.not7198 = icmp eq ptr %65, %66
  br i1 %.not7198, label %._crit_edge102, label %.lr.ph101

._crit_edge102:                                   ; preds = %.lr.ph101, %63
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  br label %79

.lr.ph101:                                        ; preds = %63, %.lr.ph101
  %.06399 = phi ptr [ %77, %.lr.ph101 ], [ %65, %63 ]
  %67 = call noundef ptr @_ZN9b2Contact11GetFixtureAEv(ptr noundef nonnull align 8 dereferenceable(128) %.06399)
  %68 = call noundef ptr @_ZN9b2Contact11GetFixtureBEv(ptr noundef nonnull align 8 dereferenceable(128) %.06399)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %69 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9b2Fixture7GetAABBEv(ptr noundef nonnull align 8 dereferenceable(84) %67)
  %70 = call <2 x float> @_ZNK6b2AABB9GetCenterEv(ptr noundef nonnull align 4 dereferenceable(16) %69)
  store <2 x float> %70, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %71 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9b2Fixture7GetAABBEv(ptr noundef nonnull align 8 dereferenceable(84) %68)
  %72 = call <2 x float> @_ZNK6b2AABB9GetCenterEv(ptr noundef nonnull align 4 dereferenceable(16) %71)
  store <2 x float> %72, ptr %10, align 8
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = load ptr, ptr %73, align 8, !tbaa !35
  %75 = getelementptr inbounds i8, ptr %74, i64 56
  %76 = load ptr, ptr %75, align 8
  call void %76(ptr noundef nonnull align 8 dereferenceable(12) %73, ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %77 = call noundef ptr @_ZN9b2Contact7GetNextEv(ptr noundef nonnull align 8 dereferenceable(128) %.06399)
  %78 = call noundef ptr @_ZNK16b2ContactManager3EndEv(ptr noundef nonnull align 8 dereferenceable(184) %64)
  %.not71 = icmp eq ptr %77, %78
  br i1 %.not71, label %._crit_edge102, label %.lr.ph101, !llvm.loop !38

79:                                               ; preds = %._crit_edge102, %.loopexit80
  %80 = and i32 %18, 4
  %.not72 = icmp eq i32 %80, 0
  br i1 %.not72, label %97, label %81

81:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %11, float noundef 0x3FECCCCCC0000000, float noundef 0x3FD3333340000000, float noundef 0x3FECCCCCC0000000, float noundef 1.000000e+00)
  %82 = load ptr, ptr %20, align 8, !tbaa !39
  %.not73107 = icmp eq ptr %82, null
  br i1 %.not73107, label %._crit_edge111, label %.lr.ph110

.lr.ph110:                                        ; preds = %81
  %83 = getelementptr inbounds i8, ptr %12, i64 8
  %84 = getelementptr inbounds i8, ptr %12, i64 16
  %85 = getelementptr inbounds i8, ptr %12, i64 24
  br label %86

._crit_edge111:                                   ; preds = %.loopexit79, %81
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  br label %97

86:                                               ; preds = %.lr.ph110, %.loopexit79
  %.061108 = phi ptr [ %82, %.lr.ph110 ], [ %96, %.loopexit79 ]
  %87 = call noundef zeroext i1 @_ZNK6b2Body9IsEnabledEv(ptr noundef nonnull align 8 dereferenceable(208) %.061108)
  br i1 %87, label %88, label %.loopexit79

88:                                               ; preds = %86
  %89 = call noundef ptr @_ZN6b2Body14GetFixtureListEv(ptr noundef nonnull align 8 dereferenceable(208) %.061108)
  %.not76103 = icmp eq ptr %89, null
  br i1 %.not76103, label %.loopexit79, label %.lr.ph106

.lr.ph106:                                        ; preds = %88, %.lr.ph106
  %.060104 = phi ptr [ %95, %.lr.ph106 ], [ %89, %88 ]
  %90 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK9b2Fixture7GetAABBEv(ptr noundef nonnull align 8 dereferenceable(84) %.060104)
  %.sroa.0.0.copyload = load float, ptr %90, align 4, !tbaa !40
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %90, i64 4
  %.sroa.5.0.copyload = load float, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !40
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %90, i64 8
  %.sroa.7.0.copyload = load float, ptr %.sroa.7.0..sroa_idx, align 4, !tbaa !40
  %.sroa.9.0..sroa_idx = getelementptr inbounds i8, ptr %90, i64 12
  %.sroa.9.0.copyload = load float, ptr %.sroa.9.0..sroa_idx, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %83)
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %84)
  call void @_ZN6b2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %85)
  call void @_ZN6b2Vec23SetEff(ptr noundef nonnull align 4 dereferenceable(8) %12, float noundef %.sroa.0.0.copyload, float noundef %.sroa.5.0.copyload)
  call void @_ZN6b2Vec23SetEff(ptr noundef nonnull align 4 dereferenceable(8) %83, float noundef %.sroa.7.0.copyload, float noundef %.sroa.5.0.copyload)
  call void @_ZN6b2Vec23SetEff(ptr noundef nonnull align 4 dereferenceable(8) %84, float noundef %.sroa.7.0.copyload, float noundef %.sroa.9.0.copyload)
  call void @_ZN6b2Vec23SetEff(ptr noundef nonnull align 4 dereferenceable(8) %85, float noundef %.sroa.0.0.copyload, float noundef %.sroa.9.0.copyload)
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  %92 = load ptr, ptr %91, align 8, !tbaa !35
  %93 = getelementptr inbounds i8, ptr %92, i64 16
  %94 = load ptr, ptr %93, align 8
  call void %94(ptr noundef nonnull align 8 dereferenceable(12) %91, ptr noundef nonnull %12, i32 noundef 4, ptr noundef nonnull align 4 dereferenceable(16) %11)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  %95 = call noundef ptr @_ZN9b2Fixture7GetNextEv(ptr noundef nonnull align 8 dereferenceable(84) %.060104)
  %.not76 = icmp eq ptr %95, null
  br i1 %.not76, label %.loopexit79, label %.lr.ph106, !llvm.loop !41

.loopexit79:                                      ; preds = %.lr.ph106, %88, %86
  %96 = call noundef ptr @_ZN6b2Body7GetNextEv(ptr noundef nonnull align 8 dereferenceable(208) %.061108)
  %.not73 = icmp eq ptr %96, null
  br i1 %.not73, label %._crit_edge111, label %86, !llvm.loop !42

97:                                               ; preds = %._crit_edge111, %79
  %98 = and i32 %18, 16
  %.not74 = icmp eq i32 %98, 0
  %99 = load ptr, ptr %20, align 8
  %.not75112 = icmp eq ptr %99, null
  %or.cond122 = select i1 %.not74, i1 true, i1 %.not75112
  br i1 %or.cond122, label %.loopexit, label %.lr.ph115

.lr.ph115:                                        ; preds = %97, %.lr.ph115
  %.0113 = phi ptr [ %107, %.lr.ph115 ], [ %99, %97 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  %100 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK6b2Body12GetTransformEv(ptr noundef nonnull align 8 dereferenceable(208) %.0113)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(16) %100, i64 16, i1 false), !tbaa.struct !43
  %101 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6b2Body14GetWorldCenterEv(ptr noundef nonnull align 8 dereferenceable(208) %.0113)
  %102 = load i64, ptr %101, align 4
  store i64 %102, ptr %13, align 8
  %103 = load ptr, ptr %14, align 8, !tbaa !5
  %104 = load ptr, ptr %103, align 8, !tbaa !35
  %105 = getelementptr inbounds i8, ptr %104, i64 64
  %106 = load ptr, ptr %105, align 8
  call void %106(ptr noundef nonnull align 8 dereferenceable(12) %103, ptr noundef nonnull align 4 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  %107 = call noundef ptr @_ZN6b2Body7GetNextEv(ptr noundef nonnull align 8 dereferenceable(208) %.0113)
  %.not75 = icmp eq ptr %107, null
  br i1 %.not75, label %.loopexit, label %.lr.ph115, !llvm.loop !44

.loopexit:                                        ; preds = %.lr.ph115, %97, %1
  ret void
}

declare noundef i32 @_ZNK6b2Draw8GetFlagsEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7b2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZNK6b2AABB9GetCenterEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec23SetEff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) local_unnamed_addr #0 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 103312}
!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 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !18, i64 168}
!25 = !{!"_ZTS6b2Body", !26, i64 0, !27, i64 4, !11, i64 8, !28, i64 12, !28, i64 28, !30, 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, !31, i64 200}
!26 = !{!"_ZTS10b2BodyType", !9, i64 0}
!27 = !{!"short", !9, i64 0}
!28 = !{!"_ZTS11b2Transform", !17, i64 0, !29, i64 8}
!29 = !{!"_ZTS5b2Rot", !18, i64 0, !18, i64 4}
!30 = !{!"_ZTS7b2Sweep", !17, i64 0, !17, i64 8, !17, i64 16, !18, i64 24, !18, i64 28, !18, i64 32}
!31 = !{!"_ZTS14b2BodyUserData", !32, i64 0}
!32 = !{!"long", !9, i64 0}
!33 = distinct !{!33, !23}
!34 = distinct !{!34, !23}
!35 = !{!36, !36, i64 0}
!36 = !{!"vtable pointer", !10, i64 0}
!37 = distinct !{!37, !23}
!38 = distinct !{!38, !23}
!39 = !{!6, !8, i64 103248}
!40 = !{!18, !18, i64 0}
!41 = distinct !{!41, !23}
!42 = distinct !{!42, !23}
!43 = !{i64 0, i64 4, !40, i64 4, i64 4, !40, i64 8, i64 4, !40, i64 12, i64 4, !40}
!44 = distinct !{!44, !23}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass