; LLVM IR from wesley-a-leung/Resources :: Tests/C++/geometry/2d (ConvexPolygonFuzzTest)

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

%struct.pt = type { x86_fp80, x86_fp80 }
%"class.std::vector.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z2ltee(x86_fp80 noundef, x86_fp80 noundef) #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: mustprogress uwtable
declare dso_local noundef x86_fp80 @_Z6distSq2ptS_(ptr noundef byval(%struct.pt) align 16, ptr noundef byval(%struct.pt) align 16) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z3ccw2ptS_S_(ptr noundef byval(%struct.pt) align 16, ptr noundef byval(%struct.pt) align 16, ptr noundef byval(%struct.pt) align 16) #2

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3modii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z31convexPolygonPointSingleTangentRKSt6vectorI2ptSaIS0_EES0_b(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef byval(%struct.pt) align 16, i1 noundef zeroext) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z33convexPolygonConvexPolygonTangentRKSt6vectorI2ptSaIS0_EES4_b(ptr dead_on_unwind noalias writable sret(%"class.std::vector.24") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i1 noundef zeroext %3) #2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i1, align 1
  %15 = alloca i32, align 4
  %16 = alloca %struct.pt, align 16
  %17 = alloca %struct.pt, align 16
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.pt, align 16
  %22 = alloca %struct.pt, align 16
  %23 = alloca %struct.pt, align 16
  %24 = alloca i8, align 1
  %25 = alloca %struct.pt, align 16
  %26 = alloca %struct.pt, align 16
  %27 = alloca %struct.pt, align 16
  %28 = alloca %struct.pt, align 16
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca %struct.pt, align 16
  %33 = alloca %struct.pt, align 16
  %34 = alloca %struct.pt, align 16
  %35 = alloca %struct.pt, align 16
  %36 = alloca %struct.pt, align 16
  %37 = alloca %struct.pt, align 16
  %38 = alloca %struct.pt, align 16
  %39 = alloca %struct.pt, align 16
  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
  %40 = zext i1 %3 to i8
  store i8 %40, ptr %8, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = call noundef i64 @_ZNKSt6vectorI2ptSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %41) #4
  %43 = trunc i64 %42 to i32
  store i32 %43, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !11
  store i1 false, ptr %14, align 1
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %44

44:                                               ; preds = %221, %4
  %45 = load i32, ptr %15, align 4, !tbaa !11
  %46 = icmp slt i32 %45, 2
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %232

48:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #4
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef 0) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %17, ptr align 16 %52, i64 32, i1 false), !tbaa.struct !13
  %53 = load i8, ptr %8, align 1, !tbaa !9, !range !16, !noundef !17
  %54 = trunc i8 %53 to i1
  %55 = zext i1 %54 to i32
  %56 = load i32, ptr %15, align 4, !tbaa !11
  %57 = xor i32 %55, %56
  %58 = icmp ne i32 %57, 0
  %59 = invoke noundef i32 @_Z31convexPolygonPointSingleTangentRKSt6vectorI2ptSaIS0_EES0_b(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef byval(%struct.pt) align 16 %17, i1 noundef zeroext %58)
          to label %60 unwind label %146

60:                                               ; preds = %48
  %61 = sext i32 %59 to i64
  %62 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %61) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %16, ptr align 16 %62, i64 32, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 %16, i64 32, i1 false), !tbaa.struct !13
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef 0) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 %64, i64 32, i1 false), !tbaa.struct !13
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %65) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %23, ptr align 16 %66, i64 32, i1 false), !tbaa.struct !13
  %67 = invoke noundef i32 @_Z3ccw2ptS_S_(ptr noundef byval(%struct.pt) align 16 %21, ptr noundef byval(%struct.pt) align 16 %22, ptr noundef byval(%struct.pt) align 16 %23)
          to label %68 unwind label %150

68:                                               ; preds = %60
  store i32 %67, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #4
  %69 = load i32, ptr %20, align 4, !tbaa !11
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %74

71:                                               ; preds = %68
  %72 = load i32, ptr %20, align 4, !tbaa !11
  %73 = icmp slt i32 %72, 0
  br label %84

74:                                               ; preds = %68
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %25, ptr align 16 %16, i64 32, i1 false), !tbaa.struct !13
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %75) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 %76, i64 32, i1 false), !tbaa.struct !13
  %77 = invoke noundef x86_fp80 @_Z6distSq2ptS_(ptr noundef byval(%struct.pt) align 16 %25, ptr noundef byval(%struct.pt) align 16 %26)
          to label %78 unwind label %154

78:                                               ; preds = %74
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %16, i64 32, i1 false), !tbaa.struct !13
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef 0) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 %80, i64 32, i1 false), !tbaa.struct !13
  %81 = invoke noundef x86_fp80 @_Z6distSq2ptS_(ptr noundef byval(%struct.pt) align 16 %27, ptr noundef byval(%struct.pt) align 16 %28)
          to label %82 unwind label %154

82:                                               ; preds = %78
  %83 = call noundef zeroext i1 @_Z2ltee(x86_fp80 noundef %77, x86_fp80 noundef %81)
  br label %84

84:                                               ; preds = %82, %71
  %85 = phi i1 [ %73, %71 ], [ %83, %82 ]
  %86 = zext i1 %85 to i8
  store i8 %86, ptr %24, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  %87 = load i8, ptr %24, align 1, !tbaa !9, !range !16, !noundef !17
  %88 = trunc i8 %87 to i1
  %89 = zext i1 %88 to i32
  %90 = load i32, ptr %15, align 4, !tbaa !11
  %91 = icmp eq i32 %89, %90
  %92 = zext i1 %91 to i32
  store i32 %92, ptr %29, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  %93 = load i32, ptr %29, align 4, !tbaa !11
  %94 = load i32, ptr %9, align 4, !tbaa !11
  %95 = add nsw i32 %93, %94
  %96 = sub nsw i32 %95, 2
  store i32 %96, ptr %30, align 4, !tbaa !11
  br label %97

97:                                               ; preds = %191, %84
  %98 = load i32, ptr %29, align 4, !tbaa !11
  %99 = load i32, ptr %30, align 4, !tbaa !11
  %100 = icmp sle i32 %98, %99
  br i1 %100, label %101, label %192

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #4
  %102 = load i32, ptr %29, align 4, !tbaa !11
  %103 = load i32, ptr %30, align 4, !tbaa !11
  %104 = load i32, ptr %29, align 4, !tbaa !11
  %105 = sub nsw i32 %103, %104
  %106 = sdiv i32 %105, 2
  %107 = add nsw i32 %102, %106
  store i32 %107, ptr %31, align 4, !tbaa !11
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = load i32, ptr %31, align 4, !tbaa !11
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %112) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %32, ptr align 16 %113, i64 32, i1 false), !tbaa.struct !13
  %114 = load i8, ptr %8, align 1, !tbaa !9, !range !16, !noundef !17
  %115 = trunc i8 %114 to i1
  %116 = zext i1 %115 to i32
  %117 = load i32, ptr %15, align 4, !tbaa !11
  %118 = xor i32 %116, %117
  %119 = icmp ne i32 %118, 0
  %120 = invoke noundef i32 @_Z31convexPolygonPointSingleTangentRKSt6vectorI2ptSaIS0_EES0_b(ptr noundef nonnull align 8 dereferenceable(24) %109, ptr noundef byval(%struct.pt) align 16 %32, i1 noundef zeroext %119)
          to label %121 unwind label %158

121:                                              ; preds = %101
  %122 = sext i32 %120 to i64
  %123 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %108, i64 noundef %122) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %16, ptr align 16 %123, i64 32, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %16, i64 32, i1 false), !tbaa.struct !13
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %124, i64 noundef 0) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %34, ptr align 16 %125, i64 32, i1 false), !tbaa.struct !13
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = load i32, ptr %31, align 4, !tbaa !11
  %128 = sext i32 %127 to i64
  %129 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %126, i64 noundef %128) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %35, ptr align 16 %129, i64 32, i1 false), !tbaa.struct !13
  %130 = invoke noundef i32 @_Z3ccw2ptS_S_(ptr noundef byval(%struct.pt) align 16 %33, ptr noundef byval(%struct.pt) align 16 %34, ptr noundef byval(%struct.pt) align 16 %35)
          to label %131 unwind label %158

131:                                              ; preds = %121
  %132 = load i32, ptr %15, align 4, !tbaa !11
  %133 = icmp ne i32 %132, 0
  %134 = zext i1 %133 to i64
  %135 = select i1 %133, i32 1, i32 -1
  %136 = icmp eq i32 %130, %135
  br i1 %136, label %137, label %166

137:                                              ; preds = %131
  %138 = load i8, ptr %24, align 1, !tbaa !9, !range !16, !noundef !17
  %139 = trunc i8 %138 to i1
  %140 = zext i1 %139 to i32
  %141 = load i32, ptr %15, align 4, !tbaa !11
  %142 = icmp ne i32 %140, %141
  br i1 %142, label %143, label %162

143:                                              ; preds = %137
  %144 = load i32, ptr %31, align 4, !tbaa !11
  %145 = sub nsw i32 %144, 1
  store i32 %145, ptr %30, align 4, !tbaa !11
  br label %165

146:                                              ; preds = %48
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %18, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %19, align 4
  br label %231

150:                                              ; preds = %60
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %18, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %19, align 4
  br label %230

154:                                              ; preds = %78, %74
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %18, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %19, align 4
  br label %229

158:                                              ; preds = %166, %121, %101
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %18, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  br label %228

162:                                              ; preds = %137
  %163 = load i32, ptr %31, align 4, !tbaa !11
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %29, align 4, !tbaa !11
  br label %165

165:                                              ; preds = %162, %143
  br label %191

166:                                              ; preds = %131
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = load i32, ptr %31, align 4, !tbaa !11
  %169 = sext i32 %168 to i64
  %170 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %167, i64 noundef %169) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %36, ptr align 16 %170, i64 32, i1 false), !tbaa.struct !13
  %171 = load ptr, ptr %6, align 8, !tbaa !5
  %172 = load i32, ptr %31, align 4, !tbaa !11
  %173 = add nsw i32 %172, 1
  %174 = load i32, ptr %9, align 4, !tbaa !11
  %175 = call noundef i32 @_Z3modii(i32 noundef %173, i32 noundef %174)
  %176 = sext i32 %175 to i64
  %177 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %171, i64 noundef %176) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %37, ptr align 16 %177, i64 32, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %38, ptr align 16 %16, i64 32, i1 false), !tbaa.struct !13
  %178 = invoke noundef i32 @_Z3ccw2ptS_S_(ptr noundef byval(%struct.pt) align 16 %36, ptr noundef byval(%struct.pt) align 16 %37, ptr noundef byval(%struct.pt) align 16 %38)
          to label %179 unwind label %158

179:                                              ; preds = %166
  %180 = icmp slt i32 %178, 0
  %181 = zext i1 %180 to i32
  %182 = load i32, ptr %15, align 4, !tbaa !11
  %183 = icmp ne i32 %181, %182
  br i1 %183, label %184, label %187

184:                                              ; preds = %179
  %185 = load i32, ptr %31, align 4, !tbaa !11
  %186 = sub nsw i32 %185, 1
  store i32 %186, ptr %30, align 4, !tbaa !11
  br label %190

187:                                              ; preds = %179
  %188 = load i32, ptr %31, align 4, !tbaa !11
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %29, align 4, !tbaa !11
  br label %190

190:                                              ; preds = %187, %184
  br label %191

191:                                              ; preds = %190, %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  br label %97, !llvm.loop !18

192:                                              ; preds = %97
  %193 = load i32, ptr %29, align 4, !tbaa !11
  %194 = load i32, ptr %9, align 4, !tbaa !11
  %195 = call noundef i32 @_Z3modii(i32 noundef %193, i32 noundef %194)
  store i32 %195, ptr %29, align 4, !tbaa !11
  %196 = load i32, ptr %15, align 4, !tbaa !11
  %197 = icmp ne i32 %196, 0
  br i1 %197, label %198, label %199

198:                                              ; preds = %192
  br label %200

199:                                              ; preds = %192
  br label %200

200:                                              ; preds = %199, %198
  %201 = phi ptr [ %11, %198 ], [ %10, %199 ]
  store i32 %195, ptr %201, align 4, !tbaa !11
  %202 = load ptr, ptr %7, align 8, !tbaa !5
  %203 = load ptr, ptr %6, align 8, !tbaa !5
  %204 = load i32, ptr %29, align 4, !tbaa !11
  %205 = sext i32 %204 to i64
  %206 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %203, i64 noundef %205) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %39, ptr align 16 %206, i64 32, i1 false), !tbaa.struct !13
  %207 = load i8, ptr %8, align 1, !tbaa !9, !range !16, !noundef !17
  %208 = trunc i8 %207 to i1
  %209 = zext i1 %208 to i32
  %210 = load i32, ptr %15, align 4, !tbaa !11
  %211 = xor i32 %209, %210
  %212 = icmp ne i32 %211, 0
  %213 = invoke noundef i32 @_Z31convexPolygonPointSingleTangentRKSt6vectorI2ptSaIS0_EES0_b(ptr noundef nonnull align 8 dereferenceable(24) %202, ptr noundef byval(%struct.pt) align 16 %39, i1 noundef zeroext %212)
          to label %214 unwind label %224

214:                                              ; preds = %200
  %215 = load i32, ptr %15, align 4, !tbaa !11
  %216 = icmp ne i32 %215, 0
  br i1 %216, label %217, label %218

217:                                              ; preds = %214
  br label %219

218:                                              ; preds = %214
  br label %219

219:                                              ; preds = %218, %217
  %220 = phi ptr [ %13, %217 ], [ %12, %218 ]
  store i32 %213, ptr %220, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  br label %221

221:                                              ; preds = %219
  %222 = load i32, ptr %15, align 4, !tbaa !11
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %15, align 4, !tbaa !11
  br label %44, !llvm.loop !20

224:                                              ; preds = %200
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %18, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %19, align 4
  br label %228

228:                                              ; preds = %224, %158
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  br label %229

229:                                              ; preds = %228, %154
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #4
  br label %230

230:                                              ; preds = %229, %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %231

231:                                              ; preds = %230, %146
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %244

232:                                              ; preds = %47
  %233 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %234 unwind label %238

234:                                              ; preds = %232
  %235 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %236 unwind label %238

236:                                              ; preds = %234
  store i1 true, ptr %14, align 1
  %237 = load i1, ptr %14, align 1
  br i1 %237, label %243, label %242

238:                                              ; preds = %234, %232
  %239 = landingpad { ptr, i32 }
          cleanup
  %240 = extractvalue { ptr, i32 } %239, 0
  store ptr %240, ptr %18, align 8
  %241 = extractvalue { ptr, i32 } %239, 1
  store i32 %241, ptr %19, align 4
  br label %244

242:                                              ; preds = %236
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %243

243:                                              ; preds = %242, %236
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret void

244:                                              ; preds = %238, %231
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %245

245:                                              ; preds = %244
  %246 = load ptr, ptr %18, align 8
  %247 = load i32, ptr %19, align 4
  %248 = insertvalue { ptr, i32 } poison, ptr %246, 0
  %249 = insertvalue { ptr, i32 } %248, i32 %247, 1
  resume { ptr, i32 } %249
}

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

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 16, !14, i64 16, i64 16, !14}
!14 = !{!15, !15, i64 0}
!15 = !{!"long double", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


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

%struct.pt = type { x86_fp80, x86_fp80 }
%"class.std::vector.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z2ltee(x86_fp80 noundef, x86_fp80 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_Z6distSq2ptS_(ptr noundef byval(%struct.pt) align 16, ptr noundef byval(%struct.pt) align 16) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z3ccw2ptS_S_(ptr noundef byval(%struct.pt) align 16, ptr noundef byval(%struct.pt) align 16, ptr noundef byval(%struct.pt) align 16) local_unnamed_addr #2

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3modii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z31convexPolygonPointSingleTangentRKSt6vectorI2ptSaIS0_EES0_b(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef byval(%struct.pt) align 16, i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z33convexPolygonConvexPolygonTangentRKSt6vectorI2ptSaIS0_EES4_b(ptr dead_on_unwind noalias writable sret(%"class.std::vector.24") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i1 noundef zeroext %3) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.pt, align 16
  %10 = alloca %struct.pt, align 16
  %11 = alloca %struct.pt, align 16
  %12 = alloca %struct.pt, align 16
  %13 = alloca %struct.pt, align 16
  %14 = alloca %struct.pt, align 16
  %15 = tail call noundef i64 @_ZNKSt6vectorI2ptSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %16 = trunc i64 %15 to i32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  tail call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %17 = add i32 %16, -2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9)
  %18 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #5
  %19 = invoke noundef i32 @_Z31convexPolygonPointSingleTangentRKSt6vectorI2ptSaIS0_EES0_b(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull byval(%struct.pt) align 16 %18, i1 noundef zeroext %3)
          to label %20 unwind label %59

20:                                               ; preds = %4
  %21 = sext i32 %19 to i64
  %22 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %21) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %9, ptr noundef nonnull align 16 dereferenceable(32) %22, i64 32, i1 false), !tbaa.struct !9
  call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %10, ptr noundef nonnull align 16 dereferenceable(32) %22, i64 32, i1 false)
  %23 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %11, ptr noundef nonnull align 16 dereferenceable(32) %23, i64 32, i1 false), !tbaa.struct !9
  %24 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %25 = invoke noundef i32 @_Z3ccw2ptS_S_(ptr noundef nonnull byval(%struct.pt) align 16 %10, ptr noundef nonnull byval(%struct.pt) align 16 %11, ptr noundef nonnull byval(%struct.pt) align 16 %24)
          to label %26 unwind label %61

26:                                               ; preds = %20
  %.not = icmp eq i32 %25, 0
  br i1 %.not, label %29, label %27

27:                                               ; preds = %26
  %28 = icmp slt i32 %25, 0
  br label %37

29:                                               ; preds = %26
  %30 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %31 = invoke noundef x86_fp80 @_Z6distSq2ptS_(ptr noundef nonnull byval(%struct.pt) align 16 %9, ptr noundef nonnull byval(%struct.pt) align 16 %30)
          to label %32 unwind label %63

32:                                               ; preds = %29
  %33 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #5
  %34 = invoke noundef x86_fp80 @_Z6distSq2ptS_(ptr noundef nonnull byval(%struct.pt) align 16 %9, ptr noundef nonnull byval(%struct.pt) align 16 %33)
          to label %35 unwind label %63

35:                                               ; preds = %32
  %36 = tail call noundef zeroext i1 @_Z2ltee(x86_fp80 noundef %31, x86_fp80 noundef %34)
  br label %37

37:                                               ; preds = %35, %27
  %38 = phi i1 [ %28, %27 ], [ %36, %35 ]
  %39 = xor i1 %38, true
  %40 = zext i1 %39 to i32
  %41 = add i32 %17, %40
  %.not6981 = icmp slt i32 %41, %40
  br i1 %.not6981, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %37, %76
  %.083 = phi i32 [ %.157, %76 ], [ %41, %37 ]
  %.05882 = phi i32 [ %.159, %76 ], [ %40, %37 ]
  %42 = sub nsw i32 %.083, %.05882
  %43 = sdiv i32 %42, 2
  %44 = add nsw i32 %43, %.05882
  %45 = sext i32 %44 to i64
  %46 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %45) #5
  %47 = invoke noundef i32 @_Z31convexPolygonPointSingleTangentRKSt6vectorI2ptSaIS0_EES0_b(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull byval(%struct.pt) align 16 %46, i1 noundef zeroext %3)
          to label %48 unwind label %.loopexit

48:                                               ; preds = %.lr.ph
  %49 = sext i32 %47 to i64
  %50 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %49) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %9, ptr noundef nonnull align 16 dereferenceable(32) %50, i64 32, i1 false), !tbaa.struct !9
  call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %12, ptr noundef nonnull align 16 dereferenceable(32) %50, i64 32, i1 false)
  %51 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %13, ptr noundef nonnull align 16 dereferenceable(32) %51, i64 32, i1 false), !tbaa.struct !9
  %52 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %45) #5
  %53 = invoke noundef i32 @_Z3ccw2ptS_S_(ptr noundef nonnull byval(%struct.pt) align 16 %12, ptr noundef nonnull byval(%struct.pt) align 16 %13, ptr noundef nonnull byval(%struct.pt) align 16 %52)
          to label %54 unwind label %.loopexit

54:                                               ; preds = %48
  %55 = icmp eq i32 %53, -1
  br i1 %55, label %56, label %67

56:                                               ; preds = %54
  br i1 %38, label %57, label %65

57:                                               ; preds = %56
  %58 = add nsw i32 %44, -1
  br label %76

59:                                               ; preds = %81, %4
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %143

61:                                               ; preds = %85, %20
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %143

63:                                               ; preds = %97, %94, %32, %29
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %143

.loopexit:                                        ; preds = %.lr.ph, %48, %67
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %143

.loopexit.split-lp:                               ; preds = %.lr.ph.1, %112, %120
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %143

65:                                               ; preds = %56
  %66 = add nsw i32 %44, 1
  br label %76

67:                                               ; preds = %54
  %68 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %45) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %14, ptr noundef nonnull align 16 dereferenceable(32) %68, i64 32, i1 false), !tbaa.struct !9
  %69 = add nsw i32 %44, 1
  %70 = tail call noundef i32 @_Z3modii(i32 noundef %69, i32 noundef %16)
  %71 = sext i32 %70 to i64
  %72 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %71) #5
  %73 = invoke noundef i32 @_Z3ccw2ptS_S_(ptr noundef nonnull byval(%struct.pt) align 16 %14, ptr noundef nonnull byval(%struct.pt) align 16 %72, ptr noundef nonnull byval(%struct.pt) align 16 %9)
          to label %74 unwind label %.loopexit

74:                                               ; preds = %67
  %.not77 = icmp sgt i32 %73, -1
  %75 = add nsw i32 %44, -1
  %spec.select = select i1 %.not77, i32 %69, i32 %.05882
  %spec.select79 = select i1 %.not77, i32 %.083, i32 %75
  br label %76

76:                                               ; preds = %74, %57, %65
  %.159 = phi i32 [ %.05882, %57 ], [ %66, %65 ], [ %spec.select, %74 ]
  %.157 = phi i32 [ %58, %57 ], [ %.083, %65 ], [ %spec.select79, %74 ]
  %.not69 = icmp sgt i32 %.159, %.157
  br i1 %.not69, label %._crit_edge, label %.lr.ph, !llvm.loop !12

._crit_edge:                                      ; preds = %76, %37
  %.058.lcssa = phi i32 [ %40, %37 ], [ %.159, %76 ]
  %77 = tail call noundef i32 @_Z3modii(i32 noundef %.058.lcssa, i32 noundef %16)
  store i32 %77, ptr %5, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %78) #5
  %80 = invoke noundef i32 @_Z31convexPolygonPointSingleTangentRKSt6vectorI2ptSaIS0_EES0_b(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull byval(%struct.pt) align 16 %79, i1 noundef zeroext %3)
          to label %81 unwind label %141

