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

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

%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<long long, std::allocator<long long>>::_List_impl" }
%"struct.std::__cxx11::_List_base<long long, std::allocator<long long>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.ClipperLib::Clipper" = type <{ ptr, %"class.std::vector.33", %"class.std::vector.33", %"class.std::vector.38", i32, [4 x i8], %"class.std::__cxx11::list", ptr, i8, [3 x i8], i32, i32, i8, i8, i8, i8, %"class.ClipperLib::ClipperBase" }>
%"class.std::vector.33" = type { %"struct.std::_Vector_base.34" }
%"struct.std::_Vector_base.34" = type { %"struct.std::_Vector_base<ClipperLib::Join *, std::allocator<ClipperLib::Join *>>::_Vector_impl" }
%"struct.std::_Vector_base<ClipperLib::Join *, std::allocator<ClipperLib::Join *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClipperLib::Join *, std::allocator<ClipperLib::Join *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClipperLib::Join *, std::allocator<ClipperLib::Join *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.38" = type { %"struct.std::_Vector_base.39" }
%"struct.std::_Vector_base.39" = type { %"struct.std::_Vector_base<ClipperLib::IntersectNode *, std::allocator<ClipperLib::IntersectNode *>>::_Vector_impl" }
%"struct.std::_Vector_base<ClipperLib::IntersectNode *, std::allocator<ClipperLib::IntersectNode *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClipperLib::IntersectNode *, std::allocator<ClipperLib::IntersectNode *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClipperLib::IntersectNode *, std::allocator<ClipperLib::IntersectNode *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ClipperLib::ClipperBase" = type { ptr, %"class.__gnu_cxx::__normal_iterator", %"class.std::vector.5", i8, %"class.std::vector.10", i8, i8, %"class.std::vector.15", ptr, %"class.std::priority_queue" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<ClipperLib::LocalMinimum, std::allocator<ClipperLib::LocalMinimum>>::_Vector_impl" }
%"struct.std::_Vector_base<ClipperLib::LocalMinimum, std::allocator<ClipperLib::LocalMinimum>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClipperLib::LocalMinimum, std::allocator<ClipperLib::LocalMinimum>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClipperLib::LocalMinimum, std::allocator<ClipperLib::LocalMinimum>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<ClipperLib::TEdge *, std::allocator<ClipperLib::TEdge *>>::_Vector_impl" }
%"struct.std::_Vector_base<ClipperLib::TEdge *, std::allocator<ClipperLib::TEdge *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClipperLib::TEdge *, std::allocator<ClipperLib::TEdge *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClipperLib::TEdge *, std::allocator<ClipperLib::TEdge *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<ClipperLib::OutRec *, std::allocator<ClipperLib::OutRec *>>::_Vector_impl" }
%"struct.std::_Vector_base<ClipperLib::OutRec *, std::allocator<ClipperLib::OutRec *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClipperLib::OutRec *, std::allocator<ClipperLib::OutRec *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClipperLib::OutRec *, std::allocator<ClipperLib::OutRec *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::priority_queue" = type <{ %"class.std::vector.20", [8 x i8] }>
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ClipperLib::OutRec" = type { i32, i8, i8, ptr, 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: 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 double @_ZN10ClipperLib4AreaERKNS_6OutRecE(ptr noundef nonnull align 8 dereferenceable(40)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10ClipperLib18ReversePolyPtLinksEPNS_5OutPtE(ptr noundef) #1

declare i32 @__gxx_personality_v0(...)

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10ClipperLib11ClipperBase11PopScanbeamERx(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN10ClipperLib11ClipperBase18LocalMinimaPendingEv(ptr noundef nonnull align 8 dereferenceable(144)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10ClipperLib7Clipper15ExecuteInternalEv(ptr noundef nonnull align 8 dereferenceable(135) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::list", align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #4
  store i8 1, ptr %4, align 1, !tbaa !9
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr %15, i64 %18
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = getelementptr inbounds ptr, ptr %20, i64 4
  %22 = load ptr, ptr %21, align 8
  invoke void %22(ptr noundef nonnull align 8 dereferenceable(144) %19)
          to label %23 unwind label %34

23:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #4
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 24, i1 false)
  call void @_ZNSt7__cxx114listIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  %24 = getelementptr inbounds %"class.ClipperLib::Clipper", ptr %15, i32 0, i32 6
  %25 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt7__cxx114listIxSaIxEEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @_ZNSt7__cxx1110_List_baseIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  %26 = getelementptr inbounds %"class.ClipperLib::Clipper", ptr %15, i32 0, i32 7
  store ptr null, ptr %26, align 8, !tbaa !13
  store i8 1, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %27 = load ptr, ptr %15, align 8, !tbaa !11
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr %15, i64 %29
  %31 = invoke noundef zeroext i1 @_ZN10ClipperLib11ClipperBase11PopScanbeamERx(ptr noundef nonnull align 8 dereferenceable(144) %30, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %32 unwind label %38

32:                                               ; preds = %23
  br i1 %31, label %59, label %33

33:                                               ; preds = %32
  store i1 false, ptr %2, align 1
  store i32 1, ptr %10, align 4
  br label %91

34:                                               ; preds = %1
  %35 = landingpad { ptr, i32 }
          catch ptr null
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %5, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %6, align 4
  br label %42

38:                                               ; preds = %86, %84, %79, %78, %77, %62, %59, %23
  %39 = landingpad { ptr, i32 }
          catch ptr null
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %5, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %42

42:                                               ; preds = %38, %34
  %43 = load ptr, ptr %5, align 8
  %44 = call ptr @__cxa_begin_catch(ptr %43) #4
  store i8 0, ptr %4, align 1, !tbaa !9
  call void @__cxa_end_catch()
  br label %45

45:                                               ; preds = %93, %42
  %46 = load i8, ptr %4, align 1, !tbaa !9, !range !31, !noundef !32
  %47 = trunc i8 %46 to i1
  br i1 %47, label %48, label %191

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

49:                                               ; preds = %137, %48
  %50 = load i64, ptr %11, align 8, !tbaa !33
  %51 = load ptr, ptr %15, align 8, !tbaa !11
  %52 = getelementptr i8, ptr %51, i64 -24
  %53 = load i64, ptr %52, align 8
  %54 = getelementptr inbounds i8, ptr %15, i64 %53
  %55 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %54, i32 0, i32 7
  %56 = call noundef i64 @_ZNKSt6vectorIPN10ClipperLib6OutRecESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %55) #4
  %57 = icmp ult i64 %50, %56
  br i1 %57, label %94, label %58

58:                                               ; preds = %49
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %140

59:                                               ; preds = %32
  %60 = load i64, ptr %8, align 8, !tbaa !34
  invoke void @_ZN10ClipperLib7Clipper24InsertLocalMinimaIntoAELEx(ptr noundef nonnull align 8 dereferenceable(135) %15, i64 noundef %60)
          to label %61 unwind label %38

61:                                               ; preds = %59
  br label %62

62:                                               ; preds = %89, %61
  %63 = load ptr, ptr %15, align 8, !tbaa !11
  %64 = getelementptr i8, ptr %63, i64 -24
  %65 = load i64, ptr %64, align 8
  %66 = getelementptr inbounds i8, ptr %15, i64 %65
  %67 = invoke noundef zeroext i1 @_ZN10ClipperLib11ClipperBase11PopScanbeamERx(ptr noundef nonnull align 8 dereferenceable(144) %66, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %68 unwind label %38

68:                                               ; preds = %62
  br i1 %67, label %75, label %69

69:                                               ; preds = %68
  %70 = load ptr, ptr %15, align 8, !tbaa !11
  %71 = getelementptr i8, ptr %70, i64 -24
  %72 = load i64, ptr %71, align 8
  %73 = getelementptr inbounds i8, ptr %15, i64 %72
  %74 = call noundef zeroext i1 @_ZN10ClipperLib11ClipperBase18LocalMinimaPendingEv(ptr noundef nonnull align 8 dereferenceable(144) %73)
  br label %75

75:                                               ; preds = %69, %68
  %76 = phi i1 [ true, %68 ], [ %74, %69 ]
  br i1 %76, label %77, label %90

77:                                               ; preds = %75
  invoke void @_ZN10ClipperLib7Clipper18ProcessHorizontalsEv(ptr noundef nonnull align 8 dereferenceable(135) %15)
          to label %78 unwind label %38

78:                                               ; preds = %77
  invoke void @_ZN10ClipperLib7Clipper15ClearGhostJoinsEv(ptr noundef nonnull align 8 dereferenceable(135) %15)
          to label %79 unwind label %38

79:                                               ; preds = %78
  %80 = load i64, ptr %9, align 8, !tbaa !34
  %81 = invoke noundef zeroext i1 @_ZN10ClipperLib7Clipper20ProcessIntersectionsEx(ptr noundef nonnull align 8 dereferenceable(135) %15, i64 noundef %80)
          to label %82 unwind label %38

82:                                               ; preds = %79
  br i1 %81, label %84, label %83

83:                                               ; preds = %82
  store i8 0, ptr %4, align 1, !tbaa !9
  br label %90

84:                                               ; preds = %82
  %85 = load i64, ptr %9, align 8, !tbaa !34
  invoke void @_ZN10ClipperLib7Clipper27ProcessEdgesAtTopOfScanbeamEx(ptr noundef nonnull align 8 dereferenceable(135) %15, i64 noundef %85)
          to label %86 unwind label %38

86:                                               ; preds = %84
  %87 = load i64, ptr %9, align 8, !tbaa !34
  store i64 %87, ptr %8, align 8, !tbaa !34
  %88 = load i64, ptr %8, align 8, !tbaa !34
  invoke void @_ZN10ClipperLib7Clipper24InsertLocalMinimaIntoAELEx(ptr noundef nonnull align 8 dereferenceable(135) %15, i64 noundef %88)
          to label %89 unwind label %38

89:                                               ; preds = %86
  br label %62, !llvm.loop !36

90:                                               ; preds = %83, %75
  store i32 0, ptr %10, align 4
  br label %91

91:                                               ; preds = %90, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %92 = load i32, ptr %10, align 4
  switch i32 %92, label %194 [
    i32 0, label %93
  ]

93:                                               ; preds = %91
  br label %45

94:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %95 = load ptr, ptr %15, align 8, !tbaa !11
  %96 = getelementptr i8, ptr %95, i64 -24
  %97 = load i64, ptr %96, align 8
  %98 = getelementptr inbounds i8, ptr %15, i64 %97
  %99 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %98, i32 0, i32 7
  %100 = load i64, ptr %11, align 8, !tbaa !33
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN10ClipperLib6OutRecESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %100) #4
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  store ptr %102, ptr %12, align 8, !tbaa !5
  %103 = load ptr, ptr %12, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.ClipperLib::OutRec", ptr %103, i32 0, i32 5
  %105 = load ptr, ptr %104, align 8, !tbaa !38
  %106 = icmp ne ptr %105, null
  br i1 %106, label %107, label %112

107:                                              ; preds = %94
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.ClipperLib::OutRec", ptr %108, i32 0, i32 2
  %110 = load i8, ptr %109, align 1, !tbaa !41, !range !31, !noundef !32
  %111 = trunc i8 %110 to i1
  br i1 %111, label %112, label %113

112:                                              ; preds = %107, %94
  store i32 6, ptr %10, align 4
  br label %134

113:                                              ; preds = %107
  %114 = load ptr, ptr %12, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.ClipperLib::OutRec", ptr %114, i32 0, i32 1
  %116 = load i8, ptr %115, align 4, !tbaa !42, !range !31, !noundef !32
  %117 = trunc i8 %116 to i1
  %118 = zext i1 %117 to i32
  %119 = getelementptr inbounds %"class.ClipperLib::Clipper", ptr %15, i32 0, i32 12
  %120 = load i8, ptr %119, align 4, !tbaa !43, !range !31, !noundef !32
  %121 = trunc i8 %120 to i1
  %122 = zext i1 %121 to i32
  %123 = xor i32 %118, %122
  %124 = load ptr, ptr %12, align 8, !tbaa !5
  %125 = call noundef double @_ZN10ClipperLib4AreaERKNS_6OutRecE(ptr noundef nonnull align 8 dereferenceable(40) %124)
  %126 = fcmp ogt double %125, 0.000000e+00
  %127 = zext i1 %126 to i32
  %128 = icmp eq i32 %123, %127
  br i1 %128, label %129, label %133

129:                                              ; preds = %113
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.ClipperLib::OutRec", ptr %130, i32 0, i32 5
  %132 = load ptr, ptr %131, align 8, !tbaa !38
  call void @_ZN10ClipperLib18ReversePolyPtLinksEPNS_5OutPtE(ptr noundef %132)
  br label %133

133:                                              ; preds = %129, %113
  store i32 0, ptr %10, align 4
  br label %134

134:                                              ; preds = %133, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %135 = load i32, ptr %10, align 4
  switch i32 %135, label %196 [
    i32 0, label %136
    i32 6, label %137
  ]

136:                                              ; preds = %134
  br label %137

137:                                              ; preds = %136, %134
  %138 = load i64, ptr %11, align 8, !tbaa !33
  %139 = add i64 %138, 1
  store i64 %139, ptr %11, align 8, !tbaa !33
  br label %49, !llvm.loop !44

140:                                              ; preds = %58
  %141 = getelementptr inbounds %"class.ClipperLib::Clipper", ptr %15, i32 0, i32 1
  %142 = call noundef zeroext i1 @_ZNKSt6vectorIPN10ClipperLib4JoinESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %141) #4
  br i1 %142, label %144, label %143

143:                                              ; preds = %140
  call void @_ZN10ClipperLib7Clipper15JoinCommonEdgesEv(ptr noundef nonnull align 8 dereferenceable(135) %15)
  br label %144

144:                                              ; preds = %143, %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !33
  br label %145

145:                                              ; preds = %182, %144
  %146 = load i64, ptr %13, align 8, !tbaa !33
  %147 = load ptr, ptr %15, align 8, !tbaa !11
  %148 = getelementptr i8, ptr %147, i64 -24
  %149 = load i64, ptr %148, align 8
  %150 = getelementptr inbounds i8, ptr %15, i64 %149
  %151 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %150, i32 0, i32 7
  %152 = call noundef i64 @_ZNKSt6vectorIPN10ClipperLib6OutRecESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %151) #4
  %153 = icmp ult i64 %146, %152
  br i1 %153, label %155, label %154

154:                                              ; preds = %145
  store i32 7, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %185

155:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %156 = load ptr, ptr %15, align 8, !tbaa !11
  %157 = getelementptr i8, ptr %156, i64 -24
  %158 = load i64, ptr %157, align 8
  %159 = getelementptr inbounds i8, ptr %15, i64 %158
  %160 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %159, i32 0, i32 7
  %161 = load i64, ptr %13, align 8, !tbaa !33
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN10ClipperLib6OutRecESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %160, i64 noundef %161) #4
  %163 = load ptr, ptr %162, align 8, !tbaa !5
  store ptr %163, ptr %14, align 8, !tbaa !5
  %164 = load ptr, ptr %14, align 8, !tbaa !5
  %165 = getelementptr inbounds %"struct.ClipperLib::OutRec", ptr %164, i32 0, i32 5
  %166 = load ptr, ptr %165, align 8, !tbaa !38
  %167 = icmp ne ptr %166, null
  br i1 %167, label %169, label %168

168:                                              ; preds = %155
  store i32 9, ptr %10, align 4
  br label %179

169:                                              ; preds = %155
  %170 = load ptr, ptr %14, align 8, !tbaa !5
  %171 = getelementptr inbounds %"struct.ClipperLib::OutRec", ptr %170, i32 0, i32 2
  %172 = load i8, ptr %171, align 1, !tbaa !41, !range !31, !noundef !32
  %173 = trunc i8 %172 to i1
  br i1 %173, label %174, label %176

174:                                              ; preds = %169
  %175 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN10ClipperLib7Clipper16FixupOutPolylineERNS_6OutRecE(ptr noundef nonnull align 8 dereferenceable(135) %15, ptr noundef nonnull align 8 dereferenceable(40) %175)
  br label %178

176:                                              ; preds = %169
  %177 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN10ClipperLib7Clipper15FixupOutPolygonERNS_6OutRecE(ptr noundef nonnull align 8 dereferenceable(135) %15, ptr noundef nonnull align 8 dereferenceable(40) %177)
  br label %178

178:                                              ; preds = %176, %174
  store i32 0, ptr %10, align 4
  br label %179

179:                                              ; preds = %178, %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %180 = load i32, ptr %10, align 4
  switch i32 %180, label %196 [
    i32 0, label %181
    i32 9, label %182
  ]

181:                                              ; preds = %179
  br label %182

182:                                              ; preds = %181, %179
  %183 = load i64, ptr %13, align 8, !tbaa !33
  %184 = add i64 %183, 1
  store i64 %184, ptr %13, align 8, !tbaa !33
  br label %145, !llvm.loop !45

185:                                              ; preds = %154
  %186 = getelementptr inbounds %"class.ClipperLib::Clipper", ptr %15, i32 0, i32 14
  %187 = load i8, ptr %186, align 2, !tbaa !46, !range !31, !noundef !32
  %188 = trunc i8 %187 to i1
  br i1 %188, label %189, label %190

189:                                              ; preds = %185
  call void @_ZN10ClipperLib7Clipper16DoSimplePolygonsEv(ptr noundef nonnull align 8 dereferenceable(135) %15)
  br label %190

190:                                              ; preds = %189, %185
  br label %191

191:                                              ; preds = %190, %45
  call void @_ZN10ClipperLib7Clipper10ClearJoinsEv(ptr noundef nonnull align 8 dereferenceable(135) %15)
  call void @_ZN10ClipperLib7Clipper15ClearGhostJoinsEv(ptr noundef nonnull align 8 dereferenceable(135) %15)
  %192 = load i8, ptr %4, align 1, !tbaa !9, !range !31, !noundef !32
  %193 = trunc i8 %192 to i1
  store i1 %193, ptr %2, align 1
  store i32 1, ptr %10, align 4
  br label %194

194:                                              ; preds = %191, %91
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  %195 = load i1, ptr %2, align 1
  ret i1 %195

196:                                              ; preds = %179, %134
  unreachable
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10ClipperLib7Clipper20ProcessIntersectionsEx(ptr noundef nonnull align 8 dereferenceable(135), i64 noundef) #2 align 2

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

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

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

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

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

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

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

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: write) }
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 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !6, i64 112}
!14 = !{!"_ZTSN10ClipperLib7ClipperE", !15, i64 8, !15, i64 32, !19, i64 56, !23, i64 80, !24, i64 88, !6, i64 112, !10, i64 120, !30, i64 124, !30, i64 128, !10, i64 132, !10, i64 133, !10, i64 134}
!15 = !{!"_ZTSSt6vectorIPN10ClipperLib4JoinESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIPN10ClipperLib13IntersectNodeESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSN10ClipperLib8ClipTypeE", !7, i64 0}
!24 = !{!"_ZTSNSt7__cxx114listIxSaIxEEE", !25, i64 0}
!25 = !{!"_ZTSNSt7__cxx1110_List_baseIxSaIxEEE", !26, i64 0}
!26 = !{!"_ZTSNSt7__cxx1110_List_baseIxSaIxEE10_List_implE", !27, i64 0}
!27 = !{!"_ZTSNSt8__detail17_List_node_headerE", !28, i64 0, !29, i64 16}
!28 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!29 = !{!"long", !7, i64 0}
!30 = !{!"_ZTSN10ClipperLib12PolyFillTypeE", !7, i64 0}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!29, !29, i64 0}
!34 = !{!35, !35, i64 0}
!35 = !{!"long long", !7, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!39, !6, i64 24}
!39 = !{!"_ZTSN10ClipperLib6OutRecE", !40, i64 0, !10, i64 4, !10, i64 5, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!40 = !{!"int", !7, i64 0}
!41 = !{!39, !10, i64 5}
!42 = !{!39, !10, i64 4}
!43 = !{!14, !10, i64 132}
!44 = distinct !{!44, !37}
!45 = distinct !{!45, !37}
!46 = !{!14, !10, i64 134}


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

%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<long long, std::allocator<long long>>::_List_impl" }
%"struct.std::__cxx11::_List_base<long long, std::allocator<long long>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN10ClipperLib4AreaERKNS_6OutRecE(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10ClipperLib18ReversePolyPtLinksEPNS_5OutPtE(ptr noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10ClipperLib11ClipperBase11PopScanbeamERx(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN10ClipperLib11ClipperBase18LocalMinimaPendingEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10ClipperLib7Clipper15ExecuteInternalEv(ptr noundef nonnull align 8 dereferenceable(135) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::list", align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = load ptr, ptr %0, align 8, !tbaa !5
  %6 = getelementptr i8, ptr %5, i64 -24
  %7 = load i64, ptr %6, align 8
  %8 = getelementptr inbounds i8, ptr %0, i64 %7
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 32
  %11 = load ptr, ptr %10, align 8
  invoke void %11(ptr noundef nonnull align 8 dereferenceable(144) %8)
          to label %12 unwind label %22

12:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 0, i64 24, i1 false)
  call void @_ZNSt7__cxx114listIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %13 = getelementptr inbounds i8, ptr %0, i64 88
  %14 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt7__cxx114listIxSaIxEEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @_ZNSt7__cxx1110_List_baseIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  %15 = getelementptr inbounds i8, ptr %0, i64 112
  store ptr null, ptr %15, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %16 = load ptr, ptr %0, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr %0, i64 %18
  %20 = invoke noundef zeroext i1 @_ZN10ClipperLib11ClipperBase11PopScanbeamERx(ptr noundef nonnull align 8 dereferenceable(144) %19, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %21 unwind label %.loopexit.split-lp

21:                                               ; preds = %12
  br i1 %20, label %34, label %.thread29

.thread29:                                        ; preds = %21
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %118

22:                                               ; preds = %1
  %23 = landingpad { ptr, i32 }
          catch ptr null
  br label %.thread

.loopexit:                                        ; preds = %.preheader31, %.critedge, %48, %49, %53, %55
  %lpad.loopexit = landingpad { ptr, i32 }
          catch ptr null
  br label %24

.loopexit.split-lp:                               ; preds = %12, %34
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          catch ptr null
  br label %24

24:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %.thread

.thread:                                          ; preds = %22, %24
  %.pn = phi { ptr, i32 } [ %lpad.phi, %24 ], [ %23, %22 ]
  %.025 = extractvalue { ptr, i32 } %.pn, 0
  %25 = call ptr @__cxa_begin_catch(ptr %.025) #4
  call void @__cxa_end_catch()
  br label %117

26:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %117

.preheader:                                       ; preds = %42
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %invariant.gep = getelementptr inbounds i8, ptr %0, i64 80
  %27 = load ptr, ptr %0, align 8, !tbaa !5
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %gep34 = getelementptr i8, ptr %invariant.gep, i64 %29
  %30 = call noundef i64 @_ZNKSt6vectorIPN10ClipperLib6OutRecESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %gep34) #4
  %.not45 = icmp eq i64 %30, 0
  br i1 %.not45, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %31 = getelementptr inbounds i8, ptr %0, i64 132
  br label %57

._crit_edge:                                      ; preds = %80, %.preheader
  %32 = getelementptr inbounds i8, ptr %0, i64 8
  %33 = call noundef zeroext i1 @_ZNKSt6vectorIPN10ClipperLib4JoinESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #4
  br i1 %33, label %88, label %87

34:                                               ; preds = %21
  %35 = load i64, ptr %3, align 8, !tbaa !29
  invoke void @_ZN10ClipperLib7Clipper24InsertLocalMinimaIntoAELEx(ptr noundef nonnull align 8 dereferenceable(135) %0, i64 noundef %35)
          to label %.preheader31 unwind label %.loopexit.split-lp

.preheader31:                                     ; preds = %34, %55
  %36 = load ptr, ptr %0, align 8, !tbaa !5
  %37 = getelementptr i8, ptr %36, i64 -24
  %38 = load i64, ptr %37, align 8
  %39 = getelementptr inbounds i8, ptr %0, i64 %38
  %40 = invoke noundef zeroext i1 @_ZN10ClipperLib11ClipperBase11PopScanbeamERx(ptr noundef nonnull align 8 dereferenceable(144) %39, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %41 unwind label %.loopexit

41:                                               ; preds = %.preheader31
  br i1 %40, label %.critedge, label %42

42:                                               ; preds = %41
  %43 = load ptr, ptr %0, align 8, !tbaa !5
  %44 = getelementptr i8, ptr %43, i64 -24
  %45 = load i64, ptr %44, align 8
  %46 = getelementptr inbounds i8, ptr %0, i64 %45
  %47 = call noundef zeroext i1 @_ZN10ClipperLib11ClipperBase18LocalMinimaPendingEv(ptr noundef nonnull align 8 dereferenceable(144) %46)
  br i1 %47, label %.critedge, label %.preheader

.critedge:                                        ; preds = %41, %42
  invoke void @_ZN10ClipperLib7Clipper18ProcessHorizontalsEv(ptr noundef nonnull align 8 dereferenceable(135) %0)
          to label %48 unwind label %.loopexit

48:                                               ; preds = %.critedge
  invoke void @_ZN10ClipperLib7Clipper15ClearGhostJoinsEv(ptr noundef nonnull align 8 dereferenceable(135) %0)
          to label %49 unwind label %.loopexit

49:                                               ; preds = %48
  %50 = load i64, ptr %4, align 8, !tbaa !29
  %51 = invoke noundef zeroext i1 @_ZN10ClipperLib7Clipper20ProcessIntersectionsEx(ptr noundef nonnull align 8 dereferenceable(135) %0, i64 noundef %50)
          to label %52 unwind label %.loopexit

52:                                               ; preds = %49
  br i1 %51, label %53, label %26

53:                                               ; preds = %52
  %54 = load i64, ptr %4, align 8, !tbaa !29
  invoke void @_ZN10ClipperLib7Clipper27ProcessEdgesAtTopOfScanbeamEx(ptr noundef nonnull align 8 dereferenceable(135) %0, i64 noundef %54)
          to label %55 unwind label %.loopexit

55:                                               ; preds = %53
  %56 = load i64, ptr %4, align 8, !tbaa !29
  store i64 %56, ptr %3, align 8, !tbaa !29
  invoke void @_ZN10ClipperLib7Clipper24InsertLocalMinimaIntoAELEx(ptr noundef nonnull align 8 dereferenceable(135) %0, i64 noundef %56)
          to label %.preheader31 unwind label %.loopexit, !llvm.loop !31

57:                                               ; preds = %.lr.ph, %80
  %.02335 = phi i64 [ 0, %.lr.ph ], [ %81, %80 ]
  %58 = load ptr, ptr %0, align 8, !tbaa !5
  %59 = getelementptr i8, ptr %58, i64 -24
  %60 = load i64, ptr %59, align 8
  %gep33 = getelementptr i8, ptr %invariant.gep, i64 %60
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN10ClipperLib6OutRecESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %gep33, i64 noundef %.02335) #4
  %62 = load ptr, ptr %61, align 8, !tbaa !33
  %63 = getelementptr inbounds i8, ptr %62, i64 24
  %64 = load ptr, ptr %63, align 8, !tbaa !34
  %.not26 = icmp eq ptr %64, null
  br i1 %.not26, label %80, label %65

65:                                               ; preds = %57
  %66 = getelementptr inbounds i8, ptr %62, i64 5
  %67 = load i8, ptr %66, align 1, !tbaa !37, !range !38, !noundef !39
  %68 = trunc nuw i8 %67 to i1
  br i1 %68, label %80, label %69

69:                                               ; preds = %65
  %70 = getelementptr inbounds i8, ptr %62, i64 4
  %71 = load i8, ptr %70, align 4, !tbaa !40, !range !38, !noundef !39
  %72 = load i8, ptr %31, align 4, !tbaa !41, !range !38, !noundef !39
  %73 = xor i8 %72, %71
  %74 = call noundef double @_ZN10ClipperLib4AreaERKNS_6OutRecE(ptr noundef nonnull align 8 dereferenceable(40) %62)
  %75 = fcmp ogt double %74, 0.000000e+00
  %76 = zext i1 %75 to i8
  %77 = icmp eq i8 %73, %76
  br i1 %77, label %78, label %80

78:                                               ; preds = %69
  %79 = load ptr, ptr %63, align 8, !tbaa !34
  call void @_ZN10ClipperLib18ReversePolyPtLinksEPNS_5OutPtE(ptr noundef %79)
  br label %80

80:                                               ; preds = %69, %78, %57, %65
  %81 = add nuw i64 %.02335, 1
  %82 = load ptr, ptr %0, align 8, !tbaa !5
  %83 = getelementptr i8, ptr %82, i64 -24
  %84 = load i64, ptr %83, align 8
  %gep = getelementptr i8, ptr %invariant.gep, i64 %84
  %85 = call noundef i64 @_ZNKSt6vectorIPN10ClipperLib6OutRecESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %gep) #4
  %86 = icmp ult i64 %81, %85
  br i1 %86, label %57, label %._crit_edge, !llvm.loop !42

87:                                               ; preds = %._crit_edge
  call void @_ZN10ClipperLib7Clipper15JoinCommonEdgesEv(ptr noundef nonnull align 8 dereferenceable(135) %0)
  br label %88

88:                                               ; preds = %87, %._crit_edge
  %89 = load ptr, ptr %0, align 8, !tbaa !5
  %90 = getelementptr i8, ptr %89, i64 -24
  %91 = load i64, ptr %90, align 8
  %gep3740 = getelementptr i8, ptr %invariant.gep, i64 %91
  %92 = call noundef i64 @_ZNKSt6vectorIPN10ClipperLib6OutRecESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %gep3740) #4
  %.not46 = icmp eq i64 %92, 0
  br i1 %.not46, label %._crit_edge44, label %.lr.ph43

._crit_edge44:                                    ; preds = %109, %88
  %93 = getelementptr inbounds i8, ptr %0, i64 134
  %94 = load i8, ptr %93, align 2, !tbaa !43, !range !38, !noundef !39
  %95 = trunc nuw i8 %94 to i1
  br i1 %95, label %116, label %117

.lr.ph43:                                         ; preds = %88, %109
  %.02041 = phi i64 [ %110, %109 ], [ 0, %88 ]
  %96 = load ptr, ptr %0, align 8, !tbaa !5
  %97 = getelementptr i8, ptr %96, i64 -24
  %98 = load i64, ptr %97, align 8
  %gep39 = getelementptr i8, ptr %invariant.gep, i64 %98
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN10ClipperLib6OutRecESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %gep39, i64 noundef %.02041) #4
  %100 = load ptr, ptr %99, align 8, !tbaa !33
  %101 = getelementptr inbounds i8, ptr %100, i64 24
  %102 = load ptr, ptr %101, align 8, !tbaa !34
  %.not = icmp eq ptr %102, null
  br i1 %.not, label %109, label %103

103:                                              ; preds = %.lr.ph43
  %104 = getelementptr inbounds i8, ptr %100, i64 5
  %105 = load i8, ptr %104, align 1, !tbaa !37, !range !38, !noundef !39
  %106 = trunc nuw i8 %105 to i1
  br i1 %106, label %107, label %108

107:                                              ; preds = %103
  call void @_ZN10ClipperLib7Clipper16FixupOutPolylineERNS_6OutRecE(ptr noundef nonnull align 8 dereferenceable(135) %0, ptr noundef nonnull align 8 dereferenceable(40) %100)
  br label %109

108:                                              ; preds = %103
  call void @_ZN10ClipperLib7Clipper15FixupOutPolygonERNS_6OutRecE(ptr noundef nonnull align 8 dereferenceable(135) %0, ptr noundef nonnull align 8 dereferenceable(40) %100)
  br label %109

109:                                              ; preds = %107, %108, %.lr.ph43
  %110 = add nuw i64 %.02041, 1
  %111 = load ptr, ptr %0, align 8, !tbaa !5
  %112 = getelementptr i8, ptr %111, i64 -24
  %113 = load i64, ptr %112, align 8
  %gep37 = getelementptr i8, ptr %invariant.gep, i64 %113
  %114 = call noundef i64 @_ZNKSt6vectorIPN10ClipperLib6OutRecESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %gep37) #4
  %115 = icmp ult i64 %110, %114
  br i1 %115, label %.lr.ph43, label %._crit_edge44, !llvm.loop !44

116:                                              ; preds = %._crit_edge44
  call void @_ZN10ClipperLib7Clipper16DoSimplePolygonsEv(ptr noundef nonnull align 8 dereferenceable(135) %0)
  br label %117

117:                                              ; preds = %26, %.thread, %._crit_edge44, %116
  %.02128 = phi i1 [ false, %.thread ], [ true, %._crit_edge44 ], [ true, %116 ], [ false, %26 ]
  call void @_ZN10ClipperLib7Clipper10ClearJoinsEv(ptr noundef nonnull align 8 dereferenceable(135) %0)
  call void @_ZN10ClipperLib7Clipper15ClearGhostJoinsEv(ptr noundef nonnull align 8 dereferenceable(135) %0)
  br label %118

118:                                              ; preds = %.thread29, %117
  %.1 = phi i1 [ %.02128, %117 ], [ false, %.thread29 ]
  ret i1 %.1
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10ClipperLib7Clipper20ProcessIntersectionsEx(ptr noundef nonnull align 8 dereferenceable(135), i64 noundef) local_unnamed_addr #2 align 2

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

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

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

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

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

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

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

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: write) }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !14, i64 112}
!9 = !{!"_ZTSN10ClipperLib7ClipperE", !10, i64 8, !10, i64 32, !16, i64 56, !20, i64 80, !21, i64 88, !14, i64 112, !27, i64 120, !28, i64 124, !28, i64 128, !27, i64 132, !27, i64 133, !27, i64 134}
!10 = !{!"_ZTSSt6vectorIPN10ClipperLib4JoinESaIS2_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !15, i64 0}
!15 = !{!"omnipotent char", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIPN10ClipperLib13IntersectNodeESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!20 = !{!"_ZTSN10ClipperLib8ClipTypeE", !15, i64 0}
!21 = !{!"_ZTSNSt7__cxx114listIxSaIxEEE", !22, i64 0}
!22 = !{!"_ZTSNSt7__cxx1110_List_baseIxSaIxEEE", !23, i64 0}
!23 = !{!"_ZTSNSt7__cxx1110_List_baseIxSaIxEE10_List_implE", !24, i64 0}
!24 = !{!"_ZTSNSt8__detail17_List_node_headerE", !25, i64 0, !26, i64 16}
!25 = !{!"_ZTSNSt8__detail15_List_node_baseE", !14, i64 0, !14, i64 8}
!26 = !{!"long", !15, i64 0}
!27 = !{!"bool", !15, i64 0}
!28 = !{!"_ZTSN10ClipperLib12PolyFillTypeE", !15, i64 0}
!29 = !{!30, !30, i64 0}
!30 = !{!"long long", !15, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!14, !14, i64 0}
!34 = !{!35, !14, i64 24}
!35 = !{!"_ZTSN10ClipperLib6OutRecE", !36, i64 0, !27, i64 4, !27, i64 5, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32}
!36 = !{!"int", !15, i64 0}
!37 = !{!35, !27, i64 5}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = !{!35, !27, i64 4}
!41 = !{!9, !27, i64 132}
!42 = distinct !{!42, !32}
!43 = !{!9, !27, i64 134}
!44 = distinct !{!44, !32}


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