; LLVM IR from SOHNE/Dura2D :: src/collision (d2CollisionDetection)

; 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.d2Vec2 = type { float, float }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<d2Vec2, std::allocator<d2Vec2>>::_Vector_impl" }
%"struct.std::_Vector_base<d2Vec2, std::allocator<d2Vec2>>::_Vector_impl" = type { %"struct.std::_Vector_base<d2Vec2, std::allocator<d2Vec2>>::_Vector_impl_data" }
%"struct.std::_Vector_base<d2Vec2, std::allocator<d2Vec2>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator.2" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.d2Contact = type <{ ptr, ptr, %struct.d2Vec2, %struct.d2Vec2, %struct.d2Vec2, float, [4 x i8] }>
%struct.d2PolygonShape = type { %struct.d2Shape, float, float, i32, ptr, ptr }
%struct.d2Shape = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN20d2CollisionDetection25IsCollidingPolygonPolygonEP6d2BodyS1_RSt6vectorI9d2ContactSaIS3_EE(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 1 %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.d2Vec2, align 4
  %13 = alloca %struct.d2Vec2, align 4
  %14 = alloca float, align 4
  %15 = alloca i32, align 4
  %16 = alloca float, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca %struct.d2Vec2, align 4
  %21 = alloca i32, align 4
  %22 = alloca %struct.d2Vec2, align 4
  %23 = alloca i32, align 4
  %24 = alloca %struct.d2Vec2, align 4
  %25 = alloca %struct.d2Vec2, align 4
  %26 = alloca %"class.std::vector.0", align 8
  %27 = alloca %"class.std::initializer_list", align 8
  %28 = alloca [2 x %struct.d2Vec2], align 4
  %29 = alloca %"class.std::allocator.2", align 1
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  %32 = alloca %"class.std::vector.0", align 8
  %33 = alloca i32, align 4
  %34 = alloca %struct.d2Vec2, align 4
  %35 = alloca %struct.d2Vec2, align 4
  %36 = alloca i32, align 4
  %37 = alloca %struct.d2Vec2, align 4
  %38 = alloca ptr, align 8
  %39 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %40 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %41 = alloca ptr, align 8
  %42 = alloca float, align 4
  %43 = alloca %struct.d2Vec2, align 4
  %44 = alloca %struct.d2Vec2, align 4
  %45 = alloca %struct.d2Contact, align 8
  %46 = alloca %struct.d2Vec2, align 4
  %47 = alloca %struct.d2Vec2, align 4
  %48 = alloca %struct.d2Vec2, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = call noundef ptr @_ZNK6d2Body8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(132) %49)
  store ptr %50, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = call noundef ptr @_ZNK6d2Body8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(132) %51)
  store ptr %52, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  call void @_ZN6d2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  call void @_ZN6d2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = call noundef float @_ZNK14d2PolygonShape17FindMinSeparationEPKS_RiR6d2Vec2(ptr noundef nonnull align 8 dereferenceable(40) %53, ptr noundef %54, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(8) %12)
  store float %55, ptr %14, align 4, !tbaa !9
  %56 = load float, ptr %14, align 4, !tbaa !9
  %57 = fcmp oge float %56, 0.000000e+00
  br i1 %57, label %58, label %59

58:                                               ; preds = %3
  store i1 false, ptr %4, align 1
  store i32 1, ptr %15, align 4
  br label %267

59:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = call noundef float @_ZNK14d2PolygonShape17FindMinSeparationEPKS_RiR6d2Vec2(ptr noundef nonnull align 8 dereferenceable(40) %60, ptr noundef %61, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(8) %13)
  store float %62, ptr %16, align 4, !tbaa !9
  %63 = load float, ptr %16, align 4, !tbaa !9
  %64 = fcmp oge float %63, 0.000000e+00
  br i1 %64, label %65, label %66

65:                                               ; preds = %59
  store i1 false, ptr %4, align 1
  store i32 1, ptr %15, align 4
  br label %266

66:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %67 = load float, ptr %14, align 4, !tbaa !9
  %68 = load float, ptr %16, align 4, !tbaa !9
  %69 = fcmp ogt float %67, %68
  br i1 %69, label %70, label %74

70:                                               ; preds = %66
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %71, ptr %17, align 8, !tbaa !5
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %72, ptr %18, align 8, !tbaa !5
  %73 = load i32, ptr %10, align 4, !tbaa !11
  store i32 %73, ptr %19, align 4, !tbaa !11
  br label %78

74:                                               ; preds = %66
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %75, ptr %17, align 8, !tbaa !5
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %76, ptr %18, align 8, !tbaa !5
  %77 = load i32, ptr %11, align 4, !tbaa !11
  store i32 %77, ptr %19, align 4, !tbaa !11
  br label %78

78:                                               ; preds = %74, %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %79 = load ptr, ptr %17, align 8, !tbaa !5
  %80 = load i32, ptr %19, align 4, !tbaa !11
  %81 = call <2 x float> @_ZNK14d2PolygonShape6EdgeAtEi(ptr noundef nonnull align 8 dereferenceable(40) %79, i32 noundef %80)
  store <2 x float> %81, ptr %20, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %82 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %83 = call <2 x float> @_ZNK6d2Vec26NormalEv(ptr noundef nonnull align 4 dereferenceable(8) %20)
  store <2 x float> %83, ptr %22, align 4
  %84 = call noundef i32 @_ZNK14d2PolygonShape16FindIncidentEdgeERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(40) %82, ptr noundef nonnull align 4 dereferenceable(8) %22)
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  store i32 %84, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %85 = load i32, ptr %21, align 4, !tbaa !11
  %86 = add nsw i32 %85, 1
  %87 = load ptr, ptr %18, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.d2PolygonShape, ptr %87, i32 0, i32 3
  %89 = load i32, ptr %88, align 8, !tbaa !13
  %90 = srem i32 %86, %89
  store i32 %90, ptr %23, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %91 = load ptr, ptr %18, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.d2PolygonShape, ptr %91, i32 0, i32 5
  %93 = load ptr, ptr %92, align 8, !tbaa !16
  %94 = load i32, ptr %21, align 4, !tbaa !11
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds %struct.d2Vec2, ptr %93, i64 %95
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %96, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %97 = load ptr, ptr %18, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.d2PolygonShape, ptr %97, i32 0, i32 5
  %99 = load ptr, ptr %98, align 8, !tbaa !16
  %100 = load i32, ptr %23, align 4, !tbaa !11
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds %struct.d2Vec2, ptr %99, i64 %101
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %102, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %24, i64 8, i1 false), !tbaa.struct !17
  %103 = getelementptr inbounds %struct.d2Vec2, ptr %28, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %103, ptr align 4 %25, i64 8, i1 false), !tbaa.struct !17
  %104 = getelementptr inbounds %"class.std::initializer_list", ptr %27, i32 0, i32 0
  store ptr %28, ptr %104, align 8, !tbaa !18
  %105 = getelementptr inbounds %"class.std::initializer_list", ptr %27, i32 0, i32 1
  store i64 2, ptr %105, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #8
  call void @_ZNSaI6d2Vec2EC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #8
  %106 = getelementptr inbounds { ptr, i64 }, ptr %27, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8
  %108 = getelementptr inbounds { ptr, i64 }, ptr %27, i32 0, i32 1
  %109 = load i64, ptr %108, align 8
  invoke void @_ZNSt6vectorI6d2Vec2SaIS0_EEC2ESt16initializer_listIS0_ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr %107, i64 %109, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %110 unwind label %119

110:                                              ; preds = %78
  call void @_ZNSt15__new_allocatorI6d2Vec2ED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %32) #8
  invoke void @_ZNSt6vectorI6d2Vec2SaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 8 dereferenceable(24) %26)
          to label %111 unwind label %123

111:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  store i32 0, ptr %33, align 4, !tbaa !11
  br label %112

112:                                              ; preds = %166, %111
  %113 = load i32, ptr %33, align 4, !tbaa !11
  %114 = load ptr, ptr %17, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.d2PolygonShape, ptr %114, i32 0, i32 3
  %116 = load i32, ptr %115, align 8, !tbaa !13
  %117 = icmp slt i32 %113, %116
  br i1 %117, label %127, label %118

118:                                              ; preds = %112
  store i32 2, ptr %15, align 4
  br label %169

119:                                              ; preds = %78
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %30, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %31, align 4
  call void @_ZNSt15__new_allocatorI6d2Vec2ED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #8
  br label %265

123:                                              ; preds = %110
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %30, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %31, align 4
  br label %264

127:                                              ; preds = %112
  %128 = load i32, ptr %33, align 4, !tbaa !11
  %129 = load i32, ptr %19, align 4, !tbaa !11
  %130 = icmp eq i32 %128, %129
  br i1 %130, label %131, label %132

131:                                              ; preds = %127
  br label %166

132:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %133 = load ptr, ptr %17, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.d2PolygonShape, ptr %133, i32 0, i32 5
  %135 = load ptr, ptr %134, align 8, !tbaa !16
  %136 = load i32, ptr %33, align 4, !tbaa !11
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds %struct.d2Vec2, ptr %135, i64 %137
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %138, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #8
  %139 = load ptr, ptr %17, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.d2PolygonShape, ptr %139, i32 0, i32 5
  %141 = load ptr, ptr %140, align 8, !tbaa !16
  %142 = load i32, ptr %33, align 4, !tbaa !11
  %143 = add nsw i32 %142, 1
  %144 = load ptr, ptr %17, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.d2PolygonShape, ptr %144, i32 0, i32 3
  %146 = load i32, ptr %145, align 8, !tbaa !13
  %147 = srem i32 %143, %146
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds %struct.d2Vec2, ptr %141, i64 %148
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %149, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  %150 = load ptr, ptr %17, align 8, !tbaa !5
  %151 = invoke noundef i32 @_ZNK14d2PolygonShape17ClipSegmentToLineERKSt6vectorI6d2Vec2SaIS1_EERS3_RKS1_S8_(ptr noundef nonnull align 8 dereferenceable(40) %150, ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(8) %35)
          to label %152 unwind label %156

152:                                              ; preds = %132
  store i32 %151, ptr %36, align 4, !tbaa !11
  %153 = load i32, ptr %36, align 4, !tbaa !11
  %154 = icmp slt i32 %153, 2
  br i1 %154, label %155, label %160

155:                                              ; preds = %152
  store i32 2, ptr %15, align 4
  br label %163

156:                                              ; preds = %160, %132
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %30, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %263

160:                                              ; preds = %152
  %161 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI6d2Vec2SaIS0_EEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(24) %32)
          to label %162 unwind label %156

162:                                              ; preds = %160
  store i32 0, ptr %15, align 4
  br label %163

163:                                              ; preds = %162, %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  %164 = load i32, ptr %15, align 4
  switch i32 %164, label %169 [
    i32 0, label %165
  ]

165:                                              ; preds = %163
  br label %166

166:                                              ; preds = %165, %131
  %167 = load i32, ptr %33, align 4, !tbaa !11
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %33, align 4, !tbaa !11
  br label %112, !llvm.loop !22

169:                                              ; preds = %163, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %170

170:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %171 = load ptr, ptr %17, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.d2PolygonShape, ptr %171, i32 0, i32 5
  %173 = load ptr, ptr %172, align 8, !tbaa !16
  %174 = load i32, ptr %19, align 4, !tbaa !11
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds %struct.d2Vec2, ptr %173, i64 %175
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %176, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  store ptr %32, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  %177 = load ptr, ptr %38, align 8, !tbaa !5
  %178 = call ptr @_ZNSt6vectorI6d2Vec2SaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %177) #8
  %179 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %39, i32 0, i32 0
  store ptr %178, ptr %179, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %180 = load ptr, ptr %38, align 8, !tbaa !5
  %181 = call ptr @_ZNSt6vectorI6d2Vec2SaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %180) #8
  %182 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %40, i32 0, i32 0
  store ptr %181, ptr %182, align 8
  br label %183

183:                                              ; preds = %259, %170
  %184 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP6d2Vec2St6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %40) #8
  br i1 %184, label %186, label %185

185:                                              ; preds = %183
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  br label %262

186:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #8
  %187 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP6d2Vec2St6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  store ptr %187, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  %188 = load ptr, ptr %41, align 8, !tbaa !5
  %189 = invoke <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %188, ptr noundef nonnull align 4 dereferenceable(8) %37)
          to label %190 unwind label %233

190:                                              ; preds = %186
  store <2 x float> %189, ptr %43, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  %191 = invoke <2 x float> @_ZNK6d2Vec26NormalEv(ptr noundef nonnull align 4 dereferenceable(8) %20)
          to label %192 unwind label %237

192:                                              ; preds = %190
  store <2 x float> %191, ptr %44, align 4
  %193 = invoke noundef float @_ZNK6d2Vec23DotERKS_(ptr noundef nonnull align 4 dereferenceable(8) %43, ptr noundef nonnull align 4 dereferenceable(8) %44)
          to label %194 unwind label %237

194:                                              ; preds = %192
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  store float %193, ptr %42, align 4, !tbaa !9
  %195 = load float, ptr %42, align 4, !tbaa !9
  %196 = fcmp ole float %195, 0.000000e+00
  br i1 %196, label %197, label %258

197:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 48, ptr %45) #8
  invoke void @_ZN9d2ContactC2Ev(ptr noundef nonnull align 8 dereferenceable(44) %45)
          to label %198 unwind label %242

