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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ClipperLib13ClipperOffset15FixOrientationsEv(ptr noundef nonnull align 8 dereferenceable(256) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  %8 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %7, i32 0, i32 12
  %9 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %8, i32 0, i32 0
  %10 = load i64, ptr %9, align 8, !tbaa !9
  %11 = icmp sge i64 %10, 0
  br i1 %11, label %12, label %59

12:                                               ; preds = %1
  %13 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %7, i32 0, i32 13
  %14 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %13, i32 0, i32 2
  %15 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %7, i32 0, i32 12
  %16 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %15, i32 0, i32 0
  %17 = load i64, ptr %16, align 8, !tbaa !9
  %18 = trunc i64 %17 to i32
  %19 = sext i32 %18 to i64
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN10ClipperLib8PolyNodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %19) #3
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %21, i32 0, i32 1
  %23 = call noundef zeroext i1 @_ZN10ClipperLib11OrientationERKSt6vectorINS_8IntPointESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %22)
  br i1 %23, label %59, label %24

24:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !35
  br label %25

25:                                               ; preds = %55, %24
  %26 = load i32, ptr %3, align 4, !tbaa !35
  %27 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %7, i32 0, i32 13
  %28 = call noundef i32 @_ZNK10ClipperLib8PolyNode10ChildCountEv(ptr noundef nonnull align 8 dereferenceable(80) %27)
  %29 = icmp slt i32 %26, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %58

31:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %32 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %7, i32 0, i32 13
  %33 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %32, i32 0, i32 2
  %34 = load i32, ptr %3, align 4, !tbaa !35
  %35 = sext i32 %34 to i64
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN10ClipperLib8PolyNodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %35) #3
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  store ptr %37, ptr %4, align 8, !tbaa !5
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %38, i32 0, i32 7
  %40 = load i32, ptr %39, align 4, !tbaa !36
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %51, label %42

42:                                               ; preds = %31
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %43, i32 0, i32 7
  %45 = load i32, ptr %44, align 4, !tbaa !36
  %46 = icmp eq i32 %45, 1
  br i1 %46, label %47, label %54

47:                                               ; preds = %42
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %48, i32 0, i32 1
  %50 = call noundef zeroext i1 @_ZN10ClipperLib11OrientationERKSt6vectorINS_8IntPointESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %49)
  br i1 %50, label %51, label %54

51:                                               ; preds = %47, %31
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %52, i32 0, i32 1
  call void @_ZN10ClipperLib11ReversePathERSt6vectorINS_8IntPointESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %53)
  br label %54

54:                                               ; preds = %51, %47, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %3, align 4, !tbaa !35
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %3, align 4, !tbaa !35
  br label %25, !llvm.loop !37

58:                                               ; preds = %30
  br label %89

59:                                               ; preds = %12, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !35
  br label %60

60:                                               ; preds = %85, %59
  %61 = load i32, ptr %5, align 4, !tbaa !35
  %62 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %7, i32 0, i32 13
  %63 = call noundef i32 @_ZNK10ClipperLib8PolyNode10ChildCountEv(ptr noundef nonnull align 8 dereferenceable(80) %62)
  %64 = icmp slt i32 %61, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %88

66:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %67 = getelementptr inbounds %"class.ClipperLib::ClipperOffset", ptr %7, i32 0, i32 13
  %68 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %67, i32 0, i32 2
  %69 = load i32, ptr %5, align 4, !tbaa !35
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN10ClipperLib8PolyNodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %70) #3
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  store ptr %72, ptr %6, align 8, !tbaa !5
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %73, i32 0, i32 7
  %75 = load i32, ptr %74, align 4, !tbaa !36
  %76 = icmp eq i32 %75, 1
  br i1 %76, label %77, label %84

77:                                               ; preds = %66
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %78, i32 0, i32 1
  %80 = call noundef zeroext i1 @_ZN10ClipperLib11OrientationERKSt6vectorINS_8IntPointESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %79)
  br i1 %80, label %84, label %81

81:                                               ; preds = %77
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %"class.ClipperLib::PolyNode", ptr %82, i32 0, i32 1
  call void @_ZN10ClipperLib11ReversePathERSt6vectorINS_8IntPointESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %83)
  br label %84

84:                                               ; preds = %81, %77, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %85

85:                                               ; preds = %84
  %86 = load i32, ptr %5, align 4, !tbaa !35
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %5, align 4, !tbaa !35
  br label %60, !llvm.loop !39

88:                                               ; preds = %65
  br label %89

89:                                               ; preds = %88, %58
  ret void
}

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

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


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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ClipperLib13ClipperOffset15FixOrientationsEv(ptr noundef nonnull align 8 dereferenceable(256) %0) local_unnamed_addr #1 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 160
  %3 = load i64, ptr %2, align 8, !tbaa !5
  %4 = icmp sgt i64 %3, -1
  br i1 %4, label %5, label %28

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 176
  %7 = getelementptr inbounds i8, ptr %0, i64 208
  %sext = shl i64 %3, 32
  %8 = ashr exact i64 %sext, 32
  %9 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN10ClipperLib8PolyNodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %8) #2
  %10 = load ptr, ptr %9, align 8, !tbaa !34
  %11 = getelementptr inbounds i8, ptr %10, i64 8
  %12 = tail call noundef zeroext i1 @_ZN10ClipperLib11OrientationERKSt6vectorINS_8IntPointESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %11)
  br i1 %12, label %28, label %.preheader

.preheader:                                       ; preds = %5
  %13 = tail call noundef i32 @_ZNK10ClipperLib8PolyNode10ChildCountEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %24
  %indvars.iv = phi i64 [ %indvars.iv.next, %24 ], [ 0, %.preheader ]
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN10ClipperLib8PolyNodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv) #2
  %16 = load ptr, ptr %15, align 8, !tbaa !34
  %17 = getelementptr inbounds i8, ptr %16, i64 76
  %18 = load i32, ptr %17, align 4, !tbaa !35
  switch i32 %18, label %24 [
    i32 0, label %22
    i32 1, label %19
  ]

19:                                               ; preds = %.lr.ph
  %20 = getelementptr inbounds i8, ptr %16, i64 8
  %21 = tail call noundef zeroext i1 @_ZN10ClipperLib11OrientationERKSt6vectorINS_8IntPointESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %20)
  br i1 %21, label %22, label %24

22:                                               ; preds = %.lr.ph, %19
  %23 = getelementptr inbounds i8, ptr %16, i64 8
  tail call void @_ZN10ClipperLib11ReversePathERSt6vectorINS_8IntPointESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %23)
  br label %24

24:                                               ; preds = %.lr.ph, %22, %19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = tail call noundef i32 @_ZNK10ClipperLib8PolyNode10ChildCountEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  %26 = sext i32 %25 to i64
  %27 = icmp slt i64 %indvars.iv.next, %26
  br i1 %27, label %.lr.ph, label %.loopexit, !llvm.loop !36

28:                                               ; preds = %5, %1
  %29 = getelementptr inbounds i8, ptr %0, i64 176
  %30 = tail call noundef i32 @_ZNK10ClipperLib8PolyNode10ChildCountEv(ptr noundef nonnull align 8 dereferenceable(80) %29)
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.lr.ph19, label %.loopexit

.lr.ph19:                                         ; preds = %28
  %32 = getelementptr inbounds i8, ptr %0, i64 208
  br label %33

33:                                               ; preds = %.lr.ph19, %43
  %indvars.iv22 = phi i64 [ 0, %.lr.ph19 ], [ %indvars.iv.next23, %43 ]
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN10ClipperLib8PolyNodeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %indvars.iv22) #2
  %35 = load ptr, ptr %34, align 8, !tbaa !34
  %36 = getelementptr inbounds i8, ptr %35, i64 76
  %37 = load i32, ptr %36, align 4, !tbaa !35
  %38 = icmp eq i32 %37, 1
  br i1 %38, label %39, label %43

39:                                               ; preds = %33
  %40 = getelementptr inbounds i8, ptr %35, i64 8
  %41 = tail call noundef zeroext i1 @_ZN10ClipperLib11OrientationERKSt6vectorINS_8IntPointESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %40)
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  tail call void @_ZN10ClipperLib11ReversePathERSt6vectorINS_8IntPointESaIS1_EE(ptr noundef nonnull align 8 dereferenceable(24) %40)
  br label %43

43:                                               ; preds = %42, %39, %33
  %indvars.iv.next23 = add nuw nsw i64 %indvars.iv22, 1
  %44 = tail call noundef i32 @_ZNK10ClipperLib8PolyNode10ChildCountEv(ptr noundef nonnull align 8 dereferenceable(80) %29)
  %45 = sext i32 %44 to i64
  %46 = icmp slt i64 %indvars.iv.next23, %45
  br i1 %46, label %33, label %.loopexit, !llvm.loop !38

.loopexit:                                        ; preds = %24, %43, %.preheader, %28
  ret void
}

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

attributes #0 = { 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 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 = { 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, !24, i64 160}
!6 = !{!"_ZTSN10ClipperLib13ClipperOffsetE", !7, i64 0, !7, i64 8, !10, i64 16, !15, i64 40, !15, i64 64, !19, i64 88, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !23, i64 160, !25, i64 176}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIS_IN10ClipperLib8IntPointESaIS1_EESaIS3_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseISt6vectorIN10ClipperLib8IntPointESaIS2_EESaIS4_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN10ClipperLib8IntPointESaIS2_EESaIS4_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseISt6vectorIN10ClipperLib8IntPointESaIS2_EESaIS4_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIN10ClipperLib8IntPointESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIN10ClipperLib8IntPointESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib8IntPointESaIS1_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib8IntPointESaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!"_ZTSSt6vectorIN10ClipperLib11DoublePointESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIN10ClipperLib11DoublePointESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib11DoublePointESaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib11DoublePointESaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!23 = !{!"_ZTSN10ClipperLib8IntPointE", !24, i64 0, !24, i64 8}
!24 = !{!"long long", !8, i64 0}
!25 = !{!"_ZTSN10ClipperLib8PolyNodeE", !15, i64 8, !26, i64 32, !14, i64 56, !30, i64 64, !31, i64 68, !32, i64 72, !33, i64 76}
!26 = !{!"_ZTSSt6vectorIPN10ClipperLib8PolyNodeESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib8PolyNodeESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib8PolyNodeESaIS2_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib8PolyNodeESaIS2_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!30 = !{!"int", !8, i64 0}
!31 = !{!"bool", !8, i64 0}
!32 = !{!"_ZTSN10ClipperLib8JoinTypeE", !8, i64 0}
!33 = !{!"_ZTSN10ClipperLib7EndTypeE", !8, i64 0}
!34 = !{!14, !14, i64 0}
!35 = !{!25, !33, i64 76}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = distinct !{!38, !37}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass