; LLVM IR from PaddlePaddle/Serving :: core/predictor/tools/ocrtools (clipper)

; 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.ClipperLib::IntPoint" = type { i64, i64 }
%"class.ClipperLib::PolyNode" = type { ptr, %"class.std::vector", %"class.std::vector.0", ptr, i32, i8, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>::_Vector_impl" }
%"struct.std::_Vector_base<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClipperLib::IntPoint, std::allocator<ClipperLib::IntPoint>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<ClipperLib::PolyNode *, std::allocator<ClipperLib::PolyNode *>>::_Vector_impl" }
%"struct.std::_Vector_base<ClipperLib::PolyNode *, std::allocator<ClipperLib::PolyNode *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClipperLib::PolyNode *, std::allocator<ClipperLib::PolyNode *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClipperLib::PolyNode *, std::allocator<ClipperLib::PolyNode *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ClipperLib::ClipperOffset" = type { double, double, %"class.std::vector.28", %"class.std::vector", %"class.std::vector", %"class.std::vector.49", double, double, double, double, double, double, %"struct.ClipperLib::IntPoint", %"class.ClipperLib::PolyNode" }
%"class.std::vector.28" = type { %"struct.std::_Vector_base.29" }
%"struct.std::_Vector_base.29" = type { %"struct.std::_Vector_base<std::vector<ClipperLib::IntPoint>, std::allocator<std::vector<ClipperLib::IntPoint>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<ClipperLib::IntPoint>, std::allocator<std::vector<ClipperLib::IntPoint>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<ClipperLib::IntPoint>, std::allocator<std::vector<ClipperLib::IntPoint>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<ClipperLib::IntPoint>, std::allocator<std::vector<ClipperLib::IntPoint>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.49" = type { %"struct.std::_Vector_base.50" }
%"struct.std::_Vector_base.50" = type { %"struct.std::_Vector_base<ClipperLib::DoublePoint, std::allocator<ClipperLib::DoublePoint>>::_Vector_impl" }
%"struct.std::_Vector_base<ClipperLib::DoublePoint, std::allocator<ClipperLib::DoublePoint>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClipperLib::DoublePoint, std::allocator<ClipperLib::DoublePoint>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClipperLib::DoublePoint, std::allocator<ClipperLib::DoublePoint>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK10ClipperLib8PolyNode10ChildCountEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

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

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

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

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #6

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ClipperLib13ClipperOffset7AddPathERKSt6vectorINS_8IntPointESaIS2_EENS_8JoinTypeENS_7EndTypeE(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2, i32 noundef %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"struct.ClipperLib::IntPoint", align 8
  %18 = alloca %"struct.ClipperLib::IntPoint", align 8
  %19 = alloca %"struct.ClipperLib::IntPoint", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !11
  %20 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = call noundef i64 @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  %23 = trunc i64 %22 to i32
  %24 = sub nsw i32 %23, 1
  store i32 %24, ptr %9, align 4, !tbaa !13
  %25 = load i32, ptr %9, align 4, !tbaa !13
  %26 = icmp slt i32 %25, 0
  br i1 %26, label %27, label %28

27:                                               ; preds = %4
  store i32 1, ptr %10, align 4
  br label %243

28:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %29 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 80) #8
  invoke void @_ZN10ClipperLib8PolyNodeC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %29)
          to label %30 unwind label %59

30:                                               ; preds = %28
  store ptr %29, ptr %11, align 8, !tbaa !5
  %31 = load i32, ptr %7, align 4, !tbaa !9
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %32, i32 0, i32 6
  store i32 %31, ptr %33, align 8, !tbaa !15
  %34 = load i32, ptr %8, align 4, !tbaa !11
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %35, i32 0, i32 7
  store i32 %34, ptr %36, align 4, !tbaa !26
  %37 = load i32, ptr %8, align 4, !tbaa !11
  %38 = icmp eq i32 %37, 1
  br i1 %38, label %42, label %39

39:                                               ; preds = %30
  %40 = load i32, ptr %8, align 4, !tbaa !11
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %64

42:                                               ; preds = %39, %30
  br label %43

43:                                               ; preds = %56, %42
  %44 = load i32, ptr %9, align 4, !tbaa !13
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %46, label %54

46:                                               ; preds = %43
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef 0) #7
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = load i32, ptr %9, align 4, !tbaa !13
  %51 = sext i32 %50 to i64
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %51) #7
  %53 = call noundef zeroext i1 @_ZN10ClipperLibeqERKNS_8IntPointES2_(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef nonnull align 8 dereferenceable(16) %52)
  br label %54

54:                                               ; preds = %46, %43
  %55 = phi i1 [ false, %43 ], [ %53, %46 ]
  br i1 %55, label %56, label %63

56:                                               ; preds = %54
  %57 = load i32, ptr %9, align 4, !tbaa !13
  %58 = add nsw i32 %57, -1
  store i32 %58, ptr %9, align 4, !tbaa !13
  br label %43, !llvm.loop !27

59:                                               ; preds = %28
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %12, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %13, align 4
  call void @_ZdlPvm(ptr noundef %29, i64 noundef 80) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %246

63:                                               ; preds = %54
  br label %64

64:                                               ; preds = %63, %39
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %65, i32 0, i32 1
  %67 = load i32, ptr %9, align 4, !tbaa !13
  %68 = add nsw i32 %67, 1
  %69 = sext i32 %68 to i64
  call void @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %69)
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %70, i32 0, i32 1
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef 0) #7
  call void @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %71, ptr noundef nonnull align 8 dereferenceable(16) %73)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 1, ptr %16, align 4, !tbaa !13
  br label %74

74:                                               ; preds = %147, %64
  %75 = load i32, ptr %16, align 4, !tbaa !13
  %76 = load i32, ptr %9, align 4, !tbaa !13
  %77 = icmp sle i32 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %150

79:                                               ; preds = %74
  %80 = load ptr, ptr %11, align 8, !tbaa !5
  %81 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %80, i32 0, i32 1
  %82 = load i32, ptr %14, align 4, !tbaa !13
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %83) #7
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = load i32, ptr %16, align 4, !tbaa !13
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %87) #7
  %89 = call noundef zeroext i1 @_ZN10ClipperLibneERKNS_8IntPointES2_(ptr noundef nonnull align 8 dereferenceable(16) %84, ptr noundef nonnull align 8 dereferenceable(16) %88)
  br i1 %89, label %90, label %146

90:                                               ; preds = %79
  %91 = load i32, ptr %14, align 4, !tbaa !13
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %14, align 4, !tbaa !13
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %93, i32 0, i32 1
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = load i32, ptr %16, align 4, !tbaa !13
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef %97) #7
  call void @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %94, ptr noundef nonnull align 8 dereferenceable(16) %98)
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = load i32, ptr %16, align 4, !tbaa !13
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %101) #7
  %103 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %102, i32 0, i32 1
  %104 = load i64, ptr %103, align 8, !tbaa !29
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %105, i32 0, i32 1
  %107 = load i32, ptr %15, align 4, !tbaa !13
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %108) #7
  %110 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %109, i32 0, i32 1
  %111 = load i64, ptr %110, align 8, !tbaa !29
  %112 = icmp sgt i64 %104, %111
  br i1 %112, label %143, label %113

113:                                              ; preds = %90
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = load i32, ptr %16, align 4, !tbaa !13
  %116 = sext i32 %115 to i64
  %117 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %116) #7
  %118 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %117, i32 0, i32 1
  %119 = load i64, ptr %118, align 8, !tbaa !29
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  %121 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %120, i32 0, i32 1
  %122 = load i32, ptr %15, align 4, !tbaa !13
  %123 = sext i32 %122 to i64
  %124 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %123) #7
  %125 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %124, i32 0, i32 1
  %126 = load i64, ptr %125, align 8, !tbaa !29
  %127 = icmp eq i64 %119, %126
  br i1 %127, label %128, label %145

128:                                              ; preds = %113
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = load i32, ptr %16, align 4, !tbaa !13
  %131 = sext i32 %130 to i64
  %132 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %129, i64 noundef %131) #7
  %133 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %132, i32 0, i32 0
  %134 = load i64, ptr %133, align 8, !tbaa !32
  %135 = load ptr, ptr %11, align 8, !tbaa !5
  %136 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %135, i32 0, i32 1
  %137 = load i32, ptr %15, align 4, !tbaa !13
  %138 = sext i32 %137 to i64
  %139 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %136, i64 noundef %138) #7
  %140 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %139, i32 0, i32 0
  %141 = load i64, ptr %140, align 8, !tbaa !32
  %142 = icmp slt i64 %134, %141
  br i1 %142, label %143, label %145

143:                                              ; preds = %128, %90
  %144 = load i32, ptr %14, align 4, !tbaa !13
  store i32 %144, ptr %15, align 4, !tbaa !13
  br label %145

145:                                              ; preds = %143, %128, %113
  br label %146

146:                                              ; preds = %145, %79
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %16, align 4, !tbaa !13
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %16, align 4, !tbaa !13
  br label %74, !llvm.loop !33

150:                                              ; preds = %78
  %151 = load i32, ptr %8, align 4, !tbaa !11
  %152 = icmp eq i32 %151, 0
  br i1 %152, label %153, label %164

153:                                              ; preds = %150
  %154 = load i32, ptr %14, align 4, !tbaa !13
  %155 = icmp slt i32 %154, 2
  br i1 %155, label %156, label %164

156:                                              ; preds = %153
  %157 = load ptr, ptr %11, align 8, !tbaa !5
  %158 = icmp eq ptr %157, null
  br i1 %158, label %163, label %159

159:                                              ; preds = %156
  %160 = load ptr, ptr %157, align 8, !tbaa !34
  %161 = getelementptr inbounds ptr, ptr %160, i64 1
  %162 = load ptr, ptr %161, align 8
  call void %162(ptr noundef nonnull align 8 dereferenceable(80) %157) #7
  br label %163

163:                                              ; preds = %159, %156
  store i32 1, ptr %10, align 4
  br label %242

164:                                              ; preds = %153, %150
  %165 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %20, i32 0, i32 13
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN10ClipperLib8PolyNode8AddChildERS0_(ptr noundef nonnull align 8 dereferenceable(80) %165, ptr noundef nonnull align 8 dereferenceable(80) %166)
  %167 = load i32, ptr %8, align 4, !tbaa !11
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %170

169:                                              ; preds = %164
  store i32 1, ptr %10, align 4
  br label %242

170:                                              ; preds = %164
  %171 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %20, i32 0, i32 12
  %172 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %171, i32 0, i32 0
  %173 = load i64, ptr %172, align 8, !tbaa !36
  %174 = icmp slt i64 %173, 0
  br i1 %174, label %175, label %183

175:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  %176 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %20, i32 0, i32 13
  %177 = call noundef i32 @_ZNK10ClipperLib8PolyNode10ChildCountEv(ptr noundef nonnull align 8 dereferenceable(80) %176)
  %178 = sub nsw i32 %177, 1
  %179 = sext i32 %178 to i64
  %180 = load i32, ptr %15, align 4, !tbaa !13
  %181 = sext i32 %180 to i64
  call void @_ZN10ClipperLib8IntPointC2Exx(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %179, i64 noundef %181)
  %182 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %20, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %182, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  br label %241

183:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  %184 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %20, i32 0, i32 13
  %185 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %184, i32 0, i32 2
  %186 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %20, i32 0, i32 12
  %187 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %186, i32 0, i32 0
  %188 = load i64, ptr %187, align 8, !tbaa !36
  %189 = trunc i64 %188 to i32
  %190 = sext i32 %189 to i64
  %191 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN10ClipperLib8PolyNodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %185, i64 noundef %190) #7
  %192 = load ptr, ptr %191, align 8, !tbaa !5
  %193 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %192, i32 0, i32 1
  %194 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %20, i32 0, i32 12
  %195 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %194, i32 0, i32 1
  %196 = load i64, ptr %195, align 8, !tbaa !49
  %197 = trunc i64 %196 to i32
  %198 = sext i32 %197 to i64
  %199 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %193, i64 noundef %198) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %199, i64 16, i1 false), !tbaa.struct !47
  %200 = load ptr, ptr %11, align 8, !tbaa !5
  %201 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %200, i32 0, i32 1
  %202 = load i32, ptr %15, align 4, !tbaa !13
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %201, i64 noundef %203) #7
  %205 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %204, i32 0, i32 1
  %206 = load i64, ptr %205, align 8, !tbaa !29
  %207 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %18, i32 0, i32 1
  %208 = load i64, ptr %207, align 8, !tbaa !29
  %209 = icmp sgt i64 %206, %208
  br i1 %209, label %232, label %210

210:                                              ; preds = %183
  %211 = load ptr, ptr %11, align 8, !tbaa !5
  %212 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %211, i32 0, i32 1
  %213 = load i32, ptr %15, align 4, !tbaa !13
  %214 = sext i32 %213 to i64
  %215 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %212, i64 noundef %214) #7
  %216 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %215, i32 0, i32 1
  %217 = load i64, ptr %216, align 8, !tbaa !29
  %218 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %18, i32 0, i32 1
  %219 = load i64, ptr %218, align 8, !tbaa !29
  %220 = icmp eq i64 %217, %219
  br i1 %220, label %221, label %240

221:                                              ; preds = %210
  %222 = load ptr, ptr %11, align 8, !tbaa !5
  %223 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %222, i32 0, i32 1
  %224 = load i32, ptr %15, align 4, !tbaa !13
  %225 = sext i32 %224 to i64
  %226 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %223, i64 noundef %225) #7
  %227 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %226, i32 0, i32 0
  %228 = load i64, ptr %227, align 8, !tbaa !32
  %229 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %18, i32 0, i32 0
  %230 = load i64, ptr %229, align 8, !tbaa !32
  %231 = icmp slt i64 %228, %230
  br i1 %231, label %232, label %240

232:                                              ; preds = %221, %183
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  %233 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %20, i32 0, i32 13
  %234 = call noundef i32 @_ZNK10ClipperLib8PolyNode10ChildCountEv(ptr noundef nonnull align 8 dereferenceable(80) %233)
  %235 = sub nsw i32 %234, 1
  %236 = sext i32 %235 to i64
  %237 = load i32, ptr %15, align 4, !tbaa !13
  %238 = sext i32 %237 to i64
  call void @_ZN10ClipperLib8IntPointC2Exx(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %236, i64 noundef %238)
  %239 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %20, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %239, ptr align 8 %19, i64 16, i1 false), !tbaa.struct !47
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  br label %240

240:                                              ; preds = %232, %221, %210
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  br label %241

241:                                              ; preds = %240, %175
  store i32 0, ptr %10, align 4
  br label %242

242:                                              ; preds = %241, %169, %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %243

243:                                              ; preds = %242, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  %244 = load i32, ptr %10, align 4
  switch i32 %244, label %251 [
    i32 0, label %245
    i32 1, label %245
  ]

245:                                              ; preds = %243, %243
  ret void

246:                                              ; preds = %59
  %247 = load ptr, ptr %12, align 8
  %248 = load i32, ptr %13, align 4
  %249 = insertvalue { ptr, i32 } poison, ptr %247, 0
  %250 = insertvalue { ptr, i32 } %249, i32 %248, 1
  resume { ptr, i32 } %250

251:                                              ; preds = %243
  unreachable
}

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

declare void @_ZN10ClipperLib8PolyNodeC1Ev(ptr)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="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 nounwind willreturn memory(argmem: readwrite) }
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 = { nobuiltin 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 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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 = !{!"_ZTSN10ClipperLib8JoinTypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN10ClipperLib7EndTypeE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !10, i64 72}
!16 = !{!"_ZTSN10ClipperLib8PolyNodeE", !17, i64 8, !21, i64 32, !6, i64 56, !14, i64 64, !25, i64 68, !10, i64 72, !12, i64 76}
!17 = !{!"_ZTSSt6vectorIN10ClipperLib8IntPointESaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIN10ClipperLib8IntPointESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib8IntPointESaIS1_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib8IntPointESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorIPN10ClipperLib8PolyNodeESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib8PolyNodeESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib8PolyNodeESaIS2_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib8PolyNodeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"bool", !7, i64 0}
!26 = !{!16, !12, i64 76}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!30, !31, i64 8}
!30 = !{!"_ZTSN10ClipperLib8IntPointE", !31, i64 0, !31, i64 8}
!31 = !{!"long long", !7, i64 0}
!32 = !{!30, !31, i64 0}
!33 = distinct !{!33, !28}
!34 = !{!35, !35, i64 0}
!35 = !{!"vtable pointer", !8, i64 0}
!36 = !{!37, !31, i64 160}
!37 = !{!"_ZTSN10ClipperLib13ClipperOffsetE", !38, i64 0, !38, i64 8, !39, i64 16, !17, i64 40, !17, i64 64, !43, i64 88, !38, i64 112, !38, i64 120, !38, i64 128, !38, i64 136, !38, i64 144, !38, i64 152, !30, i64 160, !16, i64 176}
!38 = !{!"double", !7, i64 0}
!39 = !{!"_ZTSSt6vectorIS_IN10ClipperLib8IntPointESaIS1_EESaIS3_EE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseISt6vectorIN10ClipperLib8IntPointESaIS2_EESaIS4_EE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN10ClipperLib8IntPointESaIS2_EESaIS4_EE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN10ClipperLib8IntPointESaIS2_EESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!43 = !{!"_ZTSSt6vectorIN10ClipperLib11DoublePointESaIS1_EE", !44, i64 0}
!44 = !{!"_ZTSSt12_Vector_baseIN10ClipperLib11DoublePointESaIS1_EE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib11DoublePointESaIS1_EE12_Vector_implE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib11DoublePointESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!47 = !{i64 0, i64 8, !48, i64 8, i64 8, !48}
!48 = !{!31, !31, i64 0}
!49 = !{!37, !31, i64 168}


; 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.ClipperLib::IntPoint" = type { i64, i64 }

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN10ClipperLib8PolyNodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK10ClipperLib8PolyNode10ChildCountEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #6

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ClipperLib13ClipperOffset7AddPathERKSt6vectorINS_8IntPointESaIS2_EENS_8JoinTypeENS_7EndTypeE(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.ClipperLib::IntPoint", align 8
  %6 = alloca %"struct.ClipperLib::IntPoint", align 8
  %7 = tail call noundef i64 @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %8 = trunc i64 %7 to i32
  %9 = add i32 %8, -1
  %10 = icmp slt i32 %8, 1
  br i1 %10, label %104, label %11

11:                                               ; preds = %4
  %12 = tail call noalias noundef nonnull dereferenceable(80) ptr @_Znwm(i64 noundef 80) #8
  invoke void @_ZN10ClipperLib8PolyNodeC1Ev(ptr noundef nonnull align 8 dereferenceable(80) %12)
          to label %13 unwind label %23

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %12, i64 72
  store i32 %2, ptr %14, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %12, i64 76
  store i32 %3, ptr %15, align 4, !tbaa !22
  %16 = icmp eq i32 %3, 0
  %or.cond = icmp ult i32 %3, 2
  %17 = icmp ne i32 %8, 1
  %or.cond5 = and i1 %or.cond, %17
  br i1 %or.cond5, label %.preheader.preheader, label %.critedge

.preheader.preheader:                             ; preds = %13
  %18 = zext nneg i32 %9 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %22
  %indvars.iv = phi i64 [ %18, %.preheader.preheader ], [ %indvars.iv.next, %22 ]
  %19 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #7
  %20 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #7
  %21 = tail call noundef zeroext i1 @_ZN10ClipperLibeqERKNS_8IntPointES2_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %20)
  br i1 %21, label %22, label %.critedge.loopexit.split.loop.exit83

22:                                               ; preds = %.preheader
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %.old4 = icmp sgt i64 %indvars.iv, 1
  br i1 %.old4, label %.preheader, label %.critedge

23:                                               ; preds = %11
  %24 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %12, i64 noundef 80) #9
  resume { ptr, i32 } %24

.critedge.loopexit.split.loop.exit83:             ; preds = %.preheader
  %25 = trunc nuw nsw i64 %indvars.iv to i32
  br label %.critedge

.critedge:                                        ; preds = %22, %.critedge.loopexit.split.loop.exit83, %13
  %.1 = phi i32 [ %9, %13 ], [ %25, %.critedge.loopexit.split.loop.exit83 ], [ 0, %22 ]
  %26 = getelementptr inbounds i8, ptr %12, i64 8
  %27 = add i32 %.1, 1
  %28 = zext i32 %27 to i64
  tail call void @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %28)
  %29 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #7
  tail call void @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(16) %29)
  %.not74 = icmp slt i32 %.1, 1
  br i1 %.not74, label %._crit_edge, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %62
  %30 = icmp slt i32 %.167, 2
  %31 = sext i32 %.165 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.critedge
  %.066.lcssa = phi i1 [ true, %.critedge ], [ %30, %._crit_edge.loopexit ]
  %.064.lcssa = phi i64 [ 0, %.critedge ], [ %31, %._crit_edge.loopexit ]
  %or.cond3 = select i1 %16, i1 %.066.lcssa, i1 false
  br i1 %or.cond3, label %63, label %67

.lr.ph:                                           ; preds = %.critedge, %62
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %62 ], [ 1, %.critedge ]
  %.06476 = phi i32 [ %.165, %62 ], [ 0, %.critedge ]
  %.06675 = phi i32 [ %.167, %62 ], [ 0, %.critedge ]
  %32 = sext i32 %.06675 to i64
  %33 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %32) #7
  %34 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv80) #7
  %35 = tail call noundef zeroext i1 @_ZN10ClipperLibneERKNS_8IntPointES2_(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(16) %34)
  br i1 %35, label %36, label %62

36:                                               ; preds = %.lr.ph
  %37 = add nsw i32 %.06675, 1
  %38 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv80) #7
  tail call void @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(16) %38)
  %39 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv80) #7
  %40 = getelementptr inbounds i8, ptr %39, i64 8
  %41 = load i64, ptr %40, align 8, !tbaa !23
  %42 = sext i32 %.06476 to i64
  %43 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %42) #7
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  %45 = load i64, ptr %44, align 8, !tbaa !23
  %46 = icmp sgt i64 %41, %45
  br i1 %46, label %61, label %47

47:                                               ; preds = %36
  %48 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv80) #7
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  %50 = load i64, ptr %49, align 8, !tbaa !23
  %51 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %42) #7
  %52 = getelementptr inbounds i8, ptr %51, i64 8
  %53 = load i64, ptr %52, align 8, !tbaa !23
  %54 = icmp eq i64 %50, %53
  br i1 %54, label %55, label %62

55:                                               ; preds = %47
  %56 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv80) #7
  %57 = load i64, ptr %56, align 8, !tbaa !26
  %58 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %42) #7
  %59 = load i64, ptr %58, align 8, !tbaa !26
  %60 = icmp slt i64 %57, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %55, %36
  br label %62

62:                                               ; preds = %.lr.ph, %61, %55, %47
  %.167 = phi i32 [ %37, %61 ], [ %37, %55 ], [ %37, %47 ], [ %.06675, %.lr.ph ]
  %.165 = phi i32 [ %37, %61 ], [ %.06476, %55 ], [ %.06476, %47 ], [ %.06476, %.lr.ph ]
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next81, %28
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !27

63:                                               ; preds = %._crit_edge
  %64 = load ptr, ptr %12, align 8, !tbaa !29
  %65 = getelementptr inbounds i8, ptr %64, i64 8
  %66 = load ptr, ptr %65, align 8
  tail call void %66(ptr noundef nonnull align 8 dereferenceable(80) %12) #7
  br label %104

67:                                               ; preds = %._crit_edge
  %68 = getelementptr inbounds i8, ptr %0, i64 176
  tail call void @_ZN10ClipperLib8PolyNode8AddChildERS0_(ptr noundef nonnull align 8 dereferenceable(80) %68, ptr noundef nonnull align 8 dereferenceable(80) %12)
  br i1 %16, label %69, label %104

69:                                               ; preds = %67
  %70 = getelementptr inbounds i8, ptr %0, i64 160
  %71 = load i64, ptr %70, align 8, !tbaa !31
  %72 = icmp slt i64 %71, 0
  br i1 %72, label %73, label %77

73:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  %74 = tail call noundef i32 @_ZNK10ClipperLib8PolyNode10ChildCountEv(ptr noundef nonnull align 8 dereferenceable(80) %68)
  %75 = add nsw i32 %74, -1
  %76 = sext i32 %75 to i64
  call void @_ZN10ClipperLib8IntPointC2Exx(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %76, i64 noundef %.064.lcssa)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %70, ptr noundef nonnull align 8 dereferenceable(16) %5, i64 16, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  br label %104

77:                                               ; preds = %69
  %78 = getelementptr inbounds i8, ptr %0, i64 208
  %sext = shl i64 %71, 32
  %79 = ashr exact i64 %sext, 32
  %80 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN10ClipperLib8PolyNodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %78, i64 noundef %79) #7
  %81 = load ptr, ptr %80, align 8, !tbaa !44
  %82 = getelementptr inbounds i8, ptr %81, i64 8
  %83 = getelementptr inbounds i8, ptr %0, i64 168
  %84 = load i64, ptr %83, align 8, !tbaa !45
  %sext73 = shl i64 %84, 32
  %85 = ashr exact i64 %sext73, 32
  %86 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %85) #7
  %.sroa.0.0.copyload = load i64, ptr %86, align 8, !tbaa !43
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %86, i64 8
  %.sroa.4.0.copyload = load i64, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !43
  %87 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %.064.lcssa) #7
  %88 = getelementptr inbounds i8, ptr %87, i64 8
  %89 = load i64, ptr %88, align 8, !tbaa !23
  %90 = icmp sgt i64 %89, %.sroa.4.0.copyload
  br i1 %90, label %100, label %91

91:                                               ; preds = %77
  %92 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %.064.lcssa) #7
  %93 = getelementptr inbounds i8, ptr %92, i64 8
  %94 = load i64, ptr %93, align 8, !tbaa !23
  %95 = icmp eq i64 %94, %.sroa.4.0.copyload
  br i1 %95, label %96, label %104

96:                                               ; preds = %91
  %97 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %.064.lcssa) #7
  %98 = load i64, ptr %97, align 8, !tbaa !26
  %99 = icmp slt i64 %98, %.sroa.0.0.copyload
  br i1 %99, label %100, label %104

100:                                              ; preds = %96, %77
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %101 = tail call noundef i32 @_ZNK10ClipperLib8PolyNode10ChildCountEv(ptr noundef nonnull align 8 dereferenceable(80) %68)
  %102 = add nsw i32 %101, -1
  %103 = sext i32 %102 to i64
  call void @_ZN10ClipperLib8IntPointC2Exx(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %103, i64 noundef %.064.lcssa)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %70, ptr noundef nonnull align 8 dereferenceable(16) %6, i64 16, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %104

104:                                              ; preds = %63, %67, %91, %96, %100, %73, %4
  ret void
}

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

declare void @_ZN10ClipperLib8PolyNodeC1Ev(ptr) local_unnamed_addr

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="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 nounwind willreturn memory(argmem: readwrite) }
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 = { nobuiltin 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 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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, !20, i64 72}
!6 = !{!"_ZTSN10ClipperLib8PolyNodeE", !7, i64 8, !14, i64 32, !11, i64 56, !18, i64 64, !19, i64 68, !20, i64 72, !21, i64 76}
!7 = !{!"_ZTSSt6vectorIN10ClipperLib8IntPointESaIS1_EE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseIN10ClipperLib8IntPointESaIS1_EE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib8IntPointESaIS1_EE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib8IntPointESaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSSt6vectorIPN10ClipperLib8PolyNodeESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib8PolyNodeESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib8PolyNodeESaIS2_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib8PolyNodeESaIS2_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!18 = !{!"int", !12, i64 0}
!19 = !{!"bool", !12, i64 0}
!20 = !{!"_ZTSN10ClipperLib8JoinTypeE", !12, i64 0}
!21 = !{!"_ZTSN10ClipperLib7EndTypeE", !12, i64 0}
!22 = !{!6, !21, i64 76}
!23 = !{!24, !25, i64 8}
!24 = !{!"_ZTSN10ClipperLib8IntPointE", !25, i64 0, !25, i64 8}
!25 = !{!"long long", !12, i64 0}
!26 = !{!24, !25, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!30, !30, i64 0}
!30 = !{!"vtable pointer", !13, i64 0}
!31 = !{!32, !25, i64 160}
!32 = !{!"_ZTSN10ClipperLib13ClipperOffsetE", !33, i64 0, !33, i64 8, !34, i64 16, !7, i64 40, !7, i64 64, !38, i64 88, !33, i64 112, !33, i64 120, !33, i64 128, !33, i64 136, !33, i64 144, !33, i64 152, !24, i64 160, !6, i64 176}
!33 = !{!"double", !12, i64 0}
!34 = !{!"_ZTSSt6vectorIS_IN10ClipperLib8IntPointESaIS1_EESaIS3_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseISt6vectorIN10ClipperLib8IntPointESaIS2_EESaIS4_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN10ClipperLib8IntPointESaIS2_EESaIS4_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN10ClipperLib8IntPointESaIS2_EESaIS4_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!38 = !{!"_ZTSSt6vectorIN10ClipperLib11DoublePointESaIS1_EE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseIN10ClipperLib11DoublePointESaIS1_EE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib11DoublePointESaIS1_EE12_Vector_implE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib11DoublePointESaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!42 = !{i64 0, i64 8, !43, i64 8, i64 8, !43}
!43 = !{!25, !25, i64 0}
!44 = !{!11, !11, i64 0}
!45 = !{!32, !25, i64 168}


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