81:                                               ; preds = %._crit_edge
  store i32 %80, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9)
  %82 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #5
  %83 = xor i1 %3, true
  %84 = invoke noundef i32 @_Z31convexPolygonPointSingleTangentRKSt6vectorI2ptSaIS0_EES0_b(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull byval(%struct.pt) align 16 %82, i1 noundef zeroext %83)
          to label %85 unwind label %59

85:                                               ; preds = %81
  %86 = sext i32 %84 to i64
  %87 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %86) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %9, ptr noundef nonnull align 16 dereferenceable(32) %87, i64 32, i1 false), !tbaa.struct !9
  call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %10, ptr noundef nonnull align 16 dereferenceable(32) %87, i64 32, i1 false)
  %88 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %11, ptr noundef nonnull align 16 dereferenceable(32) %88, i64 32, i1 false), !tbaa.struct !9
  %89 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %90 = invoke noundef i32 @_Z3ccw2ptS_S_(ptr noundef nonnull byval(%struct.pt) align 16 %10, ptr noundef nonnull byval(%struct.pt) align 16 %11, ptr noundef nonnull byval(%struct.pt) align 16 %89)
          to label %91 unwind label %61

91:                                               ; preds = %85
  %.not.1 = icmp eq i32 %90, 0
  br i1 %.not.1, label %94, label %92

92:                                               ; preds = %91
  %93 = icmp slt i32 %90, 0
  br label %102

94:                                               ; preds = %91
  %95 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %96 = invoke noundef x86_fp80 @_Z6distSq2ptS_(ptr noundef nonnull byval(%struct.pt) align 16 %9, ptr noundef nonnull byval(%struct.pt) align 16 %95)
          to label %97 unwind label %63

97:                                               ; preds = %94
  %98 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #5
  %99 = invoke noundef x86_fp80 @_Z6distSq2ptS_(ptr noundef nonnull byval(%struct.pt) align 16 %9, ptr noundef nonnull byval(%struct.pt) align 16 %98)
          to label %100 unwind label %63

100:                                              ; preds = %97
  %101 = tail call noundef zeroext i1 @_Z2ltee(x86_fp80 noundef %96, x86_fp80 noundef %99)
  br label %102

102:                                              ; preds = %100, %92
  %103 = phi i1 [ %93, %92 ], [ %101, %100 ]
  %104 = zext i1 %103 to i32
  %105 = add i32 %17, %104
  %.not6981.1 = icmp slt i32 %105, %104
  br i1 %.not6981.1, label %._crit_edge.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %102, %134
  %.083.1 = phi i32 [ %.157.1, %134 ], [ %105, %102 ]
  %.05882.1 = phi i32 [ %.159.1, %134 ], [ %104, %102 ]
  %106 = sub nsw i32 %.083.1, %.05882.1
  %107 = sdiv i32 %106, 2
  %108 = add nsw i32 %107, %.05882.1
  %109 = sext i32 %108 to i64
  %110 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %109) #5
  %111 = invoke noundef i32 @_Z31convexPolygonPointSingleTangentRKSt6vectorI2ptSaIS0_EES0_b(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull byval(%struct.pt) align 16 %110, i1 noundef zeroext %83)
          to label %112 unwind label %.loopexit.split-lp

112:                                              ; preds = %.lr.ph.1
  %113 = sext i32 %111 to i64
  %114 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %113) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %9, ptr noundef nonnull align 16 dereferenceable(32) %114, i64 32, i1 false), !tbaa.struct !9
  call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %12, ptr noundef nonnull align 16 dereferenceable(32) %114, i64 32, i1 false)
  %115 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %13, ptr noundef nonnull align 16 dereferenceable(32) %115, i64 32, i1 false), !tbaa.struct !9
  %116 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %109) #5
  %117 = invoke noundef i32 @_Z3ccw2ptS_S_(ptr noundef nonnull byval(%struct.pt) align 16 %12, ptr noundef nonnull byval(%struct.pt) align 16 %13, ptr noundef nonnull byval(%struct.pt) align 16 %116)
          to label %118 unwind label %.loopexit.split-lp

118:                                              ; preds = %112
  %119 = icmp eq i32 %117, 1
  br i1 %119, label %129, label %120

120:                                              ; preds = %118
  %121 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %109) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %14, ptr noundef nonnull align 16 dereferenceable(32) %121, i64 32, i1 false), !tbaa.struct !9
  %122 = add nsw i32 %108, 1
  %123 = tail call noundef i32 @_Z3modii(i32 noundef %122, i32 noundef %16)
  %124 = sext i32 %123 to i64
  %125 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %124) #5
  %126 = invoke noundef i32 @_Z3ccw2ptS_S_(ptr noundef nonnull byval(%struct.pt) align 16 %14, ptr noundef nonnull byval(%struct.pt) align 16 %125, ptr noundef nonnull byval(%struct.pt) align 16 %9)
          to label %127 unwind label %.loopexit.split-lp

127:                                              ; preds = %120
  %.not77.1.not = icmp sgt i32 %126, -1
  %128 = add nsw i32 %108, -1
  %spec.select.1 = select i1 %.not77.1.not, i32 %.05882.1, i32 %122
  %spec.select79.1 = select i1 %.not77.1.not, i32 %128, i32 %.083.1
  br label %134

129:                                              ; preds = %118
  br i1 %103, label %132, label %130

130:                                              ; preds = %129
  %131 = add nsw i32 %108, -1
  br label %134

132:                                              ; preds = %129
  %133 = add nsw i32 %108, 1
  br label %134

134:                                              ; preds = %132, %130, %127
  %.159.1 = phi i32 [ %.05882.1, %130 ], [ %133, %132 ], [ %spec.select.1, %127 ]
  %.157.1 = phi i32 [ %131, %130 ], [ %.083.1, %132 ], [ %spec.select79.1, %127 ]
  %.not69.1 = icmp sgt i32 %.159.1, %.157.1
  br i1 %.not69.1, label %._crit_edge.1, label %.lr.ph.1, !llvm.loop !12

._crit_edge.1:                                    ; preds = %134, %102
  %.058.lcssa.1 = phi i32 [ %104, %102 ], [ %.159.1, %134 ]
  %135 = tail call noundef i32 @_Z3modii(i32 noundef %.058.lcssa.1, i32 noundef %16)
  store i32 %135, ptr %6, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = tail call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt6vectorI2ptSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %136) #5
  %138 = invoke noundef i32 @_Z31convexPolygonPointSingleTangentRKSt6vectorI2ptSaIS0_EES0_b(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull byval(%struct.pt) align 16 %137, i1 noundef zeroext %83)
          to label %139 unwind label %141

139:                                              ; preds = %._crit_edge.1
  store i32 %138, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9)
  %140 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %144 unwind label %146

141:                                              ; preds = %._crit_edge.1, %._crit_edge
  %142 = landingpad { ptr, i32 }
          cleanup
  br label %143

143:                                              ; preds = %.loopexit, %.loopexit.split-lp, %61, %141, %63, %59
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %60, %59 ], [ %62, %61 ], [ %64, %63 ], [ %142, %141 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9)
  br label %149

144:                                              ; preds = %139
  %145 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %148 unwind label %146

146:                                              ; preds = %144, %139
  %147 = landingpad { ptr, i32 }
          cleanup
  br label %149

148:                                              ; preds = %144
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  ret void

149:                                              ; preds = %146, %143
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %143 ], [ %147, %146 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

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

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

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 16, !10, i64 16, i64 16, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"long double", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass