; 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::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 }

@_ZTIN10ClipperLib16clipperExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.2 = external hidden unnamed_addr constant [32 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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN10ClipperLib12IsHorizontalERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(136)) #2

declare i32 @__gxx_personality_v0(...)

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 #3 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 #4 align 2

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ClipperLib11ClipperBase17UpdateEdgeIntoAELERPNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %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
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %11, i32 0, i32 12
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %14 = icmp ne ptr %13, null
  br i1 %14, label %22, label %15

15:                                               ; preds = %2
  %16 = call ptr @__cxa_allocate_exception(i64 40) #5
  invoke void @_ZN10ClipperLib16clipperExceptionC2EPKc(ptr noundef nonnull align 8 dereferenceable(40) %16, ptr noundef @.str.2)
          to label %17 unwind label %18

17:                                               ; preds = %15
  call void @__cxa_throw(ptr %16, ptr @_ZTIN10ClipperLib16clipperExceptionE, ptr @_ZN10ClipperLib16clipperExceptionD2Ev) #6
  unreachable

18:                                               ; preds = %15
  %19 = landingpad { ptr, i32 }
          cleanup
  %20 = extractvalue { ptr, i32 } %19, 0
  store ptr %20, ptr %5, align 8
  %21 = extractvalue { ptr, i32 } %19, 1
  store i32 %21, ptr %6, align 4
  call void @__cxa_free_exception(ptr %16) #5
  br label %131

22:                                               ; preds = %2
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %24, i32 0, i32 9
  %26 = load i32, ptr %25, align 4, !tbaa !17
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %28, i32 0, i32 12
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %30, i32 0, i32 9
  store i32 %26, ptr %31, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = load ptr, ptr %32, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %33, i32 0, i32 14
  %35 = load ptr, ptr %34, align 8, !tbaa !18
  store ptr %35, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %37, i32 0, i32 13
  %39 = load ptr, ptr %38, align 8, !tbaa !19
  store ptr %39, ptr %8, align 8, !tbaa !5
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %49

42:                                               ; preds = %22
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %44, i32 0, i32 12
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %47, i32 0, i32 13
  store ptr %46, ptr %48, align 8, !tbaa !19
  br label %55

49:                                               ; preds = %22
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %51, i32 0, i32 12
  %53 = load ptr, ptr %52, align 8, !tbaa !9
  %54 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %9, i32 0, i32 8
  store ptr %53, ptr %54, align 8, !tbaa !20
  br label %55

55:                                               ; preds = %49, %42
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = icmp ne ptr %56, null
  br i1 %57, label %58, label %65

58:                                               ; preds = %55
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %60, i32 0, i32 12
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %63, i32 0, i32 14
  store ptr %62, ptr %64, align 8, !tbaa !18
  br label %65

65:                                               ; preds = %58, %55
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %67, i32 0, i32 5
  %69 = load i32, ptr %68, align 4, !tbaa !42
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %71, i32 0, i32 12
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %73, i32 0, i32 5
  store i32 %69, ptr %74, align 4, !tbaa !42
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %76, i32 0, i32 6
  %78 = load i32, ptr %77, align 8, !tbaa !43
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %80, i32 0, i32 12
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %83 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %82, i32 0, i32 6
  store i32 %78, ptr %83, align 8, !tbaa !43
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %85, i32 0, i32 7
  %87 = load i32, ptr %86, align 4, !tbaa !44
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %89, i32 0, i32 12
  %91 = load ptr, ptr %90, align 8, !tbaa !9
  %92 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %91, i32 0, i32 7
  store i32 %87, ptr %92, align 4, !tbaa !44
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %94, i32 0, i32 8
  %96 = load i32, ptr %95, align 8, !tbaa !45
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %98, i32 0, i32 12
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %100, i32 0, i32 8
  store i32 %96, ptr %101, align 8, !tbaa !45
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = load ptr, ptr %102, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %103, i32 0, i32 12
  %105 = load ptr, ptr %104, align 8, !tbaa !9
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %105, ptr %106, align 8, !tbaa !5
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = load ptr, ptr %107, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %111, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %112, ptr align 8 %109, i64 16, i1 false), !tbaa.struct !46
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %115, i32 0, i32 14
  store ptr %113, ptr %116, align 8, !tbaa !18
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %119, i32 0, i32 13
  store ptr %117, ptr %120, align 8, !tbaa !19
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  %123 = call noundef zeroext i1 @_ZN10ClipperLib12IsHorizontalERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(136) %122)
  br i1 %123, label %130, label %124

124:                                              ; preds = %65
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %126, i32 0, i32 2
  %128 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %127, i32 0, i32 1
  %129 = load i64, ptr %128, align 8, !tbaa !48
  call void @_ZN10ClipperLib11ClipperBase14InsertScanbeamEx(ptr noundef nonnull align 8 dereferenceable(144) %9, i64 noundef %129)
  br label %130

130:                                              ; preds = %124, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void

131:                                              ; preds = %18
  %132 = load ptr, ptr %5, align 8
  %133 = load i32, ptr %6, align 4
  %134 = insertvalue { ptr, i32 } poison, ptr %132, 0
  %135 = insertvalue { ptr, i32 } %134, i32 %133, 1
  resume { ptr, i32 } %135
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn }

!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 96}
!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, !16, i64 76}
!18 = !{!10, !6, i64 112}
!19 = !{!10, !6, i64 104}
!20 = !{!21, !6, i64 104}
!21 = !{!"_ZTSN10ClipperLib11ClipperBaseE", !22, i64 8, !23, i64 16, !27, i64 40, !28, i64 48, !27, i64 72, !27, i64 73, !32, i64 80, !6, i64 104, !36, i64 112}
!22 = !{!"_ZTSN9__gnu_cxx17__normal_iteratorIPN10ClipperLib12LocalMinimumESt6vectorIS2_SaIS2_EEEE", !6, i64 0}
!23 = !{!"_ZTSSt6vectorIN10ClipperLib12LocalMinimumESaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"bool", !7, i64 0}
!28 = !{!"_ZTSSt6vectorIPN10ClipperLib5TEdgeESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"_ZTSSt6vectorIPN10ClipperLib6OutRecESaIS2_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!"_ZTSSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE", !37, i64 0, !41, i64 24}
!37 = !{!"_ZTSSt6vectorIxSaIxEE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIxSaIxEE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!"_ZTSSt4lessIxE"}
!42 = !{!10, !15, i64 60}
!43 = !{!10, !16, i64 64}
!44 = !{!10, !16, i64 68}
!45 = !{!10, !16, i64 72}
!46 = !{i64 0, i64 8, !47, i64 8, i64 8, !47}
!47 = !{!12, !12, i64 0}
!48 = !{!10, !12, i64 40}


; 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.2 = external hidden unnamed_addr constant [32 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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 #2 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 #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ClipperLib11ClipperBase17UpdateEdgeIntoAELERPNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr nocapture noundef nonnull align 8 dereferenceable(8) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = load ptr, ptr %1, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 96
  %5 = load ptr, ptr %4, align 8, !tbaa !9
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %6, label %11

6:                                                ; preds = %2
  %7 = tail call ptr @__cxa_allocate_exception(i64 40) #4
  invoke void @_ZN10ClipperLib16clipperExceptionC2EPKc(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull @.str.2)
          to label %8 unwind label %9

8:                                                ; preds = %6
  tail call void @__cxa_throw(ptr nonnull %7, ptr nonnull @_ZTIN10ClipperLib16clipperExceptionE, ptr nonnull @_ZN10ClipperLib16clipperExceptionD2Ev) #5
  unreachable

9:                                                ; preds = %6
  %10 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %7) #4
  resume { ptr, i32 } %10

11:                                               ; preds = %2
  %12 = getelementptr inbounds i8, ptr %3, i64 76
  %13 = load i32, ptr %12, align 4, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %5, i64 76
  store i32 %13, ptr %14, align 4, !tbaa !17
  %15 = getelementptr inbounds i8, ptr %3, i64 112
  %16 = load ptr, ptr %15, align 8, !tbaa !18
  %17 = getelementptr inbounds i8, ptr %3, i64 104
  %18 = load ptr, ptr %17, align 8, !tbaa !19
  %.not34 = icmp eq ptr %16, null
  %. = select i1 %.not34, ptr %0, ptr %16
  %19 = getelementptr inbounds i8, ptr %., i64 104
  store ptr %5, ptr %19, align 8, !tbaa !5
  %.not35 = icmp eq ptr %18, null
  br i1 %.not35, label %25, label %20

20:                                               ; preds = %11
  %21 = load ptr, ptr %1, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %21, i64 96
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = getelementptr inbounds i8, ptr %18, i64 112
  store ptr %23, ptr %24, align 8, !tbaa !18
  br label %25

25:                                               ; preds = %20, %11
  %26 = load ptr, ptr %1, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 60
  %28 = getelementptr inbounds i8, ptr %26, i64 96
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = getelementptr inbounds i8, ptr %29, i64 60
  %31 = load <4 x i32>, ptr %27, align 4, !tbaa !20
  store <4 x i32> %31, ptr %30, align 4, !tbaa !20
  store ptr %29, ptr %1, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %29, i64 16
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(16) %29, i64 16, i1 false), !tbaa.struct !21
  %33 = load ptr, ptr %1, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 112
  store ptr %16, ptr %34, align 8, !tbaa !18
  %35 = load ptr, ptr %1, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %35, i64 104
  store ptr %18, ptr %36, align 8, !tbaa !19
  %37 = load ptr, ptr %1, align 8, !tbaa !5
  %38 = tail call noundef zeroext i1 @_ZN10ClipperLib12IsHorizontalERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(136) %37)
  br i1 %38, label %43, label %39

39:                                               ; preds = %25
  %40 = load ptr, ptr %1, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 40
  %42 = load i64, ptr %41, align 8, !tbaa !23
  tail call void @_ZN10ClipperLib11ClipperBase14InsertScanbeamEx(ptr noundef nonnull align 8 dereferenceable(144) %0, i64 noundef %42)
  br label %43

43:                                               ; preds = %39, %25
  ret void
}

attributes #0 = { mustprogress nocallback nofree 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 }
attributes #5 = { noreturn }

!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 96}
!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, !16, i64 76}
!18 = !{!10, !6, i64 112}
!19 = !{!10, !6, i64 104}
!20 = !{!7, !7, i64 0}
!21 = !{i64 0, i64 8, !22, i64 8, i64 8, !22}
!22 = !{!12, !12, i64 0}
!23 = !{!10, !12, i64 40}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass