; LLVM IR from Simple-XX/SimplePhysicsEngine :: test/system_test/demo_old/RigidBodySimulation (cpair)

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

%"class.std::shared_ptr.8" = type { %"class.std::__shared_ptr.9" }
%"class.std::__shared_ptr.9" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.clib::vec2" = type { double, double }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = type { %"struct.std::_Vector_base<clib::ccontact, std::allocator<clib::ccontact>>::_Vector_impl" }
%"struct.std::_Vector_base<clib::ccontact, std::allocator<clib::ccontact>>::_Vector_impl" = type { %"struct.std::_Vector_base<clib::ccontact, std::allocator<clib::ccontact>>::_Vector_impl_data" }
%"struct.std::_Vector_base<clib::ccontact, std::allocator<clib::ccontact>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"struct.clib::ccontact" = type { %"struct.clib::vec2", %"struct.clib::vec2", %"struct.clib::vec2", %"struct.std::array", %"struct.std::array.0", double, double, double, double, double, double }
%"struct.std::array" = type { [2 x i8] }
%"struct.std::array.0" = type { [2 x i64] }
%"class.std::allocator.4" = type { i8 }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [119 x i8], align 1
@__PRETTY_FUNCTION__._ZN4clib5cpair10is_collideERSt10shared_ptrINS_12polygon_bodyEES4_Rj = external hidden unnamed_addr constant [96 x i8], align 1

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

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

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

declare { double, double } @_ZNK4clib5cbody14local_to_worldERKNS_4vec2E(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(16)) #2

declare { double, double } @_ZNK4clib12polygon_bodyixEm(ptr noundef nonnull align 8 dereferenceable(192), i64 noundef) #2

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

declare i32 @__gxx_personality_v0(...)

declare { double, double } @_ZNK4clib4vec26normalEv(ptr noundef nonnull align 8 dereferenceable(16)) #2

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

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

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

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

declare noundef double @_ZN4clib3dotERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2

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

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

declare { double, double } @_ZN4clibmiERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4clib5cpair11add_contactERKNS_8ccontactE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(120)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4clib5cpair10is_collideERSt10shared_ptrINS_12polygon_bodyEES4_Rj(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.8") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #3 align 2 personality ptr @__gxx_personality_v0 {
  %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 ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"struct.clib::vec2", align 8
  %19 = alloca %"struct.clib::vec2", align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca %"class.std::vector.2", align 8
  %23 = alloca %"class.std::initializer_list", align 8
  %24 = alloca [2 x %"struct.clib::ccontact"], align 8
  %25 = alloca %"class.std::allocator.4", align 1
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca %"class.std::vector.2", align 8
  %29 = alloca i64, align 8
  %30 = alloca %"struct.clib::vec2", align 8
  %31 = alloca %"struct.clib::vec2", align 8
  %32 = alloca %"struct.clib::vec2", align 8
  %33 = alloca %"struct.clib::vec2", align 8
  %34 = alloca i64, align 8
  %35 = alloca %"struct.clib::vec2", align 8
  %36 = alloca %"struct.clib::vec2", align 8
  %37 = alloca i1, align 1
  %38 = alloca %"class.std::shared_ptr", align 8
  %39 = alloca %"class.std::shared_ptr", align 8
  %40 = alloca %"class.std::vector.2", align 8
  %41 = alloca ptr, align 8
  %42 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %43 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %44 = alloca ptr, align 8
  %45 = alloca double, align 8
  %46 = alloca %"struct.clib::vec2", align 8
  %47 = alloca %"struct.clib::vec2", align 8
  %48 = alloca %"struct.clib::vec2", align 8
  %49 = alloca %"struct.clib::vec2", align 8
  %50 = alloca %"struct.clib::vec2", align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, 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
  store ptr %51, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %52, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %53) #8
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %55) #8
  %57 = call noundef double @_ZNK4clib12polygon_body19min_separating_axisERmRKS0_(ptr noundef nonnull align 8 dereferenceable(192) %54, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(192) %56)
  store double %57, ptr %13, align 8, !tbaa !9
  %58 = fcmp oge double %57, 0.000000e+00
  br i1 %58, label %59, label %94

59:                                               ; preds = %4
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %60) #8
  %62 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %61)
  %63 = zext i16 %62 to i32
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %64) #8
  %66 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %65)
  %67 = zext i16 %66 to i32
  %68 = icmp slt i32 %63, %67
  br i1 %68, label %69, label %80

69:                                               ; preds = %59
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %70) #8
  %72 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %71)
  %73 = zext i16 %72 to i32
  %74 = shl i32 %73, 16
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %75) #8
  %77 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %76)
  %78 = zext i16 %77 to i32
  %79 = or i32 %74, %78
  br label %91

80:                                               ; preds = %59
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %81) #8
  %83 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %82)
  %84 = zext i16 %83 to i32
  %85 = shl i32 %84, 16
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %86) #8
  %88 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %87)
  %89 = zext i16 %88 to i32
  %90 = or i32 %85, %89
  br label %91

91:                                               ; preds = %80, %69
  %92 = phi i32 [ %79, %69 ], [ %90, %80 ]
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %92, ptr %93, align 4, !tbaa !11
  call void @_ZNSt10shared_ptrIN4clib5cpairEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #8
  store i32 1, ptr %15, align 4
  br label %475

94:                                               ; preds = %4
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %95) #8
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %97) #8
  %99 = call noundef double @_ZNK4clib12polygon_body19min_separating_axisERmRKS0_(ptr noundef nonnull align 8 dereferenceable(192) %96, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(192) %98)
  store double %99, ptr %14, align 8, !tbaa !9
  %100 = fcmp oge double %99, 0.000000e+00
  br i1 %100, label %101, label %136

101:                                              ; preds = %94
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %102) #8
  %104 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %103)
  %105 = zext i16 %104 to i32
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %106) #8
  %108 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %107)
  %109 = zext i16 %108 to i32
  %110 = icmp slt i32 %105, %109
  br i1 %110, label %111, label %122

111:                                              ; preds = %101
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %112) #8
  %114 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %113)
  %115 = zext i16 %114 to i32
  %116 = shl i32 %115, 16
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %117) #8
  %119 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %118)
  %120 = zext i16 %119 to i32
  %121 = or i32 %116, %120
  br label %133

122:                                              ; preds = %101
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %123) #8
  %125 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %124)
  %126 = zext i16 %125 to i32
  %127 = shl i32 %126, 16
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %128) #8
  %130 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %129)
  %131 = zext i16 %130 to i32
  %132 = or i32 %127, %131
  br label %133

133:                                              ; preds = %122, %111
  %134 = phi i32 [ %121, %111 ], [ %132, %122 ]
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %134, ptr %135, align 4, !tbaa !11
  call void @_ZNSt10shared_ptrIN4clib5cpairEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #8
  store i32 1, ptr %15, align 4
  br label %475

136:                                              ; preds = %94
  %137 = load double, ptr %13, align 8, !tbaa !9
  %138 = load double, ptr %14, align 8, !tbaa !9
  %139 = fcmp olt double %137, %138
  br i1 %139, label %140, label %141

140:                                              ; preds = %136
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  call void @_ZSt4swapImENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  call void @_ZSt4swapIPSt10shared_ptrIN4clib12polygon_bodyEEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS8_ESt18is_move_assignableIS8_EEE5valueEvE4typeERS8_SH_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  br label %141

141:                                              ; preds = %140, %136
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %142) #8
  store ptr %143, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %144 = load ptr, ptr %10, align 8, !tbaa !5
  %145 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %144) #8
  store ptr %145, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #8
  %146 = load ptr, ptr %16, align 8, !tbaa !5
  %147 = load i64, ptr %11, align 8, !tbaa !13
  %148 = call { double, double } @_ZNK4clib12polygon_body4edgeEm(ptr noundef nonnull align 8 dereferenceable(192) %146, i64 noundef %147)
  %149 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %150 = extractvalue { double, double } %148, 0
  store double %150, ptr %149, align 8
  %151 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %152 = extractvalue { double, double } %148, 1
  store double %152, ptr %151, align 8
  %153 = call { double, double } @_ZNK4clib4vec26normalEv(ptr noundef nonnull align 8 dereferenceable(16) %19)
  %154 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %155 = extractvalue { double, double } %153, 0
  store double %155, ptr %154, align 8
  %156 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %157 = extractvalue { double, double } %153, 1
  store double %157, ptr %156, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %158 = load ptr, ptr %17, align 8, !tbaa !5
  %159 = call noundef i64 @_ZN4clibL13incident_edgeERKNS_4vec2ERKNS_12polygon_bodyE(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(192) %158)
  store i64 %159, ptr %20, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %160 = load i64, ptr %20, align 8, !tbaa !13
  %161 = add i64 %160, 1
  %162 = load ptr, ptr %17, align 8, !tbaa !5
  %163 = call noundef i64 @_ZNK4clib12polygon_body5countEv(ptr noundef nonnull align 8 dereferenceable(192) %162)
  %164 = urem i64 %161, %163
  store i64 %164, ptr %21, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 240, ptr %24) #8
  %165 = load ptr, ptr %17, align 8, !tbaa !5
  %166 = load i64, ptr %20, align 8, !tbaa !13
  call void @_ZN4clib8ccontactC1ERKNS_12polygon_bodyEm(ptr noundef nonnull align 8 dereferenceable(120) %24, ptr noundef nonnull align 8 dereferenceable(192) %165, i64 noundef %166)
  %167 = getelementptr inbounds %"struct.clib::ccontact", ptr %24, i64 1
  %168 = load ptr, ptr %17, align 8, !tbaa !5
  %169 = load i64, ptr %21, align 8, !tbaa !13
  call void @_ZN4clib8ccontactC1ERKNS_12polygon_bodyEm(ptr noundef nonnull align 8 dereferenceable(120) %167, ptr noundef nonnull align 8 dereferenceable(192) %168, i64 noundef %169)
  %170 = getelementptr inbounds %"class.std::initializer_list", ptr %23, i32 0, i32 0
  store ptr %24, ptr %170, align 8, !tbaa !15
  %171 = getelementptr inbounds %"class.std::initializer_list", ptr %23, i32 0, i32 1
  store i64 2, ptr %171, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #8
  call void @_ZNSaIN4clib8ccontactEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #8
  %172 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 0
  %173 = load ptr, ptr %172, align 8
  %174 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 1
  %175 = load i64, ptr %174, align 8
  invoke void @_ZNSt6vectorIN4clib8ccontactESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr %173, i64 %175, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %176 unwind label %185

176:                                              ; preds = %141
  call void @_ZNSt15__new_allocatorIN4clib8ccontactEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 240, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #8
  invoke void @_ZNSt6vectorIN4clib8ccontactESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %177 unwind label %189

177:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  store i64 0, ptr %29, align 8, !tbaa !13
  br label %178

178:                                              ; preds = %302, %177
  %179 = load i64, ptr %29, align 8, !tbaa !13
  %180 = load ptr, ptr %16, align 8, !tbaa !5
  %181 = invoke noundef i64 @_ZNK4clib12polygon_body5countEv(ptr noundef nonnull align 8 dereferenceable(192) %180)
          to label %182 unwind label %193

182:                                              ; preds = %178
  %183 = icmp ult i64 %179, %181
  br i1 %183, label %197, label %184

184:                                              ; preds = %182
  store i32 2, ptr %15, align 4
  br label %307

185:                                              ; preds = %141
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %26, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %27, align 4
  call void @_ZNSt15__new_allocatorIN4clib8ccontactEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 240, ptr %24) #8
  br label %474

189:                                              ; preds = %176
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %26, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %27, align 4
  br label %473

193:                                              ; preds = %178
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %26, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %27, align 4
  br label %309

197:                                              ; preds = %182
  %198 = load i64, ptr %29, align 8, !tbaa !13
  %199 = load i64, ptr %11, align 8, !tbaa !13
  %200 = icmp eq i64 %198, %199
  br i1 %200, label %201, label %202

201:                                              ; preds = %197
  br label %302

202:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #8
  %203 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #8
  %204 = load ptr, ptr %16, align 8, !tbaa !5
  %205 = load i64, ptr %29, align 8, !tbaa !13
  %206 = invoke { double, double } @_ZNK4clib12polygon_bodyixEm(ptr noundef nonnull align 8 dereferenceable(192) %204, i64 noundef %205)
          to label %207 unwind label %278

207:                                              ; preds = %202
  %208 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %209 = extractvalue { double, double } %206, 0
  store double %209, ptr %208, align 8
  %210 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %211 = extractvalue { double, double } %206, 1
  store double %211, ptr %210, align 8
  %212 = invoke { double, double } @_ZNK4clib5cbody14local_to_worldERKNS_4vec2E(ptr noundef nonnull align 8 dereferenceable(168) %203, ptr noundef nonnull align 8 dereferenceable(16) %31)
          to label %213 unwind label %278

213:                                              ; preds = %207
  %214 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %215 = extractvalue { double, double } %212, 0
  store double %215, ptr %214, align 8
  %216 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %217 = extractvalue { double, double } %212, 1
  store double %217, ptr %216, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #8
  %218 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #8
  %219 = load ptr, ptr %16, align 8, !tbaa !5
  %220 = load i64, ptr %29, align 8, !tbaa !13
  %221 = add i64 %220, 1
  %222 = load ptr, ptr %16, align 8, !tbaa !5
  %223 = invoke noundef i64 @_ZNK4clib12polygon_body5countEv(ptr noundef nonnull align 8 dereferenceable(192) %222)
          to label %224 unwind label %282

224:                                              ; preds = %213
  %225 = urem i64 %221, %223
  %226 = invoke { double, double } @_ZNK4clib12polygon_bodyixEm(ptr noundef nonnull align 8 dereferenceable(192) %219, i64 noundef %225)
          to label %227 unwind label %282

227:                                              ; preds = %224
  %228 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %229 = extractvalue { double, double } %226, 0
  store double %229, ptr %228, align 8
  %230 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %231 = extractvalue { double, double } %226, 1
  store double %231, ptr %230, align 8
  %232 = invoke { double, double } @_ZNK4clib5cbody14local_to_worldERKNS_4vec2E(ptr noundef nonnull align 8 dereferenceable(168) %218, ptr noundef nonnull align 8 dereferenceable(16) %33)
          to label %233 unwind label %282

233:                                              ; preds = %227
  %234 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %235 = extractvalue { double, double } %232, 0
  store double %235, ptr %234, align 8
  %236 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %237 = extractvalue { double, double } %232, 1
  store double %237, ptr %236, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %238 = load i64, ptr %29, align 8, !tbaa !13
  %239 = invoke noundef i64 @_ZN4clibL4clipERSt6vectorINS_8ccontactESaIS1_EERKS3_mRKNS_4vec2ES9_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %238, ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(16) %32)
          to label %240 unwind label %286

240:                                              ; preds = %233
  store i64 %239, ptr %34, align 8, !tbaa !13
  %241 = load i64, ptr %34, align 8, !tbaa !13
  %242 = icmp ult i64 %241, 2
  br i1 %242, label %243, label %290

243:                                              ; preds = %240
  %244 = load ptr, ptr %16, align 8, !tbaa !5
  %245 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %244)
          to label %246 unwind label %286

246:                                              ; preds = %243
  %247 = zext i16 %245 to i32
  %248 = load ptr, ptr %17, align 8, !tbaa !5
  %249 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %248)
          to label %250 unwind label %286

250:                                              ; preds = %246
  %251 = zext i16 %249 to i32
  %252 = icmp slt i32 %247, %251
  br i1 %252, label %253, label %264

253:                                              ; preds = %250
  %254 = load ptr, ptr %16, align 8, !tbaa !5
  %255 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %254)
          to label %256 unwind label %286

256:                                              ; preds = %253
  %257 = zext i16 %255 to i32
  %258 = shl i32 %257, 16
  %259 = load ptr, ptr %17, align 8, !tbaa !5
  %260 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %259)
          to label %261 unwind label %286

261:                                              ; preds = %256
  %262 = zext i16 %260 to i32
  %263 = or i32 %258, %262
  br label %275

264:                                              ; preds = %250
  %265 = load ptr, ptr %17, align 8, !tbaa !5
  %266 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %265)
          to label %267 unwind label %286

267:                                              ; preds = %264
  %268 = zext i16 %266 to i32
  %269 = shl i32 %268, 16
  %270 = load ptr, ptr %16, align 8, !tbaa !5
  %271 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %270)
          to label %272 unwind label %286

272:                                              ; preds = %267
  %273 = zext i16 %271 to i32
  %274 = or i32 %269, %273
  br label %275

275:                                              ; preds = %272, %261
  %276 = phi i32 [ %263, %261 ], [ %274, %272 ]
  %277 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %276, ptr %277, align 4, !tbaa !11
  call void @_ZNSt10shared_ptrIN4clib5cpairEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #8
  store i32 1, ptr %15, align 4
  br label %299

278:                                              ; preds = %207, %202
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %26, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #8
  br label %306

282:                                              ; preds = %227, %224, %213
  %283 = landingpad { ptr, i32 }
          cleanup
  %284 = extractvalue { ptr, i32 } %283, 0
  store ptr %284, ptr %26, align 8
  %285 = extractvalue { ptr, i32 } %283, 1
  store i32 %285, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #8
  br label %305

286:                                              ; preds = %296, %267, %264, %256, %253, %246, %243, %233
  %287 = landingpad { ptr, i32 }
          cleanup
  %288 = extractvalue { ptr, i32 } %287, 0
  store ptr %288, ptr %26, align 8
  %289 = extractvalue { ptr, i32 } %287, 1
  store i32 %289, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  br label %305

290:                                              ; preds = %240
  %291 = load i64, ptr %34, align 8, !tbaa !13
  %292 = icmp eq i64 %291, 2
  br i1 %292, label %293, label %294

293:                                              ; preds = %290
  br label %296

294:                                              ; preds = %290
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 219, ptr noundef @__PRETTY_FUNCTION__._ZN4clib5cpair10is_collideERSt10shared_ptrINS_12polygon_bodyEES4_Rj) #9
  unreachable

295:                                              ; No predecessors!
  br label %296

296:                                              ; preds = %295, %293
  %297 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN4clib8ccontactESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %28)
          to label %298 unwind label %286

298:                                              ; preds = %296
  store i32 0, ptr %15, align 4
  br label %299

299:                                              ; preds = %298, %275
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  %300 = load i32, ptr %15, align 4
  switch i32 %300, label %307 [
    i32 0, label %301
  ]

301:                                              ; preds = %299
  br label %302

302:                                              ; preds = %301, %201
  %303 = load i64, ptr %29, align 8, !tbaa !13
  %304 = add i64 %303, 1
  store i64 %304, ptr %29, align 8, !tbaa !13
  br label %178, !llvm.loop !18

305:                                              ; preds = %286, %282
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #8
  br label %306

306:                                              ; preds = %305, %278
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  br label %309

307:                                              ; preds = %299, %184
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  %308 = load i32, ptr %15, align 4
  switch i32 %308, label %471 [
    i32 2, label %310
  ]

309:                                              ; preds = %306, %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %472

310:                                              ; preds = %307
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #8
  %311 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #8
  %312 = load ptr, ptr %16, align 8, !tbaa !5
  %313 = load i64, ptr %11, align 8, !tbaa !13
  %314 = invoke { double, double } @_ZNK4clib12polygon_bodyixEm(ptr noundef nonnull align 8 dereferenceable(192) %312, i64 noundef %313)
          to label %315 unwind label %338

315:                                              ; preds = %310
  %316 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 0
  %317 = extractvalue { double, double } %314, 0
  store double %317, ptr %316, align 8
  %318 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 1
  %319 = extractvalue { double, double } %314, 1
  store double %319, ptr %318, align 8
  %320 = invoke { double, double } @_ZNK4clib5cbody14local_to_worldERKNS_4vec2E(ptr noundef nonnull align 8 dereferenceable(168) %311, ptr noundef nonnull align 8 dereferenceable(16) %36)
          to label %321 unwind label %338

321:                                              ; preds = %315
  %322 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %323 = extractvalue { double, double } %320, 0
  store double %323, ptr %322, align 8
  %324 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %325 = extractvalue { double, double } %320, 1
  store double %325, ptr %324, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  store i1 false, ptr %37, align 1
  %326 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNSt10shared_ptrIN4clib5cbodyEEC2INS0_12polygon_bodyEvEERKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 8 dereferenceable(16) %326) #8
  %327 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZNSt10shared_ptrIN4clib5cbodyEEC2INS0_12polygon_bodyEvEERKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(16) %327) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %40) #8
  call void @llvm.memset.p0.i64(ptr align 8 %40, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIN4clib8ccontactESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %40) #8
  invoke void @_ZN4clib8cfactory12make_arbiterESt10shared_ptrINS_5cbodyEES3_RKNS_4vec2ERKSt6vectorINS_8ccontactESaIS8_EE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.8") align 8 %0, ptr noundef %38, ptr noundef %39, ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(24) %40)
          to label %328 unwind label %342

328:                                              ; preds = %321
  call void @_ZNSt6vectorIN4clib8ccontactESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %40) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %40) #8
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %39) #8
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %38) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #8
  store ptr %28, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #8
  %329 = load ptr, ptr %41, align 8, !tbaa !5
  %330 = call ptr @_ZNSt6vectorIN4clib8ccontactESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %329) #8
  %331 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %42, i32 0, i32 0
  store ptr %330, ptr %331, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  %332 = load ptr, ptr %41, align 8, !tbaa !5
  %333 = call ptr @_ZNSt6vectorIN4clib8ccontactESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %332) #8
  %334 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %43, i32 0, i32 0
  store ptr %333, ptr %334, align 8
  br label %335

335:                                              ; preds = %424, %328
  %336 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(8) %43) #8
  br i1 %336, label %346, label %337

337:                                              ; preds = %335
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  br label %427

338:                                              ; preds = %315, %310
  %339 = landingpad { ptr, i32 }
          cleanup
  %340 = extractvalue { ptr, i32 } %339, 0
  store ptr %340, ptr %26, align 8
  %341 = extractvalue { ptr, i32 } %339, 1
  store i32 %341, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  br label %470

342:                                              ; preds = %321
  %343 = landingpad { ptr, i32 }
          cleanup
  %344 = extractvalue { ptr, i32 } %343, 0
  store ptr %344, ptr %26, align 8
  %345 = extractvalue { ptr, i32 } %343, 1
  store i32 %345, ptr %27, align 4
  call void @_ZNSt6vectorIN4clib8ccontactESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %40) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %40) #8
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %39) #8
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %38) #8
  br label %470

346:                                              ; preds = %335
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  %347 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #8
  store ptr %347, ptr %44, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %46) #8
  %348 = load ptr, ptr %44, align 8, !tbaa !5
  %349 = getelementptr inbounds %"struct.clib::ccontact", ptr %348, i32 0, i32 0
  %350 = invoke { double, double } @_ZN4clibmiERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %349, ptr noundef nonnull align 8 dereferenceable(16) %35)
          to label %351 unwind label %407

351:                                              ; preds = %346
  %352 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %353 = extractvalue { double, double } %350, 0
  store double %353, ptr %352, align 8
  %354 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %355 = extractvalue { double, double } %350, 1
  store double %355, ptr %354, align 8
  %356 = invoke noundef double @_ZN4clib3dotERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %357 unwind label %407

357:                                              ; preds = %351
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #8
  store double %356, ptr %45, align 8, !tbaa !9
  %358 = load double, ptr %45, align 8, !tbaa !9
  %359 = fcmp ole double %358, 0.000000e+00
  br i1 %359, label %360, label %423

360:                                              ; preds = %357
  %361 = load double, ptr %45, align 8, !tbaa !9
  %362 = load ptr, ptr %44, align 8, !tbaa !5
  %363 = getelementptr inbounds %"struct.clib::ccontact", ptr %362, i32 0, i32 5
  store double %361, ptr %363, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 16, ptr %47) #8
  %364 = load ptr, ptr %44, align 8, !tbaa !5
  %365 = getelementptr inbounds %"struct.clib::ccontact", ptr %364, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 16, ptr %48) #8
  %366 = load ptr, ptr %16, align 8, !tbaa !5
  %367 = load ptr, ptr %16, align 8, !tbaa !5
  %368 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4clib5cbody12get_centroidEv(ptr noundef nonnull align 8 dereferenceable(168) %367)
          to label %369 unwind label %411

369:                                              ; preds = %360
  %370 = invoke { double, double } @_ZNK4clib5cbody14local_to_worldERKNS_4vec2E(ptr noundef nonnull align 8 dereferenceable(168) %366, ptr noundef nonnull align 8 dereferenceable(16) %368)
          to label %371 unwind label %411

371:                                              ; preds = %369
  %372 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 0
  %373 = extractvalue { double, double } %370, 0
  store double %373, ptr %372, align 8
  %374 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 1
  %375 = extractvalue { double, double } %370, 1
  store double %375, ptr %374, align 8
  %376 = invoke { double, double } @_ZN4clibmiERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %365, ptr noundef nonnull align 8 dereferenceable(16) %48)
          to label %377 unwind label %411

377:                                              ; preds = %371
  %378 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %379 = extractvalue { double, double } %376, 0
  store double %379, ptr %378, align 8
  %380 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %381 = extractvalue { double, double } %376, 1
  store double %381, ptr %380, align 8
  %382 = load ptr, ptr %44, align 8, !tbaa !5
  %383 = getelementptr inbounds %"struct.clib::ccontact", ptr %382, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %383, ptr align 8 %47, i64 16, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %47) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %49) #8
  %384 = load ptr, ptr %44, align 8, !tbaa !5
  %385 = getelementptr inbounds %"struct.clib::ccontact", ptr %384, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 16, ptr %50) #8
  %386 = load ptr, ptr %17, align 8, !tbaa !5
  %387 = load ptr, ptr %17, align 8, !tbaa !5
  %388 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4clib5cbody12get_centroidEv(ptr noundef nonnull align 8 dereferenceable(168) %387)
          to label %389 unwind label %415

389:                                              ; preds = %377
  %390 = invoke { double, double } @_ZNK4clib5cbody14local_to_worldERKNS_4vec2E(ptr noundef nonnull align 8 dereferenceable(168) %386, ptr noundef nonnull align 8 dereferenceable(16) %388)
          to label %391 unwind label %415

391:                                              ; preds = %389
  %392 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 0
  %393 = extractvalue { double, double } %390, 0
  store double %393, ptr %392, align 8
  %394 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 1
  %395 = extractvalue { double, double } %390, 1
  store double %395, ptr %394, align 8
  %396 = invoke { double, double } @_ZN4clibmiERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %385, ptr noundef nonnull align 8 dereferenceable(16) %50)
          to label %397 unwind label %415

397:                                              ; preds = %391
  %398 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 0
  %399 = extractvalue { double, double } %396, 0
  store double %399, ptr %398, align 8
  %400 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 1
  %401 = extractvalue { double, double } %396, 1
  store double %401, ptr %400, align 8
  %402 = load ptr, ptr %44, align 8, !tbaa !5
  %403 = getelementptr inbounds %"struct.clib::ccontact", ptr %402, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %403, ptr align 8 %49, i64 16, i1 false), !tbaa.struct !25
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #8
  %404 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cpairELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #8
  %405 = load ptr, ptr %44, align 8, !tbaa !5
  invoke void @_ZN4clib5cpair11add_contactERKNS_8ccontactE(ptr noundef nonnull align 8 dereferenceable(72) %404, ptr noundef nonnull align 8 dereferenceable(120) %405)
          to label %406 unwind label %419

406:                                              ; preds = %397
  br label %423

407:                                              ; preds = %351, %346
  %408 = landingpad { ptr, i32 }
          cleanup
  %409 = extractvalue { ptr, i32 } %408, 0
  store ptr %409, ptr %26, align 8
  %410 = extractvalue { ptr, i32 } %408, 1
  store i32 %410, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #8
  br label %426

411:                                              ; preds = %371, %369, %360
  %412 = landingpad { ptr, i32 }
          cleanup
  %413 = extractvalue { ptr, i32 } %412, 0
  store ptr %413, ptr %26, align 8
  %414 = extractvalue { ptr, i32 } %412, 1
  store i32 %414, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %47) #8
  br label %426

415:                                              ; preds = %391, %389, %377
  %416 = landingpad { ptr, i32 }
          cleanup
  %417 = extractvalue { ptr, i32 } %416, 0
  store ptr %417, ptr %26, align 8
  %418 = extractvalue { ptr, i32 } %416, 1
  store i32 %418, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #8
  br label %426

419:                                              ; preds = %397
  %420 = landingpad { ptr, i32 }
          cleanup
  %421 = extractvalue { ptr, i32 } %420, 0
  store ptr %421, ptr %26, align 8
  %422 = extractvalue { ptr, i32 } %420, 1
  store i32 %422, ptr %27, align 4
  br label %426

423:                                              ; preds = %406, %357
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  br label %424

424:                                              ; preds = %423
  %425 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #8
  br label %335

426:                                              ; preds = %419, %415, %411, %407
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  br label %469

427:                                              ; preds = %337
  %428 = load ptr, ptr %16, align 8, !tbaa !5
  %429 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %428)
          to label %430 unwind label %463

430:                                              ; preds = %427
  %431 = zext i16 %429 to i32
  %432 = load ptr, ptr %17, align 8, !tbaa !5
  %433 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %432)
          to label %434 unwind label %463

434:                                              ; preds = %430
  %435 = zext i16 %433 to i32
  %436 = icmp slt i32 %431, %435
  br i1 %436, label %437, label %448

437:                                              ; preds = %434
  %438 = load ptr, ptr %16, align 8, !tbaa !5
  %439 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %438)
          to label %440 unwind label %463

440:                                              ; preds = %437
  %441 = zext i16 %439 to i32
  %442 = shl i32 %441, 16
  %443 = load ptr, ptr %17, align 8, !tbaa !5
  %444 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %443)
          to label %445 unwind label %463

445:                                              ; preds = %440
  %446 = zext i16 %444 to i32
  %447 = or i32 %442, %446
  br label %459

448:                                              ; preds = %434
  %449 = load ptr, ptr %17, align 8, !tbaa !5
  %450 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %449)
          to label %451 unwind label %463

451:                                              ; preds = %448
  %452 = zext i16 %450 to i32
  %453 = shl i32 %452, 16
  %454 = load ptr, ptr %16, align 8, !tbaa !5
  %455 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %454)
          to label %456 unwind label %463

456:                                              ; preds = %451
  %457 = zext i16 %455 to i32
  %458 = or i32 %453, %457
  br label %459

459:                                              ; preds = %456, %445
  %460 = phi i32 [ %447, %445 ], [ %458, %456 ]
  %461 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %460, ptr %461, align 4, !tbaa !11
  store i1 true, ptr %37, align 1
  store i32 1, ptr %15, align 4
  %462 = load i1, ptr %37, align 1
  br i1 %462, label %468, label %467

463:                                              ; preds = %451, %448, %440, %437, %430, %427
  %464 = landingpad { ptr, i32 }
          cleanup
  %465 = extractvalue { ptr, i32 } %464, 0
  store ptr %465, ptr %26, align 8
  %466 = extractvalue { ptr, i32 } %464, 1
  store i32 %466, ptr %27, align 4
  br label %469

467:                                              ; preds = %459
  call void @_ZNSt12__shared_ptrIN4clib5cpairELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #8
  br label %468

468:                                              ; preds = %467, %459
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #8
  br label %471

469:                                              ; preds = %463, %426
  call void @_ZNSt12__shared_ptrIN4clib5cpairELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #8
  br label %470

470:                                              ; preds = %469, %342, %338
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #8
  br label %472

471:                                              ; preds = %468, %307
  call void @_ZNSt6vectorIN4clib8ccontactESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #8
  call void @_ZNSt6vectorIN4clib8ccontactESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %475

472:                                              ; preds = %470, %309
  call void @_ZNSt6vectorIN4clib8ccontactESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #8
  br label %473

473:                                              ; preds = %472, %189
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #8
  call void @_ZNSt6vectorIN4clib8ccontactESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  br label %474

474:                                              ; preds = %473, %185
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %476

475:                                              ; preds = %471, %133, %91
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  ret void

476:                                              ; preds = %474
  %477 = load ptr, ptr %26, align 8
  %478 = load i32, ptr %27, align 4
  %479 = insertvalue { ptr, i32 } poison, ptr %477, 0
  %480 = insertvalue { ptr, i32 } %479, i32 %478, 1
  resume { ptr, i32 } %480
}

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

declare noundef double @_ZNK4clib12polygon_body19min_separating_axisERmRKS0_(ptr noundef nonnull align 8 dereferenceable(192), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(192)) #2

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

declare noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168)) #2

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

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

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

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

declare { double, double } @_ZNK4clib12polygon_body4edgeEm(ptr noundef nonnull align 8 dereferenceable(192), i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN4clibL13incident_edgeERKNS_4vec2ERKNS_12polygon_bodyE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(192)) #3

declare noundef i64 @_ZNK4clib12polygon_body5countEv(ptr noundef nonnull align 8 dereferenceable(192)) #2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN4clibL4clipERSt6vectorINS_8ccontactESaIS1_EERKS3_mRKNS_4vec2ES9_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

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

declare void @_ZN4clib8cfactory12make_arbiterESt10shared_ptrINS_5cbodyEES3_RKNS_4vec2ERKSt6vectorINS_8ccontactESaIS8_EE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.8") align 8, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24)) #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4clib5cbody12get_centroidEv(ptr noundef nonnull align 8 dereferenceable(168)) #2

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

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

declare void @_ZN4clib8ccontactC1ERKNS_12polygon_bodyEm(ptr, ptr, i64)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }
attributes #9 = { noreturn 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTSSt16initializer_listIN4clib8ccontactEE", !6, i64 0, !14, i64 8}
!17 = !{!16, !14, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !10, i64 72}
!21 = !{!"_ZTSN4clib8ccontactE", !22, i64 0, !22, i64 16, !22, i64 32, !23, i64 48, !24, i64 56, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112}
!22 = !{!"_ZTSN4clib4vec2E", !10, i64 0, !10, i64 8}
!23 = !{!"_ZTSSt5arrayIbLm2EE", !7, i64 0}
!24 = !{!"_ZTSSt5arrayImLm2EE", !7, i64 0}
!25 = !{i64 0, i64 8, !9, i64 8, i64 8, !9}


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

%"class.std::shared_ptr.8" = type { %"class.std::__shared_ptr.9" }
%"class.std::__shared_ptr.9" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.clib::vec2" = type { double, double }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = type { %"struct.std::_Vector_base<clib::ccontact, std::allocator<clib::ccontact>>::_Vector_impl" }
%"struct.std::_Vector_base<clib::ccontact, std::allocator<clib::ccontact>>::_Vector_impl" = type { %"struct.std::_Vector_base<clib::ccontact, std::allocator<clib::ccontact>>::_Vector_impl_data" }
%"struct.std::_Vector_base<clib::ccontact, std::allocator<clib::ccontact>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.clib::ccontact" = type { %"struct.clib::vec2", %"struct.clib::vec2", %"struct.clib::vec2", %"struct.std::array", %"struct.std::array.0", double, double, double, double, double, double }
%"struct.std::array" = type { [2 x i8] }
%"struct.std::array.0" = type { [2 x i64] }
%"class.std::allocator.4" = type { i8 }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [119 x i8], align 1
@__PRETTY_FUNCTION__._ZN4clib5cpair10is_collideERSt10shared_ptrINS_12polygon_bodyEES4_Rj = external hidden unnamed_addr constant [96 x i8], align 1

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

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

declare { double, double } @_ZNK4clib5cbody14local_to_worldERKNS_4vec2E(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

declare { double, double } @_ZNK4clib12polygon_bodyixEm(ptr noundef nonnull align 8 dereferenceable(192), i64 noundef) local_unnamed_addr #1

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

declare i32 @__gxx_personality_v0(...)

declare { double, double } @_ZNK4clib4vec26normalEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

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

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

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

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

declare noundef double @_ZN4clib3dotERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

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

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

declare { double, double } @_ZN4clibmiERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4clib5cpair10is_collideERSt10shared_ptrINS_12polygon_bodyEES4_Rj(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.8") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca %"struct.clib::vec2", align 8
  %12 = alloca %"struct.clib::vec2", align 8
  %13 = alloca %"class.std::vector.2", align 8
  %14 = alloca [2 x %"struct.clib::ccontact"], align 8
  %15 = alloca %"class.std::allocator.4", align 1
  %16 = alloca %"class.std::vector.2", align 8
  %17 = alloca %"struct.clib::vec2", align 8
  %18 = alloca %"struct.clib::vec2", align 8
  %19 = alloca %"struct.clib::vec2", align 8
  %20 = alloca %"struct.clib::vec2", align 8
  %21 = alloca %"struct.clib::vec2", align 8
  %22 = alloca %"struct.clib::vec2", align 8
  %23 = alloca %"class.std::shared_ptr", align 8
  %24 = alloca %"class.std::shared_ptr", align 8
  %25 = alloca %"class.std::vector.2", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"struct.clib::vec2", align 8
  %29 = alloca %"struct.clib::vec2", align 8
  %30 = alloca %"struct.clib::vec2", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %31 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %32 = tail call noundef nonnull align 8 dereferenceable(192) ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  %33 = call noundef double @_ZNK4clib12polygon_body19min_separating_axisERmRKS0_(ptr noundef nonnull align 8 dereferenceable(192) %31, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(192) %32)
  store double %33, ptr %9, align 8, !tbaa !9
  %34 = fcmp ult double %33, 0.000000e+00
  br i1 %34, label %49, label %35

35:                                               ; preds = %4
  %36 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %37 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %36)
  %38 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  %39 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %38)
  %40 = icmp ult i16 %37, %39
  %. = select i1 %40, ptr %1, ptr %2
  %.132 = select i1 %40, ptr %2, ptr %1
  %41 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %.) #7
  %42 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %41)
  %43 = zext i16 %42 to i32
  %44 = shl nuw i32 %43, 16
  %45 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %.132) #7
  %46 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %45)
  %47 = zext i16 %46 to i32
  %48 = or disjoint i32 %44, %47
  store i32 %48, ptr %3, align 4, !tbaa !11
  call void @_ZNSt10shared_ptrIN4clib5cpairEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #7
  br label %258

49:                                               ; preds = %4
  %50 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  %51 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %52 = call noundef double @_ZNK4clib12polygon_body19min_separating_axisERmRKS0_(ptr noundef nonnull align 8 dereferenceable(192) %50, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(192) %51)
  store double %52, ptr %10, align 8, !tbaa !9
  %53 = fcmp ult double %52, 0.000000e+00
  br i1 %53, label %68, label %54

54:                                               ; preds = %49
  %55 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %56 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %55)
  %57 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  %58 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %57)
  %59 = icmp ult i16 %56, %58
  %.133 = select i1 %59, ptr %1, ptr %2
  %.134 = select i1 %59, ptr %2, ptr %1
  %60 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %.133) #7
  %61 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %60)
  %62 = zext i16 %61 to i32
  %63 = shl nuw i32 %62, 16
  %64 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %.134) #7
  %65 = call noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %64)
  %66 = zext i16 %65 to i32
  %67 = or disjoint i32 %63, %66
  store i32 %67, ptr %3, align 4, !tbaa !11
  call void @_ZNSt10shared_ptrIN4clib5cpairEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #7
  br label %258

68:                                               ; preds = %49
  %69 = load double, ptr %9, align 8, !tbaa !9
  %70 = fcmp olt double %69, %52
  br i1 %70, label %71, label %72

71:                                               ; preds = %68
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @_ZSt4swapImENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @_ZSt4swapIPSt10shared_ptrIN4clib12polygon_bodyEEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS8_ESt18is_move_assignableIS8_EEE5valueEvE4typeERS8_SH_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br label %72

72:                                               ; preds = %71, %68
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %73) #7
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %75) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  %77 = load i64, ptr %7, align 8, !tbaa !13
  %78 = call { double, double } @_ZNK4clib12polygon_body4edgeEm(ptr noundef nonnull align 8 dereferenceable(192) %74, i64 noundef %77)
  %79 = extractvalue { double, double } %78, 0
  store double %79, ptr %12, align 8
  %80 = getelementptr inbounds i8, ptr %12, i64 8
  %81 = extractvalue { double, double } %78, 1
  store double %81, ptr %80, align 8
  %82 = call { double, double } @_ZNK4clib4vec26normalEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
  %83 = extractvalue { double, double } %82, 0
  store double %83, ptr %11, align 8
  %84 = getelementptr inbounds i8, ptr %11, i64 8
  %85 = extractvalue { double, double } %82, 1
  store double %85, ptr %84, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  %86 = call noundef i64 @_ZN4clibL13incident_edgeERKNS_4vec2ERKNS_12polygon_bodyE(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(192) %76)
  %87 = add i64 %86, 1
  %88 = call noundef i64 @_ZNK4clib12polygon_body5countEv(ptr noundef nonnull align 8 dereferenceable(192) %76)
  %89 = urem i64 %87, %88
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 240, ptr nonnull %14) #7
  call void @_ZN4clib8ccontactC1ERKNS_12polygon_bodyEm(ptr noundef nonnull align 8 dereferenceable(120) %14, ptr noundef nonnull align 8 dereferenceable(192) %76, i64 noundef %86)
  %90 = getelementptr inbounds i8, ptr %14, i64 120
  call void @_ZN4clib8ccontactC1ERKNS_12polygon_bodyEm(ptr noundef nonnull align 8 dereferenceable(120) %90, ptr noundef nonnull align 8 dereferenceable(192) %76, i64 noundef %89)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #7
  call void @_ZNSaIN4clib8ccontactEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  invoke void @_ZNSt6vectorIN4clib8ccontactESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr nonnull %14, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %91 unwind label %99

91:                                               ; preds = %72
  call void @_ZNSt15__new_allocatorIN4clib8ccontactEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #7
  invoke void @_ZNSt6vectorIN4clib8ccontactESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %.preheader unwind label %101

.preheader:                                       ; preds = %91
  %92 = getelementptr inbounds i8, ptr %18, i64 8
  %93 = getelementptr inbounds i8, ptr %17, i64 8
  %94 = getelementptr inbounds i8, ptr %20, i64 8
  %95 = getelementptr inbounds i8, ptr %19, i64 8
  br label %96

96:                                               ; preds = %.backedge, %.preheader
  %.092 = phi i64 [ 0, %.preheader ], [ %.092.be, %.backedge ]
  %97 = invoke noundef i64 @_ZNK4clib12polygon_body5countEv(ptr noundef nonnull align 8 dereferenceable(192) %74)
          to label %98 unwind label %103

98:                                               ; preds = %96
  %.not = icmp ult i64 %.092, %97
  br i1 %.not, label %105, label %.critedge

99:                                               ; preds = %72
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN4clib8ccontactEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %14) #7
  br label %257

101:                                              ; preds = %91
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %256

103:                                              ; preds = %96
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %255

105:                                              ; preds = %98
  %106 = load i64, ptr %7, align 8, !tbaa !13
  %107 = icmp eq i64 %.092, %106
  br i1 %107, label %._crit_edge106, label %108

._crit_edge106:                                   ; preds = %105
  %.pre = add nuw i64 %.092, 1
  br label %.backedge

.backedge:                                        ; preds = %._crit_edge106, %.thread
  %.092.be = phi i64 [ %.pre, %._crit_edge106 ], [ %119, %.thread ]
  br label %96, !llvm.loop !15

108:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #7
  %109 = invoke { double, double } @_ZNK4clib12polygon_bodyixEm(ptr noundef nonnull align 8 dereferenceable(192) %74, i64 noundef %.092)
          to label %110 unwind label %146

110:                                              ; preds = %108
  %111 = extractvalue { double, double } %109, 0
  store double %111, ptr %18, align 8
  %112 = extractvalue { double, double } %109, 1
  store double %112, ptr %92, align 8
  %113 = invoke { double, double } @_ZNK4clib5cbody14local_to_worldERKNS_4vec2E(ptr noundef nonnull align 8 dereferenceable(168) %74, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %114 unwind label %146

114:                                              ; preds = %110
  %115 = extractvalue { double, double } %113, 0
  store double %115, ptr %17, align 8
  %116 = extractvalue { double, double } %113, 1
  store double %116, ptr %93, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #7
  %117 = invoke noundef i64 @_ZNK4clib12polygon_body5countEv(ptr noundef nonnull align 8 dereferenceable(192) %74)
          to label %118 unwind label %148

118:                                              ; preds = %114
  %119 = add nuw i64 %.092, 1
  %120 = urem i64 %119, %117
  %121 = invoke { double, double } @_ZNK4clib12polygon_bodyixEm(ptr noundef nonnull align 8 dereferenceable(192) %74, i64 noundef %120)
          to label %122 unwind label %148

122:                                              ; preds = %118
  %123 = extractvalue { double, double } %121, 0
  store double %123, ptr %20, align 8
  %124 = extractvalue { double, double } %121, 1
  store double %124, ptr %94, align 8
  %125 = invoke { double, double } @_ZNK4clib5cbody14local_to_worldERKNS_4vec2E(ptr noundef nonnull align 8 dereferenceable(168) %74, ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %126 unwind label %148

126:                                              ; preds = %122
  %127 = extractvalue { double, double } %125, 0
  store double %127, ptr %19, align 8
  %128 = extractvalue { double, double } %125, 1
  store double %128, ptr %95, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #7
  %129 = invoke noundef i64 @_ZN4clibL4clipERSt6vectorINS_8ccontactESaIS1_EERKS3_mRKNS_4vec2ES9_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %.092, ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %130 unwind label %.loopexit

130:                                              ; preds = %126
  %131 = icmp ugt i64 %129, 1
  br i1 %131, label %150, label %132

132:                                              ; preds = %130
  %133 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %74)
          to label %134 unwind label %.loopexit.split-lp

134:                                              ; preds = %132
  %135 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %76)
          to label %136 unwind label %.loopexit.split-lp

136:                                              ; preds = %134
  %137 = icmp ult i16 %133, %135
  br i1 %137, label %138, label %142

138:                                              ; preds = %136
  %139 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %74)
          to label %140 unwind label %.loopexit.split-lp

140:                                              ; preds = %138
  %141 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %76)
          to label %157 unwind label %.loopexit.split-lp

142:                                              ; preds = %136
  %143 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %76)
          to label %144 unwind label %.loopexit.split-lp

144:                                              ; preds = %142
  %145 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %74)
          to label %157 unwind label %.loopexit.split-lp

146:                                              ; preds = %110, %108
  %147 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #7
  br label %156

148:                                              ; preds = %122, %118, %114
  %149 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #7
  br label %155

.loopexit:                                        ; preds = %126, %153
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %155

.loopexit.split-lp:                               ; preds = %132, %134, %138, %140, %142, %144
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %155

150:                                              ; preds = %130
  %151 = icmp eq i64 %129, 2
  br i1 %151, label %153, label %152

152:                                              ; preds = %150
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 219, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4clib5cpair10is_collideERSt10shared_ptrINS_12polygon_bodyEES4_Rj) #8
  unreachable

153:                                              ; preds = %150
  %154 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN4clib8ccontactESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %.thread unwind label %.loopexit

.thread:                                          ; preds = %153
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  br label %.backedge

155:                                              ; preds = %.loopexit, %.loopexit.split-lp, %148
  %.pn = phi { ptr, i32 } [ %149, %148 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #7
  br label %156

156:                                              ; preds = %155, %146
  %.pn.pn = phi { ptr, i32 } [ %.pn, %155 ], [ %147, %146 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  br label %255

157:                                              ; preds = %144, %140
  %.sink126 = phi i16 [ %139, %140 ], [ %143, %144 ]
  %.sink124 = phi i16 [ %141, %140 ], [ %145, %144 ]
  %158 = zext i16 %.sink126 to i32
  %159 = shl nuw i32 %158, 16
  %160 = zext i16 %.sink124 to i32
  %161 = or disjoint i32 %159, %160
  store i32 %161, ptr %3, align 4, !tbaa !11
  call void @_ZNSt10shared_ptrIN4clib5cpairEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  br label %254

.critedge:                                        ; preds = %98
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #7
  %162 = load i64, ptr %7, align 8, !tbaa !13
  %163 = invoke { double, double } @_ZNK4clib12polygon_bodyixEm(ptr noundef nonnull align 8 dereferenceable(192) %74, i64 noundef %162)
          to label %164 unwind label %183

164:                                              ; preds = %.critedge
  %165 = extractvalue { double, double } %163, 0
  store double %165, ptr %22, align 8
  %166 = getelementptr inbounds i8, ptr %22, i64 8
  %167 = extractvalue { double, double } %163, 1
  store double %167, ptr %166, align 8
  %168 = invoke { double, double } @_ZNK4clib5cbody14local_to_worldERKNS_4vec2E(ptr noundef nonnull align 8 dereferenceable(168) %74, ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %169 unwind label %183

169:                                              ; preds = %164
  %170 = extractvalue { double, double } %168, 0
  store double %170, ptr %21, align 8
  %171 = getelementptr inbounds i8, ptr %21, i64 8
  %172 = extractvalue { double, double } %168, 1
  store double %172, ptr %171, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #7
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNSt10shared_ptrIN4clib5cbodyEEC2INS0_12polygon_bodyEvEERKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %173) #7
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNSt10shared_ptrIN4clib5cbodyEEC2INS0_12polygon_bodyEvEERKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %174) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %25) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %25, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIN4clib8ccontactESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  invoke void @_ZN4clib8cfactory12make_arbiterESt10shared_ptrINS_5cbodyEES3_RKNS_4vec2ERKSt6vectorINS_8ccontactESaIS8_EE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.8") align 8 %0, ptr noundef nonnull %23, ptr noundef nonnull %24, ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %175 unwind label %185

175:                                              ; preds = %169
  call void @_ZNSt6vectorIN4clib8ccontactESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %25) #7
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #7
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #7
  %176 = call ptr @_ZNSt6vectorIN4clib8ccontactESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  store ptr %176, ptr %26, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #7
  %177 = call ptr @_ZNSt6vectorIN4clib8ccontactESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  store ptr %177, ptr %27, align 8
  %178 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  br i1 %178, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %175
  %179 = getelementptr inbounds i8, ptr %28, i64 8
  %180 = getelementptr inbounds i8, ptr %29, i64 8
  %181 = getelementptr inbounds i8, ptr %30, i64 8
  br label %187

._crit_edge:                                      ; preds = %229, %175
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #7
  %182 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %74)
          to label %233 unwind label %250

183:                                              ; preds = %164, %.critedge
  %184 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #7
  br label %253

185:                                              ; preds = %169
  %186 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIN4clib8ccontactESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %25) #7
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #7
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  br label %253

187:                                              ; preds = %.lr.ph, %229
  %188 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %28) #7
  %189 = invoke { double, double } @_ZN4clibmiERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %188, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %190 unwind label %221

190:                                              ; preds = %187
  %191 = extractvalue { double, double } %189, 0
  store double %191, ptr %28, align 8
  %192 = extractvalue { double, double } %189, 1
  store double %192, ptr %179, align 8
  %193 = invoke noundef double @_ZN4clib3dotERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %194 unwind label %221

194:                                              ; preds = %190
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %28) #7
  %195 = fcmp ugt double %193, 0.000000e+00
  br i1 %195, label %229, label %196

196:                                              ; preds = %194
  %197 = getelementptr inbounds i8, ptr %188, i64 72
  store double %193, ptr %197, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %29) #7
  %198 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4clib5cbody12get_centroidEv(ptr noundef nonnull align 8 dereferenceable(168) %74)
          to label %199 unwind label %223

199:                                              ; preds = %196
  %200 = invoke { double, double } @_ZNK4clib5cbody14local_to_worldERKNS_4vec2E(ptr noundef nonnull align 8 dereferenceable(168) %74, ptr noundef nonnull align 8 dereferenceable(16) %198)
          to label %201 unwind label %223

201:                                              ; preds = %199
  %202 = extractvalue { double, double } %200, 0
  store double %202, ptr %29, align 8
  %203 = extractvalue { double, double } %200, 1
  store double %203, ptr %180, align 8
  %204 = invoke { double, double } @_ZN4clibmiERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %188, ptr noundef nonnull align 8 dereferenceable(16) %29)
          to label %205 unwind label %223

205:                                              ; preds = %201
  %206 = extractvalue { double, double } %204, 0
  %207 = extractvalue { double, double } %204, 1
  %208 = getelementptr inbounds i8, ptr %188, i64 16
  store double %206, ptr %208, align 8, !tbaa !9
  %.sroa.53.0..sroa_idx = getelementptr inbounds i8, ptr %188, i64 24
  store double %207, ptr %.sroa.53.0..sroa_idx, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %29) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %30) #7
  %209 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4clib5cbody12get_centroidEv(ptr noundef nonnull align 8 dereferenceable(168) %76)
          to label %210 unwind label %225

210:                                              ; preds = %205
  %211 = invoke { double, double } @_ZNK4clib5cbody14local_to_worldERKNS_4vec2E(ptr noundef nonnull align 8 dereferenceable(168) %76, ptr noundef nonnull align 8 dereferenceable(16) %209)
          to label %212 unwind label %225

212:                                              ; preds = %210
  %213 = extractvalue { double, double } %211, 0
  store double %213, ptr %30, align 8
  %214 = extractvalue { double, double } %211, 1
  store double %214, ptr %181, align 8
  %215 = invoke { double, double } @_ZN4clibmiERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %188, ptr noundef nonnull align 8 dereferenceable(16) %30)
          to label %216 unwind label %225

216:                                              ; preds = %212
  %217 = extractvalue { double, double } %215, 0
  %218 = extractvalue { double, double } %215, 1
  %219 = getelementptr inbounds i8, ptr %188, i64 32
  store double %217, ptr %219, align 8, !tbaa !9
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %188, i64 40
  store double %218, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) #7
  %220 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cpairELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #7
  invoke void @_ZN4clib5cpair11add_contactERKNS_8ccontactE(ptr noundef nonnull align 8 dereferenceable(72) %220, ptr noundef nonnull align 8 dereferenceable(120) %188)
          to label %229 unwind label %227

221:                                              ; preds = %190, %187
  %222 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %28) #7
  br label %232

223:                                              ; preds = %201, %199, %196
  %224 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %29) #7
  br label %232

225:                                              ; preds = %212, %210, %205
  %226 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) #7
  br label %232

227:                                              ; preds = %216
  %228 = landingpad { ptr, i32 }
          cleanup
  br label %232

229:                                              ; preds = %216, %194
  %230 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  %231 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  br i1 %231, label %187, label %._crit_edge

232:                                              ; preds = %227, %225, %223, %221
  %.pn99 = phi { ptr, i32 } [ %228, %227 ], [ %226, %225 ], [ %224, %223 ], [ %222, %221 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #7
  br label %252

233:                                              ; preds = %._crit_edge
  %234 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %76)
          to label %235 unwind label %250

235:                                              ; preds = %233
  %236 = icmp ult i16 %182, %234
  br i1 %236, label %237, label %241

237:                                              ; preds = %235
  %238 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %74)
          to label %239 unwind label %250

239:                                              ; preds = %237
  %240 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %76)
          to label %245 unwind label %250

241:                                              ; preds = %235
  %242 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %76)
          to label %243 unwind label %250

243:                                              ; preds = %241
  %244 = invoke noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168) %74)
          to label %245 unwind label %250

245:                                              ; preds = %243, %239
  %.sink131 = phi i16 [ %238, %239 ], [ %242, %243 ]
  %.sink129 = phi i16 [ %240, %239 ], [ %244, %243 ]
  %246 = zext i16 %.sink131 to i32
  %247 = shl nuw i32 %246, 16
  %248 = zext i16 %.sink129 to i32
  %249 = or disjoint i32 %247, %248
  store i32 %249, ptr %3, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #7
  br label %254

250:                                              ; preds = %243, %241, %239, %237, %233, %._crit_edge
  %251 = landingpad { ptr, i32 }
          cleanup
  br label %252

252:                                              ; preds = %250, %232
  %.pn99.pn = phi { ptr, i32 } [ %.pn99, %232 ], [ %251, %250 ]
  call void @_ZNSt12__shared_ptrIN4clib5cpairELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #7
  br label %253

253:                                              ; preds = %252, %185, %183
  %.pn99.pn.pn = phi { ptr, i32 } [ %.pn99.pn, %252 ], [ %186, %185 ], [ %184, %183 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #7
  br label %255

254:                                              ; preds = %157, %245
  call void @_ZNSt6vectorIN4clib8ccontactESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #7
  call void @_ZNSt6vectorIN4clib8ccontactESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  br label %258

255:                                              ; preds = %103, %156, %253
  %.pn99.pn.pn.pn = phi { ptr, i32 } [ %.pn99.pn.pn, %253 ], [ %.pn.pn, %156 ], [ %104, %103 ]
  call void @_ZNSt6vectorIN4clib8ccontactESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  br label %256

256:                                              ; preds = %255, %101
  %.pn99.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn99.pn.pn.pn, %255 ], [ %102, %101 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #7
  call void @_ZNSt6vectorIN4clib8ccontactESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  br label %257

257:                                              ; preds = %256, %99
  %.pn99.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn99.pn.pn.pn.pn, %256 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #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 8, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn99.pn.pn.pn.pn.pn

258:                                              ; preds = %254, %54, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #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 8, ptr nonnull %5) #7
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

declare noundef double @_ZNK4clib12polygon_body19min_separating_axisERmRKS0_(ptr noundef nonnull align 8 dereferenceable(192), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(192)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(192) ptr @_ZNKSt19__shared_ptr_accessIN4clib12polygon_bodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

declare noundef zeroext i16 @_ZNK4clib5cbody6get_idEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #1

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

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

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

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

declare { double, double } @_ZNK4clib12polygon_body4edgeEm(ptr noundef nonnull align 8 dereferenceable(192), i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN4clibL13incident_edgeERKNS_4vec2ERKNS_12polygon_bodyE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(192)) local_unnamed_addr #2

declare noundef i64 @_ZNK4clib12polygon_body5countEv(ptr noundef nonnull align 8 dereferenceable(192)) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN4clibL4clipERSt6vectorINS_8ccontactESaIS1_EERKS3_mRKNS_4vec2ES9_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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

declare void @_ZN4clib8cfactory12make_arbiterESt10shared_ptrINS_5cbodyEES3_RKNS_4vec2ERKSt6vectorINS_8ccontactESaIS8_EE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.8") align 8, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4clib5cbody12get_centroidEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cpairELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

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

declare void @_ZN4clib8ccontactC1ERKNS_12polygon_bodyEm(ptr, ptr, i64) local_unnamed_addr

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !10, i64 72}
!18 = !{!"_ZTSN4clib8ccontactE", !19, i64 0, !19, i64 16, !19, i64 32, !20, i64 48, !21, i64 56, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112}
!19 = !{!"_ZTSN4clib4vec2E", !10, i64 0, !10, i64 8}
!20 = !{!"_ZTSSt5arrayIbLm2EE", !7, i64 0}
!21 = !{!"_ZTSSt5arrayImLm2EE", !7, i64 0}


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