; 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::TEdge" = type { %"struct.ClipperLib::IntPoint", %"struct.ClipperLib::IntPoint", %"struct.ClipperLib::IntPoint", double, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"struct.ClipperLib::IntPoint" = type { i64, i64 }
%"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.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::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 }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN10ClipperLib3AbsEx(i64 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ClipperLib7Clipper15SetWindingCountERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(135) %0, ptr noundef nonnull align 8 dereferenceable(136) %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %10, i32 0, i32 14
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  store ptr %12, ptr %5, align 8, !tbaa !5
  br label %13

13:                                               ; preds = %33, %2
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %16, label %31

16:                                               ; preds = %13
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %17, i32 0, i32 4
  %19 = load i32, ptr %18, align 8, !tbaa !17
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %20, i32 0, i32 4
  %22 = load i32, ptr %21, align 8, !tbaa !17
  %23 = icmp ne i32 %19, %22
  br i1 %23, label %29, label %24

24:                                               ; preds = %16
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %25, i32 0, i32 6
  %27 = load i32, ptr %26, align 8, !tbaa !18
  %28 = icmp eq i32 %27, 0
  br label %29

29:                                               ; preds = %24, %16
  %30 = phi i1 [ true, %16 ], [ %28, %24 ]
  br label %31

31:                                               ; preds = %29, %13
  %32 = phi i1 [ false, %13 ], [ %30, %29 ]
  br i1 %32, label %33, label %37

33:                                               ; preds = %31
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %34, i32 0, i32 14
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  store ptr %36, ptr %5, align 8, !tbaa !5
  br label %13, !llvm.loop !19

37:                                               ; preds = %31
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  br i1 %39, label %79, label %40

40:                                               ; preds = %37
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %41, i32 0, i32 6
  %43 = load i32, ptr %42, align 8, !tbaa !18
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %64

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %46, i32 0, i32 4
  %48 = load i32, ptr %47, align 8, !tbaa !17
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %53

50:                                               ; preds = %45
  %51 = getelementptr inbounds %"class.ClipperLib::Clipper", ptr %9, i32 0, i32 11
  %52 = load i32, ptr %51, align 8, !tbaa !21
  br label %56

53:                                               ; preds = %45
  %54 = getelementptr inbounds %"class.ClipperLib::Clipper", ptr %9, i32 0, i32 10
  %55 = load i32, ptr %54, align 4, !tbaa !40
  br label %56

56:                                               ; preds = %53, %50
  %57 = phi i32 [ %52, %50 ], [ %55, %53 ]
  store i32 %57, ptr %6, align 4, !tbaa !41
  %58 = load i32, ptr %6, align 4, !tbaa !41
  %59 = icmp eq i32 %58, 3
  %60 = zext i1 %59 to i64
  %61 = select i1 %59, i32 -1, i32 1
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %62, i32 0, i32 7
  store i32 %61, ptr %63, align 4, !tbaa !42
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %70

64:                                               ; preds = %40
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %65, i32 0, i32 6
  %67 = load i32, ptr %66, align 8, !tbaa !18
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %68, i32 0, i32 7
  store i32 %67, ptr %69, align 4, !tbaa !42
  br label %70

70:                                               ; preds = %64, %56
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %71, i32 0, i32 8
  store i32 0, ptr %72, align 8, !tbaa !43
  %73 = load ptr, ptr %9, align 8, !tbaa !44
  %74 = getelementptr i8, ptr %73, i64 -24
  %75 = load i64, ptr %74, align 8
  %76 = getelementptr inbounds i8, ptr %9, i64 %75
  %77 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %76, i32 0, i32 8
  %78 = load ptr, ptr %77, align 8, !tbaa !46
  store ptr %78, ptr %5, align 8, !tbaa !5
  br label %277

79:                                               ; preds = %37
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %80, i32 0, i32 6
  %82 = load i32, ptr %81, align 8, !tbaa !18
  %83 = icmp eq i32 %82, 0
  br i1 %83, label %84, label %99

84:                                               ; preds = %79
  %85 = getelementptr inbounds %"class.ClipperLib::Clipper", ptr %9, i32 0, i32 4
  %86 = load i32, ptr %85, align 8, !tbaa !67
  %87 = icmp ne i32 %86, 1
  br i1 %87, label %88, label %99

88:                                               ; preds = %84
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %89, i32 0, i32 7
  store i32 1, ptr %90, align 4, !tbaa !42
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %91, i32 0, i32 8
  %93 = load i32, ptr %92, align 8, !tbaa !43
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %94, i32 0, i32 8
  store i32 %93, ptr %95, align 8, !tbaa !43
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %96, i32 0, i32 13
  %98 = load ptr, ptr %97, align 8, !tbaa !68
  store ptr %98, ptr %5, align 8, !tbaa !5
  br label %276

