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

; 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.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 }
%"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 }

@_ZTIN10ClipperLib16clipperExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.4 = external hidden unnamed_addr constant [27 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #1

declare ptr @__cxa_begin_catch(ptr)

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_end_catch()

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10ClipperLib7Clipper20ProcessIntersectionsEx(ptr noundef nonnull align 8 dereferenceable(135) %0, i64 noundef %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  %10 = load ptr, ptr %4, align 8
  %11 = load ptr, ptr %10, align 8, !tbaa !11
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr %10, i64 %13
  %15 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %14, i32 0, i32 8
  %16 = load ptr, ptr %15, align 8, !tbaa !13
  %17 = icmp ne ptr %16, null
  br i1 %17, label %19, label %18

18:                                               ; preds = %2
  store i1 true, ptr %3, align 1
  br label %67

19:                                               ; preds = %2
  %20 = load i64, ptr %5, align 8, !tbaa !9
  invoke void @_ZN10ClipperLib7Clipper18BuildIntersectListEx(ptr noundef nonnull align 8 dereferenceable(135) %10, i64 noundef %20)
          to label %21 unwind label %27

21:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %22 = getelementptr inbounds %"class.ClipperLib::Clipper", ptr %10, i32 0, i32 3
  %23 = call noundef i64 @_ZNKSt6vectorIPN10ClipperLib13IntersectNodeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #4
  store i64 %23, ptr %8, align 8, !tbaa !35
  %24 = load i64, ptr %8, align 8, !tbaa !35
  %25 = icmp eq i64 %24, 0
  br i1 %25, label %26, label %31

26:                                               ; preds = %21
  store i1 true, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %52

27:                                               ; preds = %19
  %28 = landingpad { ptr, i32 }
          catch ptr null
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %6, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %7, align 4
  br label %43

31:                                               ; preds = %21
  %32 = load i64, ptr %8, align 8, !tbaa !35
  %33 = icmp eq i64 %32, 1
  br i1 %33, label %37, label %34

34:                                               ; preds = %31
  %35 = invoke noundef zeroext i1 @_ZN10ClipperLib7Clipper22FixupIntersectionOrderEv(ptr noundef nonnull align 8 dereferenceable(135) %10)
          to label %36 unwind label %39

36:                                               ; preds = %34
  br i1 %35, label %37, label %50

37:                                               ; preds = %36, %31
  invoke void @_ZN10ClipperLib7Clipper20ProcessIntersectListEv(ptr noundef nonnull align 8 dereferenceable(135) %10)
          to label %38 unwind label %39

38:                                               ; preds = %37
  br label %51

39:                                               ; preds = %37, %34
  %40 = landingpad { ptr, i32 }
          catch ptr null
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %6, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %43

43:                                               ; preds = %39, %27
  %44 = load ptr, ptr %6, align 8
  %45 = call ptr @__cxa_begin_catch(ptr %44) #4
  %46 = getelementptr inbounds %"class.ClipperLib::Clipper", ptr %10, i32 0, i32 7
  store ptr null, ptr %46, align 8, !tbaa !37
  invoke void @_ZN10ClipperLib7Clipper21DisposeIntersectNodesEv(ptr noundef nonnull align 8 dereferenceable(135) %10)
          to label %47 unwind label %55

47:                                               ; preds = %43
  %48 = call ptr @__cxa_allocate_exception(i64 40) #4
  invoke void @_ZN10ClipperLib16clipperExceptionC2EPKc(ptr noundef nonnull align 8 dereferenceable(40) %48, ptr noundef @.str.4)
          to label %49 unwind label %59

49:                                               ; preds = %47
  invoke void @__cxa_throw(ptr %48, ptr @_ZTIN10ClipperLib16clipperExceptionE, ptr @_ZN10ClipperLib16clipperExceptionD2Ev) #5
          to label %77 unwind label %55

50:                                               ; preds = %36
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %52

51:                                               ; preds = %38
  store i32 0, ptr %9, align 4
  br label %52

52:                                               ; preds = %51, %50, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %53 = load i32, ptr %9, align 4
  switch i32 %53, label %77 [
    i32 0, label %54
    i32 1, label %67
  ]

54:                                               ; preds = %52
  br label %65

55:                                               ; preds = %49, %43
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %6, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %7, align 4
  br label %63

59:                                               ; preds = %47
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %6, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %7, align 4
  call void @__cxa_free_exception(ptr %48) #4
  br label %63

63:                                               ; preds = %59, %55
  invoke void @__cxa_end_catch()
          to label %64 unwind label %74

64:                                               ; preds = %63
  br label %69

65:                                               ; preds = %54
  %66 = getelementptr inbounds %"class.ClipperLib::Clipper", ptr %10, i32 0, i32 7
  store ptr null, ptr %66, align 8, !tbaa !37
  store i1 true, ptr %3, align 1
  br label %67

67:                                               ; preds = %65, %52, %18
  %68 = load i1, ptr %3, align 1
  ret i1 %68

69:                                               ; preds = %64
  %70 = load ptr, ptr %6, align 8
  %71 = load i32, ptr %7, align 4
  %72 = insertvalue { ptr, i32 } poison, ptr %70, 0
  %73 = insertvalue { ptr, i32 } %72, i32 %71, 1
  resume { ptr, i32 } %73

74:                                               ; preds = %63
  %75 = landingpad { ptr, i32 }
          catch ptr null
  %76 = extractvalue { ptr, i32 } %75, 0
  call void @__clang_call_terminate(ptr %76) #6
  unreachable

77:                                               ; preds = %52, %49
  unreachable
}

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noinline noreturn nounwind uwtable "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 }
attributes #5 = { noreturn }
attributes #6 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !6, i64 104}
!14 = !{!"_ZTSN10ClipperLib11ClipperBaseE", !15, i64 8, !16, i64 16, !20, i64 40, !21, i64 48, !20, i64 72, !20, i64 73, !25, i64 80, !6, i64 104, !29, i64 112}
!15 = !{!"_ZTSN9__gnu_cxx17__normal_iteratorIPN10ClipperLib12LocalMinimumESt6vectorIS2_SaIS2_EEEE", !6, i64 0}
!16 = !{!"_ZTSSt6vectorIN10ClipperLib12LocalMinimumESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTSSt6vectorIPN10ClipperLib5TEdgeESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt6vectorIPN10ClipperLib6OutRecESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE", !30, i64 0, !34, i64 24}
!30 = !{!"_ZTSSt6vectorIxSaIxEE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIxSaIxEE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"_ZTSSt4lessIxE"}
!35 = !{!36, !36, i64 0}
!36 = !{!"long", !7, i64 0}
!37 = !{!38, !6, i64 112}
!38 = !{!"_ZTSN10ClipperLib7ClipperE", !39, i64 8, !39, i64 32, !43, i64 56, !47, i64 80, !48, i64 88, !6, i64 112, !20, i64 120, !53, i64 124, !53, i64 128, !20, i64 132, !20, i64 133, !20, i64 134}
!39 = !{!"_ZTSSt6vectorIPN10ClipperLib4JoinESaIS2_EE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!43 = !{!"_ZTSSt6vectorIPN10ClipperLib13IntersectNodeESaIS2_EE", !44, i64 0}
!44 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE12_Vector_implE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!47 = !{!"_ZTSN10ClipperLib8ClipTypeE", !7, i64 0}
!48 = !{!"_ZTSNSt7__cxx114listIxSaIxEEE", !49, i64 0}
!49 = !{!"_ZTSNSt7__cxx1110_List_baseIxSaIxEEE", !50, i64 0}
!50 = !{!"_ZTSNSt7__cxx1110_List_baseIxSaIxEE10_List_implE", !51, i64 0}
!51 = !{!"_ZTSNSt8__detail17_List_node_headerE", !52, i64 0, !36, i64 16}
!52 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!53 = !{!"_ZTSN10ClipperLib12PolyFillTypeE", !7, i64 0}


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

@_ZTIN10ClipperLib16clipperExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.4 = external hidden unnamed_addr constant [27 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #0

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10ClipperLib7Clipper20ProcessIntersectionsEx(ptr noundef nonnull align 8 dereferenceable(135) %0, i64 noundef %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = load ptr, ptr %0, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 %5
  %7 = getelementptr inbounds i8, ptr %6, i64 104
  %8 = load ptr, ptr %7, align 8, !tbaa !8
  %.not = icmp eq ptr %8, null
  br i1 %.not, label %.thread, label %9

9:                                                ; preds = %2
  invoke void @_ZN10ClipperLib7Clipper18BuildIntersectListEx(ptr noundef nonnull align 8 dereferenceable(135) %0, i64 noundef %1)
          to label %10 unwind label %13

10:                                               ; preds = %9
  %11 = getelementptr inbounds i8, ptr %0, i64 56
  %12 = tail call noundef i64 @_ZNKSt6vectorIPN10ClipperLib13IntersectNodeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #3
  switch i64 %12, label %15 [
    i64 0, label %.thread
    i64 1, label %18
  ]

13:                                               ; preds = %9
  %14 = landingpad { ptr, i32 }
          catch ptr null
  br label %21

15:                                               ; preds = %10
  %16 = invoke noundef zeroext i1 @_ZN10ClipperLib7Clipper22FixupIntersectionOrderEv(ptr noundef nonnull align 8 dereferenceable(135) %0)
          to label %17 unwind label %19

17:                                               ; preds = %15
  br i1 %16, label %18, label %.thread

18:                                               ; preds = %10, %17
  invoke void @_ZN10ClipperLib7Clipper20ProcessIntersectListEv(ptr noundef nonnull align 8 dereferenceable(135) %0)
          to label %31 unwind label %19

19:                                               ; preds = %18, %15
  %20 = landingpad { ptr, i32 }
          catch ptr null
  br label %21

21:                                               ; preds = %19, %13
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %14, %13 ]
  %.010 = extractvalue { ptr, i32 } %.pn, 0
  %22 = tail call ptr @__cxa_begin_catch(ptr %.010) #3
  %23 = getelementptr inbounds i8, ptr %0, i64 112
  store ptr null, ptr %23, align 8, !tbaa !32
  tail call void @_ZN10ClipperLib7Clipper21DisposeIntersectNodesEv(ptr noundef nonnull align 8 dereferenceable(135) %0)
  %24 = tail call ptr @__cxa_allocate_exception(i64 40) #3
  invoke void @_ZN10ClipperLib16clipperExceptionC2EPKc(ptr noundef nonnull align 8 dereferenceable(40) %24, ptr noundef nonnull @.str.4)
          to label %25 unwind label %28

25:                                               ; preds = %21
  invoke void @__cxa_throw(ptr nonnull %24, ptr nonnull @_ZTIN10ClipperLib16clipperExceptionE, ptr nonnull @_ZN10ClipperLib16clipperExceptionD2Ev) #4
          to label %37 unwind label %26

26:                                               ; preds = %25
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %30

28:                                               ; preds = %21
  %29 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %24) #3
  br label %30

30:                                               ; preds = %28, %26
  %.pn13 = phi { ptr, i32 } [ %27, %26 ], [ %29, %28 ]
  invoke void @__cxa_end_catch()
          to label %33 unwind label %34

31:                                               ; preds = %18
  %32 = getelementptr inbounds i8, ptr %0, i64 112
  store ptr null, ptr %32, align 8, !tbaa !32
  br label %.thread

.thread:                                          ; preds = %17, %10, %2, %31
  %.1 = phi i1 [ true, %31 ], [ true, %2 ], [ false, %17 ], [ true, %10 ]
  ret i1 %.1

33:                                               ; preds = %30
  resume { ptr, i32 } %.pn13

34:                                               ; preds = %30
  %35 = landingpad { ptr, i32 }
          catch ptr null
  %36 = extractvalue { ptr, i32 } %35, 0
  tail call void @__clang_call_terminate(ptr %36) #5
  unreachable

37:                                               ; preds = %25
  unreachable
}

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

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

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

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

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

attributes #0 = { noinline noreturn nounwind uwtable "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 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 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 #3 = { nounwind }
attributes #4 = { noreturn }
attributes #5 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !11, i64 104}
!9 = !{!"_ZTSN10ClipperLib11ClipperBaseE", !10, i64 8, !13, i64 16, !17, i64 40, !18, i64 48, !17, i64 72, !17, i64 73, !22, i64 80, !11, i64 104, !26, i64 112}
!10 = !{!"_ZTSN9__gnu_cxx17__normal_iteratorIPN10ClipperLib12LocalMinimumESt6vectorIS2_SaIS2_EEEE", !11, i64 0}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"_ZTSSt6vectorIN10ClipperLib12LocalMinimumESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!17 = !{!"bool", !12, i64 0}
!18 = !{!"_ZTSSt6vectorIPN10ClipperLib5TEdgeESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!22 = !{!"_ZTSSt6vectorIPN10ClipperLib6OutRecESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!26 = !{!"_ZTSSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE", !27, i64 0, !31, i64 24}
!27 = !{!"_ZTSSt6vectorIxSaIxEE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIxSaIxEE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!31 = !{!"_ZTSSt4lessIxE"}
!32 = !{!33, !11, i64 112}
!33 = !{!"_ZTSN10ClipperLib7ClipperE", !34, i64 8, !34, i64 32, !38, i64 56, !42, i64 80, !43, i64 88, !11, i64 112, !17, i64 120, !49, i64 124, !49, i64 128, !17, i64 132, !17, i64 133, !17, i64 134}
!34 = !{!"_ZTSSt6vectorIPN10ClipperLib4JoinESaIS2_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib4JoinESaIS2_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!38 = !{!"_ZTSSt6vectorIPN10ClipperLib13IntersectNodeESaIS2_EE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE12_Vector_implE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib13IntersectNodeESaIS2_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!42 = !{!"_ZTSN10ClipperLib8ClipTypeE", !12, i64 0}
!43 = !{!"_ZTSNSt7__cxx114listIxSaIxEEE", !44, i64 0}
!44 = !{!"_ZTSNSt7__cxx1110_List_baseIxSaIxEEE", !45, i64 0}
!45 = !{!"_ZTSNSt7__cxx1110_List_baseIxSaIxEE10_List_implE", !46, i64 0}
!46 = !{!"_ZTSNSt8__detail17_List_node_headerE", !47, i64 0, !48, i64 16}
!47 = !{!"_ZTSNSt8__detail15_List_node_baseE", !11, i64 0, !11, i64 8}
!48 = !{!"long", !12, i64 0}
!49 = !{!"_ZTSN10ClipperLib12PolyFillTypeE", !12, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass