; LLVM IR from SOHNE/Dura2D :: src/kinetics/d2World.ll (ZN7d2World9DebugDrawEv)

; 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.d2Color = type { float, float, float, float }
%struct.d2Vec2 = type { float, float }
%struct.d2Transform = type { %struct.d2Vec2, %struct.d2Rot }
%struct.d2Rot = type { float, float }
%class.d2World = type { %struct.d2Vec2, ptr, %class.d2BlockAllocator, ptr, i32, ptr, i32, ptr }
%class.d2BlockAllocator = type { ptr, i32, i32, [14 x ptr] }
%class.d2Body = type <{ i16, [2 x i8], i32, %struct.d2Transform, %struct.d2Vec2, %struct.d2Vec2, float, float, float, %struct.d2Vec2, float, float, float, float, float, float, float, ptr, ptr, ptr, ptr, ptr, float, [4 x i8] }>
%struct.d2AABB = type { %struct.d2Vec2, %struct.d2Vec2, ptr, ptr }
%class.d2Constraint = type { ptr, ptr, ptr, %struct.d2Vec2, %struct.d2Vec2, ptr, ptr }

@_ZTI7d2Shape = external dso_local constant { ptr, ptr }, align 8
@_ZTI14d2PolygonShape = external constant ptr

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

; 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 nounwind uwtable
declare dso_local noundef ptr @_ZN12d2Constraint7GetNextEv(ptr noundef nonnull align 8 dereferenceable(56)) #0 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6d2Body11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(132)) #3 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) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZNK6d2Body11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(132)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7d2World9DebugDrawEv(ptr noundef nonnull align 8 dereferenceable(184) %0) #6 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %struct.d2Color, align 4
  %5 = alloca %struct.d2Color, align 4
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca %struct.d2Color, align 4
  %9 = alloca %struct.d2Color, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca [4 x %struct.d2Vec2], align 16
  %13 = alloca float, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %struct.d2Transform, align 4
  %18 = alloca ptr, align 8
  %19 = alloca %struct.d2Vec2, align 4
  %20 = alloca %struct.d2Color, align 4
  %21 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %22 = load ptr, ptr %2, align 8
  %23 = getelementptr inbounds %class.d2World, ptr %22, i32 0, i32 7
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %1
  br label %208

27:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  %28 = getelementptr inbounds %class.d2World, ptr %22, i32 0, i32 7
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = call noundef i32 @_ZNK6d2Draw8GetFlagsEv(ptr noundef nonnull align 8 dereferenceable(12) %29)
  store i32 %30, ptr %3, align 4, !tbaa !15
  %31 = load i32, ptr %3, align 4, !tbaa !15
  %32 = and i32 %31, 1
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %59

34:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #9
  call void @_ZN7d2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %4, float noundef 1.000000e+00, float noundef 0x3FE7171720000000, float noundef 0x3FDB1B1B20000000, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #9
  call void @_ZN7d2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %5, float noundef 0x3FE1717180000000, float noundef 0x3FED3D3D40000000, float noundef 0x3FEFBFBFC0000000, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #9
  %35 = load i32, ptr %3, align 4, !tbaa !15
  %36 = and i32 %35, 2
  %37 = icmp ne i32 %36, 0
  %38 = zext i1 %37 to i8
  store i8 %38, ptr %6, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  %39 = getelementptr inbounds %class.d2World, ptr %22, i32 0, i32 3
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  store ptr %40, ptr %7, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %55, %34
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  br i1 %43, label %45, label %44

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

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #9
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %class.d2Body, ptr %46, i32 0, i32 2
  %48 = load i32, ptr %47, align 4, !tbaa !19
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %51

50:                                               ; preds = %45
  br label %52

51:                                               ; preds = %45
  br label %52

52:                                               ; preds = %51, %50
  %53 = phi ptr [ %4, %50 ], [ %5, %51 ]
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %53, i64 16, i1 false), !tbaa.struct !25
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN7d2World9DrawShapeEPK6d2BodyRKbRK7d2Color(ptr noundef nonnull align 8 dereferenceable(184) %22, ptr noundef %54, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 4 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  br label %55

55:                                               ; preds = %52
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = call noundef ptr @_ZN6d2Body7GetNextEv(ptr noundef nonnull align 8 dereferenceable(132) %56)
  store ptr %57, ptr %7, align 8, !tbaa !5
  br label %41, !llvm.loop !27

58:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #9
  br label %59

59:                                               ; preds = %58, %27
  %60 = load i32, ptr %3, align 4, !tbaa !15
  %61 = and i32 %60, 4
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %121

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #9
  call void @_ZN7d2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %9, float noundef 0x3FECCCCCC0000000, float noundef 0x3FD3333340000000, float noundef 0x3FECCCCCC0000000, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %64 = getelementptr inbounds %class.d2World, ptr %22, i32 0, i32 3
  %65 = load ptr, ptr %64, align 8, !tbaa !18
  store ptr %65, ptr %10, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %117, %63
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = icmp ne ptr %67, null
  br i1 %68, label %70, label %69

69:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  br label %120

70:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = getelementptr inbounds %class.d2Body, ptr %71, i32 0, i32 17
  %73 = load ptr, ptr %72, align 8, !tbaa !29
  store ptr %73, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #9
  %74 = load ptr, ptr %11, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.d2AABB, ptr %74, i32 0, i32 0
  %76 = getelementptr inbounds %struct.d2Vec2, ptr %75, i32 0, i32 0
  %77 = load float, ptr %76, align 8, !tbaa !30
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.d2AABB, ptr %78, i32 0, i32 0
  %80 = getelementptr inbounds %struct.d2Vec2, ptr %79, i32 0, i32 1
  %81 = load float, ptr %80, align 4, !tbaa !32
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %12, float noundef %77, float noundef %81)
  %82 = getelementptr inbounds %struct.d2Vec2, ptr %12, i64 1
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.d2AABB, ptr %83, i32 0, i32 1
  %85 = getelementptr inbounds %struct.d2Vec2, ptr %84, i32 0, i32 0
  %86 = load float, ptr %85, align 8, !tbaa !33
  %87 = load ptr, ptr %11, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.d2AABB, ptr %87, i32 0, i32 0
  %89 = getelementptr inbounds %struct.d2Vec2, ptr %88, i32 0, i32 1
  %90 = load float, ptr %89, align 4, !tbaa !32
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %82, float noundef %86, float noundef %90)
  %91 = getelementptr inbounds %struct.d2Vec2, ptr %12, i64 2
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.d2AABB, ptr %92, i32 0, i32 1
  %94 = getelementptr inbounds %struct.d2Vec2, ptr %93, i32 0, i32 0
  %95 = load float, ptr %94, align 8, !tbaa !33
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.d2AABB, ptr %96, i32 0, i32 1
  %98 = getelementptr inbounds %struct.d2Vec2, ptr %97, i32 0, i32 1
  %99 = load float, ptr %98, align 4, !tbaa !34
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %91, float noundef %95, float noundef %99)
  %100 = getelementptr inbounds %struct.d2Vec2, ptr %12, i64 3
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.d2AABB, ptr %101, i32 0, i32 0
  %103 = getelementptr inbounds %struct.d2Vec2, ptr %102, i32 0, i32 0
  %104 = load float, ptr %103, align 8, !tbaa !30
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.d2AABB, ptr %105, i32 0, i32 1
  %107 = getelementptr inbounds %struct.d2Vec2, ptr %106, i32 0, i32 1
  %108 = load float, ptr %107, align 4, !tbaa !34
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %100, float noundef %104, float noundef %108)
  %109 = getelementptr inbounds %class.d2World, ptr %22, i32 0, i32 7
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = getelementptr inbounds [4 x %struct.d2Vec2], ptr %12, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = call noundef float @_ZNK6d2Body11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(132) %112)
  store float %113, ptr %13, align 4, !tbaa !26
  %114 = load ptr, ptr %110, align 8, !tbaa !35
  %115 = getelementptr inbounds ptr, ptr %114, i64 2
  %116 = load ptr, ptr %115, align 8
  call void %116(ptr noundef nonnull align 8 dereferenceable(12) %110, ptr noundef %111, i32 noundef 4, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(16) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %117

117:                                              ; preds = %70
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = call noundef ptr @_ZN6d2Body7GetNextEv(ptr noundef nonnull align 8 dereferenceable(132) %118)
  store ptr %119, ptr %10, align 8, !tbaa !5
  br label %66, !llvm.loop !37

120:                                              ; preds = %69
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #9
  br label %121

121:                                              ; preds = %120, %59
  %122 = load i32, ptr %3, align 4, !tbaa !15
  %123 = and i32 %122, 8
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %133

125:                                              ; preds = %121
  %126 = getelementptr inbounds %class.d2World, ptr %22, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8, !tbaa !38
  %128 = getelementptr inbounds %class.d2World, ptr %22, i32 0, i32 7
  %129 = load ptr, ptr %128, align 8, !tbaa !9
  %130 = load ptr, ptr %127, align 8, !tbaa !35
  %131 = getelementptr inbounds ptr, ptr %130, i64 8
  %132 = load ptr, ptr %131, align 8
  call void %132(ptr noundef nonnull align 8 dereferenceable(8) %127, ptr noundef nonnull align 8 dereferenceable(12) %129)
  br label %133

133:                                              ; preds = %125, %121
  %134 = load i32, ptr %3, align 4, !tbaa !15
  %135 = and i32 %134, 16
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %137, label %178

137:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %138 = getelementptr inbounds %class.d2World, ptr %22, i32 0, i32 3
  %139 = load ptr, ptr %138, align 8, !tbaa !18
  store ptr %139, ptr %14, align 8, !tbaa !5
  br label %140

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

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

144:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %145 = load ptr, ptr %14, align 8, !tbaa !5
  %146 = call noundef ptr @_ZNK6d2Body8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(132) %145)
  %147 = load ptr, ptr %146, align 8, !tbaa !35
  %148 = getelementptr inbounds ptr, ptr %147, i64 2
  %149 = load ptr, ptr %148, align 8
  %150 = call noundef i32 %149(ptr noundef nonnull align 8 dereferenceable(8) %146)
  store i32 %150, ptr %16, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #9
  %151 = load ptr, ptr %14, align 8, !tbaa !5
  %152 = getelementptr inbounds %class.d2Body, ptr %151, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 8 %152, i64 16, i1 false), !tbaa.struct !25
  %153 = load i32, ptr %16, align 4, !tbaa !39
  switch i32 %153, label %167 [
    i32 1, label %154
    i32 2, label %154
  ]

154:                                              ; preds = %144, %144
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %155 = load ptr, ptr %14, align 8, !tbaa !5
  %156 = call noundef ptr @_ZNK6d2Body8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(132) %155)
  %157 = icmp eq ptr %156, null
  br i1 %157, label %160, label %158

158:                                              ; preds = %154
  %159 = call ptr @__dynamic_cast(ptr %156, ptr @_ZTI7d2Shape, ptr @_ZTI14d2PolygonShape, i64 0) #9
  br label %161

160:                                              ; preds = %154
  br label %161

161:                                              ; preds = %160, %158
  %162 = phi ptr [ %159, %158 ], [ null, %160 ]
  store ptr %162, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %163 = load ptr, ptr %18, align 8, !tbaa !5
  %164 = call <2 x float> @_ZNK14d2PolygonShape15PolygonCentroidEv(ptr noundef nonnull align 8 dereferenceable(40) %163)
  store <2 x float> %164, ptr %19, align 4
  %165 = getelementptr inbounds %struct.d2Transform, ptr %17, i32 0, i32 0
  %166 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %165, ptr noundef nonnull align 4 dereferenceable(8) %19)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  store i32 11, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %168

167:                                              ; preds = %144
  br label %168

168:                                              ; preds = %167, %161
  %169 = getelementptr inbounds %class.d2World, ptr %22, i32 0, i32 7
  %170 = load ptr, ptr %169, align 8, !tbaa !9
  %171 = load ptr, ptr %170, align 8, !tbaa !35
  %172 = getelementptr inbounds ptr, ptr %171, i64 6
  %173 = load ptr, ptr %172, align 8
  call void %173(ptr noundef nonnull align 8 dereferenceable(12) %170, ptr noundef nonnull align 4 dereferenceable(16) %17)
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %174

174:                                              ; preds = %168
  %175 = load ptr, ptr %14, align 8, !tbaa !5
  %176 = call noundef ptr @_ZN6d2Body7GetNextEv(ptr noundef nonnull align 8 dereferenceable(132) %175)
  store ptr %176, ptr %14, align 8, !tbaa !5
  br label %140, !llvm.loop !41

177:                                              ; preds = %143
  br label %178

178:                                              ; preds = %177, %133
  %179 = load i32, ptr %3, align 4, !tbaa !15
  %180 = and i32 %179, 32
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %182, label %207

182:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #9
  call void @_ZN7d2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %20, float noundef 1.000000e+00, float noundef 0x3FDE5E5E60000000, float noundef 0x3FE8D8D8E0000000, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %183 = getelementptr inbounds %class.d2World, ptr %22, i32 0, i32 5
  %184 = load ptr, ptr %183, align 8, !tbaa !42
  store ptr %184, ptr %21, align 8, !tbaa !5
  br label %185

185:                                              ; preds = %203, %182
  %186 = load ptr, ptr %21, align 8, !tbaa !5
  %187 = icmp ne ptr %186, null
  br i1 %187, label %189, label %188

188:                                              ; preds = %185
  store i32 12, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %206

189:                                              ; preds = %185
  %190 = getelementptr inbounds %class.d2World, ptr %22, i32 0, i32 7
  %191 = load ptr, ptr %190, align 8, !tbaa !9
  %192 = load ptr, ptr %21, align 8, !tbaa !5
  %193 = getelementptr inbounds %class.d2Constraint, ptr %192, i32 0, i32 1
  %194 = load ptr, ptr %193, align 8, !tbaa !43
  %195 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6d2Body11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(132) %194)
  %196 = load ptr, ptr %21, align 8, !tbaa !5
  %197 = getelementptr inbounds %class.d2Constraint, ptr %196, i32 0, i32 2
  %198 = load ptr, ptr %197, align 8, !tbaa !45
  %199 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6d2Body11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(132) %198)
  %200 = load ptr, ptr %191, align 8, !tbaa !35
  %201 = getelementptr inbounds ptr, ptr %200, i64 7
  %202 = load ptr, ptr %201, align 8
  call void %202(ptr noundef nonnull align 8 dereferenceable(12) %191, ptr noundef nonnull align 4 dereferenceable(8) %195, ptr noundef nonnull align 4 dereferenceable(8) %199, ptr noundef nonnull align 4 dereferenceable(16) %20)
  br label %203

203:                                              ; preds = %189
  %204 = load ptr, ptr %21, align 8, !tbaa !5
  %205 = call noundef ptr @_ZN12d2Constraint7GetNextEv(ptr noundef nonnull align 8 dereferenceable(56) %204)
  store ptr %205, ptr %21, align 8, !tbaa !5
  br label %185, !llvm.loop !46

206:                                              ; preds = %188
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #9
  br label %207

207:                                              ; preds = %206, %178
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %208

208:                                              ; preds = %207, %26
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7d2ColorC2Effff(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 @_ZN6d2Body7GetNextEv(ptr noundef nonnull align 8 dereferenceable(132)) #3 align 2

; Function Attrs: nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) #7

declare <2 x float> @_ZNK14d2PolygonShape15PolygonCentroidEv(ptr noundef nonnull align 8 dereferenceable(40)) #8

declare noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #8

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 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 #7 = { nounwind willreturn memory(read) }
attributes #8 = { "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, !6, i64 176}
!10 = !{!"_ZTS7d2World", !11, i64 0, !6, i64 8, !13, i64 16, !6, i64 144, !14, i64 152, !6, i64 160, !14, i64 168, !6, i64 176}
!11 = !{!"_ZTS6d2Vec2", !12, i64 0, !12, i64 4}
!12 = !{!"float", !7, i64 0}
!13 = !{!"_ZTS16d2BlockAllocator", !6, i64 0, !14, i64 8, !14, i64 12, !7, i64 16}
!14 = !{!"int", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!10, !6, i64 144}
!19 = !{!20, !22, i64 4}
!20 = !{!"_ZTS6d2Body", !21, i64 0, !22, i64 4, !23, i64 8, !11, i64 24, !11, i64 32, !12, i64 40, !12, i64 44, !12, i64 48, !11, i64 52, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !12, i64 84, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !12, i64 128}
!21 = !{!"short", !7, i64 0}
!22 = !{!"_ZTS10d2BodyType", !7, i64 0}
!23 = !{!"_ZTS11d2Transform", !11, i64 0, !24, i64 8}
!24 = !{!"_ZTS5d2Rot", !12, i64 0, !12, i64 4}
!25 = !{i64 0, i64 4, !26, i64 4, i64 4, !26, i64 8, i64 4, !26, i64 12, i64 4, !26}
!26 = !{!12, !12, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!20, !6, i64 88}
!30 = !{!31, !12, i64 0}
!31 = !{!"_ZTS6d2AABB", !11, i64 0, !11, i64 8, !6, i64 16, !6, i64 24}
!32 = !{!31, !12, i64 4}
!33 = !{!31, !12, i64 8}
!34 = !{!31, !12, i64 12}
!35 = !{!36, !36, i64 0}
!36 = !{!"vtable pointer", !8, i64 0}
!37 = distinct !{!37, !28}
!38 = !{!10, !6, i64 8}
!39 = !{!40, !40, i64 0}
!40 = !{!"_ZTS11d2ShapeType", !7, i64 0}
!41 = distinct !{!41, !28}
!42 = !{!10, !6, i64 160}
!43 = !{!44, !6, i64 8}
!44 = !{!"_ZTS12d2Constraint", !6, i64 8, !6, i64 16, !11, i64 24, !11, i64 32, !6, i64 40, !6, i64 48}
!45 = !{!44, !6, i64 16}
!46 = distinct !{!46, !28}


; 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.d2Color = type { float, float, float, float }
%struct.d2Vec2 = type { float, float }
%struct.d2Transform = type { %struct.d2Vec2, %struct.d2Rot }
%struct.d2Rot = type { float, float }

@_ZTI7d2Shape = external dso_local constant { ptr, ptr }, align 8
@_ZTI14d2PolygonShape = external constant ptr

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

; 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 nounwind uwtable
declare dso_local noundef ptr @_ZN12d2Constraint7GetNextEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6d2Body11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(132)) local_unnamed_addr #3 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) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZNK6d2Body11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(132)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7d2World9DebugDrawEv(ptr noundef nonnull align 8 dereferenceable(184) %0) local_unnamed_addr #6 align 2 {
  %2 = alloca %struct.d2Color, align 4
  %3 = alloca %struct.d2Color, align 4
  %4 = alloca i8, align 1
  %5 = alloca %struct.d2Color, align 4
  %6 = alloca %struct.d2Color, align 4
  %7 = alloca [4 x %struct.d2Vec2], align 16
  %8 = alloca float, align 4
  %9 = alloca %struct.d2Transform, align 4
  %10 = alloca %struct.d2Vec2, align 8
  %11 = alloca %struct.d2Color, align 4
  %12 = getelementptr inbounds i8, ptr %0, i64 176
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %102, label %15

15:                                               ; preds = %1
  %16 = tail call noundef i32 @_ZNK6d2Draw8GetFlagsEv(ptr noundef nonnull align 8 dereferenceable(12) %13)
  %17 = and i32 %16, 1
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %28, label %18

18:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #10
  call void @_ZN7d2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %2, float noundef 1.000000e+00, float noundef 0x3FE7171720000000, float noundef 0x3FDB1B1B20000000, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #10
  call void @_ZN7d2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %3, float noundef 0x3FE1717180000000, float noundef 0x3FED3D3D40000000, float noundef 0x3FEFBFBFC0000000, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #10
  %19 = trunc i32 %16 to i8
  %20 = lshr i8 %19, 1
  %21 = and i8 %20, 1
  store i8 %21, ptr %4, align 1, !tbaa !14
  %22 = getelementptr inbounds i8, ptr %0, i64 144
  %23 = load ptr, ptr %22, align 8, !tbaa !16
  %.not3846 = icmp eq ptr %23, null
  br i1 %.not3846, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %18
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #10
  br label %28

.lr.ph:                                           ; preds = %18, %.lr.ph
  %.03347 = phi ptr [ %27, %.lr.ph ], [ %23, %18 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #10
  %24 = getelementptr inbounds i8, ptr %.03347, i64 4
  %25 = load i32, ptr %24, align 4, !tbaa !17
  %26 = icmp eq i32 %25, 0
  %. = select i1 %26, ptr %2, ptr %3
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(16) %., i64 16, i1 false), !tbaa.struct !23
  call void @_ZN7d2World9DrawShapeEPK6d2BodyRKbRK7d2Color(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef nonnull %.03347, ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 4 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #10
  %27 = call noundef ptr @_ZN6d2Body7GetNextEv(ptr noundef nonnull align 8 dereferenceable(132) %.03347)
  %.not38 = icmp eq ptr %27, null
  br i1 %.not38, label %._crit_edge, label %.lr.ph, !llvm.loop !25

28:                                               ; preds = %._crit_edge, %15
  %29 = and i32 %16, 4
  %.not39 = icmp eq i32 %29, 0
  br i1 %.not39, label %56, label %30

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #10
  call void @_ZN7d2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %6, float noundef 0x3FECCCCCC0000000, float noundef 0x3FD3333340000000, float noundef 0x3FECCCCCC0000000, float noundef 1.000000e+00)
  %31 = getelementptr inbounds i8, ptr %0, i64 144
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  %.not4048 = icmp eq ptr %32, null
  br i1 %.not4048, label %._crit_edge52, label %.lr.ph51

.lr.ph51:                                         ; preds = %30
  %33 = getelementptr inbounds i8, ptr %7, i64 8
  %34 = getelementptr inbounds i8, ptr %7, i64 16
  %35 = getelementptr inbounds i8, ptr %7, i64 24
  br label %36

._crit_edge52:                                    ; preds = %36, %30
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #10
  br label %56

36:                                               ; preds = %.lr.ph51, %36
  %.03449 = phi ptr [ %32, %.lr.ph51 ], [ %55, %36 ]
  %37 = getelementptr inbounds i8, ptr %.03449, i64 88
  %38 = load ptr, ptr %37, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #10
  %39 = load float, ptr %38, align 8, !tbaa !28
  %40 = getelementptr inbounds i8, ptr %38, i64 4
  %41 = load float, ptr %40, align 4, !tbaa !30
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef %39, float noundef %41)
  %42 = getelementptr inbounds i8, ptr %38, i64 8
  %43 = load float, ptr %42, align 8, !tbaa !31
  %44 = load float, ptr %40, align 4, !tbaa !30
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %33, float noundef %43, float noundef %44)
  %45 = load float, ptr %42, align 8, !tbaa !31
  %46 = getelementptr inbounds i8, ptr %38, i64 12
  %47 = load float, ptr %46, align 4, !tbaa !32
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %34, float noundef %45, float noundef %47)
  %48 = load float, ptr %38, align 8, !tbaa !28
  %49 = load float, ptr %46, align 4, !tbaa !32
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %35, float noundef %48, float noundef %49)
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #10
  %51 = call noundef float @_ZNK6d2Body11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(132) %.03449)
  store float %51, ptr %8, align 4, !tbaa !24
  %52 = load ptr, ptr %50, align 8, !tbaa !33
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  %54 = load ptr, ptr %53, align 8
  call void %54(ptr noundef nonnull align 8 dereferenceable(12) %50, ptr noundef nonnull %7, i32 noundef 4, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(16) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #10
  %55 = call noundef ptr @_ZN6d2Body7GetNextEv(ptr noundef nonnull align 8 dereferenceable(132) %.03449)
  %.not40 = icmp eq ptr %55, null
  br i1 %.not40, label %._crit_edge52, label %36, !llvm.loop !35

56:                                               ; preds = %._crit_edge52, %28
  %57 = and i32 %16, 8
  %.not41 = icmp eq i32 %57, 0
  br i1 %.not41, label %65, label %58

58:                                               ; preds = %56
  %59 = getelementptr inbounds i8, ptr %0, i64 8
  %60 = load ptr, ptr %59, align 8, !tbaa !36
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = load ptr, ptr %60, align 8, !tbaa !33
  %63 = getelementptr inbounds i8, ptr %62, i64 64
  %64 = load ptr, ptr %63, align 8
  call void %64(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull align 8 dereferenceable(12) %61)
  br label %65

65:                                               ; preds = %58, %56
  %66 = and i32 %16, 16
  %.not42 = icmp eq i32 %66, 0
  %67 = getelementptr inbounds i8, ptr %0, i64 144
  %68 = load ptr, ptr %67, align 8
  %.not4353 = icmp eq ptr %68, null
  %or.cond = select i1 %.not42, i1 true, i1 %.not4353
  br i1 %or.cond, label %.loopexit, label %.lr.ph56

.lr.ph56:                                         ; preds = %65, %81
  %.03554 = phi ptr [ %86, %81 ], [ %68, %65 ]
  %69 = call noundef ptr @_ZNK6d2Body8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(132) %.03554)
  %70 = load ptr, ptr %69, align 8, !tbaa !33
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  %72 = load ptr, ptr %71, align 8
  %73 = call noundef i32 %72(ptr noundef nonnull align 8 dereferenceable(8) %69)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #10
  %74 = getelementptr inbounds i8, ptr %.03554, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %74, i64 16, i1 false), !tbaa.struct !23
  %.off = add i32 %73, -1
  %switch = icmp ult i32 %.off, 2
  br i1 %switch, label %75, label %81

75:                                               ; preds = %.lr.ph56
  %76 = call noundef ptr @_ZNK6d2Body8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(132) %.03554)
  %77 = icmp ne ptr %76, null
  call void @llvm.assume(i1 %77)
  %78 = call ptr @__dynamic_cast(ptr nonnull %76, ptr nonnull @_ZTI7d2Shape, ptr nonnull @_ZTI14d2PolygonShape, i64 0) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #10
  %79 = call <2 x float> @_ZNK14d2PolygonShape15PolygonCentroidEv(ptr noundef nonnull align 8 dereferenceable(40) %78)
  store <2 x float> %79, ptr %10, align 8
  %80 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  br label %81

81:                                               ; preds = %.lr.ph56, %75
  %82 = load ptr, ptr %12, align 8, !tbaa !5
  %83 = load ptr, ptr %82, align 8, !tbaa !33
  %84 = getelementptr inbounds i8, ptr %83, i64 48
  %85 = load ptr, ptr %84, align 8
  call void %85(ptr noundef nonnull align 8 dereferenceable(12) %82, ptr noundef nonnull align 4 dereferenceable(16) %9)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #10
  %86 = call noundef ptr @_ZN6d2Body7GetNextEv(ptr noundef nonnull align 8 dereferenceable(132) %.03554)
  %.not43 = icmp eq ptr %86, null
  br i1 %.not43, label %.loopexit, label %.lr.ph56, !llvm.loop !37

.loopexit:                                        ; preds = %81, %65
  %87 = and i32 %16, 32
  %.not44 = icmp eq i32 %87, 0
  br i1 %.not44, label %102, label %88

88:                                               ; preds = %.loopexit
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #10
  call void @_ZN7d2ColorC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %11, float noundef 1.000000e+00, float noundef 0x3FDE5E5E60000000, float noundef 0x3FE8D8D8E0000000, float noundef 1.000000e+00)
  %89 = getelementptr inbounds i8, ptr %0, i64 160
  %90 = load ptr, ptr %89, align 8, !tbaa !38
  %.not4557 = icmp eq ptr %90, null
  br i1 %.not4557, label %._crit_edge61, label %.lr.ph60

._crit_edge61:                                    ; preds = %.lr.ph60, %88
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #10
  br label %102

.lr.ph60:                                         ; preds = %88, %.lr.ph60
  %.058 = phi ptr [ %101, %.lr.ph60 ], [ %90, %88 ]
  %91 = load ptr, ptr %12, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %.058, i64 8
  %93 = load ptr, ptr %92, align 8, !tbaa !39
  %94 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6d2Body11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(132) %93)
  %95 = getelementptr inbounds i8, ptr %.058, i64 16
  %96 = load ptr, ptr %95, align 8, !tbaa !41
  %97 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6d2Body11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(132) %96)
  %98 = load ptr, ptr %91, align 8, !tbaa !33
  %99 = getelementptr inbounds i8, ptr %98, i64 56
  %100 = load ptr, ptr %99, align 8
  call void %100(ptr noundef nonnull align 8 dereferenceable(12) %91, ptr noundef nonnull align 4 dereferenceable(8) %94, ptr noundef nonnull align 4 dereferenceable(8) %97, ptr noundef nonnull align 4 dereferenceable(16) %11)
  %101 = call noundef ptr @_ZN12d2Constraint7GetNextEv(ptr noundef nonnull align 8 dereferenceable(56) %.058)
  %.not45 = icmp eq ptr %101, null
  br i1 %.not45, label %._crit_edge61, label %.lr.ph60, !llvm.loop !42

102:                                              ; preds = %.loopexit, %._crit_edge61, %1
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7d2ColorC2Effff(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 @_ZN6d2Body7GetNextEv(ptr noundef nonnull align 8 dereferenceable(132)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) local_unnamed_addr #7

declare <2 x float> @_ZNK14d2PolygonShape15PolygonCentroidEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #8

declare noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #8

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #9

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 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 #7 = { mustprogress nofree nounwind willreturn memory(read) }
attributes #8 = { "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 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) }
attributes #10 = { 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 176}
!6 = !{!"_ZTS7d2World", !7, i64 0, !11, i64 8, !12, i64 16, !11, i64 144, !13, i64 152, !11, i64 160, !13, i64 168, !11, i64 176}
!7 = !{!"_ZTS6d2Vec2", !8, i64 0, !8, i64 4}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTS16d2BlockAllocator", !11, i64 0, !13, i64 8, !13, i64 12, !9, i64 16}
!13 = !{!"int", !9, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !9, i64 0}
!16 = !{!6, !11, i64 144}
!17 = !{!18, !20, i64 4}
!18 = !{!"_ZTS6d2Body", !19, i64 0, !20, i64 4, !21, i64 8, !7, i64 24, !7, i64 32, !8, i64 40, !8, i64 44, !8, i64 48, !7, i64 52, !8, i64 60, !8, i64 64, !8, i64 68, !8, i64 72, !8, i64 76, !8, i64 80, !8, i64 84, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !8, i64 128}
!19 = !{!"short", !9, i64 0}
!20 = !{!"_ZTS10d2BodyType", !9, i64 0}
!21 = !{!"_ZTS11d2Transform", !7, i64 0, !22, i64 8}
!22 = !{!"_ZTS5d2Rot", !8, i64 0, !8, i64 4}
!23 = !{i64 0, i64 4, !24, i64 4, i64 4, !24, i64 8, i64 4, !24, i64 12, i64 4, !24}
!24 = !{!8, !8, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!18, !11, i64 88}
!28 = !{!29, !8, i64 0}
!29 = !{!"_ZTS6d2AABB", !7, i64 0, !7, i64 8, !11, i64 16, !11, i64 24}
!30 = !{!29, !8, i64 4}
!31 = !{!29, !8, i64 8}
!32 = !{!29, !8, i64 12}
!33 = !{!34, !34, i64 0}
!34 = !{!"vtable pointer", !10, i64 0}
!35 = distinct !{!35, !26}
!36 = !{!6, !11, i64 8}
!37 = distinct !{!37, !26}
!38 = !{!6, !11, i64 160}
!39 = !{!40, !11, i64 8}
!40 = !{!"_ZTS12d2Constraint", !11, i64 8, !11, i64 16, !7, i64 24, !7, i64 32, !11, i64 40, !11, i64 48}
!41 = !{!40, !11, i64 16}
!42 = distinct !{!42, !26}


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