99:                                               ; preds = %84, %79
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = call noundef zeroext i1 @_ZNK10ClipperLib7Clipper17IsEvenOddFillTypeERKNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(135) %9, ptr noundef nonnull align 8 dereferenceable(136) %100)
  br i1 %101, label %102, label %158

102:                                              ; preds = %99
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %103, i32 0, i32 6
  %105 = load i32, ptr %104, align 8, !tbaa !18
  %106 = icmp eq i32 %105, 0
  br i1 %106, label %107, label %143

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  store i8 1, ptr %7, align 1, !tbaa !69
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %108, i32 0, i32 14
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  store ptr %110, ptr %8, align 8, !tbaa !5
  br label %111

111:                                              ; preds = %132, %107
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = icmp ne ptr %112, null
  br i1 %113, label %114, label %136

114:                                              ; preds = %111
  %115 = load ptr, ptr %8, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %115, i32 0, i32 4
  %117 = load i32, ptr %116, align 8, !tbaa !17
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %118, i32 0, i32 4
  %120 = load i32, ptr %119, align 8, !tbaa !17
  %121 = icmp eq i32 %117, %120
  br i1 %121, label %122, label %132

122:                                              ; preds = %114
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %123, i32 0, i32 6
  %125 = load i32, ptr %124, align 8, !tbaa !18
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %127, label %132

127:                                              ; preds = %122
  %128 = load i8, ptr %7, align 1, !tbaa !69, !range !70, !noundef !71
  %129 = trunc i8 %128 to i1
  %130 = xor i1 %129, true
  %131 = zext i1 %130 to i8
  store i8 %131, ptr %7, align 1, !tbaa !69
  br label %132

132:                                              ; preds = %127, %122, %114
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %133, i32 0, i32 14
  %135 = load ptr, ptr %134, align 8, !tbaa !9
  store ptr %135, ptr %8, align 8, !tbaa !5
  br label %111, !llvm.loop !72

136:                                              ; preds = %111
  %137 = load i8, ptr %7, align 1, !tbaa !69, !range !70, !noundef !71
  %138 = trunc i8 %137 to i1
  %139 = zext i1 %138 to i64
  %140 = select i1 %138, i32 0, i32 1
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %141, i32 0, i32 7
  store i32 %140, ptr %142, align 4, !tbaa !42
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  br label %149

143:                                              ; preds = %102
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %144, i32 0, i32 6
  %146 = load i32, ptr %145, align 8, !tbaa !18
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %147, i32 0, i32 7
  store i32 %146, ptr %148, align 4, !tbaa !42
  br label %149

149:                                              ; preds = %143, %136
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %150, i32 0, i32 8
  %152 = load i32, ptr %151, align 8, !tbaa !43
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %153, i32 0, i32 8
  store i32 %152, ptr %154, align 8, !tbaa !43
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %155, i32 0, i32 13
  %157 = load ptr, ptr %156, align 8, !tbaa !68
  store ptr %157, ptr %5, align 8, !tbaa !5
  br label %275

158:                                              ; preds = %99
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  %160 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %159, i32 0, i32 7
  %161 = load i32, ptr %160, align 4, !tbaa !42
  %162 = load ptr, ptr %5, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %162, i32 0, i32 6
  %164 = load i32, ptr %163, align 8, !tbaa !18
  %165 = mul nsw i32 %161, %164
  %166 = icmp slt i32 %165, 0
  br i1 %166, label %167, label %215

167:                                              ; preds = %158
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %168, i32 0, i32 7
  %170 = load i32, ptr %169, align 4, !tbaa !42
  %171 = sext i32 %170 to i64
  %172 = call noundef i64 @_ZN10ClipperLib3AbsEx(i64 noundef %171)
  %173 = icmp sgt i64 %172, 1
  br i1 %173, label %174, label %200

174:                                              ; preds = %167
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %175, i32 0, i32 6
  %177 = load i32, ptr %176, align 8, !tbaa !18
  %178 = load ptr, ptr %4, align 8, !tbaa !5
  %179 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %178, i32 0, i32 6
  %180 = load i32, ptr %179, align 8, !tbaa !18
  %181 = mul nsw i32 %177, %180
  %182 = icmp slt i32 %181, 0
  br i1 %182, label %183, label %189

183:                                              ; preds = %174
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %184, i32 0, i32 7
  %186 = load i32, ptr %185, align 4, !tbaa !42
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  %188 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %187, i32 0, i32 7
  store i32 %186, ptr %188, align 4, !tbaa !42
  br label %199