198:                                              ; preds = %197
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.d2Contact, ptr %45, i32 0, i32 0
  store ptr %199, ptr %200, align 8, !tbaa !24
  %201 = load ptr, ptr %6, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.d2Contact, ptr %45, i32 0, i32 1
  store ptr %201, ptr %202, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #8
  %203 = invoke <2 x float> @_ZNK6d2Vec26NormalEv(ptr noundef nonnull align 4 dereferenceable(8) %20)
          to label %204 unwind label %246

204:                                              ; preds = %198
  store <2 x float> %203, ptr %46, align 4
  %205 = getelementptr inbounds %struct.d2Contact, ptr %45, i32 0, i32 4
  %206 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2aSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %205, ptr noundef nonnull align 4 dereferenceable(8) %46)
          to label %207 unwind label %246

207:                                              ; preds = %204
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #8
  %208 = load ptr, ptr %41, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.d2Contact, ptr %45, i32 0, i32 2
  %210 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2aSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %209, ptr noundef nonnull align 4 dereferenceable(8) %208)
          to label %211 unwind label %242

211:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #8
  %212 = load ptr, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #8
  %213 = getelementptr inbounds %struct.d2Contact, ptr %45, i32 0, i32 4
  %214 = load float, ptr %42, align 4, !tbaa !9
  %215 = fneg float %214
  %216 = invoke <2 x float> @_ZNK6d2Vec2mlEf(ptr noundef nonnull align 4 dereferenceable(8) %213, float noundef %215)
          to label %217 unwind label %250

217:                                              ; preds = %211
  store <2 x float> %216, ptr %48, align 4
  %218 = invoke <2 x float> @_ZNK6d2Vec2plERKS_(ptr noundef nonnull align 4 dereferenceable(8) %212, ptr noundef nonnull align 4 dereferenceable(8) %48)
          to label %219 unwind label %250

219:                                              ; preds = %217
  store <2 x float> %218, ptr %47, align 4
  %220 = getelementptr inbounds %struct.d2Contact, ptr %45, i32 0, i32 3
  %221 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2aSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %220, ptr noundef nonnull align 4 dereferenceable(8) %47)
          to label %222 unwind label %250

222:                                              ; preds = %219
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  %223 = load float, ptr %16, align 4, !tbaa !9
  %224 = load float, ptr %14, align 4, !tbaa !9
  %225 = fcmp oge float %223, %224
  br i1 %225, label %226, label %254

226:                                              ; preds = %222
  %227 = getelementptr inbounds %struct.d2Contact, ptr %45, i32 0, i32 2
  %228 = getelementptr inbounds %struct.d2Contact, ptr %45, i32 0, i32 3
  invoke void @_ZSt4swapI6d2Vec2ENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 4 dereferenceable(8) %227, ptr noundef nonnull align 4 dereferenceable(8) %228)
          to label %229 unwind label %242

229:                                              ; preds = %226
  %230 = getelementptr inbounds %struct.d2Contact, ptr %45, i32 0, i32 4
  %231 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8) %230, float noundef -1.000000e+00)
          to label %232 unwind label %242

232:                                              ; preds = %229
  br label %254

233:                                              ; preds = %186
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %30, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %31, align 4
  br label %241

237:                                              ; preds = %192, %190
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %30, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  br label %241

241:                                              ; preds = %237, %233
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  br label %261

242:                                              ; preds = %254, %229, %226, %207, %197
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %30, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %31, align 4
  br label %257

246:                                              ; preds = %204, %198
  %247 = landingpad { ptr, i32 }
          cleanup
  %248 = extractvalue { ptr, i32 } %247, 0
  store ptr %248, ptr %30, align 8
  %249 = extractvalue { ptr, i32 } %247, 1
  store i32 %249, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #8
  br label %257

250:                                              ; preds = %219, %217, %211
  %251 = landingpad { ptr, i32 }
          cleanup
  %252 = extractvalue { ptr, i32 } %251, 0
  store ptr %252, ptr %30, align 8
  %253 = extractvalue { ptr, i32 } %251, 1
  store i32 %253, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  br label %257

254:                                              ; preds = %232, %222
  %255 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNSt6vectorI9d2ContactSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %255, ptr noundef nonnull align 8 dereferenceable(44) %45)
          to label %256 unwind label %242

256:                                              ; preds = %254
  call void @llvm.lifetime.end.p0(i64 48, ptr %45) #8
  br label %258

257:                                              ; preds = %250, %246, %242
  call void @llvm.lifetime.end.p0(i64 48, ptr %45) #8
  br label %261

258:                                              ; preds = %256, %194
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  br label %259

259:                                              ; preds = %258
  %260 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP6d2Vec2St6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  br label %183

261:                                              ; preds = %257, %241
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  br label %263

262:                                              ; preds = %185
  store i1 true, ptr %4, align 1
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @_ZNSt6vectorI6d2Vec2SaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #8
  call void @_ZNSt6vectorI6d2Vec2SaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %266

263:                                              ; preds = %261, %156
  call void @_ZNSt6vectorI6d2Vec2SaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #8
  br label %264

264:                                              ; preds = %263, %123
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #8
  call void @_ZNSt6vectorI6d2Vec2SaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  br label %265

265:                                              ; preds = %264, %119
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %269

266:                                              ; preds = %262, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %267

267:                                              ; preds = %266, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  %268 = load i1, ptr %4, align 1
  ret i1 %268

269:                                              ; preds = %265
  %270 = load ptr, ptr %30, align 8
  %271 = load i32, ptr %31, align 4
  %272 = insertvalue { ptr, i32 } poison, ptr %270, 0
  %273 = insertvalue { ptr, i32 } %272, i32 %271, 1
  resume { ptr, i32 } %273
}

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

declare <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN9d2ContactC2Ev(ptr noundef nonnull align 8 dereferenceable(44)) unnamed_addr #4 align 2

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

declare <2 x float> @_ZNK6d2Vec2mlEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) #3

declare <2 x float> @_ZNK6d2Vec2plERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI9d2ContactSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(44)) #5 align 2

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

declare noundef float @_ZNK14d2PolygonShape17FindMinSeparationEPKS_RiR6d2Vec2(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(8)) #3

declare <2 x float> @_ZNK14d2PolygonShape6EdgeAtEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #3

declare noundef i32 @_ZNK14d2PolygonShape16FindIncidentEdgeERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZNK6d2Vec26NormalEv(ptr noundef nonnull align 4 dereferenceable(8)) #2 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) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaI6d2Vec2EC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI6d2Vec2SaIS0_EEC2ESt16initializer_listIS0_ERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI6d2Vec2SaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

declare noundef i32 @_ZNK14d2PolygonShape17ClipSegmentToLineERKSt6vectorI6d2Vec2SaIS1_EERS3_RKS1_S8_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI6d2Vec2SaIS0_EEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIP6d2Vec2St6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

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

declare noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorI6d2Vec2ED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { 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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 16}
!14 = !{!"_ZTS14d2PolygonShape", !15, i64 0, !10, i64 8, !10, i64 12, !12, i64 16, !6, i64 24, !6, i64 32}
!15 = !{!"_ZTS7d2Shape"}
!16 = !{!14, !6, i64 32}
!17 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTSSt16initializer_listI6d2Vec2E", !6, i64 0, !20, i64 8}
!20 = !{!"long", !7, i64 0}
!21 = !{!19, !20, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !6, i64 0}
!25 = !{!"_ZTS9d2Contact", !6, i64 0, !6, i64 8, !26, i64 16, !26, i64 24, !26, i64 32, !10, i64 40}
!26 = !{!"_ZTS6d2Vec2", !10, i64 0, !10, i64 4}
!27 = !{!25, !6, i64 8}


; 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.d2Vec2 = type { float, float }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<d2Vec2, std::allocator<d2Vec2>>::_Vector_impl" }
%"struct.std::_Vector_base<d2Vec2, std::allocator<d2Vec2>>::_Vector_impl" = type { %"struct.std::_Vector_base<d2Vec2, std::allocator<d2Vec2>>::_Vector_impl_data" }
%"struct.std::_Vector_base<d2Vec2, std::allocator<d2Vec2>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.d2Contact = type <{ ptr, ptr, %struct.d2Vec2, %struct.d2Vec2, %struct.d2Vec2, float, [4 x i8] }>

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN20d2CollisionDetection25IsCollidingPolygonPolygonEP6d2BodyS1_RSt6vectorI9d2ContactSaIS3_EE(ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull align 1 %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %struct.d2Vec2, align 4
  %7 = alloca %struct.d2Vec2, align 4
  %8 = alloca %struct.d2Vec2, align 8
  %9 = alloca %struct.d2Vec2, align 8
  %10 = alloca %"class.std::vector.0", align 8
  %11 = alloca [2 x %struct.d2Vec2], align 8
  %12 = alloca %"class.std::allocator.2", align 1
  %13 = alloca %"class.std::vector.0", align 8
  %14 = alloca %struct.d2Vec2, align 8
  %15 = alloca %struct.d2Vec2, align 8
  %16 = alloca %struct.d2Vec2, align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %struct.d2Vec2, align 8
  %20 = alloca %struct.d2Vec2, align 8
  %21 = alloca %struct.d2Contact, align 8
  %22 = alloca %struct.d2Vec2, align 8
  %23 = alloca %struct.d2Vec2, align 8
  %24 = alloca %struct.d2Vec2, align 8
  %25 = tail call noundef ptr @_ZNK6d2Body8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(132) %0)
  %26 = tail call noundef ptr @_ZNK6d2Body8GetShapeEv(ptr noundef nonnull align 8 dereferenceable(132) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @_ZN6d2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @_ZN6d2Vec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %7)
  %27 = call noundef float @_ZNK14d2PolygonShape17FindMinSeparationEPKS_RiR6d2Vec2(ptr noundef nonnull align 8 dereferenceable(40) %25, ptr noundef %26, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(8) %6)
  %28 = fcmp ult float %27, 0.000000e+00
  br i1 %28, label %29, label %145

29:                                               ; preds = %3
  %30 = call noundef float @_ZNK14d2PolygonShape17FindMinSeparationEPKS_RiR6d2Vec2(ptr noundef nonnull align 8 dereferenceable(40) %26, ptr noundef nonnull %25, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(8) %7)
  %31 = fcmp ult float %30, 0.000000e+00
  br i1 %31, label %32, label %145

32:                                               ; preds = %29
  %33 = fcmp ogt float %27, %30
  %.75 = select i1 %33, ptr %26, ptr %25
  %.76 = select i1 %33, ptr %25, ptr %26
  %.val = load i32, ptr %4, align 4
  %.val77 = load i32, ptr %5, align 4
  %.064 = select i1 %33, i32 %.val, i32 %.val77
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %34 = call <2 x float> @_ZNK14d2PolygonShape6EdgeAtEi(ptr noundef nonnull align 8 dereferenceable(40) %.76, i32 noundef %.064)
  store <2 x float> %34, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %35 = call <2 x float> @_ZNK6d2Vec26NormalEv(ptr noundef nonnull align 4 dereferenceable(8) %8)
  store <2 x float> %35, ptr %9, align 8
  %36 = call noundef i32 @_ZNK14d2PolygonShape16FindIncidentEdgeERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(40) %.75, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %37 = add nsw i32 %36, 1
  %38 = getelementptr inbounds i8, ptr %.75, i64 16
  %39 = load i32, ptr %38, align 8, !tbaa !5
  %40 = srem i32 %37, %39
  %41 = getelementptr inbounds i8, ptr %.75, i64 32
  %42 = load ptr, ptr %41, align 8, !tbaa !13
  %43 = sext i32 %36 to i64
  %44 = getelementptr inbounds %struct.d2Vec2, ptr %42, i64 %43
  %45 = load i64, ptr %44, align 4
  %46 = sext i32 %40 to i64
  %47 = getelementptr inbounds %struct.d2Vec2, ptr %42, i64 %46
  %48 = load i64, ptr %47, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  store i64 %45, ptr %11, align 8
  %49 = getelementptr inbounds i8, ptr %11, i64 8
  store i64 %48, ptr %49, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #7
  call void @_ZNSaI6d2Vec2EC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt6vectorI6d2Vec2SaIS0_EEC2ESt16initializer_listIS0_ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr nonnull %11, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %50 unwind label %56

50:                                               ; preds = %32
  call void @_ZNSt15__new_allocatorI6d2Vec2ED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #7
  invoke void @_ZNSt6vectorI6d2Vec2SaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %.preheader unwind label %58

.preheader:                                       ; preds = %50
  %51 = getelementptr inbounds i8, ptr %.76, i64 16
  %52 = load i32, ptr %51, align 8, !tbaa !5
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader
  %54 = getelementptr inbounds i8, ptr %.76, i64 32
  %55 = zext i32 %.064 to i64
  br label %60

56:                                               ; preds = %32
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI6d2Vec2ED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  br label %144

58:                                               ; preds = %50
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %143

60:                                               ; preds = %.lr.ph, %81
  %61 = phi i32 [ %52, %.lr.ph ], [ %82, %81 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.pre-phi, %81 ]
  %62 = icmp eq i64 %indvars.iv, %55
  br i1 %62, label %._crit_edge81, label %63

._crit_edge81:                                    ; preds = %60
  %.pre82 = add nuw nsw i64 %indvars.iv, 1
  br label %81

63:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %64 = load ptr, ptr %54, align 8, !tbaa !13
  %65 = getelementptr inbounds %struct.d2Vec2, ptr %64, i64 %indvars.iv
  %66 = load i64, ptr %65, align 4
  store i64 %66, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %67 = add nuw nsw i64 %indvars.iv, 1
  %68 = trunc nuw nsw i64 %67 to i32
  %69 = srem i32 %68, %61
  %70 = zext nneg i32 %69 to i64
  %71 = getelementptr inbounds %struct.d2Vec2, ptr %64, i64 %70
  %72 = load i64, ptr %71, align 4
  store i64 %72, ptr %15, align 8
  %73 = invoke noundef i32 @_ZNK14d2PolygonShape17ClipSegmentToLineERKSt6vectorI6d2Vec2SaIS1_EERS3_RKS1_S8_(ptr noundef nonnull align 8 dereferenceable(40) %.76, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %15)
          to label %74 unwind label %76

74:                                               ; preds = %63
  %75 = icmp sgt i32 %73, 1
  br i1 %75, label %78, label %.critedge

76:                                               ; preds = %78, %63
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %142

78:                                               ; preds = %74
  %79 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI6d2Vec2SaIS0_EEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %80 unwind label %76

80:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  %.pre = load i32, ptr %51, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %._crit_edge81, %80
  %indvars.iv.next.pre-phi = phi i64 [ %.pre82, %._crit_edge81 ], [ %67, %80 ]
  %82 = phi i32 [ %61, %._crit_edge81 ], [ %.pre, %80 ]
  %83 = sext i32 %82 to i64
  %84 = icmp slt i64 %indvars.iv.next.pre-phi, %83
  br i1 %84, label %60, label %.loopexit, !llvm.loop !14

.critedge:                                        ; preds = %74
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %.loopexit

.loopexit:                                        ; preds = %81, %.preheader, %.critedge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  %85 = getelementptr inbounds i8, ptr %.76, i64 32
  %86 = load ptr, ptr %85, align 8, !tbaa !13
  %87 = sext i32 %.064 to i64
  %88 = getelementptr inbounds %struct.d2Vec2, ptr %86, i64 %87
  %89 = load i64, ptr %88, align 4
  store i64 %89, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %90 = call ptr @_ZNSt6vectorI6d2Vec2SaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  store ptr %90, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #7
  %91 = call ptr @_ZNSt6vectorI6d2Vec2SaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  store ptr %91, ptr %18, align 8
  %92 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP6d2Vec2St6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  br i1 %92, label %.lr.ph79, label %._crit_edge

.lr.ph79:                                         ; preds = %.loopexit
  %93 = getelementptr inbounds i8, ptr %21, i64 8
  %94 = getelementptr inbounds i8, ptr %21, i64 32
  %95 = getelementptr inbounds i8, ptr %21, i64 16
  %96 = getelementptr inbounds i8, ptr %21, i64 24
  %97 = fcmp ult float %30, %27
  br label %98

._crit_edge:                                      ; preds = %138, %.loopexit
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  call void @_ZNSt6vectorI6d2Vec2SaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  call void @_ZNSt6vectorI6d2Vec2SaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %145

98:                                               ; preds = %.lr.ph79, %138
  %99 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP6d2Vec2St6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  %100 = invoke <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %99, ptr noundef nonnull align 4 dereferenceable(8) %16)
          to label %101 unwind label %124

101:                                              ; preds = %98
  store <2 x float> %100, ptr %19, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #7
  %102 = invoke <2 x float> @_ZNK6d2Vec26NormalEv(ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %103 unwind label %126

103:                                              ; preds = %101
  store <2 x float> %102, ptr %20, align 8
  %104 = call noundef float @_ZNK6d2Vec23DotERKS_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(8) %20)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  %105 = fcmp ugt float %104, 0.000000e+00
  br i1 %105, label %138, label %106

106:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %21) #7
  invoke void @_ZN9d2ContactC2Ev(ptr noundef nonnull align 8 dereferenceable(44) %21)
          to label %107 unwind label %129

107:                                              ; preds = %106
  store ptr %0, ptr %21, align 8, !tbaa !16
  store ptr %1, ptr %93, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  %108 = invoke <2 x float> @_ZNK6d2Vec26NormalEv(ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %109 unwind label %131

109:                                              ; preds = %107
  store <2 x float> %108, ptr %22, align 8
  %110 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2aSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %94, ptr noundef nonnull align 4 dereferenceable(8) %22)
          to label %111 unwind label %131

111:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  %112 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2aSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %95, ptr noundef nonnull align 4 dereferenceable(8) %99)
          to label %113 unwind label %129

113:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #7
  %114 = fneg float %104
  %115 = invoke <2 x float> @_ZNK6d2Vec2mlEf(ptr noundef nonnull align 4 dereferenceable(8) %94, float noundef %114)
          to label %116 unwind label %133

116:                                              ; preds = %113
  store <2 x float> %115, ptr %24, align 8
  %117 = invoke <2 x float> @_ZNK6d2Vec2plERKS_(ptr noundef nonnull align 4 dereferenceable(8) %99, ptr noundef nonnull align 4 dereferenceable(8) %24)
          to label %118 unwind label %133

118:                                              ; preds = %116
  store <2 x float> %117, ptr %23, align 8
  %119 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2aSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %96, ptr noundef nonnull align 4 dereferenceable(8) %23)
          to label %120 unwind label %133

120:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  br i1 %97, label %135, label %121

121:                                              ; preds = %120
  invoke void @_ZSt4swapI6d2Vec2ENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 4 dereferenceable(8) %95, ptr noundef nonnull align 4 dereferenceable(8) %96)
          to label %122 unwind label %129

122:                                              ; preds = %121
  %123 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8) %94, float noundef -1.000000e+00)
          to label %135 unwind label %129

124:                                              ; preds = %98
  %125 = landingpad { ptr, i32 }
          cleanup
  br label %128

126:                                              ; preds = %101
  %127 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  br label %128

128:                                              ; preds = %126, %124
  %.pn = phi { ptr, i32 } [ %127, %126 ], [ %125, %124 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  br label %141

129:                                              ; preds = %135, %122, %121, %111, %106
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %137

131:                                              ; preds = %109, %107
  %132 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  br label %137

133:                                              ; preds = %118, %116, %113
  %134 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  br label %137

135:                                              ; preds = %122, %120
  invoke void @_ZNSt6vectorI9d2ContactSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(44) %21)
          to label %136 unwind label %129

136:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %21) #7
  br label %138

137:                                              ; preds = %133, %131, %129
  %.pn69 = phi { ptr, i32 } [ %130, %129 ], [ %134, %133 ], [ %132, %131 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %21) #7
  br label %141

138:                                              ; preds = %136, %103
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP6d2Vec2St6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  %140 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP6d2Vec2St6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  br i1 %140, label %98, label %._crit_edge

141:                                              ; preds = %137, %128
  %.pn69.pn = phi { ptr, i32 } [ %.pn69, %137 ], [ %.pn, %128 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br label %142

142:                                              ; preds = %141, %76
  %.pn69.pn.pn = phi { ptr, i32 } [ %.pn69.pn, %141 ], [ %77, %76 ]
  call void @_ZNSt6vectorI6d2Vec2SaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  br label %143

143:                                              ; preds = %142, %58
  %.pn69.pn.pn.pn = phi { ptr, i32 } [ %.pn69.pn.pn, %142 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  call void @_ZNSt6vectorI6d2Vec2SaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  br label %144

144:                                              ; preds = %143, %56
  %.pn69.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn69.pn.pn.pn, %143 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn69.pn.pn.pn.pn

145:                                              ; preds = %._crit_edge, %29, %3
  %.1 = phi i1 [ false, %3 ], [ false, %29 ], [ true, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  ret i1 %.1
}

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

declare <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN9d2ContactC2Ev(ptr noundef nonnull align 8 dereferenceable(44)) unnamed_addr #4 align 2

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

declare <2 x float> @_ZNK6d2Vec2mlEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) local_unnamed_addr #3

declare <2 x float> @_ZNK6d2Vec2plERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI9d2ContactSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(44)) local_unnamed_addr #5 align 2

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

declare noundef float @_ZNK14d2PolygonShape17FindMinSeparationEPKS_RiR6d2Vec2(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

declare <2 x float> @_ZNK14d2PolygonShape6EdgeAtEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #3

declare noundef i32 @_ZNK14d2PolygonShape16FindIncidentEdgeERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaI6d2Vec2EC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI6d2Vec2SaIS0_EEC2ESt16initializer_listIS0_ERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI6d2Vec2SaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

declare noundef i32 @_ZNK14d2PolygonShape17ClipSegmentToLineERKSt6vectorI6d2Vec2SaIS1_EERS3_RKS1_S8_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI6d2Vec2SaIS0_EEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIP6d2Vec2St6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

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

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

declare noundef nonnull align 4 dereferenceable(8) ptr @_ZN6d2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorI6d2Vec2ED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 2

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

!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 16}
!6 = !{!"_ZTS14d2PolygonShape", !7, i64 0, !8, i64 8, !8, i64 12, !11, i64 16, !12, i64 24, !12, i64 32}
!7 = !{!"_ZTS7d2Shape"}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!6, !12, i64 32}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !12, i64 0}
!17 = !{!"_ZTS9d2Contact", !12, i64 0, !12, i64 8, !18, i64 16, !18, i64 24, !18, i64 32, !8, i64 40}
!18 = !{!"_ZTS6d2Vec2", !8, i64 0, !8, i64 4}
!19 = !{!17, !12, i64 8}


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