189:                                              ; preds = %174
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %190, i32 0, i32 7
  %192 = load i32, ptr %191, align 4, !tbaa !42
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %193, i32 0, i32 6
  %195 = load i32, ptr %194, align 8, !tbaa !18
  %196 = add nsw i32 %192, %195
  %197 = load ptr, ptr %4, align 8, !tbaa !5
  %198 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %197, i32 0, i32 7
  store i32 %196, ptr %198, align 4, !tbaa !42
  br label %199

199:                                              ; preds = %189, %183
  br label %214

200:                                              ; preds = %167
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  %202 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %201, i32 0, i32 6
  %203 = load i32, ptr %202, align 8, !tbaa !18
  %204 = icmp eq i32 %203, 0
  br i1 %204, label %205, label %206

205:                                              ; preds = %200
  br label %210

206:                                              ; preds = %200
  %207 = load ptr, ptr %4, align 8, !tbaa !5
  %208 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %207, i32 0, i32 6
  %209 = load i32, ptr %208, align 8, !tbaa !18
  br label %210

210:                                              ; preds = %206, %205
  %211 = phi i32 [ 1, %205 ], [ %209, %206 ]
  %212 = load ptr, ptr %4, align 8, !tbaa !5
  %213 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %212, i32 0, i32 7
  store i32 %211, ptr %213, align 4, !tbaa !42
  br label %214

214:                                              ; preds = %210, %199
  br label %266

215:                                              ; preds = %158
  %216 = load ptr, ptr %4, align 8, !tbaa !5
  %217 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %216, i32 0, i32 6
  %218 = load i32, ptr %217, align 8, !tbaa !18
  %219 = icmp eq i32 %218, 0
  br i1 %219, label %220, label %239

220:                                              ; preds = %215
  %221 = load ptr, ptr %5, align 8, !tbaa !5
  %222 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %221, i32 0, i32 7
  %223 = load i32, ptr %222, align 4, !tbaa !42
  %224 = icmp slt i32 %223, 0
  br i1 %224, label %225, label %230

225:                                              ; preds = %220
  %226 = load ptr, ptr %5, align 8, !tbaa !5
  %227 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %226, i32 0, i32 7
  %228 = load i32, ptr %227, align 4, !tbaa !42
  %229 = sub nsw i32 %228, 1
  br label %235

230:                                              ; preds = %220
  %231 = load ptr, ptr %5, align 8, !tbaa !5
  %232 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %231, i32 0, i32 7
  %233 = load i32, ptr %232, align 4, !tbaa !42
  %234 = add nsw i32 %233, 1
  br label %235

235:                                              ; preds = %230, %225
  %236 = phi i32 [ %229, %225 ], [ %234, %230 ]
  %237 = load ptr, ptr %4, align 8, !tbaa !5
  %238 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %237, i32 0, i32 7
  store i32 %236, ptr %238, align 4, !tbaa !42
  br label %265

239:                                              ; preds = %215
  %240 = load ptr, ptr %5, align 8, !tbaa !5
  %241 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %240, i32 0, i32 6
  %242 = load i32, ptr %241, align 8, !tbaa !18
  %243 = load ptr, ptr %4, align 8, !tbaa !5
  %244 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %243, i32 0, i32 6
  %245 = load i32, ptr %244, align 8, !tbaa !18
  %246 = mul nsw i32 %242, %245
  %247 = icmp slt i32 %246, 0
  br i1 %247, label %248, label %254

248:                                              ; preds = %239
  %249 = load ptr, ptr %5, align 8, !tbaa !5
  %250 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %249, i32 0, i32 7
  %251 = load i32, ptr %250, align 4, !tbaa !42
  %252 = load ptr, ptr %4, align 8, !tbaa !5
  %253 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %252, i32 0, i32 7
  store i32 %251, ptr %253, align 4, !tbaa !42
  br label %264

254:                                              ; preds = %239
  %255 = load ptr, ptr %5, align 8, !tbaa !5
  %256 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %255, i32 0, i32 7
  %257 = load i32, ptr %256, align 4, !tbaa !42
  %258 = load ptr, ptr %4, align 8, !tbaa !5
  %259 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %258, i32 0, i32 6
  %260 = load i32, ptr %259, align 8, !tbaa !18
  %261 = add nsw i32 %257, %260
  %262 = load ptr, ptr %4, align 8, !tbaa !5
  %263 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %262, i32 0, i32 7
  store i32 %261, ptr %263, align 4, !tbaa !42
  br label %264

264:                                              ; preds = %254, %248
  br label %265

265:                                              ; preds = %264, %235
  br label %266

266:                                              ; preds = %265, %214
  %267 = load ptr, ptr %5, align 8, !tbaa !5
  %268 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %267, i32 0, i32 8
  %269 = load i32, ptr %268, align 8, !tbaa !43
  %270 = load ptr, ptr %4, align 8, !tbaa !5
  %271 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %270, i32 0, i32 8
  store i32 %269, ptr %271, align 8, !tbaa !43
  %272 = load ptr, ptr %5, align 8, !tbaa !5
  %273 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %272, i32 0, i32 13
  %274 = load ptr, ptr %273, align 8, !tbaa !68
  store ptr %274, ptr %5, align 8, !tbaa !5
  br label %275

275:                                              ; preds = %266, %149
  br label %276

276:                                              ; preds = %275, %88
  br label %277

277:                                              ; preds = %276, %70
  %278 = load ptr, ptr %4, align 8, !tbaa !5
  %279 = call noundef zeroext i1 @_ZNK10ClipperLib7Clipper20IsEvenOddAltFillTypeERKNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(135) %9, ptr noundef nonnull align 8 dereferenceable(136) %278)
  br i1 %279, label %280, label %304

280:                                              ; preds = %277
  br label %281

281:                                              ; preds = %299, %280
  %282 = load ptr, ptr %5, align 8, !tbaa !5
  %283 = load ptr, ptr %4, align 8, !tbaa !5
  %284 = icmp ne ptr %282, %283
  br i1 %284, label %285, label %303

285:                                              ; preds = %281
  %286 = load ptr, ptr %5, align 8, !tbaa !5
  %287 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %286, i32 0, i32 6
  %288 = load i32, ptr %287, align 8, !tbaa !18
  %289 = icmp ne i32 %288, 0
  br i1 %289, label %290, label %299

290:                                              ; preds = %285
  %291 = load ptr, ptr %4, align 8, !tbaa !5
  %292 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %291, i32 0, i32 8
  %293 = load i32, ptr %292, align 8, !tbaa !43
  %294 = icmp eq i32 %293, 0
  %295 = zext i1 %294 to i64
  %296 = select i1 %294, i32 1, i32 0
  %297 = load ptr, ptr %4, align 8, !tbaa !5
  %298 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %297, i32 0, i32 8
  store i32 %296, ptr %298, align 8, !tbaa !43
  br label %299

299:                                              ; preds = %290, %285
  %300 = load ptr, ptr %5, align 8, !tbaa !5
  %301 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %300, i32 0, i32 13
  %302 = load ptr, ptr %301, align 8, !tbaa !68
  store ptr %302, ptr %5, align 8, !tbaa !5
  br label %281, !llvm.loop !73

303:                                              ; preds = %281
  br label %321

304:                                              ; preds = %277
  br label %305

305:                                              ; preds = %309, %304
  %306 = load ptr, ptr %5, align 8, !tbaa !5
  %307 = load ptr, ptr %4, align 8, !tbaa !5
  %308 = icmp ne ptr %306, %307
  br i1 %308, label %309, label %320

309:                                              ; preds = %305
  %310 = load ptr, ptr %5, align 8, !tbaa !5
  %311 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %310, i32 0, i32 6
  %312 = load i32, ptr %311, align 8, !tbaa !18
  %313 = load ptr, ptr %4, align 8, !tbaa !5
  %314 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %313, i32 0, i32 8
  %315 = load i32, ptr %314, align 8, !tbaa !43
  %316 = add nsw i32 %315, %312
  store i32 %316, ptr %314, align 8, !tbaa !43
  %317 = load ptr, ptr %5, align 8, !tbaa !5
  %318 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %317, i32 0, i32 13
  %319 = load ptr, ptr %318, align 8, !tbaa !68
  store ptr %319, ptr %5, align 8, !tbaa !5
  br label %305, !llvm.loop !74

320:                                              ; preds = %305
  br label %321

321:                                              ; preds = %320, %303
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK10ClipperLib7Clipper17IsEvenOddFillTypeERKNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(135), ptr noundef nonnull align 8 dereferenceable(136)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK10ClipperLib7Clipper20IsEvenOddAltFillTypeERKNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(135), ptr noundef nonnull align 8 dereferenceable(136)) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !6, i64 112}
!10 = !{!"_ZTSN10ClipperLib5TEdgeE", !11, i64 0, !11, i64 16, !11, i64 32, !13, i64 48, !14, i64 56, !15, i64 60, !16, i64 64, !16, i64 68, !16, i64 72, !16, i64 76, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128}
!11 = !{!"_ZTSN10ClipperLib8IntPointE", !12, i64 0, !12, i64 8}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!"_ZTSN10ClipperLib8PolyTypeE", !7, i64 0}
!15 = !{!"_ZTSN10ClipperLib8EdgeSideE", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!10, !14, i64 56}
!18 = !{!10, !16, i64 64}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !39, i64 128}
!22 = !{!"_ZTSN10ClipperLib7ClipperE", !23, i64 8, !23, i64 32, !27, i64 56, !31, i64 80, !32, i64 88, !6, i64 112, !38, i64 120, !39, i64 124, !39, i64 128, !38, i64 132, !38, i64 133, !38, i64 134}
!23 = !{!"_ZTSSt6vectorIPN10ClipperLib4JoinESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTSSt6vectorIPN10ClipperLib13IntersectNodeESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!"_ZTSN10ClipperLib8ClipTypeE", !7, i64 0}
!32 = !{!"_ZTSNSt7__cxx114listIxSaIxEEE", !33, i64 0}
!33 = !{!"_ZTSNSt7__cxx1110_List_baseIxSaIxEEE", !34, i64 0}
!34 = !{!"_ZTSNSt7__cxx1110_List_baseIxSaIxEE10_List_implE", !35, i64 0}
!35 = !{!"_ZTSNSt8__detail17_List_node_headerE", !36, i64 0, !37, i64 16}
!36 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!37 = !{!"long", !7, i64 0}
!38 = !{!"bool", !7, i64 0}
!39 = !{!"_ZTSN10ClipperLib12PolyFillTypeE", !7, i64 0}
!40 = !{!22, !39, i64 124}
!41 = !{!39, !39, i64 0}
!42 = !{!10, !16, i64 68}
!43 = !{!10, !16, i64 72}
!44 = !{!45, !45, i64 0}
!45 = !{!"vtable pointer", !8, i64 0}
!46 = !{!47, !6, i64 104}
!47 = !{!"_ZTSN10ClipperLib11ClipperBaseE", !48, i64 8, !49, i64 16, !38, i64 40, !53, i64 48, !38, i64 72, !38, i64 73, !57, i64 80, !6, i64 104, !61, i64 112}
!48 = !{!"_ZTSN9__gnu_cxx17__normal_iteratorIPN10ClipperLib12LocalMinimumESt6vectorIS2_SaIS2_EEEE", !6, i64 0}
!49 = !{!"_ZTSSt6vectorIN10ClipperLib12LocalMinimumESaIS1_EE", !50, i64 0}
!50 = !{!"_ZTSSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE12_Vector_implE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!53 = !{!"_ZTSSt6vectorIPN10ClipperLib5TEdgeESaIS2_EE", !54, i64 0}
!54 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE", !55, i64 0}
!55 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE12_Vector_implE", !56, i64 0}
!56 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!57 = !{!"_ZTSSt6vectorIPN10ClipperLib6OutRecESaIS2_EE", !58, i64 0}
!58 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE", !59, i64 0}
!59 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE12_Vector_implE", !60, i64 0}
!60 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!61 = !{!"_ZTSSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE", !62, i64 0, !66, i64 24}
!62 = !{!"_ZTSSt6vectorIxSaIxEE", !63, i64 0}
!63 = !{!"_ZTSSt12_Vector_baseIxSaIxEE", !64, i64 0}
!64 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE12_Vector_implE", !65, i64 0}
!65 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!66 = !{!"_ZTSSt4lessIxE"}
!67 = !{!22, !31, i64 80}
!68 = !{!10, !6, i64 104}
!69 = !{!38, !38, i64 0}
!70 = !{i8 0, i8 2}
!71 = !{}
!72 = distinct !{!72, !20}
!73 = distinct !{!73, !20}
!74 = distinct !{!74, !20}


; 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"

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN10ClipperLib3AbsEx(i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN10ClipperLib7Clipper15SetWindingCountERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(135) %0, ptr noundef nonnull align 8 dereferenceable(136) %1) local_unnamed_addr #1 align 2 {
  %.078.in104 = getelementptr inbounds i8, ptr %1, i64 112
  %.078105 = load ptr, ptr %.078.in104, align 8, !tbaa !5
  %.not106 = icmp eq ptr %.078105, null
  br i1 %.not106, label %.critedge96, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %3 = getelementptr inbounds i8, ptr %1, i64 56
  %4 = load i32, ptr %3, align 8, !tbaa !16
  br label %5

5:                                                ; preds = %.lr.ph, %.critedge2
  %.078107 = phi ptr [ %.078105, %.lr.ph ], [ %.078, %.critedge2 ]
  %6 = getelementptr inbounds i8, ptr %.078107, i64 56
  %7 = load i32, ptr %6, align 8, !tbaa !16
  %.not88 = icmp eq i32 %7, %4
  br i1 %.not88, label %8, label %.critedge2

8:                                                ; preds = %5
  %9 = getelementptr inbounds i8, ptr %.078107, i64 64
  %10 = load i32, ptr %9, align 8, !tbaa !17
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %.critedge2, label %.critedge

.critedge2:                                       ; preds = %5, %8
  %.078.in = getelementptr inbounds i8, ptr %.078107, i64 112
  %.078 = load ptr, ptr %.078.in, align 8, !tbaa !5
  %.not = icmp eq ptr %.078, null
  br i1 %.not, label %.critedge96, label %5, !llvm.loop !18

.critedge96:                                      ; preds = %.critedge2, %2
  %12 = getelementptr inbounds i8, ptr %1, i64 64
  %13 = load i32, ptr %12, align 8, !tbaa !17
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %22

15:                                               ; preds = %.critedge96
  %16 = getelementptr inbounds i8, ptr %1, i64 56
  %17 = load i32, ptr %16, align 8, !tbaa !16
  %18 = icmp eq i32 %17, 0
  %.in.v = select i1 %18, i64 128, i64 124
  %.in = getelementptr inbounds i8, ptr %0, i64 %.in.v
  %19 = load i32, ptr %.in, align 4, !tbaa !20
  %20 = icmp eq i32 %19, 3
  %21 = select i1 %20, i32 -1, i32 1
  br label %22

22:                                               ; preds = %.critedge96, %15
  %.sink = phi i32 [ %21, %15 ], [ %13, %.critedge96 ]
  %23 = getelementptr inbounds i8, ptr %1, i64 68
  store i32 %.sink, ptr %23, align 4
  %24 = getelementptr inbounds i8, ptr %1, i64 72
  store i32 0, ptr %24, align 8, !tbaa !22
  %25 = load ptr, ptr %0, align 8, !tbaa !23
  %26 = getelementptr i8, ptr %25, i64 -24
  %27 = load i64, ptr %26, align 8
  %28 = getelementptr inbounds i8, ptr %0, i64 %27
  br label %96

.critedge:                                        ; preds = %8
  %29 = getelementptr inbounds i8, ptr %.078107, i64 56
  %30 = getelementptr inbounds i8, ptr %.078107, i64 64
  %31 = getelementptr inbounds i8, ptr %1, i64 64
  %32 = load i32, ptr %31, align 8, !tbaa !17
  %33 = icmp ne i32 %32, 0
  %34 = getelementptr inbounds i8, ptr %0, i64 80
  %35 = load i32, ptr %34, align 8
  %.not89 = icmp eq i32 %35, 1
  %or.cond = select i1 %33, i1 true, i1 %.not89
  br i1 %or.cond, label %41, label %36

36:                                               ; preds = %.critedge
  %37 = getelementptr inbounds i8, ptr %1, i64 68
  store i32 1, ptr %37, align 4, !tbaa !25
  %38 = getelementptr inbounds i8, ptr %.078107, i64 72
  %39 = load i32, ptr %38, align 8, !tbaa !22
  %40 = getelementptr inbounds i8, ptr %1, i64 72
  store i32 %39, ptr %40, align 8, !tbaa !22
  br label %96

41:                                               ; preds = %.critedge
  %42 = tail call noundef zeroext i1 @_ZNK10ClipperLib7Clipper17IsEvenOddFillTypeERKNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(135) %0, ptr noundef nonnull align 8 dereferenceable(136) %1)
  br i1 %42, label %43, label %63

43:                                               ; preds = %41
  %44 = load i32, ptr %31, align 8, !tbaa !17
  %45 = icmp eq i32 %44, 0
  br i1 %45, label %.preheader100, label %._crit_edge

.preheader100:                                    ; preds = %43
  %.0.in108 = getelementptr inbounds i8, ptr %.078107, i64 112
  %.0109 = load ptr, ptr %.0.in108, align 8, !tbaa !5
  %.not90110 = icmp eq ptr %.0109, null
  br i1 %.not90110, label %._crit_edge, label %.lr.ph113

.lr.ph113:                                        ; preds = %.preheader100
  %46 = load i32, ptr %29, align 8, !tbaa !16
  br label %47

47:                                               ; preds = %.lr.ph113, %55
  %.0112 = phi ptr [ %.0109, %.lr.ph113 ], [ %.0, %55 ]
  %.077111 = phi i8 [ 1, %.lr.ph113 ], [ %.1, %55 ]
  %48 = getelementptr inbounds i8, ptr %.0112, i64 56
  %49 = load i32, ptr %48, align 8, !tbaa !16
  %50 = icmp eq i32 %49, %46
  br i1 %50, label %51, label %55

51:                                               ; preds = %47
  %52 = getelementptr inbounds i8, ptr %.0112, i64 64
  %53 = load i32, ptr %52, align 8, !tbaa !17
  %.not91 = icmp ne i32 %53, 0
  %54 = zext i1 %.not91 to i8
  %spec.select128 = xor i8 %.077111, %54
  br label %55

55:                                               ; preds = %51, %47
  %.1 = phi i8 [ %.077111, %47 ], [ %spec.select128, %51 ]
  %.0.in = getelementptr inbounds i8, ptr %.0112, i64 112
  %.0 = load ptr, ptr %.0.in, align 8, !tbaa !5
  %.not90 = icmp eq ptr %.0, null
  br i1 %.not90, label %._crit_edge.loopexit, label %47, !llvm.loop !26

._crit_edge.loopexit:                             ; preds = %55
  %56 = and i8 %.1, 1
  %57 = xor i8 %56, 1
  %58 = zext nneg i8 %57 to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %43, %.preheader100, %._crit_edge.loopexit
  %.sink129 = phi i32 [ 0, %.preheader100 ], [ %58, %._crit_edge.loopexit ], [ %44, %43 ]
  %59 = getelementptr inbounds i8, ptr %1, i64 68
  store i32 %.sink129, ptr %59, align 4, !tbaa !25
  %60 = getelementptr inbounds i8, ptr %.078107, i64 72
  %61 = load i32, ptr %60, align 8, !tbaa !22
  %62 = getelementptr inbounds i8, ptr %1, i64 72
  store i32 %61, ptr %62, align 8, !tbaa !22
  br label %96

63:                                               ; preds = %41
  %64 = getelementptr inbounds i8, ptr %.078107, i64 68
  %65 = load i32, ptr %64, align 4, !tbaa !25
  %66 = load i32, ptr %30, align 8, !tbaa !17
  %67 = mul nsw i32 %66, %65
  %68 = icmp slt i32 %67, 0
  br i1 %68, label %69, label %82

69:                                               ; preds = %63
  %70 = sext i32 %65 to i64
  %71 = tail call noundef i64 @_ZN10ClipperLib3AbsEx(i64 noundef %70)
  %72 = icmp sgt i64 %71, 1
  br i1 %72, label %73, label %80

73:                                               ; preds = %69
  %74 = load i32, ptr %30, align 8, !tbaa !17
  %75 = load i32, ptr %31, align 8, !tbaa !17
  %76 = mul nsw i32 %75, %74
  %77 = icmp slt i32 %76, 0
  %78 = load i32, ptr %64, align 4, !tbaa !25
  %79 = select i1 %77, i32 0, i32 %75
  %spec.select133 = add nsw i32 %78, %79
  br label %91

80:                                               ; preds = %69
  %81 = load i32, ptr %31, align 8, !tbaa !17
  %spec.select = tail call i32 @llvm.umax.i32(i32 %81, i32 1)
  br label %91

82:                                               ; preds = %63
  %83 = load i32, ptr %31, align 8, !tbaa !17
  %84 = icmp eq i32 %83, 0
  br i1 %84, label %85, label %87

85:                                               ; preds = %82
  %.inv = icmp sgt i32 %65, -1
  %.v = select i1 %.inv, i32 1, i32 -1
  %86 = add nsw i32 %.v, %65
  br label %91

87:                                               ; preds = %82
  %88 = mul nsw i32 %83, %66
  %89 = icmp slt i32 %88, 0
  %90 = select i1 %89, i32 0, i32 %83
  %spec.select134 = add nsw i32 %65, %90
  br label %91

91:                                               ; preds = %87, %73, %85, %80
  %.sink131 = phi i32 [ %86, %85 ], [ %spec.select, %80 ], [ %spec.select133, %73 ], [ %spec.select134, %87 ]
  %92 = getelementptr inbounds i8, ptr %1, i64 68
  store i32 %.sink131, ptr %92, align 4, !tbaa !25
  %93 = getelementptr inbounds i8, ptr %.078107, i64 72
  %94 = load i32, ptr %93, align 8, !tbaa !22
  %95 = getelementptr inbounds i8, ptr %1, i64 72
  store i32 %94, ptr %95, align 8, !tbaa !22
  br label %96

96:                                               ; preds = %36, %91, %._crit_edge, %22
  %.078.pn92 = phi ptr [ %.078107, %36 ], [ %.078107, %._crit_edge ], [ %.078107, %91 ], [ %28, %22 ]
  %.179.in = getelementptr inbounds i8, ptr %.078.pn92, i64 104
  %.179 = load ptr, ptr %.179.in, align 8, !tbaa !27
  %97 = tail call noundef zeroext i1 @_ZNK10ClipperLib7Clipper20IsEvenOddAltFillTypeERKNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(135) %0, ptr noundef nonnull align 8 dereferenceable(136) %1)
  %.not94117 = icmp eq ptr %.179, %1
  br i1 %97, label %.preheader, label %.preheader98

.preheader98:                                     ; preds = %96
  br i1 %.not94117, label %.loopexit, label %.lr.ph116

.lr.ph116:                                        ; preds = %.preheader98
  %98 = getelementptr inbounds i8, ptr %1, i64 72
  %.promoted = load i32, ptr %98, align 8, !tbaa !22
  br label %111

.preheader:                                       ; preds = %96
  br i1 %.not94117, label %.loopexit, label %.lr.ph119

.lr.ph119:                                        ; preds = %.preheader
  %99 = getelementptr inbounds i8, ptr %1, i64 72
  %.promoted120 = load i32, ptr %99, align 8, !tbaa !22
  br label %100

100:                                              ; preds = %.lr.ph119, %107
  %101 = phi i32 [ %.promoted120, %.lr.ph119 ], [ %108, %107 ]
  %.2118 = phi ptr [ %.179, %.lr.ph119 ], [ %110, %107 ]
  %102 = getelementptr inbounds i8, ptr %.2118, i64 64
  %103 = load i32, ptr %102, align 8, !tbaa !17
  %.not95 = icmp eq i32 %103, 0
  br i1 %.not95, label %107, label %104

104:                                              ; preds = %100
  %105 = icmp eq i32 %101, 0
  %106 = zext i1 %105 to i32
  store i32 %106, ptr %99, align 8, !tbaa !22
  br label %107

107:                                              ; preds = %104, %100
  %108 = phi i32 [ %106, %104 ], [ %101, %100 ]
  %109 = getelementptr inbounds i8, ptr %.2118, i64 104
  %110 = load ptr, ptr %109, align 8, !tbaa !28
  %.not94 = icmp eq ptr %110, %1
  br i1 %.not94, label %.loopexit, label %100, !llvm.loop !29

111:                                              ; preds = %.lr.ph116, %111
  %112 = phi i32 [ %.promoted, %.lr.ph116 ], [ %115, %111 ]
  %.3115 = phi ptr [ %.179, %.lr.ph116 ], [ %117, %111 ]
  %113 = getelementptr inbounds i8, ptr %.3115, i64 64
  %114 = load i32, ptr %113, align 8, !tbaa !17
  %115 = add nsw i32 %112, %114
  %116 = getelementptr inbounds i8, ptr %.3115, i64 104
  %117 = load ptr, ptr %116, align 8, !tbaa !28
  %.not93 = icmp eq ptr %117, %1
  br i1 %.not93, label %..loopexit99_crit_edge, label %111, !llvm.loop !30

..loopexit99_crit_edge:                           ; preds = %111
  store i32 %115, ptr %98, align 8, !tbaa !22
  br label %.loopexit

.loopexit:                                        ; preds = %107, %.preheader98, %..loopexit99_crit_edge, %.preheader
  ret void
}

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #2

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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, !15, i64 112}
!6 = !{!"_ZTSN10ClipperLib5TEdgeE", !7, i64 0, !7, i64 16, !7, i64 32, !11, i64 48, !12, i64 56, !13, i64 60, !14, i64 64, !14, i64 68, !14, i64 72, !14, i64 76, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128}
!7 = !{!"_ZTSN10ClipperLib8IntPointE", !8, i64 0, !8, i64 8}
!8 = !{!"long long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"double", !9, i64 0}
!12 = !{!"_ZTSN10ClipperLib8PolyTypeE", !9, i64 0}
!13 = !{!"_ZTSN10ClipperLib8EdgeSideE", !9, i64 0}
!14 = !{!"int", !9, i64 0}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!6, !12, i64 56}
!17 = !{!6, !14, i64 64}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !21, i64 0}
!21 = !{!"_ZTSN10ClipperLib12PolyFillTypeE", !9, i64 0}
!22 = !{!6, !14, i64 72}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !10, i64 0}
!25 = !{!6, !14, i64 68}
!26 = distinct !{!26, !19}
!27 = !{!15, !15, i64 0}
!28 = !{!6, !15, i64 104}
!29 = distinct !{!29, !19}
!30 = distinct !{!30, !19}


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